Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion nml/actions/action0properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,23 @@ def aircraft_is_large(value):
'graphic_flags' : {'size': 1, 'num': 0x09},
}

# TODO: Feature 0x06
#
# Feature 0x06 (Bridges)
#
properties[0x06] = {
# 0x08 - year availability (old way)
'min_length' : { 'num': 0x09, 'size': 1 },
'max_length' : { 'num': 0x0A, 'size': 1 },
# 0x0B - cost factor (old way)
'speed_limit' : { 'num': 0x0C, 'size': 2, 'unit_type': 'speed', 'unit_conversion': (5000, 1397), 'adjust_value': lambda val, unit: ottd_display_speed(val, 1, unit)},
'sprite' : { 'num': 0x0D, 'size': 2 },
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems wrong, based on my reading of the specs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm... I did it based on https://newgrf-specs.tt-wiki.net/wiki/Action0/Bridges

What is wrong according to you?

Copy link
Contributor

Choose a reason for hiding this comment

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

prop 0D is not a simple 2 bytes value, it's more complex. See the example at the bottom of the page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sprites are clearly wrong... Need to find some to generate output, will be able to share full version then.

Copy link
Contributor

Choose a reason for hiding this comment

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

Any progress on this in last 5 years? @werbfred you seem inactive since 2021.

Copy link
Contributor Author

@werbfred werbfred Dec 17, 2025

Choose a reason for hiding this comment

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

Sorry. Had been looking at this 5 years ago. In the meanwhile many personal things occured... Anyway, did not deep dive into this during that period. If I remember the 2 bytes part was to link the bridge with different pictures depending on the orientation of it. So much more complictaed than what I saw...

'flags' : { 'num': 0x0E, 'size': 1 },
'avail_year' : { 'num': 0x0F, 'size': 4 },
'name' : { 'num': 0x10, 'size': 2, 'string': 0xDC },
'description_rail_bridge' : { 'num': 0x11, 'size': 2, 'string': 0xDC },
'description_road_bridge' : { 'num': 0x12, 'size': 2, 'string': 0xDC },
'cost_factor' : { 'num': 0x13, 'size': 2 },
}

#
# Feature 0x07 (Houses)
Expand Down