Multiple sounds from same weapon? [Solved]

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
DrDrSheldonLeeCooper
Chief Warrant Officer
Chief Warrant Officer
Posts: 353
Joined: Sat Apr 26, 2014 1:50 pm
Projects :: Times before Empire
Games I'm Playing :: SWBF2-BF-Skyrim
xbox live or psn: No gamertag set
Location: Coruscant City [Germany]

Multiple sounds from same weapon? [Solved]

Post by DrDrSheldonLeeCooper »

Maybe you know the mod "rise of the empire" if you are playing the clones you can hear that the rifles have sometimes different sounds.

How can I make that the rifles has different sounds after every shot?
Hope you can understand me,my english isn´t the best.

Thx :)
Last edited by DrDrSheldonLeeCooper on Wed Dec 10, 2014 5:18 pm, edited 1 time in total.
AQT
Gametoast Staff
Gametoast Staff
Posts: 4910
Joined: Sat Nov 03, 2007 4:55 pm
Location: SoCal, USA

Re: Changing sounds

Post by AQT »

DrDrSheldonLeeCooper wrote:my english isn´t the best.

Thx :)
You should probably type out "thanks," then. :wink:

To answer your question, simply add more samples to your SampleList. For instance, if you want your weapon to make three different possible fire sounds:

Code: Select all

    SampleList()
    {
        Sample("customweaponsound1", 0.33);
        Sample("customweaponsound2", 0.33);
        Sample("customweaponsound3", 0.33);
    }
Notice that the 0.33 is the result of dividing 1 by 3 because there are three different possible fire sounds.
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: Changing sounds

Post by Marth8880 »

AQT wrote:Notice that the 0.33 is the result of dividing 1 by 3 because there are three different possible fire sounds.
You actually don't have to make it so all of the deviations of the samples in a sample list equate to 1.0. They function exactly the same as AI goal weight. :o

For example, this would also be perfectly acceptable:

Code: Select all

    SampleList()
    {
        Sample("customweaponsound1", 1.0);
        Sample("customweaponsound2", 1.0);
        Sample("customweaponsound3", 1.0);
    }
DrDrSheldonLeeCooper
Chief Warrant Officer
Chief Warrant Officer
Posts: 353
Joined: Sat Apr 26, 2014 1:50 pm
Projects :: Times before Empire
Games I'm Playing :: SWBF2-BF-Skyrim
xbox live or psn: No gamertag set
Location: Coruscant City [Germany]

Re: Changing sounds

Post by DrDrSheldonLeeCooper »

Code: Select all

    SampleList()
    {
        Sample("customweaponsound1", 1.0);
        Sample("customweaponsound2", 1.0);
        Sample("customweaponsound3", 1.0);
    }
Where do I have to put this?

thank you two :)
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: Changing sounds

Post by Anakin »

How GT works:
Hidden/Spoiler:
0. You ask something.
1. GT'll give you this link: FAQ Thread
=> http://www.gametoast.com/viewtopic.php?f=27&t=9541
=> http://www.gametoast.com/viewtopic.php?f=27&t=6166
=> http://www.gametoast.com/viewtopic.php? ... &sk=t&sd=a
=> ...

2. You tell them you already read them
3. GT'll tell you to read them again
4. You did so, but still have questions, so you ask again
5. You'll find help here :D
So i hope you are not at stage 2. otherwise i'd continue with 3 ;)
DrDrSheldonLeeCooper
Chief Warrant Officer
Chief Warrant Officer
Posts: 353
Joined: Sat Apr 26, 2014 1:50 pm
Projects :: Times before Empire
Games I'm Playing :: SWBF2-BF-Skyrim
xbox live or psn: No gamertag set
Location: Coruscant City [Germany]

Re: Changing sounds

Post by DrDrSheldonLeeCooper »

I can´t find something :/
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: Changing sounds

Post by Anakin »

:funny2: We are at stage 3.
http://www.gametoast.com/viewtopic.php?f=27&t=6166
PR-0927 wrote: 10. Get a .snd file. Copy one from other sound folders and rename to whatever you would like. Mine is called swrcweapons.snd. In it (I will not teach you how to put stuff in it), mine says this for that above .wav:

Code: Select all

SoundProperties()
{
    Name("rifledc17");
    Group("weapons");
    Inherit("weapon_template");
    SampleList()
    {
        Sample("dc17_rifle", 1.0);
    }
}
The SampleList is a bit smaller but that's how it's working ;)
DrDrSheldonLeeCooper
Chief Warrant Officer
Chief Warrant Officer
Posts: 353
Joined: Sat Apr 26, 2014 1:50 pm
Projects :: Times before Empire
Games I'm Playing :: SWBF2-BF-Skyrim
xbox live or psn: No gamertag set
Location: Coruscant City [Germany]

Re: Changing sounds

Post by DrDrSheldonLeeCooper »

I know how to add custom sounds,but i have to know how I can that a rifle have sometimes different sound.
For example.

I´m firing two shoots and they have a sound called "fire1"
Now I´m shooting again but now the rifle has a firing sound called "fire2"

I´m bad in explaining.

Maybe you can watch a "Rise of the Empire"-mod on YouTube,there you can hear that the guns sometimes has different sound.
:)
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: Changing sounds

Post by Marth8880 »

Here's what your sound property should look like if you have three samples for the sound property.

Code: Select all

SoundProperties()
{
    Name("rifledc17");
    Group("weapons");
    Inherit("weapon_template");
    SampleList()
    {
        Sample("dc17_rifle1", 1.0);
        Sample("dc17_rifle2", 1.0);
        Sample("dc17_rifle3", 1.0);
    }
}
This should get you the exact result you desire.
DrDrSheldonLeeCooper
Chief Warrant Officer
Chief Warrant Officer
Posts: 353
Joined: Sat Apr 26, 2014 1:50 pm
Projects :: Times before Empire
Games I'm Playing :: SWBF2-BF-Skyrim
xbox live or psn: No gamertag set
Location: Coruscant City [Germany]

Re: Changing sounds

Post by DrDrSheldonLeeCooper »

EDIT :

It works! Thanks @all :)
Post Reply