Kexikus

Juhani turning hostile on Ebon Hawk after DS ending

Recommended Posts

As the title suggests, I have a small problem. This is not a vanilla problem but a problem with my unfinished Dark Side Juhani mod, but I've no idea what's causing it and I hope someone can help me.

So here's what's going on:

 

In my DS Juhani mod if you recruited her as dark Jedi and then choose the DS ending, she will obviously stay with you. That part is working fine, she stays in the party, fights Jolee, etc. The weird things happen after the beach scene when going back to the Ebon Hawk. Juhani is present but for some reason she's hostile. She will not attack the player but I can only attack her instead of talking to her.

 

I know that the problem has to be somewhere in the scripts leading to the DS ending as everything else is the same for both LS/DS up to this point and she's not hostile in the LS ending. So, in order to figure out what's going on I had another look at what's happening in the temple after fighting Bastila. Once Bastila drops to a certain amount of health, the fight will stop and the dialog will resume, but before that happens both Jolee and Juhani leave the party. I assume all of this happens in Bastilas OnUserDefine script "k_punk_bast_ud2.ncs" but I can't decompile this script so I don't know. But I also assume that the two Jedi turn hostile in this script as none of the following seems to do anything of that kind.

Back to the dialog though: Next there are a few scripts that reposition the characters etc. but nothing of interest. If the DS option is chosen, there are once again several scripts but most of these only give DS points, set journal entries etc, except for "k_punk_bastjoin" and "k_punk_bastjoin2".

 

Here they are:

k_punk_bastjoin

void main() {
	int int1;
	ActionPauseConversation();
	SetGlobalNumber("G_FinalChoice", 1);
	SetGlobalFadeOut(0.0, 0.0, 0.0, 0.0, 0.0);
	RemovePartyMember(4);
	RemoveAvailableNPC(4);
	RemovePartyMember(5);
	RemoveAvailableNPC(5);
	int1 = ((GetLevelByPosition(1, OBJECT_SELF) + GetLevelByPosition(2, OBJECT_SELF)) + GetLevelByPosition(3, OBJECT_SELF));
	if ((int1 <= 15)) {
		AddAvailableNPCByTemplate(0, "p_bastilla001");
	}
	else {
		if ((int1 == 16)) {
			AddAvailableNPCByTemplate(0, "p_bastilla002");
		}
		else {
			if ((int1 == 17)) {
				AddAvailableNPCByTemplate(0, "p_bastilla003");
			}
			else {
				if ((int1 == 18)) {
					AddAvailableNPCByTemplate(0, "p_bastilla004");
				}
				else {
					if ((int1 == 19)) {
						AddAvailableNPCByTemplate(0, "p_bastilla005");
					}
					else {
						if ((int1 == 20)) {
							AddAvailableNPCByTemplate(0, "p_bastilla006");
						}
					}
				}
			}
		}
	}
	SpawnAvailableNPC(0, GetLocation(GetObjectByTag("bastend", 0)));
	ActionJumpToLocation(GetLocation(GetObjectByTag("main", 0)));
	ActionWait(1.0);
	SetGlobalFadeIn(1.0, 1.0, 0.0, 0.0, 0.0);
	ActionResumeConversation();
}

and k_punk_bastjoin2

void main() {
	ActionPauseConversation();
	AddPartyMember(0, GetObjectByTag("bastila", 0));
	ActionResumeConversation();
}

For the mod, I made an alternate version of k_punk_bastjoin that's called instead of the original if DS Juhani was recruited. The only thing I changed was in removing the two lines about PartyMember 5 though since that's Juhani. And as I said before, it works. She stays in the party for the rest of the game.

 

I can't see any reason for her to be hostile later in these scripts, so that's why I think both her and Jolee are turned hostile in the UserDefine script I mentioned before and only when the LS path is chosen that changes. With that in mind I tried to change Juhanis faction in my custom k_punk_bastjoin by adding ChangeToStandardFaction(GetObjectByTag("Juhani"), 2); since 2 seems to be the standard party member faction (is that correct?). Changing her faction did work in that it changed her faction but even after that she remained hostile on the Ebon Hawk. I also checked her faction before changing it and it was 0, but I have no idea what that could mean.

 

Since that didn't work, I took a look at the scripts fired after the LS choice. Once again there are some scripts for LS points, globals and journal entries and three possible candidates for the solution: "k_punk_bastatt03", "k_punk_bastatt04" and "k_punk_bastesc", triggered in that order.

 

k_punk_bastatt03

void main() {
	ActionPauseConversation();
	DelayCommand(1.5, AssignCommand(GetPartyMemberByIndex(0), ActionMoveToObject(GetObjectByTag("bast1", 0), 1, 1.0)));
	ActionMoveToLocation(GetLocation(GetObjectByTag("bast1", 0)), 1);
	ActionResumeConversation();
}

k_punk_bastatt04

void main() {
	ActionPauseConversation();
	ActionMoveToLocation(GetLocation(GetObjectByTag("bast2", 0)), 1);
	SetGlobalFadeOut(2.0, 1.0, 0.0, 0.0, 0.0);
	ActionResumeConversation();
}


k_punk_bastesc

void main() {
	if ((IsNPCPartyMember(5) == 1)) {
		AddJournalQuestEntry("k_swg_juhani", 120, 0);
	}
	SetGlobalNumber("G_FinalChoice", 2);
	PlayMovie("05_8E");
	ActionJumpToLocation(GetLocation(GetObjectByTag("playerend", 0)));
	DestroyObject(GetObjectByTag("GWing", 0), 0.0, 1, 0.0);
	SetGlobalFadeIn(0.0, 2.0, 0.0, 0.0, 0.0);
	DelayCommand(0.1, DestroyObject(OBJECT_SELF, 0.0, 1, 0.0));
}

From what I can tell, the first two do nothing but moving characters around and other cutscene stuff. But I can't see anything related to my problem in k_punk_bastesc either, so I ran out of ideas and that's why I'm asking for help here...

 

Sorry for the long post, but I figured I'd let you know what I did before asking for help. Any help would be very much appreciated now :D

Share this post


Link to post
Share on other sites

Neither of those cases. It's the DS ending where she turns hostile and only on the Ebon Hawk.

 

It goes like this: Choose DS ending -> Bastila joins your party, Juhani stays with you and you fight Jolee -> beach scene plays with a tiny modification in dialog -> back to the Ebon Hawk and Juhani is hostile

 

Since she's not attacking me at this point, I can simply continue and once aboard the Star Forge I can choose her as party member just fine.

 

In the LS ending none of this happens.

Share this post


Link to post
Share on other sites

I don't know. IIRC the only difference in the globals between LS and DS choice on the temple is in the G_FinalChoice global that's set to either 1 or 2. I'll check that out.

 

Also, about the party members on the Ebon Hawk in general: They don't have unique .utcs just for the Ebon Hawk, right? They're the exact same as they are when they are in the active party?

 

Edit: Having G_FinalChoice set to 2 (LS) made no difference.

 

Edit 2: It's probably not her faction either since that is 0 both after the DS and the LS ending. (Unless it's changes somewhere else again before going to the Ebon Hawk, but as I said in my first post, changing it makes no difference, so I doubt it's the cause of this problem.)

Share this post


Link to post
Share on other sites

Well, if you have a save from the Beach scene, I could play from there with a few minor files from you (possibly). Basically, I can check to see what levels are used after the beach scene and then can start looking for scripts.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.