Skip to content

Additional AITriggerType conditions (# of Tech Buildings / Bridge Repair Huts)#2119

Open
Starkku wants to merge 1 commit intoPhobos-developers:developfrom
Starkku:feature/ai-trigger-conditions
Open

Additional AITriggerType conditions (# of Tech Buildings / Bridge Repair Huts)#2119
Starkku wants to merge 1 commit intoPhobos-developers:developfrom
Starkku:feature/ai-trigger-conditions

Conversation

@Starkku
Copy link
Contributor

@Starkku Starkku commented Feb 24, 2026

This PR adds framework for adding new AITriggerType conditions in similar vein to what Phobos already does with script actions. In addition it adds two new conditiontypes checking tech buildings and bridge repair huts.


AI Trigger Condition Types

Phobos adds new AI trigger condition types. AI trigger's condition type is defined as the number in fifth comma-separated parameter in AITriggerType declaration.

F.ex

ID=Name,Team1,OwnerHouse,TechLevel,ConditionType,ConditionObject,Comparator,StartingWeight,MinimumWeight,MaximumWeight,IsForSkirmish,unused,Side,IsBaseDefense,Team2,EnabledInE,EnabledInM,EnabledInH

Some condition types operate on or with ConditionObject and Comperator as well. More information on defining AITriggerTypes can be found on ModEnc.

8 Amount of Capturable Tech Buildings Exists

Trigger can spring if a number of Capturable=true + NeedsEngineer=true buildings owned in total by all houses the trigger owner is not allied with satisfies Comparator.

9 Amount of Bridge Repair Huts Exists

Trigger can spring if a number of BridgeRepairHut=true buildings linked to broken bridges owned by first house belonging to Civilian side satisfies Comparator.

@github-actions
Copy link

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@TaranDahl TaranDahl added ❓New feature Needs testing ⚙️T2 T2 maintainer review is sufficient labels Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs testing ❓New feature ⚙️T2 T2 maintainer review is sufficient

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants