Difference between revisions of "Documentation/Engine/Units/accessory sound data"

From SCS Modding Wiki
Jump to navigation Jump to search
(New article, still WIP.)
 
(Attributes: Changed arrays to C++ template format as requested)
Line 35: Line 35:
 
|-
 
|-
 
|engine
 
|engine
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|No
 
|style="text-align:center"|No
Line 41: Line 41:
 
|-
 
|-
 
|engine_load
 
|engine_load
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|No
 
|style="text-align:center"|No
Line 47: Line 47:
 
|-
 
|-
 
|engine_nofuel
 
|engine_nofuel
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|No
 
|style="text-align:center"|No
Line 53: Line 53:
 
|-
 
|-
 
|engine_exhaust
 
|engine_exhaust
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|No
 
|style="text-align:center"|No
Line 59: Line 59:
 
|-
 
|-
 
|engine_brake
 
|engine_brake
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|No
 
|style="text-align:center"|No
Line 77: Line 77:
 
|-
 
|-
 
|air_gear
 
|air_gear
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|No
 
|style="text-align:center"|No
Line 86: Line 86:
 
|-
 
|-
 
|air_brake
 
|air_brake
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|No
 
|style="text-align:center"|No
Line 94: Line 94:
 
|-
 
|-
 
|air_cutoff
 
|air_cutoff
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 100: Line 100:
 
|-
 
|-
 
|wheel_asphalt
 
|wheel_asphalt
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 106: Line 106:
 
|-
 
|-
 
|wheel_rumble
 
|wheel_rumble
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 112: Line 112:
 
|-
 
|-
 
|wheel_gravel
 
|wheel_gravel
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 118: Line 118:
 
|-
 
|-
 
|wheel_grass
 
|wheel_grass
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 130: Line 130:
 
|-
 
|-
 
|gear_noise
 
|gear_noise
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 148: Line 148:
 
|-
 
|-
 
|seat_noise
 
|seat_noise
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 160: Line 160:
 
|-
 
|-
 
|suspension_noise
 
|suspension_noise
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 202: Line 202:
 
|-
 
|-
 
|crash_metal
 
|crash_metal
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 208: Line 208:
 
|-
 
|-
 
|crash_hard
 
|crash_hard
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 214: Line 214:
 
|-
 
|-
 
|crash_soft
 
|crash_soft
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''
Line 220: Line 220:
 
|-
 
|-
 
|crash_scratch
 
|crash_scratch
|owner_ptr_array
+
|array<owner_ptr>
 
|
 
|
 
|style="text-align:center"|'''Yes'''
 
|style="text-align:center"|'''Yes'''

Revision as of 15:49, 30 May 2017

The accessory_sound_data unit class is used to define sounds for the player's vehicle. Units of this type are typically found in /def/vehicle/truck/<make.model>/sound/<type>/*.sii. They are mostly comprised of pointers to sound_data, sound_engine_data, and sound_noise_data units which may be defined in-line or included from other sources. A valid truck configuration will contain two sound accessories: one for exterior sounds and one for interior sounds. The names for these units typically end in .esound for exterior sounds and .isound for interior sounds.

Attributes

Many common attributes are inherited from accessory_data. Attributes marked common are typically defined by including /def/vehicle/truck/common_sound_ext.sui or common_sound_int.sui within the accessory_sound_data unit definition, and /def/vehicle/truck/common_sound_ext_data.sui or common_sound_int_data.sui within the SiiNunit.

Name Type Default Value Common? Description
exterior_sound bool false No Defines whether the unit contains exterior sounds (true) or interior sounds (false).
start owner_ptr No Points to a sound_data unit which defines the sound to play when the engine is starting.
start_no_fuel owner_ptr No Points to a sound_data unit which defines the sound to play when the player attempts to start the engine with no fuel.
stop owner_ptr No Points to a sound_data unit which defines the sound to play when the engine is stopped.
engine array<owner_ptr> No Each array member points to a sound_engine_data unit which collectively define the engine's sound with no load (e.g. idle, cruising, gentle acceleration, etc).
engine_load array<owner_ptr> No Each array member points to a sound_engine_data unit which collectively define the engine's sound under load (e.g. heavy acceleration, climbing a hill, etc).
engine_nofuel array<owner_ptr> No Each array member points to a sound_engine_data unit which collectively define the engine's sound when fuel has been cut (e.g. coasting in gear, speed limiter, etc).
engine_exhaust array<owner_ptr> No Each array member points to a sound_engine_data unit which collectively define the resonant sound of the truck's exhaust.
engine_brake array<owner_ptr> No Each array member points to a sound_engine_data unit which collectively define the engine's sound while using the engine brake.
turbo owner_ptr No Points to a sound_data unit which defines the sound of the turbocharger.
retarder owner_ptr Yes Points to a sound_data unit which defines the sound of the retarder.
air_gear array<owner_ptr> No Each member points to a sound_data unit defining one of the gear change sounds. This is defined as a numbered array:
	air_gear[0]: .airgear0 // Main gear change
	air_gear[1]: .airgear1 // Range change
	air_gear[2]: .airgear2 // Split change
air_brake array<owner_ptr> No Each member points to a sound_data unit defining one of the air brake sounds. This is defined as a numbered array:
	air_brake[0]: .airbrake0 //
	air_brake[1]: .airbrake1 // 
air_cutoff array<owner_ptr> Yes Each member points to a sound_data unit defining a sound to be played when the air compressor is unloaded by the governor.
wheel_asphalt array<owner_ptr> Yes Each member points to a sound_noise_data unit collectively defining the sound to be played when the truck is driving on asphalt.
wheel_rumble array<owner_ptr> Yes Each member points to a sound_noise_data unit collectively defining the sound to be played when the truck is driving on a rumble strip.
wheel_gravel array<owner_ptr> Yes Each member points to a sound_noise_data unit collectively defining the sound to be played when the truck is driving on gravel.
wheel_grass array<owner_ptr> Yes Each member points to a sound_noise_data unit collectively defining the sound to be played when the truck is driving on grass.
aero_noise owner_ptr Yes Points to a sound_noise_data unit defining the aerodynamic sound of the truck.
gear_noise array<owner_ptr> Yes Each member points to a sound_noise_data unit collectively defining the sound of the drivetrain.
gear_grind_loop owner_ptr Yes Points to a sound_data unit defining the the sound to be looped when the gear the player is trying to activate won't mesh (e.g. input shaft speed doesn't match or the player hasn't used the clutch correctly).
seat_noise_threshold float Yes Defines the minimum acceleration (m/s2) to generate noise from the seat suspension.
seat_noise array<owner_ptr> Yes
suspension_noise_threshold float Yes Defines the minimum acceleration (m/s2) to generate noise from the truck's suspension.
suspension_noise array<owner_ptr> Yes
lift_axle owner_ptr Yes Points to a sound_data unit defining the sound to be played when the truck's lift axles (if any) are raised or lowered.
horn owner_ptr No Points to a sound_data unit defining the sound for the truck's electric/city horn.
air_horn owner_ptr No Points to a sound_data unit defining the default sound for the truck's air horn. This is overridden by any hookup accessory horns. If unset, the truck will not have an air horn without the presence of hookup accessory horns.
reverse owner_ptr No Points to a sound_data unit defining the sound for the truck's reverse beeper.
beacon owner_ptr No
air_warning owner_ptr Yes Points to a sound_data unit defining the sound for the truck's audible low air warning.
crash_metal array<owner_ptr> Yes Each member points to a sound_data unit collectively defining sounds for collisions at 60-90 km/h.
crash_hard array<owner_ptr> Yes Each member points to a sound_data unit collectively defining sounds for collisions at 30-59 km/h.
crash_soft array<owner_ptr> Yes Each member points to a sound_data unit collectively defining sounds for collisions at 6-29 km/h.
crash_scratch array<owner_ptr> Yes Each member points to a sound_data unit collectively defining looped sounds for scraping collisions.
blinker_on owner_ptr No Points to a sound_data unit defining the sound of the blinker relay closing.
blinker_off owner_ptr No Points to a sound_data unit defining the sound of the blinker relay opening.
wipers_up owner_ptr No Points to a sound_data unit defining the sound of the wiper(s) traveling from the park position to the extended position.
wipers_down owner_ptr No Points to a sound_data unit defining the sound of the wiper(s) traveling from the extended position to the park position.
lights_stick owner_ptr Yes Points to a sound_data unit defining the sound of the headlight control being moved.
high_beam_stick owner_ptr Yes Points to a sound_data unit defining the sound of the high beam switch being activated.
light_horn_stick owner_ptr Yes Points to a sound_data unit defining the sound of the electric/city horn being activated.
blinker_stick owner_ptr Yes Points to a sound_data unit defining the sound of the blinker lever being activated.
blinker_stick_off owner_ptr Yes Points to a sound_data unit defining the sound of the blinker lever being deactivated.
hazard_warning_stick owner_ptr Yes Points to a sound_data unit defining the sound of the hazard/four-way flasher control being activated.
wipers_stick owner_ptr Yes Points to a sound_data unit defining the sound of the wiper control being activated.
retarder_stick owner_ptr Yes Points to a sound_data unit defining the sound of the retarder control being activated.
park_brake_stick owner_ptr Yes Points to a sound_data unit defining the sound of the parking brake being engaged.
park_brake_stick_off owner_ptr Yes Points to a sound_data unit defining the sound of the parking brake being disengaged.

Related Units