Login

russian armor

[Guide] Using Sound_Action

22 Oct 2021, 10:05 AM
#1
avatar of Sie_Sayoka
Modmaker Badge

Posts: 100 | Subs: 1

Sound_action will allow you to play sounds directly from the sound archive. This means we can finally have speech from different races among other things. It's not a perfect solution as there's some caveats.

You can see how sound_action is natively used on some DLC units. For example attributes\abilities\aef\modal_ability\sp\sp_240mm_off_map_barrage. This ability will use sound_action to play the offmap artillery firing. To understand the paths and codes we need to open two archives:

Data.sga
data\game\speechtuning.lua

Open with notepad. This will tell you what the 3 letter codes are for.


Sound.sga

These are the paths that sound_action uses. They are .bsc files which I believe is a Visual Studio file although we can open and view them partially with notepad. The files referenced are located in soundhigh.sga/soundlow.sga? but we don't really have to dig that deep. I think they are just variations of sound types.




So as an example we will make any unit produce the Soviet engineer 203 ability sound. Let's break down what the file path means.

speech\mp\soviet\eng\orderconfirmations\ability\sb_eng_abt_203gen_lt_s

sb: The speechtuning.lua file refers to it as "Soviet Building" but I think this may be for a race indicator. For example US, Brit, and Sov all have "eng" units but this code is different for each race. OST/OKW share xb for some reason.
eng: Combat Engineers. 3 letter code for the unit. Refer to speechtuning.lua
abt: Ability. Type of action.
203: Name of the ability or action.
gen: General. There are specific variations for some speech codes. Take a look at speech\mp\german\gre\orderconfirmations\ability\ to see the Panzerfaust codes for different vehicle types.
lt: Loud/normal talking? Don't know what the abbreviation is but lt is yelling, nt is talking.
s: Size? l/m/s are in this field.


As mentioned before there are some issues and limitations with using this. You will not be able to get a perfect system for imitating speech.
  • Sound origin is centered in the middle of the map. But maybe it's because I put the action on a unit. Offmap artillery will sound the same no matter where the screen is on the map, speech will have radio sounds if off screen.
  • Sounds will only play for the executing player.
  • Some sounds don't work. I tried to get thunder sounds but nothing happened.
  • Because these are played through actions and not through native systems it may be difficult to detect when to play sounds for certain actions.


Sound_action can of course be used for many other things other than speech. Hopefully you can find good uses for them.
4 Nov 2021, 12:51 PM
#2
avatar of Starbuck

Posts: 42

Keep in mind that if playing pvp, these sound_actions cannot be heard by the enemy player.
1 user is browsing this thread: 1 guest

Ladders Top 10

  • #
    Steam Alias
    W
    L
    %
    Streak
Data provided by Relic Relic Entertainment

Replay highlight

VS
  • U.S. Forces flag cblanco ★
  • The British Forces flag 보드카 중대
  • Oberkommando West flag VonManteuffel
  • Ostheer flag Heartless Jäger
uploaded by XXxxHeartlessxxXX

Board Info

954 users are online: 954 guests
0 post in the last 24h
8 posts in the last week
34 posts in the last month
Registered members: 49106
Welcome our newest member, nohuvin
Most online: 2043 users on 29 Oct 2023, 01:04 AM