Jump to content

Adding sound options


Recommended Posts

the SoundOn, SoundLoop and SoundOff are only 1 into sab files, by default, but i am sure is possible to add others with and ediiting of code realted to .SAB file.  but you need to add a new command for reply this functions (like SoundOn2, SoundOn3 etc.) and make a q_irand variable for the correct sound playing. 

 

for the sounds of hitting func_breakable objects, or enemies, or the lock and parries, it not need necessary code hacking.

you can set custom efx for a saber \ blade with the bladeeffect, hitothereffect, hitpersoneffect, blockeffect commands into the sab file.

instead of use sab file command for the sounds of this events, you can simply add sounds variable to the effects.

you can set multiple sounds for an effect, and they will play randomly by the engine.

 

example by my mod.

 

 

reaver1
{
    name        "Dark Reaver"
    saberType    SABER_SINGLE
    saberModel    "models/weapons2/reaver1/reaver1.glm"
    saberColor    Purple
    g2MarksShader    "gfx/damage/darkmark"
    soundOn        "sound/weapons/Dark_Reaver/darkreaver1.mp3"
    soundOff    "sound/weapons/Dark_Reaver/darkreaver3.mp3"
    saberLength    44
    throwable    0
    saberradius    20
    disarmable    0
    forceRestrict    FP_LIGHTNING
    forceRestrict    FP_SEE
    saberstylelearned    fast
    saberstylelearned    medium
    saberstylelearned    strong
    saberstyleforbidden    desann
    saberstyleforbidden    tavion
    saberstyleforbidden    staff
    spinsound    "sound/weapons/Dark_Reaver/DarkReaver3.mp3"
    swingsound1    "sound/weapons/Dark_Reaver/DarkReaver1.mp3"
    swingsound2    "sound/weapons/Dark_Reaver/DarkReaver2.mp3"
    swingsound3    "sound/weapons/Dark_Reaver/DarkReaver3.mp3"

    blockEffect    "reavers/darkblock.efx"
    hitPersonEffect "reavers/darkimpactbody.efx"
    hitOtherEffect    "reavers/darkimpact.efx"
    BladeEffect    "reavers/darkblade.efx"
    damagescale    1.3
    trailstyle    1
    noclashflare    1
    nowallmarks    1
    lockbonus    4
    parrybonus    7
    disarmbonus    8
    drawAnim    BOTH_CCWCIRCLEBREAK
    readyAnim    BOTH_SABERSTAFF_STANCE
    putawayAnim    BOTH_CCWCIRCLEBREAK
    kataMove    LS_A2_SPECIAL
    lungeAtkMove     LS_ROLL_STAB
    jumpAtkFwdMove  LS_SPINATTACK
    noidleeffect    1
    oninwater    1
}

 

the "darkimpactbody.efx" effect can play also ten differenct sounds for this effect if is necessary. :)

 

inside an EFX file the code of a random sound it's this: you can create it manually editing with notepad the EFX file, or using EffectEd utility.

 

 

Sound
{
   sounds
    [
        sound/weapons/Dark_Reaver/darkreaverhit1.mp3
        sound/weapons/Dark_Reaver/darkreaverhit2.mp3
        sound/weapons/Dark_Reaver/darkreaverhit3.mp3
    ]
}
 

as you can see i added only 3 hit sound, but is possible to make something like that:

 

 

Sound
{
   sounds
    [
        sound/weapons/Dark_Reaver/darkreaverhit1.mp3
        sound/weapons/Dark_Reaver/darkreaverhit2.mp3
        sound/weapons/Dark_Reaver/darkreaverhit3.mp3
        sound/weapons/Dark_Reaver/darkreaverhit4.mp3
        sound/weapons/Dark_Reaver/darkreaverhit5.mp3
        sound/weapons/Dark_Reaver/darkreaverhit6.mp3
        sound/weapons/Dark_Reaver/darkreaverhit7.mp3
        sound/weapons/Dark_Reaver/darkreaverhit8.mp3
        sound/weapons/Dark_Reaver/darkreaverhit9.mp3
 sound/weapons/Dark_Reaver/darkreaverhit10.mp3
        sound/weapons/Dark_Reaver/darkreaverhit11.mp3
        sound/weapons/Dark_Reaver/darkreaverhit12.mp3
    ]
}
Link to comment

I took a look at the file you sent me in PM, and the issue is actually not related to your animsounds.cfg, it's actually because your sound file is not the correct format (it's 22050hz, not 44100 hz). Try using just a dummy file from the assets, like Jaden saying "Take that!" and see if you can get it to work there, and then try converting your sound file to the correct format using Audacity.

Link to comment

I took a look at the file you sent me in PM, and the issue is actually not related to your animsounds.cfg, it's actually because your sound file is not the correct format (it's 22050hz, not 44100 hz). Try using just a dummy file from the assets, like Jaden saying "Take that!" and see if you can get it to work there, and then try converting your sound file to the correct format using Audacity.

I tried converting the sound but it still isn't going off. I suppose I can try with a Jaden sound but I don't think thats the issue.

Link to comment
  • 1 month later...

I've been back at this trying to make a character speak when they fire their weapon. Here's the line I have currently in my animsounds.cfg

 

BOTH_ATTACK2 1 sound/chars/hansolo/misc/taunt%d.wav 1 3 0

 

Just won't work though

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...