Station Spriteset Limit

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

Moderator: Graphics Moderators

Post Reply
Trolley Trev
Engineer
Engineer
Posts: 45
Joined: 26 Dec 2006 12:12

Station Spriteset Limit

Post by Trolley Trev »

This might be a random question, but just curious as to why station newGRFs are limited to 6 sprite sets per station? Is this a legacy limit from the original newGRF spec or just an arbitrary number? Only reason I ask is because I'm currently developing a station set and I want to have the option of "Auto Station" much like in ISR, but this sprite set limitation will allow me to only have a maximum of 6 unique tiles in any given station. I could hack around it by making a freaking huge sprite set with sprites for multiple tile types, but I'd rather not. Anyone have any insights into this?
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1754
Joined: 30 Mar 2005 09:43

Re: Station Spriteset Limit

Post by peter1138 »

Hmm, where/what is limited to 6?

Do you mean the number of station sprite layouts, which is actually 4 (8 if you count X/Y separately, but that isn't a useful distinction) unless you use the callback to select a different one?
He's like, some kind of OpenTTD developer.
Trolley Trev
Engineer
Engineer
Posts: 45
Joined: 26 Dec 2006 12:12

Re: Station Spriteset Limit

Post by Trolley Trev »

You can use more than 6 sprite layouts per station item, so long as collectively they don't reference more than 6 custom spritesets, otherwise nmlc throws an error on compile saying you can only have 6. Built-in sprites don't count towards the 6.

This pic from the nml wiki on stations has a little note about upto 6 spritesets, but I'm not sure what the reason for the limit is :?

Image
WenSim
Engineer
Engineer
Posts: 21
Joined: 02 Sep 2023 08:38

Re: Station Spriteset Limit

Post by WenSim »

yeah there is a 6 spriteset limit per spritelayout, but you can add custom spritesets (I forgot the limit for custom spritesets, sorry) and default spritesets for station items.
I'm also developing a station grf. Hopefully my source code would help you solve the problem.
https://github.com/wensimehrp/jppluswins

Ah, and the easy way is to put everything inro one single spriteset, but that would be a total mess.
Find me on GitHub or on Discord (wensimehrp, or WenSim)
Green stuff here, may be helpful for content creators.
michael blunck
Tycoon
Tycoon
Posts: 5953
Joined: 27 Apr 2005 07:09
Contact:

Re: Station Spriteset Limit

Post by michael blunck »

There's no station spriteset limit (of 6 sets per station), at least not when coding in plain nfo or in m4nfo:

http://www.ttdpatch.de/grfspecs/m4nfoManual/

https://github.com/kiwitreekor/korean_station

regards
Michael
Image
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests