Changes

Jump to navigation Jump to search

Games/ATS/Modding guides/1.29

2,126 bytes added, 12:17, 10 November 2017
no edit summary
* '''''navigation_time_turn_oposite_side_duration''''' (30.0) - Time cost of turning to the oposite side (e.g. left in USA/continental, right in UK) - time calculation. Additive.
== Prefabs ==
 
The prefab format was changed to include separate data for use by the new navigation. The game should be able to automatically convert old prefabs with correctly formed AI lines and new version of conversion tools will generate them automatically.
 
=== Format changes ===
 
The new format adds navigational nodes. They are derived from both normal prefab nodes and AI curves. Each navigational node corresponds to either normal node or to end point of AI curve. Basically it is a simplified graph over AI curves representing places important for the navigation (e.g. for of AI lane) to reduce the size of the navigational graph.
 
The table of navigational nodes is stored in the same way as other tables. Offset and size of this table is stored directly after matching fields for intersection table.
 
Each navigational node has the following format
 
<nowiki>
u8 type; // Type of node. 0 = physical node, 1 = AI curve
u16 index; // Depending on the type it is either index of normal node or index of AI curve to whose ending point this nav node corresponds
u8 connection_count; // Number of outgoing connections leading to other navigational nodes (0-4)
connection_info connections[4]; // Information about those connections. First connection_count entries are used. Rest is set to {0xffff, MAX_FLOAT, 0, 0xffff[8]}</nowiki>
 
Each connection info structure has the following format
 
<nowiki>
u16 target_node; // Index of navigational node this connection leads to
float length; // Length of the connection in meters
u8 curve_count; // Number of AI curves the connection is created from, limited to 8, if more would be necessary, insert additional nav node
u16 curve_indices[8]; // Indices of the relevant AI curves in order they should be used. First curve_count entries are used, reset is set to 0xffff.</nowiki>
 
Additionally the AI curve structure was changed by adding a u32 value at its end. This value contains index of a navigational node which should be used if navigation starts from that AI curve or 0xffffffff if there is none. Basically it is a reverse mapping to the curve_indices from from nodes.
== Flares Data ==

Navigation menu