Medieval Total War Italia

Events, Conditions & Commands

  • Messaggi
  • OFFLINE
    The Housekeeper
    Post: 21.194
    Registrato il: 10/02/2007
    Principe

    00 06/03/2012 18:40
    Dal Docudemons per Kingdoms.


    EVENTS


    "Triggers are data objects consisting of an event on which to test, a number of conditions, and a list of effects. These effects can be upon character traits
    or upon advice, although this could easily be extended to other domains of activity such as the world, the empire, diplomacy &c.

    The triggers themselves are not encoded in the project - they are read in from an external file and instantiations of triggers are stored in an array indexed
    by their event.

    If you wish to add new triggers, consult the list of extant triggers and see if you are merely redefining a trigger that already exists. You can do this by
    examining the advice and VnV spreadsheets. If you are satisfied that this is indeed a new trigger, ask yourself when the trigger should be tested, and under
    what conditions the trigger should fire. If either the condition or the event is unavailable, request from Guy that they be added to the set.

    The conditions are in conditions.txt. This document contains the current set of events. They are:"


    Identifier: PreBattle
    Event: When a battle is about to start
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_PRE_BATTLE

    Identifier: PreBattleWithdrawal
    Event: When a battle is about to start but one of the armies withdraws
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_PRE_BATTLE_WITHDRAWAL

    Identifier: BattleAiCommenced
    Event: The battle AI has begun processing
    Exports: faction
    Class: ET_BATTLE_AI_COMMENCED

    Identifier: BattleDelayPhaseCommenced
    Event: The delay phase has begun
    Exports: faction
    Class: ET_BATTLE_DELAY_PHASE_COMMENCED

    Identifier: BattleDeploymentPhaseCommenced
    Event: The deployment phase has begun
    Exports: faction
    Class: ET_BATTLE_DEPLOYMENT_PHASE_COMMENCED

    Identifier: BattleConflictPhaseCommenced
    Event: The conflict phase has begun
    Exports: faction
    Class: ET_BATTLE_CONFLICT_PHASE_COMMENCED

    Identifier: BattlePlayerUnitAttacksEnemyUnit
    Event: A player unit has attacked one of the enemies units
    Exports: infer_attacking_unit, infer_defending_unit, player_unit, enemy_unit
    Class: ET_BATTLE_PLAYER_UNIT_ATTACKS_ENEMY_UNIT

    Identifier: BattnemyUnitAttacksPlayerUnit
    Event: An enemy unit has attacked one of the players units
    Exports: infer_attacking_unit, infer_defending_unit, player_unit, enemy_unit
    Class: ET_BATTLE_ENEMY_UNIT_ATTACKS_PLAYER_UNIT

    Identifier: BattlePlayerAttacksSettlementBuilding
    Event: A player unit has attacked a building in the settlement
    Exports: infer_attacking_unit, player_unit, building_battle
    Class: ET_BATTLE_PLAYER_ATTACKS_SETTLEMENT_BUILDING

    Identifier: BattnemyAttacksSettlementBuilding
    Event: An enemy unit has attacked a building in the settlement
    Exports: infer_attacking_unit, enemy_unit, building_battle
    Class: ET_BATTLE_ENEMY_ATTACKS_SETTLEMENT_BUILDING

    Identifier: BattleUnitGoesBerserk
    Event: A unit has gone berserk
    Exports: unit
    Class: ET_BATTLE_UNIT_GOES_BERSERK

    Identifier: BattlePlayerUnitGoesBerserk
    Event: One of the player's units has gone berserk
    Exports: player_unit
    Class: ET_BATTLE_PLAYER_GOES_BERSERK

    Identifier: BattnemyUnitGoesBerserk
    Event: One of the enemies' units has routed
    Exports: enemy_unit
    Class: ET_BATTLE_ENEMY_UNIT_GOES_BERSERK

    Identifier: BattleUnitRouts
    Event: A unit has routed
    Exports: unit
    Class: ET_BATTLE_UNIT_ROUTS

    Identifier: BattlePlayerUnitRouts
    Event: One of the player's units has routed
    Exports: player_unit
    Class: ET_BATTLE_PLAYER_UNIT_ROUTS

    Identifier: BattnemyUnitRouts
    Event: One of the enemies' units has routed
    Exports: enemy_unit
    Class: ET_BATTLE_ENEMY_UNIT_ROUTS

    Identifier: BattlePlayerSiegeEngineDestroyed
    Event: A siege engine belonging to the player has been destroyed
    Exports: player_unit
    Class: ET_BATTLE_PLAYER_SIEGE_ENGINE_DESTROYED

    Identifier: BattnemySiegeEngineDestroyed
    Event: A siege engine belonging to the enemy has been destroyed
    Exports: enemy_unit
    Class: ET_BATTLE_ENEMY_SIEGE_ENGINE_DESTROYED

    Identifier: PostBattle
    Event: When a battle has finished
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_POST_BATTLE

    Identifier: BattleArmyRouted
    Event: An army has been entrirely routed
    Exports: army
    Class: ET_BATTLE_ARMY_ROUTED

    Identifier: BattleGeneralKilled
    Event: A general has been killed
    Exports: character
    Class: ET_BATTLE_GENERAL_KILLED

    Identifier: BattleGeneralRouted
    Event: A general has been routed
    Exports: character
    Class: ET_BATTLE_GENERAL_ROUTED

    Identifier: BattleReinforcementsArrive
    Event: A reinforcing army has arrived on the battlefield
    Exports: army
    Class: ET_BATTLE_REINFORCEMENTS_ARRIVE

    Identifier: BattleSiegeEngineDestroyed
    Event: A siege engine has been destroyed
    Exports: unit
    Class: ET_BATTLE_SIEGE_ENGINE_DESTROYED

    Identifier: BattleSiegeEngineDocksWall
    Event: A siege engine has docked with a wall
    Exports: unit
    Class: ET_BATTLE_SIEGE_ENGINE_DOCKS_WALL

    Identifier: BattleGatesAttackedByEngine
    Event: An engine has started attacking a gate
    Exports: unit
    Class: ET_BATTLE_GATES_ATTACKED_BY_ENGINE

    Identifier: BattleGatesAttackedByPlayerEngine
    Event: A player's engine has started attacking a gate
    Exports: player_unit
    Class: ET_BATTLE_GATES_ATTACKED_BY_PLAYER_ENGINE

    Identifier: BattleGatesAttackedByEnemyEngine
    Event: An enemy's engine has started attacking a gate
    Exports: enemy_unit
    Class: ET_BATTLE_GATES_ATTACKED_BY_ENEMY_ENGINE

    Identifier: BattleBattleGatesDestroyedByEngine
    Event: An engine has destroyed a gate
    Exports: unit
    Class: ET_BATTLE_GATES_DESTROYED_BY_ENGINE

    Identifier: BattleSpySuccess
    Event: A spy has successfully opened the gates
    Exports: unit
    Class: ET_BATTLE_SPY_SUCCESS


    Identifier: BattleWallsBreachedByEngine
    Event: A siege engine has knocked down a wall
    Exports: unit
    Class: ET_BATTLE_WALLS_BREACHED_BY_ENGINE

    Identifier: BattleWallsCaptured
    Event: A siege engine has knocked down a wall
    Exports: unit
    Class: ET_BATTLE_WALLS_CAPTURED

    Identifier: BattleFinished
    Event: The battle has finished
    Exports: unit
    Class: ET_BATTLE_FINISHED

    Identifier: BattleWinningPlaza
    Event: The plaza is being captured
    Exports: unit
    Class: ET_BATTLE_WINNING_PLAZA

    Identifier: BattleStopsWinningPlaza
    Event: The plaza capture has been stopped
    Exports: unit
    Class: ET_BATTLE_STOPS_WINNING_PLAZA

    Identifier: BattleDominatingPlaza
    Event: The enemy will have captured the plaza in 30s
    Exports: unit
    Class: ET_BATTLE_DOMINATING_PLAZA

    Identifier: BattngineUnmanned
    Event: A siege engine is now unmanned
    Exports: unit
    Class: ET_BATTLE_ENGINE_UNMANNED

    Identifier: BattleArmyHalfDestroyed
    Event: Half of an army has been destroyed
    Exports: army
    Class: ET_BATTLE_ARMY_HALF_DESTROYED

    Identifier: BattlePlayerArmyHalfDestroyed
    Event: Half of the player's army has been destroyed
    Exports: army
    Class: ET_BATTLE_PLAYER_ARMY_HALF_DESTROYED

    Identifier: BattnemyArmyHalfDestroyed
    Event: Half of the enemy's army has been destroyed
    Exports: army
    Class: ET_BATTLE_ENEMY_ARMY_HALF_DESTROYED

    Identifier: BattleArmyTired
    Event: The whole army is tired
    Exports: army
    Class: ET_BATTLE_ARMY_TIRED

    Identifier: BattlePlayerUnderAttackIdle
    Event: An idle unit is under missile fire
    Exports: unit
    Class: ET_BATTLE_PLAYER_UNDER_ATTACK_IDLE

    Identifier: BattleWinningCombat
    Event: A team has gained the advantage in combat
    Exports: army
    Class: ET_BATTLE_WINNING_COMBAT

    Identifier: BattleTideofBattle
    Event: A different team is now the strongest
    Exports: army
    Class: ET_BATTLE_TIDE_OF_BATTLE

    Identifier: FactionTurnStart
    Event: A Faction has started its turn
    Exports: faction
    Class: ET_FACTION_TURN_START

    Identifier: FactionNewCapital
    Event: A Faction has changed its capital
    Exports: faction
    Class: ET_FACTION_NEW_CAPITAL

    Identifier: FactionWarDeclared
    Event: War has been declared by faction on target_faction
    Exports: faction, target_faction, target_religion
    Class: ET_FACTION_WAR_DECLARED

    Identifier: FactionAllianceDeclared
    Event: An Alliance has been declared by faction on target_faction
    Exports: faction, target_faction, target_religion
    Class: ET_FACTION_ALLIANCE_DECLARED

    Identifier: InterFactionMarriage
    Event: A marriage has occured between two factions. gets fired for both factions involved
    Exports: faction, target_faction, target_religion
    Class: ET_INTER_FACTION_MARRIAGE

    Identifier: FactionTradeAgreementMade
    Event: A trade agreement has been made by faction on target_faction
    Exports: faction, target_faction, target_religion
    Class: ET_FACTION_TRADE_AGREEMENT_MADE

    Identifier: GiveMoney
    Event: Money has been given to another faction
    Exports: faction, target_faction, amount, target_religion
    Class: ET_GIVE_MONEY

    Identifier: PopeElected
    Event: A new pope has been elected
    Exports: faction, target_faction, target_religion
    Class: ET_POPE_ELECTED

    Identifier: VotedForPope
    Event: A Faction has voted for the new pope
    Exports: faction
    Class: ET_VOTED_FOR_POPE

    Identifier: FactionExcommunicated
    Event: A Faction has been excommunicated
    Exports: faction
    Class: ET_FACTION_EXCOMMUNICATED

    Identifier: FactionBreakAlliance
    Event: An alliance has been broken by faction on target_faction
    Exports: faction, target_faction, target_religion
    Class: ET_FACTION_BREAK_ALLIANCE

    Identifier: HordeFormed
    Event: A Faction has formed a horde
    Exports: faction
    Class: ET_FACTION_HORDE_FORMED

    Identifier: FactionTurnEnd
    Event: A Faction has ended its turn
    Exports: faction
    Class: ET_FACTION_TURN_END

    Identifier: HireMercenaries
    Event: A General has hired some mercenaries
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_HIRE_MERCENARIES

    Identifier: GeneralCaptureResidence
    Event: A General has captured a residence (fort, watchtower)
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_GENERAL_CAPTURE_RESIDENCE

    Identifier: GeneralCaptureSettlement
    Event: A General has captured a settlement
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_settlement, settlement, rsam
    Class: ET_GENERAL_CAPTURE_SETTLEMENT

    Identifier: LeaderDestroyedFaction
    Event: A faction has been destroyed
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_LEADER_DESTROYED_FACTION

    Identifier: Disaster
    Event: A disaster has happened
    Exports: event_type
    Class: ET_DISASTER

    Identifier: CharacterDamagedByDisaster
    Event: A character has been injured by a disaster
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_CHARACTER_DAMAGED_BY_DISASTER

    Identifier: EventCounter
    Event: An event counter has changed
    Exports: event_counter
    Class: ET_EVENT_COUNTER

    Identifier: GeneralAssaultsResidence
    Event: An assault has taken place
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_faction, target_region_id, target_religion
    Class: ET_GENERAL_ASSAULT_RESIDENCE

    Identifier: GeneralAssaultsGeneral
    Event: A general has attacked another general
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, target_character_record, target_character_type, target_faction, target_religion
    Class: ET_GENERAL_ASSAULT_GENERAL

    Identifier: OfferedForAdoption
    Event: An adoption has been proposed
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_OFFERED_FOR_ADOPTION

    Identifier: LesserGeneralOfferedForAdoption
    Event: An lesser general adoption has been proposed
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_LESSER_GENERAL_OFFERED_FOR_ADOPTION

    Identifier: OfferedForMarriage
    Event: An marriage offer has been proposed
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_OFFERED_FOR_MARRIAGE

    Identifier: BrotherAdopted
    Event: An brother has been adopted
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_BROTHER_ADOPTED

    Identifier: BecomesFactionLeader
    Event: The character has been made the faction leader
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_BECOMES_FACTION_LEADER

    Identifier: BecomesFactionHeir
    Event: The character has been made the faction heir
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_BECOMES_FACTION_HEIR

    Identifier: CeasedFactionLeader
    Event: The character is no longer faction leader
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_CEASED_FACTION_LEADER

    Identifier: CeasedFactionHeir
    Event: The character is no longer faction heir
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_CEASED_FACTION_HEIR

    Identifier: UngarrisonedFort
    Event: A fort is no longer garrisoned
    Exports: faction, fort, region_id
    Class: ET_UNGARRISONED_FORT

    Identifier: TileSeen
    Event: The tile has been seen by faction
    Exports: faction, region_id, sm_position
    Class: ET_TILE_SEEN_FACTION

    Identifier: ObjSeen
    Event: An object of target faction has been seen by faction
    Exports: faction, target_faction, region_id, sm_position
    Class: ET_OBJ_SEEN_FACTION

    Identifier: CrusadeCalled
    Event: A Crusade/Jihad has been called
    Exports: crusade, target_settlement, target_region_id, target_faction, target_religion
    Class: ET_CRUSADE_CALLED

    Identifier: CrusadeEnds
    Event: A Crusade/Jihad has ended
    Exports: crusade, target_settlement, target_region_id
    Class: ET_CRUSADE_ENDS

    Identifier: PopeAcceptsCrusadeTarget
    Event: The Pope has accepted the player's crusade target
    Exports: crusade, target_settlement, target_region_id, target_faction, target_religion
    Class: ET_POPE_ACCEPTS_CRUSADE

    Identifier: PopeRejectsCrusadeTarget
    Event: The Pope has rejected the player's crusade target
    Exports: crusade, target_settlement, target_region_id, target_faction, target_religion
    Class: ET_POPE_REJECTS_CRUSADE

    Identifier: UnitsDesertCrusade
    Event: Units have deserted a crusade/jihad
    Exports: faction, religion, crusade, target_settlement, target_region_id, target_faction, target_religion
    Class: ET_UNITS_DESERT_CRUSADE

    Identifier: ArmyTakesCrusadeTarget
    Event: Army has taken crusade/jihad target settlement
    Exports: army, faction, religion, region_id, sm_position, crusade, target_settlement, target_region_id, target_faction, target_religion
    Class: ET_ARMY_TAKES_CRUSADE_TARGET

    Identifier: Transgression
    Event: A faction to faction transgression has occurred
    Exports: faction, target_faction, resource_description
    Class: ET_TRANSGRESSION

    Identifier: DishonestTransgression
    Event: A global dishonest transgression has occurred
    Exports: faction, resource_description
    Class: ET_DISHONEST_TRANSGRESSION

    Identifier: Forgiveness
    Event: A faction to faction forgiveness has occurred
    Exports: faction, target_faction, resource_description
    Class: ET_FORGIVENESS

    Identifier: UpdateAttitude
    Event: A faction to faction attitude update has occurred (once every round)
    Exports: faction, target_faction
    Class: ET_UPDATE_ATTITUDE

    Identifier: Demeanour
    Event: A demeanour response has occured in diplomacy talks
    Exports: faction, target_faction, amount, target_religion
    Class: ET_DEMEANOUR

    Identifier: Birth
    Event: A child is born to the faction leader
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_BIRTH

    Identifier: CharacterComesOfAge
    Event: A Character has come of age
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_COMING_OF_AGE

    Identifier: CharacterMarries
    Event: A Character has married
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_MARRIAGE

    Identifier: CharacterMarriesPrincess
    Event: A Character has married a princess
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_PRINCESS_MARRIAGE

    Identifier: MarriageAlliancePosssible
    Event: A marriage alliance is possible
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_MARRIAGE_ALLIANCE_POSSIBLE

    Identifier: MarriageAllianceOffered
    Event: A marriage alliance has been offered
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_MARRIAGE_ALLIANCE_OFFERED

    Identifier: PriestBecomesHeretic
    Event: A priest has gone mad
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_PRIEST_BECOMES_HERETIC

    Identifier: CharacterNearHeretic
    Event: A character is adjacent to a heretic
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_CHARACTER_NEAR_HERETIC

    Identifier: CharacterNearWitch
    Event: A character is adjacent to a witch
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_CHARACTER_NEAR_WITCH

    Identifier: CardinalPromoted
    Event: A character has been promoted to a cardinal
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_CARDINAL_PROMOTED

    Identifier: CardinalRemoved
    Event: A cardinal has been removed from the game
    Exports: faction
    Class: ET_CARDINAL_REMOVED

    Identifier: InquisitorAppointed
    Event: An inquisitor has been dispatched to a region
    Exports: faction
    Class: ET_INQUISITOR_APPOINTED

    Identifier: CharacterBecomesAFather
    Event: A Character has become a father
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_BECOMES_FATHER

    Identifier: CharacterTurnStart
    Event: A Character has started its turn
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_CHARACTER_TURN_START

    Identifier: CharacterTurnEnd
    Event: A Character has finished its turn
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement
    Class: ET_CHARACTER_TURN_END

    Identifier: CharacterTurnEndInSettlement
    Event: A Character has finished its turn
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement
    Class: ET_CHARACTER_TURN_END_IN_SETTLEMENT

    Identifier: GeneralDevastatesTile
    Event: A General and his army has devastated an enemy's fertile land
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement
    Class: ET_GENERAL_DEVASTATES_TILE

    Identifier: GeneralJoinCrusade
    Event: A General has been sent on Crusade/Jihad
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, crusade, target_settlement, target_region_id, target_faction, target_religion
    Class: ET_GENERAL_JOIN_CRUSADE

    Identifier: GeneralAbandonCrusade
    Event: A General has left the Crusade/Jihad
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, crusade, target_settlement, target_region_id, target_faction, target_religion
    Class: ET_GENERAL_ABANDON_CRUSADE

    Identifier: GeneralArrivesCrusadeTargetRegion
    Event: A General has arrived in the Crusade/Jihad target region
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, army, crusade, target_settlement, target_region_id, target_faction, target_religion
    Class: ET_GENERAL_ARRIVES_CRUSADE_TARGET_REGION

    Identifier: GeneralTakesCrusadeTarget
    Event: A General has taken the Crusade/Jihad target settlement
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, crusade, target_settlement, target_region_id, target_faction, target_religion
    Class: ET_GENERAL_TAKES_CRUSADE_TARGET

    Identifier: FatherDiesNatural
    Event: A character father died of natural causes
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion
    Class: ET_FATHER_DIES_NATURAL

    Identifier: CharacterAttacksCrusadingGeneral
    Event: A general on crusade/jihad has been attacked by other character (it includes crusading generals attacked in a residence or on navy and generals attacked by spotted and killed assassin)
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, target_character_record, target_character_type, target_faction, target_religion
    Class: ET_CHARACTER_ATTACKS_CRUSADING_GENERAL

    Identifier: GeneralPrisonersRansomedCaptor
    Event: A General of a captor faction has made a ransom decision
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, target_faction, target_religion, captured_faction_info, ransom_type
    Class: ET_GENERAL_PRISONERS_RANSOMED_CAPTOR

    Identifier: GeneralPrisonersRansomedCaptive
    Event: A General of a captive faction has made a ransom decision
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, target_faction, target_religion, captured_faction_info, ransom_type
    Class: ET_GENERAL_PRISONERS_RANSOMED_CAPTIVE

    Identifier: FactionLeaderPrisonersRansomedCaptor
    Event: A captor faction has made a ransom decision
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, target_faction, target_religion, captured_faction_info, ransom_type
    Class: ET_FACTION_LEADER_PRISONERS_RANSOMED_CAPTOR

    Identifier: FactionLeaderPrisonersRansomedCaptive
    Event: A captive faction has made a ransom decision
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion, target_faction, target_religion, captured_faction_info, ransom_type
    Class: ET_FACTION_LEADER_PRISONERS_RANSOMED_CAPTIVE

    Identifier: CapturedCharacterRansomed
    Event: A captured character has been successfully ransomed back from the enemy
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion
    Class: ET_CAPTURED_CHARACTER_RANSOMED

    Identifier: CapturedCharacterReleased
    Event: A captured character has been released by the enemy
    Exports: nc_character_record, character_record, faction, region_id, character_type, religion
    Class: ET_CAPTURED_CHARACTER_RELEASED

    Identifier: SpyMission
    Event: A spy mission has completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_faction, mission_success_level, target_religion
    Class: ET_SPY_MISSION

    Identifier: ExecutesASpyOnAMission
    Event: An spying mission has failed and the spy is executed by the target
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_EXECUTES_A_SPY_ON_A_MISSION

    Identifier: LeaderOrderedSpyingMission
    Event: A Faction leader has ordered a spying mission
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_faction, mission_success_level, target_religion
    Class: ET_LEADER_ORDERED_SPYING_MISSION

    Identifier: AssassinationMission
    Event: An assassination mission has completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, mission_success_level
    Class: ET_ASSASSINATION_MISSION

    Identifier: ExecutesAnAssassinOnAMission
    Event: An assassination mission has failed and the assassin is executed by the target
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_EXECUTES_AN_ASSASSIN_ON_A_MISSION

    Identifier: AssassinCaughtAttackingPope
    Event: An assassination mission against the pope has failed and the assassin is executed
    Exports: faction
    Class: ET_ASSASSIN_CAUGHT_ATTACKING_POPE

    Identifier: LeaderOrderedAssassination
    Event: A Faction leader has ordered an assassination mission
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_faction, mission_success_level
    Class: ET_LEADER_ORDERED_ASSASSINATION_MISSION

    Identifier: SufferAssassinationAttempt
    Event: Someone has had an attempt on their life
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_SUFFER_ASSASSINATION_ATTEMPT

    Identifier: AcquisitionMission
    Event: An acquisition mission has completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, mission_success_level, success_prob
    Class: ET_ACQUISITION_MISSION

    Identifier: SufferAcquisitionAttempt
    Event: Someone has had an attempt on their assets
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_SUFFER_ACQUISITION_ATTEMPT

    Identifier: MarriageMission
    Event: A marriage mission has completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, mission_success_level, success_prob
    Class: ET_MARRIAGE_MISSION

    Identifier: SufferMarriageAttempt
    Event: Someone has had an attempt on their bachelorhood
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_SUFFER_MARRIAGE_ATTEMPT

    Identifier: DenouncementMission
    Event: A denouncement mission has completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, mission_success_level, success_prob
    Class: ET_DENOUNCEMENT_MISSION

    Identifier: SufferDenouncementAttempt
    Event: Someone has had a denouncement attempt
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_SUFFER_DENOUNCEMENT_ATTEMPT

    Identifier: SabotageMission
    Event: A sabotage mission has completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, mission_success_level
    Class: ET_SABOTAGE_MISSION

    Identifier: LeaderOrderedSabotage
    Event: A Faction leader has ordered a sabotage mission
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_LEADER_ORDERED_SABOTAGE_MISSION

    Identifier: BriberyMission
    Event: A bribery mission has completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_faction, mission_success_level, target_religion
    Class: ET_BRIBERY_MISSION

    Identifier: LeaderOrderedBribery
    Event: A Faction leader has ordered a bribery mission
    Exports: nc_character_record, character_record, faction, region_id, character_type


    Identifier: AcceptBribe
    Event: Someone has been bribed
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_ACCEPT_BRIBE

    Identifier: RefuseBribe
    Event: Someone has refused a bribe
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_REFUSE_BRIBE

    Identifier: Insurrection
    Event: Insurgence has been provoked
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_INSURRECTION

    Identifier: DiplomacyMission
    Event: A diplomacy mission has completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_faction, mission_success_level, target_religion
    Class: ET_DIPLOMACY_MISSION

    Identifier: LeaderOrderedDiplomacy
    Event: A Faction leader has ordered a diplomacy mission
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_LEADER_ORDERED_DIPLOMACY_MISSION

    Identifier: LeaderMissionSuccess
    Event: A mission has been completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, mission_details
    Class: ET_LEADER_MISSION_SUCCESS

    Identifier: LeaderMissionFailed
    Event: A mission has failed
    Exports: nc_character_record, character_record, faction, region_id, character_type, mission_details
    Class: ET_LEADER_MISSION_FAILED

    Identifier: SettlementTurnStart
    Event: A Settlement is being processed for the start of its faction's turn
    Exports: faction, settlement, region_id
    Class: ET_SETTLEMENT_TURN_START

    Identifier: SettlementTurnEnd
    Event: A Settlement is being processed for the end of its faction's turn
    Exports: faction, settlement, region_id
    Class: ET_SETTLEMENT_TURN_END

    Identifier: NewAdmiralCreated
    Event: A new admiral has been created for a new ship
    Exports: faction, settlement, character
    Class: ET_NEW_ADMIRAL_CREATED

    Identifier: UnitTrained
    Event: A unit has been trained
    Exports: faction, settlement, resource_description, unit
    Class: ET_UNIT_TRAINED

    Identifier: GovernorUnitTrained
    Event: A unit has been trained
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement, resource_description, unit
    Class: ET_GOVERNOR_UNIT_TRAINED

    Identifier: BuildingCompleted
    Event: A building has been completed
    Exports: faction, settlement, prior_build, advised_build
    Class: ET_BUILDING_COMPLETED

    Identifier: GovernorBuildingCompleted
    Event: A building has been completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement, prior_build, advised_build
    Class: ET_GOVERNOR_BUILDING_COMPLETED

    Identifier: PlugInCompleted
    Event: A plugin has been completed
    Exports: faction, settlement, region_id, prior_build, advised_build
    Class: ET_PLUG_IN_COMPLETED

    Identifier: GovernorPlugInCompleted
    Event: A plugin has been completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, prior_build
    Class: ET_GOVERNOR_PLUG_IN_COMPLETED

    Identifier: AgentCreated
    Event: An agent has been trained
    Exports: character_record, character_type, settlement, faction
    Class: ET_AGENT_CREATED

    Identifier: GovernorAgentCreated
    Event: An agent has been trained
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement
    Class: ET_GOVERNOR_AGENT_CREATED

    Identifier: BuildingDestroyed
    Event: A building has been destroyed
    Exports: faction, settlement, region_id, resource_description
    Class: ET_BUILDING_DESTROYED

    Identifier: AddedToBuildingQueue
    Event: A building has been added to the construction queue
    Exports: faction, settlement, region_id, resource_description
    Class: ET_ADDED_TO_BUILDING_QUEUE

    Identifier: AddedToTrainingQueue
    Event: A building has been added to the training queue
    Exports: faction, settlement, region_id, resource_description
    Class: ET_ADDED_TO_TRAINING_QUEUE

    Identifier: GovernorBuildingDestroyed
    Event: A building has been destroyed
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_GOVERNOR_BUILDING_DESTROYED

    Identifier: CityRiots
    Event: A settlement has rioted
    Exports: faction, settlement, region_id, target_faction, target_religion
    Class: ET_SETTLEMENT_RIOTS

    Identifier: GiveSettlement
    Event: A settlement has been given to another faction
    Exports: faction, settlement, region_id, target_faction, target_religion
    Class: ET_GIVE_SETTLEMENT

    Identifier: GovernorCityRiots
    Event: A settlement has rioted
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement, target_faction, target_religion
    Class: ET_GOVERNOR_SETTLEMENT_RIOTS

    Identifier: CityRebels
    Event: A settlement has rebelled
    Exports: faction, settlement, region_id, target_faction, target_religion
    Class: ET_SETTLEMENT_REBELS

    Identifier: GovernorCityRebels
    Event: A settlement has rebelled
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement, target_faction, target_religion
    Class: ET_GOVERNOR_SETTLEMENT_REBELS

    Identifier: GovernorThrowGames
    Event: Games have been thrown
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement
    Class: ET_GOVERNOR_THROW_GAMES

    Identifier: GovernorThrowRaces
    Event: Races have been thrown
    Exports: nc_character_record, character_record, faction, region_id, character_type, settlement
    Class: ET_GOVERNOR_THROW_RACES

    Identifier: UngarrisonedSettlement
    Event: A settlement is no longer garrisoned
    Exports: faction, settlement, region_id
    Class: ET_UNGARRISONED_SETTLEMENT

    Identifier: OccupySettlement
    Event: A settlement has been captured and occupied
    Exports: nc_character_record, character_record, faction, target_faction, region_id, character_type, target_religion
    Class: ET_OCCUPY_SETTLEMENT

    Identifier: SackSettlement
    Event: A settlement has been captured and sacked
    Exports: nc_character_record, character_record, faction, target_faction, region_id, character_type, target_religion
    Class: ET_SACK_SETTLEMENT

    Identifier: ExterminatePopulation
    Event: A settlement has been captured and some of its population has been decimated
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_faction, target_religion
    Class: ET_EXTERMINATE_POPULATION

    Identifier: CitySacked
    Event: A settlement has been razed
    Exports: faction, settlement, region_id, target_faction, target_religion
    Class: ET_SETTLEMENT_RAZED

    Identifier: SettlementUpgraded
    Event: A settlement has been upgraded
    Exports: faction, settlement, region_id
    Class: ET_SETTLEMENT_UPGRADED

    Identifier: SettlementConverted
    Event: A settlement has been converted
    Exports: faction, settlement, region_id
    Class: ET_SETTLEMENT_CONVERTED

    Identifier: GuildUpgraded
    Event: A guild has been created/upgraded
    Exports: faction, settlement, region_id
    Class: ET_GUILD_UPGRADED

    Identifier: GuildDestroyed
    Event: A guild has been destroyed
    Exports: faction, settlement, region_id
    Class: ET_GUILD_DESTROYED

    Identifier: SiegeEquipmentCompleted
    Event: A seige equipmqnt has been completed by one of sieging army
    Exports: faction, settlement, region_id, religion
    Class: ET_SIEGE_EQUIPMENT_COMPLETED

    Identifier: CharacterSelected
    Event: The player has selected a character
    Exports: nc_character_record, character_record, faction, region_id, character_type, character_action_advice, target_settlement
    Class: ET_CHARACTER_SELECTED

    Identifier: EnemyCharacterSelected
    Event: The player has selected an enemy character
    Exports: nc_character_record, character_record
    Class: ET_ENEMY_CHARACTER_SELECTED

    Identifier: SettlementSelected
    Event: The player has selected a settlement
    Exports: faction, settlement, region_id, best_finance_option
    Class: ET_SETTLEMENT_SELECTED

    Identifier: MultiTurnMove
    Event: The player has selected a position beyond the character's extents
    Exports: nc_character_record, character_record, faction, region_id, character_type
    Class: ET_MULTI_TURN_MOVE

    Identifier: CharacterPanelOpen
    Event: The player has opened the panel for the selected character
    Exports: character_record, faction, region_id, character_type
    Class: ET_CHARACTER_PANEL_OPEN

    Identifier: SettlementPanelOpen
    Event: The player has opened the panel for the selected settlement
    Exports: faction, settlement, region_id, best_finance_option
    Class: ET_SETTLEMENT_PANEL_OPEN

    Identifier: FinancesPanelOpen
    Event: The player has opened his finances panel
    Exports: faction
    Class: ET_FINANCES_PANEL_OPEN

    Identifier: FactionSummaryPanelOpen
    Event: The player has opened the faction summary panel
    Exports: faction
    Class: ET_FACTION_SUMMARY_PANEL_OPEN

    Identifier: FamilyTreePanelOpen
    Event: The player has opened the family tree panel
    Exports: faction
    Class: ET_FAMILY_TREE_PANEL_OPEN

    Identifier: DiplomaticStandingPanelOpen
    Event: The player has opened the diplomatic standing panel
    Exports:
    Class: ET_DIPLOMATIC_STANDING_PANEL_OPEN

    Identifier: CollegeOfCardinalsPanelOpen
    Event: The player has opened the college of cardinals panel
    Exports:
    Class: ET_COLLEGE_OF_CARDINALS_PANEL_OPEN

    Identifier: DiplomacyPanelOpen
    Event: The player has opened a diplomacy panel
    Exports: faction
    Class: ET_DIPLOMACY_PANEL_OPEN

    Identifier: PreBattlePanelOpen
    Event: The player has attacked an army or settlement. The decision panel is now open.
    Exports: faction
    Class: ET_PRE_BATTLE_PANEL_OPEN

    Identifier: RecruitmentPanelOpen
    Event: The player has opened a recruitment panel
    Exports: faction, settlement, region_id
    Class: ET_RECRUITMENT_PANEL_OPEN

    Identifier: ConstructionPanelOpen
    Event: The player has opened a construction panel
    Exports: faction, settlement, region_id
    Class: ET_CONSTRUCTION_PANEL_OPEN

    Identifier: TradePanelOpen
    Event: The player has opened a trade panel
    Exports: faction, settlement, region_id
    Class: ET_TRADE_PANEL_OPEN

    Identifier: HireMercenariesPanelOpen
    Event: The player has opened a hire mercenaries panel
    Exports:
    Class: ET_HIRE_MERCENARIES_PANEL_OPEN

    Identifier: NavalAutoResolvePanelOpen
    Event: The naval auto resolve panel has opened
    Exports:
    Class: ET_NAVAL_AUTO_RESOLVE_PANEL_OPEN

    Identifier: IncomingMessage
    Event: A message has arrived for the player
    Exports: faction, event
    Class: ET_INCOMING_MESSAGE

    Identifier: MessageOpen
    Event: The player has opened a message
    Exports: faction, event
    Class: ET_MESSAGE_OPEN

    Identifier: MessageClosed
    Event: The player has closed a message
    Exports: event
    Class: ET_MESSAGE_CLOSED

    Identifier: RequestBuildingAdvice
    Event: The player has requested building advice
    Exports: faction, settlement, region_id, advised_build
    Class: ET_BUILDING_ADVICE

    Identifier: RequestTrainingAdvice
    Event: The player has requested training advice
    Exports: faction, settlement, region_id, resource_description
    Class: ET_TRAINING_ADVICE

    Identifier: RequestMercenariesAdvice
    Event: The player has requested mercenaries advice
    Exports: army
    Class: ET_MERCENARIES_ADVICE

    Identifier: ButtonPressed
    Event: The player has clicked on a button
    Exports: resource_description
    Class: ET_BUTTON_PRESSED

    Identifier: ShortcutTriggered
    Event: The player triggered a keyboard shortcut
    Exports: resource_description
    Class: ET_SHORTCUT_TRIGGERED

    Identifier: UIElementVisible
    Event: A special UI Element is visible
    Exports: resource_description
    Class: ET_UI_ELEMENT_VISIBLE

    Identifier: ScrollOpened
    Event: The player opened a scroll
    Exports: resource_description
    Class: ET_SCROLL_OPENED

    Identifier: ScrollClosed
    Event: The player closed a scroll
    Exports: resource_description
    Class: ET_SCROLL_CLOSED

    Identifier: AdviceSupressed
    Event: The player has suppressed a piece of advice
    Exports: resource_description
    Class: ET_ADVICE_SUPPRESSED

    Identifier: ScrollAdviceRequested
    Event: The player has requested advice on a scroll
    Exports: resource_description
    Class: ET_SCROLL_ADVICE_REQUESTED

    Identifier: PreBattleScrollAdviceRequested
    Event: The player has requested advice on the prebattle scroll
    Exports: none
    Class: ET_PREBATTLE_SCROLL_ADVICE_REQUESTED

    Identifier: NavalPreBattleScrollAdviceRequested
    Event: The player has requested advice on the naval prebattle scroll
    Exports: none
    Class: ET_NAVAL_PREBATTLE_SCROLL_ADVICE_REQUESTED

    Identifier: SettlementScrollAdviceRequested
    Event: The player has requested advice on the settlement scroll
    Exports: faction, settlement, region_id, resource_description
    Class: ET_SETTLEMENT_SCROLL_ADVICE_REQUESTED

    Identifier: Idle
    Event: The player has remained idle for some time (Not implemented)
    Exports:
    Class: ET_IDLE

    Identifier: AbandonShowMe
    Event: The player has abandoned a show me scipt
    Exports:
    Class: ET_ABANDON_SHOW_ME

    Identifier: ScriptedAdvice
    Event: The player has been issued with advice by a script
    Exports: none
    Class: ET_SCRIPTED_ADVICE

    Identifier: DeclineAuatedSettlementManagement
    Event: The player has declined auated settlement management
    Exports: faction, settlement, best_finance_option
    Class: ET_DECLINE_AUATED_SETTLEMENT_MANAGEMENT

    Identifier: EscPressed
    Event: The escape key has been pressed. This trigger will only fire if the command StealEscKey has been used
    Exports: none
    Class: ET_ESC_PRESSED

    Identifier: GameReloaded
    Event: A strat map game has been reloaded
    Exports: none
    Class: ET_GAME_RELOADED


    Kingdoms Events Pulled from the official Kingdoms docudemons, some are updated, some are completely new.

    Identifier: PreFactionTurnStart
    Event: A Faction is about to start its turn
    Exports: faction
    Class: ET_PRE_FACTION_TURN_START

    Identifier: GeneralCaptureSettlement
    Event: A General has captured a settlement
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_settlement, settlement, target_faction, rsam
    Class: ET_GENERAL_CAPTURE_SETTLEMENT

    Identifier: UnitDisbanded
    Event: A unit has been disbanded
    Exports: faction, resource_description, unit
    Class: ET_UNIT_DISBANDED

    Identifier: SpyMission
    Event: A spy mission has completed May also export fort or settlement if target was a garrison residence.
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_faction, mission_success_level, target_religion, fort, settlement
    Class: ET_SPY_MISSION

    Identifier: LeaderOrderedSpyingMission
    Event: A Faction leader has ordered a spying mission. May also export fort or settlement if target was a garrison residence.
    Exports: nc_character_record, character_record, faction, region_id, character_type, target_faction, mission_success_level, target_religion, success_prob, fort, settlement
    Class: ET_LEADER_ORDERED_SPYING_MISSION

    Identifier: SabotageMission
    Event: A sabotage mission has completed
    Exports: nc_character_record, character_record, faction, region_id, character_type, mission_success_level, success_prob
    Class: ET_SABOTAGE_MISSION

    Identifier: MissionFinished
    Event: A mission has finished (failed, succeeded or expired)
    Exports: faction, mission_details
    Class: ET_MISSION_FINISHED

    Identifier: GuildUpgraded
    Event: A guild has been created/upgraded
    Exports: faction, settlement, region_id, resource_description
    Class: ET_GUILD_UPGRADED
    [Modificato da The Housekeeper 06/03/2012 18:41]
  • OFFLINE
    The Housekeeper
    Post: 21.194
    Registrato il: 10/02/2007
    Principe

    00 06/03/2012 18:42
    CONDITIONS (PART 1)


    "Triggers are data objects consisting of an event on which to test, a number of conditions, and a list of effects. These effects can be upon character traits
    or upon advice, although this could easily be extended to other domains of activity such as the world, the empire, diplomacy &c.

    The triggers themselves are not encoded in the project - they are read in from an external file and instantiations of triggers are stored in an array indexed
    by their event.

    If you wish to add new triggers, consult the list of extant triggers and see if you are merely redefining a trigger that already exists. You can do this by
    examining the advice and VnV spreadsheets. If you are satisfied that this is indeed a new trigger, ask yourself when the trigger should be tested, and under
    what conditions the trigger should fire. If either the condition or the event is unavailable, request from Guy that they be added to the set.

    Conditions which take no logic_token in their parameter list can be negated by prepending them with not, e.g. not WonBattle

    The events are in events.txt. This document contains the current set of conditions. They are:"


    Identifier: I_InBattle
    Trigger requirements:
    Parameters: None
    Sample use: InBattle
    Description: Are we in battle?
    Battle or Strat: Either
    Class: IN_BATTLE

    Identifier: WonBattle
    Trigger requirements: character_record
    Parameters: None
    Sample use: WonBattle
    Description: Did the general win the battle just fought?
    Battle or Strat: Either
    Class: WON_BATTLE

    Identifier: I_WonBattle
    Trigger requirements:
    Parameters: None
    Sample use: I_WonBattle romans_julii
    Description: Did the faction win the battle just fought?
    Battle or Strat: Either
    Class: I_WON_BATTLE

    Identifier: Routs
    Trigger requirements: character_record
    Parameters: None
    Sample use: Routs
    Description: Did the general's unit rout in the battle just fought?
    Battle or Strat: Either
    Class: ROUTS

    Identifier: Ally_Routs
    Trigger requirements: character_record
    Parameters: None
    Sample use: Ally_Routs
    Description: Did any ally's general's units rout in the battle just fought?
    Battle or Strat: Either
    Class: ALLY_ROUTS

    Identifier: GeneralHPLostRatioinBattle
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: GeneralHPLostRatioinBattle > 35.8
    Description: Test to see what the HP lost ratio of the prior battle was
    Battle or Strat: Either
    Class: GENERALS_LOST_HP_RATIO_TEST

    Identifier: GeneralNumKillsInBattle
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: GeneralNumKillsInBattle > 4
    Description: Test to see how many kills the character scored in the prior battle was
    Battle or Strat: Either
    Class: GENERAL_ENEMIES_KILLED_TEST

    Identifier: GeneralFoughtInCombat
    Trigger requirements: character_record
    Parameters: None
    Sample use: GeneralFoughtInCombat
    Description: Test to see if the character entered combat in the prior battle
    Battle or Strat: Either
    Class: GENERAL_FOUGHT_IN_COMBAT

    Identifier: PercentageOfArmyKilled
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: PercentageOfArmyKilled > 35.8
    Description: Test to see what percentage of their men they lost in the prior battle
    Battle or Strat: Either
    Class: PERCENTAGE_OF_ARMY_KILLED_TEST

    Identifier: I_PercentageOfArmyKilled
    Trigger requirements:
    Parameters: alliance_index army_index logic_token percentage
    Sample use: I_PercentageOfArmyKilled 1 0 < 50
    Description: Tests the percentage of casualties taken by the specified army during this battle
    Battle or Strat: Battle
    Class: BATTLE_PERCENTAGE_OF_ARMY_KILLED

    Identifier: PercentageEnemyKilled
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: PercentageEnemyKilled > 35.8
    Description: Test to see what percentage of the enemy was killed in the prior battle
    Battle or Strat: Either
    Class: PERCENTAGE_OF_ENEMY_KILLED_TEST

    Identifier: PercentageBodyguardKilled
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: PercentageBodyguardKilled > 35.8
    Description: Test to see what percentage of their bodyguard was killed in the prior battle
    Battle or Strat: Either
    Class: PERCENTAGE_OF_GENERALS_UNIT_KILLED_TEST

    Identifier: PercentageRoutedOffField
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: PercentageRoutedOffField > 35.8
    Description: Test to see the percentage of the character's soldiers who routed
    Battle or Strat: Either
    Class: PERCENTAGE_ROUTED_OFF_FIELD_TEST

    Identifier: NumKilledGenerals
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: NumKilledGenerals > 3
    Description: Test to see how many generals were killed
    Battle or Strat: Either
    Class: GENERALS_ARMY_KILLED_GENERALS_TEST

    Identifier: PercentageUnitCategory
    Trigger requirements: character_record
    Parameters: unit category (infantry, cavalry, siege, non_combatant, ship, handler), logic token, test value
    Sample use: PercentageUnitCategory handler > 35.8
    Description: Test to see what percentage of the army were of a particular category
    Battle or Strat: Either
    Class: GENERALS_ARMY_PERCENTAGE_OF_UNIT_CATEGORY_TEST

    Identifier: NumFriendsInBattle
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: NumFriendsInBattle < 50
    Description: Test the number of soldiers and officers in allied armies
    Battle or Strat: Either
    Class: NUM_FRIENDS_IN_BATTLE_TEST

    Identifier: NumEnemiesInBattle
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: NumEnemiesInBattle > 300
    Description: Test the number of soldiers and officers in enemy armies
    Battle or Strat: Either
    Class: NUM_ENEMIES_IN_BATTLE_TEST

    Identifier: GeneralFoughtFaction
    Trigger requirements: character_record
    Parameters: faction type
    Sample use: GeneralFoughtFaction romans_julii
    Description: Test to see whether the opponent was of a particular faction in the prior battle
    Battle or Strat: Either
    Class: FOUGHT_FACTION

    Identifier: GeneralFoughtCulture
    Trigger requirements: character_record
    Parameters: culture type (roman, barbarian, carthaginian, greek, egyptian, eastern)
    Sample use: GeneralFoughtCulture greek
    Description: Test to see whether the opponent was of a particular culture in the prior battle
    Battle or Strat: Either
    Class: FOUGHT_CULTURE

    Identifier: I_ConflictType
    Trigger requirements:
    Parameters: conflict type (SuccessfulAmbush, FailedAmbush, Normal, Siege, SallyBesieger, Naval, Withdraw)
    Sample use: I_ConflictType SuccessfulAmbush
    Description: Test the type of conflict (ambush, siege &c.)
    Battle or Strat: Either
    Class: BATTLE_CONFLICT_TYPE

    Identifier: IsNightBattle
    Trigger requirements:
    Parameters: None
    Sample use: IsNightBattle
    Description: Test if this is a night battle
    Battle or Strat: Either
    Class: IS_NIGHT_BATTLE

    Identifier: BattleSuccess
    Trigger requirements: character_record
    Parameters: success type (close, average, clear, crushing)
    Sample use: BattleSuccess = clear, BattleSuccess > close
    Description: Test the type of success
    Battle or Strat: Either
    Class: BATTLE_SUCCESS_TYPE

    Identifier: BattleOdds
    Trigger requirements: character_record
    Parameters: logic token, test value
    Sample use: BattleOdds > 5
    Description: Test the odds to win i.e. 5 (5:1)
    Battle or Strat: Either
    Class: BATTLE_ODDS_TEST

    Identifier: WasAttacker
    Trigger requirements: character_record
    Parameters: None
    Sample use: WasAttacker
    Description: Was the character the aggressor?
    Battle or Strat: Either
    Class: CHARACTER_WAS_ATTACKER

    Identifier: I_BattleAiAttacking
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattleAiAttacking
    Description: Is the enemy ai planning to attack the player?
    Battle or Strat: Battle
    Class: BATTLE_AI_ATTACKING

    Identifier: I_BattleAiAssaultingCrossing
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattleAiAssaultingCrossing
    Description: Is the enemy ai planning to assault the river crossing?
    Battle or Strat: Battle
    Class: BATTLE_AI_ASSAULTING_CROSSING

    Identifier: I_BattleAiAttackingSettlement
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattleAiAttackingSettlement
    Description: Is the enemy ai planning to attack the player's settlement?
    Battle or Strat: Battle
    Class: BATTLE_AI_ATTACKING_SETTLEMENT

    Identifier: I_BattleAiDefendingSettlement
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattleAiDefendingSettlement
    Description: Is the enemy ai planning to defend it's settlement?
    Battle or Strat: Battle
    Class: BATTLE_AI_DEFENDING_SETTLEMENT

    Identifier: I_BattleAiDefendingHill
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattleAiDefendingHill
    Description: Is the enemy ai planning to defend a hill?
    Battle or Strat: Battle
    Class: BATTLE_AI_DEFENDING_HILL

    Identifier: I_BattleAiDefendingCrossing
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattleAiDefendingCrossing
    Description: Is the enemy ai planning to defend a crossing?
    Battle or Strat: Battle
    Class: BATTLE_AI_DEFENDING_CROSSING

    Identifier: I_BattleAiScouting
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattleAiScouting
    Description: Is the enemy ai planning to scout?
    Battle or Strat: Battle
    Class: BATTLE_AI_SCOUTING

    Identifier: I_BattleIsRiverBattle
    Trigger requirements:
    Parameters: integer
    Sample use: I_BattleIsRiverBattle
    Description: Is this a river battle?
    Battle or Strat: Battle
    Class: BATTLE_IS_RIVER_BATTLE

    Identifier: I_BattleIsSiegeBattle
    Trigger requirements:
    Parameters: integer
    Sample use: I_BattleIsSiegeBattle
    Description: Is this a siege battle?
    Battle or Strat: Battle
    Class: BATTLE_IS_SIEGE_BATTLE

    Identifier: I_BattleIsSallyOutBattle
    Trigger requirements:
    Parameters: integer
    Sample use: I_BattleIsSallyOutBattle
    Description: Is this a sally out battle?
    Battle or Strat: Battle
    Class: BATTLE_IS_SALLY_OUT_BATTLE

    Identifier: I_BattleIsFortBattle
    Trigger requirements:
    Parameters: integer
    Sample use: I_BattleIsFortBattle
    Description: Is this a fort battle?
    Battle or Strat: Battle
    Class: BATTLE_IS_FORT_BATTLE

    Identifier: I_BattleAttackerNumSiegeEngines
    Trigger requirements:
    Parameters: siege_engine_class (tower, ram, ladder, sap_point)
    Sample use: I_BattleAttackerNumSiegeEngines ladder
    Description: How many of this engine type are present?
    Battle or Strat: Battle
    Class: BATTLE_ATTACKER_NUM_SIEGE_ENGINES

    Identifier: I_BattleAttackerNumArtilleryCanPenetrateWalls
    Trigger requirements:
    Parameters: logic token, number
    Sample use: I_BattleAttackerNumArtilleryCanPenetrateWalls > 5
    Description: How many of the attackers artillery can penetrate the siege walls
    Battle or Strat: Battle
    Class: BATTLE_ATTACKER_NUM_ARTILLERY_CAN_PENETRATE_WALLS

    Identifier: I_BattleDefenderNumNonMissileUnitsOnWalls
    Trigger requirements:
    Parameters: logic token, number
    Sample use: I_BattleDefenderNumNonMissileUnitsOnWalls > 5
    Description: How many of the defenders non-missile units are on the walls
    Battle or Strat: Battle
    Class: BATTLE_DEFENDER_NUM_NON_MISSILE_UNITS_ON_WALLS

    Identifier: I_BattleDefenderNumMissileUnitsOnWalls
    Trigger requirements:
    Parameters: logic token, number
    Sample use: I_BattleDefenderNumMissileUnitsOnWalls > 5
    Description: How many of the defenders missile units are on the walls
    Battle or Strat: Battle
    Class: BATTLE_DEFENDER_NUM_MISSILE_UNITS_ON_WALLS

    Identifier: I_BattleSettlementWallsBreached
    Trigger requirements:
    Parameters: none
    Sample use: I_BattleSettlementWallsBreached
    Description: Have the walls of the settlement been breached?
    Battle or Strat: Battle
    Class: BATTLE_SETTLEMENT_WALLS_BREACHED

    Identifier: I_BattleSettlementGateDestroyed
    Trigger requirements:
    Parameters: none
    Sample use: I_BattleSettlementGateDestroyed
    Description: Has a gate in the settlement been destroyed?
    Battle or Strat: Battle
    Class: BATTLE_SETTLEMENT_GATE_DESTROYED

    Identifier: I_BattleSettlementTowerDefence
    Trigger requirements:
    Parameters: tower defence type (arrow_tower, ballista_tower, none)
    Sample use: not I_BattleSettlementTowerDefence arrow_tower
    Description: What type of tower defence is this settlement equipped with?
    Battle or Strat: Battle
    Class: BATTLE_SETTLEMENT_TOWER_DEFENCE

    Identifier: I_BattleSettlementFortificationLevel
    Trigger requirements:
    Parameters: wall level (none, 0, 1, 2, 3, 4)
    Sample use: I_BattleSettlementFortificationLevel > 0
    Description: What is the fortification level of this settlement?
    Battle or Strat: Battle
    Class: BATTLE_SETTLEMENT_FORTIFICATION_LEVEL

    Identifier: BattleBuildingType
    Trigger requirements:
    Parameters: building type (ambient, major, wall, tower, gate)
    Sample use: BattleBuildingType = wall
    Description: What type of building is this?
    Battle or Strat: Battle
    Class: BATTLE_BUILDING_TYPE

    Identifier: I_BattleSettlementGateStrength
    Trigger requirements:
    Parameters: gate strength (0..2)
    Sample use: I_BattleSettlementGateStrength > 2
    Description: What is the strength of the settlement gates?
    Battle or Strat: Battle
    Class: BATTLE_SETTLEMENT_GATE_STRENGTH

    Identifier: I_BattleNumberOfRiverCrossings
    Trigger requirements:
    Parameters: integer
    Sample use: I_BattleNumberOfRiverCrossings > 1
    Description: How many river crossings are there on this map?
    Battle or Strat: Battle
    Class: BATTLE_NUMBER_OF_RIVER_CROSSINGS

    Identifier: BattlePlayerUnitClass
    Trigger requirements: player_unit
    Parameters: unit_class (heavy, light, skirmish, spearmen, missile)
    Sample use: BattlePlayerUnitClass = unit_class
    Description: What is the class of the player unit?
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_CLASS

    Identifier: BattnemyUnitClass
    Trigger requirements: enemy_unit
    Parameters: unit_class (heavy, light, skirmish, spearmen, missile)
    Sample use: BattnemyUnitClass = unit_class
    Description: What is the class of the enemy unit?
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_CLASS

    Identifier: BattlePlayerUnitCategory
    Trigger requirements: player_unit
    Parameters: unit category (infantry, cavalry, siege, non_combatant, ship, handler)
    Sample use: BattlePlayerUnitCategory = unit_category
    Description: What is the category of the player unit?
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_CATEGORY

    Identifier: BattnemyUnitCategory
    Trigger requirements: enemy_unit
    Parameters: unit category (infantry, cavalry, siege, non_combatant, ship, handler)
    Sample use: BattnemyUnitCategory = unit_category
    Description: What is the category of the enemy unit?
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_CATEGORY

    Identifier: BattlePlayerUnitSiegeEngineClass
    Trigger requirements: player_unit
    Parameters: siege engine category (catapult, trebuchet, ballista, scorpion, tower, ram, ladder, sap_point)
    Sample use: BattlePlayerUnitSiegeEngineClass = scorpion
    Description: What type of siege engine is the player unit?
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_SIEGE_ENGINE_CLASS

    Identifier: BattnemyUnitSiegeEngineClass
    Trigger requirements: enemy_unit
    Parameters: siege engine category (catapult, trebuchet, ballista, scorpion, tower, ram, ladder, sap_point)
    Sample use: BattnemyUnitSiegeEngineClass = scorpion
    Description: What type of siege engine is the enemy unit?
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_SIEGE_ENGINE_CLASS

    Identifier: BattlePlayerUnitOnWalls
    Trigger requirements: player_unit
    Parameters: none
    Sample use: BattlePlayerUnitOnWalls
    Description: Is the player unit on the walls?
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_ON_WALLS

    Identifier: BattnemyUnitOnWalls
    Trigger requirements: enemy_unit
    Parameters: none
    Sample use: BattnemyUnitOnWalls
    Description: Is the enemy unit on the walls?
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_ON_WALLS

    Identifier: BattlePlayerCurrentFormation
    Trigger requirements: player_unit
    Parameters: formation (horde, column, square, wedge, square_hollow, testudo, phalanx)
    Sample use: BattlePlayerCurrentFormation = phalanx
    Description: What is the current formation of the player unit?
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_CURRENT_FORMATION

    Identifier: BattnemyCurrentFormation
    Trigger requirements: enemy_unit
    Parameters: formation (horde, column, square, wedge, square_hollow, testudo, phalanx)
    Sample use: BattnemyCurrentFormation = unit_formation
    Description: What is the current formation of the enemy unit?
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_CURRENT_FORMATION

    Identifier: BattlePlayerUnitCloseFormation
    Trigger requirements: player_unit
    Parameters: none
    Sample use: BattlePlayerUnitCloseFormation
    Description: Is the player unit in close formation, otherwise loose?
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_CLOSE_FORMATION

    Identifier: BattleEnemyUnitCloseFormation
    Trigger requirements: enemy_unit
    Parameters: none
    Sample use: BattnemyUnitCloseFormation
    Description: Is the enemy unit in close formation, otherwise loose?
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_CLOSE_FORMATION

    Identifier: BattlePlayerUnitSpecialAbilitySupported
    Trigger requirements: player_unit
    Parameters: special_ability ( testudo, phalanx, wedge, drop_engines, flaming_ammo, warcry, chant, curse, beserk, rally,
    kill_elephants, move_and_shoot, cantabrian_circle, shield_wall, stealth, feigned_rout, schiltrom )
    Sample use: BattlePlayerUnitSpecialAbilitySupported = flaming_ammo
    Description: What special ability can the player unit support?
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_SPECIAL_ABILITY_SUPPORTED

    Identifier: BattnemyUnitSpecialAbilitySupported
    Trigger requirements: enemy_unit
    Parameters: special_ability ( testudo, phalanx, wedge, drop_engines, flaming_ammo, warcry, chant, curse, beserk, rally,
    kill_elephants, move_and_shoot, cantabrian_circle, shield_wall, stealth, feigned_rout, schiltrom )
    Sample use: BattnemyUnitSpecialAbilitySupported = flaming_ammo
    Description: What special ability can the enemy unit support?
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_SPECIAL_ABILITY_SUPPORTED

    Identifier: BattlePlayerUnitSpecialAbilityActive
    Trigger requirements: player_unit
    Parameters: none
    Sample use: BattlePlayerUnitSpecialAbilityActive
    Description: Is the player unit currently doing its special ability
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_SPECIAL_ABILITY_ACTIVE

    Identifier: BattnemyUnitSpecialAbilityActive
    Trigger requirements: enemy_unit
    Parameters: none
    Sample use: BattnemyUnitSpecialAbilityActive
    Description: Is the enemy unit currently doing its special ability
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_SPECIAL_ABILITY_ACTIVE

    Identifier: BattlePlayerMountClass
    Trigger requirements: player_unit
    Parameters: mount_class (horse, camel, elephant, chariot)
    Sample use: BattlePlayerMountClass = mount_class
    Description: What is the mount class of the player unit?
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_MOUNT_CLASS

    Identifier: BattnemyMountClass
    Trigger requirements: enemy_unit
    Parameters: mount_class (horse, camel, elephant, chariot)
    Sample use: BattnemyMountClass = mount_class
    Description: What is the mount class of the enemy unit?
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_MOUNT_CLASS

    Identifier: BattlePlayerUnitMeStrength
    Trigger requirements: player_unit
    Parameters: logic token, test value
    Sample use: BattlePlayerUnitMeStrength > 56.45
    Description: Compare the me strength of a unit with a known value
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_ME_STRENGTH

    Identifier: BattnemyUnitMeStrength
    Trigger requirements: enemy_unit
    Parameters: logic token, test value
    Sample use: BattnemyUnitMeStrength > 56.45
    Description: Compare the me strength of a unit with a known value
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_ME_STRENGTH

    Identifier: BattlePlayerUnitMissileStrength
    Trigger requirements: player_unit
    Parameters: logic token, test value
    Sample use: BattlePlayerUnitMissileStrength > 56.45
    Description: Compare the missile strength of a unit with a known value
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_MISSILE_STRENGTH

    Identifier: BattnemyUnitMissileStrength
    Trigger requirements: enemy_unit
    Parameters: logic token, test value
    Sample use: BattnemyUnitMissileStrength > 56.45
    Description: Compare the missile strength of a unit with a known value
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_MISSILE_STRENGTH

    Identifier: BattlePlayerUnitSpecialFormation
    Trigger requirements: player_unit
    Parameters: formation (horde, column, square, wedge, square_hollow, testudo, phalanx), test value
    Sample use: BattlePlayerUnitSpecialFormation = testudo
    Description: What is the special formation of the player unit
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_SPECIAL_FORMATION

    Identifier: BattnemyUnitSpecialFormation
    Trigger requirements: enemy_unit
    Parameters: formation (horde, column, square, wedge, square_hollow, testudo, phalanx), test value
    Sample use: BattnemyUnitSpecialFormation = testudo
    Description: What is the special formation of the enemy unit
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_SPECIAL_FORMATION

    Identifier: BattlePlayerUnitEngaged
    Trigger requirements: player_unit
    Parameters: None
    Sample use: BattlePlayerUnitEngaged
    Description: Is the player unit engaged in battle
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_ENGAGED

    Identifier: BattnemyUnitEngaged
    Trigger requirements: enemy_unit
    Parameters: None
    Sample use: BattnemyUnitEngaged
    Description: Is the enemy unit engaged in battle
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_ENGAGED

    Identifier: BattlePlayerActionStatus
    Trigger requirements: player_unit
    Parameters: Action status ( idling, hiding, ready, reforming, moving, withdrawing, missiles_firing, missiles_reloading,
    charging, fighting, pursuing, routing, fighting_backs_to_the_walls, running_amok, rallying, dead, leaving_battle,
    entering_battle, left_battle )
    Sample use: BattlePlayerActionStatus = moving
    Description: What is the current action status of the player unit
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ACTION_STATUS

    Identifier: BattnemyActionStatus
    Trigger requirements: enemy_unit
    Parameters: Action status ( idling, hiding, ready, reforming, moving, withdrawing, missiles_firing, missiles_reloading, charging,
    fighting, pursuing, routing, fighting_backs_to_the_walls, running_amok, rallying, dead, leaving_battle,
    entering_battle, left_battle )
    Sample use: BattnemyActionStatus = moving
    Description: What is the current action status of the player unit
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ACTION_STATUS

    Identifier: BattlePlayerUnitMovingFast
    Trigger requirements: player_unit
    Parameters: None
    Sample use: BattlePlayerUnitMovingFast
    Description: Is the player unit moving fast
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_UNIT_MOVING_FAST

    Identifier: BattnemyUnitMovingFast
    Trigger requirements: enemy_unit
    Parameters: None
    Sample use: BattnemyUnitMovingFast
    Description: Is the enemy unit moving fast
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_UNIT_MOVING_FAST

    Identifier: BattleRangeOfAttack
    Trigger requirements: player_unit, enemy_unit
    Parameters: logic token, test value
    Sample use: BattleRangeOfAttack > 56.45
    Description: Test the range of the attack (in m)
    Battle or Strat: Battle
    Class: BATTLE_RANGE_OF_ATTACK

    Identifier: BattleDirectionOfAttack
    Trigger requirements: infer_attacking_unit, infer_defending_unit
    Parameters: logic token, attack_dir (front, flank, rear)
    Sample use: BattleDirectionOfAttack = front
    Description: Test direction of the attack
    Battle or Strat: Battle
    Class: BATTLE_DIRECTION_OF_ATTACK

    Identifier: BattleIsMeAttack
    Trigger requirements: infer_attacking_unit
    Parameters: None
    Sample use: BattleIsMeAttack
    Description: Is the attacker initiating a me attack (otherwise missile attack)
    Battle or Strat: Battle
    Class: BATTLE_IS_ME_ATTACK

    Identifier: I_BattlePlayerArmyPercentageOfUnitClass
    Trigger requirements:
    Parameters: logic token, unit_class (heavy, light, skirmish, spearmen, missile), percentage
    Sample use: I_BattlePlayerArmyPercentageOfUnitClass missile > 50.0
    Description: Test makeup of army by unit class
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_PERCENTAGE_OF_UNIT_CLASS

    Identifier: I_BattnemyArmyPercentageOfUnitClass
    Trigger requirements:
    Parameters: logic token, unit_class (heavy, light, skirmish, spearmen, missile), percentage
    Sample use: I_BattnemyArmyPercentageOfUnitClass missile > 50.0
    Description: Test makeup of army by unit class
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_PERCENTAGE_OF_UNIT_CLASS

    Identifier: I_BattlePlayerArmyPercentageOfUnitCategory
    Trigger requirements:
    Parameters: logic token, unit category (infantry, cavalry, siege, non_combatant, ship, handler), percentage
    Sample use: I_BattlePlayerArmyPercentageOfUnitCategory missile > 50.0
    Description: Test makeup of army by unit category
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_PERCENTAGE_OF_UNIT_CATEGORY

    Identifier: I_BattnemyArmyPercentageOfUnitCategory
    Trigger requirements:
    Parameters: logic token, unit category (infantry, cavalry, siege, non_combatant, ship, handler), percentage
    Sample use: I_BattnemyArmyPercentageOfUnitCategory missile > 50.0
    Description: Test makeup of army by unit category
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_PERCENTAGE_OF_UNIT_CATEGORY

    Identifier: I_BattlePlayerArmyPercentageOfMountClass
    Trigger requirements:
    Parameters: logic token, mount_class (horse, camel, elephant, chariot), percentage
    Sample use: I_BattlePlayerArmyPercentageOfMountClass camel > 50.0
    Description: Test makeup of army by mount class
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_PERCENTAGE_OF_MOUNT_CLASS

    Identifier: I_BattnemyArmyPercentageOfMountClass
    Trigger requirements:
    Parameters: logic token, mount_class (horse, camel, elephant, chariot), percentage
    Sample use: I_BattnemyArmyPercentageOfMountClass camel > 50.0
    Description: Test makeup of army by mount class
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_PERCENTAGE_OF_MOUNT_CLASS

    Identifier: I_BattlePlayerArmyPercentageOfClassAndCategory
    Trigger requirements:
    Parameters: logic token, unit_class (heavy, light, skirmish, spearmen, missile), unit_category (infantry, cavalry, siege,
    non_combatant, ship, handler), percentage
    Sample use: I_BattlePlayerArmyPercentageOfClassAndCategory missile cavalry > 50.0
    Description: Test makeup of army by mount class
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_PERCENTAGE_OF_CLASS_AND_CATEGORY

    Identifier: I_BattnemyArmyPercentageOfClassAndCategory
    Trigger requirements:
    Parameters: logic token, unit_class (heavy, light, skirmish, spearmen, missile), unit_category (infantry, cavalry, siege,
    non_combatant, ship, handler), percentage
    Sample use: I_BattnemyArmyPercentageOfClassAndCategory missile cavalry > 50.0
    Description: Test makeup of army by mount class
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_PERCENTAGE_OF_CLASS_AND_CATEGORY

    Identifier: I_BattlePlayerArmyPercentageOfSpecialAbility
    Trigger requirements:
    Parameters: special_ability ( testudo, phalanx, wedge, drop_engines, flaming_ammo, warcry, chant, curse, beserk, rally,
    kill_elephants, move_and_shoot, cantabrian_circle, shield_wall, stealth, feigned_rout, schiltrom ), percentage
    Sample use: I_BattlePlayerArmyPercentageOfSpecialAbility testudo > 50.0
    Description: Test makeup of army by special ability
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_PERCENTAGE_OF_SPECIAL_ABILITY

    Identifier: I_BattnemyArmyPercentageOfSpecialAbility
    Trigger requirements:
    Parameters: special_ability ( testudo, phalanx, wedge, drop_engines, flaming_ammo, warcry, chant, curse, beserk, rally,
    kill_elephants, move_and_shoot, cantabrian_circle, shield_wall, stealth, feigned_rout, schiltrom ), percentage
    Sample use: I_BattnemyArmyPercentageOfSpecialAbility testudo > 50.0
    Description: Test makeup of army by special ability
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_PERCENTAGE_OF_SPECIAL_ABILITY

    Identifier: I_BattlePlayerArmyPercentageCanHide
    Trigger requirements:
    Parameters: logic token, hide_type (hide_forest, hide_improved_forest, hide_long_grass, hide_anywhere), percentage
    Sample use: I_BattlePlayerArmyPercentageCanHide hide_forest > 50.0
    Description: Test makeup of army by hide capability
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_PERCENTAGE_CAN_HIDE

    Identifier: I_BattnemyArmyPercentageCanHide
    Trigger requirements:
    Parameters: logic token, hide_type (hide_forest, hide_improved_forest, hide_long_grass, hide_anywhere), percentage
    Sample use: I_BattnemyArmyPercentageCanHide hide_forest > 50.0
    Description: Test makeup of army by hide capability
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_PERCENTAGE_CAN_HIDE

    Identifier: I_BattlePlayerArmyPercentageCanSwim
    Trigger requirements:
    Parameters: logic token, percentage
    Sample use: I_BattlePlayerArmyPercentageCanSwim > 50.0
    Description: Test makeup of army by swim capability
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_PERCENTAGE_CAN_SWIM

    Identifier: I_BattnemyArmyPercentageCanSwim
    Trigger requirements:
    Parameters: logic token, percentage
    Sample use: I_BattnemyArmyPercentageCanSwim > 50.0
    Description: Test makeup of army by swim capability
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_PERCENTAGE_CAN_SWIM

    Identifier: I_BattlePlayerArmyIsAttacker
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattlePlayerArmyIsAttacker
    Description: Is the player attacking
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_IS_ATTACKER

    Identifier: I_BattlePlayerAllianceOddsInFavour
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattlePlayerAllianceOddsInFavour > 5
    Description: Odds in favour of the player i.e. 5 (5:1)
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ALLIANCE_ODDS_IN_FAVOUR

    Identifier: I_BattlePlayerAllianceOddsAgainst
    Trigger requirements:
    Parameters: logic token
    Sample use: I_BattlePlayerAllianceOddsAgainst > 5
    Description: Odds against the player i.e. 5 (5:1)
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ALLIANCE_ODDS_AGAINST

    Identifier: TotalSiegeWeapons
    Trigger requirements: character_record
    Parameters: logic token, number
    Sample use: TotalSiegeWeapons = 0
    Description: Test to see how many siege weapons this characters army has got for an assault.
    Battle or Strat: Strat
    Class: TOTAL_NUMBER_OF_SIEGE_WEAPONS

    Identifier: I_BattleStarted
    Trigger requirements:
    Parameters: None
    Sample use: I_BattleStarted
    Description: Has the battle deployment phase ended
    Battle or Strat: Battle
    Class: HAS_BATTLE_STARTED

    Identifier: I_IsUnitMoveFastSet
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_IsUnitMoveFastSet roman_archers
    Description: Is the specified unit flagged to move fast
    Battle or Strat: Battle
    Class: IS_UNIT_MOVE_FAST_SET

    Identifier: I_IsUnitMoving
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_IsUnitMoving roman_archers
    Description: Is the specified unit moving
    Battle or Strat: Battle
    Class: IS_UNIT_MOVING

    Identifier: I_IsUnitIdle
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_IsUnitIdle roman_archers
    Description: Is the specified unit idle?
    Battle or Strat: Battle
    Class: IS_UNIT_IDLE

    Identifier: I_UnitStatus
    Trigger requirements:
    Parameters: unit_label, action_status
    Sample use: I_UnitStatus roman_archers, idling
    Description: Does the specified unit have certain status?
    Battle or Strat: Battle
    Class: IS_UNIT_STATUS

    Identifier: I_IsUnitRouting
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_IsUnitRouting roman_archers
    Description: Is the specified unit routing?
    Battle or Strat: Battle
    Class: IS_UNIT_ROUTING

    Identifier: I_IsUnitUnderFire
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_IsUnitUnderFire roman_general_unit
    Description: Is the specified unit recieving missile fire?
    Battle or Strat: Battle
    Class: IS_UNIT_UNDER_FIRE

    Identifier: I_IsUnitEngaged
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_IsUnitEngaged roman_archers
    Description: Is the specified unit engaged in combat?
    Battle or Strat: Battle
    Class: IS_UNIT_ENGAGED

    Identifier: I_IsUnitEngagedWithUnit
    Trigger requirements:
    Parameters: unit_label other_unit_label
    Sample use: I_IsUnitEngagedWithUnit roman_archers barb_cavalry
    Description: Tests if one specified unit is engaged in combat with the other specified unit?
    Battle or Strat: Battle
    Class: IS_UNIT_ENGAGED_WITH_UNIT

    Identifier: I_UnitFormation
    Trigger requirements:
    Parameters: unit_label logic_token formation_type
    Sample use: I_UnitFormation hoplites4 = phalanx
    Description: Is the specified unit in the specified formation
    Battle or Strat: Battle
    Class: UNIT_FORMATION

    Identifier: I_PercentageUnitKilled
    Trigger requirements:
    Parameters: unit_label logic_token percentage
    Sample use: I_PercentageUnitKilled roman_archers > 50
    Description: Tests the percentage of men lost from the specified unit
    Battle or Strat: Battle
    Class: PERCENTAGE_UNIT_KILLED

    Identifier: I_UnitPercentageAmmoLeft
    Trigger requirements:
    Parameters: unit_label logic_token percentage
    Sample use: I_UnitPercentageAmmoLeft roman_archers > 75
    Description: Tests the percentage of ammo the unit has remaining
    Battle or Strat: Battle
    Class: UNIT_PERCENTAGE_AMMO_LEFT

    Identifier: I_UnitDistanceFromPosition
    Trigger requirements:
    Parameters: unit_label pos_x pos_y logic_token distance
    Sample use: I_UnitDistanceFromPosition roman_archers 100 -60 < 20
    Description: Tests the specified unit's range from the given position
    Battle or Strat: Battle
    Class: UNIT_DISTANCE_FROM_POSITION

    Identifier: I_UnitOrderedToPosition
    Trigger requirements:
    Parameters: unit_label pos_x pos_y logic_token distance
    Sample use: I_UnitOrderedToPosition roman_archers 100 -60 < 20
    Description: Tests if the unit is moving to a location within a set radius
    Battle or Strat: Battle
    Class: UNIT_ORDERED_TO_POSITION

    Identifier: I_UnitDistanceFromLine
    Trigger requirements:
    Parameters: unit_label location_1 location_2 logic_token distance
    Sample use: I_UnitDistanceFromLine roman_archers river_line_A river_line_B < 20
    Description: Tests the specified unit's distance from the line (looking from A to B, a unit to the left of the line will give a negative
    distance, one on the right will be positive)
    Battle or Strat: Battle
    Class: UNIT_DISTANCE_FROM_LINE

    Identifier: I_UnitDistanceFromUnit
    Trigger requirements:
    Parameters: unit_label1 unit_label2 logic_token distance
    Sample use: I_UnitDistanceFromUnit roman_archers gaul_warband < 100
    Description: Tests the 2 specified units' distance from each other
    Battle or Strat: Battle
    Class: UNIT_DISTANCE_FROM_UNIT

    Identifier: I_UnitInRangeOfUnit
    Trigger requirements:
    Parameters: attacker_unit_label target_unit_label
    Sample use: I_UnitInRangeOfUnit roman_archers gaul_warband
    Description: Tests if the attacker can hit the target with missile weapons
    Battle or Strat: Battle
    Class: UNIT_IN_RANGE_OF_UNIT

    Identifier: I_UnitDestroyed
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_UnitDestroyed roman_archers
    Description: Has the specified unit been wiped out?
    Battle or Strat: Battle
    Class: UNIT_DESTROYED

    Identifier: I_UnitEnemyUnitInRadius
    Trigger requirements:
    Parameters: unit_label radius
    Sample use: I_UnitEnemyUnitInRadius roman_archers 100
    Description: Tests if there is any enemy within the specified radius of the unit
    Battle or Strat: Battle
    Class: UNIT_ENEMY_UNIT_IN_RADIUS

    Identifier: I_IsUnitGroupMoving
    Trigger requirements:
    Parameters: group_label
    Sample use: I_IsUnitGroupMoving group1
    Description: Is any unit in the group moving?
    Battle or Strat: Battle
    Class: IS_UNIT_GROUP_MOVING

    Identifier: I_IsUnitGroupEngaged
    Trigger requirements:
    Parameters: group_label
    Sample use: I_IsUnitGroupEngaged group1
    Description: Is any unit in the group engaged in combat?
    Battle or Strat: Battle
    Class: IS_UNIT_GROUP_ENGAGED

    Identifier: I_IsUnitGroupIdle
    Trigger requirements:
    Parameters: group_label
    Sample use: I_IsUnitGroupIdle group1
    Description: Are all units in the group idle?
    Battle or Strat: Battle
    Class: IS_UNIT_GROUP_IDLE

    Identifier: I_IsUnitGroupDestroyed
    Trigger requirements:
    Parameters: group_label
    Sample use: I_IsUnitGroupDestroyed group1
    Description: Is the unit group destroyed (killed or routed)
    Battle or Strat: Battle
    Class: IS_UNIT_GROUP_DESTROYED

    Identifier: I_PercentageUnitGroupKilled
    Trigger requirements:
    Parameters: group_label logic_token percentage
    Sample use: I_PercentageUnitGroupKilled roman_archers < 50
    Description: Tests the percentage of men lost from the unit group
    Battle or Strat: Battle
    Class: PERCENTAGE_UNIT_GROUP_KILLED

    Identifier: I_UnitGroupFormation
    Trigger requirements:
    Parameters: group_label logic_token formation_name
    Sample use: I_UnitGroupFormation roman_archers = ordered_triple_line_1
    Description: Tests the unit group's group formation
    Battle or Strat: Battle
    Class: UNIT_GROUP_FORMATION

    Identifier: I_UnitGroupDistanceFromPosition
    Trigger requirements:
    Parameters: group_label position logic_token distance
    Sample use: I_UnitGroupDistanceFromPosition roman_archers -20 -415 < 100
    Description: Tests the unit_group's centre_front against the given position
    Battle or Strat: Battle
    Class: UNIT_GROUP_DISTANCE_FROM_POSITION

    Identifier: I_UnitGroupDistanceFromGroup
    Trigger requirements:
    Parameters: group_label target_group_label logic_token distance
    Sample use: I_UnitGroupDistanceFromGroup roman_archers gaul_swordsmen < 50
    Description: Tests the distance between two unit groups
    Battle or Strat: Battle
    Class: UNIT_GROUP_DISTANCE_FROM_GROUP

    Identifier: I_UnitGroupInRangeOfUnit
    Trigger requirements:
    Parameters: group_label target_unit_label
    Sample use: I_UnitGroupInRangeOfUnit archer_group enemy_unit1
    Description: Tests if any unit in the group is within range of the target unit
    Battle or Strat: Battle
    Class: UNIT_GROUP_IN_RANGE_OF_UNIT

    Identifier: I_UnitInRangeOfUnitGroup
    Trigger requirements:
    Parameters: unit_label target_group_label
    Sample use: I_UnitInRangeOfUnitGroup roman_archers enemy_group3
    Description: Tests if the unit is within range of any of the units in the target group
    Battle or Strat: Battle
    Class: UNIT_IN_RANGE_OF_UNIT_GROUP

    Identifier: I_UnitGroupInRangeOfUnitGroup
    Trigger requirements:
    Parameters: group_label target_group_label
    Sample use: I_UnitGroupInRangeOfUnitGroup archer_group2 enemy_group6
    Description: Tests if any unit in the group can hit any unit in the target group
    Battle or Strat: Battle
    Class: UNIT_GROUP_IN_RANGE_OF_UNIT_GROUP

    Identifier: I_PlayerInRangeOfUnitGroup
    Trigger requirements:
    Parameters: group_label
    Sample use: I_PlayerInRangeOfUnitGroup enemy_group2
    Description: tests if any player unit is in range of any unit in the group
    Battle or Strat: Battle
    Class: PLAYER_IN_RANGE_OF_UNIT_GROUP

    Identifier: I_PlayerInRangeOfUnit
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_PlayerInRangeOfUnit roman_archers
    Description: Is any unit in the player's army in range of the specified unit
    Battle or Strat: Battle
    Class: PLAYER_IN_RANGE_OF_UNIT

    Identifier: I_UnitTypeSelected
    Trigger requirements:
    Parameters: unit type ('type' from export_descr_units.txt)
    Sample use: I_UnitTypeSelected roman archer auxillia
    Description: Tests if the player has a particular unit type selected
    Battle or Strat: Battle
    Class: UNIT_TYPE_SELECTED

    Identifier: UnitType
    Trigger requirements: resource_description
    Parameters: unit type ('type' from export_descr_units.txt)
    Sample use: UnitType roman archer auxillia
    Description: Tests if a unit is of a particular type
    Battle or Strat: Either
    Class: UNIT_TYPE

    Identifier: I_UnitSelected
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_UnitSelected roman_archers
    Description: Is the specified unit selected?
    Battle or Strat: Battle
    Class: UNIT_SELECTED

    Identifier: I_MultipleUnitsSelected
    Trigger requirements:
    Parameters: None
    Sample use: I_MultipleUnitsSelected
    Description: Are multiple units selected?
    Battle or Strat: Battle
    Class: MULTIPLE_UNITS_SELECTED

    Identifier: I_SpecificUnitsSelected
    Trigger requirements:
    Parameters: unit_label1, unit_label2, unit_label3, ...
    Sample use: I_SpecificUnitsSelected roman_archers roman_hastati roman_gladiators1
    Description: Tests if all the specified units are selected
    Battle or Strat: Battle
    Class: SPECIFIC_UNITS_SELECTED

    Identifier: I_IsCameraZoomingToUnit
    Trigger requirements:
    Parameters: unit_label
    Sample use: I_IsCameraZoomingToUnit roman_archers
    Description: Tests if the camera is zooming to the specified unit
    Battle or Strat: Battle
    Class: IS_CAMERA_ZOOMING_TO_UNIT

    Identifier: I_BattnemyArmyPercentageOfMatchingUnits
    Trigger requirements:
    Parameters: unit match type, logic token, test value
    Sample use: I_BattnemyArmyPercentageOfMatchingUnits has_dogs > 35.8
    Description: Test to see what percentage of the enemy army matches a particular match category
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_PERCENTAGE_OF_UNIT_MATCHING_TEST

    Identifier: I_BattnemyArmyNumberOfMatchingUnits
    Trigger requirements:
    Parameters: unit match type, logic token, test value
    Sample use: I_BattnemyArmyNumberOfMatchingUnits has_dogs > 2
    Description: Test to see how many units of the enemy army match a particular match category
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_OF_UNIT_MATCHING_TEST

    Identifier: I_BattlePlayerArmyPercentageOfMatchingUnits
    Trigger requirements:
    Parameters: unit match type, logic token, test value
    Sample use: I_BattlePlayerArmyPercentageOfMatchingUnits has_dogs > 35.8
    Description: Test to see what percentage of the player's army matches a particular match category
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_PERCENTAGE_OF_UNIT_MATCHING_TEST

    Identifier: I_BattlePlayerArmyNumberOfMatchingUnits
    Trigger requirements:
    Parameters: unit match type, logic token, test value
    Sample use: I_BattlePlayerArmyNumberOfMatchingUnits has_dogs > 2
    Description: Test to see how many units of the player's army match a particular match category
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_OF_UNIT_MATCHING_TEST

    Identifier: I_BattlePlayerArmyNumberOfUnitClass
    Trigger requirements:
    Parameters: logic token, unit_class (heavy, light, skirmish, spearmen, missile), Integer
    Sample use: I_BattlePlayerArmyNumberOfUnitClass missile > 2
    Description: Test makeup of army by unit class
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_OF_UNIT_CLASS

    Identifier: I_BattnemyArmyNumberOfUnitClass
    Trigger requirements:
    Parameters: logic token, unit_class (heavy, light, skirmish, spearmen, missile), Integer
    Sample use: I_BattnemyArmyNumberOfUnitClass missile > 5
    Description: Test makeup of army by unit class
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_OF_UNIT_CLASS

    Identifier: I_BattlePlayerArmyNumberOfUnitCategory
    Trigger requirements:
    Parameters: logic token, unit category (infantry, cavalry, siege, non_combatant, ship, handler), Integer
    Sample use: I_BattlePlayerArmyNumberOfUnitCategory missile > 5
    Description: Test makeup of army by unit category
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_OF_UNIT_CATEGORY

    Identifier: I_BattnemyArmyNumberOfUnitCategory
    Trigger requirements:
    Parameters: logic token, unit category (infantry, cavalry, siege, non_combatant, ship, handler), Integer
    Sample use: I_BattnemyArmyNumberOfUnitCategory missile > 5
    Description: Test makeup of army by unit category
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_OF_UNIT_CATEGORY

    Identifier: I_BattlePlayerArmyNumberOfMountClass
    Trigger requirements:
    Parameters: logic token, mount_class (horse, camel, elephant, chariot), Integer
    Sample use: I_BattlePlayerArmyNumberOfMountClass camel > 5
    Description: Test makeup of army by mount class
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_OF_MOUNT_CLASS

    Identifier: I_BattnemyArmyNumberOfMountClass
    Trigger requirements:
    Parameters: logic token, mount_class (horse, camel, elephant, chariot), Integer
    Sample use: I_BattnemyArmyNumberOfMountClass camel > 5
    Description: Test makeup of army by mount class
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_OF_MOUNT_CLASS

    Identifier: I_BattlePlayerArmyNumberOfClassAndCategory
    Trigger requirements:
    Parameters: logic token, unit_class (heavy, light, skirmish, spearmen, missile), unit_category (infantry, cavalry, siege,
    non_combatant, ship, handler), Integer
    Sample use: I_BattlePlayerArmyNumberOfClassAndCategory missile cavalry > 5
    Description: Test makeup of army by mount class
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_OF_CLASS_AND_CATEGORY

    Identifier: I_BattnemyArmyNumberOfClassAndCategory
    Trigger requirements:
    Parameters: logic token, unit_class (heavy, light, skirmish, spearmen, missile), unit_category (infantry, cavalry, siege,
    non_combatant, ship, handler), Integer
    Sample use: I_BattnemyArmyNumberOfClassAndCategory missile cavalry > 5
    Description: Test makeup of army by mount class
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_OF_CLASS_AND_CATEGORY

    Identifier: I_BattlePlayerArmyNumberOfSpecialAbility
    Trigger requirements:
    Parameters: special_ability ( testudo, phalanx, wedge, drop_engines, flaming_ammo, warcry, chant, curse, beserk, rally,
    kill_elephants, move_and_shoot, cantabrian_circle, shield_wall, stealth, feigned_rout, schiltrom ), Integer
    Sample use: I_BattlePlayerArmyNumberOfSpecialAbility testudo > 5
    Description: Test makeup of army by special ability
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_OF_SPECIAL_ABILITY

    Identifier: I_BattnemyArmyNumberOfSpecialAbility
    Trigger requirements:
    Parameters: special_ability ( testudo, phalanx, wedge, drop_engines, flaming_ammo, warcry, chant, curse, beserk, rally,
    kill_elephants, move_and_shoot, cantabrian_circle, shield_wall, stealth, feigned_rout, schiltrom ), Integer
    Sample use: I_BattnemyArmyNumberOfSpecialAbility testudo > 5
    Description: Test makeup of army by special ability
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_OF_SPECIAL_ABILITY

    Identifier: I_BattlePlayerArmyNumberCanHide
    Trigger requirements:
    Parameters: logic token, hide_type (hide_forest, hide_improved_forest, hide_long_grass, hide_anywhere), Integer
    Sample use: I_BattlePlayerArmyNumberCanHide hide_forest > 5
    Description: Test makeup of army by hide capability
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_CAN_HIDE

    Identifier: I_BattnemyArmyNumberCanHide
    Trigger requirements:
    Parameters: logic token, hide_type (hide_forest, hide_improved_forest, hide_long_grass, hide_anywhere), Integer
    Sample use: I_BattnemyArmyNumberCanHide hide_forest > 5
    Description: Test makeup of army by hide capability
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_CAN_HIDE

    Identifier: I_BattlePlayerArmyNumberCanSwim
    Trigger requirements:
    Parameters: logic token, Integer
    Sample use: I_BattlePlayerArmyNumberCanSwim > 5
    Description: Test makeup of army by swim capability
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_CAN_SWIM

    Identifier: I_BattnemyArmyNumberCanSwim
    Trigger requirements:
    Parameters: logic token, Integer
    Sample use: I_BattnemyArmyNumberCanSwim > 5
    Description: Test makeup of army by swim capability
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_CAN_SWIM
    Trigger requirements:
    Parameters: logic token, Integer
    Sample use: I_BattlePlayerArmyNumberOfUnits > 5
    Description: Test size of army
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_UNITS

    Identifier: I_BattnemyArmyNumberOfUnits
    Sample use: I_BattnemyArmyNumberOfUnits > 5
    Description: Test size of army
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_UNITS

    Identifier: I_BattlePlayerArmyNumberOfAttribute
    Trigger requirements:
    Parameters: attribute, logic token, Integer
    Sample use: I_BattlePlayerArmyNumberOfAttribute hide_forest > 5
    Description: Test number of units in army with particular attribute
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_NUMBER_OF_ATTRIBUTE

    Identifier: I_BattnemyArmyNumberOfAttribute
    Trigger requirements:
    Parameters: attribute, logic token, Integer
    Sample use: I_BattnemyArmyNumberOfAttribute hide_forest > 5
    Description: Test number of units in enemy army with particular attribute
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_NUMBER_OF_ATTRIBUTE

    Identifier: I_BattlePlayerArmyPercentageOfAttribute
    Trigger requirements:
    Parameters: attribute, logic token, percentage
    Sample use: I_BattlePlayerArmyPercentageOfAttribute hide_forest > 50.0
    Description: Test makeup of army by specific attribute
    Battle or Strat: Battle
    Class: BATTLE_PLAYER_ARMY_PERCENTAGE_OF_ATTRIBUTE

    Identifier: I_BattnemyArmyPercentageOfAttribute
    Trigger requirements:
    Parameters: attribute, logic token, percentage
    Sample use: I_BattnemyArmyPercentageOfAttribute hide_forest > 50.0
    Description: Test makeup of army by attribute
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ARMY_PERCENTAGE_OF_ATTRIBUTE

    Identifier: I_IsBattleSettlementCastle
    Trigger requirements:
    Parameters:
    Sample use: I_IsBattleSettlementCastle
    Description: See if the battle contains a castle settlement
    Battle or Strat: Battle
    Class: IS_BATTLE_SETTLEMENT_CASTLE

    Identifier: I_BattleSpeed
    Trigger requirements:
    Parameters: logic token, value (float)
    Sample use: I_BattleSpeed > 1.0
    Description: Check battle speed rate
    Battle or Strat: Battle
    Class: I_BATTLE_SPEED

    Identifier: Trait
    Trigger requirements: character_record
    Parameters: trait description, logic token, level
    Sample use: Trait Girls <= 2
    Description: Test a character trait
    Battle or Strat: Either
    Class: CHARACTER_TRAIT_TEST

    Identifier: FatherTrait
    Trigger requirements: character_record
    Parameters: trait description, logic token, level
    Sample use: FatherTrait VictorRomanVirtue >= 2
    Description: Test a character's father's traits for hereditary traits
    Battle or Strat: Either
    Class: FATHER_TRAIT_TEST

    Identifier: FatherAttribute
    Trigger requirements: character_record
    Parameters: attribute description, logic token, level
    Sample use: FatherAttribute Management >= 2
    Description: Test a character fathers attributes or hidden attributes
    Battle or Strat: Strat
    Class: FATHER_ATTRIBUTE_TEST

    Identifier: FactionLeaderTrait
    Trigger requirements: character_record
    Parameters: trait description, logic token, level
    Sample use: FactionLeaderTrait VictorRomanVirtue >= 2
    Description: Test a character's faction leader traits
    Battle or Strat: Either
    Class: FACTION_LEADER_TRAIT_TEST

    Identifier: FactionLeaderAttribute
    Trigger requirements: character_record
    Parameters: attribute description, logic token, level
    Sample use: FactionLeaderAttribute Chivalry >= 2
    Description: Test a character's faction leader attribute
    Battle or Strat: Either
    Class: FACTION_LEADER_ATTRIBUTE_TEST

    Identifier: ReligionShift
    Trigger requirements: character_record
    Parameters: logic token, level
    Sample use: ReligionShift >= 10.0
    Description: Does the shift in religion towards the character's religion in this region exceed the given threshold?
    Battle or Strat: Strat
    Class: CHARACTER_RELIGION_SHIFT

    Identifier: PopulationConverted
    Trigger requirements: character_record
    Parameters: logic token, level
    Sample use: PopulationConverted >= 125
    Description: Does the number of people in the region a priest has converted this turn exceed the given threshold?
    Battle or Strat: Strat
    Class: CHARACTER_POPULATION_CONVERTED

    Identifier: DistanceCapital
    Trigger requirements: character_record
    Parameters: logic token, level
    Sample use: DistanceCapital >= 40
    Description: Does the characters distance to the faction capital exceed the given threshold?
    Battle or Strat: Strat
    Class: CHARACTER_DISTANCE_CAPITAL

    Identifier: Attribute
    Trigger requirements: character_record
    Parameters: attribute description, logic token, level
    Sample use: Attribute Management >= 2
    Description: Test a character's attributes or hidden attributes
    Battle or Strat: Either
    Class: CHARACTER_ATTRIBUTE_TEST

    Identifier: RemainingMPPercentage
    Trigger requirements: character_record
    Parameters: logic token, level
    Sample use: RemainingMPPercentage >= 35.8
    Description: If this character has not moved this turn, he should have maximum movement points left.
    Test for percentage remaining. Will almost never be exactly zero, so check for < 10
    Battle or Strat: Strat
    Class: CHARACTER_MP_REMAINING_PERCENTAGE

    Identifier: I_RemainingMPPercentage
    Trigger requirements:
    Parameters: logic token, level
    Sample use: I_RemainingMPPercentage Gaius Julius >= 35.8
    Description: If this character has not moved this turn, he should have maximum movement points left.
    Test for percentage remaining. Will almost never be exactly zero, so check for < 10
    Battle or Strat: Strat
    Class: I_CHARACTER_MP_REMAINING_PERCENTAGE

    Identifier: I_RemainingArmyMPPercentage
    Trigger requirements:
    Parameters: logic token, level
    Sample use: I_RemainingArmyMPPercentage Gaius Julius >= 35.8
    Description: If this character has not moved this turn, he should have maximum movement points left.
    Test for percentage remaining of army. Will almost never be exactly zero, so check for < 10
    Battle or Strat: Strat
    Class: I_CHARACTER_ARMY_MP_REMAINING_PERCENTAGE

    Identifier: I_CharacterCanMove
    Trigger requirements:
    Parameters: logic token, level
    Sample use: I_CharacterCanMove Gaius Julius
    Description: Can the named character move to any square? He may only be able to move in one direction, particularly the one
    he came from, so don't assume ability to move means he can move usefully.
    Battle or Strat: Strat
    Class: I_CHARACTER_CAN_MOVE

    Identifier: NoActionThisTurn
    Trigger requirements: character_record
    Parameters: None
    Sample use: NoActionThisTurn
    Description: Test to see if the character was idle throughout this turn
    Battle or Strat: Strat
    Class: CHARACTER_NOT_PERFORMED_ACTION

    Identifier: CharacterNumTurnsIdle
    Trigger requirements: character_record
    Parameters: logic token, level
    Sample use: CharacterNumTurnsIdle >= 3
    Description: Test to see how many turns a character has been idle (not including current)
    Battle or Strat: Strat
    Class: CHARACTER_NUM_TURNS_IDLE

    Identifier: AgentType
    Trigger requirements: character_record
    Parameters: character type (spy, assassin, diplomat, admiral, general, named character, family)
    Sample use: AgentType = diplomat
    Description: Test to see if a character is of a particular type (spy, admiral, named character &c.)
    Battle or Strat: Strat
    Class: CHARACTER_TYPE_TEST

    Identifier: TrainedAgentType
    Trigger requirements: character_record
    Parameters: character type (spy, assassin, diplomat, admiral, general, named character, family)
    Sample use: TrainedAgentType = diplomat
    Description: Test to see if a character is of a particular type (spy, admiral, named character &c.)
    Battle or Strat: Strat
    Class: GOVERNOR_TRAINED_AGENT_TYPE_TEST

    Identifier: DisasterType
    Trigger requirements: event_type
    Parameters: event type (earthquake, flood, horde, fire, riot, storm, volcano)
    Sample use: DisasterType earthquake
    Description: Test to see if a particular disaster just happened
    Battle or Strat: Strat
    Class: CHARACTER_AFFECTED_BY_DISASTER_EVENT_TEST

    Identifier: CultureType
    Trigger requirements: character_record
    Parameters: culture type (roman, barbarian, carthaginian, greek, egyptian, eastern)
    Sample use: CultureType greek
    Description: Test the character's culture type
    Battle or Strat: Either
    Class: CHARACTER_CULTURE

    Identifier: CharFactionType
    Trigger requirements: character_record
    Parameters: character faction type (england, france, etc)
    Sample use: CharFactionType england
    Description: Test the character's faction type
    Battle or Strat: Either
    Class: CHARACTER_FACTION

    Identifier: OriginalFactionType
    Trigger requirements: character_record
    Parameters: OriginalFactionType
    Sample use: OriginalFactionType empire_west
    Description: Test the character's original faction type
    Battle or Strat: Either
    Class: CHARACTER_ORIGINAL_FACTION_TYPE

    Identifier: OriginalCultureType
    Trigger requirements: character_record
    Parameters: OriginalCultureType
    Sample use: OriginalCultureType roman
    Description: Test the character's original culture type
    Battle or Strat: Either
    Class: CHARACTER_ORIGINAL_CULTURE_TYPE

    Identifier: IsGeneral
    Trigger requirements: character_record
    Parameters: None
    Sample use: IsGeneral
    Description: Test to see if the character can command a land army
    Battle or Strat: Either
    Class: CHARACTER_IS_GENERAL

    Identifier: IsAdmiral
    Trigger requirements: character_record
    Parameters: None
    Sample use: IsAdmiral
    Description: Test to see if the character has an army
    Battle or Strat: Either
    Class: CHARACTER_IS_ADMIRAL

    Identifier: EndedInSettlement
    Trigger requirements: character_record
    Parameters: None
    Sample use: EndedInSettlement
    Description: Test to see if the character is in a settlement
    Battle or Strat: Either
    Class: CHARACTER_IN_SETTLEMENT

    Identifier: IsFactionLeader
    Trigger requirements: character_record
    Parameters: None
    Sample use: IsFactionLeader
    Description: Test to see if the character is a faction leader
    Battle or Strat: Either
    Class: CHARACTER_IS_LEADER

    Identifier: IsFactionHeir
    Trigger requirements: character_record
    Parameters: None
    Sample use: IsFactionHeir
    Description: Test to see if the character is a faction heir
    Battle or Strat: Either
    Class: CHARACTER_IS_HEIR

    Identifier: IsMarried
    Trigger requirements: character_record
    Parameters: None
    Sample use: IsMarried
    Description: Test to see if the character is married
    Battle or Strat: Either
    Class: CHARACTER_IS_MARRIED

    Identifier: AtSea
    Trigger requirements: character_record
    Parameters: None
    Sample use: AtSea
    Description: Is the character at sea?
    Battle or Strat: Either
    Class: CHARACTER_AT_SEA

    Identifier: I_AtSea
    Trigger requirements:
    Parameters: character
    Sample use: I_AtSea Rufus
    Description: Is the named character at sea?
    Battle or Strat: Strat
    Class: I_CHARACTER_AT_SEA

    Identifier: InEnemyLands
    Trigger requirements: character_record
    Parameters: None
    Sample use: InEnemyLands
    Description: Is the character in enemy lands?
    Battle or Strat: Either
    Class: CHARACTER_IN_ENEMY_LANDS

    Identifier: InBarbarianLands
    Trigger requirements: character_record
    Parameters: None
    Sample use: InBarbarianLands
    Description: Is the character in lands of a barbarian culture?
    Battle or Strat: Either
    Class: CHARACTER_IN_BARBARIAN_LANDS

    Identifier: InUncivilisedLands
    Trigger requirements: character_record
    Parameters: None
    Sample use: InUncivilisedLands
    Description: Is the character in lands of an uncivilised culture?
    Battle or Strat: Either
    Class: CHARACTER_IN_UNCIVILISED_LANDS

    Identifier: IsBesieging
    Trigger requirements: character_record
    Parameters: None
    Sample use: IsBesieging
    Description: Is the character besieging a settlement?
    Battle or Strat: Either
    Class: CHARACTER_IS_BESIEGING

    Identifier: IsUnderSiege
    Trigger requirements: character_record
    Parameters: None
    Sample use: IsUnderSiege
    Description: Is the character in a garrison residence under siege?
    Battle or Strat: Either
    Class: CHARACTER_IS_UNDER_SIEGE

    Identifier: I_WithdrawsBeforeBattle
    Trigger requirements:
    Parameters: None
    Sample use: I_WithdrawsBeforeBattle
    Description: Was the last battle aborted?
    Battle or Strat: Either
    Class: CHARACTER_WITHDRAWS_BEFORE_BATTLE

  • OFFLINE
    The Housekeeper
    Post: 21.194
    Registrato il: 10/02/2007
    Principe

    00 06/03/2012 18:43
    CONDITIONS (PART 2)


    Identifier: EndedInEnemyZOC
    Trigger requirements: character_record
    Parameters: None
    Sample use: EndedInEnemyZOC
    Description: Is the character in an enemy zone of control?
    Battle or Strat: Either
    Class: ENDED_IN_ENEMY_ZOC

    Identifier: AdviseAction
    Trigger requirements: character_action_advice
    Parameters: logic token, action (attack_enemy, attack_settlement, merge_armies, patrol_region, move_to_region, do_nothing)
    Sample use: AdviseAction = attack_settlement
    Description: Is this the best thing this character can do now?
    Battle or Strat: Strat
    Class: ADVISE_ACTION

    Identifier: I_CharacterTypeNearCharacterType
    Trigger requirements:
    Parameters: faction, character type, distance in squares, faction, character type
    Sample use: I_CharacterTypeNearCharacterType romans_julii spy 10 gaul named character
    Description: Is a particular character type of a faction near another particular character type of another faction?
    Battle or Strat: Strat
    Class: I_CHARACTER_NEAR_CHARACTER

    Identifier: I_CharacterTypeNearTile
    Trigger requirements:
    Parameters: faction, character type, distance in squares, x, z
    Sample use: I_CharacterTypeNearTile romans_julii named_character, 10 48,30
    Description: Is a particular character type of a faction near a particular tile?
    Battle or Strat: Strat
    Class: I_CHARACTER_NEAR_TILE

    Identifier: TradingResource
    Trigger requirements: character_record
    Parameters: None
    Sample use: TradingResource
    Description: Is the character trading a resource?
    Battle or Strat: Strat
    Class: TRADING_RESOURCE

    Identifier: OnResource
    Trigger requirements: character_record
    Parameters: None
    Sample use: OnResource
    Description: Is the character standing on a resource?
    Battle or Strat: Strat
    Class: ON_RESOURCE

    Identifier: TradingMonopoly
    Trigger requirements: character_record
    Parameters: None
    Sample use: TradingMonopoly
    Description: Does the character have a trading monopoly in region?
    Battle or Strat: Strat
    Class: TRADING_MONOPOLY

    Identifier: TradingExotic
    Trigger requirements: character_record
    Parameters: None
    Sample use: TradingExotic
    Description: Is the character trading an exotic resource?
    Battle or Strat: Strat
    Class: TRADING_EXOTIC

    Identifier: HighestAttAdjacentChar
    Trigger requirements: character_record
    Parameters: attribute type, character type, logic token, level
    Sample use: HighestAttAdjacentChar piety heretic >= 5
    Description: Is the highest attribute rating of any adjacent character higher than specified?
    Battle or Strat: Strat
    Class: HIGHEST_ATTRIBUTE_ADJACENT_CHARACTER

    Identifier: HighestAttSharedChar
    Trigger requirements: character_record
    Parameters: attribute type, character type, logic token, level
    Sample use: HighestAttSharedChar piety priest >= 5
    Description: Is the highest attribute rating of any character of the same faction sharing the same tile higher than specified?
    Battle or Strat: Strat
    Class: HIGHEST_ATTRIBUTE_SHARED_CHARACTER

    Identifier: SpouseAttribute
    Trigger requirements: character_record
    Parameters: attribute description, logic token, level
    Sample use: SpouseAttribute Management >= 2
    Description: Test a character spouses's attributes or hidden attributes
    Battle or Strat: Strat
    Class: CHARACTER_SPOUSE_ATTRIBUTE_TEST

    Identifier: SpouseTrait
    Trigger requirements: character_record
    Parameters: trait description, logic token, level
    Sample use: SpouseTrait VictorRomanVirtue >= 2
    Description: Test a character's spouse's traits for hereditary traits
    Battle or Strat: Either
    Class: SPOUSE_TRAIT_TEST

    Identifier: PopulationOwnReligion
    Trigger requirements: character_record
    Parameters: logic token, percent
    Sample use: PopulationOwnReligion >= 80
    Description: Test the factions religion in characters current region
    Battle or Strat: Strat
    Class: POPULATION_OWN_RELIGION

    Identifier: PopulationHeretic
    Trigger requirements: character_record
    Parameters: logic token, percent
    Sample use: PopulationHeretic >= 10
    Description: Test the heresy level in characters current region
    Battle or Strat: Strat
    Class: POPULATION_HERETIC

    Identifier: ProbabilitySuccess
    Trigger requirements: character_record
    Parameters: logic token, level
    Sample use: ProbabilitySuccess >= 50
    Description: Test the resulting chance of success of a mission
    Battle or Strat: Strat
    Class: PROBABILITY_SUCCESS

    Identifier: IsOnCrusade
    Trigger requirements: character_record
    Parameters:
    Sample use: IsOnCrusade
    Description: Test is character on crusade
    Battle or Strat: Strat
    Class: IS_ON_CRUSADE

    Identifier: IsOnJihad
    Trigger requirements: character_record
    Parameters:
    Sample use: IsOnJihad
    Description: Test is character on jihad
    Battle or Strat: Strat
    Class: IS_ON_JIHAD

    Identifier: IsTargetOnCrusade
    Trigger requirements: target_character_record
    Parameters:
    Sample use: IsTargetOnCrusade
    Description: Test is target character on crusade
    Battle or Strat: Strat
    Class: IS_TARGET_ON_CRUSADE

    Identifier: IsTargetOnJihad
    Trigger requirements: target_character_record
    Parameters:
    Sample use: IsTargetOnJihad
    Description: Test is target character on jihad
    Battle or Strat: Strat
    Class: IS_TARGET_ON_JIHAD

    Identifier: I_CrusadingGeneralSelected
    Trigger requirements:
    Parameters:
    Sample use: I_CrusadingGeneralSelected
    Description: Is a crusading general currently selected
    Battle or Strat: Strat
    Class: I_CRUSADING_GENERAL_SELECTED

    Identifier: I_JihadGeneralSelected
    Trigger requirements:
    Parameters:
    Sample use: I_JihadGeneralSelected
    Description: Is a jihad general currently selected
    Battle or Strat: Strat
    Class: I_JIHAD_GENERAL_SELECTED

    Identifier: CharacterReligion
    Trigger requirements: character_record
    Parameters: religion
    Sample use: CharacterReligion catholic
    Description: Test the charcter religion
    Battle or Strat: Either
    Class: CHARACTER_RELIGION_CHECK

    Identifier: TimeInRegion
    Trigger requirements: character_record
    Parameters: logic token, turns
    Sample use: TimeInRegion > 5
    Description: Test to see the number of turns the character has been in the region it is currently in
    Battle or Strat: Strat
    Class: TIME_IN_REGION

    Identifier: TimeSinceReligion
    Trigger requirements: character_record
    Parameters: logic token, religion percentage(0-100), logic token, number of turns
    Sample use: TimeSinceReligion < 95 > 5
    Description: Test to see the number of turns since the region the character is in had the specified % of the character's religion
    Battle or Strat: Strat
    Class: TIME_SINCE_RELIGION

    Identifier: TimeSinceHeresy
    Trigger requirements: character_record
    Parameters: logic token, heresy percentage(0-100), logic token, number of turns
    Sample use: TimeSinceHeresy > 5 < 5
    Description: Test to see the number of turns since the region the character is in had the specified % of heresy
    Battle or Strat: Strat
    Class: TIME_SINCE_HERESY

    Identifier: TimeWithArmy
    Trigger requirements: character_record
    Parameters: logic token, turns
    Sample use: TimeWithArmy > 5
    Description: Test to see the number of turns since the agent has been with an army
    Battle or Strat: Strat
    Class: TIME_WITH_ARMY

    Identifier: FatherAnc
    Trigger requirements: character_record
    Parameters: ancillary name
    Sample use: FatherAnc holy_grail
    Description: Test to see if character's father posses this ancillary
    Battle or Strat: Strat
    Class: FATHER_ANC

    Identifier: GeneralWithAncKilled
    Trigger requirements: character_record
    Parameters: ancillary name
    Sample use: GeneralWithAncKilled holy_grail
    Description: Test to see if a general with specified ancillary was killed in the battle
    Battle or Strat: Both
    Class: GENERAL_ANC_KILLED

    Identifier: HasAncType
    Trigger requirements: character_record
    Parameters: ancillary type
    Sample use: HasAncType relic
    Description: Test to see if character currently has ancillary with specified type
    Battle or Strat: Strat
    Class: HAS_ANC_TYPE

    Identifier: I_CharacterExists
    Trigger requirements:
    Parameters: character name
    Sample use: I_CharacterExists Gaius Julius
    Description: Is this character alive and in the campaign?
    Battle or Strat: Strat
    Class: I_CHARACTER_EXISTS

    Identifier: RansomType
    Trigger requirements: ransom_type
    Parameters: ransom type (ransom, release, execute, cannot_pay_ransom)
    Sample use: RansomType execute
    Description: Test what ransom decision was just made
    Battle or Strat: Strat
    Class: RANSOM_TYPE

    Identifier: NumCapturedSoldiers
    Trigger requirements: captured_faction_info
    Parameters: logic token, level
    Sample use: NumCapturedSoldiers >= 50
    Description: Test how many soldiers were captured
    Battle or Strat: Strat
    Class: NUM_CAPTURED_SOLDIERS

    Identifier: NumCapturedCharacters
    Trigger requirements: captured_faction_info
    Parameters: logic token, level
    Sample use: NumCapturedCharacters >= 50
    Description: Test how many characters were captured
    Battle or Strat: Strat
    Class: NUM_CAPTURED_CHARACTERS

    Identifier: RansomAmount
    Trigger requirements: captured_faction_info
    Parameters: logic token, level
    Sample use: RansomAmount >= 5000
    Description: Test the amount of the ransom demanded/payed
    Battle or Strat: Strat
    Class: RANSOM_AMOUNT

    Identifier: I_FactionLeaderTrait
    Trigger requirements:
    Parameters: faction type, trait description, logic token, level
    Sample use: I_FactionLeaderTrait england BadCommander >= 2
    Description: Test a factions leader traits
    Battle or Strat: Either
    Class: I_FACTION_LEADER_TRAIT_TEST

    Identifier: I_FactionLeaderAttribute
    Trigger requirements:
    Parameters: faction type, attribute description, logic token, level
    Sample use: I_FactionLeaderAttribute england Chivalry >= 2
    Description: Test a factions leader attribute
    Battle or Strat: Either
    Class: I_FACTION_LEADER_ATTRIBUTE_TEST

    Identifier: FactionType
    Trigger requirements: faction
    Parameters: faction type
    Sample use: FactionType romans_julii
    Description: Test the faction type
    Battle or Strat: Either
    Class: FACTION_TYPE_CHECK

    Identifier: TargetFactionType
    Trigger requirements: target_faction
    Parameters: faction type
    Sample use: TargetFactionType romans_julii
    Description: Test the target faction type
    Battle or Strat: Either
    Class: TARGET_FACTION_TYPE_CHECK

    Identifier: FactionReligion
    Trigger requirements: faction
    Parameters: faction religion
    Sample use: FactionReligion catholic
    Description: Test the faction religion
    Battle or Strat: Either
    Class: FACTION_RELIGION_CHECK

    Identifier: TargetFactionReligion
    Trigger requirements: target_faction
    Parameters: faction religion
    Sample use: TargetFactionReligion orthodox
    Description: Test the target faction religion
    Battle or Strat: Either
    Class: TARGET_FACTION_RELIGION_CHECK

    Identifier: FactionCultureType
    Trigger requirements: faction
    Parameters: culture type (roman, barbarian, carthaginian, greek, egyptian, eastern)
    Sample use: FactionCultureType greek
    Description: Test the faction's culture type
    Battle or Strat: Either
    Class: FACTION_CULTURE

    Identifier: TargetFactionCultureType
    Trigger requirements: target_faction
    Parameters: culture type (roman, barbarian, carthaginian, greek, egyptian, eastern)
    Sample use: TargetFactionCultureType greek
    Description: Test the target faction's culture type
    Battle or Strat: Either
    Class: TARGET_FACTION_CULTURE

    Identifier: TrainedUnitCategory
    Trigger requirements: unit
    Parameters: category description (infantry, cavalry, siege, non_combatant, ship, handler)
    Sample use: TrainedUnitCategory cavalry
    Description: Test to see if the unit is of a particular category
    Battle or Strat: Strat
    Class: GOVERNOR_TRAINED_UNIT_TYPE_TEST

    Identifier: TrainedUnitClass
    Trigger requirements: unit
    Parameters: unit class (light, heavy, spearmen, skirmish, missile)
    Sample use: TrainedUnitClass heavy
    Description: Test to see if the unit is of a particular class
    Battle or Strat: Strat
    Class: TRAINED_UNIT_CLASS_TEST

    Identifier: UnitCategory
    Trigger requirements: unit
    Parameters: logic token, category description
    Sample use:
    Description: Test to see if the unit is of a particular category
    Battle or Strat: Strat
    Class: UNIT_CATEGORY_TYPE_TEST

    Identifier: MedianTaxLevel
    Trigger requirements: faction
    Parameters: logic token, tax level (tax_low, tax_normal, tax_high, tax_extortionate)
    Sample use: MedianTaxLevel > tax_high
    Description: Compare the median tax level
    Battle or Strat: Either
    Class: MEDIAN_TAX_LEVEL

    Identifier: ModeTaxLevel
    Trigger requirements: faction
    Parameters: logic token, tax level (tax_low, tax_normal, tax_high, tax_extortionate)
    Sample use: ModeTaxLevel > tax_high
    Description: Compare the mode tax level
    Battle or Strat: Either
    Class: MODE_TAX_LEVEL

    Identifier: I_ModeTaxLevel
    Trigger requirements:
    Parameters: faction, logic token, tax level (tax_low, tax_normal, tax_high, tax_extortionate)
    Sample use: I_ModeTaxLevel romans_julii > tax_high
    Description: Compare the mode tax level
    Battle or Strat: Either
    Class: I_MODE_TAX_LEVEL

    Identifier: MissionSuccessLevel
    Trigger requirements: mission_success_level
    Parameters: logic token, success level (not_successful, slightly_successful, partly_successful, highly_successful)
    Sample use: MissionSuccessLevel > slightly_successful
    Description: Was the mission sufficiently successful?
    Battle or Strat: Strat
    Class: MISSION_SUCCESS_TYPE

    Identifier: MissionSucceeded
    Trigger requirements:
    Parameters: None (no not modifier either)
    Sample use: MissionSucceeded
    Description: Was the mission sufficiently successful?
    Battle or Strat: Strat
    Class: MISSION_SUCCEEDED

    Identifier: MissionFactionTargetType
    Trigger requirements: faction
    Parameters: faction type
    Sample use: MissionFactionTargetType romans_julii
    Description: Is the faction of a particular type?
    Battle or Strat: Either
    Class: MISSION_FACTION_TARGET_TYPE

    Identifier: MissionCultureTargetType
    Trigger requirements: faction, character_record
    Parameters: culture type (roman, barbarian, carthaginian, greek, egyptian, eastern)
    Sample use: MissionCultureTargetType own, MissionCultureTargetType greek
    Description: Is the faction of a particular type?
    Battle or Strat: Either
    Class: MISSION_CULTURE_TARGET_TYPE

    Identifier: DiplomaticStanceFromCharacter
    Trigger requirements: character_record
    Parameters: faction type, logic token, stance (Allied, Suspicious, Neutral, Hostile, AtWar)
    Sample use: DiplomaticStanceFromCharacter romans_julii > Suspicious
    Description: Test the character's faction's diplomatic stance with another specified faction
    Battle or Strat: Either
    Class: DIPLOMATIC_STANCE_FROM_CHARACTER

    Identifier: DiplomaticStanceFromFaction
    Trigger requirements: faction
    Parameters: faction type, logic token, stance (Allied, Suspicious, Neutral, Hostile, AtWar)
    Sample use: DiplomaticStanceFromFaction romans_julii > Suspicious
    Description: Test the character's faction's diplomatic stance with another specified faction
    Battle or Strat: Either
    Class: DIPLOMATIC_STANCE_FROM_FACTION

    Identifier: DiplomaticStanceFactions
    Trigger requirements: faction, target_faction
    Parameters: logic token, stance (Allied, Suspicious, Neutral, Hostile, AtWar)
    Sample use: DiplomaticStanceFactions > Suspicious
    Description: Test the diplomatic stance between two factions
    Battle or Strat: Either
    Class: DIPLOMATIC_STANCE_FACTIONS

    Identifier: DiplomaticStanceWithNewPope
    Trigger requirements: faction, target faction
    Parameters: logic token, stance (Allied, Suspicious, Neutral, Hostile, AtWar)
    Sample use: DiplomaticStanceWithNewPope > Suspicious
    Description: Test a faction's diplomatic stance with the faction the new pope was from
    Battle or Strat: Strat
    Class: DIPLOMATIC_STANCE_WITH_NEW_POPE

    Identifier: FactionEqualsTarget
    Trigger requirements: faction, target faction
    Parameters: None
    Sample use: FactionEqualsTarget
    Description: Does the faction equal the target faction?
    Battle or Strat: Strat
    Class: FACTION_EQUALS_TARGET

    Identifier: FactionHasAllies
    Trigger requirements: faction
    Parameters:
    Sample use: FactionHasAllies
    Description: Test whether the faction is allied with any other faction
    Battle or Strat: Either
    Class: FACTION_HAS_ALLIES

    Identifier: FactionBuildingExists
    Trigger requirements: faction
    Parameters: logic token, test level
    Sample use: FactionBuildingExists >= governors_house
    Description: Test to see if the faction has a building at a particular level, logic token currently only works with =, >= and >
    Battle or Strat: Strat
    Class: FACTION_BUILDING_LEVEL_EXISTS_TEST

    Identifier: FactionScore
    Trigger requirements: faction
    Parameters: score type, logic token, faction type
    Sample use: FactionScore military < england
    Description: Test the factions score against that of another faction. Scores include: overall, military, production, regions, treasury, population
    Battle or Strat: Strat
    Class: FACTION_SCORE_CHECK

    Identifier: FactionHasRank
    Trigger requirements: faction
    Parameters: none
    Sample use: FactionHasRank
    Description: Test if the faction has a vaild rank
    Battle or Strat: Strat
    Class: FACTION_HAS_RANK_CHECK

    Identifier: FactionScorePercent
    Trigger requirements: faction
    Parameters: score type, logic token, level
    Sample use: FactionScorePercent military < 50
    Description: Test the factions score against the leading faction as a percentage
    Battle or Strat: Strat
    Class: FACTION_SCORE_PERCENT_CHECK

    Identifier: FactionScoreRank
    Trigger requirements: faction
    Parameters: score type, logic token, level
    Sample use: FactionScoreRank military < 3
    Description: Test the factions score ranking with respect to other discovered, alive factions
    Battle or Strat: Strat
    Class: FACTION_SCORE_RANK_CHECK

    Identifier: FactionIncome
    Trigger requirements: faction
    Parameters: logic token, level
    Sample use: FactionIncome >= 2000
    Description: Test a factions income
    Battle or Strat: Strat
    Class: FACTION_INCOME

    Identifier: LosingMoney
    Trigger requirements:
    Parameters: None
    Sample use: LosingMoney
    Description: Is the faction losing money on the end of year balance sheet?
    Battle or Strat: Strat
    Class: LOSING_MONEY

    Identifier: I_LosingMoney
    Trigger requirements:
    Parameters: None
    Sample use: I_LosingMoney romans_julii
    Description: Is the faction losing money on the end of year balance sheet?
    Battle or Strat: Strat
    Class: I_LOSING_MONEY

    Identifier: SupportCostsPercentage
    Trigger requirements: faction
    Parameters: logic token, percentage
    Sample use: SupportCostsPercentage > 35.8
    Description: Does the percentage of expenditure devoted to support costs exceed the threshold?
    Battle or Strat: Strat
    Class: SUPPORT_COSTS_PERCENTAGE

    Identifier: Treasury
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: Treasury > 2000
    Description: Does the cash-in-hand exceed the threshold?
    Battle or Strat: Strat
    Class: TREASURY

    Identifier: OnAWarFooting
    Trigger requirements: faction
    Parameters: None
    Sample use: OnAWarFooting
    Description: Is the faction on a war footing?
    Battle or Strat: Strat
    Class: ON_A_WAR_FOOTING

    Identifier: I_FactionBesieging
    Trigger requirements:
    Parameters: faction type
    Sample use: not I_FactionBesieging romans_julii
    Description: Is the faction besieging a settlement somewhere?
    Battle or Strat: Strat
    Class: FACTION_BESIEGING

    Identifier: I_FactionBesieged
    Trigger requirements:
    Parameters: faction type
    Sample use: not I_FactionBesieged romans_julii
    Description: Is the faction besieged at any settlement?
    Battle or Strat: Strat
    Class: FACTION_BESIEGED

    Identifier: I_NumberOfSettlements
    Trigger requirements:
    Parameters: number of settlements
    Sample use: I_NumberOfSettlements thrace > 3
    Description: How many settlements does the faction hold?
    Battle or Strat: Strat
    Class: I_NUMBER_OF_SETTLEMENTS

    Identifier: I_NumberOfHeirs
    Trigger requirements:
    Parameters: number of heirs
    Sample use: I_NumberOfHeirs thrace > 3
    Description: How many heirs does the faction leader have?
    Battle or Strat: Strat
    Class: I_NUMBER_OF_HEIRS

    Identifier: I_FactionNearTile
    Trigger requirements:
    Parameters: faction, distance in squares, x, z
    Sample use: I_FactionNearTile romans_julii 10 48,30
    Description: Is a member of a faction near a particular tile?
    Battle or Strat: Strat
    Class: I_FACTION_NEAR_TILE

    Identifier: SettlementsTaken
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: SettlementsTaken = 6
    Description: How many settlements has the player captured so far during this campaign?
    Battle or Strat: Either
    Class: SETTLEMENTS_TAKEN

    Identifier: BattlesFought
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: BattlesFought = 6
    Description: How many battles has the player fought so far during this campaign?
    Battle or Strat: Either
    Class: BATTLES_FOUGHT

    Identifier: BattlesWon
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: BattlesWon = 6
    Description: How many battles has the player won so far during this campaign?
    Battle or Strat: Either
    Class: BATTLES_WON

    Identifier: BattlesLost
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: BattlesLost = 6
    Description: How many battles has the player won so far during this campaign?
    Battle or Strat: Either
    Class: BATTLES_LOST

    Identifier: DefensiveSiegesFought
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: DefensiveSiegesFought = 6
    Description: How many defensive sieges has the player fought so far during this campaign?
    Battle or Strat: Either
    Class: DEFENSIVE_SIEGES_FOUGHT

    Identifier: DefensiveSiegesWon
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: DefensiveSiegesWon = 6
    Description: How many defensive sieges has the player won so far during this campaign?
    Battle or Strat: Either
    Class: DEFENSIVE_SIEGES_WON

    Identifier: OffensiveSiegesFought
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: OffensiveSiegesFought = 6
    Description: How many offensive sieges has the player fought so far during this campaign?
    Battle or Strat: Either
    Class: OFFENSIVE_SIEGES_FOUGHT

    Identifier: OffensiveSiegesWon
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: OffensiveSiegesWon = 6
    Description: How many offensive sieges has the player won so far during this campaign?
    Battle or Strat: Either
    Class: OFFENSIVE_SIEGES_WON

    Identifier: IsFactionAIFrozen
    Trigger requirements: faction
    Parameters:
    Sample use: IsFactionAIFrozen
    Description: Check is faction AI frozen
    Battle or Strat: Strat
    Class: IS_FACTION_AI_FROZEN

    Identifier: I_IsFactionAIFrozen
    Trigger requirements:
    Parameters: faction
    Sample use: I_IsFactionAIFrozen aztecs
    Description: Check is faction AI frozen
    Battle or Strat: Strat
    Class: I_IS_FACTION_AI_FROZEN

    Identifier: MissionID
    Trigger requirements: mission_details
    Parameters: mission id
    Sample use: MissionID assassinate_cardinal
    Description: What is the name of the mission just finished
    Battle or Strat: Strat
    Class: MISSION_ID

    Identifier: PaybackID
    Trigger requirements: mission_details
    Parameters: payback id
    Sample use: PaybackID payback_list_1
    Description: What is the name of the payback for the mission just finished
    Battle or Strat: Strat
    Class: PAYBACK_ID

    Identifier: IsCrusadeTargetFaction
    Trigger requirements: target_faction
    Parameters:
    Sample use: IsCrusadeTargetFaction
    Description: Test if target faction is current crusade target
    Battle or Strat: Strat
    Class: IS_CRUSADE_TARGET_FACTION

    Identifier: IsJihadTargetFaction
    Trigger requirements: target_faction
    Parameters:
    Sample use: IsJihadTargetFaction
    Description: Test if target faction is current jihad target
    Battle or Strat: Strat
    Class: IS_JIHAD_TARGET_FACTION

    Identifier: MissionTimeRemaining
    Trigger requirements: faction
    Parameters: logic token, turns remaining
    Sample use: MissionTimeRemaining
    Description: Test the number of turn before the next mission expires
    Battle or Strat: Strat
    Class: MISSION_TIME_REMAINING

    Identifier: I_PlayerHasMission
    Trigger requirements:
    Parameters: missionID
    Sample use: I_PlayerHasMission join_crusade
    Description: Test if the player has given mission
    Battle or Strat: Strat
    Class: I_PLAYER_HAS_MISSION

    Identifier: I_PlayerHasMissionType
    Trigger requirements:
    Parameters: sourceID
    Sample use: I_PlayerHasMissionType POPE_MISSION
    Description: Test if the player has mission from given source
    Battle or Strat: Strat
    Class: I_PLAYER_HAS_MISSION_TYPE

    Identifier: I_PlayerHasPreferati
    Trigger requirements:
    Parameters:
    Sample use: I_PlayerHasPreferati
    Description: Does the player currently have a preferati in the college?
    Battle or Strat: Strat
    Class: I_PLAYER_HAS_PREFERATI

    Identifier: I_PlayerCanBuyVotes
    Trigger requirements:
    Parameters:
    Sample use: I_PlayerCanBuyVotes
    Description: Tests is player can buy papal votes
    Battle or Strat: Strat
    Class: I_PLAYER_CAN_BUY_VOTES

    Identifier: FactionwideAncillaryExists
    Trigger requirements: character_record
    Parameters: logic token
    Sample use: FactionwideAncillaryExists actor true
    Description: Does this ancillary already exist in this faction?
    Battle or Strat: Strat
    Class: FACTIONWIDE_ANCILLARY_EXISTS

    Identifier: TransgressionName
    Trigger requirements: resource_description
    Parameters: transgression name
    Sample use: TransgressionName TC_ATTACKING_CRUSADING_GENERAL
    Description: Detect whether a transgression has occurred
    Battle or Strat: Strat
    Class: TRANSGRESSION_NAME

    Identifier: ForgivenessName
    Trigger requirements: resource_description
    Parameters: forgiveness name
    Sample use: ForgivenessName FC_TRADE_TREATY
    Description: Detect whether a forgiveness has occurred
    Battle or Strat: Strat
    Class: FORGIVENESS_NAME

    Identifier: FactionStanding
    Trigger requirements: faction, target_faction
    Parameters: logic token, quantity
    Sample use: FactionStanding > 0.0
    Description: what is the standing (relationship) of a faction towards the target faction
    Battle or Strat: Either
    Class: FACTION_STANDING

    Identifier: GlobalStanding
    Trigger requirements: faction
    Parameters: logic token, quantity
    Sample use: GlobalStanding > 0.0
    Description: what is the global standing (reputation) of a faction
    Battle or Strat: Either
    Class: GLOBAL_STANDING

    Identifier: FactionExcommunicated
    Trigger requirements: faction
    Parameters:
    Sample use: FactionExcommunicated
    Description: Test if this faction is excommunicated
    Battle or Strat: Strat
    Class: IS_FACTION_EXCOMMUNICATED

    Identifier: TargetFactionExcommunicated
    Trigger requirements: target_faction
    Parameters:
    Sample use: TargetFactionExcommunicated
    Description: Test if the target faction is excommunicated
    Battle or Strat: Strat
    Class: IS_TARGET_FACTION_EXCOMMUNICATED

    Identifier: FactionUndiscovered
    Trigger requirements: faction
    Parameters:
    Sample use: FactionUndiscovered
    Description: Test if this faction is undiscovered
    Battle or Strat: Strat
    Class: IS_FACTION_UNDISCOVERED

    Identifier: I_IsFactionUndiscovered
    Trigger requirements:
    Parameters: faction
    Sample use: I_IsFactionUndiscovered aztecs
    Description: Check is faction undiscovered
    Battle or Strat: Strat
    Class: I_IS_FACTION_UNDISCOVERED

    Identifier: FactionAILabel
    Trigger requirements: faction
    Parameters: faction type, ai_label
    Sample use: FactionAILabel catholic
    Description: test faction ai label
    Battle or Strat: Strat
    Class: FACTION_AI_LABEL

    Identifier: I_FactionAILabel
    Trigger requirements:
    Parameters: faction type, ai_label
    Sample use: I_FactionAILabel england catholic
    Description: test faction ai label
    Battle or Strat: Strat
    Class: I_FACTION_AI_LABEL

    Identifier: NumFactionMarriages
    Trigger requirements: faction, target_faction
    Parameters: logic token, number of marriages
    Sample use: NumFactionMarriages > 0
    Description: Test the number of inter faction marriages between two factions
    Battle or Strat: Either
    Class: NUM_FACTION_MARRIAGES

    Identifier: I_UnitExists
    Trigger requirements:
    Parameters: Faction, Unit type
    Sample use: I_UnitExists England Spear Militia
    Description: Does the faction own any of these units?
    Battle or Strat: Strat
    Class: I_UNIT_EXISTS

    Identifier: RandomPercent
    Trigger requirements:
    Parameters: logic token, percentage (integer)
    Sample use: RandomPercent > 50
    Description: Pick a number from 0 to 100 at random
    Battle or Strat: Either
    Class: RANDOM_PERCENT

    Identifier: TrueCondition
    Trigger requirements:
    Parameters:
    Sample use: not TrueCondition
    Description: When you need to supply a true/false, for debugging and monitor_event
    Battle or Strat: Either
    Class: TRUE_CONDITION

    Identifier: EventCounterType
    Trigger requirements: event_counter
    Parameters: event name
    Sample use: EventCounterType world_is_round
    Description: Identifies named strat map event by it's name
    Battle or Strat: Strat
    Class: EVENT_COUNTER_TYPE

    Identifier: EventCounter
    Trigger requirements: event_counter
    Parameters: logic token, value (integer)
    Sample use: EventCounter > 0
    Description: Check named strat map event counter
    Battle or Strat: Strat
    Class: EVENT_COUNTER

    Identifier: I_EventCounter
    Trigger requirements:
    Parameters: event_name, logic token, value (integer)
    Sample use: I_EventCounter world_is_round > 0
    Description: Check named strat map event counter
    Battle or Strat: Strat
    Class: I_EVENT_COUNTER

    Identifier: IsPositionInRect
    Trigger requirements: sm_position
    Parameters: left top [width height]
    Sample use: IsPositionInRect 5 10 40 140
    Description: Test is a tile in specified rectangular area?
    Battle or Strat: Strat
    Class: IS_POSITION_IN_RECT

    Identifier: IsRegionOneOf
    Trigger requirements: region_id
    Parameters: list of regions given by label or number
    Sample use: IsRegionOneOf 0 Caribbean_Isles
    Description: Test is a region in given region list?
    Battle or Strat: Strat
    Class: IS_REGION_ONE_OF

    Identifier: IsTargetRegionOneOf
    Trigger requirements: target_region_id
    Parameters: list of regions given by label or number
    Sample use: IsTargetRegionOneOf 0 Caribbean_Isles
    Description: Test is a target region in given region list?
    Battle or Strat: Strat
    Class: IS_TARGET_REGION_ONE_OF

    Identifier: IsCrusade
    Trigger requirements: crusade
    Parameters:
    Sample use: IsCrusade
    Description: It's true for crusade and false for jihad
    Battle or Strat: Strat
    Class: IS_CRUSADE

    Identifier: IsJihad
    Trigger requirements: crusade
    Parameters:
    Sample use: IsJihad
    Description: It's true for jihad and false for crusade
    Battle or Strat: Strat
    Class: IS_JIHAD

    Identifier: CrusadeOutcome
    Trigger requirements: crusade
    Parameters: crusade outcome (none, success, fail, cancel)
    Sample use: CrusadeOutcome success
    Description: Test the crusade/jihad outcome (none, success, fail, cancel)
    Battle or Strat: Strat
    Class: CRUSADE_OUTCOME

    Identifier: I_CrusadeInProgress
    Trigger requirements:
    Parameters:
    Sample use: I_CrusadeInProgress
    Description: Tests is crusade in progress
    Battle or Strat: Strat
    Class: I_CRUSADE_IN_PROGRESS

    Identifier: I_JihadInProgress
    Trigger requirements:
    Parameters:
    Sample use: I_JihadInProgress
    Description: Tests is jihad in progress
    Battle or Strat: Strat
    Class: I_JIHAD_IN_PROGRESS

    Identifier: I_CrusadeTimeLeft
    Trigger requirements:
    Parameters: logic token, value (integer)
    Sample use: I_CrusadeTimeLeft > 4
    Description: Tests the number of turns left before the time to join the crusade expires (==0 - not started, >0 - turns left including current,
    <0 - turns passed including current)
    Battle or Strat: Strat
    Class: I_CRUSADE_TIME_LEFT

    Identifier: I_JihadTimeLeft
    Trigger requirements:
    Parameters: logic token, value (integer)
    Sample use: I_JihadTimeLeft > 4
    Description: Tests the number of turns left before the time to join the jihad expires (==0 - not started, >0 - turns left including current,
    <0 - turns passed including current)
    Battle or Strat: Strat
    Class: I_JIHAD_TIME_LEFT

    Identifier: I_TurnsSinceLastCrusade
    Trigger requirements:
    Parameters: logic token, value (integer)
    Sample use: I_TurnsSinceLastCrusade < 3
    Description: Tests the number of turns since the last crusade ended (<0 - not ended, >=0 - turns since the last crusade ended)
    Battle or Strat: Strat
    Class: I_TURNS_SINCE_LAST_CRUSADE

    Identifier: I_TurnsSinceLastJihad
    Trigger requirements:
    Parameters: logic token, value (integer)
    Sample use: I_TurnsSinceLastJihad < 3
    Description: Tests the number of turns since the last jihad ended (<0 - not ended, >=0 - turns since the last jihad ended)
    Battle or Strat: Strat
    Class: I_TURNS_SINCE_LAST_JIHAD

    Identifier: Religion
    Trigger requirements: religion or character_record or nc_character_records or settlement or fort or faction
    Parameters: religion
    Sample use: Religion catholic
    Description: Test the religion
    Battle or Strat: Either
    Class: RELIGION_CHECK

    Identifier: TargetReligion
    Trigger requirements: target_religion
    Parameters: religion
    Sample use: TargetReligion catholic
    Description: Test the target religion
    Battle or Strat: Either
    Class: TARGET_RELIGION_CHECK

    Identifier: I_WorldwideAncillaryExists
    Trigger requirements: character_record
    Parameters: logic token
    Sample use: I_WorldwideAncillaryExists actor true
    Description: Does this ancillary already exist in the world?
    Battle or Strat: Strat
    Class: WORLDWIDE_ANCILLARY_EXISTS

    Identifier: CampaignDifficulty
    Trigger requirements: faction
    Parameters: logic token, difficulty
    Sample use: CampaignDifficulty = easy
    Description: Test the factions campaign difficulty level (easy, medium, hard, very_hard)
    Battle or Strat: Strat
    Class: CAMPAIGN_DIFFICULTY

    Identifier: BattleDifficulty
    Trigger requirements: faction
    Parameters: logic token, difficulty
    Sample use: BattleDifficulty = easy
    Description: Test the factions battle difficulty level (easy, medium, hard, very_hard)
    Battle or Strat: Battle
    Class: BATTLE_DIFFICULTY

    Identifier: I_CampaignNumTimePlay
    Trigger requirements:
    Parameters: logic token, turn number
    Sample use: I_CampaignNumTimePlay <= 1
    Description: The number of times the campaign has been run (starts at 0)
    Battle or Strat: Either
    Class: I_CAMPAIGN_NUM_TIME_PLAY

    Identifier: I_FirstTimePlay
    Trigger requirements:
    Parameters: faction type
    Sample use: I_FirstTimePlay england
    Description: Has a campaign been played with this faction previously
    Battle or Strat: Either
    Class: I_FIRST_TIME_PLAYED

    Identifier: I_AdvisorVerbosityLevel
    Trigger requirements:
    Parameters: logic token, turn number
    Sample use: I_AdvisorVerbosityLevel <= 3
    Description: The verbosity level of the advisor
    Battle or Strat: Either
    Class: I_ADVISOR_VERBOSITY_LEVEL

    Identifier: I_HotseatEnabled
    Trigger requirements:
    Parameters:
    Sample use: I_HotseatEnabled
    Description: Is this currently a hotseat campaign game
    Battle or Strat: Either
    Class: I_HOTSEAT_ENABLED

    Identifier: SettlementName
    Trigger requirements: settlement
    Parameters: settlement name
    Sample use: SettlementName Tarquinii
    Description: For scripting - does the settlement have this name
    Battle or Strat: Either
    Class: SETTLEMENT_NAME

    Identifier: TargetSettlementName
    Trigger requirements: target_settlement
    Parameters: settlement name
    Sample use: TargetSettlementName Cordoba
    Description: For scripting - does the target settlement have this name
    Battle or Strat: Either
    Class: TARGET_SETTLEMENT_NAME

    Identifier: GovernorBuildingExists
    Trigger requirements: character_record
    Parameters: building description, logic token, test level
    Sample use: GovernorBuildingExists = governors_house
    Description: Test to see if the character is a governor and his settlement has a building at a particular level
    Battle or Strat: Strat
    Class: GOVERNORS_BUILDING_LEVEL_EXISTS_TEST

    Identifier: SettlementBuildingExists
    Trigger requirements: settlement
    Parameters: building description, logic token, test level
    Sample use: SettlementBuildingExists = governors_house
    Description: Test to see if the settlement has a building at a particular level
    Battle or Strat: Strat
    Class: SETTLEMENT_BUILDING_LEVEL_EXISTS_TEST

    Identifier: BuildingFinishedByGovernor
    Trigger requirements: character_record, prior_build
    Parameters: building description, logic token, test level
    Sample use: BuildingFinishedByGovernor = governors_house
    Description: Test to see if the character is a governor and what the last finished building was
    Battle or Strat: Strat
    Class: GOVERNORS_BUILDING_LEVEL_FINISHED_TEST

    Identifier: SettlementBuildingFinished
    Trigger requirements: prior_build
    Parameters: building description, logic token, test level
    Sample use: SettlementBuildingFinished = governors_house
    Description: Test to see what the last finished building was
    Battle or Strat: Strat
    Class: SETTLEMENT_BUILDING_LEVEL_FINISHED_TEST

    Identifier: NumBuildingsCompleted
    Trigger requirements: prior_build
    Parameters: building description, logic token, test level
    Sample use: NumBuildingsCompleted church = 1
    Description: Use after a BuildingCompleted event to test how many of a type of building have been constructed in the entire world
    Battle or Strat: Strat
    Class: NUM_BUILDINGS_COMPLETED

    Identifier: NumBuildingsCompletedFaction
    Trigger requirements: Faction, prior_build
    Parameters: building description, logic token, test level
    Sample use: NumBuildingsCompletedFaction church = 1
    Description: Use after a BuildingCompleted event to test how many of a type of building have been constructed for that faction
    Battle or Strat: Strat
    Class: NUM_BUILDINGS_COMPLETED_FACTION

    Identifier: GovernorPlugInExists
    Trigger requirements: character_record
    Parameters: logic token, plug-in
    Sample use: GovernorPlugInExists > storage_pits
    Description: Test to see if the character is a governor and his settlement has a plug-in at a particular level
    Battle or Strat: Strat
    Class: GOVERNORS_PLUG_IN_LEVEL_EXISTS_TEST

    Identifier: GovernorPlugInFinished
    Trigger requirements: character_record, prior_build
    Parameters: logic token, plug-in
    Sample use: GovernorPlugInFinished > storage_pits
    Description: Test to see if the character is a governor and what the last finished plug-in was
    Battle or Strat: Strat
    Class: GOVERNORS_PLUG_IN_LEVEL_FINISHED_TEST

    Identifier: GovernorTaxLevel
    Trigger requirements: character_record
    Parameters: logic token, tax level (tax_low, tax_normal, tax_high, tax_extortionate)
    Sample use: GovernorTaxLevel > tax_high
    Description: Is the character a governor who is taxing the populace at a particular level?
    Battle or Strat: Either
    Class: GOVERNOR_TAX_LEVEL

    Identifier: SettlementTaxLevel
    Trigger requirements: settlement
    Parameters: logic token, tax level (tax_low, tax_normal, tax_high, tax_extortionate)
    Sample use: SettlementTaxLevel > tax_high
    Description: Is the settlement taxing the populace at a particular level?
    Battle or Strat: Either
    Class: SETTLEMENT_TAX_LEVEL

    Identifier: GovernorInResidence
    Trigger requirements: settlement
    Parameters: None
    Sample use: GovernorInResidence
    Description: Does the settlement lack a governor?
    Battle or Strat: Strat
    Class: GOVERNOR_IN_RESIDENCE

    Identifier: GovernorLoyaltyLevel
    Trigger requirements: character_record
    Parameters: logic token, value (loyalty_revolting, loyalty_rioting, loyalty_disillusioned, loyalty_content, loyalty_happy)
    Sample use: GovernorLoyaltyLevel > loyalty_rioting
    Description: Is the character a governor and, if so how loyal is the settlement to him?
    Battle or Strat: Either
    Class: GOVERNOR_LOYALTY_LEVEL

    Identifier: GovernorAttribute
    Trigger requirements: settlement
    Parameters: attribute description, logic token, level
    Sample use: GovernorAttribute Chivalry >= 2
    Description: Test a settlement governors attribute
    Battle or Strat: Either
    Class: GOVERNOR_ATTRIBUTE_TEST

    Identifier: SettlementLoyaltyLevel
    Trigger requirements: settlement
    Parameters: logic token, value (loyalty_revolting, loyalty_rioting, loyalty_disillusioned, loyalty_content, loyalty_happy)
    Sample use: SettlementLoyaltyLevel > loyalty_rioting
    Description: How loyal is the settlement?
    Battle or Strat: Either
    Class: SETTLEMENT_LOYALTY_LEVEL

    Identifier: RiotRisk
    Trigger requirements: settlement
    Parameters: logic token, percentage (integral, < 40 since there is never more than a 40% chance of rioting)
    Sample use: RiotRisk > 30
    Description: What is the chance of this settlement rioting?
    Battle or Strat: Either
    Class: RIOT_RISK

    Identifier: BuildingQueueIdleDespiteCash
    Trigger requirements: settlement
    Parameters: None
    Sample use: BuildingQueueIdleDespiteCash
    Description: Is the faction exploiting its build capability to the full?
    Battle or Strat: Either
    Class: BUILDING_QUEUE_IDLE_DESPITE_CASH

    Identifier: TrainingQueueIdleDespiteCash
    Trigger requirements: settlement
    Parameters: None
    Sample use: TrainingQueueIdleDespiteCash
    Description: Is the faction exploiting its recruitment capability to the full?
    Battle or Strat: Either
    Class: TRAINING_QUEUE_IDLE_DESPITE_CASH

    Identifier: I_SettlementExists
    Trigger requirements:
    Parameters: settlement name
    Sample use: I_SettlementExists Segesta
    Description: Does a settlement by this name exist?
    Battle or Strat: Strat
    Class: SETTLEMENT_EXISTS

    Identifier: I_SettlementOwner
    Trigger requirements:
    Parameters: settlement name, logic token, faction type
    Sample use: I_SettlementOwner Segesta = romans_julii
    Description: Is this settlement owned by this faction?
    Battle or Strat: Strat
    Class: SETTLEMENT_OWNER

    Identifier: AdviseFinancialBuild
    Trigger requirements: best_finance_option
    Parameters: build type (farms, mines, tax, trade)
    Sample use: AdviseFinancialBuild = mines
    Description: Is this the best thing to build to increase financial production?
    Battle or Strat: Strat
    Class: ADVISE_FINANCIAL_BUILD

    Identifier: AdviseBuild
    Trigger requirements: advised_build
    Parameters: build type (from tech tree) - use No_building for none available
    Sample use: AdviseBuild = mines, AdviseBuild = No_building
    Description: Is this the best thing to build?
    Battle or Strat: Strat
    Class: ADVISE_BUILD

    Identifier: AdviseRecruit
    Trigger requirements:
    Parameters: unit type (from unit database) - use No_unit for none available
    Sample use: AdviseRecruit = triarii, AdviseRecruit = No_unit
    Description: Is this the best thing to recruit?
    Battle or Strat: Strat
    Class: ADVISE_RECRUIT

    Identifier: BuildingName
    Trigger requirements: resource_description
    Parameters: building level name
    Sample use: BuildingName = small_church
    Description: What is the buildings name?
    Battle or Strat: Strat
    Class: BUILDING_LEVEL_NAME

    Identifier: SettlementPopulationMaxedOut
    Trigger requirements: settlement
    Parameters:
    Sample use: SettlementPopulationMaxedOut
    Description: Is the settlement full for its level? (Actually, >95%)
    Battle or Strat: Strat
    Class: SETTLEMENT_POPULATION_MAXED_OUT

    Identifier: SettlementPopulationTooLow
    Trigger requirements: settlement
    Parameters:
    Sample use: SettlementPopulationTooLow
    Description: Is the settlement too empty to recruit from?
    Battle or Strat: Strat
    Class: SETTLEMENT_POPULATION_TOO_LOW

    Identifier: SettlementAutoManaged
    Trigger requirements: settlement
    Parameters: Automanagement type (Troops, Buildings, Mechanics)
    Sample use: not SettlementAutoManaged Troops
    Description: Is the settlement auto managed in a particular way?
    Battle or Strat: Strat
    Class: SETTLEMENT_AUTO_MANAGED

    Identifier: PercentageOfPopulationInGarrison
    Trigger requirements: settlement
    Parameters:
    Sample use: PercentageOfPopulationInGarrison > 35
    Description: Check the percentage of population that is currently in the garrison
    Battle or Strat: Strat
    Class: PERCENTAGE_OF_POPULATION_IN_GARRISON

    Identifier: GarrisonToPopulationRatio
    Trigger requirements: settlement
    Parameters:
    Sample use: GarrisonSettlementRatio > 0.35
    Description: Calculate the ratio of soldiers to civilians
    Battle or Strat: Strat
    Class: GARRISON_TO_POPULATION_RATIO

    Identifier: HealthPercentage
    Trigger requirements: settlement
    Parameters:
    Sample use: HealthPercentage > 35
    Description: Check the health of the settlement
    Battle or Strat: Strat
    Class: HEALTH_PERCENTAGE

    Identifier: SettlementHasPlague
    Trigger requirements: settlement
    Parameters:
    Sample use: SettlementHasPlague
    Description: Is the settlement plague-ridden?
    Battle or Strat: Strat
    Class: SETTLEMENT_HAS_PLAGUE

    Identifier: IsFortGarrisoned
    Trigger requirements: fort
    Parameters:
    Sample use: IsFortGarrisoned
    Description: Are there any troops in the fort?
    Battle or Strat: Strat
    Class: IS_FORT_GARRISONED

    Identifier: IsSettlementGarrisoned
    Trigger requirements: settlement
    Parameters:
    Sample use: IsSettlementGarrisoned
    Description: Are there any troops in the settlement?
    Battle or Strat: Strat
    Class: IS_SETTLEMENT_GARRISONED

    Identifier: IsSettlementRioting
    Trigger requirements: settlement
    Parameters:
    Sample use: IsSettlementRioting
    Description: Is the settlement rioting at the moment?
    Battle or Strat: Strat
    Class: IS_SETTLEMENT_RIOTING

    Identifier: I_NumberUnitsInSettlement
    Trigger requirements:
    Parameters: settlement, unit type (UNIT_DESCRIPTION.id), logic token, quantity
    Sample use: I_NumberUnitsInSettlement Tarquinii roman_city_militia < 5
    Description: How many units are in the settlement?
    Battle or Strat: Strat
    Class: NUMBER_UNITS_IN_SETTLEMENT

    Identifier: NeighbourReligion
    Trigger requirements: settlement
    Parameters: settlement religion, logic token, level
    Sample use: NeighbourReligion pagan > 50.0
    Description: Test the sum of settlements neighbours religion
    Battle or Strat: Strat
    Class: NEIGHBOUR_RELIGION_CHECK

    Identifier: IsCrusadeTarget
    Trigger requirements: settlement
    Parameters:
    Sample use: IsCrusadeTarget
    Description: Test if the settlement is the current crusade target
    Battle or Strat: Strat
    Class: IS_CRUSADE_TARGET

    Identifier: IsJihadTarget
    Trigger requirements: settlement
    Parameters:
    Sample use: IsJihadTarget
    Description: Test if the settlement is the current jihad target
    Battle or Strat: Strat
    Class: IS_JIHAD_TARGET

    Identifier: IsRegionCrusadeTarget
    Trigger requirements: region_id
    Parameters:
    Sample use: IsRegionCrusadeTarget
    Description: Test if the region is the current crusade target
    Battle or Strat: Strat
    Class: IS_REGION_CRUSADE_TARGET

    Identifier: IsRegionJihadTarget
    Trigger requirements: region_id
    Parameters:
    Sample use: IsRegionJihadTarget
    Description: Test if the region is the current jihad target
    Battle or Strat: Strat
    Class: IS_REGION_JIHAD_TARGET

    Identifier: SettlementType
    Trigger requirements: settlement
    Parameters: castle | city
    Sample use: SettlementType castle
    Description: Test if the settlement is the specified type
    Battle or Strat: Strat
    Class: SETTLEMENT_TYPE

    Identifier: TargetSettlementType
    Trigger requirements: settlement
    Parameters: castle | city
    Sample use: TargetSettlementType castle
    Description: Test if the target settlement is the specified type
    Battle or Strat: Strat
    Class: TARGET_SETTLEMENT_TYPE

    Identifier: I_SettlementUnderSiege
    Trigger requirements:
    Parameters: Settlement name
    Sample use: I_SettlementUnderSiege London
    Description: Is the named settlement under siege?
    Battle or Strat: Strat
    Class: I_SETTLEMENT_UNDER_SIEGE

    Identifier: I_UnitsToRetrain
    Trigger requirements:
    Parameters: settlement_name, logic token, number
    Sample use: I_UnitsToRetrain Rome > 0
    Description: Test the number of units available to retrain in sepecified settlement
    Battle or Strat: Strat
    Class: I_UNITS_TO_RETRAIN

    Identifier: CharacterIsLocal
    Trigger requirements: character_record
    Parameters: None
    Sample use: CharacterIsLocal
    Description: Is the character a member of the local faction?
    Battle or Strat: Either
    Class: CHARACTER_IS_LOCAL

    Identifier: TargetCharacterIsLocal
    Trigger requirements: target_character_record
    Parameters: None
    Sample use: TargetCharacterIsLocal
    Description: Is the target character a member of the local faction?
    Battle or Strat: Either
    Class: TARGET_CHARACTER_IS_LOCAL

    Identifier: SettlementIsLocal
    Trigger requirements: settlement
    Parameters: None
    Sample use: SettlementIsLocal
    Description: Does the settlement belong to the local faction?
    Battle or Strat: Either
    Class: SETTLEMENT_IS_LOCAL

    Identifier: TargetSettlementIsLocal
    Trigger requirements: settlement
    Parameters: None
    Sample use: TargetSettlementIsLocal
    Description: Does the target settlement belong to the local faction?
    Battle or Strat: Either
    Class: TARGET_SETTLEMENT_IS_LOCAL

    Identifier: RegionIsLocal
    Trigger requirements: region_id
    Parameters: None
    Sample use: RegionIsLocal
    Description: Does the region belong to the local faction?
    Battle or Strat: Either
    Class: REGION_IS_LOCAL

    Identifier: TargetRegionIsLocal
    Trigger requirements: region_id
    Parameters: None
    Sample use: TargetRegionIsLocal
    Description: Does the target region belong to the local faction?
    Battle or Strat: Either
    Class: TARGET_REGION_IS_LOCAL

    Identifier: ArmyIsLocal
    Trigger requirements: army
    Parameters: None
    Sample use: ArmyIsLocal
    Description: Does the army belong to the local faction?
    Battle or Strat: Either
    Class: ARMY_IS_LOCAL

    Identifier: TargetArmyIsLocal
    Trigger requirements: army
    Parameters: None
    Sample use: TargetArmyIsLocal
    Description: Does the target army belong to the local faction?
    Battle or Strat: Either
    Class: TARGET_ARMY_IS_LOCAL

    Identifier: FactionIsLocal
    Trigger requirements: faction
    Parameters: None
    Sample use: FactionIsLocal
    Description: Is the faction the local faction?
    Battle or Strat: Either
    Class: FACTION_IS_LOCAL

    Identifier: I_LocalFaction
    Trigger requirements:
    Parameters: faction
    Sample use: I_LocalFaction romans_julii
    Description: Is the faction the local faction?
    Battle or Strat: Either
    Class: I_LOCAL_FACTION

    Identifier: TargetFactionIsLocal
    Trigger requirements: target_faction
    Parameters: None
    Sample use: TargetFactionIsLocal
    Description: Is the target faction the local faction?
    Battle or Strat: Either
    Class: TARGET_FACTION_IS_LOCAL

    Identifier: I_TurnNumber
    Trigger requirements:
    Parameters: logic token, turn number
    Sample use: I_TurnNumber > 50
    Description: The current turn number (starts at 0)
    Battle or Strat: Either
    Class: TURN_NUMBER

    Identifier: I_MapName
    Trigger requirements:
    Parameters: map file name
    Sample use: not I_MapName world\maps\campaign\norman_prologue\descr_strat.txt
    Description: The qualified file name of the current map relative to the data directory
    Battle or Strat: Either
    Class: MAP_NAME

    Identifier: I_ThreadCount
    Trigger requirements:
    Parameters: advice thread, logic token, value
    Sample use: I_ThreadCount City_Riots_Reduce_Taxes_Thread > 5
    Description: Has this advice thread been incremented many times?
    Battle or Strat: Strat
    Class: THREAD_COUNT

    Identifier: I_IsTriggerTrue
    Trigger requirements:
    Parameters: trigger name
    Sample use: I_IsTriggerTrue sample_trigger_name
    Description: Has this trigger been fired?
    Battle or Strat: Strat
    Class: TRIGGER_TRUE

    Identifier: IncomingMessageType
    Trigger requirements: event
    Parameters: message identifier (see Tom)
    Sample use: IncomingMessageType mission_issued
    Description: Has this message just been received
    Battle or Strat: Strat
    Class: INCOMING_MESSAGE

    Identifier: I_AdvisorVerbosity
    Trigger requirements:
    Parameters: logic token, advisor verbosity
    Sample use: I_AdvisorVerbosity > 2
    Description: The advisor verbosity
    Battle or Strat: Either
    Class: ADVISOR_VERBOSITY

    Identifier: I_CharacterSelected
    Trigger requirements:
    Parameters: character name
    Sample use: I_CharacterSelected Gaius Julius
    Description: Detect whether the character is currently selected
    Battle or Strat: Strat
    Class: CHARACTER_SELECTED

    Identifier: I_AgentSelected
    Trigger requirements:
    Parameters: character type (spy, assassin, diplomat, admiral, general, named character, family)
    Sample use: I_AgentSelected spy
    Description: Detect whether a character of the specified type is currently selected
    Battle or Strat: Strat
    Class: AGENT_SELECTED

    Identifier: I_SettlementSelected
    Trigger requirements:
    Parameters: settlement name
    Sample use: I_SettlementSelected Roma
    Description: Detect whether the settlement is currently selected
    Battle or Strat: Strat
    Class: SETTLEMENT_SELECTED

    Identifier: ShortcutTriggered
    Trigger requirements: resource_description
    Parameters: element id, function id (see data/descr_shortcuts.txt)
    Sample use: ShortcutTriggered camera step_l
    Description: Detect whether a keyboard shortcut has been pressed
    Battle or Strat: Both
    Class: SHORTCUT_TRIGGERED

    Identifier: I_AdvancedStatsScrollIsOpen
    Trigger requirements:
    Parameters:
    Sample use: I_AdvancedStatsScrollIsOpen
    Description: Detect whether the advanced stats scroll is open
    Battle or Strat: Strat
    Class: I_ADVANCED_STATS_SCROLL_IS_OPEN

    Identifier: I_ScrollOpen
    Trigger requirements:
    Parameters: scroll_id
    Sample use: I_ScrollOpen diplomacy_scroll
    Description: Detect whether the specified scroll is open
    Battle or Strat: Strat
    Class: I_SCROLL_OPEN

    Identifier: I_MessageNeedsResolving
    Trigger requirements:
    Parameters:
    Sample use: I_MessageNeedsResolving
    Description: The player has a message that must be resolved before ending turn
    Battle or Strat: Strat
    Class: I_MESSAGE_NEEDS_RESOLVING

    Identifier: ButtonPressed
    Trigger requirements: resource_description
    Parameters: button id (see available_ui_elements.txt)
    Sample use: ButtonPressed character_info_zoom_to_button
    Description: Detect whether a button has been pressed
    Battle or Strat: Both
    Class: BUTTON_PRESSED

    Identifier: UIElementVisible
    Trigger requirements: resource_description
    Parameters: ui element id (see available_ui_elements.txt)
    Sample use: UIElementVisible retrain_tab
    Description: Test for when a named ui element is visible
    Battle or Strat: Strat
    Class: UI_ELEMENT_VISIBLE

    Identifier: ScrollOpened
    Trigger requirements: resource_description
    Parameters: scroll id (see available_ui_elements.txt)
    Sample use: ScrollOpened own_character_info_scroll
    Description: Test for when a named scroll is opened
    Battle or Strat: Both - Depends on scroll requested
    Class: SCROLL_OPENED

    Identifier: ScrollClosed
    Trigger requirements: resource_description
    Parameters: scroll id (see available_ui_elements.txt)
    Sample use: ScrollClosed own_character_info_scroll
    Description: Test for when a named scroll is closed
    Battle or Strat: Both - Depends on scroll requested
    Class: SCROLL_CLOSED

    Identifier: ScrollAdviceRequested
    Trigger requirements: resource_description
    Parameters: scroll id (see available_ui_elements.txt)
    Sample use: ScrollAdviceRequested own_character_info_scroll
    Description: Test for which scroll advice was requested on
    Battle or Strat: Both - Depends on scroll requested
    Class: SCROLL_ADVICE_REQUESTED

    Identifier: I_CompareCounter
    Trigger requirements:
    Parameters: script counter, value
    Sample use: I_CompareCounter blib < 17
    Description: Compare a script counter to a value
    Battle or Strat: Either
    Class: COMPARE_COUNTER

    Identifier: I_TimerElapsed
    Trigger requirements:
    Parameters: logic token, timer_id, duration (milliseconds)
    Sample use: I_TimerElapsed rout_timer > 1000
    Description: How long has it been since the script timer restarted
    Battle or Strat: Either
    Class: SCRIPT_TIMER_ELAPSED

    Identifier: I_SoundPlaying
    Trigger requirements:
    Parameters:
    Sample use: I_SoundPlaying snd_IntroSpeech
    Description: Detect whether the tagged sound is playing or not
    Battle or Strat: Both
    Class: SOUND_EVENT_PLAYING

    Identifier: I_AdvisorSpeechPlaying
    Trigger requirements:
    Parameters:
    Sample use: I_AdvisorSpeechPlaying
    Description: Detect whether advisor speech is playing or not
    Battle or Strat: Both
    Class: ADVISOR_SPEECH_PLAYING

    Identifier: I_AdvisorVisible
    Trigger requirements:
    Parameters:
    Sample use: not I_AdvisorVisible
    Description: Is the advisor currently visible?
    Battle or Strat: Either
    Class: ADVISOR_VISIBLE


    Kingdoms Conditions Pulled from official Kingdoms docudemons, some are updates, some are completely new.

    Identifier: BattlePlayerActionStatus
    Trigger requirements: player_unit
    Parameters: Action status ( idling, hiding, ready, reforming, moving, withdrawing, missiles_firing, missiles_reloading, charging, fighting, pursuing, routing, fighting_backs_to_the_walls, running_amok, infighting, rallying, dead, leaving_battle, entering_battle, left_battle )
    Sample use: BattlePlayerActionStatus = moving
    Description: What is the current action status of the player unit
    Battle or Strat: Battle
    Class: Class: BATTLE_PLAYER_ACTION_STATUS

    Identifier: BattleEnemyActionStatus
    Trigger requirements: enemy_unit
    Parameters: Action status ( idling, hiding, ready, reforming, moving, withdrawing, missiles_firing, missiles_reloading, charging, fighting, pursuing, routing, fighting_backs_to_the_walls, running_amok, infighting, rallying, dead, leaving_battle, entering_battle, left_battle )
    Sample use: BattleEnemyActionStatus = moving
    Description: What is the current action status of the player unit
    Battle or Strat: Battle
    Class: BATTLE_ENEMY_ACTION_STATUS

    Identifier: PercentageUnitAttribute
    Trigger requirements: character_record
    Parameters: unit attribute
    Sample use: PercentageUnitAttribute gunpowder_unit > 25.5
    Description: Test to see what percentage of the army have a particular attribute
    Battle or Strat: Either
    Class: GENERALS_ARMY_PERCENTAGE_OF_UNIT_ATTRIBUTE_TEST

    Identifier: CharacterAge
    Trigger requirements: character_record
    Parameters: logic token, age
    Sample use: CharacterAge >= 75
    Description: Test the age of a character
    Battle or Strat: Strat
    Class: CHARACTER_AGE

    Identifier: I_IsFactionAIControlled
    Trigger requirements:
    Parameters: faction
    Sample use: I_IsFactionAIControlled aztecs
    Description: Check if a faction is controlled by the AI
    Battle or Strat: Strat
    Class: I_IS_FACTION_AI_CONTROLLED

    Identifier: IsFactionAIControlled
    Trigger requirements:
    Parameters:
    Sample use: IsFactionAIControlled aztecs
    Description: Check if a faction is controlled by the AI
    Battle or Strat: Strat
    Class: IS_FACTION_AI_CONTROLLED

    Identifier: IsSettlementExported
    Trigger requirements: settlement
    Parameters:
    Sample use: IsSettlementExported
    Description: Does this event export a settlement?
    Battle or Strat: Strat
    Class: IS_SETTLEMENT_EXPORTED

    Identifier: IsFortExported
    Trigger requirements: fort
    Parameters:
    Sample use: IsFortExported
    Description: Does this event export a fort?
    Battle or Strat: Strat
    Class: IS_FORT_EXPORTED
  • OFFLINE
    The Housekeeper
    Post: 21.194
    Registrato il: 10/02/2007
    Principe

    00 06/03/2012 18:43
    COMMANDS

    Identifier: ai_gta_plan_set
    Parameters: alliance plan
    Description: Sets GTA battle plan
    Sample use: ai_gta_plan_set 0 DO_NOTHING
    Class: AI_GTA_PLAN_SET

    Identifier: ai_gta_add_objective
    Parameters: alliance objective priority ...
    Description: Add GTA objective
    Sample use: ai_gta_add_objective 1 MOVE_TO_POINT 11 440, -710
    Class: AI_GTA_ADD_OBJECTIVE

    Identifier: ai_gta_del_objective
    Parameters: alliance objective
    Description: Remove GTA objective
    Sample use: ai_gta_del_objective 1 0
    Class: AI_GTA_DEL_OBJECTIVE

    Identifier: ai_gta_add_unit
    Parameters: alliance objective army unit
    Description: Add unit to a GTA objective
    Sample use: ai_gta_add_unit 1 0 1 0
    Class: AI_GTA_ADD_UNIT

    Identifier: ai_gta_add_unit_id
    Parameters: alliance objective unit_id
    Description: Add unit to a GTA objective by unit id
    Sample use: ai_gta_add_unit_id 1 0 6
    Class: AI_GTA_ADD_UNIT_ID

    Identifier: ai_gta_add_unit_label
    Parameters: alliance objective unit_label
    Description: Add unit to a GTA objective by unit id
    Sample use: ai_gta_add_unit_label 1 0 6
    Class: AI_GTA_ADD_UNIT_LABEL

    Identifier: ai_active_set
    Parameters: on/off
    Description: Turns AI on or off
    Sample use: ai_active_set off
    Class: AI_ACTIVE_SET

    Identifier: release_unit
    Parameters: unit_label
    Description: Unlabels the specified unit and releases it back to player or AI control
    Sample use: release_unit
    Class: RELEASE_UNIT

    Identifier: hiding_enabled_set
    Parameters: true/false
    Description: Enables or disables unit hiding for all units
    Sample use: hiding_enabled_set false
    Class: HIDING_ENABLED_SET

    Identifier: swimming_enabled_set
    Parameters: true/false
    Description: Enables or disables swimming for all units
    Sample use: swimming_enabled_set false
    Class: SWIMMING_ENABLED_SET

    Identifier: terminate_battle
    Parameters: win/lose/draw
    Description: terminates the battle
    Sample use: terminate_battle
    Class: TERMINATE_BATTLE

    Identifier: pause_battle
    Parameters:
    Description: pauses the battle
    Sample use: pause_battle
    Class: PAUSE_BATTLE

    Identifier: battle_set_speed
    Parameters: speed: 0.0f -> 10.0f
    Description: sets battle speed
    Sample use: battle_set_speed 1.0f
    Class: BATTLE_SET_SPEED

    Identifier: unit_immediate_place
    Parameters: unit_label location angle_in_degrees width(optional)
    Description: Immediately positions the unit at the given location
    Sample use: unit_immediate_place archers1 big_hill 0 20
    Class: UNIT_IMMEDIATE_PLACE

    Identifier: unit_order_halt
    Parameters: unit_label
    Description: orders the specified unit stop it's orders
    Sample use: unit_order_halt cohort1
    Class: UNIT_ORDER_HALT

    Identifier: unit_order_move
    Parameters: unit_label x y run(optional)
    Description: orders the specified unit to move to the specified position
    Sample use: unit_order_move cohort1 100 60 run
    Class: UNIT_ORDER_MOVE

    Identifier: unit_order_move_to_orientation
    Parameters: unit_label x y width_in_men rotation_in_degrees run (optional)
    Description: orders the specified unit to move to the specified position with a specified rotation and orientation
    Sample use: unit_order_move_to_orientation cohort1 100 60 20 45 run
    Class: UNIT_ORDER_MOVE_TO_ORIENTATION

    Identifier: unit_order_move_relative
    Parameters: unit_label x y run(optional)
    Description: orders the specified unit to move to the specified position
    Sample use: unit_order_move_relative cohort1 0 60 run
    Class: UNIT_ORDER_MOVE_RELATIVE

    Identifier: unit_order_attack_unit
    Parameters: unit_label target_unit_label run(optional)
    Description: Orders one unit to attack another
    Sample use: unit_order_attack_unit cavalry1 enemy4 run
    Class: UNIT_ORDER_ATTACK_UNIT

    Identifier: unit_order_attack_closest_unit
    Parameters: unit_label search_arc(in degrees) run(optional)
    Description: Searches an arc in front of the unit, and attacks the closest enemy found
    Sample use: unit_order_attack_closest_unit 15 run
    Class: UNIT_ORDER_ATTACK_CLOSEST_UNIT

    Identifier: unit_order_change_formation
    Parameters: unit_label formation_type (square, horde, testudo, phalanx)
    Description: changes the specified unit's formation
    Sample use: unit_order_change_formation legionary_cohort testudo
    Class: UNIT_ORDER_CHANGE_FORMATION

    Identifier: unit_order_move_to_missile_range
    Parameters: attacker_unit_label target_unit_label run(optional)
    Description: orders the attacker to move into missile range of the target
    Sample use: unit_order_move_to_missile_range roman_archers barb_swordsmen run
    Class: UNIT_ORDER_MOVE_TO_MISSILE_RANGE

    Identifier: unit_order_turn
    Parameters: unit_label rotation relative/absolute
    Description: order the unit to turn to an absolute angle or by an angle relative to it's current rotation
    Sample use: unit_order_turn roman_archers -20 relative (turns left 20 degrees)
    Class: UNIT_ORDER_TURN

    Identifier: unit_set_morale
    Parameters: unit_label morale_level (beserk/impetuous/high/firm/shaken/wavering/routing)
    Description: sets and locks the unit's morale level
    Sample use: unit_set_morale carthaginian_peasants wavering
    Class: UNIT_SET_MORALE

    Identifier: unit_unset_morale
    Parameters: unit_label
    Description: unlocks the unit's morale, the game will retake control and update the morale normally
    Sample use: unit_unset_morale peasants4
    Class: UNIT_UNSET_MORALE

    Identifier: unit_set_weapon_upgrade
    Parameters: unit_label new_level
    Description: sets the unit's weapon upgrade (0-3)
    Sample use: unit_set_weapon_upgrade spearmen1 3
    Class: UNIT_SET_WEAPON_UPGRADE

    Identifier: unit_set_armour_upgrade
    Parameters: unit_label new_level
    Description: sets the unit's armour upgrade (0-3)
    Sample use: unit_set_armour_upgrade spearmen1 3
    Class: UNIT_SET_ARMOUR_UPGRADE

    Identifier: unit_set_experience
    Parameters: unit_label new_experience_level
    Description: sets the specified unit's experience level (0-9)
    Sample use: unit_set_experience roman_general 7
    Class: UNIT_SET_EXPERIENCE

    Identifier: kill_unit
    Parameters: unit_label
    Description: Completely wipes out the specified unit
    Sample use: kill_unit carthaginians2
    Class: KILL_UNIT

    Identifier: reduce_unit_strength
    Parameters: unit_label percentage
    Description: Kills enough men to reduce a unit to the specifies percentage of it's original strangth
    Sample use: reduce_unit_strength carthaginians2 50
    Class: REDUCE_UNIT_STRENGTH

    Identifier: unit_set_guard_mode
    Parameters: unit_label on/off
    Description: Sets the guard melee state for the specified unit
    Sample use: unit_set_guard_mode roman_spearmen on
    Class: UNIT_SET_GUARD_MODE

    Identifier: unit_set_skirmish_mode
    Parameters: unit_label on/off
    Description: Sets the skirmish melee state for the specified unit
    Sample use: unit_set_skirmish_mode velites1 off
    Class: UNIT_SET_SKIRMISH_MODE

    Identifier: unit_toggle_task_interrupt
    Parameters: unit_label melee/skirmish/fire_at_will/rout/berserk on/off
    Description: Enables/disables the specified interrupt for the unit
    Sample use: unit_toggle_task_interrupt roman_archers skirmish on
    Class: UNIT_TOGGLE_TASK_INTERRUPT

    Identifier: unit_set_fire_at_will_mode
    Parameters: unit_label on/off
    Description: Sets the fire-at-will melee state for the specified unit
    Sample use: unit_set_fire_at_will_mode roman_archers on
    Class: UNIT_SET_FIRE_AT_WILL_MODE

    Identifier: unit_set_formation_spacing
    Parameters: unit_label loose/tight
    Description: Sets the specified unit's formation spacing to loose or tight
    Sample use: unit_set_formation_spacing roman_archers loose
    Class: UNIT_SET_FORMATION_SPACING

    Identifier: unit_taunt
    Parameters: unit_label
    Description: Makes the unit taunt
    Sample use: unit_taunt barb_archers
    Class: UNIT_TAUNT

    Identifier: unit_use_special_ability
    Parameters: unit_label
    Description: Makes the unit perform their special ability
    Sample use: unit_use_special_ability barb_archers
    Class: UNIT_USE_SPECIAL_ABILITY

    Identifier: unit_group_enable_automation
    Parameters: group_label true/false
    Description: Sets or unsets unit group automation
    Sample use: unit_group_enable_automation
    Class: UNIT_GROUP_ENABLE_AUTOMATION

    Identifier: unit_group_automate_defend_position
    Parameters: group_label location radius
    Description: Instructs an automated unit group to defend position
    Sample use: unit_group_automate_defend_position 106 -56 75
    Class: UNIT_GROUP_AUTOMATE_DEFEND_POSITION

    Identifier: unit_group_automate_attack
    Parameters: group_label enemy_unit_label
    Description: Instructs an automated unit group to attack a specified enemy unit
    Sample use: unit_group_automate_attack enemy_unit
    Class: UNIT_GROUP_AUTOMATE_ATTACK

    Identifier: unit_group_immediate_place
    Parameters: group_label location degrees
    Description: orders the unit group to move to the specified location
    Sample use: unit_group_immediate_place group6 100 -60 -20
    Class: UNIT_GROUP_IMMEDIATE_PLACE

    Identifier: unit_group_order_halt
    Parameters: group_label
    Description: orders the unit group to stop it's orders
    Sample use: unit_group_order_halt group6
    Class: UNIT_GROUP_ORDER_HALT
    Parameters: group_label x y run(optional)
    Description: orders the unit group to move to the specified location
    Sample use: unit_group_order_move_formed group6 100 -60 run
    Class: UNIT_GROUP_ORDER_MOVE_FORMED

    Identifier: unit_group_order_move_unformed
    Sample use: unit_group_order_move_unformed group6 100 -60 run
    Class: UNIT_GROUP_ORDER_MOVE_UNFORMED

    Identifier: unit_group_order_relative_move_formed
    Parameters: group_label x y run(optional)
    Description: orders the unit group to move to the specified location

    Identifier: unit_group_order_relative_move_unformed
    Parameters: group_label x y run(optional)
    Description: orders the unit group to move to the specified location
    Sample use: unit_group_order_relative_move_unformed group6 100 -60 run
    Class: UNIT_GROUP_ORDER_RELATIVE_MOVE_UNFORMED
    Parameters: group_label target_unit_label
    Description: move the unit group so that at least one unit is in range of the target unit
    Sample use: unit_group_move_to_missile_range_of_unit archer_group enemy_spearmen3
    Class: UNIT_GROUP_MOVE_TO_MISSILE_RANGE_OF_UNIT

    Identifier: unit_group_move_to_missile_range_of_group
    Sample use: unit_group_move_to_missile_range_of_group archer_group enemy_group
    Class: UNIT_GROUP_MOVE_TO_MISSILE_RANGE_OF_GROUP

    Identifier: unit_group_order_attack_unit
    Parameters: group_label target_unit_label run(optional)
    Description: order the unit group to attack the target unit

    Identifier: unit_group_order_attack_group
    Parameters: group_label target_group_label run(optional)
    Description: orders the unit group to attack the target group
    Sample use: unit_group_order_attack_group cavalry_group1 enemy_archer_group
    Class: UNIT_GROUP_ORDER_ATTACK_GROUP
    Parameters: group_label formation_name
    Description: sets a group formation from descr_formations.txt
    Sample use: unit_group_order_change_group_formation group2 ordered_triple_line_1
    Class: UNIT_GROUP_ORDER_CHANGE_GROUP_FORMATION

    Identifier: unit_group_order_turn
    Sample use: unit_group_order_turn group2 90 (turns the group to 90 degrees)
    Class: UNIT_GROUP_ORDER_TURN

    Identifier: unit_group_set_morale
    Parameters: group_label morale_level (beserk/impetuous/high/firm/shaken/wavering/routing)
    Description: sets and locks the morale level for each unit in the group

    Identifier: unit_group_unset_morale
    Parameters: group_label
    Description: unlocks the units' morale, the game will retake control and update the morale normally
    Sample use: unit_group_unset_morale infantry_group
    Class: UNIT_GROUP_UNSET_MORALE

    Identifier: unit_group_change_unit_formation
    Parameters: group_label formation_type (square, horde, testudo, phalanx)
    Description: changes the formation of each unit in the specified unit group
    Sample use: unit_group_change_unit_formation hoplite_group phalanx
    Class: UNIT_GROUP_CHANGE_UNIT_FORMATION

    Identifier: unit_group_set_guard_mode
    Parameters: group_label on/off
    Description: Sets the guard melee state for all units in the specified group
    Sample use: unit_group_set_guard_mode group2 off
    Class: UNIT_GROUP_SET_GUARD_MODE

    Identifier: unit_group_set_skirmish_mode
    Parameters: group_label on/off
    Description: Sets the skirmish melee state for all units in the specified group
    Sample use: unit_group_set_skirmish_mode archer_group on
    Class: UNIT_GROUP_SET_SKIRMISH_MODE

    Identifier: unit_group_set_fire_at_will_mode
    Parameters: group_label on/off
    Description: Sets the guard melee state for all units in the specified group
    Sample use: unit_group_set_fire_at_will_mode group2 off
    Class: UNIT_GROUP_SET_FIRE_AT_WILL_MODE

    Identifier: unit_group_set_formation_spacing
    Parameters: group_label loose/tight
    Description: Sets the formation spacing, for each unit in the group, to loose or tight
    Sample use: unit_group_set_formation_spacing group1 loose
    Class: UNIT_GROUP_SET_FORMATION_SPACING

    Identifier: unit_deploy_stakes
    Parameters: unit_label
    Description: Deploys stakes for the specified unit (ignored if stakes already deployed or the unit doesn't have this ability).
    Sample use: unit_deploy_stakes roman_archers
    Class: UNIT_DEPLOY_STAKES

    Identifier: battle_restrict_clickable_area
    Parameters: left, top, right, bottom or no parameters to clear all regions
    Description: Restricts world region in which player can click
    Sample use: battle_restrict_clickable_area 1,2,3,4
    Class: BATTLE_RESTRICT_CLICKABLE_AREA

    Identifier: game_quit
    Parameters: n/a
    Description: Quits the game
    Sample use: game_quit
    Class: GAME_QUIT

    Identifier: reset_rand
    Parameters: n/a
    Description: Resets random number generator
    Sample use: reset_rand
    Class: RESET_RAND

    Identifier: invulnerable_general
    Parameters: character_name
    Description: invulnerable_general : makes that named general invulnerable in battle
    Sample use: invulnerable_general
    Class: BATTLE_INVULNERABLE_GENERAL

    Identifier: vulnerable_general
    Parameters: character_name
    Description: vulnerable_general : makes that named general vulnerable in battle
    Sample use: vulnerable_general
    Class: BATTLE_VULNERABLE_GENERAL

    Identifier: move_strat_camera
    Parameters: strategy map position
    Description: Move the camera smoothly to the position
    Sample use: move_camera 20,35
    Class: MOVE_STRAT_CAMERA

    Identifier: snap_strat_camera
    Parameters: strategy map position
    Description: Move the camera immediately to the position
    Sample use: snap_strat_camera 20,35
    Class: SNAP_STRAT_CAMERA

    Identifier: zoom_strat_camera
    Parameters: strategy map position
    Description: Change the zoom of the camera (0 right up close, 1 far out), clamped at a hard-coded lower bound
    Sample use: zoom_camera 0.4
    Class: ZOOM_STRAT_CAMERA

    Identifier: camera_restrictions_set
    Parameters: on/off
    Description: sets or unsets the restricted camera
    Sample use: camera_restrictions_set on
    Class: CAMERA_RESTRICTIONS_SET

    Identifier: lock_camera_restrictions_set
    Parameters: on/off
    Description: sets or unsets the players ability to change the camera restriction
    Sample use: lock_camera_restrictions_set on
    Class: LOCK_CAMERA_RESTRICTIONS_SET

    Identifier: camera_event_cuts_active_set
    Parameters: on/off
    Description: activates and deactivates the event cut camera
    Sample use: camera_event_cuts_active_set off
    Class: CAMERA_EVENT_CUTS_ACTIVE_SET

    Identifier: camera_default_mode_set
    Parameters: tw/rts/general/user_pref
    Description: Sets the default camera to TotalWar Camera (tw), RTS Camera (rts), General's Camera (general)
    or whichever mode the player has in his preferences (user_pref)
    Sample use: camera_default_mode_set tw
    Class: CAMERA_DEFAULT_MODE_SET

    Identifier: battle_default_camera
    Parameters: n/a
    Description: Sets the default camera
    Sample use: battle_default_camera
    Class: BATTLE_DEFAULT_CAMERA

    Identifier: battle_general_camera
    Parameters: n/a
    Description: Sets the general's camera
    Sample use: battle_general_camera
    Class: BATTLE_GENERAL_CAMERA

    Identifier: set_camera_bookmark
    Parameters: Bookmark index (0-21), positi0n(x,y,z) target(x,y,z)
    Description: Sets a camera bookmark to position and target specified, which can later be recalled with UseCameraBookmark
    Sample use: set_camera_bookmark 1, 100, 0, 100, 100, 0, 0
    Will set the camera bookmark to position (100,0,100), looking straight back along the z axis
    Class: SET_CAMERA_BOOKMARK

    Identifier: camera_position_at_bookmark
    Parameters: Index (0-21)
    Description: If the bookmark has been set (either in game, or with Set_Camera_Bookmark), then this will move the camera to the position and
    target specified by the bookmark
    Sample use: camera_position_at_bookmark 0
    Class: CAMERA_POSITION_AT_BOOKMARK

    Identifier: camera_zoom_to_bookmark
    Parameters: Index (0-21) max_speed(optional default=200)
    Description: If the bookmark has been set (either in game, or with set_camera_bookmark), then this will move the camera to the position and
    target specified by the bookmark
    Sample use: camera_zoom_to_bookmark 0 50
    Class: CAMERA_ZOOM_TO_BOOKMARK

    Identifier: camera_position
    Parameters: position x,y,z target x,y,z
    Description: Immediately places the camera at the specified position
    Sample use: "camera_position 0 0 0 0 0 -1"
    Class: CAMERA_POSITION

    Identifier: camera_zoom_to
    Parameters: position x,y,z target x,y,z speed(optional)
    Description: "Zoom camera to position, and look at target"
    Sample use: "camera_zoom_to 0 0 0 0 0 -1 50"
    Class: CAMERA_ZOOM_TO

    Identifier: camera_look_at_position
    Parameters: x y or location_label
    Description: camera turns to look at a position on the battlefield, but doesn't move
    Sample use: camera_look_at_position 123.4 56.7
    Class: CAMERA_LOOK_AT_POSITION

    Identifier: camera_look_at_unit
    Parameters: unit_label
    Description: turns the camera to look at the unit without moving
    Sample use: camera_look_at_unit spearmen7
    Class: CAMERA_LOOK_AT_UNIT

    Identifier: camera_track_unit
    Parameters: unit_label direction distance height pitch(optional)
    Description: camera tracks the specified unit, direction can be a number in degrees or an identifier front, back, left or right
    Sample use: camera_track_unit roman_cavalry1 left 20 10 -15
    Class: CAMERA_TRACK_UNIT

    Identifier: camera_zoom_to_unit
    Parameters: unit_label
    Description: zoom the camera to the soecified unit
    Sample use: camera_zoom_to_unit spearmen7
    Class: CAMERA_ZOOM_TO_UNIT

    Identifier: e_camera_zoom_to_unit
    Parameters:
    Description: zoom the camera to the unit specified by the event
    Sample use: e_camera_zoom_to_unit
    Class: E_CAMERA_ZOOM_TO_UNIT

    Identifier: inhibit_camera_input
    Parameters: true/false
    Description: Stop the user affecting the camera position, either through the keyboard or mouse movement
    Sample use: inhibit_camera_input true
    Class: INHIBIT_CAMERA_INPUT

    Identifier: camera_shake
    Parameters: true/false
    Description: shake camera?
    Sample use: CAMERA_SHAKE true
    Class: CAMERA_SHAKE

    Identifier: declare_prologue
    Parameters: none
    Description: enforce prologue considerations upon the world, e.g. no general death during auto-resolve
    Sample use: declare_prologue
    Class: DECLARE_PROLOGUE

    Identifier: terminate_prologue
    Parameters: none
    Description: withdraw prologue considerations upon the world, e.g. no general death during auto-resolve
    Sample use: terminate_prologue
    Class: TERMINATE_PROLOGUE

    Identifier: provoke_rebellion
    Parameters: settlement name
    Description: Start a rebellion in the named settlement at the start of the next turn
    Sample use: provoke_rebellion Segesta
    Class: PROVOKE_REBELLION

    Identifier: move
    Parameters: character name, x, y
    Description: Move the named character to the location specified
    Sample use: move Gaius Julius, 20, 44
    Class: MOVE

    Identifier: reposition_character
    Parameters: character, x, y
    Description: Snap the character to a position
    Sample use: reposition_character Gaius Maximus, 14, 53
    Class: REPOSITION_CHARACTER

    Identifier: replenish_action_points
    Parameters: character name
    Description: replenish the character's action points
    Sample use: replenish_action_points Gaius Julius
    Class: REPLENISH_ACTION_POINTS

    Identifier: replenish_units
    Parameters: army identifier (the general's name)
    Description: replenish all the units to full numbers for the army
    Sample use: replenish_units Gaius Julius
    Class: REPLENISH_UNITS

    Identifier: spawn_character
    Parameters: faction, character as in character description in historical battle
    Description: create an army at a particular location
    Sample use: spawn_character Julii Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, x 54, y 124
    Class: SPAWN_CHARACTER

    Identifier: kill_character
    Parameters: character
    Description: Kill the character
    Sample use: kill_character Gaius Maximus
    Class: KILL_CHARACTER

    Identifier: spawn_army ... end
    Parameters: faction, character and units as in army description in historical battle
    (character description for general and unit descriptions for remainder of the army)
    Description: create an army at a particular location
    Sample use: spawn_army
    faction romans_julii
    character Foedus Chaerea, general, command 0, influence 0, management 0, subterfuge 0, age 20, , x 54, y 124
    unit roman generals guard cavalry soldiers 20 exp 9 armour 1 weapon_lvl 0
    unit roman legionary first cohort ii soldiers 40 exp 0 armour 0 weapon_lvl 0
    unit roman legionary cohort ii soldiers 60 exp 0 armour 0 weapon_lvl 0
    unit roman praetorian cohort i soldiers 60 exp 0 armour 0 weapon_lvl 0
    end
    Class: SPAWN_ARMY

    Identifier: engage_armies
    Parameters: attacking general, defending general
    Description: Instruct the attacking general to attack the defending general
    Sample use: engage_armies Gaius Julius, Epiroderix
    Class: ENGAGE_ARMIES

    Identifier: siege_settlement
    Parameters: attacking_character, settlement_name [,maintain|attack]
    Description: Instruct the character to siege the settlement
    Sample use: siege_settlement Gaius Julius, Rome, attack
    Class: SIEGE_SETTLEMENT

    Identifier: add_events
    Parameters: list of event descriptions
    Description: Adds events to the event manager. Event descriptions should follow from next string until tag.
    Sample use: add_events event historic stoic_philosophy date 14 summer end_add_events
    Class: ADD_EVENTS

    Identifier: historic_event
    Parameters: event type, movie_path
    Description: Triggers historic event.
    Sample use: historic_event stoic_philosophy movie faction/stoic_philosophy.bik
    Class: HISTORIC_EVENT

    Identifier: set_event_counter
    Parameters: event type, counter value
    Description: Changes the value of an event counter.
    Sample use: set_event_counter holds_cairo 0
    Class: SET_EVENT_COUNTER

    Identifier: freeze_faction_ai
    Parameters: faction
    Description: Freezes specified faction ai.
    Sample use: freeze_faction_ai aztecs
    Class: FREEZE_FACTION_AI

    Identifier: unfreeze_faction_ai
    Parameters: faction
    Description: Unfreezes specified faction ai.
    Sample use: unfreeze_faction_ai aztecs
    Class: UNFREEZE_FACTION_AI

    Identifier: create_mission
    Parameters: mission_id faction [additional mission specific parameters]
    Description: creates a mission with the specified id with the specified parameters
    Sample use: create_mission papal_build_church england London
    Class: CREATE_MISSION

    Identifier: freeze_recruit_pool
    Parameters: region_name|region_id|all [true|false]
    Description: Stop/start all unit pools replenish/deplenish in specified region or all regions
    Sample use: freeze_recruit_pool York_Province true
    Class: FREEZE_RECRUIT_POOL

    Identifier: set_recruit_pool
    Parameters: region_name|region_id value unit_name
    Description: Set specified amount of units to the unit pool of the specified type of unit in the specified region.
    Sample use: set_recruit_pool York_Province 5 temp heavy spearmen
    Class: SET_RECRUIT_POOL

    Identifier: inc_recruit_pool
    Parameters: region_name|region_id value unit_name
    Description: Add specified amount of units to the unit pool of the specified type of unit in the specified region.
    Sample use: inc_recruit_pool York_Province -2 temp_heavy_spearmen
    Class: INC_RECRUIT_POOL

    Identifier: restrict_autoresolve
    Parameters: [true|false]
    Description: Enable/disable battle autoresolve restriction
    Sample use: restrict_autoresolve true
    Class: RESTRICT_AUTORESOLVE

    Identifier: restrict_clickable_area
    Parameters: [allowed regions(by name or id)]
    Description: Enable/disable(with no parameters) clickable area restriction
    Sample use: restrict_clickable_area York_Province London_Province
    Class: RESTRICT_CLICKABLE_AREA

    Identifier: restrict_clickable_rect
    Parameters: [min_x min_y max_x max_y]
    Description: Adds new rectangle to clickable area restriction, or clears rectangular clickable area restriction if no parameters specified
    Sample use: restrict_clickable_rect 10 15 80 100
    Class: RESTRICT_CLICKABLE_RECT

    Identifier: restrict_strat_camera
    Parameters: [min_x min_y max_x max_y]
    Description: Enable/disable(with no parameters) start camera restriction
    Sample use: restrict_strat_camera 10 15 80 100
    Class: RESTRICT_STRAT_CAMERA

    Identifier: restrict_strat_radar
    Parameters: [true/false]
    Description: Enable/disable start radar restriction
    Sample use: restrict_strat_radar false
    Class: RESTRICT_STRAT_RADAR

    Identifier: set_faction_undiscovered
    Parameters: faction [true/false]
    Description: Set faction undiscovered status
    Sample use: set_faction_undiscovered aztecs false
    Class: SET_FACTION_UNDISCOVERED

    Identifier: create_unit
    Parameters: , [, num , exp , arm , wep
    Description: creates one or more units of the specified type
    Sample use: create_unit Foedus Chaerea, English_Knights, num 5, exp 1, arm 1, wep 2
    Class: CREATE_UNIT

    Identifier: link_faction_ai
    Parameters: faction, ai_label
    Description: links specified faction to specified ai label.
    Sample use: link_faction_ai england catholic
    Class: LINK_FACTION_AI

    Identifier: script
    Parameters: none
    Description: start a script
    Sample use: script
    Class: SCRIPT

    Identifier: terminate_script
    Parameters:
    Description: terminate a script
    Sample use: terminate_script
    Class: TERMINATE_SCRIPT

    Identifier: spawn_battle
    Parameters: folder name
    Description: Start the battle contained in the named folder, relative to the maps folder.
    The next command in the script should be prepare_for_battle.
    Sample use: spawn_battle custom/punic_1
    Class: SPAWN_BATTLE

    Identifier: if
    Parameters: conditions to satisfy to execute the scope
    Description: conditional execution
    Sample use: if TimerElapsed < 1000
    Class: IF

    Identifier: while
    Parameters: conditions to satisfy to execute this while
    Description: start a while loop
    Sample use: while TimerElapsed < 1000
    Class: WHILE

    Identifier: monitor_conditions
    Parameters: conditions to monitor to execute this scope
    Description: start a monitor loop when conditions are of a particular value
    Sample use: monitor_conditions not I_CharacterIsSelected Gaius Julius
    Class: MONITOR_STATE

    Identifier: monitor_event
    Parameters: event name, conditions to monitor to execute this scope
    Description: start a monitor loop in response to an event
    Sample use: monitor_event IncomingMessage IncomingMessageType wonder_captured
    Class: MONITOR_EVENT

    Identifier: terminate_monitor
    Parameters:
    Description: terminate a monitor loop
    Sample use: terminate_monitor
    Class: TERMINATE_MONITOR

    Identifier: wait_monitors
    Parameters:
    Description: Wait until all monitors terminated in this scope
    Sample use: wait_monitors
    Class: WAIT_MONITORS

    Identifier: console_command
    Parameters:
    Description: execute a command through the console
    Sample use: console_command kill_character "Gaius Julius"
    Class: CONSOLE_COMMAND

    Identifier: declare_counter
    Parameters: name of the counter, a single word identifier.
    Description: declare a counter and give it an initial value of zero
    Sample use: declare_counter blib
    Class: DECLARE_COUNTER

    Identifier: inc_counter
    Parameters: name of the counter, quantity to modify it by.
    Description: change a counter by a particular amount
    Sample use: inc_counter blib -137
    Class: MODIFY_COUNTER

    Identifier: set_counter
    Parameters: name of the counter, quantity to set it to.
    Description: change a counter to a particular value
    Sample use: set_counter blib -137
    Class: SET_COUNTER

    Identifier: prepare_for_battle
    Parameters:
    Description: Clear all the unit labels, location labels.
    This is separate from the spawn_battle command in case you are scripting a historical battle.
    Sample use: prepare_for_battle
    Class: PREPARE_FOR_BATTLE

    Identifier: declare_show_me
    Parameters:
    Description: Flag the script as a show me script - required for the AbandonShowMe event
    Sample use: declare_show_me
    Class: DECLARE_SHOW_ME

    Identifier: label_unit
    Parameters: alliance, army, unit, label
    Description: Label a particular unit
    Sample use: label_unit 0 2 4 julii_hastati_2
    Class: LABEL_UNIT

    Identifier: label
    Parameters: label
    Description: Label
    Sample use: label crap
    Class: LABEL

    Identifier: label_location
    Parameters: x, z, label
    Description: Label a particular location
    Sample use: label_location 35 58 the_big_hill
    Class: LABEL_LOCATION

    Identifier: define_unit_group
    Parameters: group_label unit1 unit2 unit3 ...
    Description: creates a unit group containing the specified units
    Sample use: "define_unit_group group1 archers1 archers2 archers3 spearmen1"
    Class: DEFINE_UNIT_GROUP

    Identifier: undefine_unit_group
    Parameters: group_label
    Description: removes the specified unit group
    Sample use: undefine_unit_group archer_group5
    Class: UNDEFINE_UNIT_GROUP

    Identifier: remove_unit_from_group
    Parameters: group_label unit_label
    Description: removes the unit from the group, if it is already a member
    Sample use: remove_unit_from_group group1 archers1
    Class: REMOVE_UNIT_FROM_GROUP

    Identifier: declare_timer
    Parameters: timer name
    Description: declare a script timer
    Sample use: declare_timer rout_timer
    Class: DECLARE_TIMER

    Identifier: restart_timer
    Parameters: none
    Description: restart the script timer
    Sample use: restart_timer
    Class: RESTART_TIMER

    Identifier: heed_pause
    Parameters: on/off
    Description: turn on/off the game pause acknowledgement - off by default
    Sample use: heed_pause on
    Class: HEED_PAUSE

    Identifier: wait
    Parameters: time in seconds
    Description: Wait for the specified time before proceeding to the next script command.
    The timer is based on the display update, so pausing the game does not pause the timer unless heed_pause is declared.
    Sample use: wait 1.3
    Class: DISPLAY_WAIT

    Identifier: campaign_wait
    Parameters: time in seconds
    Description: Wait for the specified time before proceeding to the next script command.
    Sample use: campaign_wait 1.3
    Class: CAMPAIGN_WAIT

    Identifier: battle_wait
    Parameters: time in seconds
    Description: Wait for the specified time before proceeding to the next script command.
    The timer is based on the battle update, so pausing and fast forwarding will affect the timer.
    Sample use: battle_wait 1.3
    Class: BATTLE_WAIT

    Identifier: suspend_during_battle
    Parameters: on/off
    Description: suspend the script during battles - off by default
    Sample use: suspend_during_battle on
    Class: SUSPEND_DURING_BATTLE

    Identifier: log
    Parameters: [trace|info|warn|debug|err|fatal|always] message
    Description: prints message to log output (always is default)
    Sample use: log warn This is warning!
    Class: SCRIPT_LOG

    Identifier: log_counter
    Parameters: [trace|info|warn|debug|err|fatal|always] counter_name
    Description: prints counter name and value into log output (always is default)
    Sample use: log_counter ScrollOpenedCounter
    Class: SCRIPT_LOG_COUNTER

    Identifier: set_music_state
    Parameters: tension, mobilize, battle or custom
    Description: Sets the music state in the battle
    Sample use: set_music_state mobilize
    Class: SET_MUSIC_STATE

    Identifier: enable_battle_notifications
    Parameters: 0 or 1
    Description: Enable audio notifications in the battle
    Sample use: enable_battle_notifications 0
    Class: ENABLE_BATTLE_NOTIFICATIONS

    Identifier: play_sound_event
    Parameters: [] [tag = ]
    Description: Plays sound event
    Sample use: play_sound_event PREBATTLE_TEST
    Class: PLAY_SOUND_EVENT

    Identifier: stop_sound_event
    Parameters:
    Description: Stops tagged sound events
    Sample use: stop_sound_event PREBATTLE_TEST
    Class: STOP_SOUND_EVENT

    Identifier: point_at_character
    Parameters: character name
    Description: point at the character
    Sample use: point_at_character Gaius Julius
    Class: POINT_AT_CHARACTER

    Identifier: point_at_settlement
    Parameters: settlement name
    Description: point at the settlement
    Sample use: point_at_settlement Roma
    Class: POINT_AT_SETTLEMENT

    Identifier: e_point_at_settlement
    Parameters:
    Description: point at a settlement specified in a piece of advice
    Sample use:
    Class: E_POINT_AT_SETTLEMENT

    Identifier: point_at_strat_position
    Parameters: strategy map position
    Description: point at the position
    Sample use: point_at_strat_position 44, 55
    Class: POINT_AT_STRAT_POSITION

    Identifier: point_at_message
    Parameters: message number/id, [up|down|left|right|top_left|top_right|bot_left|bot_right]
    optional, set the direction that the pointer will come from
    Description: point at the message
    Sample use: point_at_message 0
    Class: POINT_AT_MESSAGE

    Identifier: ui_flash_start
    Parameters: UI element (see available_ui_element_ids.txt for appropriate identifiers),
    [up|down|left|right|top_left|top_right|bot_left|bot_right] - optional, set the direction that the pointer will come from
    Description: move the highlight pointer to the named element
    Sample use: ui_flash_start finances_button
    Class: UI_FLASH_START

    Identifier: ui_flash_stop
    Parameters: none
    Description: clear the tutorial pointer
    Sample use: ui_flash_stop
    Class: UI_FLASH_STOP

    Identifier: settlement_flash_start
    Parameters: strategy map position
    Description: highlight the tile
    Sample use: settlement_flash_start Tarquinii
    Class: SETTLEMENT_FLASH_START

    Identifier: settlement_flash_stop
    Parameters: strategy map position
    Description: stop highlighting the tile
    Sample use: settlement_flash_stop Tarquinii
    Class: SETTLEMENT_FLASH_STOP

    Identifier: character_flash_start
    Parameters: character name
    Description: flash the tile under the character
    Sample use: character_flash_start Gaius Julius
    Class: CHARACTER_FLASH_START

    Identifier: character_flash_stop
    Parameters: character name
    Description: stop flashing the tile under the character
    Sample use: character_flash_stop Gaius Julius
    Class: CHARACTER_FLASH_STOP

    Identifier: point_at_location
    Parameters: position (x,y) or location label
    Description: Indicates a position on the battle map
    Sample use: point_at_location pos1
    Class: POINT_AT_LOCATION

    Identifier: point_at_unit_pos
    Parameters: unit_label
    Description: Indicates a unit's position on the battle map
    Sample use: point_at_unit_pos generals_unit
    Class: POINT_AT_UNIT_POS

    Identifier: point_at_unit_group_pos
    Parameters: group_label
    Description: Indicates a unit_group's position on the battle map
    Sample use: point_at_unit_group_pos infantry_group1
    Class: POINT_AT_UNIT_GROUP_POS

    Identifier: remove_battle_map_arrow
    Parameters:
    Description: removes the arrow created by point_at_location/unit/unit_group
    Sample use: remove_battle_map_arrow
    Class: REMOVE_BATTLE_MAP_ARROW

    Identifier: point_at_card
    Parameters: card type (unit | character | building), id, nth instance
    Description: Points at the card type specified if it can be found
    For units and buildings 'id' is their id in the tech-tre
    For characters it is their name
    Use nth instance to skip over cards with the same type
    Sample use: point_at_card unit hastati 2 - to point at the second hastati card the game can find
    Class: POINT_AT_CARD

    Identifier: point_at_unit_card
    Parameters: unit label, [up|down|left|right|top_left|top_right|bot_left|bot_right] - optional, set the direction that the pointer will come from
    Description: Points at the card of the specified unit
    Sample use: point_at_card roman_archers
    Class: POINT_AT_UNIT_CARD

    Identifier: e_point_at_unit_card
    Parameters: [up|down|left|right|top_left|top_right|bot_left|bot_right] - optional, set the direction that the pointer will come from
    Description: Points at the card of the unit referred to in the current event context
    Sample use: e_point_at_unit_card
    Class: E_POINT_AT_UNIT_CARD

    Identifier: show_mouse_button_animation
    Parameters: [left | right] true/false
    Description: Starts/stops the animation showing which mouse button to press (either left or right at the moment)
    Sample use: show_mouse_button_animation left true - start the animation showing the left mouse button being pressed.
    show_mouse_button_animation left false - stop the left mouse button animation. NOTE: Only 1 animation can be
    shown at a time
    Class: SHOW_MOUSE_BUTTON_ANIMATION

    Identifier: hide_ui
    Parameters:
    Description: Hide the entire UI (for cinematic purposes)
    Sample use: hide_ui
    Class: HIDE_UI

    Identifier: show_ui
    Parameters:
    Description: Show the entire UI (after hiding)
    Sample use: show_ui
    Class: SHOW_UI

    Identifier: disable_movie_view
    Parameters:
    Description: disables black movie mode restriction bars
    Sample use: disable_movie_view
    Class: DISABLE_MOVIE_VIEW

    Identifier: disable_ui
    Parameters: UI element (see available_ui_element_ids.txt for appropriate identifiers)
    Description: turn off the named UI element
    Sample use: disable_ui finances_button
    Class: DISABLE_UI

    Identifier: enable_ui
    Parameters: UI element (see available_ui_element_ids.txt for appropriate identifiers)
    Description: turn on the named UI element
    Sample use: enable_ui finances_button
    Class: ENABLE_UI

    Identifier: disable_entire_ui
    Parameters: none
    Description: suspend the entire UI
    Sample use: disable_entire_ui
    Class: DISABLE_ENTIRE_UI

    Identifier: enable_entire_ui
    Parameters: none
    Description: reactivate the entire UI
    Sample use: enable_entire_ui
    Class: ENABLE_ENTIRE_UI

    Identifier: set_cards_selectable
    Parameters: true/false
    Description: set whether cards are selectble or not
    Sample use: set_cards_selectable false
    Class: SET_CARDS_SELECTABLE

    Identifier: disable_cursor
    Parameters: none
    Description: deactivate and hide the cursor
    Sample use: disable_cursor
    Class: DISABLE_CURSOR

    Identifier: enable_cursor
    Parameters: none
    Description: activate and show the cursor
    Sample use: enable_cursor
    Class: ENABLE_CURSOR

    Identifier: reveal_tile
    Parameters: strategy map position
    Description: remove the shroud from the tile
    Sample use: reveal_tile 25, 43
    Class: REVEAL_TILE

    Identifier: hide_all_revealed_tiles
    Parameters:
    Description: restore all tile shrouds
    Sample use: hide_all_revealed_tiles
    Class: HIDE_ALL_REVEALED_TILES

    Identifier: play_video
    Parameters: filename
    Description: play a piece of video
    Sample use: play_video fmv/rome_intro.mpg
    Class: PLAY_VIDEO

    Identifier: advance_advice_thread
    Parameters: thread name, no_dismiss
    Description: Increment the score of the advice thread
    Sample use: advance_advice_thread 0098_prologue_selection no_dismiss
    Class: ADVANCE_ADVICE_THREAD

    Identifier: dismiss_advice
    Parameters:
    Description: Dismiss the currently displayed advice
    Sample use: dismiss_advice
    Class: DISMISS_ADVICE

    Identifier: dismiss_advisor
    Parameters:
    Description: Dismiss the advisor
    Sample use: dismiss_advisor
    Class: DISMISS_ADVISOR

    Identifier: suspend_unscripted_advice
    Parameters: flag
    Description: Suspend (or restore) all advice not generated by the script
    Sample use: suspend_unscripted_advice true
    Class: SUSPEND_UNSCRIPTED_ADVICE

    Identifier: select_character
    Parameters: character name
    Description: selects a character on the campaign map
    Sample use: select_character Gaius Julius
    Class: SELECT_CHARACTER

    Identifier: e_select_character
    Parameters:
    Description: selects a character referred to in the current event context on the campaign map
    Sample use: e_select_character, console_command remove_ancillary this
    Class: E_SELECT_CHARACTER

    Identifier: select_settlement
    Parameters: settlement name
    Description: selects a settlement on the campaign map
    Sample use: select_settlement Roma
    Class: SELECT_SETTLEMENT

    Identifier: e_select_settlement
    Parameters:
    Description: selects a settlement referred to in the current event context on the campaign map
    Sample use: e_select_settlement, console_command create_building this small_church
    Class: E_SELECT_SETTLEMENT

    Identifier: call_object_shortcut
    Parameters: ui object name, shortcut name (see available_ui_element_ids.txt for appropriate element identifiers)
    Description: calls the keyboard shortcut of a ui element the shortcut name can be left out
    Most buttons don't require a shortcut name, instead the 'on_select' method is called
    Sample use: call_object_shortcut strat_ui speedup_ai - will toggle the fast ai mode
    call_object_shortcut diplomacy_overview_button - will select the diplomacy overview button
    Class: CALL_OBJECT_SHORTCUT

    Identifier: simulate_mouse_click
    Parameters: [lclick_down|lclick_up|rclick_down|rclick_up|ldbl_click]
    Description: Acts as if the given mouse event had happened on the currently 'selected' ui_element (see 'select_element' command)
    Sample use: select_element hud_show_buildings_tab
    simulate_mouse_click click_down
    Class: SIMULATE_MOUSE_CLICK

    Identifier: select_ui_element
    Parameters: element id (see available_ui_element_ids.txt for appropriate identifiers)
    Description: Use in conjunction with simulate mouse click to store the element that will next recieve the simulated mouse click
    Sample use: select_element hud_show_buildings_tab
    simulate_mouse_click click_down
    Class: SELECT_ELEMENT

    Identifier: disable_shortcuts
    Parameters: {element_id}, {shortcut_function}, true/false
    Description: This will disable/enable all keyboard shortcuts for a given element (or all elements if element_id is omitted)
    and function (or all functions for that element if omitted), except the key defined as being the 'quit' key
    (ESC by default). See data/descr_shortcuts.txt or the print_shortcuts console command for the element_ids
    that are useable
    Sample use: disable_shortcuts true - to disable, disable_shortcuts false - to enable them again
    Class: DISABLE_SHORTCUTS

    Identifier: set_shortcut_keyset
    Parameters: keyset_name
    Description: This will set the current keyset to the name specified if valid
    Sample use: set_shortcut_keyset default
    Class: SET_SHORTCUT_KEYSET

    Identifier: filter_unit_commands
    Parameters: switch, unit name, function
    Description: Turn off the command shell, or one part of it, for all units or the named unit
    Sample use: filter_unit_commands on velites_alpha change_formation
    filter_unit_commands off velites_alpha
    filter_unit_commands off
    Class: UNIT_UISHELL_FILTER

    Identifier: filter_unit_group_commands
    Parameters: switch, unit name, function
    Description: Turn off the command shell, or one part of it, for all units or the named unit
    Sample use: filter_unit_group_commands on storm_troopers change_formation
    filter_unit_group_commands off storm_troopers
    filter_unit_group_commands off
    Class: UNIT_GROUP_UISHELL_FILTER

    Identifier: filter_unit_selection_commands
    Parameters: switch, function
    Description: Turn off the command shell, or one part of it, for all units
    Sample use: filter_unit_selection_commands on change_formation
    filter_unit_selection_commands off
    Class: UNIT_SELECTION_UISHELL_FILTER

    Identifier: filter_settlement_commands
    Parameters: switch, unit name, function
    Description: Turn off the command shell, or one part of it, for all settlements or the named settlement
    Sample use: filter_settlement_commands on Arretium change_formation
    filter_settlement_commands off Arretium
    filter_settlement_commands off
    Class: SETTLEMENT_UISHELL_FILTER

    Identifier: filter_character_commands
    Parameters: switch, unit name, function
    Description: Turn off the command shell, or one part of it, for all characters or the named character
    Sample use: filter_character_commands on Gaius Julius, change_formation (note comma)
    filter_character_commands off Gaius Julius
    filter_character_commands off

    Identifier: filter_all_ui_commands
    Parameters: switch
    Description: Turn on or off the command shell
    Sample use: filter_all_ui_commands on
    Class: SWITCH_ALL_UISHELL_FILTERS

    Identifier: ui_indicator
    Parameters: { } or {track } or {track_3d } or
    {track_ground } or {track_ground_3d } or {track_unit } or
    {track_unit_3d } [colour ] [scale ] [period ] [loop]
    Description: Display a UI indicator
    Sample use: ui_indicator 0 circle 500 500 colour 255 255 0 scale 2.0 period 2.0 loop
    Class: UI_INDICATOR_COMMAND

    Identifier: ui_indicator_remove
    Parameters:
    Description: Remove a UI indicator
    Sample use: ui_indicator_remove 0
    Class: UI_INDICATOR_REMOVE_COMMAND

    Identifier: steal_esc_key
    Parameters: on/off
    Description: Steals keyboard input for the escape key, taking away it's default behaviour. When the ESC key is pressed, the trigger,
    the trigger ET_ESC_PRESSED will fire, so this should be monitored. Default functionality of esc will be returned at this
    point. Note that if anything else steals the esc key after this command, then that will get priority instead. The intended
    use for this command is to allow script writers to create skippable sections that are skipped by pressing ESC
    Sample use:
    Class: STEAL_ESC_KEY

    Identifier: highlight_recruitment_item
    Parameters: unit name to be passed in via event context as refered to unit export_descr_unit.txt
    Description: will highlight the given unit in the recruitment queue. If the item isn't being shown, then the slider will be set so that
    the item is visible. Add 'false' to the end to stop the flashing
    Sample use: highlight_recruitment_item or highlight_recruitment_item false
    Class: E_HIGHLIGHT_RECRUITMENT_ITEM

    Identifier: highlight_construction_item
    Parameters: [building_name] [true|false]
    Description: Will highlight the given building in the construction options. If building_name is missing will use advised_build from
    event context. If the item isn't being shown, then the slider will be set so that the item is visible.
    Sample use: highlight_construction_item
    Class: E_HIGHLIGHT_CONSTRUCTION_ITEM

    Identifier: highlight_siege_item
    Parameters: [siege_item_name]
    Description: Will highlight the given siege item (tower, ladder, ram) in the siege construction options.
    Sample use: highlight_siege_item ladder
    Class: E_HIGHLIGHT_SIEGE_ITEM

    Identifier: disable_save
    Parameters:
    Description: Disable ability to save game
    Sample use: disable_save
    Class: DISABLE_SAVE

    Identifier: enable_save
    Parameters:
    Description: Enable ability to save game
    Sample use: enable_save
    Class: ENABLE_SAVE


    Kingdoms Commands From the official Kingdoms docudemons, some are updated with new features, some are completely new.

    Identifier: unit_toggle_task_interrupt
    Parameters: unit_label melee/skirmish/fire_at_will/rout/berserk/infighting on/off
    Description: Enables/disables the specified interrupt for the unit
    Sample use: unit_toggle_task_interrupt roman_archers skirmish on
    Class: UNIT_TOGGLE_TASK_INTERRUPT

    Identifier: kill_character
    Parameters: death type (optional, natural by default), character
    Description: Kill the character
    Sample use: kill_character DET_POISONED Gaius Maximus
    Class: KILL_CHARACTER

    Identifier: set_faction_banner
    Parameters: parameter1: faction whose banner is to be changed
    Parameters2: new faction banner name
    Description: Changes a faction’s banner at a certain point in the game in both campaign and battle
    Sample use: set_faction_banner
    faction denmark
    banner kalmar_union
    Class: SET_FACTION_BANNER

    Identifier: historic_event
    Parameters: event type, accept/decline scroll, movie_path, factions
    Description: Triggers historic event. If accept/decline, increments a [event]_accepted or [event]_declined counter on selection.
    Sample use: historic_event stoic_philosophy true faction/stoic_philosophy.bik
    Class: HISTORIC_EVENT

    Identifier: set_religion
    Parameters: faction, religion
    Description: Changes the religion of a faction.
    Sample use: set_religion England pagan
    Class: SET_RELIGION

    Identifier: change_population_religion
    Parameters: faction, religion_to, percent, religion_from (religion_from optional, current faction religion by default)
    Description: Changes the religion of a faction.
    Sample use: change_population_religion England pagan 50 catholic
    Class: CHANGE_POPULATION_RELIGION

    Identifier: add_money
    Parameters: faction, amount
    Description: Adds money (negative value subtracts) to a faction's treasury.
    Sample use: add_money England 2007
    Class: ADD_MONEY

    Identifier: Identifier: destroy_buildings
    Parameters: Parameters: faction, building_chain, refund
    Description: Description: Destroys all buildings in a chain, can refund money.
    Sample use: Sample use: destroy_buildings England pagan true
    Class: DESTROY_BUILDINGS

    Identifier: destroy_units
    Parameters: faction, attribute_or_type
    Description: Disbands all units in the faction's armies with the specified name or attribute.
    Sample use: destroy_units England free_upkeep_unit
    Class: DESTROY_UNITS

    Identifier: retire_characters
    Parameters: faction, character_type
    Description: Retires all characters in the faction's armies of the specified type.
    Sample use: retire_characters England priest
    Class: RETIRE_CHARACTERS

    Identifier: set_kings_purse
    Parameters: faction, amount
    Description: Changes the money granted by the king's purse.
    Sample use: set_kings_purse England 40000
    Class: SET_KINGS_PURSE

    Identifier: increment_kings_purse
    Parameters: faction, amount
    Description: Increments the amount of money granted by the king's purse.
    Sample use: increment_kings_purse England 400
    Class: INCREMENT_KINGS_PURSE

    Identifier: add_settlement_turmoil
    Parameters: settlement_name, num_turns
    Description: Adds turmoil to the settlement, will decrease per turn.
    Sample use: add_settlement_turmoil London 5
    Class: ADD_SETTLEMENT_TURMOIL

    Identifier: send_character_off_map
    Parameters: character_name
    Description: Removes a character from the campaign map, but leaves them in the family tree.
    Sample use: send_character_off_map Edward
    Class: SEND_CHARACTER_OFF_MAP

    Identifier: generate_random_counter
    Parameters: event_counter name, min_value, max_value
    Description: Sets the specified counter to a random value between min and max inclusive.
    Sample use: generate_random_counter RandomCounter 10 20
    Class: GENERATE_RANDOM_COUNTER

    Identifier: random_counter_inc
    Parameters: event_counter name, min_value, max_value
    Description: Increments the specified counter by a random value between min and max inclusive.
    Sample use: random_counter_inc RandomCounter 10 20
    Class: RANDOM_COUNTER_INC

    Identifier: change_settlement_name
    Parameters: settlement_label, new_name_label
    Description: Changes a settlement's name to a new one from expanded.txt.
    Sample use: change_settlement_name London Perth
    Class: CHANGE_SETTLEMENT_NAME

    Identifier: inc_event_counter
    Parameters: event type, value
    Description: Increments the value of an event counter.
    Sample use: inc_event_counter holds_cairo -1
    Class: Class: INC_EVENT_COUNTER

    Identifier: set_faction_standing
    Parameters: faction, faction, amount
    Description: Changes first faction's standing towards second faction.
    Sample use: set_faction_standing England France -0.8
    Class: SET_FACTION_STANDING

    Identifier: faction_emerge
    Parameters: emerging_faction, target_faction, min_num_remain, max_order_threshold, max_order_threshold_surrounding, max_order_dropoff, min_level_threshold, fire_emerge_message, leader_script_label, leader_name, leader_age
    Description: Evaluates the target factions settlements with a settlement level >= min_level_threshold and public order <= max_order_threshold. If the settlement with the lowest order fails, is it turned over to the emerge_faction. The leader_script_label and leader_name are used if a new leader is required. min_num_remain specifies the minimum number of settlements for the target faction to keep. Surrounding regions are also evaluated against the surrounding threshold.
    Sample use: faction_emerge barons_alliance England 1 85.0 100.0 1.2 town false edward1 Edward 30
    Class: FACTION_EMERGE

    Identifier: reset_guild_standing
    Parameters: guild
    Description: Sets the guild standing for this guild of all factions to 0.
    Sample use: Sample use: reset_guild_standing hanseatic_guild
    Class: Class: RESET_GUILD_STANDING

    Identifier: give_everything_to_faction
    Parameters: source_faction, target_faction, bool
    Description: Gives all assets of source faction to target faction. Flag determines if faction defeated message is shown
    Sample use: give_everything_to_faction norway denmark false
    Class: GIVE_EVERYTHING_TO_FACTION

    Identifier: set_settlement_founding_conversion_rate
    Parameters: settlement_name, conversion_rate
    Description: Sets the settlements founding conversion rate.
    Sample use: set_settlement_founding_conversion_rate London 0.05
    Class: SET_SETTLEMENT_FOUNDING_CONVERSION_RATE

    Identifier: change_battle_model
    Parameters: guild
    Description: Changes the faction's leader/heir's battle model.
    Sample use: change_battle_model england leader [model]
    Class: CHANGE_BATTLE_MODEL

    Identifier: Identifier: set_owner_founding_conversion_rate
    Parameters: Parameters: settlement_name, conversion_rate
    Description: Description: Sets the settlements owner conversion rate.
    Sample use: Sample use: set_owner_founding_conversion_rate London 0.05
    Class: SET_SETTLEMENT_OWNER_CONVERSION_RATE