Skip to content

Sound Events

Sound events define how audio files are played in-game, including volume, pitch randomization, attenuation, and layering. They are the core building blocks of Hytale’s audio system.

Sound events are stored in Assets/Server/Audio/SoundEvents/:

  • DirectoryAssets/Server/Audio/SoundEvents/
    • SFX_Attn_Loud.json
    • SFX_Attn_Moderate.json
    • SFX_Attn_Quiet.json
    • SFX_Attn_VeryLoud.json
    • SFX_Attn_VeryQuiet.json
    • DirectoryBlockSounds/
      • DirectoryBush/
      • DirectoryTall_Grass/
      • DirectoryLeavesGround/
    • DirectoryEnvironments/
      • DirectoryAmbiences/
      • DirectoryWeather/
    • DirectorySFX/
      • DirectoryChests/
      • DirectoryPlayer/
        • DirectoryHealth/
        • DirectoryMovement/
        • DirectoryAction/
      • DirectoryWeapons/
        • DirectorySword/
        • DirectoryMace/
        • DirectoryBow/

Audio files (.ogg) are in Assets/Common/Sounds/.

SFX_Example.json
{
"Layers": [
{
"Files": ["Sounds/Path/Sound.ogg"],
"Volume": 0,
"RandomSettings": {
"MinPitch": -2,
"MaxPitch": 2
}
}
],
"Volume": 0,
"Parent": "SFX_Attn_Moderate"
}
FieldTypeDescription
LayersarrayOne or more audio layers to play
FieldTypeDefaultDescription
Volumefloat0Overall volume adjustment (dB). Range: -100 to 10
Pitchfloat0Pitch adjustment in semitones. Range: -12 to 12
MusicDuckingVolumefloat0Amount to duck music volume when playing (dB). Range: -100 to 0
AmbientDuckingVolumefloat0Amount to duck ambient sounds when playing (dB). Range: -100 to 0
Parentstring-Parent sound event for inheritance
AudioCategorystring-Volume category (e.g., AudioCat_Weapons)
MaxInstanceint50Max concurrent instances. Range: 1 to 100
MaxDistancefloat16Distance at which sound fades out completely (blocks)
StartAttenuationDistancefloat2Distance at which attenuation begins (blocks)
PreventSoundInterruptionboolfalsePrevent interruption of this sound event
FieldTypeDefaultDescription
Filesstring[]-Audio file paths (one chosen at random)
Volumefloat0Layer volume adjustment (dB). Range: -100 to 10
StartDelayfloat0Delay in seconds before this layer starts playing
LoopingboolfalseWhether this layer loops
Probabilityint100Chance of this layer playing when triggered (percentage)
ProbabilityRerollDelayfloat1Delay in seconds before re-rolling whether this layer plays
RoundRobinHistorySizeint0Same file won’t repeat within this many plays. 0 disables. Range: 0 to 32
RandomSettingsobject-Randomization parameters
FieldTypeDescription
MinVolumefloatMinimum random volume offset (dB). Range: -100 to 0
MaxVolumefloatMaximum random volume offset (dB). Range: 0 to 10
MinPitchfloatMinimum random pitch offset (semitones). Range: -12 to 0
MaxPitchfloatMaximum random pitch offset (semitones). Range: 0 to 12
MaxStartOffsetfloatMax seconds to offset playback start. Useful for looping sounds to prevent phasing

Base templates define spatial audio behavior:

TemplateMax DistanceStart AttenuationUse Case
SFX_Attn_VeryQuiet~15 blocks~1 blockSubtle sounds
SFX_Attn_Quiet~25 blocks~1 blockNormal sounds
SFX_Attn_Moderate~35 blocks~2 blocksCombat sounds
SFX_Attn_Loud~45 blocks~2 blocksLoud effects
SFX_Attn_VeryLoud~60 blocks~3 blocksExplosions, roars
SFX_Attn_Loud.json
{
"Layers": [
{
"Files": ["Sounds/TEST/SFX_Test_Blip_A.ogg"],
"RandomSettings": {
"MinPitch": 0,
"MaxPitch": 0,
"MinVolume": 0
},
"Volume": 6.0
}
],
"Volume": 0,
"MaxDistance": 45,
"StartAttenuationDistance": 2
}
SFX_Player_Hurt.json
{
"Layers": [
{
"Files": [
"Sounds/PlayerActions/Hurt/Player_Hurt_01.ogg"
],
"RandomSettings": {
"MinPitch": 0,
"MaxPitch": 0
},
"StartDelay": 0,
"Volume": -2.0
}
],
"MaxInstance": 3,
"Volume": -5,
"PreventSoundInterruption": true,
"Parent": "SFX_Attn_Moderate"
}

Multiple files in Files array are randomly selected:

SFX_Mace_T1_Impact.json
{
"Layers": [
{
"Files": [
"Sounds/Weapons/Mace/Impacts/Mace_T1_Impact_01.ogg",
"Sounds/Weapons/Mace/Impacts/Mace_T1_Impact_02.ogg",
"Sounds/Weapons/Mace/Impacts/Mace_T1_Impact_03.ogg",
"Sounds/Weapons/Mace/Impacts/Mace_T1_Impact_04.ogg",
"Sounds/Weapons/Mace/Impacts/Mace_T1_Impact_05.ogg"
],
"Volume": 6.0,
"RandomSettings": {
"MinVolume": -1,
"MinPitch": -2,
"MaxPitch": 2
},
"StartDelay": 0
}
],
"Volume": 0,
"PreventSoundInterruption": true,
"AudioCategory": "AudioCat_Mace",
"Parent": "SFX_Attn_Moderate"
}

Combine multiple sounds for complex effects:

Example multi-layer sound
{
"Layers": [
{
"Files": ["Sounds/Weapons/Sword/Swing_Base.ogg"],
"Volume": 0
},
{
"Files": ["Sounds/Weapons/Sword/Swing_Whoosh.ogg"],
"Volume": -3,
"StartDelay": 0.05
}
],
"Parent": "SFX_Attn_Moderate"
}

Looping is set per-layer, not at the top level:

SFX_Candle_Loop.json
{
"Layers": [
{
"Files": ["Sounds/Ambient/Fire_Loop.ogg"],
"Looping": true
}
],
"Volume": -4,
"Parent": "SFX_Attn_Moderate"
}

Located in SFX/Player/:

CategoryExamples
Health/Hurt, Death, Fall damage
Movement/Jump, Swim, Footsteps
Action/Pickup, Drop, Grab

Located in SFX/Weapons/:

WeaponSound Types
Sword/Swing, Impact, Block
Mace/Swing, Impact, Charged
Bow/Draw, Release, Impact
Battleaxe/Swing, Impact
Staff/Cast, Impact

Located in BlockSounds/:

CategoryExamples
Bush/Hit, Break, MoveIn
Tall_Grass/MoveIn
LeavesGround/Walk, Land, Break

Located in Environments/:

CategoryExamples
Ambiences/Zone ambient loops
Weather/Rain, Thunder, Wind

Sound events can specify an AudioCategory for volume control:

CategoryDescription
AudioCat_MusicBackground music
AudioCat_AmbienceEnvironmental sounds
AudioCat_WeaponsWeapon sounds
AudioCat_MaceMace-specific sounds
AudioCat_NPCNPC vocalizations
AudioCat_UIInterface sounds
{
"BlockType": {
"BlockSoundSetId": "Stone",
"AmbientSoundEventId": "SFX_Candle_Default_Loop",
"InteractionSoundEventId": "SFX_Door_Open"
}
}
{
"AnimationSets": {
"Walk": {
"Animations": [{
"Animation": "...",
"SoundEventId": "SFX_Fox_Run"
}]
}
}
}
{
"InteractionVars": {
"Swing_Damage": {
"DamageEffects": {
"WorldSoundEventId": "SFX_Sword_Impact"
}
}
}
}
MyPlugin_CustomSound.json
{
"Layers": [
{
"Files": [
"MyPlugin/Sounds/Effect_01.ogg",
"MyPlugin/Sounds/Effect_02.ogg",
"MyPlugin/Sounds/Effect_03.ogg"
],
"Volume": 0,
"RandomSettings": {
"MinPitch": -1,
"MaxPitch": 1,
"MinVolume": -2
}
}
],
"Volume": 0,
"MaxInstance": 5,
"PreventSoundInterruption": false,
"AudioCategory": "AudioCat_Weapons",
"Parent": "SFX_Attn_Moderate"
}
  1. Use Parent templates - Inherit from attenuation templates for consistent spatial audio
  2. Provide variants - Multiple files in Files array prevent repetitive sounds
  3. Add pitch randomization - Small pitch variations (+/- 2 semitones) add naturalness
  4. Set appropriate MaxInstance - Prevent audio clutter from overlapping sounds
  5. Use AudioCategories - Allow players to adjust volume by category