Prototype/RollingStock: Difference between revisions

From Official Factorio Wiki
Jump to navigation Jump to search
m (Protected "Prototype/RollingStock": Migrated prototype doc to separate website ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
(Removed old prototype docs)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
'''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]
<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]


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><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}}
The abstract base of all rolling stock.
 
{{Prototype TOC|''abstract''}}
 
== 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]].
 
{{Prototype property|max_speed|[[Types/double|double]]}}
Maximum speed of the rolling stock in tiles/tick.
 
In-game, the max speed of a train is <code>min(all_rolling_stock_max_speeds) × average(all_fuel_modifiers_in_all_locomotives)</code>.
This calculated train speed is then silently capped to 7386.3km/h.
 
{{Prototype property|air_resistance|[[Types/double|double]]}}
 
{{Prototype property|joint_distance|[[Types/double|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 [[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]]}}
The distance between the joint of this rolling stock and its connected rolling stocks joint.
 
{{Prototype property|pictures|[[Types/RotatedSprite|RotatedSprite]]}}
 
{{Prototype property|vertical_selection_shift|[[Types/double|double]]}}
 
== Optional properties ==
 
{{Prototype property|drive_over_tie_trigger|[[Types/TriggerEffect|TriggerEffect]]|optional=true}}
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 <code>tie_distance</code> tiles.
 
{{Prototype property|tie_distance|[[Types/double|double]]|10.0|optional=true}}
In tiles. Used to determine how often <code>drive_over_tie_trigger</code> is triggered.
 
{{Prototype property|back_light|[[Types/LightDefinition|LightDefinition]]|optional=true}}
 
{{Prototype property|stand_by_light|[[Types/LightDefinition|LightDefinition]]|optional=true}}
 
{{Prototype property|wheels|[[Types/RotatedSprite|RotatedSprite]]|optional=true}}
 
{{Prototype property|horizontal_doors|[[Types/Animation|Animation]]|optional=true}}
 
{{Prototype property|vertical_doors|[[Types/Animation|Animation]]|optional=true}}
 
{{Prototype property|color|[[Types/Color|Color]]|optional=true}}
 
{{Prototype property|allow_manual_color|[[Types/bool|bool]]|true|optional=true}}
 
{{Prototype property|allow_robot_dispatch_in_automatic_mode|[[Types/bool|bool]]|false|optional=true}}

Latest revision as of 14:33, 25 October 2024

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.