Difference between revisions of "Action0/Sound Effects"

From GRFSpecs
Jump to navigationJump to search
m (4 revisions)
m (cleanup in aisle 0)
Line 1: Line 1:
  +
==Introduction==
 
Defining properties for new sound effects
   
 
==Properties==
'''''Action 0 properties for new sound effects'''''
 
   
  +
{|
=Action 0 - Properties for new sound effects=
 
  +
!Property !![[GRFActionsDetailed|Size]] !! Description
 
  +
|-
Defining properties for new sound effects
 
 
|08 ||B ||Relative volume
  +
|-
 
|09 ||B ||Priority
  +
|-
 
|0A ||B ||Override old sound
  +
|}
   
  +
===Note===
 
The IDs of new sound effects are the numeric order in the corresponding action 11 plus 49 (73 decimal), i.e. the first entry in action 11 has ID 49, the second one ID 4A and so on.  You must have an action 11 before this action 0, or else no new sound IDs will have been defined, and thus their properties cannot be set. You cannot directly set the properties of IDs 0..48 that refer to TTD's original sounds, except by overriding these sounds using property 0A.
 
The IDs of new sound effects are the numeric order in the corresponding action 11 plus 49 (73 decimal), i.e. the first entry in action 11 has ID 49, the second one ID 4A and so on.  You must have an action 11 before this action 0, or else no new sound IDs will have been defined, and thus their properties cannot be set. You cannot directly set the properties of IDs 0..48 that refer to TTD's original sounds, except by overriding these sounds using property 0A.
   
 
==Description==
-=Properties=-
 
 
||Number|Size|Description
 
 
08|B|Relative volume
 
 
09|B|Priority
 
 
0A|B|Override old sound||
 
 
-=Comments=-
 
   
==Relative volume (08)==
+
===Relative volume (08)===
   
 
This value defines the volume of the sound effect relatively to the main volume. The maximum is 80h (0dB), the minimum is 0 (-24dB).
 
This value defines the volume of the sound effect relatively to the main volume. The maximum is 80h (0dB), the minimum is 0 (-24dB).
Line 26: Line 25:
 
If unset, it defaults to 80h.
 
If unset, it defaults to 80h.
   
==Priority (09)==
+
===Priority (09)===
   
 
This value is only meaningful in the DOS version, where there are limited mixing channels. The lower this byte is, the higher the priority of the sound is. If a sound needs to be played when all mixing channels are busy, the mixer will stop one of the lower priority sounds. Less important sounds should have this byte higher.
 
This value is only meaningful in the DOS version, where there are limited mixing channels. The lower this byte is, the higher the priority of the sound is. If a sound needs to be played when all mixing channels are busy, the mixer will stop one of the lower priority sounds. Less important sounds should have this byte higher.
Line 32: Line 31:
 
If unset, this defaults to 0.
 
If unset, this defaults to 0.
   
==Override old sound (0A)==
+
===Override old sound (0A)===
   
 
Overrides the given old sound (00h..48h) with the current one. This also changes the sound effect to use the relative volume and priority associated with the current one.
 
Overrides the given old sound (00h..48h) with the current one. This also changes the sound effect to use the relative volume and priority associated with the current one.

Revision as of 15:33, 14 June 2011

Introduction

Defining properties for new sound effects

Properties

Property Size Description
08 B Relative volume
09 B Priority
0A B Override old sound

Note

The IDs of new sound effects are the numeric order in the corresponding action 11 plus 49 (73 decimal), i.e. the first entry in action 11 has ID 49, the second one ID 4A and so on.  You must have an action 11 before this action 0, or else no new sound IDs will have been defined, and thus their properties cannot be set. You cannot directly set the properties of IDs 0..48 that refer to TTD's original sounds, except by overriding these sounds using property 0A.

Description

Relative volume (08)

This value defines the volume of the sound effect relatively to the main volume. The maximum is 80h (0dB), the minimum is 0 (-24dB).

If unset, it defaults to 80h.

Priority (09)

This value is only meaningful in the DOS version, where there are limited mixing channels. The lower this byte is, the higher the priority of the sound is. If a sound needs to be played when all mixing channels are busy, the mixer will stop one of the lower priority sounds. Less important sounds should have this byte higher.

If unset, this defaults to 0.

Override old sound (0A)

Overrides the given old sound (00h..48h) with the current one. This also changes the sound effect to use the relative volume and priority associated with the current one.