Changes

Jump to navigation Jump to search

Games/ATS/Modding guides/1.29

1,130 bytes added, 12:48, 10 November 2017
no edit summary
== New 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 ==

Navigation menu