Skip to content

Change: increase industry tile ID limit - #438

Open
andythenorth wants to merge 1 commit into
OpenTTD:masterfrom
andythenorth:master
Open

Change: increase industry tile ID limit#438
andythenorth wants to merge 1 commit into
OpenTTD:masterfrom
andythenorth:master

Conversation

@andythenorth

@andythenorth andythenorth commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Industry tile ID limit increased from 254 to 511 in OpenTTD OpenTTD/OpenTTD#12183

@Rito13

Rito13 commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Why do we need to allow up to 511?

Base on https://github.com/OpenTTD/OpenTTD/blob/df55704e7d336467df739c861d86ac09695fcba1/src/newgrf_commons.cpp#L104 I think that grfs are only allowed to define new industry tiles in range 175..511, any more tiles will get invalid id and will not be defined. That would be 337 free ids for newgrfs.

@andythenorth

Copy link
Copy Markdown
Contributor Author

Why do we need to allow up to 511?

Base on https://github.com/OpenTTD/OpenTTD/blob/df55704e7d336467df739c861d86ac09695fcba1/src/newgrf_commons.cpp#L104 I think that grfs are only allowed to define new industry tiles in range 175..511, any more tiles will get invalid id and will not be defined. That would be 337 free ids for newgrfs.

Peter's comment here seems related OpenTTD/OpenTTD#12183 (comment)

@PeterN

PeterN commented Aug 15, 2026

Copy link
Copy Markdown
Member

It's kinda arbitrary. The local ID used by the NewGRF doesn't directly relate to IndustryTile ID that will be used, so technically we could allow any IDs up to 65535 and as long as there are not too many defined it would still work.

But also you could use up 175 IDs to disable the original industry tiles, and then the remaining 337 to define your new ones.

@andythenorth

Copy link
Copy Markdown
Contributor Author

I'd be inclined to leave it at 511, I don't think nml should be trying to guard every case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants