grf - to nml
Moderator: Graphics Moderators
grf - to nml
Hello,
I'm newbie on this topic but I cannot figure out how can I convert an existing grf to nml?
I have eGRVTS2.grf and when I write nmlc -o ooutput.nml eGRVTS2.grf I get this error: "input file is not utf-8 encoded"
any ideeas?
Thank you
I'm newbie on this topic but I cannot figure out how can I convert an existing grf to nml?
I have eGRVTS2.grf and when I write nmlc -o ooutput.nml eGRVTS2.grf I get this error: "input file is not utf-8 encoded"
any ideeas?
Thank you
- Attachments
-
- eGRVTS2.grf
- (8.13 MiB) Downloaded 133 times
Re: grf - to nml
It would be better to contact LaDoncella and ask for a copy of the source code.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: grf - to nml
Sorry but how did you find that LaDocella made this grf?
Re: grf - to nml
Go to the release post (viewtopic.php?p=1048815#p1048815) and read that Coding is credited to LaDoncella.
Edit: And no, NML is not capable of decompiling GRF files. There is no sensible way to translate GRF files back into NML.
Re: grf - to nml
If necessary, you could decode it with YAGL or, worse, NFO. But it's typically easier to just ask for the original source code and work with the coder.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets

Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: grf - to nml
It may be worth to note that some creators don't code their NewGRFs in NML but directly in NFO or with python for example.
Making NewGRFs from time to time.
Re: grf - to nml
Thank you all for your replies. Either nml or python will be ok for me. I converted the grf to nfo but I read that nml is easier that nfo so I decifed to try nml to see how it is. That is why I ask for a conversio grf to nml. I thought that it exist such decoder like from grf to nfo (grfcodec).
- UnicycleBloke
- Engineer
- Posts: 80
- Joined: 30 Aug 2011 14:39
- Location: Cambridge, England
Re: grf - to nml
I don't think this is possible, or certainly not easy, to implement. Like any compiler, the steps from NML source code to GRF binary throw away a lot of information that cannot easily be recovered, if at all. You cannot unbake a cake to recover the ingredients. kamnet mentioned YAGL. If you have decoded to NFO with grfcodec, you might want to try decoding to YAGL with yagl. This is still low level, but is intended to be much more human readable/maintainable than NFO. It's fairly new, so just shout if there are problems.sky81 wrote: 07 May 2020 04:22 That is why I ask for a conversio grf to nml. I thought that it exist such decoder like from grf to nfo (grfcodec).
Re: grf - to nml
Ok. Thanks for the info.
Still, I found on the topic bellow the sources for eGRVTS22
viewtopic.php?f=67&start=160&t=62841&si ... 87fe8b9848
But still, I don't know how to packit and transform to grf. If I look in the compile.ps1, I think this should be the file that should do this job. But how can I compile it? This is not a python or batch file. What file is it and how can I run it?
Thanks again for your time
Still, I found on the topic bellow the sources for eGRVTS22
viewtopic.php?f=67&start=160&t=62841&si ... 87fe8b9848
But still, I don't know how to packit and transform to grf. If I look in the compile.ps1, I think this should be the file that should do this job. But how can I compile it? This is not a python or batch file. What file is it and how can I run it?
Thanks again for your time
Re: grf - to nml
Me again. I found out what is it with ps1 (power shell). So I managed to compile it, translate to nml then to grf. Seems that the sources I have(from above post)), do have some issue: I get fatal error when accesing grf: unknown property for action 0 0x17 (sprite10). Anyone any ideea?
Re: grf - to nml
Your question sounds like you are seeing this error when starting a new game. It could be that you are using an older version of OpenTTD. Are you using the latest release of OpenTTD?sky81 wrote: 07 May 2020 13:41 Me again. I found out what is it with ps1 (power shell). So I managed to compile it, translate to nml then to grf. Seems that the sources I have(from above post)), do have some issue: I get fatal error when accesing grf: unknown property for action 0 0x17 (sprite10). Anyone any ideea?
wallyweb on tt-forums: Screenshots - Wallyweb World - Projects & Releases
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
wallyweb on Simuscape: Projects - Releases
Other Stuff: TTDPatch 2.6 "Nightly" download - cirdan's OpenTTD branch (New Map Features)
Screenshot Of The Month Contest Winner: August 2015 - Tied May 2016 - January 2018 - December 2018 - May 2019
Re: grf - to nml
That piece of code is from 2016, so I should not use the latest version. Nevertheless, I try also with latest version still not worked. Anyway, I figure out what was the problem, then anther problems appear, solved those also (edit in nfo), then recompile and run. Then it worked. But I think the trams will not work as expected. Anyway, that is why I need the latest code to change some parameters on it from eGRVTS2. The one that I have form that forum, seems that is not good.
Who is online
Users browsing this forum: No registered users and 14 guests