NML - a Newgrf Meta Language
Moderator: Graphics Moderators
Re: NML - a Newgrf Meta Language
That is not possible because as planetmaker said the correct id depends on the current climate and/or loaded industry newgrf. Slot 0x0A for example can be Valuables/Gold/Diamonds, Plastic or Milk.
-
- Engineer
- Posts: 49
- Joined: 09 Oct 2010 13:45
- Location: Göteborg, Sweden
Re: NML - a Newgrf Meta Language
Yexo wrote:That is not possible because as planetmaker said the correct id depends on the current climate and/or loaded industry newgrf. Slot 0x0A for example can be Valuables/Gold/Diamonds, Plastic or Milk.
Well at any rate, it worked. And I'm learning a little more each day now.
Bill
Re: NML - a Newgrf Meta Language
Thanks to Ammler there is now a windows binary being build every night. You can download it (along with a .tar.gz of the source) here: http://bundles.openttdcoop.org/nml/nightlies/LATEST/
-
- Engineer
- Posts: 49
- Joined: 09 Oct 2010 13:45
- Location: Göteborg, Sweden
Re: NML - a Newgrf Meta Language
Is this being built with py2exe or something better?Yexo wrote:Thanks to Ammler there is now a windows binary being build every night. You can download it (along with a .tar.gz of the source) here: http://bundles.openttdcoop.org/nml/nightlies/LATEST/
Bill
Re: NML - a Newgrf Meta Language
we are using cxfreeze with wine
Did actually someone test this already, I got an error with images: http://dev.openttdcoop.org/issues/2351#note-7
would be nice to get feedback, if nmlc.exe is actually working
Edit: nmlc.exe doesn't support pcx images..
Did actually someone test this already, I got an error with images: http://dev.openttdcoop.org/issues/2351#note-7
would be nice to get feedback, if nmlc.exe is actually working
Edit: nmlc.exe doesn't support pcx images..
Last edited by Ammler on 24 Mar 2011 13:39, edited 1 time in total.
Town Names: Portuguese Belarusian French Swiss · Temperate Lumber Mill
Still work in progress: OpenGFX or/and OpenSFX - Please help!
-
- Traffic Manager
- Posts: 146
- Joined: 27 Dec 2004 19:37
- Location: Home of the Big Cat
Re: NML - a Newgrf Meta Language
Have installed windows binary and python27.
So do i use python shell to write file or notepad.
So do i use python shell to write file or notepad.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NML - a Newgrf Meta Language
You use a (plain) text editor of your choice to write nml files. They should be utf-8 encoded.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
-
- Traffic Manager
- Posts: 146
- Joined: 27 Dec 2004 19:37
- Location: Home of the Big Cat
Re: NML - a Newgrf Meta Language
Have test file see below
________________________________________________________
grf {
grfid : "NP\01\01";
name : string(STR_GRF_NAME);
desc : string(STR_GRF_DESCRIPTION);
version : 1;
min_compatible_version : 1;
}
item (FEAT_TRAINS, Lev1 'Leviathan' (Electric), 84) {
property {
sprite_id : 84;
introduction_date date(1920,01,01);
vehicle_life 6;
model_life 12;
speed 96 km/h;
power 1000;
weight 160;
cost 20;
}
}
_________________________________________________________
When trying to compile get this error.
___________________________________________
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Cyril>F:
F:\>cd\NML_r1298
F:\NML_r1298>nmlc --grf Maglav1920.grf Maglav1920.nml
nmlc: Default language file "lang\english.lng" doesn't exist
F:\NML_r1298>
________________________________________________
________________________________________________________
grf {
grfid : "NP\01\01";
name : string(STR_GRF_NAME);
desc : string(STR_GRF_DESCRIPTION);
version : 1;
min_compatible_version : 1;
}
item (FEAT_TRAINS, Lev1 'Leviathan' (Electric), 84) {
property {
sprite_id : 84;
introduction_date date(1920,01,01);
vehicle_life 6;
model_life 12;
speed 96 km/h;
power 1000;
weight 160;
cost 20;
}
}
_________________________________________________________
When trying to compile get this error.
___________________________________________
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\Cyril>F:
F:\>cd\NML_r1298
F:\NML_r1298>nmlc --grf Maglav1920.grf Maglav1920.nml
nmlc: Default language file "lang\english.lng" doesn't exist
F:\NML_r1298>
________________________________________________
Re: NML - a Newgrf Meta Language
Have you tried to do what the error itself suggests?
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
-
- Traffic Manager
- Posts: 146
- Joined: 27 Dec 2004 19:37
- Location: Home of the Big Cat
Re: NML - a Newgrf Meta Language
There is no Lang dir in either python or windows binary so is this something i have to create,
if so were should it be, or should it have been installed with python or windows binary.
if so were should it be, or should it have been installed with python or windows binary.
- Emperor Jake
- Tycoon
- Posts: 3427
- Joined: 24 Apr 2007 09:37
- Skype: Discord: Emperor Jake #4106
- Location: Not Actually Japan
- Contact:
Re: NML - a Newgrf Meta Language
I'm trying to make a railtype GRF, and I would like to use the default monorail track graphics. This is what I have so far - the track works properly, the catenary is shown, but the track itself shows up as the normal rail.
Thanks,
Jake
Code: Select all
item(FEAT_RAILTYPES) {
property {
label: "VACT";
name: string(STR_VAC_RAIL);
menu_text: string(STR_VAC_RAIL);
build_window_caption: string(STR_BUILD_CAPTION);
autoreplace_text: string(STR_AUTOREPLACE);
new_engine_text: string(STR_NEW_ENGINE);
compatible_railtype_list: ["VACT"];
// powered_railtype_list: ["VACT"];
railtype_flags: bitmask(RAILTYPE_FLAG_CATENARY, RAILTYPE_FLAG_NO_LEVEL_CROSSING);
curve_speed_multiplier: 10;
station_graphics: RAILTYPE_STATION_MONORAIL;
construction_cost: 256;
speed_limit: 0 km/h;
acceleration_model: ACC_MODEL_MAGLEV;
}
graphics {
CATENARY_WIRE: wire_group_top;
CATENARY_PYLONS: pylons_group_top;
}
}
Jake
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NML - a Newgrf Meta Language
I'm afraid that you'll really have to provide the graphics for the tracks yourself. You need to provide graphics for all those elements which are indicated by a * in the available graphics block list on http://hg.openttdcoop.org/nml/raw-file/ ... types.html - thus underlay, overlay, tunnels and level crossings; it is not possible to reference the base set sprites for this purpose, those sprite types simply don't exist there.
That said, I'd highly welcome if someone did the actual work to convert the existing tracks (also) into a railtype; it'll mean to probably do a bit colour-select cut and paste of the existing tracks sprites - which is certainly feasible; but if you want the existing monorail as railtype there's little way around that. But as OpenGFX' sprites are under GPL license you could go right ahead with this task provided you're ready to also release your grf under GPL (i.e. attribution and publish the nml, pngs and lng files with each release)
Cheers,
pm
That said, I'd highly welcome if someone did the actual work to convert the existing tracks (also) into a railtype; it'll mean to probably do a bit colour-select cut and paste of the existing tracks sprites - which is certainly feasible; but if you want the existing monorail as railtype there's little way around that. But as OpenGFX' sprites are under GPL license you could go right ahead with this task provided you're ready to also release your grf under GPL (i.e. attribution and publish the nml, pngs and lng files with each release)
Cheers,
pm
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
- Emperor Jake
- Tycoon
- Posts: 3427
- Joined: 24 Apr 2007 09:37
- Skype: Discord: Emperor Jake #4106
- Location: Not Actually Japan
- Contact:
Re: NML - a Newgrf Meta Language
Okay, thanks for that I release everything I make as GPL anyway.
Re: NML - a Newgrf Meta Language
Hi there I'm having problems setting up my nml compiler, I'm running windows 7 64 bit with python 2.7.1, I followed the instructions specified in the documentation, when I run --version I get the flowing response:
However when I attempt to use the following batch file to compile the vacTrain set as a test:
I get this error:
Thanks for any help you can offer,
Lawton27
However when I attempt to use the following batch file to compile the vacTrain set as a test:
Code: Select all
@Echo off
nmlc.exe --nfo vactrain.nfo --grf vactrain.grf vactrain.nml
pause
ECHO Done!
Thanks for any help you can offer,
Lawton27
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NML - a Newgrf Meta Language
It will be nice, if you could attach all the files which make up the grf (nml, graphics and language files with their respecive folders), you found a bug in NML. Please try also a more recent version, e.g. the nightly one is found here: http://bundles.openttdcoop.org/nml/nightlies/LATEST/ (you want the windows zip). I'm not sure, maybe it's fixed there, your version of NML is quite old (more than two months).
One guess is that it's a hickup with (missing or wrong) capitalization of file names of one of the graphics files you include.
You also have unreferenced code sections, that's what the first two lines with the warnings are about.
One guess is that it's a hickup with (missing or wrong) capitalization of file names of one of the graphics files you include.
You also have unreferenced code sections, that's what the first two lines with the warnings are about.
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: NML - a Newgrf Meta Language
I don't know why I'm getting this problem I'm using the vacTrain newGrf source as a test, so you can download that from the first post in this thread: http://www.tt-forums.net/viewtopic.php?f=67&t=53743
Using the latest nightly I get the same error except it states the nml version as unknown and by re downloading the source I managed to get rid of the first 2 errors, I must have accidentally changed something there...
Thanks,
Lawton27
Using the latest nightly I get the same error except it states the nml version as unknown and by re downloading the source I managed to get rid of the first 2 errors, I must have accidentally changed something there...
Thanks,
Lawton27
- Emperor Jake
- Tycoon
- Posts: 3427
- Joined: 24 Apr 2007 09:37
- Skype: Discord: Emperor Jake #4106
- Location: Not Actually Japan
- Contact:
Re: NML - a Newgrf Meta Language
No, that was because ou had an old version of th vactrain source That error was fixed.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NML - a Newgrf Meta Language
Hm, I can't reproduce that with NML r1301 or r1307. When I use the vactrain.nml I do get alawton27 wrote:I don't know why I'm getting this problem I'm using the vacTrain newGrf source as a test, so you can download that from the first post in this thread: http://www.tt-forums.net/viewtopic.php?f=67&t=53743
Using the latest nightly I get the same error except it states the nml version as unknown and by re downloading the source I managed to get rid of the first 2 errors, I must have accidentally changed something there...
Thanks,
Lawton27
Code: Select all
nmlc: Image file "vactrain/sprites/local1.pcx": File doesn't exist
What do you mean with "it states the nml version as unknown"?
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: NML - a Newgrf Meta Language
be also aware that nmlc.exe doesn't work with pcx
Town Names: Portuguese Belarusian French Swiss · Temperate Lumber Mill
Still work in progress: OpenGFX or/and OpenSFX - Please help!
Who is online
Users browsing this forum: No registered users and 22 guests