Sound definitions are found in /Hearts of Iron IV/sound. A sound file should be saved as a WAV file in Stereo, as a mono channel, at 44100Hz and as a 32-bit float.
All of the sound definition files must be saved as .asset files.
Sound
File:Ambox outdated info.png | 這部分內容可能已不適合當前版本,最後更新於1.5。 |
A sound entry is used to define a sound. It follows this format:
sound = { name = <name> file = <path> always_load = <bool> volume = <float> }
name is the name of the sound definition that is referred to by other files.
file is the path to the sound file, relative to the Hearts of Iron IV sound folder.
always_load defines whether the sound is always loaded.
volume defines the volume of the sound.
Sound Effect
File:Ambox outdated info.png | 這部分內容可能已不適合當前版本,最後更新於1.5。 |
A soundeffect entry is used to define a soundeffect. It follows this format:
soundeffect = { name = <name> falloff = <name> sounds = { sound = <name> } loop = <bool> is3d = <bool> random_sound_when_looping = <bool> max_audible = <int> max_audible_behaviour = <type> volume = <float> fade_in = <float> fade_out = <float> delay_random_offset = { <float> <float> } playbackrate_random_offset = { <float> <float> } volume_random_offset = { <float> <float> } }
name is the name of the soundeffect.
falloff is the falloff entry used by the sound effect.
sounds is the sound entries used by the sound effect.
loop defines whether the soundeffect loops.
is3d defines whether the sound effect should utilise 3D sound.
random_sound_when_looping defines whether the soundeffect picks a random sound when looping, rather than picking iteratively.
max_audible defines the maximum amount of instances of the sound effect in one moment.
max_audible_behaviour defines what happens when more than max_audible instances happens. It is always fail.
volume defines the volume of the sound effect.
fade_in defines the fade in duration for the sound effect.
fade_out defines the fade out duration for the sound effect.
delay_random_offset defines the minimum and maximum random offset to the delay between sound loops.
playbackrate_random_offset defines the minimum and maximum random offset to the playback rate between sound loops.
volume_random_offset defines the minimum and maximum random offset to the volume between sound loops.
Falloff
File:Ambox outdated info.png | 這部分內容可能已不適合當前版本,最後更新於1.5。 |
Falloff entries define the falloff attributes for sound. They are added in sound effects, and follow this format:
falloff = { name = <name> min_distance = <float> max_distance = <float> height_scale = <float> }
name is the name of the falloff entry.
min_distance is the minimum distance before falloff is applied, i.e. max volume
max_distance is the maximum distance before no sound is heard.
height_scale is a scalar for the height between the sound source and the player camera.
Categories
File:Ambox outdated info.png | 這部分內容可能已不適合當前版本,最後更新於1.5。 |
Sound effects can be placed in sound categories that apply a specific compressor to the sounds. The categories follow this format:
category = { name = <name> soundeffects = { <name> } compressor = { enabled = yes pregain = <float> postgain = <float> ratio = <float> threshold = <float> attacktime = <float> releasetime = <float> } }
name is the name of the soundeffect category.
soundeffects is a list of the sound effects belong to the category.
compressor is the compressor to use for the category, see below for more information on the attributes.
Compressors
File:Ambox outdated info.png | 這部分內容可能已不適合當前版本,最後更新於1.5。 |
There are two global compressors: master_compressor used for sounds and music_compressor used for music. Individual compressors can be defined for sounds within categories.
The compressors use the following format:
<name> = { pregain = <float> postgain = <float> ratio = <float> threshold = <float> attacktime = <float> releasetime = <float> }
文件 | 效果 • 條件 • 定義 • 修正 • 修正列表 • 作用域 • 本地化 • on action • 數據結構 (標記, 臨時標記, 國家別名, 變量, 數組) |
腳本 | 成就修改 • AI修改 • AI focuses • 自治領修改 • 權力平衡修改 • 劇本/標籤 (遊戲規則)• 建築修改 • 人物修改 • 修飾性TAG修改 • 國家創建 • 軍隊修改 • 決議製作 • 裝備修改 • 事件修改 • Idea修改 • 意識形態修改 • 軍工商修改 • 國策製作 • 資源修改 • Scripted GUI • 科技製作 • 單位修改 |
地圖 | 地圖 • 省份 • 補給區域 • 戰略區域 |
圖形圖像 | 界面 • 圖形資產 • 實體模型 • 後期特效 • 離子效果 • 字體 |
裝飾性 | 肖像 • 命名列表 • 音樂 • 音效 |
其他 | 控制台指令 • 故障排除 • 模組結構 • 成就代碼分析 • Mod相關 • Nudger修改 |