Changes

Jump to navigation Jump to search

Documentation/Engine/Units/accessory sound data

10,377 bytes added, 00:45, 30 May 2017
New article, still WIP.
The '''accessory_sound_data''' unit class is used to define sounds for the [[Documentation/Engine/Game_data/Player_trucks_definitions|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 [[Documentation/Engine/Units/sound_data|sound_data]], [[Documentation/Engine/Units/sound_engine_data|sound_engine_data]], and [[Documentation/Engine/Units/sound_noise_data|sound_noise_data]] units which may be defined in-line or [[Documentation/Engine/Units#Includes|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 <code>.esound</code> for exterior sounds and <code>.isound</code> for interior sounds.

== Attributes ==
Many common attributes are inherited from [[Documentation/Engine/Units/accessory_data|'''accessory_data''']]. Attributes marked ''common'' are typically defined by including <code>/def/vehicle/truck/common_sound_ext.sui</code> or <code>common_sound_int.sui</code> within the accessory_sound_data unit definition, and <code>/def/vehicle/truck/common_sound_ext_data.sui</code> or <code>common_sound_int_data.sui</code> within the SiiNunit.
{|class="wikitable"
!Name
![[Documentation/Engine/Units#Attribute_types|Type]]
!Default Value
!Common?
!Description
|-
|exterior_sound
|bool
|style="text-align:center"|false
|style="text-align:center"|No
|Defines whether the unit contains exterior sounds (true) or interior sounds (false).
|-
|start
|owner_ptr
|
|style="text-align:center"|No
|Points to a '''sound_data''' unit which defines the sound to play when the engine is starting.
|-
|start_no_fuel
|owner_ptr
|
|style="text-align:center"|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
|
|style="text-align:center"|No
|Points to a '''sound_data''' unit which defines the sound to play when the engine is stopped.
|-
|engine
|owner_ptr_array
|
|style="text-align:center"|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
|owner_ptr_array
|
|style="text-align:center"|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
|owner_ptr_array
|
|style="text-align:center"|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
|owner_ptr_array
|
|style="text-align:center"|No
|Each array member points to a '''sound_engine_data''' unit which collectively define the resonant sound of the truck's exhaust.
|-
|engine_brake
|owner_ptr_array
|
|style="text-align:center"|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
|
|style="text-align:center"|No
|Points to a '''sound_data''' unit which defines the sound of the turbocharger.
|-
|retarder
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit which defines the sound of the retarder.
|-
|air_gear
|owner_ptr_array
|
|style="text-align:center"|No
|Each member points to a '''sound_data''' unit defining one of the gear change sounds. This is defined as a numbered array:
<pre> air_gear[0]: .airgear0 // Main gear change
air_gear[1]: .airgear1 // Range change
air_gear[2]: .airgear2 // Split change</pre>
|-
|air_brake
|owner_ptr_array
|
|style="text-align:center"|No
|Each member points to a '''sound_data''' unit defining one of the air brake sounds. This is defined as a numbered array:
<pre> air_brake[0]: .airbrake0 //
air_brake[1]: .airbrake1 // </pre>
|-
|air_cutoff
|owner_ptr_array
|
|style="text-align:center"|'''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
|owner_ptr_array
|
|style="text-align:center"|'''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
|owner_ptr_array
|
|style="text-align:center"|'''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
|owner_ptr_array
|
|style="text-align:center"|'''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
|owner_ptr_array
|
|style="text-align:center"|'''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
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_noise_data''' unit defining the aerodynamic sound of the truck.
|-
|gear_noise
|owner_ptr_array
|
|style="text-align:center"|'''Yes'''
|Each member points to a '''sound_noise_data''' unit collectively defining the sound of the drivetrain.
|-
|gear_grind_loop
|owner_ptr
|
|style="text-align:center"|'''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
|
|style="text-align:center"|'''Yes'''
|Defines the minimum acceleration (m/s<sup>2</sup>) to generate noise from the seat suspension.
|-
|seat_noise
|owner_ptr_array
|
|style="text-align:center"|'''Yes'''
|
|-
|suspension_noise_threshold
|float
|
|style="text-align:center"|'''Yes'''
|Defines the minimum acceleration (m/s<sup>2</sup>) to generate noise from the truck's suspension.
|-
|suspension_noise
|owner_ptr_array
|
|style="text-align:center"|'''Yes'''
|
|-
|lift_axle
|owner_ptr
|
|style="text-align:center"|'''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
|
|style="text-align:center"|No
|Points to a '''sound_data''' unit defining the sound for the truck's electric/city horn.
|-
|air_horn
|owner_ptr
|
|style="text-align:center"|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
|
|style="text-align:center"|No
|Points to a '''sound_data''' unit defining the sound for the truck's reverse beeper.
|-
|beacon
|owner_ptr
|
|style="text-align:center"|No
|
|-
|air_warning
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound for the truck's audible low air warning.
|-
|crash_metal
|owner_ptr_array
|
|style="text-align:center"|'''Yes'''
|Each member points to a '''sound_data''' unit collectively defining sounds for collisions at 60-90 km/h.
|-
|crash_hard
|owner_ptr_array
|
|style="text-align:center"|'''Yes'''
|Each member points to a '''sound_data''' unit collectively defining sounds for collisions at 30-59 km/h.
|-
|crash_soft
|owner_ptr_array
|
|style="text-align:center"|'''Yes'''
|Each member points to a '''sound_data''' unit collectively defining sounds for collisions at 6-29 km/h.
|-
|crash_scratch
|owner_ptr_array
|
|style="text-align:center"|'''Yes'''
|Each member points to a '''sound_data''' unit collectively defining looped sounds for scraping collisions.
|-
|blinker_on
|owner_ptr
|
|style="text-align:center"|No
|Points to a '''sound_data''' unit defining the sound of the blinker relay closing.
|-
|blinker_off
|owner_ptr
|
|style="text-align:center"|No
|Points to a '''sound_data''' unit defining the sound of the blinker relay opening.
|-
|wipers_up
|owner_ptr
|
|style="text-align:center"|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
|
|style="text-align:center"|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
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the headlight control being moved.
|-
|high_beam_stick
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the high beam switch being activated.
|-
|light_horn_stick
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the electric/city horn being activated.
|-
|blinker_stick
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the blinker lever being activated.
|-
|blinker_stick_off
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the blinker lever being deactivated.
|-
|hazard_warning_stick
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the hazard/four-way flasher control being activated.
|-
|wipers_stick
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the wiper control being activated.
|-
|retarder_stick
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the retarder control being activated.
|-
|park_brake_stick
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the parking brake being engaged.
|-
|park_brake_stick_off
|owner_ptr
|
|style="text-align:center"|'''Yes'''
|Points to a '''sound_data''' unit defining the sound of the parking brake being disengaged.
|}

== Related Units ==
*[[Documentation/Engine/Units/sound_data|sound_data]]
*[[Documentation/Engine/Units/sound_engine_data|sound_engine_data]]
*[[Documentation/Engine/Units/sound_noise_data|sound_noise_data]]
309
edits

Navigation menu