1,784
edits
Changes
no edit summary
[[File:Engine random event composition.jpg|800px]]
= Defining random Road events creation pipeline =
== Defining cutscenes for random events ==
</pre>
=== Cutscene width ===
In case of RE, cutscene definition of type [[Documentation/Engine/Units/journey_events_cutscene|journey_events_cutscene]] also uses '''left_width''' and '''right_width''' attributes, which defines the length of the cutscene. This two attributes are very important as they determinate how much space is between different cutscenes, how many layer cutscenes can be places in whole RE and where traffic blocks will be placed.
# Once seeing cutscene as on picture, use the ruler tool in map editor to measure distance from cutscene origin point on each side.
# Use measured widths in cutscene definition.
== Defining random events ==
All RE are stored in "'''/def/world/journey_road_event.sii'''" as list of [[Documentation/Engine/Units/journey_events_road_event|'''journey_events_road_event''']] units.
Example '''journey_road_event.sii''' file definition:
<pre>
SiiNunit
{
# For modders: Please do not modify this file if you want to add a new entry. Create in
# this directory a new file "<base_name>.<idofyourmod>.sii" where <base_name> is name of
# base file without the extension (e.g. "city" for "/def/city.sii") and <idofyourmod> is
# some string which is unlikely to conflict with other mod.
#
# Warning: Even if the units are specified in more than one source file, they share the
# same namespace so suffixes or prefixes should be used to avoid conflicts.
journey_events_road_event : j_re.acc_uni_p
{
signs_distances_outer[]: 50
layer_min_curve[]: 0.0
layer_max_curve[]: 15.0
max_length: 55.0
min_length: 55.0
}
journey_events_road_event : j_re.acc_plane
{
start_cutscene: j_cut.acc_stop_li
layer_cutscenes[]: j_cut.acc_mid
end_cutscene: j_cut.acc_plane
min_shoulder_space: 3.0
outer_lane_allowed: true
centerline_displacement: true
layer_max_curve[]: 2.0
weight: 10.0
parent: j_re.acc_spec_p
name: "Accident country specific plane (1)"
}
}
</pre>