Skip to content

EncounterFactionBalanceCondition ​

Inherits: EntityCondition < Condition < Resource

Checks the faction balance in the current encounter. Useful for surrender mechanics, calling for help, or escalation.

Properties ​

BalanceTypebalance_typeBalanceType.OUTNUMBERED
floatratio_threshold2.0 # For outnumbered/outnumbering checks

Methods ​

Stringget_entity_function_description()
boolevaluate_entity( entity: Entity )
Stringget_entity_description()

Enumerations ​

enum BalanceType ​

The options of balance type: outnumbered, outnumbering, balanced, last of faction.

  • OUTNUMBERED = 0 - This entity's faction is outnumbered
  • OUTNUMBERING = 1 - This entity's faction is outnumbering others
  • BALANCED = 2 - Forces are roughly equal
  • LAST_OF_FACTION = 3 - This entity is the last of their faction

Property descriptions ​

BalanceType balance_type = BalanceType.OUTNUMBERED ​

Which balance of forces to check for: outnumbered, outnumbering, balanced, or the last of its faction

float ratio_threshold = 2.0 # For outnumbered/outnumbering checks ​

How many times more numerous a side must be to count as outnumbering (for the outnumbered and outnumbering checks)

Method descriptions ​

String get_entity_function_description() ​

The sentence the editor shows for the condition, with {placeholders} for its values.

bool evaluate_entity( entity: Entity ) ​

Is the condition met for this entity?

String get_entity_description() ​

A short text about what the condition checks on the entity.