Modes
Modes are the basic building block of DLSv2, all VCFs you work on will be based on one or multiple modes. They can be as simple or as complex as you can imagine.
A mode can contain carcols-style vehicle-level siren settings (e.g BPM, SpeedMultiplier, etc.) and siren-level settings (e.g. sequencer, scale, color, delta, etc.). It also can control multiple other features like extras, modkits, yield settings and so on.
Modes can be manually toggled using Control Groups, which will be discussed later, or by automatic triggers. DLSv2 ships with multiple triggers that can be used both by player and AI vehicles.
They are also parsed/set in the order they're set in the VCF, which means that if a mode (X) sets a specific setting on/off and a mode (Y) defined later conflicts with it, Y will be the setting applied.
We'll move on to explain the available settings within a Mode while showcasing a Stage 3 mode being built:
Mode Name
<Mode name="Stage 3">
</Mode>
The mode name will be used within the config to refer to this specific mode. Since we're making a Stage 3 mode, nothing more logical than calling it Stage 3
.
Apply Default SirenSettings
<Mode name="Stage 3" apply_default_siren_settings="true">
</Mode>
This setting is recommended only to be used in "base" modes and will pull all default siren settings (as set in the carcol) for this mode.
Yield
<Mode name="Stage 3" apply_default_siren_settings="true">
<Yield enabled="true"/>
</Mode>
This setting defines if vehicles should yield if this specific mode is on or not. If true, vehicles will pull over when the vehicle is in motion. Typically this should be enabled at least in the main "emergency response" mode, and should be disabled if front lights are cut off or if the vehicle is a non-emergency vehicle. The default is for yield to be disabled if no active modes set it to enabled.
Extras
<Mode name="Stage 3" apply_default_siren_settings="true">
<Yield enabled="true"/>
<Extras>
<Extra id="2,3,4" enabled="true"/>
<Extra id="5,6" enabled="false"/>
<Extra id="7" enabled="true"/>
</Extras>
</Mode>
This setting sets the extras for when this mode is active. In this specific case, extras 2, 3, 4 and 7 will be enabled while 5 and 6 will be disabled. DLS remembers what an extra was originally set to before a mode was enabled, and will set extras back to their original values if no active mode forces it to be enabled or disabled.
Modkits
<Mode name="Enable Sign">
<ModKits>
<Kit Type="VMT_ROOF" Index="1" />
</ModKits>
</Mode>
This setting configures the modkit index for any available modkit slot. Each kit type must be set separately, but all are supported. Available kit names are listed below. You must enter the enum name as the "Type", the modkit type ID is provided for reference. The Index sets which option is selected within that modkit type.
Animations
<Mode name="Anim Demo">
<Animation speed="0.25" blend="2.5" loop="true" stay_in_last_frame="true" start_at="0.5" flags="4">
<Dict>dict_name</Dict>
<Name>anim_name</Name>
</Animation>
</Mode>
Dict
and Name
are required. All other animation attributes are optional.
Speed: Defaults to 1.0, float multiplier of original animation speed
Blend: Defaults to 4.0, higher value makes it take longer to blend from the previous position to the first frame of the animation
Loop: Defaults to true, repeats animation indefinitely (should almost always be left as true)
Stay in last frame: Defaults to true, leaves animation effects applied after animation is stopped
Start at: Defaults to 0, float value from 0-1 indicating position within the animation's full length to start at
Flags: Defaults to 0, optional animation flags (typically not used)
Paint Job
<Mode name="Test PAINT:2">
<Paints>
<!-- Secondary Color Slot (PAINT:2) -->
<!-- Hot Pink (paint code 135) -->
<Paint slot="2" color="135" />
</Paints>
</Mode>
For color codes see this page or set the color with a trainer and note the color index.
Available paint slots and corresponding material ID names are:
PAINT:1
(primary)PAINT:2
(secondary)PAINT:3
(pearlescent)PAINT:4
(wheel)
(not usable)PAINT:5PAINT:6
(extra trim)PAINT:7
(extra trim)
Add the paint slot name to the material name in ZModeler3 to have that material receive that paint slot color. For example, a material named body [PAINT:1]
will get the primary color, while a material named body [PAINT:6]
will get the extra trim color.
SirenSettings
<Mode name="Stage 3" apply_default_siren_settings="true">
<Yield enabled="true"/>
<Extras>
<Extra id="2,3,4" enabled="true"/>
<Extra id="5,6" enabled="false"/>
<Extra id="7" enabled="true"/>
</Extras>
<SirenSettings>
<!-- SirenSetting as written in the carcol can be included here -->
</SirenSettings>
</Mode>
Inside the SirenSettings you can insert the whole of a vehicle carcol entry, or just add relevant entries. Since we're already pulling the default sirensetting, we can just add the relevant entries, like the following:
<Mode name="Stage 3" apply_default_siren_settings="true">
<Yield enabled="true"/>
<Extras>
<Extra id="2,3,4" enabled="true"/>
<Extra id="5,6" enabled="false"/>
<Extra id="7" enabled="true"/>
</Extras>
<SirenSettings>
<!-- You can add just the entries you want to modify, without needing to add them all -->
<sequencerBpm value="220" />
<sirens>
<!-- You can add id="[SIRENS]" to modify multiple sirens at once -->
<Item id="5,7">
<!-- Just like above, you can only add the entries you want to modify -->
<flashiness>
<start value="3.14159274" />
<sequencer value="1431655765" />
</flashiness>
<light value="true" />
</Item>
</sirens>
</SirenSettings>
</Mode>
Sequences
Looking to make settings sequences easier, we added the Sequences section to simplify making them. With it we can simplify our Stage 3 mode, like this:
<Mode name="Stage 3" apply_default_siren_settings="true">
<Yield enabled="true"/>
<Extras>
<Extra id="2,3,4" enabled="true"/>
<Extra id="5,6" enabled="false"/>
<Extra id="7" enabled="true"/>
</Extras>
<SirenSettings>
<!-- You can add just the entries you want to modify, without needing to add them all -->
<sequencerBpm value="220" />
<sirens>
<!-- You can add id="[SIRENS]" to modify multiple sirens at once -->
<Item id="5,7">
<!-- Just like above, you can only add the entries you want to modify -->
<flashiness>
<start value="3.14159274" />
</flashiness>
<light value="true" />
</Item>
</sirens>
</SirenSettings>
<Sequences>
<Item id="5,7" sequence="01010101010101010101010101010101" />
</Sequences>
</Mode>
Last updated