Change code in the *.grf
Moderator: OpenTTD Developers
Change code in the *.grf
How I can change code in the *.grf (file NewGRF)?
Re: Change code in the *.grf
If you have the source code for it (inherited the code from someone, found some rogue code, or get it from its official source repositories such as github or this), then you just have to find a way to compile the code. How to compile it depends on how it was written - nfo format, m4nfo, nml etc.
If you only have access to the grf file itself, then things are much harder.
You can use GRF Codec to decode it. It will give you the source code in nfo format. It is not an easy code to read or edit, but it is possible to hack your way through it.
Further discussion is more appropriate in this forum.
If you only have access to the grf file itself, then things are much harder.
You can use GRF Codec to decode it. It will give you the source code in nfo format. It is not an easy code to read or edit, but it is possible to hack your way through it.
Further discussion is more appropriate in this forum.
Re: Change code in the *.grf
If you make changes, please also change the GRF-ID and the name, so your changed version is really different from the "real" one. It avoids a lot of potential problems.
Also, most grfs are licensed with the requirement that you must publish the changes if you publish the newgrf (so others can build on your work in the future, like you can build on previous work). Please keep that in mind when giving your changed newgrf to someone else.
Also, most grfs are licensed with the requirement that you must publish the changes if you publish the newgrf (so others can build on your work in the future, like you can build on previous work). Please keep that in mind when giving your changed newgrf to someone else.
Being a retired OpenTTD developer does not mean I know what I am doing.
-
- Tycoon
- Posts: 2792
- Joined: 22 Feb 2011 18:34
Re: Change code in the *.grf
If it has such a license, the source is most of the times also available.Alberth wrote:If you make changes, please also change the GRF-ID and the name, so your changed version is really different from the "real" one. It avoids a lot of potential problems.
Also, most grfs are licensed with the requirement that you must publish the changes if you publish the newgrf (so others can build on your work in the future, like you can build on previous work). Please keep that in mind when giving your changed newgrf to someone else.
Coder of the Dutch Trackset | Development support for the Dutch Trainset | Coder of the 2cc TrainsInNML
Re: Change code in the *.grf
I was talking about the modified grf. Eg GPL license requires that you publish your changes when you publish (or give away) your modified newgrf.Transportman wrote:If it has such a license, the source is most of the times also available.Alberth wrote:If you make changes, please also change the GRF-ID and the name, so your changed version is really different from the "real" one. It avoids a lot of potential problems.
Also, most grfs are licensed with the requirement that you must publish the changes if you publish the newgrf (so others can build on your work in the future, like you can build on previous work). Please keep that in mind when giving your changed newgrf to someone else.
Being a retired OpenTTD developer does not mean I know what I am doing.
Who is online
Users browsing this forum: Ahrefs [Bot] and 15 guests