lfnetwork.com mark read register faq members calendar

Thread: Detrmining whether to play Jaden male or female sounds
Thread Tools Display Modes
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Old 12-05-2003, 06:17 AM   #1
Teancum
 
Teancum's Avatar
 
Join Date: Apr 2003
Posts: 187
Detrmining whether to play Jaden male or female sounds

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
Teancum is offline   you may: quote & reply,
Old 12-05-2003, 06:43 PM   #2
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
I know it's possible, I've seen a mod for that exact thing on lucasfiles.com.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 12-05-2003, 08:26 PM   #3
Teancum
 
Teancum's Avatar
 
Join Date: Apr 2003
Posts: 187
Ya, that's the one I'm talking about. It replaces male or female. It doesn't add new ones.
Teancum is offline   you may: quote & reply,
Old 12-06-2003, 09:15 AM   #4
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
It doesn't? Well, that sucks.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 12-06-2003, 11:11 AM   #5
Teancum
 
Teancum's Avatar
 
Join Date: Apr 2003
Posts: 187
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

Code:
#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) );
			}
		}
	}

Last edited by Teancum; 12-06-2003 at 11:27 AM.
Teancum is offline   you may: quote & reply,
Old 12-06-2003, 06:13 PM   #6
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 01-29-2004, 01:25 PM   #7
Azrael666
Rookie
 
Join Date: Sep 2003
Posts: 57
Where would it draw the play sex from anyway? Sex is recorded in .npc files, but the player jedi doesnt have one.
Azrael666 is offline   you may: quote & reply,
Old 02-01-2004, 09:40 AM   #8
razorace
Impressive, Terran!
 
razorace's Avatar
 
Join Date: May 2002
Posts: 9,172
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.


---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder
razorace is offline   you may: quote & reply,
Old 02-01-2004, 01:49 PM   #9
WhiteShdw
 
WhiteShdw's Avatar
 
Join Date: Mar 2002
Location: Holland
Posts: 404
Hot Topic Starter 
Quote:
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.


"Call me c0cky, but if there's a alien out there I can't kill, I haven't met him and killed him yet".
WhiteShdw is offline   you may: quote & reply,
Post a new thread. Add a reply to this thread. Indicate all threads in this forum as read. Subscribe to this forum. RSS feed: this forum RSS feed: all forums
Go Back   LucasForums > Network > JediKnight Series > Editing Central > JA Coding > Detrmining whether to play Jaden male or female sounds

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:14 AM.

LFNetwork, LLC ©2002-2011 - All rights reserved.
Powered by vBulletin®
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.