Login

russian armor

Adding custom sound fx with SCAR ?

16 Mar 2016, 00:39 AM
#1
avatar of adtbm

Posts: 10

After some unsuccessfull attempts to add my own sound fx to CoH 2...
(extracted the SGA Sound archives, converted a .wav -> smf/bsc, edited the bsc and trying to repack the archive .... All failed...)

(would be a bad idea anyway, since everybody who wants to have the mod, would need the whole Sound Archive, which is actually quite a couple of MB...)

So my latest attempt was trying to use the SCAR file to add the sound.

I have seen that the command Sound_Play2D is still available.

But all my attampts to get it working just fail

Does anybody has an idea, IF or HOW it could work ?

I have tried to use an tut-script from BuckyBoy but it is not working. (It was for CoH not CoH2)

My idea was, to create the custom folders (\sound\wav & \sound\music) and place my custom soundfile (smf/bsc) into it.

Did anybody tried this allready or has an idea what could be wrong ?
g_streamed_sounds = {}

function Rule_Play_Streamed_Sound()
local sound_info = g_streamed_sounds[1]
Sound_PreCacheSound(sound_info.sound)
Sound_Play2D(sound_info.sound)
table.remove(g_streamed_sounds, 1)
TimeRule_RemoveMe()
if (#g_streamed_sounds > 0) then
Rule_AddOneShot(Rule_Play_Streamed_Sound, sound_info.time)
end
end

local function Play_Streamed_Sound(sound, time)
local sound_info = {
sound = sound,
time = time
}
table.insert(g_streamed_sounds, sound_info)
if (not TimeRule_Exists(Rule_Play_Streamed_Sound)) then
Rule_AddOneShot(Rule_Play_Streamed_Sound, 0)
end

function Test()
Play_Streamed_Sound("SOUNDS.ChurchBell01", 10)
--Play_Streamed_Sound("mysound2", 25)
end


Thanks alot !
16 Mar 2016, 14:02 PM
#2
avatar of eliw00d
Honorary Member Badge

Posts: 756 | Subs: 8

Since there is no way to put sounds in an .sga, these functions will only work for sounds that are already in the game.
16 Mar 2016, 16:41 PM
#3
avatar of adtbm

Posts: 10

Hi eliw00d,

thanks for your answer ! Yes, i have encountered the problem with the .sga archives allready during my tests.

What i was wondering about, was, with the path description in the Sound_play2d function, if it could be possible to generate this path manually and place the smf/bsc files there...

How would it work i.e. with an allready existing sound, in the .SGA archive, to call from the Sound_play function ?

Is CoH2 extracting the sga archives at start and generates those folders, or how does the function
gets access to the soundfiles inside the archive ?

Could be, that my way of thinking is complete nonsense, but i really try to figure out how this command works.

Maybe if somebody is having an working example ?
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

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