
NML - a Newgrf Meta Language
Moderator: Graphics Moderators
- stefino_cz
- Transport Coordinator
- Posts: 268
- Joined: 02 Jul 2015 08:05
- Location: Czech Republic
- Contact:
Re: NML - a Newgrf Meta Language
How to fix my newgrf written in nml to display track icon in menu?
All track have icon except my 600mm set.
Where these icons are defined?
All track have icon except my 600mm set.
Where these icons are defined?
Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Re: NML - a Newgrf Meta Language
https://newgrf-specs.tt-wiki.net/wiki/Action3/Railtypes
GUI Sprites (00)
This was literally the first part of the spec for railtype graphics
https://newgrf-specs.tt-wiki.net/wiki/N ... le_sprites
(Contrary to what the NML spec claims, this is not a callback, it's a "cargo" ID)
GUI Sprites (00)
This was literally the first part of the spec for railtype graphics

https://newgrf-specs.tt-wiki.net/wiki/N ... le_sprites
(Contrary to what the NML spec claims, this is not a callback, it's a "cargo" ID)
He's like, some kind of OpenTTD developer.
Re: NML - a Newgrf Meta Language
Hah, problem solved - my track sprite is displayed, but has same gray color as menu background...
Sneak 100
Sneak 100

Formerly known as: McZapkie
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, wired, ECS industry extension, V4 CEE train set, HotHut.
Another favorite games: freeciv longturn, OHOL/2HOL.
-
- Tycoon
- Posts: 1660
- Joined: 16 Dec 2007 22:24
- Location: Idaho, USA
Re: NML - a Newgrf Meta Language
Perhaps more like: Hack 100


Eyecandy Road Vehicles | Fake Subways | Supercheese's NewObjects
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
"Fashions and cultures change, but steam trains shall always be majestic."
-Professor Hershel Layton
- FulliAutomatix
- Engineer
- Posts: 120
- Joined: 24 Aug 2014 12:20
- Location: Kaon Prison, Cybertron
Re: NML - a Newgrf Meta Language
Hello, I'm trying to get compile this nightly version of NMLC in order to compile an industry that has more than 3 input and 2 output cargo types.
I followed the instructions on the github repo about installation successfully, but when I attempt to run nmlc from any folder in my computer I get the error at the bottom (I included the other commands to show that I did just install PIL and PLY is installed too).
Anybody able to help me out on this? Thanks.
I followed the instructions on the github repo about installation successfully, but when I attempt to run nmlc from any folder in my computer I get the error at the bottom (I included the other commands to show that I did just install PIL and PLY is installed too).
Anybody able to help me out on this? Thanks.
Known as StarRaid/UnholyPhish on other platforms
Some links to stuff I've made:
-=RUKTS=- | -=NML Py-Patcher (a Python 3.0 pre-compiler)=- | -=Screenshots=- | -=Doom Soundtrack port to OpenTTD=- | -=Heightmaps collection=-

Some links to stuff I've made:
-=RUKTS=- | -=NML Py-Patcher (a Python 3.0 pre-compiler)=- | -=Screenshots=- | -=Doom Soundtrack port to OpenTTD=- | -=Heightmaps collection=-

Re: NML - a Newgrf Meta Language
looks like some version incompatibility to me...
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Re: NML - a Newgrf Meta Language
Code: Select all
=======StarRaid's NML patcher!=======
Attempting to backup IH_AddonSet.nml
Successfully backed up to "backups/IH_AddonSet-03-00-36-2019-05-18.nml"!
Output : IH_AddonSet.nml
File : IH_AddonSet.pnml
Backup : 1
Verbose : 1
Opening "IH_AddonSet.pnml" as the main header.
Patched src/header.pnml with no errors.
Patched src/cyclops.pnml with no errors.
Patched src/electra.pnml with no errors.
Patched src/quicksilver.pnml with no errors.
[Knmlc ERROR: nmlc: An internal error has occurred:
nmlc-version: v6379:afad0c76c40b from 2017-06-19
Error: (UnicodeEncodeError) "'charmap' codec can't encode character '\u202c' in position 19: character maps to <undefined>".
Command: ['nmlc', 'IH_AddonSet.nml', '-o', 'IH_AddonSet.grf']
Location: File "c:\python\32-bit\3.3\lib\encodings\cp437.py", line 19, in encode
EDIT: NML files must be coded in ANSI to work, apparently.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Re: NML - a Newgrf Meta Language
no, but you can't mix it.SimYouLater wrote:EDIT: NML files must be coded in ANSI to work, apparently.
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Re: NML - a Newgrf Meta Language
I didn't mix it. Nothing worked until I converted to ANSI.Eddi wrote:no, but you can't mix it.SimYouLater wrote:EDIT: NML files must be coded in ANSI to work, apparently.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
-
- Engineer
- Posts: 65
- Joined: 19 Nov 2018 19:26
- Location: West Bengal,India
Re: NML - a Newgrf Meta Language
Yup. Just as intended.SomeIndianGuy wrote:Please help, Nmlc.exe is not opening at all.
That is to say, you use its functions through a command prompt window.
-
- Engineer
- Posts: 65
- Joined: 19 Nov 2018 19:26
- Location: West Bengal,India
Re: NML - a Newgrf Meta Language
What should I write?
?
Code: Select all
pip 3 install nml
Nothing to put here!
Re: NML - a Newgrf Meta Language
No, reread https://www.tt-wiki.net/wiki/NMLTutorial/Installation.SomeIndianGuy wrote:What should I write??Code: Select all
pip 3 install nml
You add it to your environment variables so you can use it over the command line.
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Re: NML - a Newgrf Meta Language
Code: Select all
ERROR: Image file "gfx/roads/track.png": cannot identify image file 'C:\\TTDTools\\GRFs\\Recycled Infrastructure Set\\CURRENT\\source\\gfx\\roads\\track.png'
All I did was alter tracks.png in GIMP, and now the NewGRF won't compile unless I exclude tramway.pnml
Help? Thanks in advance.
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Re: NML - a Newgrf Meta Language
Have you tried compiling without changing the image first? If that works, you know that you changing the image is the cause of the problem. If compiling the unaltered version also fails, you know the problem is not in you changing the image, but in something else.
Did you check that the file in the error message actually exists? (exactly as printed)
For what it is worth, did you try using a path that has no spaces in it like "Recycled Infrastructure Set" has?
Did you check that the file in the error message actually exists? (exactly as printed)
For what it is worth, did you try using a path that has no spaces in it like "Recycled Infrastructure Set" has?
Being a retired OpenTTD developer does not mean I know what I am doing.
-
- Chief Executive
- Posts: 675
- Joined: 03 Apr 2016 20:19
Re: NML - a Newgrf Meta Language
For some reason, I got up yesterday morning, attempted the compile, and everything worked. I have no clue what I did right.Alberth wrote:Have you tried compiling without changing the image first? If that works, you know that you changing the image is the cause of the problem. If compiling the unaltered version also fails, you know the problem is not in you changing the image, but in something else.
Did you check that the file in the error message actually exists? (exactly as printed)
For what it is worth, did you try using a path that has no spaces in it like "Recycled Infrastructure Set" has?
Licenses for my work...
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
You automatically have my permission to re-license graphics or code by me if needed for use in any project that is not GPL v2, on the condition that if you release any derivatives of my graphics they're automatically considered as ALSO GPL v2 (code may remain unreleased, but please do provide it) and carry this provision in GPL v2 uses.
Please ask someone in-the-know to be sure that the graphics are done by me. Especially TTD-Scale, long story.
Re: NML - a Newgrf Meta Language
How to encode pnml in graphics grf?
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: NML - a Newgrf Meta Language
Usually pnml files are a part of a project which comes with a makefile. This makefile calls the gcc pre-processor to create an nml file from several pnml files. The resulting nml file is then fed to nmlc in order to compile a newgrf from it.
This process is used to allow splitting the code of a NewGRF conveniently into several source files to allow better navigation through the source.
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
Make to collect through Linux?
Who is online
Users browsing this forum: No registered users and 16 guests