Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Detrmining whether to play Jaden male or female sounds

Page: 1 of 1
 Teancum
12-05-2003, 6:17 AM
#1
I've been looking through the icarus scripts and have noticed that all of the cutscene scripts and have noticed that every one of Jaden's lines is drawn from /jaden_male. What I'm wondering is how the game determines how to use the female sounds, and thus if there's a way to use the new voice packs so each race has a unique sound.

Oh ya, I know about the sex m/f cvar
 razorace
12-05-2003, 6:43 PM
#2
I know it's possible, I've seen a mod for that exact thing on lucasfiles.com.
 Teancum
12-05-2003, 8:26 PM
#3
Ya, that's the one I'm talking about. It replaces male or female. It doesn't add new ones.
 razorace
12-06-2003, 9:15 AM
#4
It doesn't? Well, that sucks.
 Teancum
12-06-2003, 11:11 AM
#5
Well, the sounds work in MP. Pain sounds work, all that stuff. I tried working with the sex m/f variable and that seems to be what changes the voice overs in SP. I'm going to try to set custom genders in sounds.cfg and see if that works. Just for fun I tried sex r (for rodian) and had no voice over. Now I'm changing the sounds.cfg to see if that helps. *edit* no luck. Looks like to get custom voice overs to work in SP we'll have to add new cvars for each race. Is it possible to have more than once character for a value in a cvar? For instance, 'kdm' for Kel Dor male or just 'k'?

I also pulled this from the source of cg_players.c -- I don't know if this helps at all or not. I can't find anything in the icarus scripts. It's obviously a cvar thing, but I thought this might help:

*edit* looks like the part bolded is searching for whether the player is female -- maybe this will give us some leads


#define DEFAULT_FEMALE_SOUNDPATH "chars/mp_generic_female/misc"//"chars/tavion/misc"
#define DEFAULT_MALE_SOUNDPATH "chars/mp_generic_male/misc"//"chars/kyle/misc"
void CG_LoadCISounds(clientInfo_t *ci, qboolean modelloaded)
{
fileHandle_t f;
qboolean isFemale = qfalse;
int i = 0;
int fLen = 0;
const char *dir;
char soundpath[MAX_QPATH];
char soundName[1024];
const char *s;

dir = ci->modelName;

if ( !ci->skinName || !Q_stricmp( "default", ci->skinName ) )
{//try default sounds.cfg first
fLen = trap_FS_FOpenFile(va("models/players/%s/sounds.cfg", dir), &f, FS_READ);
if ( !f )
{//no? Look for _default sounds.cfg
fLen = trap_FS_FOpenFile(va("models/players/%s/sounds_default.cfg", dir), &f, FS_READ);
}
}
else
{//use the .skin associated with this skin
fLen = trap_FS_FOpenFile(va("models/players/%s/sounds_%s.cfg", dir, ci->skinName), &f, FS_READ);
if ( !f )
{//fall back to default sounds
fLen = trap_FS_FOpenFile(va("models/players/%s/sounds.cfg", dir), &f, FS_READ);
}
}

soundpath[0] = 0;

if (f)
{
trap_FS_Read(soundpath, fLen, f);
soundpath[fLen] = 0;

i = fLen;

while (i >= 0 && soundpath[i] != '\n')
{
if (soundpath[i] == 'f')
{
isFemale = qtrue;
soundpath[i] = 0;
}

i--;
}

i = 0;

while (soundpath[i] && soundpath[i] != '\r' && soundpath[i] != '\n')
{
i++;
}
soundpath[i] = 0;

trap_FS_FCloseFile(f);
}

if (isFemale)
{
ci->gender = GENDER_FEMALE;
}
else
{
ci->gender = GENDER_MALE;
}

trap_S_ShutUp(qtrue);

for ( i = 0 ; i < MAX_CUSTOM_SOUNDS ; i++ )
{
s = cg_customSoundNames[i];
if ( !s ) {
break;
}

Com_sprintf(soundName, sizeof(soundName), "%s", s+1);
COM_StripExtension(soundName, soundName);
//strip the extension because we might want .mp3's

ci->sounds[i] = 0;
// if the model didn't load use the sounds of the default model
if (soundpath[0])
{
ci->sounds[i] = trap_S_RegisterSound( va("sound/chars/%s/misc/%s", soundpath, soundName) );
}
else
{
if (modelloaded)
{
ci->sounds[i] = trap_S_RegisterSound( va("sound/chars/%s/misc/%s", dir, soundName) );
}
}

if (!ci->sounds[i])
{ //failed the load, try one out of the generic path
if (isFemale)
{
ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", DEFAULT_FEMALE_SOUNDPATH, soundName) );
}
else
{
ci->sounds[i] = trap_S_RegisterSound( va("sound/%s/%s", DEFAULT_MALE_SOUNDPATH, soundName) );
}
}
}
 razorace
12-06-2003, 6:13 PM
#6
unfortunately, it's very unlikely that we will ever get the SP source code. I'm afraid you're probably stuck with it the way it is.
 Azrael666
01-29-2004, 1:25 PM
#7
Where would it draw the play sex from anyway? Sex is recorded in .npc files, but the player jedi doesnt have one.
 razorace
02-01-2004, 9:40 AM
#8
It's also listed in the sound.cfgs that come with the human player models. I assume that's where it's listed for SP's purposes.
 WhiteShdw
02-01-2004, 1:49 PM
#9
Originally posted by Azrael666
Where would it draw the play sex from anyway? Sex is recorded in .npc files, but the player jedi doesnt have one.

the player does have an npc file for the cutscenes, named player, which has CLASS_PLAYER set as a NPC class.

whenever you spawn this you'll get a npc that has no default AI(BS_cinematic perhaps?)and looks exactly like the player character you chose when you started up the game. It could be that you're character settings(among them the sex of the character) are saved somewhere and read by the CLASS_PLAYER npc class. Then the npc would have sex set in the npc file.
Page: 1 of 1