View Full Version : Sound
Guest
04-27-2003, 06:21 PM
How can i add my own sounds to a mod? for instance if i want a character to say a line in a cutscene how would i do it? anyhelp would be appreciated
Akari
04-27-2003, 07:28 PM
[Message] Frame = 1; String = "this->A_Play3DSound (weapons, somuch, head );";
you can do this in Max Ed or just the mod.
to add a new sound goto the sounds folder in the database folder. Put your sound in the weapons folder. Then open weapons.txt (I add new sounds here cause its the easiest to type( then in the thing copy this: </font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">[somuch] // melee hit sound
{
[Properties] ID = ID_WEAPON;
[Default]
{
[Sound]
Filename = weapons\somuch.wav;
Volume = ID_WEAPON_VOLUME;
Pitch = 44050;
Random = 20%;
Looping = NO;
Streamed = NO;
3DSound = YES;
Hotspot = 7;
FallOff = 7;
Priority = ID_WEAPON_PRIORITY;
ItemsToCache = 1;
FrequencyScaling = FALSE;
}
} [/code]</blockquote><font size="2" face="Verdana, Arial">change the name in brackets to whatever you want. Note that this is the name you type when you do the play3dsound thing. Then also change the "Filename = weapons\somuch.wav;
" to whatever your wav file is called. Then right click on your sound file. Find out what the Audio Sample rate is (most of the time its 22 or 44) and put that in the " Pitch = 44050;" You can leave the 50 part. It doesnt matter.
Good Luck
[ 04-27-2003, 07:38 PM: Message edited by: Akari ]
william ford
04-27-2003, 07:49 PM
Originally posted by Akari:
[Message] Frame = 1; String = "this->A_Play3DSound (weapons, somuch, head );";
you can do this in Max Ed or just the mod.
to add a new sound goto the sounds folder in the database folder. Put your sound in the weapons folder. Then open weapons.txt (I add new sounds here cause its the easiest to type( then in the thing copy this: </font><blockquote><font size="1" face="Verdana, Arial">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">[somuch] // melee hit sound
{
[Properties] ID = ID_WEAPON;
[Default]
{
[Sound]
Filename = weapons\somuch.wav;
Volume = ID_WEAPON_VOLUME;
Pitch = 44050;
Random = 20%;
Looping = NO;
Streamed = NO;
3DSound = YES;
Hotspot = 7;
FallOff = 7;
Priority = ID_WEAPON_PRIORITY;
ItemsToCache = 1;
FrequencyScaling = FALSE;
}
} [/code]</blockquote><font size="2" face="Verdana, Arial">change the name in brackets to whatever you want. Note that this is the name you type when you do the play3dsound thing. Then also change the "Filename = weapons\somuch.wav;
" to whatever your wav file is called. Then right click on your sound file. Find out what the Audio Sample rate is (most of the time its 22 or 44) and put that in the " Pitch = 44050;" You can leave the 50 part. It doesnt matter.
Good Luck <font size="2" face="Verdana, Arial">Ok you only really need to know a small part of that. Just the part he has in the code is about all you need(for adding your own sound). And the line for max-ed(which i presume your using as it's a cutscene) is just
this->A_Play3DSound (location, soundname, head );
To find the location and sound name you have to extract the data.ras file(or one of them) and look at the sound text files. Come to think of it there might not be a location try these.
this->a_play3dsound(merc,merc_alert_01,head);
this->a_play3dsound(merc_alert_01,head);
this->a_play3dsound(enemy, merc_alert_01,head);
Otherwise i forget images/icons/rolleyes.gif
EDIT: Akiri's is actually pretty far off come to think of it, as you want an enemy sound not a WEAPON! Although it probably still would work.
[ 04-27-2003, 08:02 PM: Message edited by: william ford ]
Akari
04-27-2003, 08:05 PM
Like I said it is easyiest to do and yes it still works. The weapon folder doesnt HAVE to be just weapons.
Guest
04-27-2003, 08:25 PM
thanks for the help
Maddieman
04-28-2003, 03:11 AM
If you put it in the weapons folder then make sure you save it in mono format -- otherwise you'll get this ripping sound occuring randomly in your mod -- Matrixed Reality has this bug, for example.
step2ice
12-15-2006, 08:42 PM
Sorry to dig this up but I have a problem regarding the ID_WEAPON_VOLUME.
The thing is that I want to increase the volume for all the weapons in the game about 40-50%.
Now I just could raise everything to 0.8 or something.
But every weapon refers to that ID_WEAPON_VOLUME. Does anyone know where that factor value is located?
example:
}
[Shoot_SawedShotgun]
{
[Properties] ID = ID_WEAPON;
[Default]
{
[Sound]
Filename = weapons\Shoot_SawedShotgun.wav;
Volume = ID_WEAPON_VOLUME;
Pitch = 44100;
Random = 5%;
Looping = NO;
Streamed = NO;
3DSound = YES;
Hotspot = ID_WEAPON_HOTSPOT;
FallOff = ID_WEAPON_FALLOFF;
Priority = ID_WEAPON_PRIORITY;
ItemsToCache = 1;
FrequencyScaling = TRUE;
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.