Skip to content

Change: Throw out per-grf industry tile limit. - #12183

Merged
PeterN merged 1 commit into
OpenTTD:masterfrom
PeterN:throw-out-industrytile-limit
Aug 14, 2026
Merged

Change: Throw out per-grf industry tile limit.#12183
PeterN merged 1 commit into
OpenTTD:masterfrom
PeterN:throw-out-industrytile-limit

Conversation

@PeterN

@PeterN PeterN commented Feb 26, 2024

Copy link
Copy Markdown
Member

Motivation / Problem

The custom industry tile limit was set to 255 per-GRF based on the premise that action 3 ids might later be extended.

They have since been extended.

Description

Raise the limit to account for the action 3 extended byte change.

Limit is now the total number of custom tiles that can be used.

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, game_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

2TallTyler
2TallTyler previously approved these changes Feb 26, 2024

@2TallTyler 2TallTyler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me.

For later reference, the Action 03 extension was in #10672, if I'm reading this right.

Does NML need to be patched?

@PeterN

PeterN commented Feb 26, 2024

Copy link
Copy Markdown
Member Author

Hmm, NML source code says:

# Maximum allowed id (houses and indtiles in principle allow up to 511, but action3 does not accept extended bytes).

So, not sure how that interacts with the way original IDs can't be reused.

@PeterN PeterN added the needs review: NewGRF Review requested from a NewGRF expert label Feb 26, 2024
@michicc

michicc commented Mar 8, 2024

Copy link
Copy Markdown
Member

Increasing the limit shouldn't break anything in NML by itself, should it? It will just not allow more tiles, but that wouldn't preclude merging the PR.

@PeterN

PeterN commented Mar 8, 2024

Copy link
Copy Markdown
Member Author

I can't really remember why I referenced that. I think I may have been thinking along the lines of should the limit be 511 or 337.

@michicc

michicc commented Mar 8, 2024

Copy link
Copy Markdown
Member

@rubidium42

Copy link
Copy Markdown
Contributor

Is there a reason for not merging this? Besides a hefty rebase being needed to run the right build checks.

@andythenorth

Copy link
Copy Markdown
Contributor

"Can haz merge?" 😸

The industry tile limit was set based on the premise that action 3 ids might later be extended. They have since been extended.

Limit is now the total number of industry tiles that can be used.
@PeterN
PeterN merged commit 1b71d4c into OpenTTD:master Aug 14, 2026
18 checks passed
@PeterN
PeterN deleted the throw-out-industrytile-limit branch August 14, 2026 17:22
@andythenorth

Copy link
Copy Markdown
Contributor

nfo and nml spec updated. Wiki specification status page updated. nml patch is OpenTTD/nml#438

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

Labels

needs review: NewGRF Review requested from a NewGRF expert

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants