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

Dantooine Matale Grounds - Mando unintentionally switching to melee weapon #111

Closed
DarthParametric opened this issue May 11, 2019 · 4 comments
Labels
Could Not Reproduce We have been unable to replicate the circumstances of the issue Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Dantooine Issue occurs primarily on Dantooine Type: Scripting This issue is related specifically to a scripting bug/error Type: Template This issue is related specifically to a template like a UTC. UTI, UTP, etc.

Comments

@DarthParametric
Copy link
Contributor

During the "wife and children" scene, the Mando killing the civilian equips a vibroblade half way through shooting him, presumably due to anti-fist fighting scripts. This needs to be switch back to vanilla so that he keeps his blaster equipped.

@DarthParametric DarthParametric added Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Dantooine Issue occurs primarily on Dantooine Type: Scripting This issue is related specifically to a scripting bug/error Type: Template This issue is related specifically to a template like a UTC. UTI, UTP, etc. labels May 11, 2019
@JCarter426
Copy link
Contributor

Hmm, I don't recall anything in the community patch that would affect that.
A sure way to avoid the issue though would be to remove the vibroblade from his inventory, then script it back in at the end of the cutscene.

@DarthParametric
Copy link
Contributor Author

DarthParametric commented May 12, 2019

Yeah I can't see anything in there. The Mando looks to be dan14ab_mand01.utc with OUD k_pdan_mand55 and OS k_pdan_mand52 (global script). It doesn't seem like he should be affected, but I don't remember ever encountering that issue before.

This is the script that fires to execute the attack:

void main() {
	
	object oVictim = GetObjectByTag("dan14_victim", 0);
	object oMando = GetObjectByTag("dan14ab_mand01", 0);
	effect efHit = EffectAssuredHit();
	
	ChangeToStandardFaction(oVictim, STANDARD_FACTION_FRIENDLY_1);
	ChangeToStandardFaction(oMando, STANDARD_FACTION_FRIENDLY_2);
	ActionPauseConversation();
	ApplyEffectToObject(DURATION_TYPE_TEMPORARY, efHit, oMando, 5.0);
	ActionAttack(oVictim, FALSE);
}

It looks like a trigger signals his OUD to start the cutscene. Perhaps we could expand that OUD case to destroy the melee weapon, then add it back at the end of the above script? Or the script that fires on the last DLG node, which turns the Mando and his Duros buddies hostile.

@DarthParametric
Copy link
Contributor Author

DarthParametric commented May 12, 2019

Proposed solution.

Step 1, OUD event that triggers convo modified to remove sword:

void main() {

	int int1 = GetUserDefinedEventNumber();
	
	switch (int1)
	{
		case 100:
			{
				object oPC = GetFirstPC();
				object oItem = GetFirstItemInInventory(OBJECT_SELF);
				
				ActionWait(3.0);
				
				while (GetIsObjectValid(oItem) == TRUE)
					{
						if (GetTag(oItem) == "g_w_vbroswrd01")
							{
								DestroyObject(oItem);
							}
						oItem = GetNextItemInInventory(OBJECT_SELF);
					}
				
				ActionStartConversation(oPC, "dan14ab_cut01", FALSE, CONVERSATION_TYPE_CINEMATIC, TRUE, "", "", "", "", "", "");
			}
			break;

Step 2, script that fires at the end of the DLG to turn group hostile modified to add it back:

void main() {
	
	object oMando = GetObjectByTag("dan14ab_mand01", 0);
	object oDuro1 = GetObjectByTag("dan14ab_duros01", 0);
	object oDuro2 = GetObjectByTag("dan14ab_duros02", 0);
	object oDuro3 = GetObjectByTag("dan14ab_duros03", 0);
	
	CreateItemOnObject("g_w_vbroswrd01", oMando, 1);
	
	ChangeToStandardFaction(oMando, STANDARD_FACTION_HOSTILE_1);
	ChangeToStandardFaction(oDuro1, STANDARD_FACTION_HOSTILE_1);
	ChangeToStandardFaction(oDuro2, STANDARD_FACTION_HOSTILE_1);
	ChangeToStandardFaction(oDuro3, STANDARD_FACTION_HOSTILE_1);
}

Edit: On testing, the proposed fix doesn't appear to break anything, but I wasn't able to reproduce the initial issue in order to actually confirm that the fix works.

@DarthParametric DarthParametric added the Could Not Reproduce We have been unable to replicate the circumstances of the issue label May 12, 2019
@DarthParametric
Copy link
Contributor Author

DarthParametric commented Oct 23, 2019

I'm not sure if this is a consequence of the changes we made or not, but the Mando in question seems to do nothing when combat starts if he isn't targeted first. He'll just stand there and watch you slaughtering his friends.

Edit: Actually none of them do anything if the party doesn't attack or move from the initial point they hit the trigger. Also, it seems the original fix doesn't actually work, as the trigger fires the DLG directly, not via the OUD as I originally thought. Not sure how I failed to catch that...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Could Not Reproduce We have been unable to replicate the circumstances of the issue Minor Issue Aesthetic issue or other problem that isn't really a bug Module: Dantooine Issue occurs primarily on Dantooine Type: Scripting This issue is related specifically to a scripting bug/error Type: Template This issue is related specifically to a template like a UTC. UTI, UTP, etc.
Projects
None yet
Development

No branches or pull requests

2 participants