Changes

Jump to navigation Jump to search

Games/ATS/Modding guides/1.29

1,130 bytes added, 07:54, 27 April 2018
Changes
= Changes =
== New Navigation Data navigation data ==
New navigation algorithm uses detailed info from traffic lanes so it can take lane counts, direction and other things into consideration. Be careful to have correct navigation data in map. For example if crossing prefab does not have a AI lane for right turn, the navigation will not turn right even if that means that it will find a much longer path.
It has some few value to compute weight of prefab roads, or other path segments, much like values for time evaluation of them. All are attributes of The '''''map_data''''' unit (in '''''/def/map_data.sii''''')contains a few attributes which can be used used to tweak the routing heuristic and the estimated driving time.
General values used by navigation:
* '''''navigation_maximum_speed''''' (25.0) - Maximum reasonable speed used for navigation computations (in m/s). Necessary due Keep it small to scaling for best precisionimprove efficiency of the search.* '''''navigation_turn_back_length''''' (400000.0) - Length of artificial connections representing u-turn not allowed by AI lines.
* '''''navigation_prefer_small_wide_road_penalty''''' (10.0) - Penalty applied to roads with more than one lane in a direction when using prefer_small_roads routing mode. Multiplicative.
* '''''navigation_special_prefab_additive_penalty''''' (0.0) - Penalty in meters applied to paths going over special prefabs (e.g. gas stations) outside cities. Additive. Generally should be left at zero unless no gas/weight station prefab used in map includes normal road in addition to the gas station area.* '''''navigation_special_prefab_additive_penalty_city''''' (0.0) - Penalty in meters applied to paths going over special prefabs (e.g. gas stations) in cities. Additive. Usually should be left at zero, see '''''navigation_special_prefab_additive_penalty'''''.* '''''navigation_gps_avoid_additive_penalty''''' (20000.0) - Penalty in meters applied to paths going over items roads or prefabs marked as "GPS Avoid". Additive.
Weights used for path findingin '''''prefer_shorter''''' routing mode.* '''''navigation_city_penalty''''' (1.0) - Penalty applied to paths through city area. Multiplicative* '''''navigation_slow_road_penalty''''' (5.0) - Penalty applied to paths through slow time area. Multiplicative Weights used for path finding in '''''best''''' routing mode:
* '''''navigation_narrow_road_max_speed_usage''''' (0.8) - Portion of maximal speed to use on narrow roads.
* '''''navigation_road_max_speed_usage''''' (0.9) - Portion of maximal speed to use on normal roads.
* '''''navigation_time_turn_own_side_duration''''' (10.0f) - Time cost of turning to the own side (e.g. right in USA/continental, left in UK) - time calculation. Additive.
* '''''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.
 
A road items in editor can be marked with "GPS Avoid" flag. This will cause the navigation to apply a huge penalty to paths using this road. There is no such flag for prefab items however prefab_model definition supports a gps_avoid attribute which will enable it for all uses of that prefab in map.
== Prefabs ==
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 data ==
Flare blink unit (usually found as hookup defined models inside '''''/unit/hookup''''' directory) was reworked to use blinking pattern instead of just simple ON and OFF delays. Thus '''''blink_delay_on''''' and '''''blink_delay_off''''' attributes were removed and replaced with '''''blink_pattern''''' and '''''blink_step_length'''''. Unit is now defined as follows:
Consequentially flare blink sync inherited attributes and behavior from flare blink unit and has the same two new attributes: '''''blink_pattern''''' and '''''blink_step_length'''''.
== Time Zones Data zones data ==
Time zones are (for now) country based. Each country has defined '''''time_zone''''' (integer, in minutes) and '''''time_zone_name''''' (string). Eg. pacific daylight time is -420 minutes with "PDT" name.
In addition there is default timezone, stored in '''''economy_data''''' unit ('''''default_time_zone''''', '''''default_time_zone_name'''''), this is zone basic game time is expected int and its used every time where relevant spatial location and thus time zone is not known.
== Economy Data data ==
Some old values has been exported to '''''economy_data''''' unit ('''''/def/economy_data.sii''''') attributes:

Navigation menu