Jump to content

Adding sound options


Recommended Posts

is it possible for sabers to have multiple saber on/saber off sounds?

 

It could be done? Not sure though.

 

Personally, however I've only seen 1 saberon, saberloop and saberoff per hilt, I've only ever seen additional sounds for swingsound, spinsound, blocksound, hitsound and bouncesound.

MB2 Beta Tester / MB2 FA Assistant Dev

Link to comment
  • 3 weeks later...

It needs a code edit (that's strictly clientside, although if you want to guarantee that all clients will hear the same sound, you need a server edit too). I can explain how I did it though.

Ok, but is it doable in sp aswell?

Link to comment

As I explained, it's a code edit, in C++. Are you comfortable making code edits? I recommend following my tutorial on compiling OpenJK, and taking a peek at my primer for a solid foundation, although you certainly don't have to memorize all of it.

If you're comfortable making these types of edits and have compiled OpenJK for SP successfully, I can proceed.

The first line of the tutorial, I'm on mac. Is there any alternatives here?

Link to comment

@@Seven

The only part of that tutorial that is Windows specific is what choice of IDE you're going to use. Download XCode and configure CMake through cmake-gui to use XCode.

You'll also want to install SDL2 and homebrew, details on this are on the OPENJK repository. Check in the wiki here: http://github.com/Razish/OpenJK

I hopefully will be able to do this, but is it just as complicated to add a character sound to a specific animation? For example, if the player or npc were to say something when they perform a mind trick.

Link to comment

I hopefully will be able to do this, but is it just as complicated to add a character sound to a specific animation? For example, if the player or npc were to say something when they perform a mind trick.

That's actually not all that difficult, there's the ability to do that with the animsounds.cfg, but i'm not sure that all player models possess one of these. I think NeoMarz' Darth Vader has some animsounds.cfg to make the breathing effect.

Link to comment

That's actually not all that difficult, there's the ability to do that with the animsounds.cfg, but i'm not sure that all player models possess one of these. I think NeoMarz' Darth Vader has some animsounds.cfg to make the breathing effect.

Can I just add them to the playermodels?

Link to comment

Probably BOTH_MIND_TRICK or BOTH_MINDTRICK or something. Check in _humanoid/animations.cfg, it lists all of them.

So I went in and added both mindtrick thing with a sound. I tried where on another animation it would say *jump1 for example *trick1, and in game it says unknown custom sound *trick1. So is this where I would need to access the source code?

Link to comment

Yes, the game doesn't recognize *trick as a CS like *jump, *land, etc. But that's ok, you don't need to actually include a new one of these. You can use a direct path to a sound instead (starting from sound, so sound/chars/cultist/misc/jump.wav for instance)

Link to comment

Yes, the game doesn't recognize *trick as a CS like *jump, *land, etc. But that's ok, you don't need to actually include a new one of these. You can use a direct path to a sound instead (starting from sound, so sound/chars/cultist/misc/jump.wav for instance)

So I could do, sound/chars/cultist/misc/trick1.wav?

Link to comment

I added it but its just not working.

This is my animsounds.cfg

 

 

// Place UPPERSOUNDS or LOWERSOUNDS on a block of sounds
// To deviate from this will court disaster the likes of which have never before been 
// seen 
//
// RECORD STRUCTURE :
// Animation enum/name
// Frame into sequence where sound should start
// sound file
// starting number (if there are variations of the name: laser1laser2laser3)
// ending number
// probability sound will play
//
 
 
UPPERSOUNDS 
{
BOTH_GESTURE1 30 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_GESTURE1 41 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_GESTURE1 47 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_GESTURE1 52 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_GESTURE1 56 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_GESTURE1 59 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_GESTURE1 62 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_GESTURE1 65 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_GESTURE1 68 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_GESTURE1 72 sound/weapons/saber/saberspinoff.wav 0 0 0
BOTH_MELEE1    2 sound/weapons/melee/swing%d.wav 1 4 0
BOTH_MELEE2    2 sound/weapons/melee/swing%d.wav 1 4 0
BOTH_RIGHTHANDCHOPPEDOFF 25 sound/chars/obi-wan/misc/death%d.wav 1 3 30
BOTH_RIGHTHANDCHOPPEDOFF 64 sound/chars/obi-wan/misc/death%d.wav 1 3 0
BOTH_RIGHTHANDCHOPPEDOFF 88 sound/chars/obi-wan/misc/death%d.wav 1 3 30
BOTH_RIGHTHANDCHOPPEDOFF 100 sound/chars/obi-wan/misc/death%d.wav 1 3 30
BOTH_RIGHTHANDCHOPPEDOFF 110 sound/player/roll1.wav 0 0 0
BOTH_ATTACK_BACK 3 sound/weapons/saber/saberhup%d.wav 4 6 0
BOTH_ATTACK_BACK 14 sound/weapons/saber/saberhup%d.wav 4 6 0
BOTH_CROUCHATTACKBACK1 8 sound/weapons/saber/saberhup%d.wav 4 6 0
BOTH_CROUCHATTACKBACK1 22 sound/weapons/saber/saberhup%d.wav 4 6 0
BOTH_FORCELEAP2_T__B_ 22 sound/weapons/saber/saberhup%d.wav 7 9 0
BOTH_A2_STABBACK1 12 sound/weapons/saber/saberhup%d.wav 1 3 0
BOTH_A2_STABBACK1 31 sound/weapons/saber/saberhup%d.wav 1 3 0
BOTH_BUTTERFLY_LEFT 9  sound/weapons/saber/saberhup%d.wav 1 3 0
BOTH_BUTTERFLY_LEFT 16  sound/weapons/saber/saberhup%d.wav 4 6 0
BOTH_BUTTERFLY_LEFT 22  sound/weapons/saber/saberhup%d.wav 1 3 0
BOTH_BUTTERFLY_LEFT 29  sound/weapons/saber/saberhup%d.wav 7 9 0
BOTH_BUTTERFLY_RIGHT 9  sound/weapons/saber/saberhup%d.wav 1 3 0
BOTH_BUTTERFLY_RIGHT 16  sound/weapons/saber/saberhup%d.wav 4 6 0
BOTH_BUTTERFLY_RIGHT 22  sound/weapons/saber/saberhup%d.wav 1 3 0
BOTH_BUTTERFLY_RIGHT 29  sound/weapons/saber/saberhup%d.wav 7 9 0
BOTH_FJSS_TL_BR 16 sound/weapons/saber/saberhup%d.wav 4 6 0
BOTH_FJSS_TL_BR 27 sound/weapons/saber/saberhup%d.wav 1 3 0
BOTH_FJSS_TL_BR 54 sound/weapons/saber/saberhup%d.wav 7 9 0
BOTH_FJSS_TR_BL 16 sound/weapons/saber/saberhup%d.wav 4 6 0
BOTH_FJSS_TR_BL 27 sound/weapons/saber/saberhup%d.wav 1 3 0
BOTH_FJSS_TR_BL 54 sound/weapons/saber/saberhup%d.wav 7 9 0
BOTH_MINDTRICK1 2 sound/chars/obi-wan/misc/trick1.wav 7 9 0
}
 
LOWERSOUNDS 
{
//walk1
BOTH_WALK1 6 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALK1 20 sound/player/footsteps/boot%d.wav 1 4 0
//walk2
BOTH_WALK2 5 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALK2 18 sound/player/footsteps/boot%d.wav 1 4 0
//walk7
BOTH_WALK7 5 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALK7 15 sound/player/footsteps/boot%d.wav 1 4 0
//fastwalk (run)
BOTH_RUN1 8 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_RUN1 20 sound/player/footsteps/boot%d.wav 1 4 0
//fastwalk (run)
BOTH_RUN2 8 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_RUN2 20 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_RUNBACK1 3 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_RUNBACK1 8 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_WALKBACK1 3 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALKBACK1 10 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_RUNBACK2 3 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_RUNBACK2 8 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_WALKBACK2 3 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALKBACK2 10 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_WALL_FLIP_LEFT 1 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_FLIP_LEFT 4 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_WALL_FLIP_RIGHT 1 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_FLIP_RIGHT 4 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_WALL_RUN_LEFT 4 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_RUN_LEFT 8 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_RUN_LEFT 12 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_RUN_LEFT 16 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_WALL_RUN_RIGHT 4 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_RUN_RIGHT 8 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_RUN_RIGHT 12 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_RUN_RIGHT 16 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_WALL_FLIP_BACK1 1 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_FLIP_BACK1 2 sound/player/footsteps/boot%d.wav 1 4 0
BOTH_WALL_FLIP_BACK1 5 sound/player/footsteps/boot%d.wav 1 4 0
//
BOTH_DEATH1 13 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH2 13 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH3 15 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH4 19 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH5 19 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH6 14 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH7 13 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH8 17 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH9 21 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH9 40 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH10 26 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH10 52 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH11 19 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH11 40 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH12 14 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH13 33 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH14 24 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH15 15 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH15 43 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH16 25 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH17 56 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH18 68 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH19 68 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH20 33 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH21 34 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH22 6 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH23 6 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH24 15 sound/player/bodyfall_human%d.wav 1 3 0
BOTH_DEATH25 15 sound/player/bodyfall_human%d.wav 1 3 0
}

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...