Page 1 of 1

Modify GRF files with GRFcodec

Posted: 22 Oct 2011 15:19
by Horse
I downloaded GRFcoedec and i convert a grf file into a sprite folder with PCX

Code: Select all

grfcodec -d newgrf.grf
This works succesfully and after that i tried to edit the NFO file.
To be sure i changed some parameters i first found a name of a vehicle and give it a new name.
After that i type the command

Code: Select all

grfcodec -e newgrf.grf
But in game name isn't changed att all.
After convert the new new grf file i see the new name in NFO file but in game it's still using the original name.
I tried everything to start a new game with my new grf file but it keeps still the original name.

Why doesn't my changes appear, and how can i change the NFO and compile with the new name or someting?

Re: Modify GRF files with GRFcodec

Posted: 22 Oct 2011 15:37
by FooBar
Note that the new grf needs to be in the correct folder for the game to be able to find it.

Particularly on OpenTTD, if you have both the old version and new version available to the game, the game may randomly select only one of the two. Change the GRFID in order to avoid that.

Furthermore if you have a game running with the old grf while changing the grf file, you need to apply the new file from the NewGRF window.


If that doesn't help, please explain the exact steps you followed, where you put the changed grf file and what game you actually use.

Re: Modify GRF files with GRFcodec

Posted: 22 Oct 2011 15:56
by Horse
I deleted the old GRF and started a new game.

But the GRF still using the original names.

Re: Modify GRF files with GRFcodec

Posted: 23 Oct 2011 10:46
by frosch
FooBar wrote:Particularly on OpenTTD, if you have both the old version and new version available to the game, the game may randomly select only one of the two. Change the GRFID in order to avoid that.
What? OTTD does not display a random selection of GRFs. If the GRFs do not explicitly state to be newer than some other GRF, both are shown.

Horse:
In the NewGRF configuration GUI you can see the full path of the NewGRF being uses. Make sure it is the file you encoded.

Re: Modify GRF files with GRFcodec

Posted: 23 Oct 2011 12:26
by FooBar
frosch wrote:What? OTTD does not display a random selection of GRFs. If the GRFs do not explicitly state to be newer than some other GRF, both are shown.
Has that changed or was I being ignorant?

Then again with a modified grf you could easily end up with two grfs reporting the same version. How does that work then?

Re: Modify GRF files with GRFcodec

Posted: 24 Oct 2011 15:57
by DaleStan
frosch wrote:
FooBar wrote:Particularly on OpenTTD, if you have both the old version and new version available to the game, the game may randomly select only one of the two. Change the GRFID in order to avoid that.
What? OTTD does not display a random selection of GRFs. If the GRFs do not explicitly state to be newer than some other GRF, both are shown.
Both are shown, but both cannot be active (or rather, they can, but one wins if both try to set the same values). I believe FooBar was stating that the winning GRF was chosen at random.

Horse: Does GRF2HTML tell you that you changed the GRF OpenTTD says you are using?