Skip to content

Add: Support for new town varact2 variables 0x42, 0x43, 0x60..0x66 - #453

Merged
2TallTyler merged 1 commit into
OpenTTD:masterfrom
zephyris:new-town-variables
Nov 12, 2026
Merged

2TallTyler merged 1 commit into
OpenTTD:masterfrom
zephyris:new-town-variables

Conversation

@zephyris

Copy link
Copy Markdown
Contributor

Quite a few new varact2 variables for towns have been added to OpenTTD. Let's get them supported by nml:

road_layout for 0x42 lower 2 bits (OpenTTD/OpenTTD#15198)

num_nearby_stations for 0x43 (OpenTTD/OpenTTD#15200)

nearby_tile_* for 0x60 (OpenTTD/OpenTTD#15194). This uses the same naming as nearby tile information for town houses.

<this/last>_month_<production/transported/accepted> for 0x61..0x66 (OpenTTD/OpenTTD#15195). This uses naming inspired by industry cargo production history.

`road_layout` for 0x42 lower 2 bits (OpenTTD/OpenTTD#15198)

`num_nearby_stations` for 0x43 (OpenTTD/OpenTTD#15200)

`nearby_tile_*` for 0x60 (OpenTTD/OpenTTD#15194)

`<this/last>_month_<production/transported/accepted>` for 0x61..0x66 (OpenTTD/OpenTTD#15195)
@zephyris

Copy link
Copy Markdown
Contributor Author

NML for my 'debug house' NewGRF, if anyone wants to test. The house displays the value of the corresponding variable, currently set to last_month_accepted("MAIL").
DebugHouse.zip

@Rito13

Rito13 commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

I can confirm that this works, as intended.

@2TallTyler
2TallTyler merged commit 36cf4c3 into OpenTTD:master Nov 12, 2026
24 checks passed
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