Changes

Jump to navigation Jump to search

Documentation/Engine/Detours

2,245 bytes added, 14:10, 21 December 2018
no edit summary
[[File:Engine detour1.jpg|thumb|Detour preview 1|400px512px]][[File:Engine detour2.jpg|thumb|Detour preview 2|400px512px]]
__TOC__
Detours (DE) are dynamically generated situations causing closure of a whole road.
DE are procedurally generated and do not need specific data definition for specific detours. Only things data you need to provide are cutscenes for road closure, road blocks and for the detour cause event.
= How does it work? =
== Master data unit ==
There may be only one unit of this type. It is located in '''/def/world/journey_detour_master.sii'''
<pre>
SiiNunit
}
</pre>
 
Properties:
* '''min_game_time_delay''' Minimal game time from the last detour. If the time from the last detour is lower then this property, detour will not be generated.
* '''max_game_time_delay''' Maximal game time from the last detour. If the time from the last detour is larger then this property, detour will be always generated. (if other conditions are also fulfilled)
* '''minimal_level''' Minimal level for detour generation.
 
Remaining case is when the time from the last detour is between '''min_game_time_delay''' and '''max_game_time_delay'''. In that case the detour will be generated with the probability corresponding to the uniform distribution of '''one''' detour between these times.
 
== Detour data unit ==
These unit define which cutscene will be used for which part of detour visualization.
 
Example od detour data unit located in '''/def/world/journey_detours.sii'''
<pre>
journey_events_detour : j_dt.1_cl_ri1
{
cutscene: j_cut.1_cl_ri1
lane_idx: 1
lane_count: 1
type: road_block_right
}
</pre>
 
Properties:
* '''cutscene''' Used cutscene. See below.
* '''type''' Type of visualization.
** '''''closed_road''''' Source of the detour. This cutscene will be generated on the place of detour origin. ('''4. car''' (vehicles) on the Detour preview 2 image)
** '''''border_prefab_node''''' These cutscenes will be generated between each closing prefab (prefab where the traffic is diverted) and closed road. ('''3. car''' on the Detour preview 2 image)
** '''''road_block_right''''' These cutscenes will be generated on closed road lanes before the closing prefab. Traffic go round to the left.
** '''''road_block_left''''' These cutscenes will be generated on closed road lanes before the closing prefab. Traffic go round to the right. ('''1.''' (''lane_idx'' = 2) '''car''' and '''2.''' (''lane_idx'' = 1) '''car''' on the Detour preview 2 image)
* '''lane_count''' Cutscenes will be generated only on the roads with this number of lanes.
* '''lane_idx''' Valid only for ''road_block_'' type. Cutscene will be generated for this road block only if the distance to the closest free lane is the same as this number.
== Cutscenes data unit ==
Because DE are part of the journey event framework, they use the same cutscene units as the random road events.
You can see detailed descriptions description of the cutscene unit here: [[Documentation/Engine/Random Road Events#Cutscenes_for_random_events]]
91
edits

Navigation menu