Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dustil's premature death #4

Closed
DarthParametric opened this issue Jan 23, 2019 · 27 comments
Closed

Dustil's premature death #4

DarthParametric opened this issue Jan 23, 2019 · 27 comments
Labels
Bug Something isn't working Module: Korriban Issue occurs primarily on Korriban Requires Testing Testing is required before a fix can be developed and/or approved Tier 1 Just Fixes Type: Scripting This issue is related specifically to a scripting bug/error

Comments

@DarthParametric
Copy link
Contributor

If you kill Dustil while looking for proof, Carth will continue looking for proof instead of realizing that Dustil is dead.

@DarthParametric DarthParametric changed the title v1.7 Dustil's premature death Dustil's premature death Jan 23, 2019
@DarthParametric DarthParametric added the Bug Something isn't working label Jan 23, 2019
@JCarter426
Copy link
Contributor

I don't have the saves to test this at the moment, but I think if this is used as his OnDeath script, it'll fix it.
cp_kor_dustil_d.txt

@DarthParametric DarthParametric added the Requires Testing Testing is required before a fix can be developed and/or approved label Jan 27, 2019
@DarthParametric DarthParametric added Module: Korriban Issue occurs primarily on Korriban Type: Scripting This issue is related specifically to a scripting bug/error Tier 1 Just Fixes labels Feb 1, 2019
@DarthParametric
Copy link
Contributor Author

DarthParametric commented May 23, 2019

So I have a save to test this. I have just initiated the quest to find evidence, but after you have done that you can no longer turn him hostile through dialogue. So I guess the only way is if you end up killing Uthar and Yuthura, setting the whole academy hostile?

@JCarter426
Copy link
Contributor

You can kill Uthar and Yuthura, or kill Uthar and convince Yuthura to leave Korriban.

@DarthParametric
Copy link
Contributor Author

Well that's an aside, my point was the only way to turn him hostile after having agreed to find evidence is to turn the entire academy hostile.

@JCarter426
Copy link
Contributor

Yes, that's the issue - he goes hostile along with the rest of the academy if you finish Korriban with one of those two endings before finding the evidence.

@DarthParametric
Copy link
Contributor Author

DarthParametric commented May 23, 2019

Which is a real pain in the ass to test, since I'd have to replay the entire planet. I wonder if I can just trigger whatever happens directly via script. Must be a global checked by the OnEnter or something?

Edit: Ah, KOR_END_HOSTILE.

@JCarter426
Copy link
Contributor

JCarter426 commented May 23, 2019

Yeah, that's why I didn't test it way back when.
I've looked into some stuff since then, though. I believe entering the academy with the global boolean KOR_END_HOSTILE will trigger everyone hostile. The other global determining the Korriban ending is the number KOR_FINAL_TEST and states 4 and 7 trigger the hostile ending.

@DarthParametric
Copy link
Contributor Author

Yeah I just threw the k_pkor_end_host script that fires in the Valley if you leave without Uthar onto one of the end nodes in Dustil's DLG and that turned him hostile. As expected, no change from Carth. Will add your OnDeath script and see what happens.

@DarthParametric
Copy link
Contributor Author

DarthParametric commented May 23, 2019

Looks like the Finding Dustil quest is still active after killing Dustil and Carth being on the "he's dead and it's all your fault" track. Seems it needs an addition something like:

	if ((GetJournalEntry("kor35_findingdustil") <= 25))
		{
			AddJournalQuestEntry("kor35_findingdustil", 40, FALSE);
		}

That's just using the vanilla end for him going hostile and attacking after speaking to him. We could add two additional entries to account for looking for (state 20) or having the evidence (state 25), but the academy going hostile before handing it over.

I guess there is also state 10, which is Jordo having told you about Dustil, but not having spoken to him yet.

@DarthParametric
Copy link
Contributor Author

How's this look?

#include "k_inc_switch"

void main() {

	SetGlobalNumber("KOR_DANEL", 5);
	SetGlobalNumber("K_SWG_CARTH", 99);
	
	if ((GetJournalEntry("kor35_findingdustil") == 10))
		{
			AddJournalQuestEntry("kor35_findingdustil", 50, FALSE);
		}

	if ((GetJournalEntry("kor35_findingdustil") == 20))
		{
			AddJournalQuestEntry("kor35_findingdustil", 60, FALSE);
		}

	if ((GetJournalEntry("kor35_findingdustil") == 25))
		{
			AddJournalQuestEntry("kor35_findingdustil", 70, FALSE);
		}
		
	//Carry out vanilla k_def_death01 function
	ExecuteScript("k_ai_master", OBJECT_SELF, KOTOR_DEFAULT_EVENT_ON_DEATH);
}

50, 60, 70 states would need to be added to the JRL.

@JCarter426
Copy link
Contributor

Looks good to me. Another thing that may be an issue is the scene firing while other hostiles are nearby. But if we wrap everything else first, I'll see if I can test that issue when I get to Korriban.

@DarthParametric
Copy link
Contributor Author

I don't think that is actually possible, is it? That's something else we'd have to address. I think the OnEnter might just destroy him outright if the academy has gone hostile.

@JCarter426
Copy link
Contributor

The bug report was that Dustil goes hostile along with everyone else, although I've never bungled the quest that way so I'm not sure.

Carth is meant to say a few lines after Dustil dies when you kill him normally, as I recall. And normally there are no other hostiles in the area, so it shouldn't be an issue - but it might be if he's killed along with everyone else in the academy. I have a vague memory that they might be bark bubbles instead of a cutscene, though, so it might be ok.

@DarthParametric
Copy link
Contributor Author

DarthParametric commented May 23, 2019

I killed Dustil when first meeting him (so non-hostile academy) Carth doesn't say anything unprompted that I recall. You manually talk to him, ask him "Do you want to talk about it?" and he goes off about how it's your fault for not talking Dustil down. I have a save standing right in front of Dustil before speaking to him for the first time, so it's easy enough to confirm.

@JCarter426
Copy link
Contributor

Huh, the dialogue I was thinking of must have been unused:
Dead Dustil

@DarthParametric
Copy link
Contributor Author

I think the line itself is actually used, just not standalone like that.

@JCarter426
Copy link
Contributor

Carth didn't say anything when I killed Dustil, so I suspect it may be bugged like the Gana Lavin encounter was. I believe the fix for that was to make it a bark bubble instead of a dialogue.
Also, after I killed Dustil (this is still the non-premature way) I couldn't interact with anything until I saved and reloaded.

@DarthParametric
Copy link
Contributor Author

DarthParametric commented Jul 13, 2019

Thoughts on these for new journal entries?

Quest at stage 10 - Jordo has told Carth that Dustil is on Korriban:
You never managed to find Dustil and talk to him before the whole Academy turned against you. It seems that you inadvertently killed him while defending yourself. Naturally Carth now blames you for Dustil's death, saying that you could have done more to find him.

Quest is at stage 20 - You talked to Dustil and promised to find evidence:
You found and spoke to Dustil, promising to find evidence of the true nature of the Sith. Unfortunately, you didn't manage to discover anything useful before the whole Academy turned against you, including Dustil. You were forced to defend yourself, and Dustil was killed. Carth now blames you for Dustil's death, saying that you could have done more to help change his mind.

Quest is at stage 25 - You found the datapad in Uthar's room:
You found proof of Uthar's direct role in the death of Selene. Unfortunately, you failed to show it to Dustil before the whole Academy turned against you, including Dustil. You were forced to defend yourself, and Dustil was killed. Carth now blames you for Dustil's death, saying that you could have done more to help.

@Mako88
Copy link
Contributor

Mako88 commented Jul 13, 2019

I think those look good!

@Salk73
Copy link

Salk73 commented Jul 19, 2019

The only thing I would change is the end in Q stage 10 (to avoid using the verb "find" again): "... to track him down."

@DarthParametric
Copy link
Contributor Author

Done. Although these changes haven't been committed yet anyway, since they are still awaiting testing.

@JCarter426
Copy link
Contributor

So, I tested by killing Dustil before ever talking to him, and got this:
swkotor 2019-08-04 10-51-02-05
That might be down to the incomplete install. Carth did react properly, blaming me for Dustil's death.

It should be noted that the journal entry was updated before I spoke to Carth and therefore before he gets a chance to blame me, as it says in the journal. But it also does that if you kill him the normal way.

@DarthParametric
Copy link
Contributor Author

Well that's unique at least. Did you check the JRL in your Override? What do the structs for Tag kor35_findingdustil look like? You're using the script from above?

@JCarter426
Copy link
Contributor

Looks like it set the string references as lines 24, 25, and 26 in the TLK. The one I got is line 24, which corresponds to quest state 50.

@DarthParametric
Copy link
Contributor Author

DarthParametric commented Aug 4, 2019

Oh crap. Did I not include append.tlk? That would be why.

@DarthParametric
Copy link
Contributor Author

DarthParametric commented Aug 11, 2019

So one remaining issue, albeit something of an edge case, is that once the Academy goes hostile, you can still find the datapad in Uthar's room and get the scene of Carth saying that it can help convince Dustil (despite the whole place trying to kill you). Seems like it needs to be destroyed in the OnEnter if the Academy is hostile.

Edit: The datapad can be destroyed via the OnEnter, but it seems the entire footlocker (k35_uthar_ftlckr.utp) is spawned for the Dustil quest. It's OnInvDisturbed script (k_pkor_inv35uthr) has a check that fires the Carth dialogue, but it seems it only checks that the datapad is no longer in the footlocker, not that the PC actually has it, so simply looting the footlocker after the datapad was destroyed still fires the scene. The script will need to be changed to also check if the PC has it. There's also no talked to check either, so the dialogue will fire repeatedly any time the inventory is disturbed (like adding items). Probably an extreme edge case, but since we need to fix one problem anyway, might as well fix both.

@DarthParametric
Copy link
Contributor Author

DarthParametric commented Aug 11, 2019

Another apparent problem. It seems that the intended journal entry for finding the datapad is not added. It should get updated to stage 25:

Carth's son has been found, but the reunion was not exactly what he'd hoped. Dustil does not believe anything Carth has to say on the true nature of his new "family". You have found a datapad belonging to the master of the academy which Carth believes will be proof of the Sith's true nature. He wants to return to Dustil as soon as possible with it.

But it seems it remains stuck on 20. Carth's DLG that fires on looting the footlocker has a script (k_pkor_car35tkpd) that takes the datapad from the PC (for some reason), so that could be amended to update the quest state. Our final added quest state relies on this in order to be triggered.

DarthParametric added a commit that referenced this issue Aug 11, 2019
…Naga Sadow and destroyed Dustil's datapad if the Academy turns hostile. Fixes #200 Partial for #4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Module: Korriban Issue occurs primarily on Korriban Requires Testing Testing is required before a fix can be developed and/or approved Tier 1 Just Fixes Type: Scripting This issue is related specifically to a scripting bug/error
Projects
None yet
Development

No branches or pull requests

4 participants