Jump to content

Home

Handmaiden for a female PC


The Lone Badger

Recommended Posts

On a second thought, if you don't mind the Disciple having the same dialog as in the sublevel when you talk to him in Khoonda, you'll only have to deal with the cutscene and won't have to worry about messing with creature templates.

 

To fix the cutscene, rename the disc_enc.dlg from 602DAN_dlg.erf to 602disc_enc.dlg, put it in the override, and then recompile the script k_enter_601 (in 602DAN_s.rim), changing the name of the dialog to trigger for the cutscene:

 

// ST: k_enter_601.nss (k_enter_601.ncs in 602DAN_s.rim)

#include "k_inc_fab"

void main() {
if (GetLoadFromSaveGame())
	return;

object oEnter = GetEnteringObject();

if (oEnter == GetFirstPC()) {
	object oWP = GetObjectByTag("To_601");

	if (!GetLocalBoolean(oWP, 44) 
		&& GetGlobalNumber("604DAN_Vrook_Status")
		&& !GetGlobalNumber("000_Disciple_Joined")
		&& ((GetGlobalNumber("601DAN_Battle_Mili") == 0) || (GetGlobalNumber("601DAN_Battle_Mili") == 4)))
	{
		SetLocalBoolean(oWP, 44, TRUE);
		FAB_Spawn("p_disciple");

		if (GetGlobalNumber("101PER_Revan_End") == 0) {
			FAB_Spawn("carth_holo");
		}

		AssignCommand(GetObjectByTag("disciple"), ActionStartConversation(GetFirstPC(), "602disc_enc"));
	}

	if (!GetLocalBoolean(oWP, 42) && (GetGlobalNumber("604DAN_Vrook_Status") >= 3)) {
		SetLocalBoolean(oWP, 42, TRUE);

		if (GetGlobalNumber("601DAN_Battle_Mili") == 0) {
			if (GetGlobalNumber("604DAN_Vrook_Status") == 3) {
				CreateObject(OBJECT_TYPE_CREATURE, "npc_vrook", GetLocation(GetWaypointByTag("wp_vrook")));
			}

			object oZherron = GetObjectByTag("npc_zherron");
			if (GetIsObjectValid(oZherron)) {
				AssignCommand(oZherron, ClearAllActions());
				AssignCommand(oZherron, JumpToLocation(GetLocation(GetObjectByTag("wp_zherron_terena"))));
			}
		}
	}

	if (GetGlobalNumber("602DAN_Gerevick") == 3) {
		DestroyObject(GetObjectByTag("npc_gerevick"));
	}

	if ((GetGlobalNumber("601DAN_Battle_Mili") > 0) && !GetLocalBoolean(oWP, 20)) {
		SetLocalBoolean(oWP, 20, TRUE);

		if ((GetJournalEntry("danthief") > 0) && (GetJournalEntry("danthief") < 90)) {
			AddJournalQuestEntry("danthief", 89, FALSE);
		}

		if ((GetJournalEntry("ssensor") > 0) && (GetJournalEntry("ssensor") < 90)) {
			AddJournalQuestEntry("ssensor", 89, FALSE);
		}
	}
}
}

 

I haven't had the time to test if it works yet, but I can't see why it wouldn't...

Link to comment
Share on other sites

  • Replies 244
  • Created
  • Last Reply

Great, I'll give it a try, just not today, I really should be going back to schoolwork :D

 

Edit: Just let me see if I understand this though, if I do this and use just one file for both dialogs disciple will use the same dialog but he will use the second one for the cutscene? I wish this was as easy as editing dialogues from infinity engine, could have done this mod in minutes...

Link to comment
Share on other sites

Sorry about the spamming, but I just checked out the Disciple's sublevel dialog file, disc_enc.dlg (in 610DAN_dlg.erf) and think I found all the places where it checks for a female Exile.

 

You'll have to change those too otherwise the Disciple will kick Handmaiden out of the party and take her place when you speak to him.

 

With a GFF Editor, replace the gender check script "c_isfemale" with a script like this one...

 

//ST: st_nohandmaiden.nss
//ST: Returns TRUE if the Handmaiden has not joined the party.

int StartingConditional()
{
   return !IsAvailableCreature(NPC_HANDMAIDEN);
}

 

... in the Active field for the following nodes in disc_end.dlg:

 

ReplyList --> 19 --> EntriesList --> 0 --> Active

ReplyList --> 25 --> EntriesList --> 0 --> Active

ReplyList --> 34 --> EntriesList --> 0 --> Active

ReplyList --> 47 --> EntriesList --> 0 --> Active

ReplyList --> 50 --> EntriesList --> 0 --> Active

ReplyList --> 51 --> EntriesList --> 0 --> Active

 

This would cause the Disciple to join only if the Handmaiden isn't already in the party.

Link to comment
Share on other sites

Gah, you always post a reply when I'm editing my posts :p I already wrote the script and changed it so it always returns false despite of your gender since I don't think anyone would want him in the party anyway or could have him since handmaiden already joins even if you are a female.

Link to comment
Share on other sites

Great work guys, you have thoroughly confused me. I guess I will have to wait for a mod on this one. I don't think this was the best place for me to start to learn modding TSL, I was going to try this one out but I guess I had brain fart and got lost so I can wait while my eyes begin to un-cross for a mod.:newbie::cheers:

Link to comment
Share on other sites

Reading a script is like reading a book, writing one is of course harder but no harder than writing a book for that matter. So doing it is not so much a complicated science it's more like an art and all you need is to be literate and know what is it you wish to write about. I don't know if this is a place to start, for me it's all just basics, after years of programming these scripts are like reading child books. But anyway, enough with the philosophy and back to the matter at hand, I've been doing some work on disciple's dialogs (and it would be a tad bit easier if there weren't a gazillion attribues) but I think I would be able to create a new dlg file that will work for both encounters (the way it should not with having to go through the same thing on both occasions) given some time of course, I still need to look around a bit.

Link to comment
Share on other sites

Well...The mod that (i am fu**ing sure) will be released shouldn't concentrate on the problems with the disciple. You could write into the readme that you shouldn't talk to disciple.

And I don't care if some dialogs of the handmaiden are a bit confusing. Lesbian love is also something beautiful :D :D

 

Well...There aren't really romances in the game. I would only like to see, that you can talk normally to the handmaiden, not matter if she calls you a man or something. And the Echani-Training with her... woah! :eek:

Link to comment
Share on other sites

Well I've been through most of the conversation with her today and I don't believe she calls you a man anywhere so just consider her a bisexual from now on :D As for the mod itself, I'm just not happy if it's not done the way it should be, but I'd be more than glad to share current versions with anyone who wants the files.

Link to comment
Share on other sites

Originally posted by Keneth

Well I've been through most of the conversation with her today and I don't believe she calls you a man anywhere so just consider her a bisexual from now on :D As for the mod itself, I'm just not happy if it's not done the way it should be, but I'd be more than glad to share current versions with anyone who wants the files.

 

I'd be interested in trying out this mod.

 

However, regarding what a previous poster said about "just don't talk to Disciple" as a workaround. I may have missed some of the tidbits on this thread, but can you actually really avoid talking to him? When you enter the room (which you have to in order to finish the Dantooine Jedi search) that the Disciple is in, isn't there an automatic trigger for his script?

Link to comment
Share on other sites

Originally posted by vustare

I'd be interested in trying out this mod.

 

However, regarding what a previous poster said about "just don't talk to Disciple" as a workaround. I may have missed some of the tidbits on this thread, but can you actually really avoid talking to him? When you enter the room (which you have to in order to finish the Dantooine Jedi search) that the Disciple is in, isn't there an automatic trigger for his script?

 

you can't avoid talking to him without not finding master vrook because the hint of where he is, is in the room with disiple

Link to comment
Share on other sites

Handmaiden will obviously call the Exile of any gender "he" and "him" all the time, no point in changing the text when you can't modify the voiceover anyway. Not too much of a distraction though concidering that the game already calls a female Revan "he" half the time, and calls a female exile "he" quite a few times as well. Even your own party members do it on occasion.

 

You can't avoid talking to the Disciple once, since the first conversation is run by a trigger as soon as you step within the door to the library. However there's no need to avoid talking to him.

 

I prefer keeping the choice in-game as to who I wish to bring along. As such my own modifications allow both Handmaiden and Disciple to work as intended. If you never want to use Disciple again ever then there's no reason to bother with it.

 

I've looked around a bit more and found that his OnDialogue event script is picking which dialog file to use when talking to him. So, to expand on my earlier suggested fix, just edit his script, k_hen_discipdlg.nss in scripts.bif to look something like this, recompile it and put in Override. It assumes, like the script I posted earlier, that the disc_enc.dlg from 602DAN_dlg.erf is copied to Override and renamed 602disc_enc.dlg.

 

//:: k_hen_discipdlg

#include "k_inc_debug"
#include "k_inc_generic"

void SelectAndRunDLG() {

       //prevent FMP 7722 kds
   if ( GetPartyLeader() == OBJECT_SELF )
   {
       BeginConversation();
       return;
   }

   // Old string testing nodes Rich and I were using.
   // AurPostString ( GetModuleName (), 20, 20, 5.0 );
   // AurPostString ( "ModuleName:", 20, 21, 5.0 );

   // JAB-OEI 7/27/04
   // this needs to happen so things don't break when we use debug warp
   if ( GetFirstPC() == OBJECT_SELF )
   {
       BeginConversation("");
       return;
   }
   // If player has done psychotic behavior, call the react script.
   else if( GetGlobalNumber ( "000_Psychotic" ) == 1  ) {
       BeginConversation( "000react" );
       return;
   }
   else if( GetModuleName() == "006EBO" ) {
       BeginConversation( "DiscEnd" );
       return;
   }
   else if(GetGlobalNumber("000_Disciple_Joined") == 0)
   {
   	if (GetModuleName() == "602DAN")
       	BeginConversation( "602disc_enc" );
       else
       	BeginConversation( "disc_enc" );
       return;
   }

   // Add as many else if()'s as you want for selecting
   // various DLGs, but leave the 'else' below as the default
   // case.
   else {

       // This uses the DLG attached in the editor.
       BeginConversation();
   }
}

void main()
{
   int nMatch = GetListenPatternNumber();
   if(!GN_GetSpawnInCondition(SW_FLAG_AI_OFF))
   {
       if(GetCommandable())
       {
           object oShouter = GetLastSpeaker();
           object oIntruder;
           if (nMatch == -1)
           {
               ClearAllActions();
               SelectAndRunDLG();
               // JAB-OEI 6/4/04
               // user defined event needs to be called
               if(GN_GetSpawnInCondition(SW_FLAG_EVENT_ON_DIALOGUE))
               {
                   SignalEvent(OBJECT_SELF, EventUserDefined(1004));
               }
               return;
           }
           else
           {
               GN_RespondToShout(oShouter, nMatch, GetLastHostileActor(oShouter));
           }
       }
   }
   if( nMatch == -1 )
   {
       ResetDialogState();
   }
   if(GN_GetSpawnInCondition(SW_FLAG_EVENT_ON_DIALOGUE))
   {
       SignalEvent(OBJECT_SELF, EventUserDefined(1004));
   }
}

 

Then the correct dialog will trigger both if you speak to him in the Enclave sublevel and in Khoonda. And the script I posted earlier will make sure his cutscene with Admiral Onasi in Khoonda works as it should.

 

EDIT: Seems like the board is word-wrapping the script oddly again. Needs to be corrected before compiling I guess.

Link to comment
Share on other sites

Originally posted by jedigoku

you can't avoid talking to him without not finding master vrook because the hint of where he is, is in the room with disiple

 

I knew that. I just forgot that the conversation starts even without really talking to him (clicking on him).

 

A choice of who you feed on your journey would be awesome.

Link to comment
Share on other sites

Ok so this checks if the module is khoonda and if it is disciple uses the appropriate dialog and with the other script it uses the correct dialog for the cutscene too, which pretty much solves the whole problem, or is there something else? Anyway, you did a great job again stoffe, I'll try to run through the whole game to see how everything works out then I can change the scripts so that you have an option to choose which npc to take with you. There's just one problem though, what to do with handmaiden? At this point she joins you no matter what your gender is, I have no idea what condition I would use to make it optional. I could set a new global variable at some point and check for its value but that would require making or editing a dialog too so that one could chose who to take. That doesn't sound to hard but if anyone has a better idea I'm open for suggestions.

Link to comment
Share on other sites

Originally posted by stoffe -mkb-

So, to expand on my earlier suggested fix, just edit his script, k_hen_discipdlg.nss in scripts.bif to look something like this, recompile it and put in Override.

 

Just FYI, this will make disciple incompatible with my Mind Probe Influence mod which isn't that much of a tragedy, but still. (a lot of people seem to have downloaded that).

Link to comment
Share on other sites

Originally posted by Keneth

Ok so this checks if the module is khoonda and if it is disciple uses the appropriate dialog and with the other script it uses the correct dialog for the cutscene too, which pretty much solves the whole problem, or is there something else?

 

There's just one problem though, what to do with handmaiden? At this point she joins you no matter what your gender is, I have no idea what condition I would use to make it optional. I could set a new global variable at some point and check for its value but that would require making or editing a dialog too so that one could chose who to take. That doesn't sound to hard but if anyone has a better idea I'm open for suggestions.

 

It appears to work now from what I've tested. I haven't had the time to do a full playthough with all the mods in place yet though, so it's mostly been spot checks at times I know the Handmaiden has a role in things. She seems to join fine, Disciple seems to work properly if she's along for the ride already, and the sequence of events after the meeting in the enclave seems to trigger as they should.

 

I do, however, always play as a lightsider so things could be terribly broken for one chosing the dark path for all I know. I don't know how the story and sequence of events differ for a darksider, and I'm not exactly eager to find out firsthand. :)

 

The most user-friendly way to pick who to bring would probably be to add an extra "goodbye" reply when you speak to Handmaiden in the Telos Academy which subtly implies that she should come along without becoming Out-Of-Character.

 

For my current testing, I'm doing it in the holorec.dlg cutscene though, just before she shows up, where the original gender check was. When Kreia speaks of it likely being a trap, you have four different choices to respond. I simply left the c_ismale conditional script in place for the "Let's find somewhere to hide" one, and picking that will cause her not to show up. That's not too obvious or user-friendly though :)

 

There is one thing remaining to do if you want it to work just as for a Male Exile. The cutscenes on the Ebon Hawk where Handmaiden is jealous at Visas for having higher influence with the Exile, and the cutscenes where Kreia turns the Handmaiden against the Exile for the same reasons. Those seem to have gender checks in their trigger conditions.

 

I'm about 1/3 through trying to interpret the k_003ebo_enter script which triggers all the Ebon Hawk cutscenes, but since it's almost 9000 lines of bytecode to read, it takes a while.

Link to comment
Share on other sites

Originally posted by Xcom

Just FYI, this will make disciple incompatible with my Mind Probe Influence mod which isn't that much of a tragedy, but still. (a lot of people seem to have downloaded that).

 

That kind of conflicts are probably unavoidable in a game where different types of modifications need to alter the same files. But as long as the source code of all the alterations is available and commented, it should be easy to fix with some copy&paste&recompile if someone wishes to use both. Not much more that can be done, as far as I know. :)

Link to comment
Share on other sites

Originally posted by stoffe -mkb-

It appears to work now from what I've tested. I haven't had the time to do a full playthough with all the mods in place yet though, so it's mostly been spot checks at times I know the Handmaiden has a role in things. She seems to join fine, Disciple seems to work properly if she's along for the ride already, and the sequence of events after the meeting in the enclave seems to trigger as they should.

 

I do, however, always play as a lightsider so things could be terribly broken for one chosing the dark path for all I know. I don't know how the story and sequence of events differ for a darksider, and I'm not exactly eager to find out firsthand. :)

 

The most user-friendly way to pick who to bring would probably be to add an extra "goodbye" reply when you speak to Handmaiden in the Telos Academy which subtly implies that she should come along without becoming Out-Of-Character.

 

For my current testing, I'm doing it in the holorec.dlg cutscene though, just before she shows up, where the original gender check was. When Kreia speaks of it likely being a trap, you have four different choices to respond. I simply left the c_ismale conditional script in place for the "Let's find somewhere to hide" one, and picking that will cause her not to show up. That's not too obvious or user-friendly though :)

 

There is one thing remaining to do if you want it to work just as for a Male Exile. The cutscenes on the Ebon Hawk where Handmaiden is jealous at Visas for having higher influence with the Exile, and the cutscenes where Kreia turns the Handmaiden against the Exile for the same reasons. Those seem to have gender checks in their trigger conditions.

 

I'm about 1/3 through trying to interpret the k_003ebo_enter script which triggers all the Ebon Hawk cutscenes, but since it's almost 9000 lines of bytecode to read, it takes a while.

I haven't seen anything wrong while going darkside but I'll pay some attention to it, as for the dialog that's what I was thinking about, but so far I don't have a clue about how to edit dialogs in GFF editor but I'll figure it out when I get that far. No need to rush with that last script though, I'm no hurry, and I'm sure others can wait too.

 

Xcom, at this point I'm making the mod so that disciple can't join at all, so there shouldn't be much problem but when I'm done and start working on the pc being able to choose I'll make sure it's compatible with as many mods as I can.

Link to comment
Share on other sites

I did some more work on making it optional for Handmaiden to show up for a female Exile. To avoid having to mess with the 2da containing the global definitions I re-used the Disciple's join variable briefly. Since he hasn't showed up at that part of the game it should be fairly risk free to do so.

 

I edited handmaiden.dlg in the GFF Editor to set the "should join" var for a female Exile if you pick the "If you have any further questions in the future, seek me out and ask them." reply after she's asked about the Force when you're trying to leave. Seemed like the most logical place without having to add a new reply:

 

handmaiden.dlg --> ReplyList --> 501 --> Script = st_setmaidjoin

 

And then I edited holorec.dlg to expand on the gender check to also check if the variable was set if the player is Female (and then reset the var to not cause trouble later).

 

holorec.dlg --> ReplyList --> 96 --> EntriesList --> 0 --> Active = st_chkmaidjoin

holorec.dlg --> ReplyList --> 97 --> EntriesList --> 0 --> Active = st_chkmaidjoin

holorec.dlg --> ReplyList --> 98 --> EntriesList --> 0 --> Active = st_chkmaidjoin

holorec.dlg --> ReplyList --> 99 --> EntriesList --> 0 --> Active = st_chkmaidjoin

 

Finally I added the check to the script running when you board the Ebon Hawk to leave Telos to check the var and only trigger the Cutscene with Atris and the two Combat Drones if the Handmaiden will join.

 

The scripts:

 

// ST: st_setmaidjoin.nss
// 		Set that the Handmaiden should join a female Exile.
// 	   	Using the Disciple Global briefly to keep track of things.
//     	It will be cleared again during the scene leaving Telos.

void main() {
if (!GetGlobalBoolean("000_PLAYER_GENDER")) {
	SetGlobalNumber("000_Disciple_Joined", 90);
}
}

 

...and...

 

// ST: st_chkmaidjoin.nss
//     	Check if the Handmaiden should join the party. Always join if the Exile
//     	is male, as usual. If female, check if the var has been set on Telos that
//     	she should join. Then reset the Disciple global back to normal value.

int StartingConditional() {
int bCheck = FALSE;

if (GetGlobalBoolean("000_PLAYER_GENDER"))
	bCheck = TRUE;
else if (GetGlobalNumber("000_Disciple_Joined") == 90)
	bCheck = TRUE;

SetGlobalNumber("000_Disciple_Joined", 0);
return bCheck;
}

 

...and...

 

// ST: a_setup_ebo2.nss (a_setup_ebo2.ncs in 262TEL_s.rim)

void main() {
if ((GetGlobalNumber("262TEL_CNPC_Freed") == 1) && !GetLocalBoolean(OBJECT_SELF, 55)) {
	SetGlobalNumber("003EBO_BACKGROUND", 8);
	SetGlobalNumber("003EBO_RETURN_DEST", 8);
	SetLocalBoolean(OBJECT_SELF, 55, TRUE);

	DestroyObject(GetObjectByTag("t3m4"));
	DestroyObject(GetObjectByTag("baodur"));
	DestroyObject(GetObjectByTag("handmaiden"));

	// ST: Gender check, but will also trigger for female Exiles if the global var is set to
	//     indicate that HM will join.
	if (GetGlobalBoolean("000_PLAYER_GENDER") || (GetGlobalNumber("000_Disciple_Joined") == 90)) {
		SetGlobalFadeOut();
		SetFadeUntilScript();

		CreateObject(OBJECT_TYPE_CREATURE, "atriswindcut", GetLocation(GetObjectByTag("wp_atriswind_1")));
		CreateObject(OBJECT_TYPE_CREATURE, "sister1wind", GetLocation(GetObjectByTag("wp_sister1wind_1")));
		CreateObject(OBJECT_TYPE_CREATURE, "sister2wind", GetLocation(GetObjectByTag("wp_sister2wind_1")));

		object oAtris = GetObjectByTag("AtrisWindCut");	
		DelayCommand(2.2, AssignCommand(oAtris, ClearAllActions()));
		DelayCommand(2.2, AssignCommand(oAtris, ActionStartConversation(GetFirstPC(), "atrissis")));
	}
	else {
		SetGlobalFadeOut();
		SetFadeUntilScript();
		PlayMovie("TelMov14");
		StartNewModule("950COR");
	}
}
}

 

As far as I have been able to test, this works fine, and Handmaiden only joins when the above mentioned reply was picked when talking to her in the Academy.

Link to comment
Share on other sites

Originally posted by Keneth

Reading a script is like reading a book, writing one is of course harder but no harder than writing a book for that matter. So doing it is not so much a complicated science it's more like an art and all you need is to be literate and know what is it you wish to write about. I don't know if this is a place to start, for me it's all just basics, after years of programming these scripts are like reading child books. But anyway, enough with the philosophy and back to the matter at hand, I've been doing some work on disciple's dialogs (and it would be a tad bit easier if there weren't a gazillion attribues) but I think I would be able to create a new dlg file that will work for both encounters (the way it should not with having to go through the same thing on both occasions) given some time of course, I still need to look around a bit.

 

except for the fact that I have been using VB.NET a ton and haven't really used c++ in about a year

Link to comment
Share on other sites

Well get your mind off VB then, it's useless anyway. I've got a question for stoffe since he's doing about all the scripting work, I'm using envida's lost khoonda room mod and I'm not sure how this works, here's the code (I'm assuming he won't mind since the source was in the pack)

 

 void main() {

// launch new scripts
ExecuteScript("ev_kho_locker", OBJECT_SELF);
ExecuteScript("ev_kho_blood", OBJECT_SELF);
ExecuteScript("ev_kho_bag", OBJECT_SELF);

// launch the original enter script
ExecuteScript("602_dan_enter", OBJECT_SELF);

} 

now this script has the same name as the original one (k_enter_601) but there's just a few lines in and there was some modification to 602 but I don't know how to decompile and check it, is the 602_dan_enter script supposed to be the same as the one you wrote for disciple's cutscene fix and just renamed? :confused:

 

Or better yet, could someone tell me how to translate byte code into source code, it'd be easier for me to make stuff compatible that way.

Link to comment
Share on other sites

Originally posted by jedigoku

except for the fact that I have been using VB.NET a ton and haven't really used c++ in about a year

 

I am also more familiar with VB syntax and haven't used C++ at all, and I manufactured my first ugly script in about a hour, after poking around in Obsidian's scripts.

 

If you have done any programming at all, this should be a walk in the park for you. And if it's not, then perhaps you should re-evaluate your "programming background" which you mentioned on numerous occasions. :tsk::p

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...