here is the problem:
in the grf that i work on now, i have lots of sprites and for testing, i do the coding parallel to the sprite drawing.
now in some cases i made stuff like this:
Station ID 40 - woodpiles (sprite lines 500-525 in nfo)
Station ID 41 - wood saw terrain (sprite lines 526-550 in nfo)
-
Station ID 45 - Grain storage (Sprite lines 551-575 in nfo)
now in this case, the grain is coded after the "wood saw terrain" in spritenumbers in the nfo. in the build menu you have them also in the list like 40 - 41 - 45
but for the ID i skipped a few numbers with the idea that when i have 1 more wood related sprite in the future, i can give it for example ID 42. and the spritecoding will be at the end of the nfo file again.
but i discovered this does not work. if at the end now station ID 42 is added, in the build menu it will be added at the end like 40 - 41 - 45 - 42.
but at a certain point the nr of lines (spritenumbers) in the nfo is over 1000.... so the big question is:
how do i get it like 40 - 41 - 42 - 45 without having to renumber hundreds of spritenumbers ? is there some way in the grf codec to sort by station ID or something like that ?
grf codec. make it arrange/number ?
Moderator: Graphics Moderators
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: grf codec. make it arrange/number ?
Don't assign sprite numbers manually. Use nforenum. And code things in the correct tileID order within your nfo.Dante123 wrote: how do i get it like 40 - 41 - 42 - 45 without having to renumber hundreds of spritenumbers ? is there some way in the grf codec to sort by station ID or something like that ?
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: grf codec. make it arrange/number ?
nforenumplanetmaker wrote:Don't assign sprite numbers manually. Use nforenum. And code things in the correct tileID order within your nfo.Dante123 wrote: how do i get it like 40 - 41 - 42 - 45 without having to renumber hundreds of spritenumbers ? is there some way in the grf codec to sort by station ID or something like that ?

i was all coding it manual ?
How does it work to it it corrected what i have now?
that readme that is included doesn't really help
-
- Tycoon
- Posts: 5954
- Joined: 27 Apr 2005 07:09
- Contact:
Re: grf codec. make it arrange/number ?
I´m not sure if this will work. The Wiki says "Also, all station IDs must get their classes in the right order, starting from ID 00 onwards." I just don´t remember whether there are any "effects" when leaving out station IDs (temporarily).Dante123 wrote: [...] for the ID i skipped a few numbers with the idea that when i have 1 more wood related sprite in the future, i can give it for example ID 42. and the spritecoding will be at the end of the nfo file again.
W/r to nforenum, just let it process your file, it´ll renumber all sprite numbers automatically, and it does some valuable syntax checking.
regards
Michael
Re: grf codec. make it arrange/number ?
wouw! that tool works just fantastic !
i just cut-pasted all station ID's in the right order (yes you can skip some numbers to leave some space to insert new ones later on)
nforenum renumbered them all into the right order. thanx for this great tool!
i just cut-pasted all station ID's in the right order (yes you can skip some numbers to leave some space to insert new ones later on)
nforenum renumbered them all into the right order. thanx for this great tool!
Who is online
Users browsing this forum: No registered users and 18 guests