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

Add group settings for Attack, Reinforce and Dynamic Reinforcement #441

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nk3nny
Copy link
Owner

@nk3nny nk3nny commented Feb 17, 2025

Adds universal group settings for Attack, Flight and Dynamic reinforcement

Disabling 'enableAttack' on groups has the benefit of giving us more control of group actions (less running away doing random shit). The cost is that the AI will conduct fewer unit level flanking attacks.

Adds universal group settings for Attack, Flight and Dynamic reinforcement

Disabling 'enableattack' on groups has the benefit of giving us more control of group actions (less running away doing random shit).  The cost is that the AI will conduct fewer innate flanking attacks.
@@ -108,6 +108,70 @@ _curCat = LSTRING(Settings_GeneralCat);
1
] call CBA_fnc_addSetting;

addMissionEventHandler ["GroupCreated", {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be in the EventHandlers pbo

[
{
if (count (units _this) > 0) then {
if (GVAR(autoAddDynamicReinforcement)) then {_this setVariable [QGVAR(enableGroupReinforce), true, true];};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think we maybe should split this up into a more logical system. why should we, for example, wait when all 3 settings are disabled?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a 3-second wait before executing (waitAndExecute) instead of waiting until all 3 are enabled (waitUntilAndExecute), but that's still a good point.

@@ -10,7 +10,7 @@ Here four buttons are added:
These functions and buttons could conceivably be moved to their own module.
They might also benefit from added interface and more nuanced functions handling.
That said: within the current scope of the AI mod. They can make a comfortable
home here. Until revisited by more capable personnell.
home here. Until revisited by more capable personell.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can find, the former personnell was closer, should just drop the extra trailing l. Still, I'd go with people instead, since seemingly personnel is people working in a company:

Suggested change
home here. Until revisited by more capable personell.
home here. Until revisited by more capable people.

[
{
if (count (units _this) > 0) then {
if (GVAR(autoAddDynamicReinforcement)) then {_this setVariable [QGVAR(enableGroupReinforce), true, true];};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a 3-second wait before executing (waitAndExecute) instead of waiting until all 3 are enabled (waitUntilAndExecute), but that's still a good point.

params ["_group"];
[
{
if (count (units _this) > 0) then {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (count (units _this) > 0) then {
if (units _this isNotEqualTo []) then {


// auto disable allowFleeing on groups
[
QGVAR(disableFleeingOverride),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and the next setting need a XEH initPost eventhandler instead. People spawn in units all the time, which will not get caught by this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants