Some Sound Questions

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Some Sound Questions

Post by thelegend »

Hey all,
it's me again. I still have some questions about the sound system in bf2.

My first question is simple. I want to change the lightsaber sounds to swing sounds like real metal sabers. I know how to add custom sounds but my problem is I couldn't find the odf which may read all swing sounds. I looked for all saber .odf's but didn't find any .odf's which read the light-swing sounds.

My other question is how to make Voices for custom characters. I found some useful quotes from characters I made for this game. But I heard they read completly different sound files.

My last and final question is how to add streams to sound regions. I know how to add default streams like Kamino's rain but I don't know if they read some special sound files.

I know there is definitely someone who knows the solutions. :P
Anyway I were very thankful,
thanks in advance.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Some Sound Questions

Post by Anakin »

thelegend wrote:Hey all,
it's me again. I still have some questions about the sound system in bf2.

My first question is simple. I want to change the lightsaber sounds to swing sounds like real metal sabers. I know how to add custom sounds but my problem is I couldn't find the odf which may read all swing sounds. I looked for all saber .odf's but didn't find any .odf's which read the light-swing sounds.
The sounds are called in the combo file. Have a look at it.

My other question is how to make Voices for custom characters. I found some useful quotes from characters I made for this game. But I heard they read completly different sound files.
not sure what you mean

My last and final question is how to add streams to sound regions. I know how to add default streams like Kamino's rain but I don't know if they read some special sound files.
Sorry i'm not a mapper

I know there is definitely someone who knows the solutions. :P
Anyway I were very thankful,
thanks in advance.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Some Sound Questions

Post by thelegend »

1. Thank you. I will take a look at these.
2. Forgot to ask: How to add voices to characters? Which files do they read in my Sounds folder.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Some Sound Questions

Post by Anakin »

You can add some in the unit's odf

here are just some examples:
LowHealthSound = "snd_rc_vo_low_health"
PreparingForDamageSound = "snd_rc_vo_grenade"
FleeSound = "snd_rc_ruckzug"

HurtSound = "rc_chatter_Pain"

But be carfull with these if you set up your sound files wrong (frequency of the streams) you hear one sound over the other. So you should have an "empty" sound that is loaded from time to time, so that not everytime the AI get fire, the fleesound is played.
There is somewhere an complete list of all odf commands. there are some more sounds. The only one that worked for me (from the above) were Hurt and flee
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Some Sound Questions

Post by Marth8880 »

thelegend wrote:My other question is how to make Voices for custom characters. I found some useful quotes from characters I made for this game. But I heard they read completly different sound files.
All battle chatter sounds for HurtSound and DeathSound should be set up as sound effects, and all voice chatter sounds for all others should use the VOSound ODF parameter and they should be set up as sound streams.

In-depth doc regarding VOSound: http://secretsociety.com/forum/download ... 0Hooks.txt
thelegend wrote:My last and final question is how to add streams to sound regions. I know how to add default streams like Kamino's rain but I don't know if they read some special sound files.
If you mean that you want to add custom sound streams for use in ambient sound stream regions, just copy one of the stock SoundStreamProperty() bits from a stock map .snd file and change it and use it for your own.

Make sure to take a look at the sound readme: http://secretsociety.com/forum/download ... readme.txt
Anakin wrote:So you should have an "empty" sound that is loaded from time to time, so that not everytime the AI get fire, the fleesound is played.
The *right* way to do this is to use the PlayProbability() parameter in your SoundProperty() or SoundStreamProperty(). :p Refer to the sound readme for more information regarding all .snd file parameters.



Ugh, we BADLY need specific tutorials on how to do these things. Most of the current ones on this forum are mostly outdated and contain inaccurate/confusing information; Mav's is probably the most accurate, but it's not so much a tutorial but rather an overview of certain things. Screw it, I'll probably just write them when I get home tonight. :0
Hidden/Spoiler:
My Level Design 1 instructor loved my map today! :D
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Some Sound Questions

Post by Anakin »

Marth8880 wrote:
thelegend wrote:My other question is how to make Voices for custom characters. I found some useful quotes from characters I made for this game. But I heard they read completly different sound files.
All battle chatter sounds for HurtSound and DeathSound should be set up as sound effects, and all voice chatter sounds for all others should use the VOSound ODF parameter and they should be set up as sound streams.

In-depth doc regarding VOSound: http://secretsociety.com/forum/download ... 0Hooks.txt
That explains why some of my streams doesn't work. :D
Marth8880 wrote:
Ugh, we BADLY need specific tutorials on how to do these things. Most of the current ones on this forum are mostly outdated and contain inaccurate/confusing information; Mav's is probably the most accurate, but it's not so much a tutorial but rather an overview of certain things. Screw it, I'll probably just write them when I get home tonight. :0
Hidden/Spoiler:
My Level Design 1 instructor loved my map today! :D
It would be great to have such an tutorial
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Some Sound Questions

Post by thelegend »

Thanks Marth for the links. I will take a look on that.

At the moment I have a problem with sound effects. I found the swing sound names in my combo files but in game it's not working. I use always the exact same name as the .wav file.
I can't find the reason why it's not working.

.req file:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"str"
"align=2048"
"efxcw_music"
}
REQN
{
"lvl"
"efxcw"
}

}[/code]
cw .req file:
Hidden/Spoiler:
[code]ucft
{
REQN
{
"bnk"
"efx"
"align=2048"
}

REQN
{
"config"
"efxcw_sounds"
"efxcw_music_config"
"efxcw_music"
}
}[/code]
.snd file
Hidden/Spoiler:
[code]SoundProperties()
{
Name("swing1");
Group("weapons");
Inherit("weapon_template");
MinDistance(15.0);
MuteDistance(30.0);
MaxDistance(30.0);
SampleList()
{
Sample("swing1", 1.0);
}
}[/code]
.asfx file
Hidden/Spoiler:
[code]Effects\swing1.wav -resample xbox 22050 pc 22050[/code]
In my lua I added the line which reads the sound lvl. Also the music lvl (both are the same files).

If I munge the file with my custom sound effect the sound .lvl is a little bit larger so I guess all sound files are right.
Here is my combo file. Ingame you couldn't heare any swing sounds:
Hidden/Spoiler:
[code]OffhandAnimation("stand_useforce", "FIRE")
{
Loop("FinalFrame");
AimType("Torso");
BlendInTime(0.15);
BlendOutTime(0.15);
}
OffhandAnimation("stand_useforce", "FIRE2");
OffhandAnimation("stand_useforce", "CHARGE");

Animation("stand_attack1a_end");
Animation("stand_attack1b");
Animation("stand_attack1a_upper")
{
AimType("None");
BlendInTime(0.0);
BlendOutTime(0.15);
BlendTimeTo("stand_attack1a_end", 0.0);
BlendTimeTo("stand_attack1b", 0.0);
}
Animation("stand_attack1a_lower")
{
BlendInTime(0.15);
BlendOutTime(0.15);
BlendTimeTo("stand_attack1a_end", 0.0);
BlendTimeTo("stand_attack1b", 0.0);
}
ThrowAnimation("stand_throw");

State("CATCH_SABRE")
{
Posture("Stand");
// Sound("saber_catch");
Animation("stand_catch")
{
AimType("None");
BlendOutTime(0.2);
}

InputLock("All", "!Thrust");
AlignedToThrust();
}

State("IDLE")
{
Duration(0.0); // infinite duration
EnergyRestoreRate(); // (0.0, "FromSoldier")
InputLock(0.15, "Sprint", "Jump", "Crouch");

Transition("DEFLECT")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Energy(">=", 2.5); // at least half a second worth of deflect time
Button("FireSecondary", "Press");
}
}
Transition("BACK_ATTACK")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Button("Fire", "Press");
Thrust(">", 0.25);
ThrustAngle(135, 225);
}
}
Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Stand", "Crouch");
Button("Fire", "Press");
}
}
Transition("DASHATTACK")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Sprint");
Button("Fire", "Press");
}
}
Transition("JUMPATTACK_FALL")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Jump", "Jet");
//The following should be true during a jetjump, jump, or fall
// unless we're more than 0.35 seconds from the apex
//NOTE: This may not allow luke to jump attack during longer falls
// or falling from a force jump when it could.
//VelocityY(">", -6.3);
Button("Fire", "Press");
}
}
}

State("DEFLECT")
{
Posture("Stand");
Sound("imp_weap_lightsabre_block");
Animation("stand_block_idle")
{
Loop();
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
LowResPose(0, "Frames");
}

Duration(0.0); // infinite duration, looping anim

InputLock(0.0, "All", "!Thrust"); // lock all but move controller for duration of state
EnergyRestoreRate(-10.0); // drain energy while ready to deflect
Deflect()
{
DeflectAngle(-110, 110); // deflect anything from forward arc
EnergyCost(0.0);

DeflectAnimation("stand_block_front1", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_front2", "Forward")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_left1", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_left2", "Left")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_right1", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
DeflectAnimation("stand_block_right2", "Right")
{
// AimType("Torso");
BlendInTime(0.00);
BlendOutTime(0.05);
LowResPose(5, "Frames");
}
}

Transition("ATTACK1")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Fire", "Press");
}
}
Transition("DEFLECT_ROLL") // same as the code checking for rolling
{
EnergyCost(25.0);
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Crouch", "Press");
Thrust(">", 0.9);
ThrustAngle(-120, 120);
}
}
Transition("DEFLECT_CROUCH")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Crouch", "Press");
}
}
Transition("DEFLECT_JUMP")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Jump", "Press");
}
}
Transition("DEFLECT_SPRINT")
{
If()
{
Break(); // all transitions are breaking if Duration is 0
Button("Sprint", "Down");
}
}
Transition("IDLE")
{
If()
{
Break();
Energy("<=", 0.0); // if no energy left
}
Or()
{
Break(); // all transitions are breaking if Duration is 0
Posture("Sprint");
}
Or()
{
Break(20, "Frames"); // all transitions are breaking if Duration is 0
Button("FireSecondary", "Press");
}
Or()
{
Break(); // all transitions are breaking if Duration is 0
Button("Reload", "Press");
}
}
}

State("DEFLECT_JUMP")
{
Posture("Jump");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_CROUCH")
{
Posture("Crouch");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_ROLL")
{
Posture("Roll");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("DEFLECT_SPRINT")
{
Posture("Sprint");

MustShowOneFrame();

Transition("IDLE")
{
If()
{
Break(1, "Frames");
}
}
}

State("BACK_ATTACK")
{
Posture("Stand");
Animation("stand_attack_backwards")
{
BlendInTime(0.15);
BlendOutTime(0.3);
}

Sound("swing1");

InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(4, 9, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(400);
Push(6.0);
}

Attack()
{
DamageTime(13, 20, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(400);
Push(6.0);
}

Transition("IDLE");
}

//Forward declare animations to allow BlendTimeTo references:
Animation("stand_attack1b_end");
Animation("stand_attack1c");

State("ATTACK1")
{
Posture("Stand");
Animation("stand_attack1a");
Sound("swing1");

InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(2, 8, "Frames");
DamageLength(1.5);
DamageWidth(.75);
Damage(300);
Push(3.0);
}

Transition("ATTACK2")
{
If()
{
Break(10, "Frames");
TimeStart(5, "Frames");
TimeEnd(16, "Frames"); //, "SyncIfOvertime");
Posture("Stand");
Button("Fire", "Press");
}
}
Transition("RECOVER1");
}

State("RECOVER1")
{
Posture("Stand");
Animation("stand_attack1a_end")
{
// SyncType("attack1b", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
}

InputLock("All", "!Thrust");
AlignedToThrust();

Transition("IDLE");
}

State("ATTACK2")
{
Posture("Stand");
Animation("stand_attack1b")
{
// SyncType("attack1b", "ByTime");
AimType("None");
BlendInTime(0.06);
BlendOutTime(0.15);
BlendTimeTo("stand_attack1b_end", 0.0);
BlendTimeTo("stand_attack1c", 0.0);
}
Sound("swing1");

InputLock("All", "!Thrust");
AlignedToThrust();
Attack()
{
DamageTime(3, 8, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(300);
Push(3.0);
}

Transition("ATTACK3")
{
If()
{
Break(10, "Frames");
TimeStart(6, "Frames");
TimeEnd(16, "Frames"); //, "SyncIfOvertime");
Posture("Stand");
Button("Fire", "Press");
}
}
Transition("RECOVER2");
}

State("RECOVER2")
{
Posture("Stand");
Animation("stand_attack1b_end")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.15);
}

InputLock("All", "!Thrust");
AlignedToThrust();

Transition("IDLE");
}

State("ATTACK3")
{
Posture("Stand");
Animation("stand_attack1c")
{
// SyncType("attack1c", "ByTime");
AimType("None");
BlendInTime(0.06);
BlendOutTime(0.15);
}
Sound("swing1");

//set a duration so we will go to state RECOVER3 before the animation ends
Duration(30, "Frames");
// AnimatedMove() // animation controls velocity for entire state
// {
// VelocityZ(0.0);
// VelocityX(0.0);
// VelocityFromThrust(8.0);
// VelocityFromStrafe(3.0);
// }
AlignedToThrust("Initial");

// StrafeFactor(0.5);
// TurnFactor(0.5);

InputLock("All", "!Thrust"); // lock all controls for duration of state
Attack()
{
DamageTime(6, 23, "Frames");
DamageLength(1.5);
DamageWidth(0.75);
Damage(600);
Push(5.0);
}

Transition("RECOVER3");
}

State("RECOVER3")
{
Posture("Stand");
Animation("stand_attack1c");

InputLock("All", "!Thrust");
AlignedToThrust();

Transition("IDLE");
}

State("DASHATTACK")
{
Posture("Stand");
Animation("stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
}
Sound("swing1");

Deflect()
{
DeflectAngle(-110, 110); // deflect anything from forward arc
EnergyCost(2.0);
}

Duration(25, "Frames");
AnimatedMove()
{
VelocityZ(16.0);
VelocityX(0.0);
VelocityFromThrust(2.0);
VelocityFromStrafe(5.0);
}
TurnFactor(0.6);

InputLock("All", "!Thrust");
Attack()
{
AttacKID("dashattack");
DamageTime(2, 45, "Frames");
DamageLength(1.5);
DamageWidth(.75);
Damage(500);
Push(5.0);
}

// Transition("DASHATTACK2")
// {
// If()
// {
// TimeStart(0.0);
// TimeEnd(0.05, "FromEnd"); //, "SyncIfOvertime");
// Button("Fire", "Press");
// }
// }
Transition("DASHATTACK2");
}

State("DASHATTACK2")
{
Posture("Stand");
Animation("stand_dashattack")
{
AimType("FullBody");
BlendInTime(0.10);
BlendOutTime(0.25);
}
Sound("saber_double");

AnimatedMove()
{
VelocityZ(0.0);
VelocityX(0.0);
VelocityFromThrust(1.0);
VelocityFromStrafe(2.0);
If()
{
Break(40, "Frames");
}
}
TurnFactor(0.6);

InputLock("All", "!Thrust");
Attack()
{
AttacKID("dashattack");
DamageTime(2, 45, "Frames");
DamageLength(1.5);
DamageWidth(.75);
Damage(500);
Push(5.0);
}

Transition("IDLE");
}

// forward declare jumpattack_land, since jumpattack_fall refers to it:
Animation("jumpattack_land");

State("JUMPATTACK_FALL")
{
Posture("Jump");
Animation("jumpattack_fall")
{
Loop("FinalFrame");
AimType("None");
BlendInTime(0.15);
BlendOutTime(0.80);
// BlendTimeTo("jumpattack_land", 0.15);
}
Sound("saber_swing", 3, "Frames");

Gravity(2.0);
GravityVelocityTarget(-20.0); // accelerate us to 20m/s down at 2 g's
AnimatedMove();
InputLock("All", "!Thrust"); // lock all buttons for duration of state

Attack()
{
AttackId("JUMPATTACK");
DamageTime(0.33, 1.0, "FromAnim");
DamageLength(1.75);
DamageWidth(1.25);
Damage(800);
Push(4.0);
}

Transition("JUMPATTACK_LAND")
{
If()
{
Break();
Posture("Stand");
}
}
Transition("IDLE")
{
If()
{
Break();
Posture("Any", "!Stand", "!Jump", "!Jet");
}
}
Transition("JUMPATTACK_END")
}

State("JUMPATTACK_END")
{
Posture("Jump");
Animation("jumpattack_end")
{
AimType("None");
SyncType("jumpattack_land", "ByTime");
BlendInTime(0.15);
BlendOutTime(0.80);
// BlendTimeTo("jumpattack_land", 0.15);
}

Gravity(2.0);
GravityVelocityTarget(-20.0); // accelerate us to 20m/s down at 2 g's
Duration(15, "Frames");
AnimatedMove();
InputLock("All", "!Thrust"); // lock all buttons for duration of state

Attack()
{
AttackId("JUMPATTACK");
DamageTime(0, 6, "Frames");
DamageLength(1.75);
DamageWidth(1.25);
Damage(800);
Push(4.0);
}

Transition("JUMPATTACK_LAND")
{
If()
{
Break();
Posture("Stand");
}
}
Transition("IDLE")
{
If()
{
Break();
Posture("Any", "!Stand", "!Jump", "!Jet");
}
}
Transition("IDLE");
}

State("JUMPATTACK_LAND")
{
Posture("Stand");

Animation("jumpattack_land")
{
AimType("FullBody");
SyncType("jumpattack_land", "ByTime");
BlendInTime(0.00);
BlendOutTime(0.20);
}

AnimatedMove();
InputLock("All");

Attack()
{
AttackId("JUMPATTACK");
DamageTime(0, 6, "Frames");
DamageLength(1.75);
DamageWidth(.75);
Damage(800);
Push(4.0);
}

Transition("IDLE")
{
If()
{
Break(0.4);
ButtonsPressed("Any");
}
Or()
{
Break(0.4);
Thrust(">", 0.54);
}
}
}[/code]
Note: You may need to press Control+F and look for "swing1" in my combo file.
User avatar
Anakin
Master of the Force
Master of the Force
Posts: 4817
Joined: Sat Sep 19, 2009 11:37 am
Projects :: RC Side Mod - Remastered - SWBF3 Legacy
Location: Mos Espa (germany)

Re: Some Sound Questions

Post by Anakin »

I realy have no idea about snd things. I was glad that my once worked at the end :D

Can you please add code tags the next time?? it makes it much easyer to read you codes.


maybe you can try to remove the min, mute and max distance things. This is working for me
Hidden/Spoiler:
[code]SoundProperties()
{
Name("snd_rc_vibro_attack");
Group("weapons");
Inherit("weapon_template");
SampleList()
{
Sample("wep_GEN_bladeShing_01", 0.5);
Sample("wep_GEN_bladeShing_02", 0.5);
}
}[/code]
An other tipp when playing around with sounds. I never know what was wrong and what not because there were so many files, that i realy had no clear view what may can be wrong. Sometimes it were the soundfiles it selfe. So if you have any working custom soundfile, try this for swinging, to suspend that the file itselfe is broken.
thelegend
Sith
Sith
Posts: 1433
Joined: Thu Jan 23, 2014 6:01 am
Projects :: Star Wars - Battlefront III Legacy
Games I'm Playing :: Swbf GTA CoD LoL KH
xbox live or psn: El_Fabricio#
Location: Right behind you :)

Re: Some Sound Questions

Post by thelegend »

At the moment I don`t have accessable working sound files. And then I removed the mute, distance sound things it still didn't work.
Post Reply