Industry tile limit
Moderator: Graphics Moderators
Industry tile limit
While coding FIRS, I realised that we might hit the industry tile limit. I'm not asking for a workaround, as I already have a few up my sleeve. It's a short sleeve though, as I'm wearing a T-shirt...
Anyways, I'm wondering what the actual industry tile limit is in OpenTTD. Is it a global limit of 0xFF? Or is it similar to the house limit of 256 IDs per NewGRF with a maximum of 512 for all NewGRFs together?
Related to that: are the industry tile IDs unique to the grf (like houses) or global (like vehicles without the engine pool)? In case of the former I'm in the need of a longer sleeve as I have yet another trick in that case.
Thanks.
Anyways, I'm wondering what the actual industry tile limit is in OpenTTD. Is it a global limit of 0xFF? Or is it similar to the house limit of 256 IDs per NewGRF with a maximum of 512 for all NewGRFs together?
Related to that: are the industry tile IDs unique to the grf (like houses) or global (like vehicles without the engine pool)? In case of the former I'm in the need of a longer sleeve as I have yet another trick in that case.
Thanks.
-
- Tycoon
- Posts: 1829
- Joined: 10 Jul 2006 00:43
- Location: Spain
Re: Industry tile limit
FooBar wrote:While coding FIRS, I realised that we might hit the industry tile limit. I'm not asking for a workaround, as I already have a few up my sleeve. It's a short sleeve though, as I'm wearing a T-shirt...
Anyways, I'm wondering what the actual industry tile limit is in OpenTTD. Is it a global limit of 0xFF? Or is it similar to the house limit of 256 IDs per NewGRF with a maximum of 512 for all NewGRFs together?
Related to that: are the industry tile IDs unique to the grf (like houses) or global (like vehicles without the engine pool)? In case of the former I'm in the need of a longer sleeve as I have yet another trick in that case.
Thanks.

http://dev.openttdcoop.org/projects/fir ... efarm.pnfoThis variable can be used to spare industry tile IDs: the same tile type can choose different representation depending on where exactly it is inside the industry.
http://dev.openttdcoop.org/projects/fir ... ewery.pnfo
This is a example code:
Code: Select all
83 * 14 02 09 6C 81
43 // var 43 - Relative position
10 FF // Not mask, offset 16 bits -> 00[yx]YYXX
05 // 5 ranges
02 00 11 11 // Tile type A --> Y=1 X=1
04 00 26 26 // Tile type A --> Y=2 X=6
03 00 20 24 // Tile type A --> Y=2 X=0-4
02 00 35 35 // Tile type A --> Y=3 X=5
01 00 40 42 // Tile type A --> Y=4 X=0-2
00 00
This is correct? Or I'm wrong?
Sorry if my english is too poor, I want learn it, but it isn't too easy.
- [list][*]Why use PNG screenshots in 8 bpp games.
[*]Caravan site New Industry. · Spain set. · Some spanish trains for locomotion[*]Favourites:GRVTS · ECS · FIRS
Re: Industry tile limit
Interesting. I think I'll code the next industry using a varaction2 chain. I haven't used one of those so far, but eventually we need one anyways. Thanks!
Although this should be a fine solution for my problems, I still would appreciate someone answering the original questions. It might be useful to add that bit of missing information to the newgrf wiki as well... (I hope that doesn't sound too demanding, as it isn't meant that way. I'm willing to update the wiki myself)
Although this should be a fine solution for my problems, I still would appreciate someone answering the original questions. It might be useful to add that bit of missing information to the newgrf wiki as well... (I hope that doesn't sound too demanding, as it isn't meant that way. I'm willing to update the wiki myself)
Re: Industry tile limit
That's the power of a wiki, go right ahead!FooBar wrote:(I hope that doesn't sound too demanding, as it isn't meant that way. I'm willing to update the wiki myself)
Creator of the Openttd Challenge Spinoff, Town Demand patch
After action reports: The path to riches, A dream of skyscrapers
After action reports: The path to riches, A dream of skyscrapers
Re: Industry tile limit
Don't think, you need to tell that to FooBar.Korenn wrote:That's the power of a wiki, go right ahead!FooBar wrote:(I hope that doesn't sound too demanding, as it isn't meant that way. I'm willing to update the wiki myself)

Town Names:


Still work in progress: OpenGFX or/and OpenSFX - Please help!
Re: Industry tile limit
Ofcourse, how silly of me. Let's see, what to put there... errr...Korenn wrote:That's the power of a wiki, go right ahead!
Obviously my questions need to be answered first before I can update it

Re: Industry tile limit
The global limit is 512 tiles (including non-overridden original tiles). 256 per grf. (OTTD limits, no idea about TTDP)
It is very very unlikely that the 512 limit is increased ever, as it needs map storage. Increasing the 256 limit to 512 was discussed and considered not worth the effort. Nevertheless you might want to avoid using tile 0xFF, so it can be turned into an extended byte in 50 years.
So you should not waste your tiles. Nearly all action0 properties of industry tiles can be controlled by callbacks. So you should get away with 2 or 3 tiles per industry. E.g. separating the tiles using callback 27 (the performance critical "animation speed" callback) from the tiles not using that callback. Similiary you could separate those tiles which do not accept anything, i.e. do also not need callback 2B and 2C. Though they are by far not as expensive as 27.
It is very very unlikely that the 512 limit is increased ever, as it needs map storage. Increasing the 256 limit to 512 was discussed and considered not worth the effort. Nevertheless you might want to avoid using tile 0xFF, so it can be turned into an extended byte in 50 years.
So you should not waste your tiles. Nearly all action0 properties of industry tiles can be controlled by callbacks. So you should get away with 2 or 3 tiles per industry. E.g. separating the tiles using callback 27 (the performance critical "animation speed" callback) from the tiles not using that callback. Similiary you could separate those tiles which do not accept anything, i.e. do also not need callback 2B and 2C. Though they are by far not as expensive as 27.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
Re: Industry tile limit
Thanks for your reply, frosch! This is the answer I was hoping for
I'll continue to use varaction2 for the tiles so that 1 tile per industry and maybe some generic tiles are enough for most industries. I'll also add this info to the wiki right away!

I'll continue to use varaction2 for the tiles so that 1 tile per industry and maybe some generic tiles are enough for most industries. I'll also add this info to the wiki right away!
Who is online
Users browsing this forum: Ahrefs [Bot], Amazon [Bot] and 11 guests