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

Now that civilian noise alerts have been corrected, remove the broken default behavior #717

Closed
RedDoby opened this issue Jan 10, 2020 · 5 comments · Fixed by #1246
Closed
Assignees

Comments

@RedDoby
Copy link
Contributor

RedDoby commented Jan 10, 2020

Add the option to disable the default civilian yell in class XGAIBehavior_Civilian. This default yell behavior interferes with the modified donoisealert() in class X2AIBTDefaultActions. This is copied from Long War.

function BTRunCompletePreExecute()
{
	local AvailableAction YellAction;
	local int TargetIndex;
	super.BTRunCompletePreExecute();
    
    // LWS Add: Configurable disabling of civilian yell
    if (!class'Helpers_LW'.default.EnableCivilianYellOnPreMove)
        return;

	if( !m_kPlayer.bCiviliansTargetedByAliens )
	{
		// Yell before moving.
		YellAction = FindAbilityByName('Yell');
		if( YellAction.AbilityObjectRef.ObjectID > 0 && YellAction.AvailableCode == 'AA_Success' )
		{
			if( YellAction.AvailableTargets.Length == 0 )
			{
				TargetIndex = INDEX_NONE;
			}
			class'XComGameStateContext_Ability'.static.ActivateAbility(YellAction, TargetIndex);
		}
	}
}
@RedDoby RedDoby closed this as completed Jan 13, 2021
@RedDoby
Copy link
Contributor Author

RedDoby commented Jan 13, 2021

After discussing with other modders decided this is not needed anymore.

@RedDoby
Copy link
Contributor Author

RedDoby commented Aug 16, 2023

Determined that this indeed is causing units to go into red alert from the default yell.

@RedDoby RedDoby reopened this Aug 16, 2023
@Tedster59
Copy link
Contributor

example: https://clips.twitch.tv/CovertSpookyFungusThisIsSparta-iiWYdFo53wiLuLfz

Civilian yell puts a pod on red alert instead of yellow alert. current LWoTC release.

@Tedster59
Copy link
Contributor

Reopening this to track additional investigation. Previous fix didn't catch all cases, so working on a new one to fix the source of the issue, which is the MultiTargetEffect added in the Yell ability.

@Tedster59 Tedster59 reopened this Aug 22, 2023
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Aug 22, 2023
Better fixes X2CommunityCore#717

Disables the red alert effect at the source instead of just for civilians, so also fixes falling back units, which apparently use this ability too.
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Aug 23, 2023
Better fixes X2CommunityCore#717

Disables the red alert effect at the source instead of just for civilians, so also fixes falling back units, which apparently use this ability too.
Tedster59 added a commit to Tedster59/X2WOTCCommunityHighlander that referenced this issue Aug 23, 2023
Better fixes X2CommunityCore#717

Disables the red alert effect at the source instead of just for civilians, so also fixes falling back units, which apparently use this ability too.
@Iridar
Copy link
Contributor

Iridar commented Aug 23, 2023

Apparently the desired effect was achievable all this time with no Highlander changes just by neutering the Yell ability in OPTC, closing this issue, #1246 is to be reverted.

@Iridar Iridar closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2023
Iridar pushed a commit to Iridar/X2WOTCCommunityHighlander that referenced this issue Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment