NML:Roadstops

From GRFSpecs
Revision as of 19:39, 3 May 2024 by Jgr (talk | contribs) (Initial NML road stop properties)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
Props, Vars and CBs

Road stops can only be defined in OpenTTD Supported by OpenTTD 14.014.0 or later.

Road stop IDs

OpenTTD supports 64000 road stop types per game.

Rpad stop IDs are NewGRF-local and can therefore freely be chosen within the ID ranges.

A road stop is allocated by setting the 'class'-property, which should therefore be set first.

Road stop properties

property value range comment
class String literal of length 4

This property must be set first, before any other properties or graphics.
Road stops belonging to the same class are grouped in the GUI.
There is one special class:

  • "WAYP": Supported by OpenTTD 15.015.0 Not supported by TTDPatch The road stop type will be shown in the waypoint construction window, instead of the station construction window.
classname string You only need to set this for one road stop in every class.
name string
availability_type RST_AVAILABILITY_TYPE_XXX XXX = [PASSENGER | FREIGHT | ALL]

The default value is RST_AVAILABILITY_TYPE_ALL

draw_mode bitmask(RST_DRAW_FLAG_XXX, ...) See list of draw mode flags

The default value is bitmask(RST_DRAW_FLAG_BAY_ROAD, RST_DRAW_FLAG_DRIVE_THROUGH_ROAD_OVERLAY)

cargo_random_triggers Array of cargo labels from the cargotable Cargo types, which will trigger re-randomization when delivered, loaded or unloaded at the station.
animation_info Array [ANIMATION_XXX, frame-count] XXX = [LOOPING | NON_LOOPING], 1..253 frames
animation_speed 0..16

Speed of animation, see animation speed table for the meaning of the values.

animation_triggers

See list of animation triggers

general_flags bitmask(RST_GENERAL_FLAG_XXX, ...) See list of general flags
cost_multipliers [build_cost, clear_cost] Build and clear cost multipliers, 16 is the same as a non-NewGRF road stop

List of draw mode flags

Name Meaning
RST_DRAW_FLAG_BAY_ROAD Draw road type ground sprite for bay stops.
RST_DRAW_FLAG_DRIVE_THROUGH_ROAD_OVERLAY Draw road overlays for drive-through stops.
RST_DRAW_FLAG_WAYPOINT_GROUND Supported by OpenTTD 15.015.0 Not supported by TTDPatch Draw spritelayout ground sprite on top of underlying road (if unset, the spritelayout ground sprite is not drawn).

List of general flags

Name Meaning
RST_GENERAL_FLAG_RANDOM_ANIMATION Animation callback requires random bits in variable extra_callback_info1.
RST_GENERAL_FLAG_NO_CATENARY Do not show catenary graphics.
RST_GENERAL_FLAG_DRIVE_THROUGH_ONLY Only allow drive-through stops (not bay stops).
RST_GENERAL_FLAG_NO_AUTO_ROAD_CONNECTION Do not automatically build connecting road pieces.
RST_GENERAL_FLAG_BUILD_MENU_ROAD_ONLY Only show in the road build menu (not tram).
RST_GENERAL_FLAG_BUILD_MENU_TRAM_ONLY Only show in the tram build menu (not road).
RST_GENERAL_FLAG_DRAW_MODE_REGISTER Supported by OpenTTD 15.015.0 Not supported by TTDPatch Read the road stop draw mode from variable 0x100 (set using STORE_TEMP), this overrides the draw_mode property.