Modify GRF files with GRFcodec

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

Post Reply
Horse
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 10 Sep 2004 20:25

Modify GRF files with GRFcodec

Post 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?
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Modify GRF files with GRFcodec

Post 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.
Horse
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 10 Sep 2004 20:25

Re: Modify GRF files with GRFcodec

Post by Horse »

I deleted the old GRF and started a new game.

But the GRF still using the original names.
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: Modify GRF files with GRFcodec

Post 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.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: Modify GRF files with GRFcodec

Post 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?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Modify GRF files with GRFcodec

Post 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?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests