diff --git a/CHANGELOG.md b/CHANGELOG.md index 89d4b586e8..013f41e89d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - New level of detail feature, letting you see all the world's terrain at any view distance. - Point and directional lights now cast realistic shadows, using shadow mapping. - Added leaf and chimney particles +- Some more combat sound effects ### Changed diff --git a/assets/voxygen/audio/sfx.ron b/assets/voxygen/audio/sfx.ron index e81459a2df..ff697a90b4 100644 --- a/assets/voxygen/audio/sfx.ron +++ b/assets/voxygen/audio/sfx.ron @@ -1,5 +1,8 @@ ( { + // + // Character States + // Run: ( files: [ "voxygen.audio.sfx.footsteps.stepgrass_1", @@ -11,18 +14,74 @@ ], threshold: 0.25, ), + ExperienceGained: ( + files: [ + // "voxygen.audio.sfx.character.experience_gained_1", + // "voxygen.audio.sfx.character.experience_gained_2", + // "voxygen.audio.sfx.character.experience_gained_3", + ], + threshold: 0.5, + ), + LevelUp:( + files: [ + "voxygen.audio.sfx.character.level_up_sound_-_shorter_wind_up", + ], + threshold: 0.5, + ), + Jump: ( + files: [ + // Event not implemented? + ], + threshold: 0.25, + ), + Fall: ( + files: [ + // Event not implemented? + ], + threshold: 0.25, + ), + Roll: ( + files: [ + "voxygen.audio.sfx.character.dive_roll_1", + "voxygen.audio.sfx.character.dive_roll_2", + ], + threshold: 0.25, + ), + Climb: ( + files: [ + // TODO: sync with animation + //"voxygen.audio.sfx.footsteps.stepgrass_1", + //"voxygen.audio.sfx.footsteps.stepgrass_2", + //"voxygen.audio.sfx.footsteps.stepgrass_3", + //"voxygen.audio.sfx.footsteps.stepgrass_4", + //"voxygen.audio.sfx.footsteps.stepgrass_5", + //"voxygen.audio.sfx.footsteps.stepgrass_6", + ], + threshold: 0.25, + ), GliderOpen: ( files: [ "voxygen.audio.sfx.glider_open", ], threshold: 0.5, ), + Glide: ( + files: [ + // Event Missing or not implemented? + ], + threshold: 0.5, + ), GliderClose: ( files: [ + // Event Missing or not implemented? "voxygen.audio.sfx.glider_close", ], threshold: 0.5, ), + + // + // Sword + // Wield(Sword): ( files: [ "voxygen.audio.sfx.weapon.sword_out", @@ -35,24 +94,250 @@ ], threshold: 0.5, ), - Inventory(Collected): ( - files: [ - "voxygen.audio.sfx.inventory.add_item", - ], - threshold: 0.3, - ), - Inventory(CollectedTool(Sword)): ( - files: [ - "voxygen.audio.sfx.inventory.pickup_sword", - ], - threshold: 0.3, - ), - Inventory(CollectedTool(Staff)): ( - files: [ - "voxygen.audio.sfx.inventory.pickup_staff", - ], - threshold: 0.3, - ), + Attack(TripleStrike(First), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.swing_sword", + ], + threshold: 0.7, + ), + Attack(TripleStrike(Second), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.separated_second_swing", + ], + threshold: 0.7, + ), + Attack(TripleStrike(Third), Sword): ( + files: [ + "voxygen.audio.sfx.abilities.separated_third_swing", + ], + threshold: 0.7, + ), + Attack(DashMelee, Sword): ( + files: [ + "voxygen.audio.sfx.abilities.sword_dash", + ], + threshold: 0.8, + ), + Inventory(CollectedTool(Sword)): ( + files: [ + "voxygen.audio.sfx.inventory.pickup_sword", + ], + threshold: 0.3, + ), + + // + // Hammer + // + Wield(Hammer): ( + files: [ + "voxygen.audio.sfx.weapon.sword_out", + ], + threshold: 0.5, + ), + Unwield(Hammer): ( + files: [ + "voxygen.audio.sfx.weapon.sword_in", + ], + threshold: 0.5, + ), + Attack(BasicMelee, Hammer): ( + files: [ + "voxygen.audio.sfx.abilities.swing", + ], + threshold: 0.7, + ), + Attack(LeapMelee, Hammer): ( + files: [ + // + ], + threshold: 0.8, + ), + Inventory(CollectedTool(Hammer)): ( + files: [ + "voxygen.audio.sfx.inventory.pickup_sword", + ], + threshold: 0.3, + ), + + // + // Axe + // + Wield(Axe): ( + files: [ + "voxygen.audio.sfx.weapon.sword_out", + ], + threshold: 0.5, + ), + Unwield(Axe): ( + files: [ + "voxygen.audio.sfx.weapon.sword_in", + ], + threshold: 0.5, + ), + Attack(TripleStrike(First), Axe): ( + files: [ + "voxygen.audio.sfx.abilities.swing", + ], + threshold: 0.7, + ), + Attack(TripleStrike(Second), Axe): ( + files: [ + "voxygen.audio.sfx.abilities.swing", + ], + threshold: 0.7, + ), + Attack(TripleStrike(Third), Axe): ( + files: [ + "voxygen.audio.sfx.abilities.swing", + ], + threshold: 0.7, + ), + Attack(SpinMelee, Axe): ( + files: [ + "voxygen.audio.sfx.abilities.swing", + ], + threshold: 0.8, + ), + Inventory(CollectedTool(Axe)): ( + files: [ + "voxygen.audio.sfx.inventory.pickup_sword", + ], + threshold: 0.3, + ), + + // + // Fire Rod / Regeneration Staff + // + Wield(Staff): ( + files: [ + "voxygen.audio.sfx.weapon.staff_out", + ], + threshold: 0.5, + ), + Unwield(Staff): ( + files: [ + "voxygen.audio.sfx.weapon.staff_in", + ], + threshold: 0.5, + ), + Attack(BasicMelee, Staff): ( + files: [ + "voxygen.audio.sfx.abilities.swing", + ], + threshold: 0.8, + ), + Attack(BasicRanged, Staff): ( + files: [ + // "voxygen.audio.sfx.abilities.staff_channeling", + ], + threshold: 0.8, + ), + Inventory(CollectedTool(Staff)): ( + files: [ + "voxygen.audio.sfx.inventory.pickup_staff", + ], + threshold: 0.3, + ), + + // + // Bow + // + Wield(Bow): ( + files: [ + "voxygen.audio.sfx.weapon.sword_out", + ], + threshold: 0.5, + ), + Unwield(Bow): ( + files: [ + "voxygen.audio.sfx.weapon.sword_in", + ], + threshold: 0.5, + ), + Attack(BasicRanged, Bow): ( + files: [ + // channeling sound. + ], + threshold: 0.8, + ), + Inventory(CollectedTool(Bow)): ( + files: [ + "voxygen.audio.sfx.inventory.add_item", + ], + threshold: 0.3, + ), + + // + // Dagger + // + Wield(Dagger): ( + files: [ + "voxygen.audio.sfx.weapon.dagger_out", + ], + threshold: 0.5, + ), + Unwield(Dagger): ( + files: [ + "voxygen.audio.sfx.weapon.dagger_in", + ], + threshold: 0.5, + ), + Attack(BasicMelee, Dagger): ( + files: [ + "voxygen.audio.sfx.abilities.swing_sword", + ], + threshold: 0.8, + ), + Attack(DashMelee, Dagger): ( + files: [ + "voxygen.audio.sfx.abilities.sword_dash", + ], + threshold: 0.8, + ), + Inventory(CollectedTool(Dagger)): ( + files: [ + "voxygen.audio.sfx.inventory.pickup_sword", + ], + threshold: 0.3, + ), + + // + // Shield + // + Wield(Shield): ( + files: [ + "voxygen.audio.sfx.weapon.shield_out", + ], + threshold: 0.5, + ), + Unwield(Shield): ( + files: [ + "voxygen.audio.sfx.weapon.sword_in", + ], + threshold: 0.5, + ), + Attack(BasicMelee, Shield): ( + files: [ + "voxygen.audio.sfx.abilities.swing", + ], + threshold: 0.8, + ), + Inventory(CollectedTool(Shield)): ( + files: [ + "voxygen.audio.sfx.inventory.pickup_sword", + ], + threshold: 0.3, + ), + + // + // Inventory + // + Inventory(Collected): ( + files: [ + "voxygen.audio.sfx.inventory.add_item", + ], + threshold: 0.3, + ), Inventory(CollectFailed): ( files: [ "voxygen.audio.sfx.inventory.add_failed", @@ -77,6 +362,10 @@ ], threshold: 0.3, ), + + // + // Consumables + // Inventory(Consumed("Potion")): ( files: [ "voxygen.audio.sfx.inventory.consumable.liquid", @@ -109,13 +398,13 @@ ), Explosion: ( files: [ - "voxygen.audio.sfx.explosion", + // in code ], threshold: 0.2, ), ProjectileShot: ( files: [ - "voxygen.audio.sfx.glider_open", + // in code ], threshold: 0.5, ), diff --git a/assets/voxygen/audio/sfx/abilities/arrow_shot_1.wav b/assets/voxygen/audio/sfx/abilities/arrow_shot_1.wav new file mode 100644 index 0000000000..b886694be1 --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/arrow_shot_1.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0693a68985868127a618274010702402dada8cad3e2a055b5ac4413a0a56d3af +size 121082 diff --git a/assets/voxygen/audio/sfx/abilities/arrow_shot_2.wav b/assets/voxygen/audio/sfx/abilities/arrow_shot_2.wav new file mode 100644 index 0000000000..7d2cc0937b --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/arrow_shot_2.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:153e0e75c176ed3652afd0157d9a16efb7ffde9b15cdb1472f111bd268c0bbd1 +size 81290 diff --git a/assets/voxygen/audio/sfx/abilities/arrow_shot_3.wav b/assets/voxygen/audio/sfx/abilities/arrow_shot_3.wav new file mode 100644 index 0000000000..b94c553030 --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/arrow_shot_3.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0a7f51386d05029f1840cf33d5b1ec5314c8db7dae17a4fa479893befb27586c +size 81290 diff --git a/assets/voxygen/audio/sfx/abilities/arrow_shot_4.wav b/assets/voxygen/audio/sfx/abilities/arrow_shot_4.wav new file mode 100644 index 0000000000..6fdeb696f2 --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/arrow_shot_4.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4a07ed4d646ef3b35566dceaef30dba1a71740ad11437c8d2b8443851770e9b2 +size 81290 diff --git a/assets/voxygen/audio/sfx/abilities/fire_shot_1.wav b/assets/voxygen/audio/sfx/abilities/fire_shot_1.wav new file mode 100644 index 0000000000..67312defdb --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/fire_shot_1.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3a2320cac24dca29278c921ffefacd1a65d4bfbd545408035d6dfb806706021 +size 478296 diff --git a/assets/voxygen/audio/sfx/abilities/fire_shot_2.wav b/assets/voxygen/audio/sfx/abilities/fire_shot_2.wav new file mode 100644 index 0000000000..35d1ac36c6 --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/fire_shot_2.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7917950b69e5a31c1fc82604ec2f75e61b45c9171496d1a462add6af8f58004 +size 240050 diff --git a/assets/voxygen/audio/sfx/abilities/separated_second_swing.wav b/assets/voxygen/audio/sfx/abilities/separated_second_swing.wav new file mode 100644 index 0000000000..f0f72f1af7 --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/separated_second_swing.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5df65fe61ad10ca08d1a144dba6bee37e8a612b6cb4327c189a7f7e3ec2068a1 +size 102854 diff --git a/assets/voxygen/audio/sfx/abilities/separated_third_swing.wav b/assets/voxygen/audio/sfx/abilities/separated_third_swing.wav new file mode 100644 index 0000000000..842a4f5f36 --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/separated_third_swing.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:130d3295cb53434a7e9012e904f5a1aa1df2b08184e4124a04e5ff783114b41e +size 88454 diff --git a/assets/voxygen/audio/sfx/abilities/staff_channeling.wav b/assets/voxygen/audio/sfx/abilities/staff_channeling.wav new file mode 100644 index 0000000000..3cf52abb56 --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/staff_channeling.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7029cf7dccedbf6593c135964c45b9aacaa9d5bd11af577695b73851ce2efbd1 +size 636950 diff --git a/assets/voxygen/audio/sfx/abilities/swing.wav b/assets/voxygen/audio/sfx/abilities/swing.wav new file mode 100644 index 0000000000..f4bddbcf83 --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/swing.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9184db868eb6d9b8ef8f4f2393bb9131daa675d4630733017995af8d67160952 +size 250454 diff --git a/assets/voxygen/audio/sfx/abilities/swing_sword.wav b/assets/voxygen/audio/sfx/abilities/swing_sword.wav new file mode 100644 index 0000000000..4582e5a58f --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/swing_sword.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:efef3b8e2e0a17b71f2fd71141393ac725e27b2ba49569a360216c866f6bbd23 +size 185654 diff --git a/assets/voxygen/audio/sfx/abilities/sword_dash.wav b/assets/voxygen/audio/sfx/abilities/sword_dash.wav new file mode 100644 index 0000000000..42ad15390f --- /dev/null +++ b/assets/voxygen/audio/sfx/abilities/sword_dash.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cd7da1ab25641c848f15e32edcd557da6391779ce21c1a51f2581206529b4e16 +size 279740 diff --git a/assets/voxygen/audio/sfx/character/dive_roll_1.wav b/assets/voxygen/audio/sfx/character/dive_roll_1.wav new file mode 100644 index 0000000000..b3c61e2276 --- /dev/null +++ b/assets/voxygen/audio/sfx/character/dive_roll_1.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d9804c75d4aa7c689a34f91a2f84ffdfa4b7619b275ca8562d8dee7eb0a251cf +size 240050 diff --git a/assets/voxygen/audio/sfx/character/dive_roll_2.wav b/assets/voxygen/audio/sfx/character/dive_roll_2.wav new file mode 100644 index 0000000000..190d19b4f3 --- /dev/null +++ b/assets/voxygen/audio/sfx/character/dive_roll_2.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:365a188a89ea79d788075bf3aa84278cb4880445d73f9c74a37976f0e4398dab +size 319430 diff --git a/assets/voxygen/audio/sfx/character/experience_gained_1.wav b/assets/voxygen/audio/sfx/character/experience_gained_1.wav new file mode 100644 index 0000000000..c2d70b8e8a --- /dev/null +++ b/assets/voxygen/audio/sfx/character/experience_gained_1.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfc7335bf55ecafffc44729315559996c14e5a2896603ec74421a6bf0a87c370 +size 237984 diff --git a/assets/voxygen/audio/sfx/character/experience_gained_2.wav b/assets/voxygen/audio/sfx/character/experience_gained_2.wav new file mode 100644 index 0000000000..cab9fc124c --- /dev/null +++ b/assets/voxygen/audio/sfx/character/experience_gained_2.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95059cfcb3f595ea44c0f69bb27b1a7bbb60c6f37f895055346a6215f187f886 +size 237984 diff --git a/assets/voxygen/audio/sfx/character/experience_gained_3.wav b/assets/voxygen/audio/sfx/character/experience_gained_3.wav new file mode 100644 index 0000000000..44c7c01af2 --- /dev/null +++ b/assets/voxygen/audio/sfx/character/experience_gained_3.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19744afa5d9643c6962499591b79bf19a88f39e3a09c7cc20d7d3553532e9c5e +size 237984 diff --git a/assets/voxygen/audio/sfx/character/level_up_sound_-_shorter_wind_up.wav b/assets/voxygen/audio/sfx/character/level_up_sound_-_shorter_wind_up.wav new file mode 100644 index 0000000000..f8c2e41d0e --- /dev/null +++ b/assets/voxygen/audio/sfx/character/level_up_sound_-_shorter_wind_up.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80f99964748efd5b7cf74f99310db1b303f42a891d4e44307920675a5c312fd3 +size 2542280 diff --git a/assets/voxygen/audio/sfx/footsteps/snow_step_1.wav b/assets/voxygen/audio/sfx/footsteps/snow_step_1.wav new file mode 100644 index 0000000000..15f1da1ff9 --- /dev/null +++ b/assets/voxygen/audio/sfx/footsteps/snow_step_1.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:14b5b2d7867a04886b235902e6655c362a6d7e26d9a7f3ab6935433c3c3a3577 +size 174854 diff --git a/assets/voxygen/audio/sfx/footsteps/snow_step_2.wav b/assets/voxygen/audio/sfx/footsteps/snow_step_2.wav new file mode 100644 index 0000000000..1e79239998 --- /dev/null +++ b/assets/voxygen/audio/sfx/footsteps/snow_step_2.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7009a1825d54f68df2c68e1bd1186793de52574d53817f60550558f8ae27ce55 +size 174854 diff --git a/assets/voxygen/audio/sfx/footsteps/snow_step_3.wav b/assets/voxygen/audio/sfx/footsteps/snow_step_3.wav new file mode 100644 index 0000000000..1778435063 --- /dev/null +++ b/assets/voxygen/audio/sfx/footsteps/snow_step_3.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f3bf83db6c9d68423ee36f6c3f8e07caf37a40292b05ad730f6e6a964dcea021 +size 131654 diff --git a/assets/voxygen/audio/sfx/footsteps/water_splash_1.wav b/assets/voxygen/audio/sfx/footsteps/water_splash_1.wav new file mode 100644 index 0000000000..2cb522a9a3 --- /dev/null +++ b/assets/voxygen/audio/sfx/footsteps/water_splash_1.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4908be3241c984445d84643abaefaf1c388435bda15ef77f0302347024377f09 +size 319548 diff --git a/assets/voxygen/audio/sfx/footsteps/water_splash_2.wav b/assets/voxygen/audio/sfx/footsteps/water_splash_2.wav new file mode 100644 index 0000000000..3d583cfe44 --- /dev/null +++ b/assets/voxygen/audio/sfx/footsteps/water_splash_2.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:21a794b36ca1a023f1b5175c81df21e71f46cdcbd68cd3d4faeec730c5103ed0 +size 398810 diff --git a/assets/voxygen/audio/sfx/footsteps/water_splash_3.wav b/assets/voxygen/audio/sfx/footsteps/water_splash_3.wav new file mode 100644 index 0000000000..052db7451b --- /dev/null +++ b/assets/voxygen/audio/sfx/footsteps/water_splash_3.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b82e87e42b2e2b6a24d7284a1d763d6cde9dee3733b0b9aeba5c5bc41b78639 +size 240050 diff --git a/assets/voxygen/audio/sfx/footsteps/water_splash_4.wav b/assets/voxygen/audio/sfx/footsteps/water_splash_4.wav new file mode 100644 index 0000000000..1220d4eef2 --- /dev/null +++ b/assets/voxygen/audio/sfx/footsteps/water_splash_4.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:832bcacae4a5b0bec39fc46af3ab5d3cb565ee0518a4e1fe63276e4f77bc1524 +size 241700 diff --git a/assets/voxygen/audio/sfx/weapon/dagger_in.wav b/assets/voxygen/audio/sfx/weapon/dagger_in.wav new file mode 100644 index 0000000000..88c033bae3 --- /dev/null +++ b/assets/voxygen/audio/sfx/weapon/dagger_in.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88c8d33a9960c654114e4d13c23c4b960e12e3682975984a4f703c88fcbf3451 +size 66308 diff --git a/assets/voxygen/audio/sfx/weapon/dagger_out.wav b/assets/voxygen/audio/sfx/weapon/dagger_out.wav new file mode 100644 index 0000000000..047767d882 --- /dev/null +++ b/assets/voxygen/audio/sfx/weapon/dagger_out.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0562232bf0d3609d940a7a1a12e8810a5fad579c831fcb56565d0f5d3b2fb5b7 +size 119500 diff --git a/assets/voxygen/audio/sfx/weapon/shield_out.wav b/assets/voxygen/audio/sfx/weapon/shield_out.wav new file mode 100644 index 0000000000..444ba66ae4 --- /dev/null +++ b/assets/voxygen/audio/sfx/weapon/shield_out.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:51d6a77b09a27c156eaf1d084375b818559995e802751d54e7f9c432408adc40 +size 314864 diff --git a/assets/voxygen/audio/sfx/weapon/staff_in.wav b/assets/voxygen/audio/sfx/weapon/staff_in.wav new file mode 100644 index 0000000000..c8817741dc --- /dev/null +++ b/assets/voxygen/audio/sfx/weapon/staff_in.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:52e1555f097b77860e3fb2803f0d0a91182ed85cfc2cb45bc1e4a83e909c8adb +size 1392710 diff --git a/assets/voxygen/audio/sfx/weapon/staff_out.wav b/assets/voxygen/audio/sfx/weapon/staff_out.wav new file mode 100644 index 0000000000..b27af02a3b --- /dev/null +++ b/assets/voxygen/audio/sfx/weapon/staff_out.wav @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3c6a092616bb80ba2b927de35d90d1bd2bd99110fb96fc84dae433276118d139 +size 636950 diff --git a/voxygen/src/audio/sfx/mod.rs b/voxygen/src/audio/sfx/mod.rs index 7439e24e72..0996912c16 100644 --- a/voxygen/src/audio/sfx/mod.rs +++ b/voxygen/src/audio/sfx/mod.rs @@ -89,7 +89,7 @@ use common::{ assets, comp::{ item::{ItemKind, ToolCategory}, - CharacterAbilityType, InventoryUpdateEvent, + object, Body, CharacterAbilityType, InventoryUpdateEvent, }, event::EventBus, outcome::Outcome, @@ -97,10 +97,11 @@ use common::{ }; use event_mapper::SfxEventMapper; use hashbrown::HashMap; +use rand::prelude::*; use serde::Deserialize; use specs::WorldExt; use std::convert::TryFrom; -use tracing::warn; +use tracing::{debug, warn}; use vek::*; /// We watch the states of nearby entities in order to emit SFX at their @@ -254,6 +255,10 @@ impl SfxMgr { if let Some(item) = self.triggers.get_trigger(&event.sfx) { let sfx_file = match item.files.len() { + 0 => { + debug!("Sfx event {:?} is missing audio file.", event.sfx); + "voxygen.audio.sfx.placeholder" + }, 1 => item .files .last() @@ -265,6 +270,8 @@ impl SfxMgr { }; audio.play_sfx(sfx_file, position, event.vol); + } else { + debug!("Missing sfx trigger config for sfx event. {:?}", event.sfx); } } } @@ -277,19 +284,39 @@ impl SfxMgr { match outcome { Outcome::Explosion { pos, power, .. } => { audio.play_sfx( - // TODO: from sfx triggers config + // TODO: from sfx config? "voxygen.audio.sfx.explosion", *pos, Some((*power / 2.5).min(1.5)), ); }, - Outcome::ProjectileShot { pos, .. } => { - audio.play_sfx( - // TODO: from sfx triggers config - "voxygen.audio.sfx.glider_open", - *pos, - None, - ); + Outcome::ProjectileShot { pos, body, .. } => { + // TODO: from sfx config? + match body { + Body::Object( + object::Body::Arrow | object::Body::MultiArrow | object::Body::ArrowSnake, + ) => { + let file_ref = vec![ + "voxygen.audio.sfx.abilities.arrow_shot_1", + "voxygen.audio.sfx.abilities.arrow_shot_2", + "voxygen.audio.sfx.abilities.arrow_shot_3", + "voxygen.audio.sfx.abilities.arrow_shot_4", + ][rand::thread_rng().gen_range(1, 4)]; + + audio.play_sfx(file_ref, *pos, None); + }, + Body::Object(object::Body::BoltFire | object::Body::BoltFireBig) => { + let file_ref = vec![ + "voxygen.audio.sfx.abilities.fire_shot_1", + "voxygen.audio.sfx.abilities.fire_shot_2", + ][rand::thread_rng().gen_range(1, 2)]; + + audio.play_sfx(file_ref, *pos, None); + }, + _ => { + // not mapped to sfx file + }, + } }, } }