11# FillUnitExtension
22
3+ Utilize additional features for base game FillUnit specialization, enabling playing sound effects and toggling object changes based on fill level.
4+
5+ # Table of Contents
6+
7+ - [ Add specialization to vehicle type] ( #add-specialization-to-vehicle-type )
8+ - [ Vehicle XML] ( #vehicle-xml )
9+ - [ FillUnit] ( #fillunit )
10+ - [ Object changes] ( #object-changes )
11+ - [ Sound] ( #sound )
12+
13+
314## Add specialization to vehicle type
415
516``` xml
1829</modDesc >
1930```
2031
32+ ## Vehicle XML
33+
34+ ``` xml
35+ <?xml version =" 1.0" encoding =" utf-8" standalone =" no" ?>
36+ <vehicle >
37+ <fillUnitExtension >
38+ <fillUnit fillUnitIndex =" 2" >
39+ <!-- Play alarm sound when fill level is below 10% -->
40+ <fillLevelSound threshold =" 0.1" thresholdIsGreater =" false" template =" rollbeltAlarm" linkNode =" alarmSoundNode2" />
41+ </fillUnit >
42+ <fillUnit fillUnitIndex =" 3" >
43+ <!-- Play alarm sound and activate object changes when fill level is above 85% -->
44+ <fillLevelSound threshold =" 0.85" template =" rollbeltAlarm" linkNode =" alarmSoundNode" />
45+ <fillLevelObjectChanges threshold =" 0.85" >
46+ <objectChange node =" alarmBeacon" visibilityActive =" true" visibilityInactive =" false" />
47+ </fillLevelObjectChanges >
48+ </fillUnit >
49+ </fillUnitExtension >
50+ </vehicle >
51+ ```
52+
2153## FillUnit
2254
2355```
@@ -30,7 +62,7 @@ vehicle.fillUnitExtension.fillUnit(%)
3062| fillUnitIndex | integer | Yes | | |
3163
3264
33- ## Fill level object changes
65+ ## Object changes
3466
3567```
3668vehicle.fillUnitExtension.fillUnit(%).fillLevelObjectChanges
@@ -43,8 +75,8 @@ Trigger object changes based on the fill level percentage.
4375| -----------| -------| ----| -----------| ------------------------------|
4476| threshold | float | No | ``` 0.9 ``` | Defines at which fillUnit fill level percentage the object changes |
4577| thresholdIsGreater | boolean | No | ``` true ``` | If true the object changes are activated above threshold, if not then below threshold |
46- | requiresPoweredOn | boolean | No | ``` true ``` | |
47- | requiresTurnedOn | boolean | No | ``` false ``` | |
78+ | requiresPoweredOn | boolean | No | ``` true ``` | Require vehicle to be powered on in order for object changes can be active |
79+ | requiresTurnedOn | boolean | No | ``` false ``` | Require vehicle to be turned on in order for object changes can be active [ ^ 1 ] |
4880
4981### Example
5082``` xml
@@ -60,7 +92,7 @@ Trigger object changes based on the fill level percentage.
6092</vehicle >
6193```
6294
63- ## Fill level sound
95+ ## Sound
6496
6597```
6698vehicle.fillUnitExtension.fillUnit(%).fillLevelSound
@@ -74,8 +106,8 @@ Same as a normal vehicle sample entry, but with additional attributes.
74106| -----------| -------| ----| -----------| ------------------------------|
75107| threshold | float | No | ``` 0.9 ``` | Defines at which fillUnit fill level percentage the sound is triggered |
76108| thresholdIsGreater | boolean | No | ``` true ``` | If true the sound is triggered above threshold, if not then below threshold |
77- | requiresPoweredOn | boolean | No | ``` true ``` | |
78- | requiresTurnedOn | boolean | No | ``` false ``` | |
109+ | requiresPoweredOn | boolean | No | ``` true ``` | Require vehicle to be powered on in order for sound can be playing |
110+ | requiresTurnedOn | boolean | No | ``` false ``` | Require vehicle to be turned on in order for sound can be playing [ ^ 1 ] |
79111
80112### Example
81113``` xml
@@ -87,4 +119,6 @@ Same as a normal vehicle sample entry, but with additional attributes.
87119 </fillUnit >
88120 </fillUnitExtension >
89121</vehicle >
90- ```
122+ ```
123+
124+ [ ^ 1 ] : If the vehicle doesn't have a turn on function it will disregard this setting.
0 commit comments