NML: version - what to update and when?

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

Moderator: Graphics Moderators

Post Reply
ZvikaZ
Engineer
Engineer
Posts: 3
Joined: 05 Aug 2021 07:32

NML: version - what to update and when?

Post by ZvikaZ »

Hi.

I've created my first NewGRF - an Israeli town names generator (https://bananas.openttd.org/manager/newgrf/5a480101), and I'm little bit confused about what exactly should I update from version to version.
If I understand correctly, there are 4 places where I report versions: the last byte of `grfid`, the `version` in the `grf` block, the `VERSION` in custom_tags.txt file (which goes to `STR_GRF_NAME` and lastly `Version` field at https://bananas.openttd.org/ when I upload the new version.

Currently, I have uploaded two versions to bananas.
In the first version, `grfid`'s byte version was 1, `grf.version` was 0, and `custom_tags.VERSION` was 0.1.0 (don't ask me why each one is different :lol: ); and bananas.Version was 0.1.0
In the second version, I kept `grfid`'s byte version value, `grf.version` was changed to 1, and `custom_tags.VERSION` and bananas.Version were changed to 0.1.1

Now, when I update the NewGRF from inside OpenTTD, and try to add the updated version, it says:
Can't add file: duplicate GRF ID
Does all of this make sense?
Should have I done something different?
I'm confused of what actually should be changed, and what not, and what fields should match each other from all these 4 version fields.

Thanks
MLG
Traffic Manager
Traffic Manager
Posts: 167
Joined: 07 Sep 2020 15:12

Re: NML: version - what to update and when?

Post by MLG »

ZvikaZ wrote: 05 Aug 2021 07:52
That can to my knowledge mean only one thing: GRF ID conflict (that means you want to have same GRF ID twice in GRF list)
You have to change the ID of second version or first remove the old one completely and then put there new one. (when messing with NewGRFs in their menu of running game, DO NOT OVERWRITE your last sav,e in order to have a backup of save, in case the save breaks, because of GRF changing)

:) If you have something better and with bigger change of fixing that, do not blame me... :)
Are you an eye candy player? Check out Invisible engine set! viewtopic.php?f=67&t=88934
You can write to me in English, or Czech. Můžete mi psát česky nebo anglicky.
Eddi
Tycoon
Tycoon
Posts: 8254
Joined: 17 Jan 2007 00:14

Re: NML: version - what to update and when?

Post by Eddi »

i'm not 100% sure what you're trying to do, but as i understood it, it should go like this:
  • grfid-byte should stay the same, unless you make changes so large that it's basically unrecognizable, and you expect people to keep trying to load the old GRF into new savegames
  • grf.version should be increased by (at least) 1 each time you make a change
  • custom_tags.VERSION can be anything you like
you shouldn't change the GRF in a running game, but if you really want to, you should remove the old GRF from the list first, and then add the new one, as there cannot be two GRFs with the same GRFID
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 4 guests