Prototype/RollingStock: Difference between revisions
m (wording) |
(Updated styling of prototype doc migration note) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<div class="stub"><p>'''The prototype docs have moved to a new website with an improved format.''' This documentation page can now be found here: [https://lua-api.factorio.com/latest/prototypes/RollingStockPrototype.html https://lua-api.factorio.com/latest/prototypes/RollingStockPrototype.html] | |||
</p><p>This wiki page is no longer updated and '''will be removed at some point in the future''', so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback [https://forums.factorio.com/viewforum.php?f=233 on the forums].</p></div> | |||
{{Prototype parent|Prototype/Vehicle}} | {{Prototype parent|Prototype/Vehicle}} | ||
The abstract base of all rolling stock. | The abstract base of all rolling stock. | ||
Line 26: | Line 32: | ||
Maximum joint distance is 15. | Maximum joint distance is 15. | ||
Note: There needs to be border at least 0.2 between the [[Prototype/Entity#collision_box|bounding box]] edge and joint. This means that the collision_box must be | Note: There needs to be border at least 0.2 between the [[Prototype/Entity#collision_box|bounding box]] edge and joint. This means that the collision_box must be at least <nowiki>{{-0,-0.2},{0,0.2}}</nowiki>. | ||
{{Prototype property|connection_distance|[[Types/double|double]]}} | {{Prototype property|connection_distance|[[Types/double|double]]}} |
Latest revision as of 10:43, 21 September 2023
The prototype docs have moved to a new website with an improved format. This documentation page can now be found here: https://lua-api.factorio.com/latest/prototypes/RollingStockPrototype.html
This wiki page is no longer updated and will be removed at some point in the future, so please update your browser bookmarks or other links that sent you here. If you'd like to contribute to the new docs, you can leave your feedback on the forums.
Prototype definitions » PrototypeBase » Prototype/Entity » Prototype/EntityWithHealth » Prototype/EntityWithOwner » Prototype/Vehicle » Prototype/RollingStock
The abstract base of all rolling stock.
Extensions
- Prototype/ArtilleryWagon artillery-wagon
- Prototype/CargoWagon cargo-wagon
- Prototype/FluidWagon fluid-wagon
- Prototype/Locomotive locomotive
Mandatory properties
This prototype inherits all the properties from Prototype/Vehicle.
max_speed
Type: double
Maximum speed of the rolling stock in tiles/tick.
In-game, the max speed of a train is min(all_rolling_stock_max_speeds) × average(all_fuel_modifiers_in_all_locomotives)
.
This calculated train speed is then silently capped to 7386.3km/h.
air_resistance
Type: double
joint_distance
Type: double
The length between this rolling stocks front and rear joints. Joints are the point where connection_distance is measured from when rolling stock are connected to one another. Wheels sprite are placed based on the joint position.
Maximum joint distance is 15.
Note: There needs to be border at least 0.2 between the bounding box edge and joint. This means that the collision_box must be at least {{-0,-0.2},{0,0.2}}.
connection_distance
Type: double
The distance between the joint of this rolling stock and its connected rolling stocks joint.
pictures
Type: RotatedSprite
vertical_selection_shift
Type: double
Optional properties
drive_over_tie_trigger
Type: TriggerEffect
Usually a sound to play when the rolling stock drives over a tie. The rolling stock is considered to be driving over a tie every tie_distance
tiles.
tie_distance
Type: double
Default: 10.0
In tiles. Used to determine how often drive_over_tie_trigger
is triggered.
back_light
Type: LightDefinition
stand_by_light
Type: LightDefinition
wheels
Type: RotatedSprite
horizontal_doors
Type: Animation
vertical_doors
Type: Animation
color
Type: Color
allow_manual_color
Type: bool
Default: true
allow_robot_dispatch_in_automatic_mode
Type: bool
Default: false