Events
- "AreaEntered"
 
- "AreaExited"
 
- AgentEntersMilitaryForce
 
- AgentLeavesMilitaryForce
 
- AreaEnteredEvent
 
- AreaExitedEvent
 
- BattleBeingFought
 
- BattleCompleted
 
- BattleCompletedPostModelNotify
 
- BattleConflictFinished
 
- BuildingBrowserInitialized
 
- BuildingCompleted
 
- BuildingConstructionCanceled
 
- BuildingConstructionCancelled
 
- BuildingConstructionIssuedByPlayer
 
- BuildingConstructionStarted
 
- BuildingDemolished
 
- CampaignArmiesMerge
 
- CampaignBuildingDamaged
 
- CampaignBuildingRepaired
 
- CampaignCoastalAssaultOnCharacter
 
- CampaignCoastalAssaultOnGarrison
 
- CampaignEffectsBundleAwarded
 
- CampaignEffectsBundleRemoved
 
- CharacterAncillaryEquipped
 
- CharacterAncillaryGained
 
- CharacterAncillaryLost
 
- CharacterAssignedToPost
 
- CharacterAttacksAlly
 
- CharacterBecomesFactionLeader
 
- CharacterBesiegesERS
 
- CharacterBesiegesSettlement
 
- CharacterBlockadedPort
 
- CharacterBrokePortBlockade
 
- CharacterBuildingCompleted
 
- CharacterCanLiberate
 
- CharacterCandidateBecomesMinister
 
- CharacterCapturedSettlementUnopposed
 
- CharacterCharacterTargetAction
 
- CharacterComesOfAge
 
- CharacterCompletedBattle
 
- CharacterCreated
 
- CharacterDeclinesAttackOfOpportunity
 
- CharacterDisembarksNavy
 
- CharacterEmbarksNavy
 
- CharacterEndsBesiegingSettlement
 
- CharacterEntersAttritionalArea
 
- CharacterEntersGarrison
 
- CharacterEntersMilitaryForce
 
- CharacterEvent
 
- CharacterFactionChange
 
- CharacterFamilyRelationDied
 
- CharacterFinishedMovingEvent
 
- CharacterGarrisonTargetAction
 
- CharacterGarrisonTargetEvent
 
- CharacterHasChild
 
- CharacterInfoPanelOpened
 
- CharacterKilledOtherCharacter
 
- CharacterLeavesGarrison
 
- CharacterLeavesMilitaryForce
 
- CharacterLoanedEvent
 
- CharacterLootedSettlement
 
- CharacterLoyaltyChanged
 
- CharacterMaintainsSiege
 
- CharacterMilitaryForceBuildingCompleted
 
- CharacterMilitaryForceBuildingConstructionCanceled
 
- CharacterMilitaryForceBuildingConstructionStarted
 
- CharacterMilitaryForceBuildingDamaged
 
- CharacterMilitaryForceBuildingDemolished
 
- CharacterMilitaryForceBuildingRepaired
 
- CharacterMilitaryForceTargetEvent
 
- CharacterMilitaryForceTraditionPointAllocated
 
- CharacterMilitaryForceTraditionPointAvailable
 
- CharacterMinisterialPositionChanged
 
- CharacterParticipatedAsSecondaryGeneralInBattle
 
- CharacterParticipatedInBattle
 
- CharacterPerformedSuccessfulAgentAction
 
- CharacterPerformsActionAgainstFriendlyTarget
 
- CharacterPerformsRegionSlotOccupationDecision
 
- CharacterPerformsRegionSlotOccupationDecisionBeforeOutcomeApplication
 
- CharacterPerformsSettlementOccupationDecision
 
- CharacterPerformsSettlementOccupationDecisionBeforeOutcomeApplication
 
- CharacterPostBattleCaptiveOptionSelected
 
- CharacterPostBattleEnslave
 
- CharacterPostBattleRelease
 
- CharacterPostBattleSlaughter
 
- CharacterPostbattleCaptiveOptionFeedTheHydra
 
- CharacterPostbattleCaptiveOptionFoodForTheNests
 
- CharacterPostbattleCaptiveOptionSacrificeToHades
 
- CharacterPromoted
 
- CharacterRankUp
 
- CharacterRankUpNeedsAncillary
 
- CharacterRazedSettlement
 
- CharacterRegionSlotTargetEvent
 
- CharacterRelativeKilled
 
- CharacterSackedSettlement
 
- CharacterSelected
 
- CharacterSkillPointAllocated
 
- CharacterSkillPointAvailable
 
- CharacterSkillPointDeallocated
 
- CharacterTargetEvent
 
- CharacterTraitsChanged
 
- CharacterTurnEnd
 
- CharacterTurnStart
 
- CharacterWithdrewFromBattle
 
- ClimatePhaseChange
 
- ComponentOnTooltipShow
 
- DilemmaChoiceMadeEvent
 
- DilemmaEvent
 
- DilemmaIssued
 
- DiplomaticOfferRejected
 
- DynastyAdoptedFaction
 
- DynastyAppointedHeirChanged
 
- DynastyRulerChanged
 
- EventFeedEventRecordedEvent
 
- FactionAboutToEndTurn
 
- FactionBarterAgreementTicked
 
- FactionBarterAgreementTransaction
 
- FactionBecomesLiberationSubject
 
- FactionBecomesLiberationVassal
 
- FactionBecomesSubject
 
- FactionBecomesVassal
 
- FactionBeginTurnPhaseNormal
 
- FactionBribesUnit
 
- FactionChangesHomeRegion
 
- FactionCharacterDiedOrWounded
 
- FactionCivilWarOccured
 
- FactionCompletedQuestBattle
 
- FactionDestroysOtherFaction
 
- FactionEncountersOtherFaction
 
- FactionEvent
 
- FactionForeignTradersTransaction
 
- FactionGodAttitudeTierChange
 
- FactionGovernmentTypeChanged
 
- FactionHeirChanged
 
- FactionInitiatedQuestBattle
 
- FactionInitiatesHecatomb
 
- FactionInitiatesPrayer
 
- FactionJoinsConfederation
 
- FactionJoinsConfederationBeforeReassign
 
- FactionLeaderDeclaresWar
 
- FactionLeaderIssuesEdict
 
- FactionLeaderRemovedEdict
 
- FactionLeaderSignsPeaceTreaty
 
- FactionLiberated
 
- FactionOvercomesOtherFaction
 
- FactionPooledResourceGift
 
- FactionPreTeleportAndInitiateQuestBattle
 
- FactionRejectedSovereign
 
- FactionRoundStart
 
- FactionTurnEnd
 
- FactionTurnStart
 
- FamilyMembersDivorce
 
- FamilyMembersMarriage
 
- FirstTickAfterNewCampaignStarted
 
- FirstTickAfterWorldCreated
 
- ForceAdoptsStance
 
- ForcePlagueStateChanged
 
- ForeignSlotBuildingCompleteEvent
 
- ForeignSlotBuildingDamagedEvent
 
- GarrisonAttackedEvent
 
- GarrisonOccupiedEvent
 
- GarrisonResidenceEvent
 
- GarrisonResidenceExposedToFaction
 
- GetLoyaltyCustomBundle
 
- GovernorAssignedCharacterEvent
 
- GovernorshipTaxRateChanged
 
- IncidentEvent
 
- IncidentOccuredEvent
 
- LandTradeRouteRaided
 
- LocalFactionInitialized
 
- MilitaryForceCreated
 
- MilitaryForceDestroyed
 
- MilitaryForceDevelopmentPointChange
 
- MilitaryForceHordeStatusAboutToChange
 
- MilitaryForceHordeStatusChanged
 
- MissionCancelled
 
- MissionEvent
 
- MissionExtended
 
- MissionFailed
 
- MissionGenerationFailed
 
- MissionIssued
 
- MissionNearingExpiry
 
- MissionStatusEvent
 
- MissionSucceeded
 
- MovementPointsExhausted
 
- MultiTurnMove
 
- NegativeDiplomaticEvent
 
- NewCampaignStarted
 
- NewCharacterEnteredRecruitmentPool
 
- NewCharacterRecruited
 
- NewSession
 
- NominalDifficultyLevelChangedEvent
 
- OnBuildingIconCreated
 
- OnInitBuildingInfo
 
- OnInitHordeForceInfo
 
- OnInitProvinceInfo
 
- PanelOpenedCampaign
 
- PendingBankruptcy
 
- PendingBattle
 
- PendingBattleAboutToBeCreated
 
- PendingBattleCreated
 
- PooledResourceEffectChangedEvent
 
- PooledResourceEvent
 
- PooledResourceShortageEndedEvent
 
- PooledResourceShortageEvent
 
- PooledResourceTransactionEvent
 
- PositiveDiplomaticEvent
 
- RecruitmentItemIssuedByPlayer
 
- RegionAbandonedWithBuildingEvent
 
- RegionAboutToBeAbandoned
 
- RegionEvent
 
- RegionFactionChangeEvent
 
- RegionFactionChangePostBuildingConversionEvent
 
- RegionIssuesDemands
 
- RegionPlagueStateChanged
 
- RegionRebels
 
- RegionRiots
 
- RegionSelected
 
- RegionSlotEvent
 
- RegionStrikes
 
- RegionTurnEnd
 
- RegionTurnStart
 
- RequestAdditionalAgentActionEffects
 
- ResearchCompleted
 
- ResearchStarted
 
- RitualCancelledEvent
 
- RitualCompletedEvent
 
- RitualEvent
 
- RitualStartedEvent
 
- RoundStart
 
- ScriptedCharacterUnhidden
 
- ScriptedCharacterUnhiddenFailed
 
- ScriptedForceCreated
 
- SeaTradeRouteRaided
 
- SettlementSelected
 
- SharedStateChanged
 
- SharedStateRemoved
 
- SlotOpens
 
- SlotRoundStart
 
- SlotSelected
 
- SlotTurnStart
 
- TemporaryCharacterDetailsForMarriageCreated
 
- TradeNodeConnected
 
- TradeRouteEstablished
 
- TriggerPostBattleAncillaries
 
- UITriggerScriptEvent
 
- UniqueAgentDespawned
 
- UniqueAgentEvent
 
- UniqueAgentSpawned
 
- UnitCompletedBattle
 
- UnitConverted
 
- UnitCreated
 
- UnitDestroyed
 
- UnitDisbanded
 
- UnitEvent
 
- UnitMergedAndDestroyed
 
- UnitSelectedCampaign
 
- UnitTrained
 
- UnitTransferred
 
- UnitTurnEnd
 
- UnitUpgraded
 
- WorldCreated
 
Interfaces
- ACTIVE_RITUAL_LIST_SCRIPT_INTERFACE
 
- ACTIVE_RITUAL_SCRIPT_INTERFACE
 
- ANCILLARY_LIST_SCRIPT_INTERFACE
 
- ANCILLARY_SCRIPT_INTERFACE
 
- BATTLE_RESULTS_SCRIPT_INTERFACE
 
- BONUS_VALUES_SCRIPT_INTERFACE
 
- BUILDING_LIST_SCRIPT_INTERFACE
 
- BUILDING_SCRIPT_INTERFACE
 
- CAMPAIGN_AI_SCRIPT_INTERFACE
 
- CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- CHARACTER_DETAILS_LIST_SCRIPT_INTERFACE
 
- CHARACTER_DETAILS_SCRIPT_INTERFACE
 
- CHARACTER_LIST_SCRIPT_INTERFACE
 
- CHARACTER_SCRIPT_INTERFACE
 
- CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- CUSTOM_RESOURCE_COST_SCRIPT_INTERFACE
 
- CUSTOM_UNIT_SCRIPT_INTERFACE
 
- DEBUG_DRAWING_SCRIPT_INTERFACE
 
- EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE
 
- EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- EFFECT_LIST_SCRIPT_INTERFACE
 
- EFFECT_SCRIPT_INTERFACE
 
- FACTION_LIST_SCRIPT_INTERFACE
 
- FACTION_RITUALS_SCRIPT_INTERFACE
 
- FACTION_SCRIPT_INTERFACE
 
- FAMILY_MEMBER_LIST_SCRIPT_INTERFACE
 
- FAMILY_MEMBER_SCRIPT_INTERFACE
 
- FOREIGN_SLOT_LIST_SCRIPT_INTERFACE
 
- FOREIGN_SLOT_MANAGER_LIST_SCRIPT_INTERFACE
 
- FOREIGN_SLOT_MANAGER_SCRIPT_INTERFACE
 
- FOREIGN_SLOT_SCRIPT_INTERFACE
 
- GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- GOD_LIST_SCRIPT_INTERFACE
 
- GOD_MANAGER_SCRIPT_INTERFACE
 
- GOD_SCRIPT_INTERFACE
 
- MILITARY_FORCE_BUILDING_LIST_SCRIPT_INTERFACE
 
- MILITARY_FORCE_BUILDING_SCRIPT_INTERFACE
 
- MILITARY_FORCE_LIST_SCRIPT_INTERFACE
 
- MILITARY_FORCE_SCRIPT_INTERFACE
 
- MILITARY_FORCE_SLOT_LIST_SCRIPT_INTERFACE
 
- MILITARY_FORCE_SLOT_SCRIPT_INTERFACE
 
- MODEL_SCRIPT_INTERFACE
 
- NULL_SCRIPT_INTERFACE
 
- PENDING_BATTLE_SCRIPT_INTERFACE
 
- POOLED_RESOURCE_FACTOR_LIST_SCRIPT_INTERFACE
 
- POOLED_RESOURCE_FACTOR_SCRIPT_INTERFACE
 
- POOLED_RESOURCE_LIST_SCRIPT_INTERFACE
 
- POOLED_RESOURCE_SCRIPT_INTERFACE
 
- PROVINCE_LIST_SCRIPT_INTERFACE
 
- PROVINCE_MANAGER_SCRIPT_INTERFACE
 
- PROVINCE_SCRIPT_INTERFACE
 
- REGION_DATA_LIST_SCRIPT_INTERFACE
 
- REGION_DATA_SCRIPT_INTERFACE
 
- REGION_LIST_SCRIPT_INTERFACE
 
- REGION_MANAGER_SCRIPT_INTERFACE
 
- REGION_SCRIPT_INTERFACE
 
- RESOURCE_TRANSACTION_SCRIPT_INTERFACE
 
- SEA_REGION_LIST_SCRIPT_INTERFACE
 
- SEA_REGION_MANAGER_SCRIPT_INTERFACE
 
- SEA_REGION_SCRIPT_INTERFACE
 
- SETTLEMENT_SCRIPT_INTERFACE
 
- SHARED_STATES_MANAGER_SCRIPT_INTERFACE
 
- SIEGE_SCRIPT_INTERFACE
 
- SLOT_LIST_SCRIPT_INTERFACE
 
- SLOT_SCRIPT_INTERFACE
 
- UNIQUE_AGENT_DETAILS_LIST_SCRIPT_INTERFACE
 
- UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
 
- UNIT_LIST_SCRIPT_INTERFACE
 
- UNIT_SCRIPT_INTERFACE
 
- WORLD_SCRIPT_INTERFACE
 
Event Functions
- 
- Function Name: area_key
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Key of the area triggered
 
 
- 
- Function Name: area_key
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: ID of the area triggered
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character
 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character
 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: is_autoresolved
 
- Interface: none
 
- Description: Is the battle being fought autoresolved
 
- Function Name: pending_battle
 
- Interface: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Description: Access the pending battle in the event
 
 
- 
- Function Name: model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
- Function Name: pending_battle
 
- Interface: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Description: Access the pending battle in the event
 
 
- 
- Function Name: model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
- Function Name: pending_battle
 
- Interface: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Description: Access the pending battle in the event
 
 
- 
- Function Name: model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
- Function Name: pending_battle
 
- Interface: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Description: Access the pending battle in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: building
 
- Interface: BUILDING_SCRIPT_INTERFACE
 
- Description: Access the building in the event
 
- Function Name: is_conversion
 
- Interface: bool
 
- Description: Is the completed building a conversion
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: building_chain
 
- Interface: String
 
- Description: Access the building chain key in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: building
 
- Interface: String
 
- Description: Access the building in the event
 
- Function Name: is_conversion
 
- Interface: bool
 
- Description: Is the building construction a conversion?
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: building_chain
 
- Interface: String
 
- Description: Access the building chain key in the event
 
- Function Name: is_conversion
 
- Interface: bool
 
- Description: Is this construction a building conversion?
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: building
 
- Interface: BUILDING_SCRIPT_INTERFACE
 
- Description: Access the building in the event
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: target_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the target character in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: previous_state
 
- Interface: string
 
- Description: Previous state of the building
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: previous_state
 
- Interface: string
 
- Description: Previous state of the building
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: target_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the target character in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: effect_bundle
 
- Interface: EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Description: Access the effect bundle in the event
 
- Function Name: previous_effect_bundle_instance
 
- Interface: EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Description: Access the previous effect bundle instance
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: effect_bundle
 
- Interface: EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Description: Access the effect bundle in the event
 
 
- 
- Function Name: ancillary
 
- Interface: String
 
- Description: Access the key of the ancillary equipped
 
- Function Name: ancillary_object
 
- Interface: ANCILLARY_SCRIPT_INTERFACE
 
- Description: Access the ancillary equipped
 
 
- 
- Function Name: ancillary
 
- Interface: String
 
- Description: Access the key of the ancillary gained
 
- Function Name: ancillary_object
 
- Interface: ANCILLARY_SCRIPT_INTERFACE
 
- Description: Access the ancillary gained
 
 
- 
- Function Name: ancillary
 
- Interface: String
 
- Description: Access the key of the ancillary lost
 
 
- 
- Function Name: tier
 
- Interface: NONE
 
- Description: Get tier of assigned post
 
 
- 
- Function Name: target_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the target faction in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: leader_origin
 
- Interface: String
 
- Description: What is the origin of the faction leader: heir, regent, heir_coming_of_age, automatic, emergency or unknown
 
- Function Name: is_ruling_relative
 
- Interface: boolean
 
- Description: Is the new faction leader ruling relative of the old one
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: region_slot
 
- Interface: SLOT_SCRIPT_INTERFACE
 
- Description: Access the region slot besieged
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region besieged
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: building
 
- Interface: BUILDING_SCRIPT_INTERFACE
 
- Description: Access the building in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
- Function Name: is_conversion
 
- Interface: bool
 
- Description: Is the constructed building a conversion
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: mission_result_critial_success
 
- Interface: NONE
 
- Description: Was the mission a critical success?
 
- Function Name: mission_result_success
 
- Interface: NONE
 
- Description: Was the mission a success?
 
- Function Name: mission_result_opportune_failure
 
- Interface: NONE
 
- Description: Was the mission an opportune failure?
 
- Function Name: mission_result_failure
 
- Interface: NONE
 
- Description: Was the mission a failure?
 
- Function Name: mission_result_critial_failure
 
- Interface: NONE
 
- Description: Was the mission a critical failure?
 
- Function Name: ability
 
- Interface: NONE
 
- Description: String key for the ability used (from abilities table)
 
- Function Name: attribute
 
- Interface: NONE
 
- Description: String key for the attribute used (from attributes table)
 
- Function Name: agent_action_key
 
- Interface: NONE
 
- Description: String key for the agent action
 
- Function Name: target_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the target character in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: pending_battle
 
- Interface: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Description: Get the pending battle script interface
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: target_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the victim/target character of the attack of opportunity that was declined
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region that was besieged
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the target military force in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: old_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Returns the previous faction the character belonged to
 
- Function Name: new_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Returns the new faction the character joined
 
 
- 
- Function Name: relationship
 
- Interface: NONE
 
- Description: Access the relationship to the dead character
 
 
- 
- Function Name: was_flee
 
- Interface: NONE
 
- Description: Was the movement a result of fleeing?
 
 
- 
- Function Name: mission_result_critial_success
 
- Interface: NONE
 
- Description: Was the mission a critical success?
 
- Function Name: mission_result_success
 
- Interface: NONE
 
- Description: Was the mission a success?
 
- Function Name: mission_result_opportune_failure
 
- Interface: NONE
 
- Description: Was the mission an opportune failure?
 
- Function Name: mission_result_failure
 
- Interface: NONE
 
- Description: Was the mission a failure?
 
- Function Name: mission_result_critial_failure
 
- Interface: NONE
 
- Description: Was the mission a critical failure?
 
- Function Name: ability
 
- Interface: NONE
 
- Description: String key for the ability used (from abilities table)
 
- Function Name: attribute
 
- Interface: NONE
 
- Description: String key for the attribute used (from attributes table)
 
- Function Name: agent_action_key
 
- Interface: NONE
 
- Description: String key for the agent action
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: other_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the other character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the target military force in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: original_faction
 
- Interface: NONE
 
- Description: Access the original faction
 
 
- 
- Function Name: looted_resources
 
- Interface: CUSTOM_RESOURCE_COST_SCRIPT_INTERFACE
 
- Description: The resources that were looted
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: previous_loyalty
 
- Interface: NONE
 
- Description: Access previous loyalty
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region that was besieged
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: building
 
- Interface: MILITARY_FORCE_BUILDING_SCRIPT_INTERFACE
 
- Description: Interface to the building constructed
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: building_chain
 
- Interface: String
 
- Description: The key of the building chain in the event or an empty string if there is no building level, for example when canceling a dismantle.
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: old_building_chain
 
- Interface: NONE
 
- Description: The old building's chain key if a building was present.
 
- Function Name: old_building_level
 
- Interface: NONE
 
- Description: The old building's level if a building was present.
 
- Function Name: building_chain
 
- Interface: NONE
 
- Description: The building chain key of the building that has started construction.
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: building
 
- Interface: MILITARY_FORCE_BUILDING_SCRIPT_INTERFACE
 
- Description: The script building interface in the event.
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: building
 
- Interface: MILITARY_FORCE_BUILDING_SCRIPT_INTERFACE
 
- Description: The script building interface in the event.
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: building
 
- Interface: MILITARY_FORCE_BUILDING_SCRIPT_INTERFACE
 
- Description: The script building interface in the event.
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the target military force in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force the tradition was assigned to
 
- Function Name: tradition_point_spent_on
 
- Interface: NONE
 
- Description: Access the tradition allocated
 
 
- 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force the tradition is available to
 
 
- 
- Function Name: old_post
 
- Interface: NONE
 
- Description: Access the old post this character occupied
 
- Function Name: new_post
 
- Interface: NONE
 
- Description: Access the new post this character is now occupying
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: pending_battle
 
- Interface: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Description: Get the pending battle script interface
 
 
- 
- Function Name: type
 
- Interface: NONE
 
- Description: Type of agent action
 
- Function Name: unique_id
 
- Interface: NONE
 
- Description: unique id of the AGENT_ACTION_RECORD
 
- Function Name: target_garrison
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: The target garrison residence in the event or NULL_SCRIPT_INTERFACE if the target is not a garrison residence
 
- Function Name: target_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: The target character in the event or NULL_SCRIPT_INTERFACE if the target is not a character
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: occupation_decision
 
- Interface: NONE
 
- Description: Access the key for the culture_settlement_occupation_option record in the event
 
- Function Name: occupation_decision_group
 
- Interface: NONE
 
- Description: Access the group for the culture_settlement_occupation_option record in the event
 
- Function Name: occupation_decision_option
 
- Interface: NONE
 
- Description: Access the option for the culture_settlement_occupation_option record in the event
 
- Function Name: region_slot
 
- Interface: SLOT_SCRIPT_INTERFACE
 
- Description: Access the target region slot in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: occupation_decision
 
- Interface: NONE
 
- Description: Access the key for the culture_settlement_occupation_option record in the event
 
- Function Name: occupation_decision_group
 
- Interface: NONE
 
- Description: Access the group for the culture_settlement_occupation_option record in the event
 
- Function Name: occupation_decision_option
 
- Interface: NONE
 
- Description: Access the option for the culture_settlement_occupation_option record in the event
 
- Function Name: region_slot
 
- Interface: SLOT_SCRIPT_INTERFACE
 
- Description: Access the target region slot in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: prior_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the previous owner of the settlement's faction
 
- Function Name: occupation_decision
 
- Interface: NONE
 
- Description: Access the key for the culture_settlement_occupation_option record in the event
 
- Function Name: occupation_decision_group
 
- Interface: NONE
 
- Description: Access the group for the culture_settlement_occupation_option record in the event
 
- Function Name: occupation_decision_option
 
- Interface: NONE
 
- Description: Access the option for the culture_settlement_occupation_option record in the event
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: occupation_decision
 
- Interface: NONE
 
- Description: Access the key for the culture_settlement_occupation_option record in the event
 
- Function Name: occupation_decision_group
 
- Interface: NONE
 
- Description: Access the group for the culture_settlement_occupation_option record in the event
 
- Function Name: occupation_decision_option
 
- Interface: NONE
 
- Description: Access the option for the culture_settlement_occupation_option record in the event
 
 
- 
- Function Name: is_automatically_selected
 
- Interface: NONE
 
- Description: Check whether the option was selected automatically (happens when occupation option choice has been shown)
 
- Function Name: option_str
 
- Interface: NONE
 
- Description: Returns the option string
 
 
- 
- Function Name: is_automatically_selected
 
- Interface: NONE
 
- Description: Check whether the option was selected automatically (happens when occupation option choice has been shown)
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: is_automatically_selected
 
- Interface: NONE
 
- Description: Check whether the option was selected automatically (happens when occupation option choice has been shown)
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: is_automatically_selected
 
- Interface: NONE
 
- Description: Check whether the option was selected automatically (happens when occupation option choice has been shown)
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: is_automatically_selected
 
- Interface: NONE
 
- Description: Check whether the option was selected automatically (happens when occupation option choice has been shown)
 
 
- 
- Function Name: is_automatically_selected
 
- Interface: NONE
 
- Description: Check whether the option was selected automatically (happens when occupation option choice has been shown)
 
 
- 
- Function Name: is_automatically_selected
 
- Interface: NONE
 
- Description: Check whether the option was selected automatically (happens when occupation option choice has been shown)
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: previous_rank
 
- Interface: int32
 
- Description: Access the previous rank of the character
 
- Function Name: new_rank
 
- Interface: int32
 
- Description: Access the new rank of the character
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: region_slot
 
- Interface: SLOT_SCRIPT_INTERFACE
 
- Description: Access the target region slot in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: skill_point_spent_on
 
- Interface: NONE
 
- Description: Access the skill allocated
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character with the allocated skill
 
- Function Name: is_faction_skill_point
 
- Interface: NONE
 
- Description: Access the character with the allocated skill
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: skill_point_spent_on
 
- Interface: NONE
 
- Description: Access the skill
 
 
- 
- Function Name: target_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the target character in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
- Function Name: trait_added
 
- Interface: NONE
 
- Description: Access the key of the trait added (or empty string)
 
- Function Name: trait_removed
 
- Interface: NONE
 
- Description: Access the key of the trait removed (or empty string)
 
- Function Name: level_changed
 
- Interface: NONE
 
- Description: return true if trait level was changed
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: world
 
- Interface: WORLD_SCRIPT_INTERFACE
 
- Description: Access the world in the event
 
 
- 
- Function Name: tooltip_object
 
- Interface: NONE
 
- Description: Returns tooltip object component
 
 
- 
- Function Name: choice
 
- Interface: NONE
 
- Description: Access the choice made for the dilemma in the event
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
- Function Name: dilemma
 
- Interface: NONE
 
- Description: Access the key of the dilemma in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
- Function Name: dilemma
 
- Interface: NONE
 
- Description: Access the key of the dilemma in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
- Function Name: dilemma
 
- Interface: NONE
 
- Description: Access the key of the dilemma in the event
 
 
- 
- Function Name: proposer
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the proposer in the event
 
- Function Name: recipient
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the recipient in the event
 
 
- 
- Function Name: forced
 
- Interface: bool
 
- Description: Returns whether the faction was forcefully adopted
 
- Function Name: adopted_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Returns the faction
 
- Function Name: dynasty_line_key
 
- Interface: String
 
- Description: Access the dynasty line key
 
 
- 
- Function Name: dynasty_line_key
 
- Interface: String
 
- Description: Access the dynasty line key
 
- Function Name: new_heir
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Returns the new heir or NULL_SCRIPT_INTERFACE if there is no heir
 
- Function Name: old_heir
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Returns the old heir or NULL_SCRIPT_INTERFACE if there was no heir
 
 
- 
- Function Name: dynasty_line_key
 
- Interface: String
 
- Description: Access the dynasty line key
 
- Function Name: new_ruler
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Returns the new ruler or NULL_SCRIPT_INTERFACE if there is no ruler
 
 
- 
- Function Name: event_key
 
- Interface: NONE
 
- Description: The database record key of the event that was recorded
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: other_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the other side of the barter agreement
 
- Function Name: is_gift
 
- Interface: bool
 
- Description: Is the barter agreement a gift
 
- Function Name: is_one_sided_offer
 
- Interface: bool
 
- Description: Is the barter agreement a one sided offer from this faction to the other faction
 
- Function Name: is_one_sided_demand
 
- Interface: bool
 
- Description: Is the barter agreement a one sided demand from this faction to the other faction
 
- Function Name: sold_resources
 
- Interface: NONE
 
- Description: The resources that were sold
 
- Function Name: bought_resources
 
- Interface: NONE
 
- Description: The resources that were bought
 
- Function Name: sold_resources_value
 
- Interface: float32
 
- Description: The value of the sold resources for the faction
 
- Function Name: bought_resources_value
 
- Interface: float32
 
- Description: The value of the bought resources for the faction
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: liberating_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character involved in the liberation
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: liberating_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character involved in the liberation
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: unit
 
- Interface: NONE
 
- Description: Access the unit bribed by the faction
 
 
- 
- Function Name: previous_home_region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the previous home region for the faction. Might be NULL_SCRIPT_INTERFACE
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: family_member
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Access character's family member
 
- Function Name: death_type
 
- Interface: int32
 
- Description: Returns the type of the character's death								0 = DEATH_TYPE_ALIVE,								1 = DEATH_TYPE_KILLED_IN_ACTION,								2 = DEATH_TYPE_ASSASSINATED,								3 = DEATH_TYPE_OLD_AGE,								4 = DEATH_TYPE_INFANT_MORTALITY,								5 = DEATH_TYPE_EXECUTED,								6 = DEATH_TYPE_REJECTED,								7 = DEATH_TYPE_ADVANCED,								8 = DEATH_TYPE_CONVALESCING,								9 = DEATH_TYPE_PERSUADED,								10 = DEATH_TYPE_HUNTED_DOWN,								11 = DEATH_TYPE_DESTROYED_AFTER_DEFECTION,								12 = DEATH_TYPE_DIED_AT_SEA,								13 = DEATH_TYPE_DISBANDED,								14 = DEATH_TYPE_DESEASE,								15 = DEATH_TYPE_CHILD_BIRTH,								16 = DEATH_TYPE_FAMILY_CHARACTER_CLEAN_UP,								17 = DEATH_TYPE_WAAAGH_OVER,								18 = DEATH_TYPE_WAAAGH_DISPANDS,								19 = DEATH_TYPE_QUEST_BATTLE_OVER,								20 = DEATH_TYPE_LEFT
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: opponent
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access opposing faction
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event, post battle result application
 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: other_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the other faction in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character, destroyed the other faction (optional)
 
 
- 
- Function Name: other_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the other faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: resources
 
- Interface: NONE
 
- Description: Access time to build
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: god
 
- Interface: GOD_SCRIPT_INTERFACE
 
- Description: Access the god for which the attitude tier changed
 
- Function Name: new_tier
 
- Interface: NONE
 
- Description: the new tier of god attitude (int32)
 
- Function Name: old_tier
 
- Interface: NONE
 
- Description: the old tier of god attitude (int32)
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: new_heir
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Get the new heir or NULL_SCRIPT_INTERFACE
 
- Function Name: old_heir
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Get the old heir or NULL_SCRIPT_INTERFACE
 
- Function Name: is_presumptive_heir
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Is presumptive heir or appointed
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
- Function Name: enemy
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the enemy in the event
 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
 
- 
- Function Name: god
 
- Interface: GOD_SCRIPT_INTERFACE
 
- Description: Access the god for which the Hecatomb was triggered
 
- Function Name: tier
 
- Interface: int32
 
- Description: Access the hecatomb tier
 
- Function Name: effect_bundle_key
 
- Interface: String
 
- Description: Access the hecatomb effect bundle key
 
- Function Name: effect_bundle_duration
 
- Interface: int32
 
- Description: Access the hecatomb effect bundle duration
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: god
 
- Interface: GOD_SCRIPT_INTERFACE
 
- Description: Access the god for which the Prayer was triggered
 
- Function Name: tier
 
- Interface: int32
 
- Description: Access the Prayer tier
 
- Function Name: effect_bundle_key
 
- Interface: String
 
- Description: Access the Prayer effect bundle key
 
- Function Name: effect_bundle_duration
 
- Interface: int32
 
- Description: Access the Prayer effect bundle duration
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: confederation
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the confederations owning faction
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: confederation
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the confederations owning faction
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: province
 
- Interface: NONE
 
- Description: Access the province the edict was issued to
 
- Function Name: initiative_key
 
- Interface: NONE
 
- Description: Access the initiative that was issued
 
 
- 
- Function Name: province
 
- Interface: NONE
 
- Description: Access the province the edict was removed
 
- Function Name: initiative_key
 
- Interface: NONE
 
- Description: Access the initiative that was removed
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: liberating_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character involved in the liberation
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: other_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the other faction in the event
 
 
- 
- Function Name: other_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the other faction in the event
 
- Function Name: resources
 
- Interface: NONE
 
- Description: Access gift resources
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
 
- 
- Function Name: sovereign
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the sovereign faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: family_member1
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Access the first family member in the event
 
- Function Name: family_member2
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Access the second family member in the event
 
 
- 
- Function Name: family_member1
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Access the first family member in the event
 
- Function Name: family_member2
 
- Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Description: Access the second family member in the event
 
- Function Name: marriage_type
 
- Interface: String
 
- Description: Access the type of marriage in the event
 
 
- 
- Function Name: model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: world
 
- Interface: WORLD_SCRIPT_INTERFACE
 
- Description: Access the world in the event
 
 
- 
- Function Name: stance_adopted
 
- Interface: NONE
 
- Description: Access the stance adopted
 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force
 
 
- 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force infected with a plague
 
- Function Name: is_infected
 
- Interface: NONE
 
- Description: Access the military force's infection state
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Faction that constructed the slot
 
- Function Name: building
 
- Interface: NONE
 
- Description: Key of the building constructed
 
- Function Name: slot_owner
 
- Interface: NONE
 
- Description: Foreign slot owner
 
 
- 
- Function Name: building
 
- Interface: NONE
 
- Description: Key of the building damaged
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: encountering_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access encountering faction
 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the acting character in the event OVERRIDE
 
 
- 
- Function Name: province
 
- Interface: GOVERNOR_ASSIGNED_CHARACTER_EVENT
 
- Description: Access the province in which the governor was assigned
 
- Function Name: region
 
- Interface: GOVERNOR_ASSIGNED_CHARACTER_EVENT
 
- Description: Access the region in which the governor was assigned
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
- Function Name: dilemma
 
- Interface: NONE
 
- Description: Access the key of the incident in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
- Function Name: dilemma
 
- Interface: NONE
 
- Description: Access the key of the incident in the event
 
 
- 
- Function Name: resources
 
- Interface: NONE
 
- Description: The resources that were raided
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: local_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: military_force_created
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force created
 
 
- 
- Function Name: cqi
 
- Interface: card32
 
- Description: Access the cqi of the military force destroyed
 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the script interface of the destroyed military force
 
 
- 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force that gained/lost the developement point
 
- Function Name: point_change
 
- Interface: NONE
 
- Description: Access the points gained/lost 
 
 
- 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force whose horde status is about to change
 
- Function Name: from_type
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the type of military from which it is about to change
 
- Function Name: to_type
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the type of military to which it is about to change
 
 
- 
- Function Name: military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the military force whose horde status changed
 
- Function Name: from_type
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the type of military from which it changed
 
- Function Name: to_type
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the type of military to which it changed
 
 
- 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: old_duration
 
- Interface: NONE
 
- Description: Access the old duration of the mission
 
- Function Name: additional_duration
 
- Interface: NONE
 
- Description: Access the additional duration that was added to the mission
 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: mission
 
- Interface: NONE
 
- Description: Access the ID of the mission
 
 
- 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: mission
 
- Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
 
- Description: Access the mission in the event
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
- Function Name: campaign_model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: proposer
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the proposer in the event
 
- Function Name: recipient
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the recipient in the event
 
- Function Name: was_alliance
 
- Interface: bool
 
- Description: Was the event a broken alliance?
 
- Function Name: was_military_alliance
 
- Interface: bool
 
- Description: Was the event a broken military alliance?
 
- Function Name: was_defensive_alliance
 
- Interface: bool
 
- Description: Was the event a broken defensive alliance?
 
- Function Name: is_war
 
- Interface: bool
 
- Description: Was the event a declaration of war?
 
- Function Name: was_military_access
 
- Interface: bool
 
- Description: Was the event ending military access?
 
- Function Name: was_trade_agreement
 
- Interface: bool
 
- Description: Was the event ending a trade agreement?
 
- Function Name: was_barter_agreement
 
- Interface: bool
 
- Description: Was the event ending a barter agreement?
 
- Function Name: was_non_aggression_pact
 
- Interface: bool
 
- Description: Was the event breaking a non-aggression pact?
 
- Function Name: was_vassalage
 
- Interface: bool
 
- Description: Was the event breaking a vassalage?
 
- Function Name: proposer_was_vassal
 
- Interface: bool
 
- Description: When the event was breaking a vassalage, was the proposer the vassal, or was the recipient?
 
- Function Name: was_subjugation
 
- Interface: bool
 
- Description: Was the event breaking a subjugation?
 
- Function Name: proposer_was_subject
 
- Interface: bool
 
- Description: When the event was breaking a subjugation, was the proposer the subject, or was the recipient?
 
- Function Name: result_of_confederation
 
- Interface: bool
 
- Description: Was the negative event the result of the faction being confederated?
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: character_details
 
- Interface: CHARACTER_DETAILS_SCRIPT_INTERFACE
 
- Description: Access the character details in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character recruited
 
 
- 
- Function Name: is_cinematic_editor
 
- Interface: NONE
 
- Description: Check whether the game is in cinematic editor mode
 
 
- 
- Function Name: model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Returns the faction interface of the faction for which the icon is created.
 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Returns the region interface of the region for which the icon is created.
 
- Function Name: region_slot
 
- Interface: SLOT_SCRIPT_INTERFACE
 
- Description: Returns the region slot interface of the slot for which the icon is created. May be the null interface.
 
- Function Name: building_chain_key
 
- Interface: NONE
 
- Description: Returns the chain key of the building level for which the icon is created.
 
- Function Name: building_key
 
- Interface: NONE
 
- Description: Returns the key of the building level for which the icon is created.
 
- Function Name: building_level
 
- Interface: NONE
 
- Description: Returns the index of the building level for which the icon is created.
 
 
- 
- Function Name: building_key
 
- Interface: NONE
 
- Description: Returns building key for which Building Information panel will be initialised
 
- Function Name: building_chain_key
 
- Interface: NONE
 
- Description: Returns building chain key of the building for which Building Information panel will be initialised
 
- Function Name: faction_key
 
- Interface: NONE
 
- Description: Returns faction key of the building for which Building Information panel will be initialised
 
 
- 
- Function Name: horde_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Returns military force interface for which Province Information panel will be initialised
 
- Function Name: faction_key
 
- Interface: NONE
 
- Description: Returns faction key for which Province Information panel will be initialised
 
 
- 
- Function Name: province
 
- Interface: PROVINCE_SCRIPT_INTERFACE
 
- Description: Returns province interface for which Province Information panel will be initialised
 
- Function Name: faction_key
 
- Interface: NONE
 
- Description: Returns faction key for which Province Information panel will be initialised
 
 
- 
- Function Name: panel_component
 
- Interface: NONE
 
- Description: Returns panel's component
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
- Function Name: pending_battle
 
- Interface: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Description: Access the pending battle in the event
 
 
- 
- Function Name: target_garrison
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the target garrison in the event or NULL_SCRIPT_INTERFACE if the target is character.
 
- Function Name: target_character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the target character in the event or NULL_SCRIPT_INTERFACE if the target is garrison.
 
- Function Name: battle_type
 
- Interface: NONE
 
- Description: Access the battle type. Keep in mind that in some very rare cases the battle type could be changed during the creation of the pending battle object.
 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: pending_battle
 
- Interface: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Description: Access the pending battle in the event
 
 
- 
- Function Name: old_effect
 
- Interface: NONE
 
- Description: Key of the previous effect bundle, empty if none
 
- Function Name: new_effect
 
- Interface: NONE
 
- Description: Key of the new effect bundle, empty if none
 
- Function Name: type
 
- Interface: NONE
 
- Description: Type of the effect changed. Can be used to index active effects
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction that owns the resource
 
- Function Name: resource
 
- Interface: POOLED_RESOURCE_SCRIPT_INTERFACE
 
- Description: Access the resource interface
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction that owns the resource
 
- Function Name: resource
 
- Interface: POOLED_RESOURCE_SCRIPT_INTERFACE
 
- Description: Access the resource interface
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction that owns the resource
 
- Function Name: resource
 
- Interface: POOLED_RESOURCE_SCRIPT_INTERFACE
 
- Description: Access the resource interface
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction that owns the resource
 
- Function Name: resource
 
- Interface: POOLED_RESOURCE_SCRIPT_INTERFACE
 
- Description: Access the resource interface
 
 
- 
- Function Name: amount
 
- Interface: NONE
 
- Description: Resource amount in the transaction
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction that owns the resource
 
- Function Name: resource
 
- Interface: POOLED_RESOURCE_SCRIPT_INTERFACE
 
- Description: Access the resource interface
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event (one of the faction leaders, as the event is fired once for each of them)
 
- Function Name: proposer
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the proposer in the event
 
- Function Name: recipient
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the recipient in the event
 
- Function Name: is_alliance
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event an alliance?
 
- Function Name: is_military_alliance
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a military alliance?
 
- Function Name: is_defensive_alliance
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a defensive alliance?
 
- Function Name: is_peace_treaty
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a peace treaty?
 
- Function Name: is_single_barter
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a single barter?
 
- Function Name: is_barter_agreement
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a barter agreement?
 
- Function Name: is_military_access
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event military access?
 
- Function Name: is_trade_agreement
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a trade agreement?
 
- Function Name: is_non_aggression_pact
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a non-aggression pact?
 
- Function Name: break_alliance_with_offered
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: The break alliance with offered in the event?
 
- Function Name: break_alliance_with_demanded
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: The break alliance with demanded in the event?
 
- Function Name: is_vassalage
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a vassalage?
 
- Function Name: proposer_is_vassal
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: When the event is a vassalage, is the proposer the vassal, or is the recipient?
 
- Function Name: is_subjugation
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a subjugation?
 
- Function Name: proposer_is_subject
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: When the event is a subjugation, is the proposer the subject, or is the recipient?
 
- Function Name: is_gift
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the diplomatic event a gift?
 
- Function Name: is_confederation
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Is the event a confederation?
 
- Function Name: is_dominance_used
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Dominance included in the event?
 
- Function Name: is_single_barter_one_sided_offer
 
- Interface: bool
 
- Description: Is the single barter a one sided offer from the proposer faction to the recipient faction
 
- Function Name: is_single_barter_one_sided_demand
 
- Interface: bool
 
- Description: Is the single barter a one sided demand from the proposer faction to the recipient faction
 
- Function Name: single_barter_sold_resources
 
- Interface: NONE
 
- Description: The resources that were sold as a single barter
 
- Function Name: single_barter_bought_resources
 
- Interface: NONE
 
- Description: The resources that were bought as a single barter
 
- Function Name: barter_agreement_sold_resources
 
- Interface: NONE
 
- Description: The resources that will be sold each turn as part of a barter agreement
 
- Function Name: barter_agreement_bought_resources
 
- Interface: NONE
 
- Description: The resources that will be bought each turn as part of a barter agreement
 
- Function Name: barter_agreement_duration
 
- Interface: NONE
 
- Description: The duration of a barter agreement
 
 
- 
- Function Name: main_unit_record
 
- Interface: NONE
 
- Description: Access unit record
 
- Function Name: time_to_build
 
- Interface: NONE
 
- Description: Access time to build
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: abandoning_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction that abandoned the region
 
- Function Name: building
 
- Interface: BUILDING_SCRIPT_INTERFACE
 
- Description: Access the building left in the region
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
- Function Name: previous_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction that was previous owner of the region
 
- Function Name: reason
 
- Interface: NONE
 
- Description: Access the reason of changing the owner
 
- Function Name: was_capital
 
- Interface: NONE
 
- Description: Access if region was capital
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: is_infected
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region's infection state
 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: region_slot
 
- Interface: SLOT_SCRIPT_INTERFACE
 
- Description: Access the region slot in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: region
 
- Interface: REGION_SCRIPT_INTERFACE
 
- Description: Access the region in the event
 
 
- 
- Function Name: agent_action_key
 
- Interface: NONE
 
- Description: Returns the agent action key
 
 
- 
- Function Name: technology
 
- Interface: NONE
 
- Description: Access the technology key in the event
 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: performing_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction performing the ritual
 
- Function Name: ritual_target_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction targeted by the ritual
 
- Function Name: ritual
 
- Interface: ACTIVE_RITUAL_SCRIPT_INTERFACE
 
- Description: Access the faction performing the ritual
 
 
- 
- Function Name: succeeded
 
- Interface: NONE
 
- Description: Wether the ritual completed successfully or not
 
- Function Name: performing_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction performing the ritual
 
- Function Name: ritual_target_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction targeted by the ritual
 
- Function Name: ritual
 
- Interface: ACTIVE_RITUAL_SCRIPT_INTERFACE
 
- Description: Access the faction performing the ritual
 
 
- 
- Function Name: performing_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction performing the ritual
 
- Function Name: ritual_target_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction targeted by the ritual
 
- Function Name: ritual
 
- Interface: ACTIVE_RITUAL_SCRIPT_INTERFACE
 
- Description: Access the faction performing the ritual
 
 
- 
- Function Name: performing_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction performing the ritual
 
- Function Name: ritual_target_faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction targeted by the ritual
 
- Function Name: ritual
 
- Interface: ACTIVE_RITUAL_SCRIPT_INTERFACE
 
- Description: Access the faction performing the ritual
 
 
- 
- Function Name: model
 
- Interface: MODEL_SCRIPT_INTERFACE
 
- Description: Access the model in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the force general in the event
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: key
 
- Interface: NONE
 
- Description: Access key of changed state
 
- Function Name: value
 
- Interface: NONE
 
- Description: Access value of the changed state. Returns either a string, number or float
 
- Function Name: entity
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE | CHARACTER_SCRIPT_INTERFACE | FACTION_SCRIPT_INTERFACE | FAMILY_MEMBER_SCRIPT_INTERFACE | REGION_SCRIPT_INTERFACE | FACTION_SCRIPT_INTERFACE | nil
 
- Description: Interface of the entity that owns the state. This will return a null interface if the state is global
 
 
- 
- Function Name: key
 
- Interface: NONE
 
- Description: Gets the key of the removed state
 
- Function Name: entity
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE | CHARACTER_SCRIPT_INTERFACE | FACTION_SCRIPT_INTERFACE | FAMILY_MEMBER_SCRIPT_INTERFACE | REGION_SCRIPT_INTERFACE | FACTION_SCRIPT_INTERFACE | nil
 
- Description: Interface of the entity that owns the state. This will return a null interface if the state is global
 
 
- 
- Function Name: region_slot
 
- Interface: SLOT_SCRIPT_INTERFACE
 
- Description: Access the region slot in the event
 
 
- 
- Function Name: region_slot
 
- Interface: SLOT_SCRIPT_INTERFACE
 
- Description: Access the region slot in the event
 
 
- 
- Function Name: garrison_residence
 
- Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: Access the garrison residence in the event
 
 
- 
- Function Name: region_slot
 
- Interface: SLOT_SCRIPT_INTERFACE
 
- Description: Access the region slot in the event
 
 
- 
- Function Name: character_details
 
- Interface: CHARACTER_DETAILS_SCRIPT_INTERFACE
 
- Description: Access the character details in the event. Don't ever cache such character (for example by storing its family member cqi) because it may be deleted if not selected for marriage soon
 
 
- 
- Function Name: character
 
- Interface: CHARACTER_SCRIPT_INTERFACE
 
- Description: Access the character in the event
 
 
- 
- Function Name: faction
 
- Interface: FACTION_SCRIPT_INTERFACE
 
- Description: Access the faction in the event
 
 
- 
- Function Name: pending_battle
 
- Interface: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Description: Access the pending battle
 
- Function Name: has_stolen_ancillary
 
- Interface: NONE
 
- Description: Access a bool stating if the characters faction has already stolen an ancillary
 
 
- 
- Function Name: faction_cqi
 
- Interface: NONE
 
- Description: Access the faction that owns the resource
 
- Function Name: trigger
 
- Interface: NONE
 
- Description: Returns the unique trigger key
 
 
- 
- Function Name: unique_agent_details
 
- Interface: UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
 
- Description: Access the unique agent details for this event
 
 
- 
- Function Name: unique_agent_details
 
- Interface: UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
 
- Description: Access the unique agent details for this event
 
 
- 
- Function Name: unique_agent_details
 
- Interface: UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
 
- Description: Access the unique agent details for this event
 
 
- 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: converted_unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the new unit the the old one was converted into
 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: is_bodyguard_swap
 
- Interface: bool
 
- Description: Is this unit created for a bodyguard swap, returns bool.
 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: was_bodyguard_swap
 
- Interface: bool
 
- Description: Was this unit a bodyguard that got swapped, returns bool.
 
- Function Name: was_embedded_agent
 
- Interface: bool
 
- Description: Was this unit associated with an embedded agent, returns bool.
 
 
- 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: new_unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the new unit that the old one was merged into
 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: foreign
 
- Interface: bool
 
- Description: Access foreign flag: recruited from foreign fraction pool
 
- Function Name: globally_recruited
 
- Interface: bool
 
- Description: Check if the unit was recruited from the global recruitment pool
 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: old_military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the old military force that the unit was transferred from
 
- Function Name: new_military_force
 
- Interface: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Description: Access the new military force that the unit was transferred into
 
 
- 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: unit
 
- Interface: UNIT_SCRIPT_INTERFACE
 
- Description: Access the unit in the event
 
 
- 
- Function Name: world
 
- Interface: WORLD_SCRIPT_INTERFACE
 
- Description: Access the world in the event
 
 
Interface Functions
- Description: A list of active ritual script interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: ACTIVE_RITUAL_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Active Ritual Script Interface
 
- is_null_interface
 
- ritual_key
 
- ritual_chain_key
 
- is_part_of_chain
 
- target_faction
 
- cast_time
 
- cooldown_time
 
- expended_resources
 
- slave_cost
 
- ritual_sites
 
- ritual_category
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: ritual_key
 
- Description: Returns the ritual record key for this active ritual
 
- Parameters: ritual_key()
 
- Return: String
 
- Function: ritual_chain_key
 
- Description: Returns the ritual chain record key for this active ritual. Empty if it isn't part of a chain
 
- Parameters: ritual_chain_key()
 
- Return: String
 
- Function: is_part_of_chain
 
- Description: Is this active ritual part of a chain?
 
- Parameters: is_part_of_chain()
 
- Return: bool
 
- Function: target_faction
 
- Description: Faction target of this ritual
 
- Parameters: target_faction()
 
- Return: Faction
 
- Function: cast_time
 
- Description: Total cast time of this ritual
 
- Parameters: cast_time()
 
- Return: card32
 
- Function: cooldown_time
 
- Description: Total cooldown time of this ritual once cast
 
- Parameters: cooldown_time()
 
- Return: card32
 
- Function: expended_resources
 
- Description: Resource cost of this ritual at the time of commencement (not including slaves)
 
- Parameters: expended_resources()
 
- Return: card32
 
- Function: slave_cost
 
- Description: Slave cost of this ritual at the time of commencement
 
- Parameters: cost()
 
- Return: card32
 
- Function: ritual_sites
 
- Description: Ritual sites used to perform this ritual
 
- Parameters: ritual_sites()
 
- Return: REGION_LIST_SCRIPT_INTERFACE
 
- Function: ritual_category
 
- Description: Category of this ritual, or the category of its chain if it is part of a chain
 
- Parameters: ritual_chain()
 
- Return: String
 
- Description: A list of ancillary script interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: ANCILLARY
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Contains ancillary wrapper
 
- is_null_interface
 
- has_bodyguard_unit
 
- ancillary_key
 
- icon_path
 
- character_panel_icon_override_path
 
- onscreen_name
 
- type
 
- category
 
- effects_list
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: has_bodyguard_unit
 
- Description: Returns whether the ancillary has bodyguard unit which is in unit set
 
- Parameters: has_bodyguard_unit(String unit_set_key)
 
- Return: bool
 
- Function: ancillary_key
 
- Description: Returns the ancillary DB key
 
- Parameters: ancillary_key()
 
- Return: String
 
- Function: icon_path
 
- Description: Returns the icon path for the ancillary
 
- Parameters: icon_path()
 
- Return: String
 
- Function: character_panel_icon_override_path
 
- Description: Returns the overriden character panel icon path for the ancillary
 
- Parameters: character_panel_icon_path()
 
- Return: String
 
- Function: onscreen_name
 
- Description: Returns the localised name for the ancillary
 
- Parameters: onscreen_name()
 
- Return: UniString
 
- Function: type
 
- Description: Returns the type for the ancillary
 
- Parameters: type()
 
- Return: String
 
- Function: category
 
- Description: Returns the category for the ancillary
 
- Parameters: category()
 
- Return: String
 
- Function: effects_list
 
- Description: The effects applied to this ancillary
 
- Parameters: effects_list()
 
- Return: EFFECT_LIST_SCRIPT_INTERFACE
 
- Description: Battle results script interface.
 
- is_null_interface
 
- are_finalised
 
- attacker_won
 
- defender_won
 
- is_draw
 
- winning_faction_key
 
- losing_faction_key
 
- attacker_main_army_start_units
 
- defender_main_army_start_units
 
- attacker_main_army_alive_units
 
- defender_main_army_alive_units
 
- attacker_start_number_of_men
 
- defender_start_number_of_men
 
- attacker_casualties
 
- defender_casualties
 
- side_has_dead_unit_of_set
 
- did_winner_primary_general_survive
 
- burnt_buildings_in_battle_number
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: are_finalised
 
- Description: If results are finalised
 
- Parameters: are_finalised()
 
- Return: boolean
 
- Function: attacker_won
 
- Description: Has the attacker won the battle
 
- Parameters: attacker_won()
 
- Return: bool
 
- Function: defender_won
 
- Description: Has the defender won the battle
 
- Parameters: defender_won()
 
- Return: bool
 
- Function: is_draw
 
- Description: Has the battle resulted in a draw
 
- Parameters: is_draw()
 
- Return: bool
 
- Function: winning_faction_key
 
- Description: Returns the key of the winning faction or an empty string if battle results are not finalized or there is no winner for some reason.
 
- Parameters: winning_faction_key()
 
- Return: string
 
- Function: losing_faction_key
 
- Description: Returns the key of the losing faction or an empty string if battle results are not finalized or there is no winner for some reason.
 
- Parameters: losing_faction_key()
 
- Return: string
 
- Function: attacker_main_army_start_units
 
- Description: Start units in the main army of the attacker.
 
- Parameters: attacker_main_army_start_units()
 
- Return: int32
 
- Function: defender_main_army_start_units
 
- Description: Start units in the main army of the defender.
 
- Parameters: defender_main_army_start_units()
 
- Return: int32
 
- Function: attacker_main_army_alive_units
 
- Description: Alive units in the main army of the attacker.
 
- Parameters: attacker_main_army_alive_units()
 
- Return: int32
 
- Function: defender_main_army_alive_units
 
- Description: Alive units in the main army of the defender.
 
- Parameters: defender_main_army_alive_units()
 
- Return: int32
 
- Function: attacker_start_number_of_men
 
- Description: Starting number of men in the attacking side (including reinforcements)
 
- Parameters: attacker_start_number_of_men()
 
- Return: int32
 
- Function: defender_start_number_of_men
 
- Description: Starting number of men in the defending side (including reinforcements)
 
- Parameters: defender_start_number_of_men()
 
- Return: int32
 
- Function: attacker_casualties
 
- Description: Total lost men in the attacking side (including reinforcements)
 
- Parameters: attacker_casualties()
 
- Return: int32
 
- Function: defender_casualties
 
- Description: Total lost men in the defending side (including reinforcements)
 
- Parameters: defender_casualties()
 
- Return: int32
 
- Function: side_has_dead_unit_of_set
 
- Description: Any unit that belongs to unit set is dead on the provided side (including reinforcements)
 
- Parameters: side_has_dead_unit_of_set(cm:model() model, bool is_attacking_side, String unit_key)
 
- Return: bool
 
- Function: did_winner_primary_general_survive
 
- Description: Returns true if the winning alliance's primary general survived the battle, otherwise if he died or he was wounded the function returns false.
 
- Parameters: did_winner_primary_general_survive(card32)
 
- Return: bool
 
- Function: burnt_buildings_in_battle_number
 
- Description: Returns the number of burnt buildings in a battle
 
- Parameters: burnt_buildings_in_battle_number()
 
- Return: int32
 
- Description: Bonus values for a campaign object
 
- is_null_interface
 
- agent_value
 
- basic_value
 
- building_chain_value
 
- projectile_value
 
- projectile_shot_type_value
 
- religion_value
 
- subculture_value
 
- faction_value
 
- resource_value
 
- unit_ability_value
 
- army_special_ability_value
 
- ritual_value
 
- ritual_chain_value
 
- unit_attribute_value
 
- unit_category_value
 
- unit_class_value
 
- unit_caste_value
 
- main_unit_value
 
- battlefield_deployable_siege_item_value
 
- technology_category_value
 
- technology_value
 
- action_results_additional_outcome_value
 
- province_initiative_effect_value
 
- deployable_value
 
- building_level_value
 
- province_initiative_value
 
- agent_action_value
 
- campaign_map_attrition_value
 
- name_value
 
- agent_subtype_value
 
- special_ability_phase_value
 
- loyalty_event_effect_value
 
- pooled_resource_factor_junction_value
 
- pooled_resource_value
 
- scripted_value
 
- campaign_stances_effect_value
 
- battle_weather_types_value
 
- seasons_value
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: agent_value
 
- Description: Returns a bonus value parameterised on an agent record
 
- Parameters: agent_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: basic_value
 
- Description: Returns a basic bonus value parameterised on no record
 
- Parameters: basic_value(String bonus_value_id)
 
- Return: float32
 
- Function: building_chain_value
 
- Description: Returns a bonus value parameterised on a building chain record
 
- Parameters: building_chain_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: projectile_value
 
- Description: Returns a bonus value parameterised on a projectile record
 
- Parameters: projectile_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: projectile_shot_type_value
 
- Description: Returns a bonus value parameterised on a projectile shot type record
 
- Parameters: projectile_shot_type_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: religion_value
 
- Description: Returns a bonus value parameterised on a religion
 
- Parameters: religion_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: subculture_value
 
- Description: Returns a bonus value parameterised on a subculture
 
- Parameters: subculture_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: faction_value
 
- Description: Returns a bonus value parameterised on a faction
 
- Parameters: faction_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: resource_value
 
- Description: Returns a bonus value parameterised on a resource
 
- Parameters: resource_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: unit_ability_value
 
- Description: Returns a bonus value parameterised on a unit ability 
 
- Parameters: unit_ability_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: army_special_ability_value
 
- Description: Returns a bonus value parameterised on an army special ability
 
- Parameters: army_special_ability_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: ritual_value
 
- Description: Returns a bonus value parameterised on a ritual
 
- Parameters: ritual_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: ritual_chain_value
 
- Description: Returns a bonus value parameterised on a ritual chain
 
- Parameters: ritual_chain_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: unit_attribute_value
 
- Description: Returns a bonus value parameterised on a unit attribute
 
- Parameters: unit_attribute_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: unit_category_value
 
- Description: Returns a bonus value parameterised on a unit category
 
- Parameters: unit_category_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: unit_class_value
 
- Description: Returns a bonus value parameterised on a unit class
 
- Parameters: unit_class_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: unit_caste_value
 
- Description: Returns a bonus value parameterised on a unit caste
 
- Parameters: unit_caste_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: main_unit_value
 
- Description: Returns a bonus value parameterised on a main unit record
 
- Parameters: main_unit_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: battlefield_deployable_siege_item_value
 
- Description: Returns a bonus value parameterised on a battlefield deployable siege item record
 
- Parameters: battlefield_deployable_siege_item_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: technology_category_value
 
- Description: Returns a bonus value parameterised on a technology category record
 
- Parameters: technology_category_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: technology_value
 
- Description: Returns a bonus value parameterised on a technology record
 
- Parameters: technology_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: action_results_additional_outcome_value
 
- Description: Returns a bonus value parameterised on an action result additional outcome record
 
- Parameters: action_results_additional_outcome_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: province_initiative_effect_value
 
- Description: Returns a bonus value parameterised on an action province initiative record
 
- Parameters: province_initiative_effect_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: deployable_value
 
- Description: Returns a bonus value parameterised on a deployable record
 
- Parameters: deployable_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: building_level_value
 
- Description: Returns a bonus value parameterised on a building level record
 
- Parameters: building_level_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: province_initiative_value
 
- Description: Returns a bonus value parameterised on a province initiative record
 
- Parameters: province_initiative_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: agent_action_value
 
- Description: Returns a bonus value parameterised on an agent action record
 
- Parameters: agent_action_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: campaign_map_attrition_value
 
- Description: Returns a bonus value parameterised on a campaign map attrition record
 
- Parameters: campaign_map_attrition_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: name_value
 
- Description: Returns a bonus value parameterised on a name record
 
- Parameters: name_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: agent_subtype_value
 
- Description: Returns a bonus value parameterised on an agent subtype record
 
- Parameters: agent_subtype_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: special_ability_phase_value
 
- Description: Returns a bonus value parameterised on a special ability phase record
 
- Parameters: special_ability_phase_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: loyalty_event_effect_value
 
- Description: Returns a bonus value parameterised on a loyalty event effect record
 
- Parameters: loyalty_event_effect_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: pooled_resource_factor_junction_value
 
- Description: Returns a bonus value parameterised on a pooled resource factor junction record
 
- Parameters: pooled_resource_factor_junction_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: pooled_resource_value
 
- Description: Returns a bonus value parameterised on a pooled resource record
 
- Parameters: pooled_resource_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: scripted_value
 
- Description: Returns a bonus value parameterised on a scripted bonus value id record
 
- Parameters: scripted_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: campaign_stances_effect_value
 
- Description: Returns a bonus value parameterised on a campaign_stances effect record
 
- Parameters: campaign_stances_effect_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: battle_weather_types_value
 
- Description: Returns a bonus value parameterised on a battle_weather_types record
 
- Parameters: battle_weather_types_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Function: seasons_value
 
- Description: Returns a bonus value parameterised on a seasons record
 
- Parameters: seasons_value(String record_key, String bonus_value_id)
 
- Return: float32
 
- Description: A list of building interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: BUILDING_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Building script interface
 
- is_null_interface
 
- model
 
- faction
 
- region
 
- slot
 
- name
 
- localised_display_name
 
- chain
 
- superchain
 
- level
 
- ui_level
 
- is_max_level_in_chain
 
- possible_building_construction_list
 
- chain_category
 
- percent_health
 
- can_be_damaged
 
- belongs_to_building_set
 
- effects_list
 
- effects_list_for_state
 
- get_effect_value
 
- is_dismantling
 
- is_repairing
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: model
 
- Description: Access to the campaign model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: faction
 
- Description: Returns the faction that owns the building
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: region
 
- Description: The region the building is in
 
- Parameters: region()
 
- Return: REGION_SCRIPT_INTERFACE
 
- Function: slot
 
- Description: The slot containing the building
 
- Parameters: slot()
 
- Return: SLOT_SCRIPT_INTERFACE
 
- Function: name
 
- Description: The key for the building (building level record)
 
- Parameters: name()
 
- Return: String
 
- Function: localised_display_name
 
- Description: The localised name for the building (building level record)
 
- Parameters: localised_display_name()
 
- Return: UniString
 
- Function: chain
 
- Description: The key for the building chain (building_chain_record key)
 
- Parameters: chain()
 
- Return: String
 
- Function: superchain
 
- Description: The key for the building superchain (building_superchain_record key)
 
- Parameters: superchain()
 
- Return: String
 
- Function: level
 
- Description: The level of the building
 
- Parameters: level()
 
- Return: int32
 
- Function: ui_level
 
- Description: The level of the building, as displayed in the UI
 
- Parameters: ui_level()
 
- Return: int32
 
- Function: is_max_level_in_chain
 
- Description: Returns true if the building has the maximum level for its chain
 
- Parameters: is_max_level_in_chain()
 
- Return: bool
 
- Function: possible_building_construction_list
 
- Description: Returns a list of keys of the possible building constructions
 
- Parameters: possible_building_construction_list()
 
- Return: array of strings
 
- Function: chain_category
 
- Description: The chain_category for the building chain (building_chain_record chain_category)
 
- Parameters: chain_category()
 
- Return: String
 
- Function: percent_health
 
- Description: The health of a building as a percentage between 0-100
 
- Parameters: percent_health()
 
- Return: 100 >= int >= 0
 
- Function: can_be_damaged
 
- Description: Returns if the building is viable for damage
 
- Parameters: can_be_damaged()
 
- Return: bool
 
- Function: belongs_to_building_set
 
- Description: Returns whether the building is in the building set
 
- Parameters: belongs_to_building_set(String building_set_key)
 
- Return: bool
 
- Function: effects_list
 
- Description: The effects applied to this building
 
- Parameters: effects_list()
 
- Return: EFFECT_LIST_SCRIPT_INTERFACE
 
- Function: effects_list_for_state
 
- Description: The effects for given state
 
- Parameters: effects_list_for_state(string building_state)
 
- Return: EFFECT_LIST_SCRIPT_INTERFACE
 
- Function: get_effect_value
 
- Description: gets value of effect or 0 if not found
 
- Parameters: get_effect_value(effect_key)
 
- Return: float32
 
- Function: is_dismantling
 
- Description: returns either building is dismantling or not
 
- Parameters: is_dismantling()
 
- Return: bool
 
- Function: is_repairing
 
- Description: returns whether the building is repairing or not
 
- Parameters: is_repairing()
 
- Return: bool
 
- Description: Campaign AI script interface.
 
- is_null_interface
 
- strategic_stance_between_factions
 
- strategic_stance_between_factions_available
 
- strategic_stance_between_factions_promotion_or_blocking_is_set
 
- strategic_stance_between_factions_promotion_is_active
 
- strategic_stance_between_factions_promotion_current_level
 
- strategic_stance_between_factions_promotion_start_round
 
- strategic_stance_between_factions_promotion_start_level
 
- strategic_stance_between_factions_promotion_end_round
 
- strategic_stance_between_factions_promotion_end_level
 
- strategic_stance_between_factions_is_being_blocked
 
- strategic_stance_between_factions_is_being_blocked_until
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: strategic_stance_between_factions
 
- Description: Determine the strategic stance between two AI factions.
 
- Parameters: strategic_stance_between_factions(faction_being_queries, faction_that_is_being_considered)
 
- Return: 
 
- Function: strategic_stance_between_factions_available
 
- Description: Determine if the strategic stance between two AI factions is available.
 
- Parameters: strategic_stance_between_factions_available(faction_being_queries, faction_that_is_being_considered)
 
- Return: 
 
- Function: strategic_stance_between_factions_promotion_or_blocking_is_set
 
- Description: Determine if there is any currently active blocking or promotion set between factions.
 
- Parameters: strategic_stance_between_factions_promotion_or_blocking_is_set(faction_being_queries, faction_that_is_being_considered)
 
- Return: 
 
- Function: strategic_stance_between_factions_promotion_is_active
 
- Description: Determine if there is any currently active promotion between factions for a given stance.
 
- Parameters: strategic_stance_between_factions_promotion_is_active(faction_being_queries, faction_that_is_being_considered, stance_by_number)
 
- Return: 
 
- Function: strategic_stance_between_factions_promotion_current_level
 
- Description: Determine the current promotion level between factions for a given stance if set.
 
- Parameters: strategic_stance_between_factions_promotion_current_level(faction_being_queries, faction_that_is_being_considered, stance_by_number)
 
- Return: 
 
- Function: strategic_stance_between_factions_promotion_start_round
 
- Description: Determine the start round on promotion between factions for a given stance if set.
 
- Parameters: strategic_stance_between_factions_promotion_start_round(faction_being_queries, faction_that_is_being_considered, stance_by_number)
 
- Return: 
 
- Function: strategic_stance_between_factions_promotion_start_level
 
- Description: Determine the start level on promotion between factions for a given stance if set.
 
- Parameters: strategic_stance_between_factions_promotion_start_level(faction_being_queries, faction_that_is_being_considered, stance_by_number)
 
- Return: 
 
- Function: strategic_stance_between_factions_promotion_end_round
 
- Description: Determine the end round on promotion between factions for a given stance if set.
 
- Parameters: strategic_stance_between_factions_promotion_end_round(faction_being_queries, faction_that_is_being_considered, stance_by_number)
 
- Return: 
 
- Function: strategic_stance_between_factions_promotion_end_level
 
- Description: Determine the end level on promotion between factions for a given stance if set.
 
- Parameters: strategic_stance_between_factions_promotion_end_level(faction_being_queries, faction_that_is_being_considered, stance_by_number)
 
- Return: 
 
- Function: strategic_stance_between_factions_is_being_blocked
 
- Description: Determine blocking is enabled between factions for a given stance if set.
 
- Parameters: strategic_stance_between_factions_is_being_blocked(faction_being_queries, faction_that_is_being_considered, stance_by_number)
 
- Return: 
 
- Function: strategic_stance_between_factions_is_being_blocked_until
 
- Description: Determine when blocking is enabled too between factions for a given stance if set.
 
- Parameters: strategic_stance_between_factions_is_being_blocked_until(faction_being_queries, faction_that_is_being_considered, stance_by_number)
 
- Return: 
 
- Description: Mission script interface.
 
- is_null_interface
 
- model
 
- faction
 
- mission_record_key
 
- mission_issuer_record_key
 
- mission_custom_id
 
- succeeded
 
- cancelled
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: model
 
- Description: Access to the campaign model interface
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: faction
 
- Description: Access to the faction interface
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: mission_record_key
 
- Description: Returns the mission record key
 
- Parameters: mission_record_key()
 
- Return: String
 
- Function: mission_issuer_record_key
 
- Description: Returns the mission issuer record key
 
- Parameters: mission_issuer_record_key()
 
- Return: String
 
- Function: mission_custom_id
 
- Description: Returns the mission custom id
 
- Parameters: mission_custom_id()
 
- Return: String
 
- Function: succeeded
 
- Description: Returns whether the mission was succeeded
 
- Parameters: succeeded()
 
- Return: bool
 
- Function: cancelled
 
- Description: Returns whether the mission was cancelled
 
- Parameters: cancelled()
 
- Return: bool
 
- Description: A list of character details interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: CHARACTER_DETAILS_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Character details interface
 
- is_null_interface
 
- model
 
- faction
 
- faction_onscreen_name
 
- faction_flag_path
 
- forename
 
- surname
 
- get_forename
 
- get_surname
 
- onscreen_name
 
- character_type
 
- has_trait
 
- trait_points
 
- has_ancillary
 
- is_male
 
- age
 
- has_skill
 
- number_of_traits
 
- trait_level
 
- loyalty
 
- gravitas
 
- has_father
 
- has_mother
 
- mother
 
- father
 
- character
 
- family_member
 
- character_subtype_key
 
- is_civilian
 
- is_dynasty_heir
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: model
 
- Description: Access to the model interface
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: faction
 
- Description: Access to the character's faction interface
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: faction_onscreen_name
 
- Description: The name of the faction that the character belongs to (also works for rebel faction)
 
- Parameters: faction_onscreen_name()
 
- Return: UniString
 
- Function: faction_flag_path
 
- Description: The flag path of the faction that the character belongs to (also works for rebel faction)
 
- Parameters: faction_flag_path()
 
- Return: String
 
- Function: forename
 
- Description: Does the character have this forename?
 
- Parameters: The forename's db key, e.g. forename("names_name_names_irishAlan")
 
- Return: bool
 
- Function: surname
 
- Description: Does the character have this surname?
 
- Parameters: The surname's db key, e.g. surname("names_name_names_irishBlair")
 
- Return: bool
 
- Function: get_forename
 
- Description: Returns the character forename
 
- Parameters: get_forename()
 
- Return: string
 
- Function: get_surname
 
- Description: Returns the character surname
 
- Parameters: get_surname()
 
- Return: string
 
- Function: onscreen_name
 
- Description: The onscreen name of the character
 
- Parameters: onscreen_name()
 
- Return: UniString
 
- Function: character_type
 
- Description: Returns true if the character context is of the agent type specified
 
- Parameters: Key from agents table, e.g. character_type("ninja")
 
- Return: bool
 
- Function: has_trait
 
- Description: Returns if the character has the specified trait
 
- Parameters: Trait key, e.g. has_trait("drunkard")
 
- Return: int
 
- Function: trait_points
 
- Description: Returns the number of trait points for the specified trait (0 if not present)
 
- Parameters: Trait key, e.g. trait_points("drunkard")
 
- Return: int
 
- Function: has_ancillary
 
- Description: Returns if the character has the specified ancillary
 
- Parameters: Key ancillaries table, e.g. has_ancillary("duck")
 
- Return: bool
 
- Function: is_male
 
- Description: Is the character male?
 
- Parameters: is_male()
 
- Return: bool
 
- Function: age
 
- Description: The character's age
 
- Parameters: age()
 
- Return: int
 
- Function: has_skill
 
- Description: Has the skill passed
 
- Parameters: has_skill()
 
- Return: bool
 
- Function: number_of_traits
 
- Description: The number of traits the chracter has
 
- Parameters: number_of_traits()
 
- Return: card32
 
- Function: trait_level
 
- Description: returns the level of the specified trait
 
- Parameters: trait_level("trait")
 
- Return: int32
 
- Function: loyalty
 
- Description: returns the characters loyalty
 
- Parameters: loyalty()
 
- Return: card32
 
- Function: gravitas
 
- Description: returns the characters gravitas
 
- Parameters: gravitas()
 
- Return: card32
 
- Function: has_father
 
- Description: returns whether a character has a father or not
 
- Parameters: has_father()
 
- Return: bool
 
- Function: has_mother
 
- Description: returns whether a character has a mother or not
 
- Parameters: has_mother()
 
- Return: bool
 
- Function: mother
 
- Description: returns a character mother's family member script interface
 
- Parameters: mother()
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Function: father
 
- Description: returns a characters father's family member script interface
 
- Parameters: father()
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Function: character
 
- Description: Character interface related to this character_details. This will return a NULL_SCRIPT_INTERFACE if dead
 
- Parameters: character()
 
- Return: CHARACTER_SCRIPT_INTERFACE
 
- Function: family_member
 
- Description: returns a characters family member script interface
 
- Parameters: family_member()
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if no family member exists)
 
- Function: character_subtype_key
 
- Description: Returns the key of the character agent subtype record
 
- Parameters: character_subtype_key()
 
- Return: String
 
- Function: is_civilian
 
- Description: Returns true if the character is a civilian
 
- Parameters: is_civilian()
 
- Return: bool
 
- Function: is_dynasty_heir
 
- Description: Returns true if the character is the heir of their dynasty
 
- Parameters: is_dynasty_heir()
 
- Return: bool
 
- Description: A list of character interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: CHARACTER_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Character interface
 
- is_null_interface
 
- command_queue_index
 
- has_garrison_residence
 
- has_region
 
- has_military_force
 
- model
 
- garrison_residence
 
- faction
 
- faction_key_if_rebel
 
- region
 
- sea_region
 
- region_data
 
- military_force
 
- forename
 
- surname
 
- get_forename
 
- onscreen_name
 
- get_ancillary
 
- get_surname
 
- get_epithet
 
- in_settlement
 
- in_port
 
- is_besieging
 
- is_blockading
 
- is_carrying_troops
 
- is_in_motion
 
- character_type
 
- character_type_key
 
- character_subtype
 
- character_subtype_key
 
- has_trait
 
- has_display_trait
 
- get_traits_for_ui
 
- trait_points
 
- has_ancillary
 
- has_ancillary_equipped
 
- ancillaries
 
- battles_fought
 
- action_points_remaining_percent
 
- action_points_per_turn
 
- is_male
 
- age
 
- performed_action_this_turn
 
- has_retreated_this_turn
 
- allowed_to_flee_from_battle
 
- is_ambushing
 
- turns_at_sea
 
- turns_in_own_regions
 
- turns_in_enemy_regions
 
- is_faction_leader
 
- rank
 
- experience_required_for_rank_up
 
- experience_required_for_rank
 
- defensive_sieges_fought
 
- defensive_sieges_won
 
- offensive_sieges_fought
 
- offensive_sieges_won
 
- fought_in_battle
 
- won_battle
 
- percentage_of_own_alliance_killed
 
- ministerial_position
 
- logical_position_x
 
- logical_position_y
 
- display_position_x
 
- display_position_y
 
- bearing
 
- battles_won
 
- offensive_battles_won
 
- offensive_battles_fought
 
- defensive_battles_won
 
- defensive_battles_fought
 
- offensive_naval_battles_won
 
- offensive_naval_battles_fought
 
- defensive_naval_battles_won
 
- defensive_naval_battles_fought
 
- offensive_ambush_battles_won
 
- offensive_ambush_battles_fought
 
- defensive_ambush_battles_won
 
- defensive_ambush_battles_fought
 
- cqi
 
- is_embedded_in_military_force
 
- embedded_in_military_force
 
- has_skill
 
- unassigned_skill_points
 
- is_hidden
 
- routed_in_battle
 
- body_guard_casulties
 
- is_deployed
 
- is_at_sea
 
- has_recruited_mercenaries
 
- number_of_traits
 
- trait_level
 
- loyalty
 
- is_loyalty_applicable
 
- interfaction_loyalty
 
- gravitas
 
- has_father
 
- has_mother
 
- mother
 
- father
 
- family_member
 
- character_details
 
- is_politician
 
- post_battle_ancilary_chance
 
- scripted_time_to_leave
 
- is_caster
 
- is_visible_to_faction
 
- can_equip_ancillary
 
- is_wounded
 
- is_immortal
 
- is_replaced_starting_general
 
- has_effect_bundle
 
- get_effect_bundle
 
- effect_bundles
 
- commanded_unit
 
- has_assigned_office_this_round
 
- uniform_name
 
- total_max_experience
 
- percent_of_total_max_experience_gained
 
- current_xp_in_percent
 
- rebel_general_subculture
 
- bonus_values
 
- get_overlapping_enemy_zocs
 
- has_special_character_skin_equipped
 
- attribute_level
 
- is_original_faction_leader
 
- is_obedience_character
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: command_queue_index
 
- Description: Command queue index of the Character
 
- Parameters: command_queue_index()
 
- Return: int
 
- Function: has_garrison_residence
 
- Description: Is the character contained in a garrison residence?
 
- Parameters: has_garrison_residence()
 
- Return: bool
 
- Function: has_region
 
- Description: Is the character in a valid region?
 
- Parameters: has_region()
 
- Return: bool
 
- Function: has_military_force
 
- Description: Does this character command a military force?
 
- Parameters: has_military_force()
 
- Return: bool
 
- Function: model
 
- Description: Access to the model interface
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: garrison_residence
 
- Description: The garrison containing the character
 
- Parameters: garrison_residence()
 
- Return: GARRISON_RESIDENCE_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the character is not contained)
 
- Function: faction
 
- Description: Access to the character's faction interface
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: faction_key_if_rebel
 
- Description: Returns the specific key of the character's faction if they are rebels or empty string otherwise
 
- Parameters: faction_key_if_rebel()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: region
 
- Description: Access to the region that the character is in
 
- Parameters: region()
 
- Return: REGION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the character is not in a valid region)
 
- Function: sea_region
 
- Description: Access to the sea region that the character is in
 
- Parameters: sea_region()
 
- Return: SEA_REGION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the character is not in a valid sea region)
 
- Function: region_data
 
- Description: Access to the region data area that the character is in
 
- Parameters: region_data()
 
- Return: REGION_DATA_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the character is not on the map)
 
- Function: military_force
 
- Description: The military force that the character commands
 
- Parameters: military_force()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the character is not commanding a military force)
 
- Function: forename
 
- Description: Does the character have this forename?
 
- Parameters: The forename's db key, e.g. forename("names_name_names_irishAlan")
 
- Return: bool
 
- Function: surname
 
- Description: Does the character have this surname?
 
- Parameters: The surname's db key, e.g. surname("names_name_names_irishBlair")
 
- Return: bool
 
- Function: get_forename
 
- Description: Returns the character forename
 
- Parameters: get_forename()
 
- Return: string
 
- Function: onscreen_name
 
- Description: Returns the character name
 
- Parameters: onscreen_name()
 
- Return: unistring
 
- Function: get_ancillary
 
- Description: Returns the ancillary with this key for this character
 
- Parameters: get_ancillary(ancillary_key)
 
- Return: ANCILLARY_SCRIPT_INTERFACE
 
- Function: get_surname
 
- Description: Returns the character surname
 
- Parameters: get_surname()
 
- Return: string
 
- Function: get_epithet
 
- Description: Returns the character's epithet
 
- Parameters: get_epithet()
 
- Return: UniString
 
- Function: in_settlement
 
- Description: Checks that a character is in a settlement
 
- Parameters: in_settlement()
 
- Return: bool
 
- Function: in_port
 
- Description: Is the character in a port?
 
- Parameters: in_port()
 
- Return: bool
 
- Function: is_besieging
 
- Description: Is the character besieging?
 
- Parameters: is_besieging()
 
- Return: bool
 
- Function: is_blockading
 
- Description: Is the character blockading?
 
- Parameters: is_blockading()
 
- Return: bool
 
- Function: is_carrying_troops
 
- Description: Is the character transporting an army?
 
- Parameters: is_carrying_troops()
 
- Return: bool
 
- Function: is_in_motion
 
- Description: Is the character currently moving?
 
- Parameters: is_in_motion()
 
- Return: bool
 
- Function: character_type
 
- Description: Returns true if the character context is of the agent type specified
 
- Parameters: Key from agents table, e.g. character_type("ninja")
 
- Return: bool
 
- Function: character_type_key
 
- Description: Returns the key of the character agent type record
 
- Parameters: character_type_key()
 
- Return: String
 
- Function: character_subtype
 
- Description: Returns true if the character context is of the agent subtype specified
 
- Parameters: Key from agent subtypes table, e.g. character_subtype("emp_celestial_wizard")
 
- Return: bool
 
- Function: character_subtype_key
 
- Description: Returns the key of the character agent subtype record
 
- Parameters: character_subtype_key()
 
- Return: String
 
- Function: has_trait
 
- Description: Returns if the character has the specified trait
 
- Parameters: Trait key, e.g. has_trait("drunkard")
 
- Return: int
 
- Function: has_display_trait
 
- Description: Returns if the character has the specified trait to be displayed
 
- Parameters: Trait key, e.g. has_display_trait("drunkard")
 
- Return: bool
 
- Function: get_traits_for_ui
 
- Description: Returns a table of all traits that are visible in Character Details screen, omitting background trait.
 
- Parameters: get_traits_for_ui()
 
- Return: table
 
- Function: trait_points
 
- Description: Returns the number of trait points for the specified trait (0 if not present)
 
- Parameters: Trait key, e.g. trait_points("drunkard")
 
- Return: int
 
- Function: has_ancillary
 
- Description: Returns if the character has the specified ancillary
 
- Parameters: Key ancillaries table, e.g. has_ancillary("duck")
 
- Return: bool
 
- Function: has_ancillary_equipped
 
- Description: Returns if the character has the specified ancillary equipped(without cooldown)
 
- Parameters: Key ancillaries table, e.g. has_ancillary_equipped("duck")
 
- Return: bool
 
- Function: ancillaries
 
- Description: Returns a list with all ancillaries for character
 
- Parameters: ancillaries()
 
- Return: ANCILLARY_LIST_SCRIPT_INTERFACE
 
- Function: battles_fought
 
- Description: How many battles has this character fought in?
 
- Parameters: battles_fought()
 
- Return: int
 
- Function: action_points_remaining_percent
 
- Description: Returns the percentage of movement points remaining as an integer value
 
- Parameters: action_points_remaining_percent() < 50
 
- Return: int
 
- Function: action_points_per_turn
 
- Description: Action points per turn
 
- Parameters: action_points_per_turn()
 
- Return: int
 
- Function: is_male
 
- Description: Is the character male?
 
- Parameters: is_male()
 
- Return: bool
 
- Function: age
 
- Description: The character's age
 
- Parameters: age()
 
- Return: int
 
- Function: performed_action_this_turn
 
- Description: Has the character performed any action this turn?
 
- Parameters: performed_action_this_turn()
 
- Return: bool
 
- Function: has_retreated_this_turn
 
- Description: Has this character already retreated this turn
 
- Parameters: has_retreated_this_turn()
 
- Return: bool
 
- Function: allowed_to_flee_from_battle
 
- Description: If this character is allowed to retreat
 
- Parameters: allowed_to_flee_from_battle()
 
- Return: bool
 
- Function: is_ambushing
 
- Description: Is the character ambushing?
 
- Parameters: is_ambushing()
 
- Return: bool
 
- Function: turns_at_sea
 
- Description: Returns the number of turns at sea exclusively
 
- Parameters: turns_at_sea()
 
- Return: int
 
- Function: turns_in_own_regions
 
- Description: Returns the number of turns in home regions exclusively
 
- Parameters: turns_in_own_regions()
 
- Return: int
 
- Function: turns_in_enemy_regions
 
- Description: Returns the number of turns in enemy regions exclusively
 
- Parameters: turns_in_enemy_regions()
 
- Return: int
 
- Function: is_faction_leader
 
- Description: Is the character the faction leader?
 
- Parameters: is_faction_leader()
 
- Return: bool
 
- Function: rank
 
- Description: Rank of character (1-6)
 
- Parameters: rank()
 
- Return: int
 
- Function: experience_required_for_rank_up
 
- Description: Experience required to reach next rank.
 
- Parameters: experience_required_for_rank_up()
 
- Return: int
 
- Function: experience_required_for_rank
 
- Description: Experience required to reach the supplied rank.
 
- Parameters: experience_required_for_rank(int rank)
 
- Return: int
 
- Function: defensive_sieges_fought
 
- Description: Number of defensive sieges fought
 
- Parameters: defensive_sieges_fought()
 
- Return: int
 
- Function: defensive_sieges_won
 
- Description: Number of defensive sieges won
 
- Parameters: defensive_sieges_won()
 
- Return: int
 
- Function: offensive_sieges_fought
 
- Description: Number of offensive sieges fought
 
- Parameters: offensive_sieges_fought()
 
- Return: int
 
- Function: offensive_sieges_won
 
- Description: Number of offensive sieges won
 
- Parameters: offensive_sieges_won()
 
- Return: int
 
- Function: fought_in_battle
 
- Description: Did the character fight in missile or melee combat in the battle
 
- Parameters: fought_in_battle()
 
- Return: bool
 
- Function: won_battle
 
- Description: Was the character in the winning alliance in a battle
 
- Parameters: won_battle()
 
- Return: bool
 
- Function: percentage_of_own_alliance_killed
 
- Description: Percentage of men killed in the character's alliance
 
- Parameters: percentage_of_own_alliance_killed()
 
- Return: int
 
- Function: ministerial_position
 
- Description: Returns ministerial position of the character
 
- Parameters: ministerial_position()
 
- Return: string
 
- Function: logical_position_x
 
- Description: Logical position on map, x coord
 
- Parameters: logical_position_x()
 
- Return: int
 
- Function: logical_position_y
 
- Description: Logical position on map, y coord
 
- Parameters: logical_position_y()
 
- Return: int
 
- Function: display_position_x
 
- Description: Display/real position on map, x coord
 
- Parameters: display_position_x()
 
- Return: float
 
- Function: display_position_y
 
- Description: Display/real position on map, y coord
 
- Parameters: display_position_y()
 
- Return: float
 
- Function: bearing
 
- Description: Orientation
 
- Parameters: bearing()
 
- Return: float
 
- Function: battles_won
 
- Description: Number of battles won
 
- Parameters: battles_won()
 
- Return: card32
 
- Function: offensive_battles_won
 
- Description: Number of offensive battles won
 
- Parameters: offensive_battles_won()
 
- Return: card32
 
- Function: offensive_battles_fought
 
- Description: Number of offensive battles fought
 
- Parameters: offensive_battles_fought()
 
- Return: card32
 
- Function: defensive_battles_won
 
- Description: Number of defensive battles won
 
- Parameters: defensive_battles_won()
 
- Return: card32
 
- Function: defensive_battles_fought
 
- Description: Number of defensive battles fought
 
- Parameters: defensive_battles_fought()
 
- Return: card32
 
- Function: offensive_naval_battles_won
 
- Description: Number of offensive naval battles won
 
- Parameters: offensive_naval_battles_won()
 
- Return: card32
 
- Function: offensive_naval_battles_fought
 
- Description: Number of offensive naval battles fought
 
- Parameters: offensive_naval_battles_fought()
 
- Return: card32
 
- Function: defensive_naval_battles_won
 
- Description: Number of defensive naval battles won
 
- Parameters: defensive_naval_battles_won()
 
- Return: card32
 
- Function: defensive_naval_battles_fought
 
- Description: Number of defensive naval battles fought
 
- Parameters: defensive_naval_battles_fought()
 
- Return: card32
 
- Function: offensive_ambush_battles_won
 
- Description: Number of offensive ambush battles won
 
- Parameters: offensive_ambush_battles_won()
 
- Return: card32
 
- Function: offensive_ambush_battles_fought
 
- Description: Number of offensive ambush battles fought
 
- Parameters: offensive_ambush_battles_fought()
 
- Return: card32
 
- Function: defensive_ambush_battles_won
 
- Description: Number of defensive ambush battles won
 
- Parameters: defensive_ambush_battles_won()
 
- Return: card32
 
- Function: defensive_ambush_battles_fought
 
- Description: Number of defensive ambush battles fought
 
- Parameters: defensive_ambush_battles_fought()
 
- Return: card32
 
- Function: cqi
 
- Description: Character CQI
 
- Parameters: cqi()
 
- Return: card32
 
- Function: is_embedded_in_military_force
 
- Description: Is part of a military force
 
- Parameters: is_embedded_in_military_force()
 
- Return: bool
 
- Function: embedded_in_military_force
 
- Description: The military force that the character is embedded in
 
- Parameters: embedded_in_military_force()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the character is not commanding a military force)
 
- Function: has_skill
 
- Description: Has the skill passed
 
- Parameters: has_skill()
 
- Return: bool
 
- Function: unassigned_skill_points
 
- Description: How many unassigned skill points does this character have
 
- Parameters: num_unassigned_skill_points()
 
- Return: number
 
- Function: is_hidden
 
- Description: Is the charcter hidden from a faction
 
- Parameters: is_hidden()
 
- Return: bool
 
- Function: routed_in_battle
 
- Description: The commander routed
 
- Parameters: routed_in_battle()
 
- Return: bool
 
- Function: body_guard_casulties
 
- Description: Percentage of commanded unit lost in battle
 
- Parameters: body_guard_casulties()
 
- Return: float32
 
- Function: is_deployed
 
- Description: Is the character deployed
 
- Parameters: is_deployed()
 
- Return: bool
 
- Function: is_at_sea
 
- Description: Is the character at sea
 
- Parameters: is_at_sea()
 
- Return: bool
 
- Function: has_recruited_mercenaries
 
- Description: Has the character recruited mercenaries
 
- Parameters: has_recruited_mercenaries()
 
- Return: bool
 
- Function: number_of_traits
 
- Description: The number of traits the chracter has
 
- Parameters: number_of_traits()
 
- Return: card32
 
- Function: trait_level
 
- Description: returns the level of the specified trait
 
- Parameters: trait_level("trait")
 
- Return: int32
 
- Function: loyalty
 
- Description: returns the characters loyalty
 
- Parameters: loyalty()
 
- Return: int32
 
- Function: is_loyalty_applicable
 
- Description: returns whether the characters loyalty is applicable
 
- Parameters: is_loyalty_applicable()
 
- Return: bool
 
- Function: interfaction_loyalty
 
- Description: returns the characters interfaction loyalty
 
- Parameters: interfaction_loyalty()
 
- Return: int32
 
- Function: gravitas
 
- Description: returns the characters gravitas
 
- Parameters: gravitas()
 
- Return: card32
 
- Function: has_father
 
- Description: returns whether a character has a father or not
 
- Parameters: has_father()
 
- Return: bool
 
- Function: has_mother
 
- Description: returns whether a character has a mother or not
 
- Parameters: has_mother()
 
- Return: bool
 
- Function: mother
 
- Description: returns a character mother's family member script interface
 
- Parameters: mother()
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Function: father
 
- Description: returns a characters father's family member script interface
 
- Parameters: father()
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Function: family_member
 
- Description: returns a characters family member script interface
 
- Parameters: family_member()
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Function: character_details
 
- Description: persistent details of this character
 
- Parameters: character_details()
 
- Return: CHARACTER_DETAILS_SCRIPT_INTERFACE
 
- Function: is_politician
 
- Description: returns whether a character is a politian or not
 
- Parameters: is_politician()
 
- Return: bool
 
- Function: post_battle_ancilary_chance
 
- Description: returns a mod on the drop chance for post battle ancillaries
 
- Parameters: post_battle_ancilary_chance()
 
- Return: float32
 
- Function: scripted_time_to_leave
 
- Description: returns the remaining life span of the character
 
- Parameters: scripted_time_to_leave()
 
- Return: card32
 
- Function: is_caster
 
- Description: returns true if the character is a caster
 
- Parameters: is_caster()
 
- Return: bool
 
- Function: is_visible_to_faction
 
- Description: returns true if this character is visible to the specified faction
 
- Parameters: is_visible_to_faction("faction")
 
- Return: bool
 
- Function: can_equip_ancillary
 
- Description: returns true if this character can equip the specified ancillary
 
- Parameters: can_equip_ancillary("ancillary")
 
- Return: bool
 
- Function: is_wounded
 
- Description: return true if this character is wounded
 
- Parameters: is_wounded()
 
- Return: bool
 
- Function: is_immortal
 
- Description: return true if this character is immortal
 
- Parameters: is_immortal()
 
- Return: bool
 
- Function: is_replaced_starting_general
 
- Description: return true if this character is a replaced starting general
 
- Parameters: is_replaced_starting_general()
 
- Return: bool
 
- Function: has_effect_bundle
 
- Description: Returns true if the character has the specified effect bundle active
 
- Parameters: has_effect_bundle(String bundle_key)
 
- Return: bool
 
- Function: get_effect_bundle
 
- Description: Get the character's specified effect bundle.
 
- Parameters: get_effect_bundle(key)
 
- Return: EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Function: effect_bundles
 
- Description: Effect bundles currently active on the character
 
- Parameters: effect_bundles()
 
- Return: EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE
 
- Function: commanded_unit
 
- Description: Commanded unit
 
- Parameters: commanded_unit()
 
- Return: UNIT_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if there is not a valid commanded unit)
 
- Function: has_assigned_office_this_round
 
- Description: Has this character been assigned an office slot this turn
 
- Parameters: has_assigned_office_this_round()
 
- Return: bool
 
- Function: uniform_name
 
- Description: Returns the uniform_name key from the campaign_character_art_sets table used by the character.
 
- Parameters: uniform_name()
 
- Return: string
 
- Function: total_max_experience
 
- Description: Returns the total experice that can be acquired. i.e: xp for rank 1 + xp for rank 2 ...
 
- Parameters: total_max_experience()
 
- Return: number
 
- Function: percent_of_total_max_experience_gained
 
- Description: Returns the percent of the total experice that can be acquired. i.e: xp for rank 1 + xp for rank 2 ... / total_max_experience
 
- Parameters: percent_of_total_max_experience_gained()
 
- Return: number
 
- Function: current_xp_in_percent
 
- Description: Returns the percent of the current xp against the next level
 
- Parameters: current_xp_in_percent()
 
- Return: number
 
- Function: rebel_general_subculture
 
- Description: If the character is a rebel general, returns the subculture of the rebels. Otherwise, returns an empty string
 
- Parameters: rebel_general_subculture()
 
- Return: string
 
- Function: bonus_values
 
- Description: Active bonus values of this character
 
- Parameters: bonus_values()
 
- Return: BONUS_VALUES_SCRIPT_INTERFACE
 
- Function: get_overlapping_enemy_zocs
 
- Description: Returns a list of enemy characters whose ZoCs overlap the character.
 
- Parameters: get_overlapping_enemy_zocs()
 
- Return: CHARACTER_LIST_SCRIPT_INTERFACE
 
- Function: has_special_character_skin_equipped
 
- Description: Checks whether this character uses special skin
 
- Parameters: has_special_character_skin_equipped()
 
- Return: boolean
 
- Function: attribute_level
 
- Description: Returns the level of the given attribute of this character
 
- Parameters: attribute_level("attribute_id")
 
- Return: number
 
- Function: is_original_faction_leader
 
- Description: Returns true if this character is faction leader and it is the original faction leader of its faction
 
- Parameters: is_original_faction_leader()
 
- Return: boolean
 
- Function: is_obedience_character
 
- Description: Returns true if the character is of the type obedience character
 
- Parameters: is_obedience_character()
 
- Return: bool
 
- Description: A customisable effect bundle, based off of an existing effect bundle defined in the database
 
- is_null_interface
 
- key
 
- effects
 
- duration
 
- set_duration
 
- add_effect
 
- set_effect_value
 
- remove_effect
 
- icon_path
 
- set_is_from_ERS
 
- set_title
 
- set_description
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: key
 
- Description: Key of the effect bundle record
 
- Parameters: key()
 
- Return: String
 
- Function: effects
 
- Description: Effects currently provided by this effect bundle
 
- Parameters: effects()
 
- Return: EFFECT_LIST_SCRIPT_INTERFACE
 
- Function: duration
 
- Description: Number of rounds this effect bundle will persist for. Zero means infinite duration
 
- Parameters: duration()
 
- Return: card32
 
- Function: set_duration
 
- Description: Set the number of rounds this effect bundle will persist for
 
- Parameters: set_duration(card32 num_rounds)
 
- Return: void
 
- Function: add_effect
 
- Description: Add a new effect to the effect bundle
 
- Parameters: add_effect(String effect_key, String scope_key, float32 value)
 
- Return: bool
 
- Function: set_effect_value
 
- Description: Change the value of the specified effect
 
- Parameters: set_effect_value(EFFECT_SCRIPT_INTERFACE effect, float32 new_value)
 
- Return: bool
 
- Function: remove_effect
 
- Description: Remove the specified effect
 
- Parameters: remove_effect(EFFECT_SCRIPT_INTERFACE effect)
 
- Return: bool
 
- Function: icon_path
 
- Description: Icon path for this custom effect bundle
 
- Parameters: icon_path()
 
- Return: String
 
- Function: set_is_from_ERS
 
- Description: Mark that this effect bundle comes from ERS
 
- Parameters: set_is_from_ERS(true/false)
 
- Return: void
 
- Function: set_title
 
- Description: Sets a title that overrides the title of the effect bundle record
 
- Parameters: set_title(String, String)
 
- Return: void
 
- Function: set_description
 
- Description: Sets a description that overrides the description of the effect bundle record
 
- Parameters: set_description(String, String)
 
- Return: void
 
- Description: Contains resource cost wrapper
 
- is_null_interface
 
- copy_cost
 
- add_resource_cost
 
- add
 
- clear
 
- increase_by_percent
 
- decrease_by_percent
 
- resources
 
- multiply_by
 
- get_cost_from_unit
 
- get_upkeep_from_unit
 
- get_cost_from_record
 
- to_string
 
- is_positive
 
- is_negative
 
- ensure_negative_resource_costs
 
- ensure_positive_resource_costs
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: copy_cost
 
- Description: copy custom cost interface, creating a new one with the same current cost.
 
- Parameters: copy_cost()
 
- Return: void
 
- Function: add_resource_cost
 
- Description: adds a pooled resource cost of give amount and factor
 
- Parameters: increase_by_percent(String pooled_resource_key, String factor key, int32 amount)
 
- Return: void
 
- Function: add
 
- Description: Add another RESOURCE_COST to this one
 
- Parameters: add(CUSTOM_RESOURCE_COST_SCRIPT_INTERFACE cost)
 
- Return: void
 
- Function: clear
 
- Description: adds a pooled resource cost of give amount and factor
 
- Parameters: increase_by_percent(String pooled_resource_key, String factor key, int32 amount)
 
- Return: void
 
- Function: increase_by_percent
 
- Description: modifies cost up by percentage
 
- Parameters: increase_by_percent(float32 percentage)
 
- Return: void
 
- Function: decrease_by_percent
 
- Description: modifies cost down by percentage
 
- Parameters: decrease_by_percent(float32 percentage)
 
- Return: void
 
- Function: resources
 
- Description: returns lua table in the format {{"resource_1_key", total_value, "icon_path"},{"resource_2_key", total_value, "icon_path"},}
 
- Parameters: resources()
 
- Return: table
 
- Function: multiply_by
 
- Description: modifies cost with scalar
 
- Parameters: multiply_by(float32 scalar)
 
- Return: void
 
- Function: get_cost_from_unit
 
- Description: sets the cost from a main unit record
 
- Parameters: get_cost_from_unit(string record_key)
 
- Return: void
 
- Function: get_upkeep_from_unit
 
- Description: sets the cost from a upkeep in main unit record
 
- Parameters: get_upkeep_from_unit(string record_key)
 
- Return: void
 
- Function: get_cost_from_record
 
- Description: sets the cost from a resource cost record
 
- Parameters: get_cost_from_record(string record_key)
 
- Return: void
 
- Function: to_string
 
- Description: Returns the localised names with icons of this resource cost
 
- Parameters: to_string()
 
- Return: string
 
- Function: is_positive
 
- Description: checks if there is at least one positive resource factor and no negative resource factors in the pooled resource cost object
 
- Parameters: is_positive()
 
- Return: bool
 
- Function: is_negative
 
- Description: checks if there is at least one negative resource factor and no positive resource factors in the pooled resource cost object
 
- Parameters: is_negative()
 
- Return: bool
 
- Function: ensure_negative_resource_costs
 
- Description: ensures only the negative elements remain
 
- Parameters: ensure_negative_resource_costs()
 
- Return: void
 
- Function: ensure_positive_resource_costs
 
- Description: ensures only the positive elements remain
 
- Parameters: ensure_positive_resource_costs()
 
- Return: void
 
- Description: Contains resource cost wrapper
 
- is_null_interface
 
- add_stat_bonuses
 
- set_champion_flag
 
- add_custom_attributes
 
- add_custom_recruitment_cost
 
- add_custom_upkeep_cost
 
- add_name_prefix
 
- add_custom_officer_vmd
 
- add_custom_id
 
- set_recruitment_manager
 
- add_mercenary_recruit_data
 
- base_unit_tier
 
- set_gifted_by_faction_cqi
 
- set_can_be_recruited_in_foreign_territory
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: add_stat_bonuses
 
- Description: adds UNIT_STATISTICS_FLAT_BONUS to custom unit.
 
- Parameters: add_stat_bonuses(Table bonuses)
 
- Return: void
 
- Function: set_champion_flag
 
- Description: marks the unit as a champion
 
- Parameters: set_champion_flag()
 
- Return: void
 
- Function: add_custom_attributes
 
- Description: adds a list of attribute keys from unit_attributes table to the unit.
 
- Parameters: add_custom_attributes(Table attributes)
 
- Return: void
 
- Function: add_custom_recruitment_cost
 
- Description: adds a custom recruitment cost for the unit(it replaces the record cost in the game code. other bonues should apply to it)
 
- Parameters: add_custom_recruitment_cost(CUSTOM_RESOURCE_COST_SCRIPT_INTERFACE cost)
 
- Return: void
 
- Function: add_custom_upkeep_cost
 
- Description: adds a custom upkeep cost for the unit(it replaces the record cost in the game code. other bonues should apply to it)
 
- Parameters: add_custom_recruitment_cost(CUSTOM_RESOURCE_COST_SCRIPT_INTERFACE cost)
 
- Return: void
 
- Function: add_name_prefix
 
- Description: adds a localised name prefix for the unit. key from campaign_localised_strings
 
- Parameters: add_name_prefix(String prefix_key)
 
- Return: void
 
- Function: add_custom_officer_vmd
 
- Description: adds a custom officer vmd to the unit. key from land_unit_officers table
 
- Parameters: add_custom_officer_vmd(String officer_key)
 
- Return: void
 
- Function: add_custom_id
 
- Description: sets the custom id of the custom unit
 
- Parameters: add_custom_id(String id)
 
- Return: void
 
- Function: set_recruitment_manager
 
- Description: sets the source recruitment manager type of the custom unit
 
- Parameters: set_recruitment_manager(String id)
 
- Return: void
 
- Function: add_mercenary_recruit_data
 
- Description: adds mercenary recruit data for the unit.
 
- Parameters: add_mercenary_recruit_data(card32 unit_amount, float32 replenishment_chance_percentage, int32 max_units, float32 max_units_replenished_per_turn, card32 xp_level, String faction_restricted_record_key, String subculture_restricted_record_key, String tech_restricted_record_key)
 
- Return: void
 
- Function: base_unit_tier
 
- Description: returns the tier defined for the unit in the base db record
 
- Parameters: base_unit_tier()
 
- Return: int
 
- Function: set_gifted_by_faction_cqi
 
- Description: Specify if a faction gifted this unit
 
- Parameters: set_gifted_by_faction_cqi(card32)
 
- Return: void
 
- Function: set_can_be_recruited_in_foreign_territory
 
- Description: Specify if the unit can be recruited in foreign territory. Be default this is true for mercenary units.
 
- Parameters: set_can_be_recruited_in_foreign_territory(set)
 
- Return: void
 
- Description: Debug Drawing Script Interface
 
- is_null_interface
 
- draw_line
 
- draw_sphere
 
- draw_aabb
 
- draw_text
 
- draw_text_screen_space
 
- set_colour
 
- set_begin
 
- set_end
 
- set_depth_test
 
- set_draw_duration
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: draw_line
 
- Description: Draws a debug line to the screen from begin to end using the current drawing colour
 
- Parameters: draw_line()
 
- Return: NONE
 
- Function: draw_sphere
 
- Description: Draws a debug sphere to the screen at begin using the current drawing colour
 
- Parameters: draw_sphere(float32 radius)
 
- Return: NONE
 
- Function: draw_aabb
 
- Description: Draws a debug AABB (Axis Aligned Bounding Box) to the screen between begin and end using the current drawing colour
 
- Parameters: draw_aabb()
 
- Return: NONE
 
- Function: draw_text
 
- Description: Draws debug text to the screen at begin using the current drawing colour
 
- Parameters: draw_text(String text)
 
- Return: NONE
 
- Function: draw_text_screen_space
 
- Description: Draws debug text to the screen at specified screen position, using the current drawing colour
 
- Parameters: draw_text_screen_space(String text, card32 pixel_x, card32 pixel_y)
 
- Return: NONE
 
- Function: set_colour
 
- Description: Set the current drawing colour
 
- Parameters: set_colour(card8 red, card8 green, card8 blue, card8 alpha)
 
- Return: NONE
 
- Function: set_begin
 
- Description: Set the begin position
 
- Parameters: set_begin(float32 x, float32 y, float32 z)
 
- Return: NONE
 
- Function: set_end
 
- Description: Set the end position
 
- Parameters: set_end(float32 x, float32 y, float32 z)
 
- Return: NONE
 
- Function: set_depth_test
 
- Description: Set whether drawing is depth tested (can be overlapped by game objects)
 
- Parameters: set_depth_test(bool depth_test)
 
- Return: NONE
 
- Function: set_draw_duration
 
- Description: Set the time for any debug drawing items to remain on screen. Time is in seconds
 
- Parameters: set_draw_duration(float32 duration_in_seconds)
 
- Return: NONE
 
- Description: A list of effects
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: An effect bundle, which provides multiple effects to a target game object
 
- is_null_interface
 
- key
 
- effects
 
- duration
 
- clone_and_create_custom_effect_bundle
 
- icon_path
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: key
 
- Description: Record key for this effect bundle
 
- Parameters: key()
 
- Return: String
 
- Function: effects
 
- Description: The effects provided by this effect bundle
 
- Parameters: effects()
 
- Return: EFFECT_LIST_SCRIPT_INTERFACE
 
- Function: duration
 
- Description: Record key for this effect bundle
 
- Parameters: key()
 
- Return: String
 
- Function: clone_and_create_custom_effect_bundle
 
- Description: Copies the effect bundle into a new custom effect bundle interface. A new state is created when called and destroyed when the interface is dropped in lua
 
- Parameters: clone_and_create_custom_effect_bundle(MODEL_SCRIPT_INTERFACE model)
 
- Return: CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Function: icon_path
 
- Description: Icon path for this effect bundle
 
- Parameters: icon_path()
 
- Return: String
 
- Description: A list of effects
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: EFFECT_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: An effect that provides bonus values via a scope
 
- is_null_interface
 
- key
 
- scope
 
- value
 
- bonus_values
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: key
 
- Description: Returns the record key for this effect
 
- Parameters: key()
 
- Return: String
 
- Function: scope
 
- Description: Record key for the scope of this effect
 
- Parameters: scope()
 
- Return: String
 
- Function: value
 
- Description: The value provided to bonus values from this effect
 
- Parameters: value()
 
- Return: float
 
- Function: bonus_values
 
- Description: The bonus values script interface from this effect
 
- Parameters: bonus_values()
 
- Return: BONUS_VALUES_SCRIPT_INTERFACE
 
- Description: A list of faction interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Faction Rituals Script Interface
 
- is_null_interface
 
- active_rituals
 
- ritual_status
 
- ritual_status_in_chain
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: active_rituals
 
- Description: all rituals actively being performed by this faction
 
- Parameters: active_rituals()
 
- Return: ACTIVE_RITUAL_LIST
 
- Function: ritual_status
 
- Description: status of the specified ritual for this faction
 
- Parameters: ritual_status(String ritual_record_key)
 
- Return: RITUAL_STATUS
 
- Function: ritual_status_in_chain
 
- Description: status of the specified ritual, in the specified chain, for this faction
 
- Parameters: ritual_status_in_chain(String ritual_record_key, String ritual_chain_record_key)
 
- Return: RITUAL_STATUS
 
- Description: Faction interface
 
- is_null_interface
 
- command_queue_index
 
- num_regions
 
- region_list
 
- foreign_regions_with_owned_ers_list
 
- character_recruitment_pool_list
 
- character_list
 
- military_force_list
 
- model
 
- is_human
 
- name
 
- localised_display_name
 
- is_localised_display_name_static
 
- faction_leader_localised_subname
 
- home_region
 
- faction_leader
 
- faction_heir
 
- has_faction_leader
 
- has_home_region
 
- started_war_this_turn
 
- ended_war_this_turn
 
- ancillary_exists
 
- can_equip_ancillary
 
- ancillary_pool
 
- get_ancillary_from_pool
 
- num_allies
 
- at_war
 
- allied_with
 
- has_trade_agreement_with
 
- has_trade_agreements_only_with
 
- building_exists
 
- military_allies_with
 
- defensive_allies_with
 
- is_vassal_of
 
- is_subject_of
 
- is_ally_vassal_subject_or_client_state_of
 
- get_protector
 
- get_master
 
- get_sovereign
 
- at_war_with
 
- trade_resource_exists
 
- trade_value
 
- trade_value_percent
 
- unused_international_trade_route
 
- trade_route_limit_reached
 
- sea_trade_route_raided
 
- trade_ship_not_in_trade_node
 
- treasury
 
- treasury_percent
 
- losing_money
 
- tax_level
 
- upkeep_expenditure_percent
 
- research_queue_idle
 
- active_research_remaining_turns
 
- active_research_technology
 
- has_technology
 
- turns_to_research_technology
 
- is_technology_available
 
- state_religion
 
- num_generals
 
- culture
 
- subculture
 
- has_food_shortages
 
- imperium_level
 
- is_rebel
 
- is_major
 
- diplomatic_standing_with
 
- diplomatic_attitude_towards
 
- is_excluded_from_cai_diplomacy
 
- factions_non_aggression_pact_with
 
- factions_defensive_alliance_with
 
- factions_military_alliance_with
 
- factions_trading_with
 
- factions_bartering_with
 
- factions_at_war_with
 
- factions_master_of
 
- factions_sovereign_of
 
- factions_met
 
- factions_of_same_culture
 
- factions_of_same_subculture
 
- confederation_in_progress
 
- get_foreign_visible_characters_for_player
 
- get_foreign_visible_regions_for_player
 
- is_quest_battle_faction
 
- holds_entire_province
 
- is_vassal
 
- is_subject
 
- is_dead
 
- total_food
 
- food_production
 
- food_consumption
 
- get_food_factor_value
 
- get_food_factor_base_value
 
- get_food_factor_multiplier
 
- unique_agents
 
- has_effect_bundle
 
- has_rituals
 
- rituals
 
- has_faction_slaves
 
- num_faction_slaves
 
- max_faction_slaves
 
- percentage_faction_slaves
 
- pooled_resources
 
- pooled_resource
 
- pooled_resource_display_name
 
- can_afford_resource_cost
 
- can_afford_resource_cost_object
 
- has_pooled_resource
 
- has_ritual_chain
 
- has_access_to_ritual_category
 
- attitude_tier_for_god
 
- get_climate_suitability
 
- foreign_slot_managers
 
- is_allowed_to_capture_territory
 
- effect_bundles
 
- get_effect_bundle
 
- get_effect_value
 
- srtength
 
- flag_path
 
- average_religion_proportion
 
- foreign_influence_religions
 
- frontend_top_units
 
- attitude_category_with
 
- historical_attitude_category_with
 
- num_provinces
 
- exotic_goods
 
- barter_agreements
 
- attitude_with
 
- province_list
 
- tradeable_regions
 
- mission_is_active
 
- mission_has_succeeded
 
- mission_was_canceled
 
- mission_has_expired
 
- has_pool_entry_for_forename
 
- is_supply_points_feature_available
 
- can_afford_custom_resource_cost
 
- bonus_values
 
- all_available_building_chains
 
- is_pharaoh_game_faction
 
- free_instant_constructions
 
- free_embed_informants
 
- is_garrison_residence_position_visible_to_shroud
 
- is_character_position_visible_to_shroud
 
- is_campaign_feature_available
 
- has_dynasty
 
- dynasty_line_key
 
- is_dynasty_ruler
 
- get_dynasty_heir
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: command_queue_index
 
- Description: Command queue index of the Faction
 
- Parameters: command_queue_index()
 
- Return: int
 
- Function: num_regions
 
- Description: Number of regions this faction owns
 
- Parameters: num_regions()
 
- Return: int
 
- Function: region_list
 
- Description: A list of regions owned by the faction
 
- Parameters: region_list()
 
- Return: REGION_LIST_SCRIPT_INTERFACE
 
- Function: foreign_regions_with_owned_ers_list
 
- Description: A list of foreign regions in which the faction owns an ers
 
- Parameters: foreign_regions_with_owned_ers_list()
 
- Return: REGION_LIST_SCRIPT_INTERFACE
 
- Function: character_recruitment_pool_list
 
- Description: All characters of the specified type in this faction recruitment pool that had been recruited at least once
 
- Parameters: character_recruitment_pool_list(agent_type)
 
- Return: FAMILY_MEMBER_LIST_SCRIPT_INTERFACE
 
- Function: character_list
 
- Description: All characters in this faction
 
- Parameters: character_list()
 
- Return: CHARACTER_LIST_SCRIPT_INTERFACE
 
- Function: military_force_list
 
- Description: All military forces in this faction
 
- Parameters: military_force_list()
 
- Return: MILITARY_FORCE_LIST_SCRIPT_INTERFACE
 
- Function: model
 
- Description: Access to the campaign model interface
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: is_human
 
- Description: Is this a human faction?
 
- Parameters: is_human()
 
- Return: bool
 
- Function: name
 
- Description: The faction's name
 
- Parameters: name()
 
- Return: string
 
- Function: localised_display_name
 
- Description: Localised display name
 
- Parameters: localised_display_name()
 
- Return: UniString
 
- Function: is_localised_display_name_static
 
- Description: Returns true if the onscreen name of the faction is static. Returns false if the onscreen name is hereditary (faction leader's name)
 
- Parameters: is_localised_display_name_static()
 
- Return: boolean
 
- Function: faction_leader_localised_subname
 
- Description: Returns the subname of the faction leader depending of the faction name type: Overlord / Ruler of  / Descendant of 
 
- Parameters: faction_leader_localised_subname()
 
- Return: UniString
 
- Function: home_region
 
- Description: Faction's home region
 
- Parameters: home_region()
 
- Return: REGION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the faction has no home region)
 
- Function: faction_leader
 
- Description: The character that leads the faction
 
- Parameters: faction_leader()
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the faction has no faction leader
 
- Function: faction_heir
 
- Description: Returns faction's heir
 
- Parameters: faction_heir()
 
- Return: CHARACTER_DETAILS_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the faction has no heir)
 
- Function: has_faction_leader
 
- Description: Does the faction have a leader?
 
- Parameters: has_faction_leader()
 
- Return: bool
 
- Function: has_home_region
 
- Description: Does the faction have a home region?
 
- Parameters: has_home_region()
 
- Return: bool
 
- Function: started_war_this_turn
 
- Description: Did a war start between this faction and another faction this turn?
 
- Parameters: started_war_this_turn()
 
- Return: bool
 
- Function: ended_war_this_turn
 
- Description: Was peace declared between this faction and another faction this turn?
 
- Parameters: ended_war_this_turn()
 
- Return: bool
 
- Function: ancillary_exists
 
- Description: Returns whether the named ancillary exists in the faction somewhere
 
- Parameters: ancillary_exists("unkillable_cat")
 
- Return: bool
 
- Function: can_equip_ancillary
 
- Description: Returns whether the named ancillary can be equipped
 
- Parameters: ancillary_exists("unkillable_cat")
 
- Return: bool
 
- Function: ancillary_pool
 
- Description: Returns a list with all ancillaries from the faction ancillary_pool
 
- Parameters: ancillary_pool()
 
- Return: ANCILLARY_LIST_SCRIPT_INTERFACE
 
- Function: get_ancillary_from_pool
 
- Description: Returns the ancillary with this key from the faction ancillary_pool
 
- Parameters: get_ancillary_from_pool(ancillary_key)
 
- Return: ANCILLARY_SCRIPT_INTERFACE
 
- Function: num_allies
 
- Description: Number of factions allied with this faction
 
- Parameters: num_allies()
 
- Return: int
 
- Function: at_war
 
- Description: Is this faction at war? Does not check dead or rebel factions.
 
- Parameters: at_war()
 
- Return: bool
 
- Function: allied_with
 
- Description: Is this faction allied with another faction?
 
- Parameters: allied_with(context:character():faction())
 
- Return: bool
 
- Function: has_trade_agreement_with
 
- Description: Does this faction have a barter agrement with another faction?
 
- Parameters: has_trade_agreement_with(faction_key)
 
- Return: bool
 
- Function: has_trade_agreements_only_with
 
- Description: Does this faction have barter agreement only with the given faction?
 
- Parameters: has_other_trade_agreement_only_with(faction_key)
 
- Return: bool
 
- Function: building_exists
 
- Description: Does a building with a given key exist in the regions of the faction?
 
- Parameters: input a building key, e.g. building_exists("key")
 
- Return: bool
 
- Function: military_allies_with
 
- Description: Does this faction have a military alliance with another faction?
 
- Parameters: military_allies_with(context:character():faction())
 
- Return: bool
 
- Function: defensive_allies_with
 
- Description: Does this faction have a defensive alliance with another faction?
 
- Parameters: defensive_allies_with(context:character():faction())
 
- Return: bool
 
- Function: is_vassal_of
 
- Description: Is this faction a vassal of another faction?
 
- Parameters: is_vassal_of(context:character():faction())
 
- Return: bool
 
- Function: is_subject_of
 
- Description: Is this faction a subject of another faction?
 
- Parameters: is_subject_of(context:character():faction())
 
- Return: bool
 
- Function: is_ally_vassal_subject_or_client_state_of
 
- Description: Is this faction allied, vassal of, subject of or client state of another faction?
 
- Parameters: is_ally_vassal_subject_or_client_state_of(context:character():faction())
 
- Return: bool
 
- Function: get_protector
 
- Description: Get the protector faction if in client state or null_script_interface
 
- Parameters: get_protector()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: get_master
 
- Description: Get the master faction if vassal or null_script_interface
 
- Parameters: get_master()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: get_sovereign
 
- Description: Get the sovereign faction if subject or null_script_interface
 
- Parameters: get_sovereign()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: at_war_with
 
- Description: Is this faction at war with another faction?
 
- Parameters: at_war_with(context:character():faction())
 
- Return: bool
 
- Function: trade_resource_exists
 
- Description: Returns whether the faction has access to the trade resource
 
- Parameters: trade_resource_exists("res_gold")
 
- Return: bool
 
- Function: trade_value
 
- Description: Returns the absolute value of the factions global trade
 
- Parameters: trade_value()
 
- Return: int
 
- Function: trade_value_percent
 
- Description: Returns the percentage value of global trade owned by the faction
 
- Parameters: trade_value_percent()
 
- Return: int
 
- Function: unused_international_trade_route
 
- Description: Could the faction establish a new international trade route?
 
- Parameters: unused_international_trade_route()
 
- Return: bool
 
- Function: trade_route_limit_reached
 
- Description: Has the faction reached its limit of trade routes?
 
- Parameters: trade_route_limit_reached()
 
- Return: bool
 
- Function: sea_trade_route_raided
 
- Description: Was one of this factions sea trade routes has been raided in the last round? DEPRECATED - ALWAYS RETURNS FALSE
 
- Parameters: sea_trade_route_raided()
 
- Return: bool
 
- Function: trade_ship_not_in_trade_node
 
- Description: Does the faction have a trade ship that is not in a trade node
 
- Parameters: trade_ship_not_in_trade_node()
 
- Return: bool
 
- Function: treasury
 
- Description: Returns the factions treasury value
 
- Parameters: treasury()
 
- Return: int
 
- Function: treasury_percent
 
- Description: Returns the characters factions treasury value as a percentage of the sum of all factions treasury values
 
- Parameters: treasury_percent()
 
- Return: int
 
- Function: losing_money
 
- Description: Returns whether or not the factions regular expenditure exceeds their regular income
 
- Parameters: losing_money()
 
- Return: bool
 
- Function: tax_level
 
- Description: Returns the average tax level for the faction
 
- Parameters: tax_level()
 
- Return: int
 
- Function: upkeep_expenditure_percent
 
- Description: Returns the average tax level for the faction
 
- Parameters: upkeep_expenditure_percent()
 
- Return: int
 
- Function: research_queue_idle
 
- Description: Is faction not researching any tech even though they could be
 
- Parameters: research_queue_idle()
 
- Return: bool
 
- Function: active_research_remaining_turns
 
- Description: Return the number of turns needed to complete the active research for the faction (-1 if there is no active research)
 
- Parameters: active_research_remaining_turns()
 
- Return: int32
 
- Function: active_research_technology
 
- Description: Return the technology record key of active research (empty string if there is no active research)
 
- Parameters: active_research_technology()
 
- Return: String
 
- Function: has_technology
 
- Description: Does the characters faction have the specified technology
 
- Parameters: has_technology("beer")
 
- Return: bool
 
- Function: turns_to_research_technology
 
- Description: How many turns would it take to research the specified technology
 
- Parameters: turns_to_research_technology("technology_key")
 
- Return: card32
 
- Function: is_technology_available
 
- Description: Whether the specified technology is available for research
 
- Parameters: is_technology_available("technology_key")
 
- Return: bool
 
- Function: state_religion
 
- Description: Returns the state religion of the faction
 
- Parameters: state_religion()
 
- Return: string
 
- Function: num_generals
 
- Description: How many generals does this faction have?
 
- Parameters: num_generals()
 
- Return: int
 
- Function: culture
 
- Description: Returns the culture for the faction
 
- Parameters: culture()
 
- Return: string
 
- Function: subculture
 
- Description: Returns the subculture for the faction
 
- Parameters: subculture()
 
- Return: string
 
- Function: has_food_shortages
 
- Description: returns true of the faction has food shortages
 
- Parameters: has_food_shortage()
 
- Return: bool
 
- Function: imperium_level
 
- Description: returns the current imperium level
 
- Parameters: imperium_level();
 
- Return: card32
 
- Function: is_rebel
 
- Description: return weather the faction is a rebel faction
 
- Parameters: is_rebel()
 
- Return: bool
 
- Function: is_major
 
- Description: return weather the faction is a major faction
 
- Parameters: is_major()
 
- Return: bool
 
- Function: diplomatic_standing_with
 
- Description: return the factions diplomatic standing with the specified faction
 
- Parameters: diplomatic_standing_with()
 
- Return: int32
 
- Function: diplomatic_attitude_towards
 
- Description: return the factions attitude towards the specified faction
 
- Parameters: diplomatic_attitude_towards()
 
- Return: float
 
- Function: is_excluded_from_cai_diplomacy
 
- Description: return if the faction is excluded from cai diplomacy
 
- Parameters: diplomatic_attitude_towards()
 
- Return: bool
 
- Function: factions_non_aggression_pact_with
 
- Description: return the factions this faction has a non-aggression pact with
 
- Parameters: factions_non_aggression_pact_with()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_defensive_alliance_with
 
- Description: return the factions this faction has a defensive alliance with
 
- Parameters: factions_defensive_alliance_with()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_military_alliance_with
 
- Description: return the factions this faction has a military alliance with
 
- Parameters: factions_military_alliance_with()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_trading_with
 
- Description: return the factions this faction is trading with
 
- Parameters: factions_trading_with()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_bartering_with
 
- Description: return the factions this faction is having a barter with
 
- Parameters: factions_bartering_with()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_at_war_with
 
- Description: return the factions this faction is at war with
 
- Parameters: factions_at_war_with()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_master_of
 
- Description: return the factions this faction is a master of
 
- Parameters: factions_master_of()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_sovereign_of
 
- Description: return the factions this faction is a sovereign of
 
- Parameters: factions_sovereign_of()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_met
 
- Description: return the factions this faction has met
 
- Parameters: factions_met()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_of_same_culture
 
- Description: return the factions with the same culture as this faction
 
- Parameters: factions_of_same_culture()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: factions_of_same_subculture
 
- Description: return the factions with the same subculture as this faction
 
- Parameters: factions_of_same_subculture()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: confederation_in_progress
 
- Description: check if there is a confederation in progress
 
- Parameters: confederation_in_progress
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: get_foreign_visible_characters_for_player
 
- Description: return a list of foreign characters visible to this player faction
 
- Parameters: characters_visible_to_player()
 
- Return: CHARACTER_LIST_SCRIPT_INTERFACE
 
- Function: get_foreign_visible_regions_for_player
 
- Description: return a list of regions whose settlements are visible to this faction, if this faction is player-controlled
 
- Parameters: regions_with_settlements_visible_to_player()
 
- Return: REGIONS_LIST_SCRIPT_INTERFACE
 
- Function: is_quest_battle_faction
 
- Description: is this faction a quest battle faction
 
- Parameters: is_quest_battle_faction()
 
- Return: bool
 
- Function: holds_entire_province
 
- Description: Does this faction hold the entire specified province? Also may include vassals or subjects
 
- Parameters: holds_entire_province(String province, bool include_vassals_or_subjects)
 
- Return: bool
 
- Function: is_vassal
 
- Description: Is this faction a vassal
 
- Parameters: is_vassal()
 
- Return: bool
 
- Function: is_subject
 
- Description: Is this faction a subject
 
- Parameters: is_subject()
 
- Return: bool
 
- Function: is_dead
 
- Description: Returns true if the faction is dead
 
- Parameters: is_dead()
 
- Return: bool
 
- Function: total_food
 
- Description: Returns total amount of food the faction has, taking into account all factors
 
- Parameters: total_food()
 
- Return: int32
 
- Function: food_production
 
- Description: Returns total amount of food the faction is producing, taking into account all factors
 
- Parameters: food_production()
 
- Return: int32
 
- Function: food_consumption
 
- Description: Returns total amount of food the faction is consuming, taking into account all factors
 
- Parameters: food_consumption()
 
- Return: int32
 
- Function: get_food_factor_value
 
- Description: Returns the current production/consumption of the specified food factor
 
- Parameters: get_food_factor_value(string factor_key)
 
- Return: int32
 
- Function: get_food_factor_base_value
 
- Description: Returns the current production/consumption of the specified food factor, without the multiplier
 
- Parameters: get_food_factor_base_value(string factor_key)
 
- Return: int32
 
- Function: get_food_factor_multiplier
 
- Description: Returns the current multiplier of the specified food factor
 
- Parameters: get_food_factor_multiplier(string factor_key)
 
- Return: int32
 
- Function: unique_agents
 
- Description: Returns a list of unique agent details maintained by this faction
 
- Parameters: unique_agents()
 
- Return: UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
 
- Function: has_effect_bundle
 
- Description: Whether this faction has the specified effect bundle currently applied to them
 
- Parameters: has_effect_bundle(string effect_bundle_key)
 
- Return: bool
 
- Function: has_rituals
 
- Description: Wether this faction has access to rituals or not
 
- Parameters: has_rituals()
 
- Return: bool
 
- Function: rituals
 
- Description: Ritual manager interface for this faction
 
- Parameters: rituals()
 
- Return: FACTION_RITUALS
 
- Function: has_faction_slaves
 
- Description: Does this faction support Faction Slaves
 
- Parameters: has_faction_slaves()
 
- Return: bool
 
- Function: num_faction_slaves
 
- Description: Number of slaves in the faction
 
- Parameters: num_faction_slaves()
 
- Return: int
 
- Function: max_faction_slaves
 
- Description: Maximum number of slaves for the faction
 
- Parameters: max_faction_slaves()
 
- Return: int
 
- Function: percentage_faction_slaves
 
- Description: Percentage faction slaves of the maximum
 
- Parameters: percentage_faction_slaves()
 
- Return: float
 
- Function: pooled_resources
 
- Description: All pooled resources owned by this faction
 
- Parameters: pooled_resources()
 
- Return: POOLED_RESOURCE_LIST_SCRIPT_INTERFACE
 
- Function: pooled_resource
 
- Description: Get pooled resource by key. Null if the faction doesn't own the resource
 
- Parameters: pooled_resource(String resource_key)
 
- Return: POOLED_RESOURCE_SCRIPT_INTERFACE
 
- Function: pooled_resource_display_name
 
- Description: Get localised name of the pooled resource.
 
- Parameters: pooled_resource_display_name(String resource_key)
 
- Return: UniString
 
- Function: can_afford_resource_cost
 
- Description: does faction can afford resource cost
 
- Parameters: String resource_cost_key
 
- Return: bool
 
- Function: can_afford_resource_cost_object
 
- Description: does faction can afford resource cost
 
- Parameters: CUSTOM_RESOURCE_COST_SCRIPT_INTERFACE resource_cost_interface
 
- Return: bool
 
- Function: has_pooled_resource
 
- Description: True if faction has the specified pooled resource
 
- Parameters: has_pooled_resource(String resource_key)
 
- Return: bool
 
- Function: has_ritual_chain
 
- Description: True if the faction has ritual chain otherwise false
 
- Parameters: has_ritual_chain(key)
 
- Return: bool
 
- Function: has_access_to_ritual_category
 
- Description: True if the faction has ritual category otherwise false
 
- Parameters: has_access_to_ritual_category(key)
 
- Return: bool
 
- Function: attitude_tier_for_god
 
- Description: Number attitude tier for god by key, false otherwise
 
- Parameters: attitude_tier_for_god(god key)
 
- Return: number
 
- Function: get_climate_suitability
 
- Description: Returns the climate suitability record key for the specified climate
 
- Parameters: get_climate_suitability(climate_key)
 
- Return: String
 
- Function: foreign_slot_managers
 
- Description: Returns a list of all the foreign slot managers held by this faction
 
- Parameters: foreign_slot_managers()
 
- Return: FOREIGN_SLOT_MANAGER_LIST_SCRIPT_INTERFACE
 
- Function: is_allowed_to_capture_territory
 
- Description: Returns whether the faction is allowed to capture territory
 
- Parameters: is_allowed_to_capture_territory()
 
- Return: bool
 
- Function: effect_bundles
 
- Description: Effect bundles active on the faction
 
- Parameters: effect_bundles()
 
- Return: EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE
 
- Function: get_effect_bundle
 
- Description: Effect bundle active on the faction by key
 
- Parameters: get_effect_bundle(key)
 
- Return: EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Function: get_effect_value
 
- Description: Returns the supplied effect's value if the faction has this effect or 0
 
- Parameters: get_effect_value(String effect_key)
 
- Return: float32
 
- Function: srtength
 
- Description: Overall strength of the faction (as shown in diplomacy UI)
 
- Parameters: strength()
 
- Return: int
 
- Function: flag_path
 
- Description: Path to the faction flag icon
 
- Parameters: flag_path()
 
- Return: String
 
- Function: average_religion_proportion
 
- Description: Average religion proportion in the faction for a religion
 
- Parameters: average_religion_proportion()
 
- Return: curent proportion, predicted proportion
 
- Function: foreign_influence_religions
 
- Description: Returns a list of religion keys for the religions that have foreign influence of at least min_influence in any of the provinces of this faction
 
- Parameters: foreign_influence_religions(min_influence)
 
- Return: table
 
- Function: frontend_top_units
 
- Description: Returns a list of unit keys for this faction's top units as defined in the frontend_faction_top_units table
 
- Parameters: frontend_top_units(min_tier)
 
- Return: table
 
- Function: attitude_category_with
 
- Description: Attitude category of the faction with a faction
 
- Parameters: attitude_category_with()
 
- Return: float
 
- Function: historical_attitude_category_with
 
- Description: Last turn attitude category of the faction with a faction
 
- Parameters: historical_attitude_category_with()
 
- Return: float
 
- Function: num_provinces
 
- Description: Owned provinces count
 
- Parameters: num_provinces()
 
- Return: int
 
- Function: exotic_goods
 
- Description: Faction exotic goods info
 
- Parameters: exotic_goods()
 
- Return: table
 
- Function: barter_agreements
 
- Description: Returns all existing barter agreements
 
- Parameters: barter_agreements()
 
- Return: table
 
- Function: attitude_with
 
- Description: Attitude of the faction with a faction
 
- Parameters: attitude_with()
 
- Return: float
 
- Function: province_list
 
- Description: A list of provinces owned by the faction
 
- Parameters: province_list()
 
- Return: PROVINCE_LIST_SCRIPT_INTERFACE
 
- Function: tradeable_regions
 
- Description: A list of regions that can be traded with a specific faction
 
- Parameters: tradeable_regions(faction_cqi)
 
- Return: REGION_LIST_SCRIPT_INTERFACE
 
- Function: mission_is_active
 
- Description: Is a mission with the supplied key active for this faction?
 
- Parameters: mission_is_active(string mission_key)
 
- Return: bool
 
- Function: mission_has_succeeded
 
- Description: Has a mission with the supplied key been completed by this faction?
 
- Parameters: mission_has_succeeded(string mission_key, string custom_id)
 
- Return: bool
 
- Function: mission_was_canceled
 
- Description: Was a mission with the supplied key canceled for this faction?
 
- Parameters: mission_was_canceled(string mission_key, string custom_id)
 
- Return: bool
 
- Function: mission_has_expired
 
- Description: Has a mission with the supplied key expired for this faction?
 
- Parameters: mission_has_expired(string mission_key, string custom_id)
 
- Return: bool
 
- Function: has_pool_entry_for_forename
 
- Description: Does this faction have a recruitment pool entry with the supplied forename?
 
- Parameters: has_pool_entry_for_forename(string agent_type, string forename)
 
- Return: bool
 
- Function: is_supply_points_feature_available
 
- Description: Is supply points feature available to this faction?
 
- Parameters: is_supply_points_feature_available()
 
- Return: bool
 
- Function: can_afford_custom_resource_cost
 
- Description: Can this faction afford the supplied resource cost?
 
- Parameters: can_afford_custom_resource_cost(CUSTOM_RESOURCE_COST_SCRIPT_INTERFACE cost)
 
- Return: bool
 
- Function: bonus_values
 
- Description: Active bonus values of this faction
 
- Parameters: bonus_values()
 
- Return: BONUS_VALUES_SCRIPT_INTERFACE
 
- Function: all_available_building_chains
 
- Description: All building chains the faction has access to
 
- Parameters: all_available_building_chains()
 
- Return: Returns a list of keys of all available building chains
 
- Function: is_pharaoh_game_faction
 
- Description: Is this a faction from Pharaoh?
 
- Parameters: is_pharaoh_game_faction()
 
- Return: bool
 
- Function: free_instant_constructions
 
- Description: Returns number of free instant constructions available to the faction
 
- Parameters: free_instant_constructions()
 
- Return: int32
 
- Function: free_embed_informants
 
- Description: Returns number of free embed informants available to the faction
 
- Parameters: free_embed_informants()
 
- Return: int32
 
- Function: is_garrison_residence_position_visible_to_shroud
 
- Description: Returns if garrison residence position is exposed to the shroud
 
- Parameters: is_garrison_residence_position_visible_to_shroud(GARRISON_RESIDENCE_SCRIPT_INTERFACE)
 
- Return: bool
 
- Function: is_character_position_visible_to_shroud
 
- Description: Returns if character position is exposed to the shroud
 
- Parameters: is_character_position_visible_to_shroud(CHARACTER_SCRIPT_INTERFACE)
 
- Return: bool
 
- Function: is_campaign_feature_available
 
- Description: Returns if the given campaign feature is available for the faction
 
- Parameters: is_campaign_feature_available(string campaign_feature_id)
 
- Return: bool
 
- Function: has_dynasty
 
- Description: Returns whether faction has dynasty
 
- Parameters: has_dynasty()
 
- Return: bool
 
- Function: dynasty_line_key
 
- Description: Returns record key for dynasty line if the faction is part of one
 
- Parameters: dynasty_line_key()
 
- Return: string
 
- Function: is_dynasty_ruler
 
- Description: Returns whether faction is a ruler to the dynasty it's part of
 
- Parameters: is_dynasty_ruler()
 
- Return: bool
 
- Function: get_dynasty_heir
 
- Description: Returns the heir character of the dynasty (or NULL_SCRIPT_INTERFACE if the faction is not part of the dynasty or the dynasty has no heirs)
 
- Parameters: get_dynasty_heir()
 
- Return: bool
 
- Description: A list of family members interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Family interface
 
- is_null_interface
 
- has_father
 
- has_mother
 
- father
 
- mother
 
- has_spouse
 
- spouse
 
- is_divorced
 
- past_spouses_list
 
- turn_of_last_divorce
 
- has_trait
 
- come_of_age
 
- command_queue_index
 
- character
 
- character_details
 
- round_portrait_path
 
- is_alive
 
- is_convalescing
 
- is_in_transit
 
- character_type_key
 
- rank
 
- forename
 
- surname
 
- get_forename
 
- get_surname
 
- all_children_in_marriage
 
- is_in_same_family_as
 
- is_in_faction_leaders_family
 
- faction
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: has_father
 
- Description: returns if this family member has a father
 
- Parameters: has_father()
 
- Return: bool
 
- Function: has_mother
 
- Description: returns if this family member has a mother
 
- Parameters: has_mother()
 
- Return: bool
 
- Function: father
 
- Description: returns if this family members father
 
- Parameters: father()
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Function: mother
 
- Description: returns if this family member has a mother
 
- Parameters: mother()
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Function: has_spouse
 
- Description: returns if this family member has a spouse
 
- Parameters: has_spouse()
 
- Return: bool
 
- Function: spouse
 
- Description: returns this family member's spouse
 
- Parameters: spouse()
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE
 
- Function: is_divorced
 
- Description: returns if this family member has past spouses and is not married at the moment
 
- Parameters: is_divorced()
 
- Return: bool
 
- Function: past_spouses_list
 
- Description: returns a list of all past spouses of this family member
 
- Parameters: past_spouses_list()
 
- Return: FAMILY_MEMBER_LIST_SCRIPT_INTERFACE
 
- Function: turn_of_last_divorce
 
- Description: returns the turn number of the last divorce or 0 if the character never divorced
 
- Parameters: turn_of_last_divorce()
 
- Return: card32
 
- Function: has_trait
 
- Description: return true if the character has the trait
 
- Parameters: has_trait("trait")
 
- Return: bool
 
- Function: come_of_age
 
- Description: return if the character has come of age
 
- Parameters: come_of_age()
 
- Return: bool
 
- Function: command_queue_index
 
- Description: return family member cqi of the character
 
- Parameters: command_queue_index()
 
- Return: card32
 
- Function: character
 
- Description: return character or null_interface
 
- Parameters: character()
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE)
 
- Function: character_details
 
- Description: return persistent character details assosciated with this family member/character
 
- Parameters: character_details()
 
- Return: CHARACTER_DETAILS_SCRIPT_INTERFACE
 
- Function: round_portrait_path
 
- Description: return the path to the round portrait of the character
 
- Parameters: round_portrait_path()
 
- Return: CHARACTER_DETAILS_SCRIPT_INTERFACE
 
- Function: is_alive
 
- Description: is alive or not
 
- Parameters: is_alive()
 
- Return: bool
 
- Function: is_convalescing
 
- Description: is convalescing or not
 
- Parameters: is_convalescing()
 
- Return: bool
 
- Function: is_in_transit
 
- Description: is the family member in transit (between armies or on some other errand)
 
- Parameters: is_in_transit()
 
- Return: bool
 
- Function: character_type_key
 
- Description: get the character type key
 
- Parameters: character_type_key()
 
- Return: string
 
- Function: rank
 
- Description: get the character rank
 
- Parameters: rank()
 
- Return: int32
 
- Function: forename
 
- Description: Does the character have this forename?
 
- Parameters: The forename's db key, e.g. forename("names_name_2147352487")
 
- Return: bool
 
- Function: surname
 
- Description: Does the character have this surname?
 
- Parameters: The forename's db key, e.g. forename("names_name_2147352487")
 
- Return: bool
 
- Function: get_forename
 
- Description: Returns the character forename
 
- Parameters: get_forename()
 
- Return: string
 
- Function: get_surname
 
- Description: Returns the character surname
 
- Parameters: get_surname()
 
- Return: string
 
- Function: all_children_in_marriage
 
- Description: Returns the children of the family member and their spouse if married
 
- Parameters: all_children_in_marriage
 
- Return: FAMILY_MEMBER_LIST_SCRIPT_INTERFACE
 
- Function: is_in_same_family_as
 
- Description: Returns if the two characters are in the same family
 
- Parameters: is_in_same_family_as(FAMILY_MEMBER_LIST_SCRIPT_INTERFACE)
 
- Return: bool
 
- Function: is_in_faction_leaders_family
 
- Description: Returns if the character is part of the ruling family of their faction
 
- Parameters: is_in_faction_leaders_family()
 
- Return: bool
 
- Function: faction
 
- Description: Returns the faction object of this family member
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Description: A list of foreign slot script interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: FOREIGN_SLOT
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: A list of foreign slot manager script interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: FOREIGN_SLOT_MANAGER
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Foreign Slot Manager Script Interface
 
- is_null_interface
 
- faction
 
- region
 
- slots
 
- num_slots
 
- has_upgrade_available
 
- gdp
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: faction
 
- Description: Faction that owns this foreign slot
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: region
 
- Description: Region where this foreign slot manager is located
 
- Parameters: region()
 
- Return: REGION_SCRIPT_INTERFACE
 
- Function: slots
 
- Description: Slots that the manager contains
 
- Parameters: slots()
 
- Return: SLOT_LIST_SCRIPT_INTERFACE
 
- Function: num_slots
 
- Description: Number of slots contained in this manager
 
- Parameters: num_slots()
 
- Return: card32
 
- Function: has_upgrade_available
 
- Description: Wether this slot manager has an upgrade available
 
- Parameters: has_upgrade_available()
 
- Return: bool
 
- Function: gdp
 
- Description: gdp provided by this slot manager
 
- Parameters: has_upgrade_available()
 
- Return: card32
 
- Description: Foreign Slot Script Interface
 
- is_null_interface
 
- slot_manager
 
- has_building
 
- building
 
- type_key
 
- template_key
 
- active
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: slot_manager
 
- Description: Slot manager that contains this slot
 
- Parameters: slot_manager()
 
- Return: FOREIGN_SLOT_MANAGER_SCRIPT_INTERFACE
 
- Function: has_building
 
- Description: Wether this slot contains a building
 
- Parameters: has_building()
 
- Return: bool
 
- Function: building
 
- Description: key of the building in this slot
 
- Parameters: building()
 
- Return: String
 
- Function: type_key
 
- Description: key of the slot type
 
- Parameters: type_key()
 
- Return: String
 
- Function: template_key
 
- Description: key of the slot template
 
- Parameters: template_key()
 
- Return: String
 
- Function: active
 
- Description: is this slot active?
 
- Parameters: active()
 
- Return: bool
 
- Description: Garrison residence interface, a residence that can act as a garrison for military forces. A Settlement is a garrison residence for example.
 
- is_null_interface
 
- command_queue_index
 
- key
 
- has_army
 
- has_navy
 
- has_walls
 
- model
 
- faction
 
- garrison_army
 
- army
 
- navy
 
- region
 
- unit_count
 
- buildings
 
- building_exists
 
- building_chain_exists
 
- is_under_siege
 
- sieging_force
 
- can_assault
 
- can_be_occupied_by_faction
 
- is_settlement
 
- is_slot
 
- settlement_interface
 
- slot_interface
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: command_queue_index
 
- Description: Access the CQI of the garrison
 
- Parameters: command_queue_index()
 
- Return: int
 
- Function: key
 
- Description: Access the key of the garrison
 
- Parameters: key()
 
- Return: int
 
- Function: has_army
 
- Description: Is there a garrisoned army?
 
- Parameters: has_army()
 
- Return: bool
 
- Function: has_navy
 
- Description: Is there a garrisoned navy?
 
- Parameters: has_navy()
 
- Return: bool
 
- Function: has_walls
 
- Description: If the garrison has walls or not
 
- Parameters: has_walls()
 
- Return: bool
 
- Function: model
 
- Description: Access to the campaign model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: faction
 
- Description: The faction that owns the garrison
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: garrison_army
 
- Description: Returns the army in the garrison residence, if it has one
 
- Parameters: garrison_army()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the garrison is empty)
 
- Function: army
 
- Description: Returns the army in the garrison residence, if it has one
 
- Parameters: army()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the garrison is empty)
 
- Function: navy
 
- Description: Returns the army in the garrison residence, if it has one
 
- Parameters: army()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the garrison is empty)
 
- Function: region
 
- Description: The region for the garrison residence
 
- Parameters: region()
 
- Return: REGION_SCRIPT_INTERFACE
 
- Function: unit_count
 
- Description: Number of units in a garrison
 
- Parameters: unit_count()
 
- Return: int >= 0
 
- Function: buildings
 
- Description: Returns a list of buildings in the garrison
 
- Parameters: buildings()
 
- Return: BUILDING_LIST_SCRIPT_INTERFACE
 
- Function: building_exists
 
- Description: Check if there is such building in the garrison
 
- Parameters: building_exists()
 
- Return: boolean
 
- Function: building_chain_exists
 
- Description: Check if there is a building with specified building chain in the garrison
 
- Parameters: building_chain_exists(chain_key)
 
- Return: boolean
 
- Function: is_under_siege
 
- Description: Is the garrison under siege?
 
- Parameters: is_under_siege()
 
- Return: bool
 
- Function: sieging_force
 
- Description: Gets the force that is sieging the garrison
 
- Parameters: sieging_force()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Function: can_assault
 
- Description: Can the attacking army launch a seige
 
- Parameters: can_assault()
 
- Return: bool
 
- Function: can_be_occupied_by_faction
 
- Description: Can the specified faction occupy this residence?
 
- Parameters: can_be_occupied_by_faction(String faction)
 
- Return: bool
 
- Function: is_settlement
 
- Description: Is this garrison a settlement type?
 
- Parameters: is_settlement()
 
- Return: bool
 
- Function: is_slot
 
- Description: Is this garrison a slot type?
 
- Parameters: is_slot()
 
- Return: bool
 
- Function: settlement_interface
 
- Description: If this garrison is a settlement type, returns a settlement interface
 
- Parameters: settlement_interface()
 
- Return: SETTLEMENT_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the garrison is not a settlement)
 
- Function: slot_interface
 
- Description: If this garrison is a slot type, returns a slot interface
 
- Parameters: slot_interface()
 
- Return: SLOT_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the garrison is not a settlement)
 
- Description: A list of god script interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: GOD
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Contains entities that exist in the game god manager. Examples include gods and conflicts between them
 
- is_null_interface
 
- gods
 
- has_conflict
 
- num_conflict_participants
 
- num_conflict_participants_on_left
 
- num_conflict_participants_on_right
 
- conflict_participants
 
- conflict_participants_on_left
 
- conflict_participants_on_right
 
- god_by_key
 
- god_by_resource_key
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: gods
 
- Description: List of gods
 
- Parameters: gods()
 
- Return: GOD_LIST_SCRIPT_INTERFACE
 
- Function: has_conflict
 
- Description: Existence of devine conflict
 
- Parameters: has_conflict()
 
- Return: bool
 
- Function: num_conflict_participants
 
- Description: Number of gods participating in conflict
 
- Parameters: num_conflict_participants()
 
- Return: int
 
- Function: num_conflict_participants_on_left
 
- Description: Number of gods participating on left side of conflict
 
- Parameters: num_conflict_participants_on_left()
 
- Return: int
 
- Function: num_conflict_participants_on_right
 
- Description: Number of gods participating on right side of conflict
 
- Parameters: num_conflict_participants_on_right()
 
- Return: int
 
- Function: conflict_participants
 
- Description: List of gods participationg in conflict
 
- Parameters: conflict_participants()
 
- Return: GOD_LIST_SCRIPT_INTERFACE
 
- Function: conflict_participants_on_left
 
- Description: List of gods participationg on left side of conflict
 
- Parameters: conflict_participants_on_left()
 
- Return: GOD_LIST_SCRIPT_INTERFACE
 
- Function: conflict_participants_on_right
 
- Description: List of gods participationg on right side of conflict
 
- Parameters: conflict_participants_on_right()
 
- Return: GOD_LIST_SCRIPT_INTERFACE
 
- Function: god_by_key
 
- Description: Returns a faction script interface, by key
 
- Parameters: god_by_key("zeus")
 
- Return: GOD_SCRIPT_INTERFACE
 
- Function: god_by_resource_key
 
- Description: Returns a faction script interface, by key
 
- Parameters: god_by_resource_key("")
 
- Return: GOD_SCRIPT_INTERFACE
 
- Description: Contains entities that exist in the game god
 
- is_null_interface
 
- name
 
- resource_key
 
- participate_in_conflict
 
- turns_since_joined_conflict
 
- total_favor
 
- favor_to_faction
 
- conflict_side
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: name
 
- Description: The god's name
 
- Parameters: name()
 
- Return: string
 
- Function: resource_key
 
- Description: Pooled ressource key assigned to god
 
- Parameters: resource_key()
 
- Return: string
 
- Function: participate_in_conflict
 
- Description: is god participating in conflict
 
- Parameters: participate_in_conflict()
 
- Return: bool
 
- Function: turns_since_joined_conflict
 
- Description: turns since god has been joined conflict
 
- Parameters: turns_since_joined_conflict()
 
- Return: int
 
- Function: total_favor
 
- Description: total favor for god (from all factions)
 
- Parameters: total_favor()
 
- Return: int
 
- Function: favor_to_faction
 
- Description: god favor to faction
 
- Parameters: favor_to_faction(faction_key)
 
- Return: int
 
- Function: conflict_side
 
- Description: side of conflict: left, right, neutral
 
- Parameters: conflict_side()
 
- Return: String
 
- Description: A list of military force building interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: MILITARY_FORCE_BUILDING_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Military Force Building script interface
 
- is_null_interface
 
- model
 
- faction
 
- military_force
 
- slot
 
- name
 
- chain
 
- superchain
 
- level
 
- is_max_level_in_chain
 
- possible_building_construction_list
 
- percent_health
 
- effects_list
 
- get_effect_value
 
- is_dismantling
 
- is_repairing
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: model
 
- Description: Access to the campaign model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: faction
 
- Description: Returns the faction that owns the building
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: military_force
 
- Description: The military force the building is in
 
- Parameters: military_force()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Function: slot
 
- Description: The slot containing the building
 
- Parameters: slot()
 
- Return: MILITARY_FORCE_SLOT_SCRIPT_INTERFACE
 
- Function: name
 
- Description: The key for the building (building level record)
 
- Parameters: name()
 
- Return: String
 
- Function: chain
 
- Description: The key for the building chain (building_chain_record key)
 
- Parameters: chain()
 
- Return: String
 
- Function: superchain
 
- Description: The key for the building superchain (building_superchain_record key)
 
- Parameters: superchain()
 
- Return: String
 
- Function: level
 
- Description: The level of the building
 
- Parameters: level()
 
- Return: int32
 
- Function: is_max_level_in_chain
 
- Description: Returns true if the building has the maximum level for its chain
 
- Parameters: is_max_level_in_chain()
 
- Return: bool
 
- Function: possible_building_construction_list
 
- Description: Returns a list of keys of the possible building constructions
 
- Parameters: possible_building_construction_list()
 
- Return: array of strings
 
- Function: percent_health
 
- Description: The health of a building as a percentage between 0-100
 
- Parameters: percent_health()
 
- Return: 100 >= int >= 0
 
- Function: effects_list
 
- Description: The effects applied to this building
 
- Parameters: effects_list()
 
- Return: EFFECT_LIST_SCRIPT_INTERFACE
 
- Function: get_effect_value
 
- Description: gets value of effect or 0 if not found
 
- Parameters: get_effect_value(effect_key)
 
- Return: float32
 
- Function: is_dismantling
 
- Description: returns either building is dismantling or not
 
- Parameters: is_dismantling()
 
- Return: bool
 
- Function: is_repairing
 
- Description: returns whether the building is repairing or not
 
- Parameters: is_repairing()
 
- Return: bool
 
- Description: A list of military forces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Military force interface. Armies and navies are military forces.
 
- is_null_interface
 
- command_queue_index
 
- has_general
 
- is_army
 
- is_navy
 
- model
 
- unit_list
 
- unit_count
 
- unit_count_limit
 
- pending_recruitment_count
 
- character_list
 
- general_character
 
- faction
 
- has_garrison_residence
 
- garrison_residence
 
- contains_mercenaries
 
- upkeep
 
- active_stance
 
- can_activate_stance
 
- morale
 
- is_armed_citizenry
 
- can_recruit_agent_at_force
 
- can_recruit_unit
 
- can_recruit_unit_class
 
- can_recruit_unit_category
 
- strength
 
- force_type
 
- has_effect_bundle
 
- get_effect_bundle
 
- effect_bundles
 
- buildings
 
- slots
 
- bonus_values
 
- get_siege
 
- has_retreated_this_turn
 
- is_able_to_assault_immediately_on_siege_start
 
- will_suffer_any_attrition
 
- get_horde_development_points
 
- is_horde
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: command_queue_index
 
- Description: Command queue index of the Military Force
 
- Parameters: command_queue_index()
 
- Return: int
 
- Function: has_general
 
- Description: Does the military force have a commanding general?
 
- Parameters: has_general()
 
- Return: bool
 
- Function: is_army
 
- Description: Is this military force an army?
 
- Parameters: is_army()
 
- Return: bool
 
- Function: is_navy
 
- Description: Is this military force a navy?
 
- Parameters: is_navy()
 
- Return: bool
 
- Function: model
 
- Description: Access to the campaign model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: unit_list
 
- Description: Returns the list of units in the military force
 
- Parameters: unit_list()
 
- Return: UNIT_LIST_SCRIPT_INTERFACE
 
- Function: unit_count
 
- Description: Returns the number of units in the military force
 
- Parameters: unit_count()
 
- Return: number
 
- Function: unit_count_limit
 
- Description: Returns the maximal number of units in the military force
 
- Parameters: unit_count_limit()
 
- Return: number
 
- Function: pending_recruitment_count
 
- Description: Returns the number of units in the recruitment queue
 
- Parameters: pending_recruitment_count()
 
- Return: number
 
- Function: character_list
 
- Description: A list of characters embedded in the military force
 
- Parameters: character_list()
 
- Return: CHARACTER_LIST_SCRIPT_INTERFACE
 
- Function: general_character
 
- Description: Returns the character interface for the military force general (if one exists)
 
- Parameters: general_character()
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the military force doesn't have a commander)
 
- Function: faction
 
- Description: The faction that the military force belongs to
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: has_garrison_residence
 
- Description: Is the force in a garrison residence?
 
- Parameters: has_garrison_residence()
 
- Return: bool
 
- Function: garrison_residence
 
- Description: Returns the garrison residence the force is embedded in
 
- Parameters: garrison_residence()
 
- Return: GARRISON_RESIDENCE_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the army isn't embedded)
 
- Function: contains_mercenaries
 
- Description: Returns if the force contains mercenaries
 
- Parameters: contains_mercenaries()
 
- Return: bool
 
- Function: upkeep
 
- Description: Returns the upkeep costs for the military force
 
- Parameters: upkeep()
 
- Return: int >= 0
 
- Function: active_stance
 
- Description: Returns the active stance for the military force
 
- Parameters: active_stance()
 
- Return: String
 
- Function: can_activate_stance
 
- Description: Can the military force enter this stance
 
- Parameters: input a stance string to query, can_activate_stance( "stance" )
 
- Return: bool
 
- Function: morale
 
- Description: Get the morale for this army
 
- Parameters: morale()
 
- Return: card32
 
- Function: is_armed_citizenry
 
- Description: returns true if the force is armed citizenry
 
- Parameters: is_armed_citizenry()
 
- Return: bool
 
- Function: can_recruit_agent_at_force
 
- Description: Returns true if you can recruit the specified agent at this force
 
- Parameters: can_recruit_agent_at_force()
 
- Return: bool
 
- Function: can_recruit_unit
 
- Description: Returns true if this force can recruit a unit of this type
 
- Parameters: can_recruit_unit()
 
- Return: bool
 
- Function: can_recruit_unit_class
 
- Description: Returns true if this force can recruit a unit of this class
 
- Parameters: can_recruit_unit_class()
 
- Return: bool
 
- Function: can_recruit_unit_category
 
- Description: Returns true if this force can recruit a unit of this category
 
- Parameters: can_recruit_unit_category()
 
- Return: bool
 
- Function: strength
 
- Description: Returns the strength of the military force
 
- Parameters: strength()
 
- Return: float32
 
- Function: force_type
 
- Description: Returns the key of the military force type
 
- Parameters: force_type()
 
- Return: String
 
- Function: has_effect_bundle
 
- Description: Returns true if the military force has the specified effect bundle active
 
- Parameters: has_effect_bundle(String bundle_key)
 
- Return: bool
 
- Function: get_effect_bundle
 
- Description: Get the force's specified effect bundle.
 
- Parameters: get_effect_bundle(key)
 
- Return: EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Function: effect_bundles
 
- Description: Effect bundles currently active on the military force
 
- Parameters: effect_bundles()
 
- Return: EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE
 
- Function: buildings
 
- Description: Returns a list of buildings in the military force
 
- Parameters: buildings()
 
- Return: MILITARY_FORCE_BUILDING_LIST_SCRIPT_INTERFACE
 
- Function: slots
 
- Description: Returns a list of building slots in the military force
 
- Parameters: slots()
 
- Return: MILITARY_FORCE_SLOT_LIST_SCRIPT_INTERFACE
 
- Function: bonus_values
 
- Description: Active bonus values of this military force
 
- Parameters: bonus_values()
 
- Return: BONUS_VALUES_SCRIPT_INTERFACE
 
- Function: get_siege
 
- Description: Returns the siege object or null interface
 
- Parameters: get_siege()
 
- Return: SIEGE_SCRIPT_INTERFACE
 
- Function: has_retreated_this_turn
 
- Description: Has this military force already retreated this turn
 
- Parameters: has_retreated_this_turn()
 
- Return: bool
 
- Function: is_able_to_assault_immediately_on_siege_start
 
- Description: Returns true if the force can assault immediately on siege start
 
- Parameters: is_able_to_assault_immediately_on_siege_start()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Function: will_suffer_any_attrition
 
- Description: Returns true if the force will suffer attrition at its current logical position
 
- Parameters: will_suffer_any_attrition()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Function: get_horde_development_points
 
- Description: Returns the development points for this military force which should be of type "HORDE".
 
- Parameters: get_horde_development_points()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Function: is_horde
 
- Description: Returns true if the military force is a horde.
 
- Parameters: is_horde()
 
- Return: bool
 
- Description: A list of slot interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- slot_type_exists
 
- buliding_type_exists
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: MILITARY_FORCE_SLOT_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Function: slot_type_exists
 
- Description: Does a slot with this key exist in the list?
 
- Parameters: input a slot key to query, slot_type_exists( "slot_key" )
 
- Return: bool
 
- Function: buliding_type_exists
 
- Description: Does a building with this key exist in the list? (building_level_record key)
 
- Parameters: input a slot key to query, buliding_type_exists( "building_level_record_key" )
 
- Return: bool
 
- Description: Slot script interface
 
- is_null_interface
 
- has_building
 
- model
 
- region
 
- building
 
- faction
 
- type
 
- name
 
- template_key
 
- resource_key
 
- is_there_construction
 
- construction_building_chain_key
 
- construction_building_level_record_level
 
- construction_building_time_to_completion
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: has_building
 
- Description: Is there a building in this slot?
 
- Parameters: has_building()
 
- Return: bool
 
- Function: model
 
- Description: Access to the campaign model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: region
 
- Description: The military force for this slot
 
- Parameters: military_force()
 
- Return: REGION_SCRIPT_INTERFACE
 
- Function: building
 
- Description: Returns the building in this slot (if it exists)
 
- Parameters: building()
 
- Return: MILITARY_FORCE_BUILDING_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the slot does not have a building)
 
- Function: faction
 
- Description: Returns the faction that owns the slot
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: type
 
- Description: The slot type
 
- Parameters: type()
 
- Return: string
 
- Function: name
 
- Description: The slot name
 
- Parameters: name()
 
- Return: string
 
- Function: template_key
 
- Description: The slot template record key
 
- Parameters: template_key()
 
- Return: string
 
- Function: resource_key
 
- Description: The slot reource key (empty if none)
 
- Parameters: resource_key()
 
- Return: string
 
- Function: is_there_construction
 
- Description: Is there construction in this slot going on? In other words, is there a building currently being built in this slot but hasn't completed construction yet?
 
- Parameters: is_there_construction()
 
- Return: bool
 
- Function: construction_building_chain_key
 
- Description: Returns the building_chain key for the construction item
 
- Parameters: construction_building_chain_key()
 
- Return: string
 
- Function: construction_building_level_record_level
 
- Description: Returns the building level of the construction item
 
- Parameters: construction_building_level_record_level()
 
- Return: int
 
- Function: construction_building_time_to_completion
 
- Description: Returns the time to completion in turns for the construction item
 
- Parameters: construction_building_time_to_completion()
 
- Return: int
 
- Description: Model is the central access point of the campaign. Everything should be reachable from this interface
 
- is_null_interface
 
- world
 
- pending_battle
 
- date_in_range
 
- date_and_week_in_range
 
- current_historical_year
 
- turn_number
 
- rounds_per_year
 
- unit_scale_ratio
 
- campaign_name
 
- campaign_name_key
 
- random_percent
 
- random_int
 
- random_float
 
- is_multiplayer
 
- campaign_type_string
 
- are_factions_coop_allies
 
- is_player_turn
 
- character_can_reach_character
 
- character_can_reach_settlement
 
- difficulty_level
 
- combined_difficulty_level
 
- faction_is_local
 
- player_steam_id_is_even
 
- campaign_ai
 
- campaign_type
 
- get_campaign_variable_by_name
 
- character_for_command_queue_index
 
- lookup_character
 
- family_member_for_command_queue_index
 
- military_force_for_command_queue_index
 
- faction_for_command_queue_index
 
- unit_for_command_queue_index
 
- region_for_command_queue_index
 
- garrison_residence_for_command_queue_index
 
- settlement_for_command_queue_index
 
- region_slot_for_command_queue_index
 
- has_character_command_queue_index
 
- has_family_member_command_queue_index
 
- has_military_force_command_queue_index
 
- has_faction_command_queue_index
 
- has_region_command_queue_index
 
- has_garrison_residence_command_queue_index
 
- shared_states_manager
 
- has_unit_command_queue_index
 
- get_ancillary_icon_from_record
 
- get_ancillary_onscreen_name_from_record
 
- get_unit_keys_in_unit_set
 
- filter_units_by_tier
 
- get_unit_record_info
 
- current_season_name
 
- current_season_key
 
- get_economy_resource_keys
 
- is_start_turn_autosave_pending
 
- logical_position_for_display_position
 
- display_position_for_logical_position
 
- debug_drawing
 
- has_pending_action
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: world
 
- Description: Access campaign world interface
 
- Parameters: world()
 
- Return: WORLD_SCRIPT_INTERFACE
 
- Function: pending_battle
 
- Description: Access campaign pending battle interface
 
- Parameters: pending_battle()
 
- Return: PENDING_BATTLE_SCRIPT_INTERFACE
 
- Function: date_in_range
 
- Description: Test to see if the current calendar year is within the years specified.  start <= current <= end
 
- Parameters: Start Year, End Year (Inclusive) e.g. date_in_range(1066, 2001)
 
- Return: bool
 
- Function: date_and_week_in_range
 
- Description: Test to see if the current calendar year and week in year is within the years and weeks specified.  Week should be 0 <= week < 48.  start <= current <= end
 
- Parameters: Start Week, Start Year, End Week, End Year (Inclusive) e.g. date_and_week_in_range(0, 1066, 47, 2001)
 
- Return: bool
 
- Function: current_historical_year
 
- Description: Returns the number representing current historical year, negative numbers represent BC, positive AD
 
- Parameters: current_historical_year()
 
- Return: int
 
- Function: turn_number
 
- Description: Returns the number of the turn currently being taken, starting at 1
 
- Parameters: turn_number()
 
- Return: int
 
- Function: rounds_per_year
 
- Description: Returns the number of rounds per year
 
- Parameters: rounds_per_year()
 
- Return: int
 
- Function: unit_scale_ratio
 
- Description: Returns the unit scale ration in this campaign
 
- Parameters: unit_scale_ratio()
 
- Return: float32
 
- Function: campaign_name
 
- Description: Returns whether or not the current campaign name matches the supplied parameter
 
- Parameters: Name of the campaign to compare against, from the campaigns table, e.g. campaign_name('jap_shogun')
 
- Return: bool
 
- Function: campaign_name_key
 
- Description: Returns the key of the currenty campaign
 
- Parameters: campaign_name_key()
 
- Return: String
 
- Function: random_percent
 
- Description: Returns true parameter-value-percent of the time
 
- Parameters: Number between 0 and 100 to test against e.g. random_percent(50)
 
- Return: bool
 
- Function: random_int
 
- Description: Returns a random integer number
 
- Parameters: Minimum and maximum numbers, e.g. random_int(1, 100)
 
- Return: int
 
- Function: random_float
 
- Description: Returns a random float number
 
- Parameters: Minimum and maximum numbers, e.g. random_float(1, 100)
 
- Return: float
 
- Function: is_multiplayer
 
- Description: Returns true when in multiplayer campaign
 
- Parameters: is_multiplayer()
 
- Return: bool
 
- Function: campaign_type_string
 
- Description: Returns campaign type string of current campaign
 
- Parameters: campaign_type()
 
- Return: string
 
- Function: are_factions_coop_allies
 
- Description: Returns true if the given factions are coop allies
 
- Parameters: are_factions_coop_allies(faction1_key, faction2_key)
 
- Return: bool
 
- Function: is_player_turn
 
- Description: Is this the players turn?
 
- Parameters: is_player_turn()
 
- Return: bool
 
- Function: character_can_reach_character
 
- Description: Can a character reach another character this turn?
 
- Parameters: Two characters e.g. character_can_reach_character(context:character(), context:target_character())
 
- Return: bool
 
- Function: character_can_reach_settlement
 
- Description: Can a character reach a settlement this turn?
 
- Parameters: character_can_reach_settlement(character, settlement)
 
- Return: bool
 
- Function: difficulty_level
 
- Description: What is the local faction's difficulty level?
 
- Parameters: difficulty_level()
 
- Return: int
 
- Function: combined_difficulty_level
 
- Description: What is the combined difficulty level of all player factions?
 
- Parameters: combined_difficulty_level()
 
- Return: int
 
- Function: faction_is_local
 
- Description: Is the provided faction the local faction?
 
- Parameters: faction_is_local("rom_rome")
 
- Return: bool
 
- Function: player_steam_id_is_even
 
- Description: Does the player have an even steam id
 
- Parameters: player_steam_id_is_even()
 
- Return: bool
 
- Function: campaign_ai
 
- Description: Access campaign AI script interface
 
- Parameters: campaign_ai()
 
- Return: CAMPAIGN_AI_SCRIPT_INTERFACE
 
- Function: campaign_type
 
- Description: Returns the type of the campaign
 
- Parameters: campaign_type()
 
- Return: card32
 
- Function: get_campaign_variable_by_name
 
- Description: Returns a campaign variable for name
 
- Parameters: A string that is the key of the variable
 
- Return: float32 that is the value of the variable
 
- Function: character_for_command_queue_index
 
- Description: Returns a CHARACTER_SCRIPT_INTERFACE for the cqi
 
- Parameters: An integer CQI > 0, character_for_command_queue_index(CQI)
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the cqi doesn't exist)
 
- Function: lookup_character
 
- Description: Returns a CHARACTER_SCRIPT_INTERFACE for the character lookup
 
- Parameters: String
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE)
 
- Function: family_member_for_command_queue_index
 
- Description: Returns a FAMILY_MEMBER_SCRIPT_INTERFACE for the cqi
 
- Parameters: An integer CQI > 0, family_member_for_command_queue_index(CQI)
 
- Return: FAMILY_MEMBER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the cqi doesn't exist)
 
- Function: military_force_for_command_queue_index
 
- Description: Returns a MILITARY_FORCE_SCRIPT_INTERFACE for the cqi
 
- Parameters: An integer CQI > 0, military_force_for_command_queue_index(CQI)
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the cqi doesn't exist)
 
- Function: faction_for_command_queue_index
 
- Description: Returns a FACTION_SCRIPT_INTERFACE for the cqi
 
- Parameters: An integer CQI > 0, faction_for_command_queue_index(CQI)
 
- Return: FACTION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the cqi doesn't exist)
 
- Function: unit_for_command_queue_index
 
- Description: Returns a UNIT_SCRIPT_INTERFACE for the cqi
 
- Parameters: An integer CQI > 0, unit_for_command_queue_index(CQI)
 
- Return: UNIT_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the cqi doesn't exist)
 
- Function: region_for_command_queue_index
 
- Description: Returns a REGION_SCRIPT_INTERFACE for the cqi
 
- Parameters: An integer CQI > 0, region_for_command_queue_index(CQI)
 
- Return: REGION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the cqi doesn't exist)
 
- Function: garrison_residence_for_command_queue_index
 
- Description: Returns a GARRISON_RESIDENCE_SCRIPT_INTERFACE for the cqi
 
- Parameters: An integer CQI > 0, region_for_command_queue_index(CQI)
 
- Return: REGION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the cqi doesn't exist)
 
- Function: settlement_for_command_queue_index
 
- Description: Returns a SETTLEMENT_SCRIPT_INTERFACE for the cqi
 
- Parameters: An integer CQI > 0, settlement_for_command_queue_index(CQI)
 
- Return: SETTLEMENT_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the cqi doesn't exist)
 
- Function: region_slot_for_command_queue_index
 
- Description: Returns a SLOT_SCRIPT_INTERFACE for the cqi
 
- Parameters: An integer CQI > 0, region_slot_for_command_queue_index(CQI)
 
- Return: SLOT_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the cqi doesn't exist)
 
- Function: has_character_command_queue_index
 
- Description: Returns true if the cqi exists
 
- Parameters: An integer CQI > 0, has_character_command_queue_index(CQI)
 
- Return: bool
 
- Function: has_family_member_command_queue_index
 
- Description: Returns true if the cqi exists
 
- Parameters: An integer CQI > 0, has_family_member_command_queue_index(CQI)
 
- Return: bool
 
- Function: has_military_force_command_queue_index
 
- Description: Returns true if the cqi exists
 
- Parameters: An integer CQI > 0, has_military_force_command_queue_index(CQI)
 
- Return: bool
 
- Function: has_faction_command_queue_index
 
- Description: Returns true if the cqi exists
 
- Parameters: An integer CQI > 0, has_faction_command_queue_index(CQI)
 
- Return: bool
 
- Function: has_region_command_queue_index
 
- Description: Returns true if the cqi exists
 
- Parameters: An integer CQI > 0, has_region_command_queue_index(CQI)
 
- Return: bool
 
- Function: has_garrison_residence_command_queue_index
 
- Description: Returns true if the cqi exists
 
- Parameters: An integer CQI > 0, has_region_command_queue_index(CQI)
 
- Return: bool
 
- Function: shared_states_manager
 
- Description: Returns shared states manager interface
 
- Parameters: shared_states_manager()
 
- Return: SHARED_STATES_MANAGER_SCRIPT_INTERFACE
 
- Function: has_unit_command_queue_index
 
- Description: Returns true if the cqi exists
 
- Parameters: An integer CQI > 0, has_unit_command_queue_index(CQI)
 
- Return: bool
 
- Function: get_ancillary_icon_from_record
 
- Description: Returns the ancillary record icon path
 
- Parameters: get_ancillary_icon_from_record(ancillary_key)
 
- Return: String
 
- Function: get_ancillary_onscreen_name_from_record
 
- Description: Returns the ancillary record onscreen name
 
- Parameters: get_ancillary_onscreen_name_from_record(ancillary_key)
 
- Return: String
 
- Function: get_unit_keys_in_unit_set
 
- Description: Returns an indexed list of keys of all units in the unit set with the supplied key
 
- Parameters: get_unit_keys_in_unit_set(unit_set_key)
 
- Return: table
 
- Function: filter_units_by_tier
 
- Description: Returns the supplied unit-key list with units not among the supplied tiers removed from the list
 
- Parameters: filter_units_by_tier(unit_keys_list, tiers_list)
 
- Return: table
 
- Function: get_unit_record_info
 
- Description: Returns a table with unit info for the provided unit_key (empty table if unit is not found). The keys for the table are: custom_battle_cost, supply_points
 
- Parameters: A unit key
 
- Return: Lua table
 
- Function: current_season_name
 
- Description: Returns the current season's name, taken from the seasons table
 
- Parameters: current_season_name()
 
- Return: String
 
- Function: current_season_key
 
- Description: Returns the current season's database key, taken from the seasons table
 
- Parameters: current_season_key()
 
- Return: String
 
- Function: get_economy_resource_keys
 
- Description: Returns the names of all MRS resources
 
- Parameters: get_economy_resource_keys()
 
- Return: String
 
- Function: is_start_turn_autosave_pending
 
- Description: If the system save used for the 'undo' is pending
 
- Parameters: is_start_turn_autosave_pending()
 
- Return: bool
 
- Function: logical_position_for_display_position
 
- Description: Returns the logical (hex grid) position for a display position (world space).
 
- Parameters: logical_position_for_display_position(float32 display_pos_x, float32 display_pos_z)
 
- Return: (card16 X, card16 Y)
 
- Function: display_position_for_logical_position
 
- Description: Returns the display position( World Space X, Z) for a logical position (hex grid). Will return 0,0 if invalid
 
- Parameters: display_position_for_logical_position(card16 logical_pos_x, card16 logical_pos_y)
 
- Return: (float32 X, float32 Z)
 
- Function: debug_drawing
 
- Description: Debug Drawing Interface. NOT AVAILABLE IN RETAIL
 
- Parameters: debug_drawing()
 
- Return: DEBUG_DRAWING_SCRIPT_INTERFACE
 
- Function: has_pending_action
 
- Description: Returns whether or not an action is pending
 
- Parameters: has_pending_action()
 
- Return: bool
 
- Description: An empty interface, returned if a requested interface doesn't exist. If function calls are made with this interface, the LUA script will fail
 
- is_null_interface
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Description: Pending battle script interface.
 
- is_null_interface
 
- has_attacker
 
- has_defender
 
- has_contested_garrison
 
- has_region
 
- has_sea_region
 
- logical_position_x
 
- logical_position_y
 
- model
 
- attacker_faction
 
- attacker
 
- secondary_attackers
 
- defender_faction
 
- defender
 
- secondary_defenders
 
- contested_garrison
 
- region
 
- sea_region
 
- is_active
 
- conflict_completed
 
- attacker_is_stronger
 
- attack_side_losses
 
- defense_side_losses
 
- percentage_of_attacker_killed
 
- percentage_of_defender_killed
 
- percentage_of_attacker_routed
 
- percentage_of_defender_routed
 
- attacker_commander_fought_in_battle
 
- defender_commander_fought_in_battle
 
- attacker_commander_fought_in_melee
 
- defender_commander_fought_in_melee
 
- attacker_won
 
- defender_won
 
- is_draw
 
- attacker_battle_result
 
- defender_battle_result
 
- naval_battle
 
- siege_battle
 
- seige_battle
 
- is_minor_settlement_battle
 
- is_major_settlement_battle
 
- river_battle
 
- mountain_chokepoint
 
- ambush_battle
 
- failed_ambush_battle
 
- night_battle
 
- is_quest_battle
 
- battle_type
 
- battle_name
 
- battle_record_key
 
- loading_screen_title_override
 
- battle_region_key
 
- attacker_strength
 
- defender_strength
 
- has_been_fought
 
- set_piece_battle_key
 
- battle_results
 
- challenge_battle
 
- bribed_units_eminence_cost_for_faction
 
- region_data
 
- logical_position
 
- display_position
 
- autoresolve_selected
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: has_attacker
 
- Description: Does the pending battle have an attacking character?
 
- Parameters: has_attacker()
 
- Return: bool
 
- Function: has_defender
 
- Description: Does the pending battle have a defending character?
 
- Parameters: has_defender()
 
- Return: bool
 
- Function: has_contested_garrison
 
- Description: Is the pending battle at a garrison?
 
- Parameters: has_contested_garrison()
 
- Return: bool
 
- Function: has_region
 
- Description: Is the pending battle in a land region?
 
- Parameters: has_region()
 
- Return: bool
 
- Function: has_sea_region
 
- Description: Is the pending battle in a sea region?
 
- Parameters: has_sea_region()
 
- Return: bool
 
- Function: logical_position_x
 
- Description: Logical position on map, x coord
 
- Parameters: logical_position_x()
 
- Return: int
 
- Function: logical_position_y
 
- Description: Logical position on map, y coord
 
- Parameters: logical_position_y()
 
- Return: int
 
- Function: model
 
- Description: Access to the campaign model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: attacker_faction
 
- Description: Returns the attacking faction, if one exists
 
- Parameters: attacker_faction()
 
- Return: FACTION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if no attacking faction exists)
 
- Function: attacker
 
- Description: Returns the attacking character, if one exists
 
- Parameters: attacker()
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if no attacking character exists)
 
- Function: secondary_attackers
 
- Description: Returns the list of secondary attacking characters
 
- Parameters: secondary_attackers()
 
- Return: CHARACTER_LIST_SCRIPT_INTERFACE
 
- Function: defender_faction
 
- Description: Returns the defending faction, if one exists
 
- Parameters: defender_faction()
 
- Return: FACTION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if no defending faction exists)
 
- Function: defender
 
- Description: Returns the defending character, if one exists
 
- Parameters: defender()
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if no defending character exists)
 
- Function: secondary_defenders
 
- Description: Returns the list of secondary defending characters
 
- Parameters: secondary_defenders()
 
- Return: CHARACTER_LIST_SCRIPT_INTERFACE
 
- Function: contested_garrison
 
- Description: Returns the contested residence, if it exists
 
- Parameters: contested_garrison()
 
- Return: GARRISON_RESIDENCE_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if a garrison isn't being contested)
 
- Function: region
 
- Description: Returns the region the battle takes place in, if any.
 
- Parameters: region()
 
- Return: REGION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if a the battle is not in a land region)
 
- Function: sea_region
 
- Description: Returns the sea region the battle takes place in, if any.
 
- Parameters: sea_region()
 
- Return: SEA_REGION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if a the battle is not in a sea region)
 
- Function: is_active
 
- Description: Is a pending battle active?
 
- Parameters: is_active()
 
- Return: bool
 
- Function: conflict_completed
 
- Description: Battle has been fought or autoresolved, pending application of results
 
- Parameters: conflict_completed()
 
- Return: bool
 
- Function: attacker_is_stronger
 
- Description: Is the attacking force stronger than the defender?
 
- Parameters: attacker_is_stronger()
 
- Return: bool
 
- Function: attack_side_losses
 
- Description: Total lost units of attacking side
 
- Parameters: attack_side_losses()
 
- Return: int32
 
- Function: defense_side_losses
 
- Description: Total lost units of defense side
 
- Parameters: defense_side_losses()
 
- Return: int32
 
- Function: percentage_of_attacker_killed
 
- Description: Percentage of attacker killed in battle
 
- Parameters: percentage_of_attacker_killed()
 
- Return: 100 >= float >= 0
 
- Function: percentage_of_defender_killed
 
- Description: Percentage of defender killed in battle
 
- Parameters: percentage_of_defender_killed()
 
- Return: 100 >= float >= 0
 
- Function: percentage_of_attacker_routed
 
- Description: Percentage of attackers routed in battle
 
- Parameters: percentage_of_attacker_routed()
 
- Return: 100 >= float >= 0
 
- Function: percentage_of_defender_routed
 
- Description: Percentage of defenders routed in battle
 
- Parameters: percentage_of_defender_routed()
 
- Return: 100 >= float >= 0
 
- Function: attacker_commander_fought_in_battle
 
- Description: Did the commander engage in the battle?
 
- Parameters: attacker_commander_fought_in_battle()
 
- Return: bool
 
- Function: defender_commander_fought_in_battle
 
- Description: Did the commander engage in the battle?
 
- Parameters: defender_commander_fought_in_battle()
 
- Return: bool
 
- Function: attacker_commander_fought_in_melee
 
- Description: Did the commander engage in melee?
 
- Parameters: attacker_commander_fought_in_melee()
 
- Return: bool
 
- Function: defender_commander_fought_in_melee
 
- Description: Did the commander engage in melee?
 
- Parameters: defender_commander_fought_in_melee()
 
- Return: bool
 
- Function: attacker_won
 
- Description: Has the attacker won the battle
 
- Parameters: attacker_won()
 
- Return: bool
 
- Function: defender_won
 
- Description: Has the defender won the battle
 
- Parameters: defender_won()
 
- Return: bool
 
- Function: is_draw
 
- Description: Has the battle resulted in a draw
 
- Parameters: is_draw()
 
- Return: bool
 
- Function: attacker_battle_result
 
- Description: The battle result for the attacker
 
- Parameters: attacker_battle_result()
 
- Return: String (close_victory, decisive_victory, heroic_victory, pyrrhic_victory, close_defeat, decisive_defeat, crushing_defeat, valiant_defeat
 
- Function: defender_battle_result
 
- Description: The battle result for the defender
 
- Parameters: defender_battle_result()
 
- Return: String (close_victory, decisive_victory, heroic_victory, pyrrhic_victory, close_defeat, decisive_defeat, crushing_defeat, valiant_defeat
 
- Function: naval_battle
 
- Description: The battle is a naval battle
 
- Parameters: naval_battle()
 
- Return: bool
 
- Function: siege_battle
 
- Description: The battle is a siege battle
 
- Parameters: siege_battle()
 
- Return: bool
 
- Function: seige_battle
 
- Description: The battle is a seige battle
 
- Parameters: seige_battle()
 
- Return: bool
 
- Function: is_minor_settlement_battle
 
- Description: Check if the battle is a minor settlement battle
 
- Parameters: is_minor_settlement_battle()
 
- Return: bool
 
- Function: is_major_settlement_battle
 
- Description: Check if the battle is a major settlement battle
 
- Parameters: is_major_settlement_battle()
 
- Return: bool
 
- Function: river_battle
 
- Description: The battle is a river crossing battle
 
- Parameters: river_battle()
 
- Return: bool
 
- Function: mountain_chokepoint
 
- Description: The battle is a mountain chokepoint battle
 
- Parameters: mountain_chokepoint()
 
- Return: bool
 
- Function: ambush_battle
 
- Description: The battle is a ambush battle
 
- Parameters: ambush_battle()
 
- Return: bool
 
- Function: failed_ambush_battle
 
- Description: The battle is a failed ambush battle
 
- Parameters: failed_ambush_battle()
 
- Return: bool
 
- Function: night_battle
 
- Description: The battle is a night battle
 
- Parameters: night_battle()
 
- Return: bool
 
- Function: is_quest_battle
 
- Description: Check if this is a quest battle.
 
- Parameters: is_quest_battle()
 
- Return: boolean
 
- Function: battle_type
 
- Description: The battle type. Asks a programmer for the battle type strings (found in campaign_battle_type_enum_ids, campaignbonusvalues.cpp)
 
- Parameters: battle_type()
 
- Return: string
 
- Function: battle_name
 
- Description: Return localised battle name, the same that is used in the Battle Loading screen.
 
- Parameters: battle_name()
 
- Return: string
 
- Function: battle_record_key
 
- Description: Returns the battle record key, if such exists. Otherwise returns an empty string.
 
- Parameters: battle_record_key()
 
- Return: string
 
- Function: loading_screen_title_override
 
- Description: If loading screen is overriden, it returns the localisation string of the overriden title. Otherwise it returns empty string.
 
- Parameters: loading_screen_title_override()
 
- Return: string
 
- Function: battle_region_key
 
- Description: Returns the localisation string of the region in which the battle will be fought.
 
- Parameters: battle_region_key()
 
- Return: string
 
- Function: attacker_strength
 
- Description: The relative strength of the attacker
 
- Parameters: attacker_strength()
 
- Return: float32
 
- Function: defender_strength
 
- Description: The relative strength of the defender
 
- Parameters: defender_strength()
 
- Return: float32
 
- Function: has_been_fought
 
- Description: True if the battle has been fought
 
- Parameters: has_been_fought()
 
- Return: bool
 
- Function: set_piece_battle_key
 
- Description: Returns the set piece battle key. Empty if this isn't a set piece battle
 
- Parameters: set_piece_battle_key()
 
- Return: String
 
- Function: battle_results
 
- Description: Returns battle results object for the pending battle
 
- Parameters: battle_results()
 
- Return: BATTLE_RESULTS_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if there are no battle results yet)
 
- Function: challenge_battle
 
- Description: Returns if battle is a challenge battle
 
- Parameters: challenge_battle()
 
- Return: BATTLE_RESULTS_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if there are no battle setup)
 
- Function: bribed_units_eminence_cost_for_faction
 
- Description: Returns the amount of Eminence spent for bribes to this point, still not subtracted from the treasury.
 
- Parameters: bribed_units_eminence_cost_for_faction(faction_key)
 
- Return: card32
 
- Function: region_data
 
- Description: Region data that the battle is taking place within
 
- Parameters: region_data()
 
- Return: REGION_DATA_SCRIPT_INTERFACE
 
- Function: logical_position
 
- Description: Logical position of the battle site
 
- Parameters: logical_position()
 
- Return: card16 x, card16 y
 
- Function: display_position
 
- Description: Display position of the battle site
 
- Parameters: display_position()
 
- Return: float x, float y
 
- Function: autoresolve_selected
 
- Description: True if the battle has been autoresolved
 
- Parameters: autoresolve_selected()
 
- Return: bool
 
- Description: A list of pooled resource factor script interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: POOLED_RESOURCE_FACTOR_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Pooled Resource Factor Script Interface
 
- is_null_interface
 
- localised_positive_display_name
 
- localised_negative_display_name
 
- factor_id
 
- factor_key
 
- value
 
- percentage_of_capacity
 
- minimum_value
 
- maximum_value
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: localised_positive_display_name
 
- Description: Localised positive display name of the factor
 
- Parameters: localised_positive_display_name()
 
- Return: UniString
 
- Function: localised_negative_display_name
 
- Description: Localised negative display name of the factor
 
- Parameters: localised_negative_display_name()
 
- Return: UniString
 
- Function: factor_id
 
- Description: Unique id of the factor-resource junction
 
- Parameters: factor_id()
 
- Return: string
 
- Function: factor_key
 
- Description: Unique id of the factor
 
- Parameters: factor_key()
 
- Return: string
 
- Function: value
 
- Description: Total value of this factor at the current time, potentially negative
 
- Parameters: value()
 
- Return: int32
 
- Function: percentage_of_capacity
 
- Description: Percentage of the total capacity in the bounds between min and max. For exammple if the pool had a range of -5, 5 and a value of 0 it would have a percentage of 50%
 
- Parameters: percentage_of_capacity()
 
- Return: int32
 
- Function: minimum_value
 
- Description: Minimum value of this factor, including any modifications from effects.
 
- Parameters: minimum_value()
 
- Return: int32
 
- Function: maximum_value
 
- Description: Maximum value of this factor, including any modifications from effects.
 
- Parameters: maximum_value()
 
- Return: int32
 
- Description: A list of pooled resource script interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: POOLED_RESOURCE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Pooled Resource Script Interface
 
- is_null_interface
 
- key
 
- icon
 
- value
 
- percentage_of_capacity
 
- capacity_tier
 
- minimum_value
 
- maximum_value
 
- is_projected_to_go_negative
 
- income
 
- active_effect
 
- number_of_effect_types
 
- factors
 
- turns_of_shortage
 
- playthrough_total_income_all
 
- playthrough_total_expenditure_all
 
- playthrough_income
 
- is_economy_resource
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: key
 
- Description: Record key for this resource pool
 
- Parameters: key()
 
- Return: string
 
- Function: icon
 
- Description: Icon name for this resource pool
 
- Parameters: icon()
 
- Return: string
 
- Function: value
 
- Description: Total value of this pool
 
- Parameters: value()
 
- Return: int32
 
- Function: percentage_of_capacity
 
- Description: Percentage of the total capacity in the bounds between min and max. For example if the pool had a range of -5,5 and a value of 0 it would have a percentage of 50%.
 
- Parameters: percentage_of_capacity()
 
- Return: int32
 
- Function: capacity_tier
 
- Description: Percentage of the total capacity in the bounds between min and max, set into tiers 0-3. Tiers are 0-24%, 25-49%, 50-74%, 75-100%.
 
- Parameters: capacity_tier()
 
- Return: int32
 
- Function: minimum_value
 
- Description: Minimum value of this pool. Including any modifications from effects
 
- Parameters: minimum_value()
 
- Return: int32
 
- Function: maximum_value
 
- Description: Maximum value of this pool. Including any modifications from effects
 
- Parameters: maximum_value()
 
- Return: int32
 
- Function: is_projected_to_go_negative
 
- Description: Returns whether this pooled resource is projected to go into the red next turn
 
- Parameters: is_projected_to_go_negative()
 
- Return: boolean
 
- Function: income
 
- Description: Returns the current income of this pooled resource
 
- Parameters: income()
 
- Return: int32
 
- Function: active_effect
 
- Description: Active effect bundle key of type for this faction. No effect of type active if it has an empty key
 
- Parameters: active_effect(card32 type)
 
- Return: String
 
- Function: number_of_effect_types
 
- Description: Number of possible effect types. Consistent between all pools.
 
- Parameters: number_of_effect_types()
 
- Return: card32
 
- Function: factors
 
- Description: All factors contributing to this pool. Unless the pool has persistent factors, only the factors of transactions for the current turn
 
- Parameters: factors()
 
- Return: POOLED_RESOURCE_FACTOR_LIST_SCRIPT_INTERFACE
 
- Function: turns_of_shortage
 
- Description: The number of turns for which this pool has been at its minimum with negative growth.
 
- Parameters: turns_of_shortage()
 
- Return: int32
 
- Function: playthrough_total_income_all
 
- Description: Get total received value of the given resource from the beginning of the game (all factors).
 
- Parameters: playthrough_total_income_all()
 
- Return: int32
 
- Function: playthrough_total_expenditure_all
 
- Description: Get total spent value of the given resource from the beginning of the game (all factors).
 
- Parameters: playthrough_total_expenditure_all()
 
- Return: int32
 
- Function: playthrough_income
 
- Description: Get total spent value for given resource factor from the beginning of the game.
 
- Parameters: playthrough_income(string resource_factor_key)
 
- Return: card32
 
- Function: is_economy_resource
 
- Description: Check if this is an economy resource
 
- Parameters: is_economy_resource()
 
- Return: bool
 
- Description: A list of province interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: PROVINCE_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: The interface that stores and manages all provinces in the game.
 
- is_null_interface
 
- model
 
- province_list
 
- province_for_province_key
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: model
 
- Description: Access to the model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: province_list
 
- Description: A list of all provinces
 
- Parameters: province_list()
 
- Return: PROVINCE_LIST_SCRIPT_INTERFACE
 
- Function: province_for_province_key
 
- Description: Get province for given key
 
- Parameters: province_for_province_key(key)
 
- Return: PROVINCE_SCRIPT_INTERFACE
 
- Description: Province script interface
 
- is_null_interface
 
- command_queue_index
 
- model
 
- name
 
- regions
 
- capital
 
- depletable_resource_remaining_amount
 
- depletable_resource_remaining_amount_no_faction
 
- can_spawn_pooled_resource
 
- can_province_provide_income_for_faction
 
- religion_proportion
 
- localised_display_name
 
- public_order
 
- development_points_for_faction
 
- bonus_values_for_faction
 
- accumulated_growth_for_faction
 
- num_of_regions_owned_by_faction
 
- num_of_adjacent_regions_owned_by_faction
 
- has_effect_bundle
 
- get_effect_bundle
 
- effect_bundles
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: command_queue_index
 
- Description: Returns the CQI of the province
 
- Parameters: command_queue_index()
 
- Return: int
 
- Function: model
 
- Description: Access to the model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: name
 
- Description: The province key
 
- Parameters: name()
 
- Return: String
 
- Function: regions
 
- Description: List of all regions in the province
 
- Parameters: regions()
 
- Return: REGION_LIST_SCRIPT_INTERFACE
 
- Function: capital
 
- Description: The capital region of the province
 
- Parameters: capital()
 
- Return: REGION_SCRIPT_INTERFACE
 
- Function: depletable_resource_remaining_amount
 
- Description: Gets the depletable resource remaining amount for the given name and faction
 
- Parameters: depletable_resource_remaining_amount(resource_key, faction_key)
 
- Return: int32
 
- Function: depletable_resource_remaining_amount_no_faction
 
- Description: Gets the depletable resource remaining amount for the given name - without any faction bonuses
 
- Parameters: depletable_resource_remaining_amount_no_faction(resource_key)
 
- Return: int32
 
- Function: can_spawn_pooled_resource
 
- Description: Checks if we can spawn the resource in this province.(checks if a record in the pooled_resource_to_province_junctions exists.)
 
- Parameters: can_spawn_pooled_resource(resource_key)
 
- Return: bool
 
- Function: can_province_provide_income_for_faction
 
- Description: Checks if this province can provide income for the pooled resources for this faction.(checks if we own any regions in the province. TODO add check for influence
 
- Parameters: can_province_provide_income_for_faction(faction_key)
 
- Return: bool
 
- Function: religion_proportion
 
- Description: Returns the proportion domination of the specified religion
 
- Parameters: religion_proportion()
 
- Return: float32
 
- Function: localised_display_name
 
- Description: Localised display name
 
- Parameters: localised_display_name()
 
- Return: UniString
 
- Function: public_order
 
- Description: Public order for province from a faction's province manager
 
- Parameters: public_order(faction_key)
 
- Return: int32
 
- Function: development_points_for_faction
 
- Description: Development points for province from a faction's province manager
 
- Parameters: development_points_for_faction(faction_key)
 
- Return: card32
 
- Function: bonus_values_for_faction
 
- Description: Bonus values for province from a faction's province manager
 
- Parameters: bonus_values_for_faction(faction_key)
 
- Return: BONUS_VALUES_SCRIPT_INTERFACE
 
- Function: accumulated_growth_for_faction
 
- Description: Returns the total amount of growth points accumulated in a province towards the next population point from a faction's province manager
 
- Parameters: accumulated_growth_for_faction(faction_key)
 
- Return: card32
 
- Function: num_of_regions_owned_by_faction
 
- Description: Returns the number of regions owned by a faction in the province.
 
- Parameters: num_of_regions_owned_by_faction(faction_key)
 
- Return: card32
 
- Function: num_of_adjacent_regions_owned_by_faction
 
- Description: Returns the number of regions adjacent to the province and owned by a given faction.
 
- Parameters: num_of_adjacent_regions_owned_by_faction(faction_key)
 
- Return: card32
 
- Function: has_effect_bundle
 
- Description: Checks if the province has the effect bundle for a particular faction
 
- Parameters: has_effect_bundle(bundle_key, faction_key)
 
- Return: bool
 
- Function: get_effect_bundle
 
- Description: Returns the effect bundle for a particular faction
 
- Parameters: get_effect_bundle(bundle_key, faction_key)
 
- Return: EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Function: effect_bundles
 
- Description: Returns the effect bundles for a particular faction
 
- Parameters: effect_bundles(faction_key)
 
- Return: EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE
 
- Description: A list of region datas
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: REGION_DATA_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: Region Data Script Interface, a region of the campaign map. May or may not be represented by a region or sea region
 
- is_null_interface
 
- key
 
- is_sea
 
- region
 
- sea_region
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: key
 
- Description: Database record key of this region data
 
- Parameters: key()
 
- Return: String
 
- Function: is_sea
 
- Description: True if this region data is an sea type
 
- Parameters: is_sea()
 
- Return: bool
 
- Function: region
 
- Description: Returns the region that this region data maps to. Will be null if this is a sea region
 
- Parameters: region()
 
- Return: REGION_SCRIPT_INTERFACE
 
- Function: sea_region
 
- Description: Returns the sea region that this region data maps to. Will be null if this is a land region
 
- Parameters: sea_region()
 
- Return: SEA_REGION_SCRIPT_INTERFACE
 
- Description: A list of region interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: REGION_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Description: The interface that stores and manages all regions in the game. Useful for looking up region and slot//settlement keys.
 
- is_null_interface
 
- model
 
- region_list
 
- faction_region_list
 
- region_by_key
 
- settlement_by_key
 
- slot_by_key
 
- resource_exists_anywhere
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: model
 
- Description: Access to the model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: region_list
 
- Description: A list of all regions
 
- Parameters: region_list()
 
- Return: REGION_LIST_SCRIPT_INTERFACE
 
- Function: faction_region_list
 
- Description: A list of all regions for a faction
 
- Parameters: input a faction key string e.g. faction_region_list("mori")
 
- Return: REGION_LIST_SCRIPT_INTERFACE
 
- Function: region_by_key
 
- Description: Returns the region interface for a given region key
 
- Parameters: input a region key string e.g. region_by_key("jap_tosa")
 
- Return: REGION_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the region key is invalid)
 
- Function: settlement_by_key
 
- Description: Returns the settlement interface for a given settlement key
 
- Parameters: input a settlement key string e.g. settlement_by_key("settlement:jap_aki:koriyama")
 
- Return: SETTLEMENT_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the settlement key is invalid)
 
- Function: slot_by_key
 
- Description: Returns the slot interface for a given slot key
 
- Parameters: input a slot key string e.g. slot_by_key("rice:jap_awa:farm")
 
- Return: SLOT_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the slot key is invalid)
 
- Function: resource_exists_anywhere
 
- Description: Are any regions producing this resource?
 
- Parameters: input a resource key e.g. resource_exists_anywhere("res_coffee")
 
- Return: bool. It will also return false if the resource key is invalid.
 
- Description: Region script interface, includes region finance and slot/settlement info
 
- is_null_interface
 
- model
 
- owning_faction
 
- slot_list
 
- settlement
 
- garrison_residence
 
- name
 
- province
 
- province_name
 
- command_queue_index
 
- public_order
 
- num_buildings
 
- slot_type_exists
 
- building_exists
 
- last_building_constructed_key
 
- resource_exists
 
- any_resource_available
 
- pooled_resource_income
 
- province_pooled_resource_income
 
- town_wealth_growth
 
- adjacent_region_list
 
- adjacent_region_list_traversable
 
- majority_religion
 
- region_wealth_change_percent
 
- squalor
 
- sanitation
 
- is_abandoned
 
- religion_proportion
 
- can_recruit_agent_at_settlement
 
- faction_province_development_points
 
- faction_province_growth
 
- faction_province_growth_per_turn
 
- is_province_capital
 
- has_development_points_to_upgrade
 
- has_faction_province_slaves
 
- num_faction_province_slaves
 
- max_faction_province_slaves
 
- percentage_faction_province_slaves
 
- has_active_storm
 
- region_data_interface
 
- get_selected_edict_key
 
- get_active_edict_key
 
- foreign_slot_managers
 
- foreign_slot_manager_for_faction
 
- effect_bundles
 
- has_effect_bundle
 
- get_effect_bundle
 
- faction_province_effect_bundles
 
- supply_points
 
- characters_in_region
 
- localised_display_name
 
- bonus_values
 
- size_of_enemy_forces
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: model
 
- Description: Access to the model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: owning_faction
 
- Description: Access to the faction that owns the region
 
- Parameters: owning_faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: slot_list
 
- Description: A list of slots contained in the region
 
- Parameters: slot_list()
 
- Return: SLOT_LIST_SCRIPT_INTERFACE
 
- Function: settlement
 
- Description: The region settlement
 
- Parameters: settlement()
 
- Return: SETTLEMENT_SCRIPT_INTERFACE
 
- Function: garrison_residence
 
- Description: The regions settlement as a garrison_residence
 
- Parameters: garrison_residence()
 
- Return: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Function: name
 
- Description: The region key
 
- Parameters: name()
 
- Return: String
 
- Function: province
 
- Description: Access to the province
 
- Parameters: province()
 
- Return: PROVINCE_SCRIPT_INTERFACE
 
- Function: province_name
 
- Description: Key of the province containing the region
 
- Parameters: province_name()
 
- Return: String
 
- Function: command_queue_index
 
- Description: Returns the CQI of the region
 
- Parameters: command_queue_index()
 
- Return: int
 
- Function: public_order
 
- Description: Region public order
 
- Parameters: public_order()
 
- Return: int32
 
- Function: num_buildings
 
- Description: The number of buildings in a region
 
- Parameters: num_buildings()
 
- Return: int32
 
- Function: slot_type_exists
 
- Description: Does a slot with a given key exist in the region?
 
- Parameters: input a slot key, e.g. slot_type_exists("rice:jap_awa:farm")
 
- Return: bool
 
- Function: building_exists
 
- Description: Does a building with a given key exist in the region?
 
- Parameters: input a building key, e.g. building_exists("key")
 
- Return: bool
 
- Function: last_building_constructed_key
 
- Description: Returns the key of the last building constructed this region
 
- Parameters: last_building_constructed_key()
 
- Return: String
 
- Function: resource_exists
 
- Description: Is a resource produced in this region?
 
- Parameters: input a resource key, e.g. resource_exists("key")
 
- Return: bool
 
- Function: any_resource_available
 
- Description: Is any resource, at all, produced in this region?
 
- Parameters: any_resource_available()
 
- Return: bool
 
- Function: pooled_resource_income
 
- Description: The per turn income (or expenditure) of a pooled resource in this region?
 
- Parameters: pooled_resource_income(resource)
 
- Return: int32
 
- Function: province_pooled_resource_income
 
- Description: The per turn income (or expenditure) of a pooled resource in this region's province?
 
- Parameters: province_pooled_resource_income(resource)
 
- Return: int32
 
- Function: town_wealth_growth
 
- Description: Returns the town wealth growth in the region
 
- Parameters: town_wealth_growth()
 
- Return: int
 
- Function: adjacent_region_list
 
- Description: Returns the list of regions adjacent to this one (including where the connection is not traversable)
 
- Parameters: adjacent_region_list()
 
- Return: REGION_LIST_SCRIPT_INTERFACE
 
- Function: adjacent_region_list_traversable
 
- Description: Returns the list of regions adjacent to this one (only where the connection is traversable)
 
- Parameters: adjacent_region_list_traversable()
 
- Return: REGION_LIST_SCRIPT_INTERFACE
 
- Function: majority_religion
 
- Description: Returns key of the majority religion in the region
 
- Parameters: majority_religion()
 
- Return: String
 
- Function: region_wealth_change_percent
 
- Description: Returns key of the % region wealth change
 
- Parameters: region_wealth_change_percent()
 
- Return: float
 
- Function: squalor
 
- Description: Returns the current squalor in the region
 
- Parameters: squalor()
 
- Return: card32
 
- Function: sanitation
 
- Description: Returns the current sanitation in the region
 
- Parameters: sanitation()
 
- Return: card32
 
- Function: is_abandoned
 
- Description: Returns true if the region is abandoned
 
- Parameters: is_abandoned()
 
- Return: bool
 
- Function: religion_proportion
 
- Description: Returns the proportion domination of the specified religion
 
- Parameters: religion_proportion()
 
- Return: float32
 
- Function: can_recruit_agent_at_settlement
 
- Description: Returns true if you can recruite the specified agent type at the regions settlement
 
- Parameters: can_recruit_agent_at_settlement()
 
- Return: bool
 
- Function: faction_province_development_points
 
- Description: Returns the amount of development in the province
 
- Parameters: faction_province_development_points()
 
- Return: card32
 
- Function: faction_province_growth
 
- Description: Returns the total amount of growth points accumulated in a province towards the next population point
 
- Parameters: faction_province_growth()
 
- Return: card32
 
- Function: faction_province_growth_per_turn
 
- Description: Returns the amount of growth points added in a province towards the next population point this turn
 
- Parameters: faction_province_growth_per_turn()
 
- Return: card32
 
- Function: is_province_capital
 
- Description: Is this region the province capital?
 
- Parameters: is_province_capital()
 
- Return: bool
 
- Function: has_development_points_to_upgrade
 
- Description: Does this region have enough development points to upgrade?
 
- Parameters: has_development_points_to_upgrade()
 
- Return: bool
 
- Function: has_faction_province_slaves
 
- Description: Does this region's owner support Faction Slaves
 
- Parameters: has_faction_province_slaves()
 
- Return: bool
 
- Function: num_faction_province_slaves
 
- Description: Number of slaves in the faction province
 
- Parameters: num_faction_province_slaves()
 
- Return: int
 
- Function: max_faction_province_slaves
 
- Description: Maximum number of slaves for the faction province
 
- Parameters: max_faction_province_slaves()
 
- Return: int
 
- Function: percentage_faction_province_slaves
 
- Description: Percentage faction province slaves of the maximum
 
- Parameters: percentage_faction_province_slaves()
 
- Return: float
 
- Function: has_active_storm
 
- Description: Returns true if region has an active storm
 
- Parameters: has_active_storm()
 
- Return: bool
 
- Function: region_data_interface
 
- Description: Gets the REGION_DATA interface of the region
 
- Parameters: region_data_interface()
 
- Return: REGION_DATA_SCRIPT_INTERFACE
 
- Function: get_selected_edict_key
 
- Description: Gets the key of the currently selected edict of the region, returns "" if there is no edict active
 
- Parameters: get_selected_edict_key()
 
- Return: REGION_DATA_SCRIPT_INTERFACE
 
- Function: get_active_edict_key
 
- Description: Gets the key of the currently active edict of the region, returns "" if there is no edict active
 
- Parameters: get_active_edict_key()
 
- Return: REGION_DATA_SCRIPT_INTERFACE
 
- Function: foreign_slot_managers
 
- Description: Returns the complete list of foreign slot managers currently active in this region
 
- Parameters: foreign_slot_managers()
 
- Return: FOREIGN_SLOT_MANAGER_LIST_SCRIPT_INTERFACE
 
- Function: foreign_slot_manager_for_faction
 
- Description: Returns the foreign slot manager that belongs to the specified faction. Will be null if they do not have a foreign slot manager in this region
 
- Parameters: foreign_slot_manager_for_faction(faction_key)
 
- Return: FOREIGN_SLOT_MANAGER_SCRIPT_INTERFACE
 
- Function: effect_bundles
 
- Description: Effect bundles currently active on the region
 
- Parameters: effect_bundles()
 
- Return: EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE
 
- Function: has_effect_bundle
 
- Description: Check if the region has the specified effect bundle.
 
- Parameters: has_effect_bundle()
 
- Return: boolean
 
- Function: get_effect_bundle
 
- Description: Get the region's specified effect bundle.
 
- Parameters: get_effect_bundle(key)
 
- Return: EFFECT_BUNDLE_SCRIPT_INTERFACE
 
- Function: faction_province_effect_bundles
 
- Description: Effect bundles currently active on the faction province
 
- Parameters: faction_province_effect_bundles()
 
- Return: EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE
 
- Function: supply_points
 
- Description: A region's supply points
 
- Parameters: supply_points()
 
- Return: int32
 
- Function: characters_in_region
 
- Description: List of characters currently in the region bundles
 
- Parameters: characters_in_region()
 
- Return: CHARACTER_LIST_SCRIPT_INTERFACE
 
- Function: localised_display_name
 
- Description: Localised display name of region
 
- Parameters: localised_display_name()
 
- Return: UniString
 
- Function: bonus_values
 
- Description: Active bonus values of this region
 
- Parameters: bonus_values()
 
- Return: BONUS_VALUES_SCRIPT_INTERFACE
 
- Function: size_of_enemy_forces
 
- Description: Size of enemy forces in this region
 
- Parameters: size_of_enemy_forces()
 
- Return: int32
 
- Description: Resource Transaction Script Interface
 
- is_null_interface
 
- total_treasury_change
 
- total_resource_change
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: total_treasury_change
 
- Description: Total net treasury change applied by this resource transaction
 
- Parameters: total_treasury_change()
 
- Return: RESOURCE_TRANSACTION_SCRIPT_INTERFACE
 
- Function: total_resource_change
 
- Description: Total net change applied to the specified resource by this resource transaction
 
- Parameters: total_resource_change(String resource_key)
 
- Return: RESOURCE_TRANSACTION_SCRIPT_INTERFACE
 
- Description: Sea Region List script interface, a list of sea regions
 
- is_null_interface
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Description: Sea Region Manager script interface, world sea region list, faction sea regions and lookup by key
 
- is_null_interface
 
- model
 
- sea_region_list
 
- faction_sea_region_list
 
- sea_region_by_key
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: model
 
- Description: Returns the campaign model
 
- Parameters: model()
 
- Return: CAMPAIGN_MODEL
 
- Function: sea_region_list
 
- Description: Returns a complete list of sea regions in the world
 
- Parameters: sea_region_list()
 
- Return: SEA_REGION_LIST
 
- Function: faction_sea_region_list
 
- Description: Returns a complete list of sea regions for the given faction
 
- Parameters: faction_sea_region_list(String faction)
 
- Return: SEA_REGION_LIST
 
- Function: sea_region_by_key
 
- Description: Attempts to look up a sea region by record key
 
- Parameters: sea_region_by_key(String key)
 
- Return: SEA_REGION
 
- Description: Sea Region script interface, only basic information as sea regions do not contain settlements
 
- is_null_interface
 
- command_queue_index
 
- model
 
- name
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: command_queue_index
 
- Description: Access the CQI of the sea region
 
- Parameters: command_queue_index()
 
- Return: int
 
- Function: model
 
- Description: Campaign Model
 
- Parameters: model()
 
- Return: CAMPAIGN_MODEL
 
- Function: name
 
- Description: Sea Region Record Key
 
- Parameters: name()
 
- Return: String
 
- Description: Settlement script interface
 
- is_null_interface
 
- key
 
- command_queue_index
 
- has_commander
 
- logical_position_x
 
- logical_position_y
 
- display_position_x
 
- display_position_y
 
- zone_of_control_radius_land
 
- model
 
- commander
 
- faction
 
- region
 
- slot_list
 
- is_port
 
- get_climate
 
- primary_slot
 
- port_slot
 
- active_secondary_slots
 
- first_empty_active_secondary_slot
 
- building_list
 
- burned_buildings_percent
 
- can_possibly_build_units_from_set
 
- production_type
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: key
 
- Description: Returns the string key of this settlement
 
- Parameters: key()
 
- Return: String
 
- Function: command_queue_index
 
- Description: Command queue index of the Settlement
 
- Parameters: command_queue_index()
 
- Return: int
 
- Function: has_commander
 
- Description: Does the settlement have a commander of a military force
 
- Parameters: has_commander()
 
- Return: bool
 
- Function: logical_position_x
 
- Description: Logical position on map, x coord
 
- Parameters: logical_position_x()
 
- Return: int
 
- Function: logical_position_y
 
- Description: Logical position on map, y coord
 
- Parameters: logical_position_y()
 
- Return: int
 
- Function: display_position_x
 
- Description: Display/real position on map, x coord
 
- Parameters: display_position_x()
 
- Return: float
 
- Function: display_position_y
 
- Description: Display/real position on map, y coord
 
- Parameters: display_position_y()
 
- Return: float
 
- Function: zone_of_control_radius_land
 
- Description: Return the zone of control radius of the settlement
 
- Parameters: zone_of_control_radius_land()
 
- Return: float
 
- Function: model
 
- Description: Access to the campaign model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: commander
 
- Description: Returns the embedded military force commander
 
- Parameters: commander()
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the settlement does not have a commander)
 
- Function: faction
 
- Description: Access to the faction that owns the settlement
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: region
 
- Description: The region for this settlement
 
- Parameters: region()
 
- Return: REGION_SCRIPT_INTERFACE
 
- Function: slot_list
 
- Description: Returns the list of slots in the settlement
 
- Parameters: slot_list()
 
- Return: SLOT_LIST_SCRIPT_INTERFACE
 
- Function: is_port
 
- Description: Is this settlement a port
 
- Parameters: is_port()
 
- Return: bool
 
- Function: get_climate
 
- Description: Get the climate key for a settlement
 
- Parameters: get_climate()
 
- Return: String
 
- Function: primary_slot
 
- Description: Get the primary slot for this settlement
 
- Parameters: primary_slot()
 
- Return: SLOT_SCRIPT_INTERFACE
 
- Function: port_slot
 
- Description: Get the port slot for this settlement if it exists, null if it doesn't
 
- Parameters: port_slot()
 
- Return: SLOT_SCRIPT_INTERFACE
 
- Function: active_secondary_slots
 
- Description: Get a list of all of the active secondary slots in this settlement. Try not to spam call this
 
- Parameters: active_secondary_slots()
 
- Return: SLOT_LIST_SCRIPT_INTERFACE
 
- Function: first_empty_active_secondary_slot
 
- Description: Get the first empty active secondary slot from the settement. May be null if none are available
 
- Parameters: first_empty_active_secondary_slot()
 
- Return: SLOT_SCRIPT_INTERFACE
 
- Function: building_list
 
- Description: A list of buildings in the settlement
 
- Parameters: building_list()
 
- Return: BUILDING_LIST_SCRIPT_INTERFACE
 
- Function: burned_buildings_percent
 
- Description: Returns the percentage of buildings burned
 
- Parameters: burned_buildings_percent()
 
- Return: float
 
- Function: can_possibly_build_units_from_set
 
- Description: Checks whether the building templates in the settlement ultimately allow any unit of this set to be built.
 
- Parameters: can_possibly_build_units_from_set("unit_set")
 
- Return: bool
 
- Function: production_type
 
- Description: returns production type in this settlement.
 
- Parameters: production_type()
 
- Return: string
 
- Description: Shared States Manager Script Interfaces
 
- is_null_interface
 
- get_state_as_bool_value
 
- get_state_as_float_value
 
- get_state_as_string_value
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: get_state_as_bool_value
 
- Description: returns state as bool by key. Returns nil if not present
 
- Parameters: get_state_as_bool_value((optional) Campaign Entity Interface, String key)
 
- Return: bool
 
- Function: get_state_as_float_value
 
- Description: returns state as float by key. Returns nil if not present
 
- Parameters: get_state_as_float_value((optional) Campaign Entity Interface, String key)
 
- Return: float32
 
- Function: get_state_as_string_value
 
- Description: returns state as string by key. Returns nil if not present
 
- Parameters: (optional) Campaign Entity Interface, get_state_as_string_value(String key)
 
- Return: string
 
- Description: Contains siege wrapper
 
- is_null_interface
 
- can_assault
 
- get_garrison_residence_under_siege
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: can_assault
 
- Description: Returns whether the siege battle can be started
 
- Parameters: can_assault()
 
- Return: bool
 
- Function: get_garrison_residence_under_siege
 
- Description: Returns the garrison residence
 
- Parameters: get_garrison_residence_under_siege()
 
- Return: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Description: A list of slot interfaces
 
- num_items
 
- item_at
 
- is_empty
 
- slot_type_exists
 
- buliding_type_exists
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: SLOT_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Function: slot_type_exists
 
- Description: Does a slot with this key exist in the list?
 
- Parameters: input a slot key to query, slot_type_exists( "slot_key" )
 
- Return: bool
 
- Function: buliding_type_exists
 
- Description: Does a building with this key exist in the list? (building_level_record key)
 
- Parameters: input a slot key to query, buliding_type_exists( "building_level_record_key" )
 
- Return: bool
 
- Description: Slot script interface
 
- is_null_interface
 
- has_building
 
- logical_position_x
 
- logical_position_y
 
- display_position_x
 
- display_position_y
 
- model
 
- region
 
- building
 
- faction
 
- type
 
- name
 
- template_key
 
- resource_key
 
- slot_key
 
- is_there_construction
 
- construction_building_level_record_name
 
- construction_building_level_record_level
 
- construction_building_chain_key
 
- construction_building_chain_category
 
- construction_building_chain_superchain
 
- construction_building_time_to_completion
 
- active
 
- garrison_residence
 
- is_infrastructure_slot
 
- is_fort
 
- is_refugee_camp
 
- max_garrison_units
 
- command_queue_index
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: has_building
 
- Description: Is there a building in this slot?
 
- Parameters: has_building()
 
- Return: bool
 
- Function: logical_position_x
 
- Description: Logical position on map, x coord
 
- Parameters: logical_position_x()
 
- Return: int
 
- Function: logical_position_y
 
- Description: Logical position on map, y coord
 
- Parameters: logical_position_y()
 
- Return: int
 
- Function: display_position_x
 
- Description: Display/real position on map, x coord
 
- Parameters: display_position_x()
 
- Return: float
 
- Function: display_position_y
 
- Description: Display/real position on map, y coord
 
- Parameters: display_position_y()
 
- Return: float
 
- Function: model
 
- Description: Access to the campaign model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: region
 
- Description: The region for this slot
 
- Parameters: region()
 
- Return: REGION_SCRIPT_INTERFACE
 
- Function: building
 
- Description: Returns the building in this slot (if it exists)
 
- Parameters: building()
 
- Return: BUILDING_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the slot does not have a building)
 
- Function: faction
 
- Description: Returns the faction that owns the slot
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: type
 
- Description: The slot type
 
- Parameters: type()
 
- Return: string
 
- Function: name
 
- Description: The slot name
 
- Parameters: name()
 
- Return: string
 
- Function: template_key
 
- Description: The slot template record key
 
- Parameters: template_key()
 
- Return: string
 
- Function: resource_key
 
- Description: The slot reource key (empty if none)
 
- Parameters: resource_key()
 
- Return: string
 
- Function: slot_key
 
- Description: The slot key
 
- Parameters: slot_key()
 
- Return: string
 
- Function: is_there_construction
 
- Description: Is there construction in this slot going on?
 
- Parameters: is_there_construction()
 
- Return: bool
 
- Function: construction_building_level_record_name
 
- Description: Returns the building level key of the construction building
 
- Parameters: construction_building_level_record_name()
 
- Return: string
 
- Function: construction_building_level_record_level
 
- Description: Returns the level of the building level of the construction building
 
- Parameters: construction_building_level_record_level()
 
- Return: int
 
- Function: construction_building_chain_key
 
- Description: Returns the building_chain key for the construction item
 
- Parameters: construction_building_chain_key()
 
- Return: string
 
- Function: construction_building_chain_category
 
- Description: Returns the building_chain chain_category for the construction item
 
- Parameters: construction_building_chain_category()
 
- Return: string
 
- Function: construction_building_chain_superchain
 
- Description: Returns the building superchain key of the building chain for the construction item
 
- Parameters: construction_building_chain_superchain()
 
- Return: string
 
- Function: construction_building_time_to_completion
 
- Description: Returns the time to completion in turns for the construction item
 
- Parameters: construction_building_time_to_completion()
 
- Return: int
 
- Function: active
 
- Description: Is this slot active?
 
- Parameters: active()
 
- Return: bool
 
- Function: garrison_residence
 
- Description: Returns the slot as a garrison residence
 
- Parameters: garrison_residence()
 
- Return: GARRISON_RESIDENCE_SCRIPT_INTERFACE
 
- Function: is_infrastructure_slot
 
- Description: Is this an infrastructure (ERS) slot?
 
- Parameters: is_infrastructure_slot()
 
- Return: bool
 
- Function: is_fort
 
- Description: Is this an infrastructure (ERS) slot containing a fort building?
 
- Parameters: is_fort()
 
- Return: bool
 
- Function: is_refugee_camp
 
- Description: Is this an infrastructure (ERS) slot containing a refugee camp building?
 
- Parameters: is_refugee_camp()
 
- Return: bool
 
- Function: max_garrison_units
 
- Description: Maximum number of units in the garrison of a fort, 0 if there is no fort in the slot.
 
- Parameters: max_garrison_units()
 
- Return: int
 
- Function: command_queue_index
 
- Description: Command queue index of the slot
 
- Parameters: command_queue_index()
 
- Return: int
 
- Description: A list of unique agent details
 
- num_items
 
- item_at
 
- is_empty
 
- has_unique_agent_details
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Function: has_unique_agent_details
 
- Description: True if a unique agent details object of the same type is present
 
- Parameters: has_unique_agent_details(String record_key)
 
- Return: bool
 
- Description: Unique Agent Details Script Interface.
 
- is_null_interface
 
- faction
 
- character
 
- agent_key
 
- charges
 
- charges_expended
 
- valid
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: faction
 
- Description: Returns the owning faction
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: character
 
- Description: Returns the active character for this unique agent. Null if not spawned
 
- Parameters: character()
 
- Return: CHARACTER_SCRIPT_INTERFACE
 
- Function: agent_key
 
- Description: Returns the database record key for this unique agent.
 
- Parameters: agent_key()
 
- Return: String
 
- Function: charges
 
- Description: Returns the number of available charges.
 
- Parameters: charges()
 
- Return: card32
 
- Function: charges_expended
 
- Description: Returns the number of charges expended.
 
- Parameters: charges_expended()
 
- Return: card32
 
- Function: valid
 
- Description: True if this unique agent is valid to spawn.
 
- Parameters: valid()
 
- Return: bool
 
- Description: A list of units
 
- num_items
 
- item_at
 
- is_empty
 
- has_unit
 
- Function: num_items
 
- Description: Returns the number of items in the list
 
- Parameters: num_items()
 
- Return: positive int
 
- Function: item_at
 
- Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
 
- Parameters: positive int
 
- Return: UNIT_SCRIPT_INTERFACE
 
- Function: is_empty
 
- Description: Returns a true if there are 0 items in the list
 
- Parameters: is_empty()
 
- Return: bool
 
- Function: has_unit
 
- Description: Test if a unit exists in the unit list. Input a unit record key.
 
- Parameters: input a unit key string, has_unit(" unit_key ")
 
- Return: bool
 
- Description: Unit script interface. Land units and Naval units are derived from Unit.
 
- is_null_interface
 
- command_queue_index
 
- has_force_commander
 
- has_unit_commander
 
- is_land_unit
 
- is_naval_unit
 
- model
 
- force_commander
 
- unit_commander
 
- military_force
 
- faction
 
- unit_key
 
- unit_category
 
- unit_class
 
- belongs_to_unit_set
 
- is_ranged
 
- is_mounted
 
- percentage_proportion_of_full_strength
 
- start_soldiers_or_hitpoints
 
- num_soldiers_or_hitpoints
 
- has_banner_ancillary
 
- banner_ancillary
 
- can_upgrade_unit_equipment
 
- get_unit_stat_bonuses
 
- can_upgrade_unit
 
- has_upgrades
 
- experience_level
 
- maximum_experience_level
 
- experience_until_next_level
 
- get_unit_custom_battle_cost
 
- is_custom_unit
 
- supply_points
 
- tier
 
- get_all_attributes
 
- onscreen_name
 
- get_recruitment_cost
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: command_queue_index
 
- Description: Command queue index of the unit
 
- Parameters: command_queue_index()
 
- Return: int
 
- Function: has_force_commander
 
- Description: Is the unit in a force with a commander?
 
- Parameters: has_force_commander()
 
- Return: bool
 
- Function: has_unit_commander
 
- Description: Does this unit have a character leading it? Not all units have one
 
- Parameters: has_unit_commander()
 
- Return: bool
 
- Function: is_land_unit
 
- Description: Is this a land unit?
 
- Parameters: is_land_unit()
 
- Return: bool
 
- Function: is_naval_unit
 
- Description: Is this a naval unit?
 
- Parameters: is_naval_unit()
 
- Return: bool
 
- Function: model
 
- Description: Access to the campaign model interface
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: force_commander
 
- Description: Returns the force commander if one exists
 
- Parameters: force_commander()
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE unit doesn't have a force commander)
 
- Function: unit_commander
 
- Description: Returns the unit commander if one exists
 
- Parameters: unit_commander()
 
- Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE unit doesn't have a unit commander)
 
- Function: military_force
 
- Description: Returns the military force containing this unit
 
- Parameters: military_force()
 
- Return: MILITARY_FORCE_SCRIPT_INTERFACE
 
- Function: faction
 
- Description: Returns the faction that this unit belongs to
 
- Parameters: faction()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: unit_key
 
- Description: The unit record key
 
- Parameters: unit_key()
 
- Return: String
 
- Function: unit_category
 
- Description: The unit record category
 
- Parameters: unit_category()
 
- Return: String
 
- Function: unit_class
 
- Description: The unit record class
 
- Parameters: unit_class()
 
- Return: String
 
- Function: belongs_to_unit_set
 
- Description: Returns whether the unit is in unit set
 
- Parameters: belongs_to_unit_set(String unit_set_key)
 
- Return: bool
 
- Function: is_ranged
 
- Description: Returns whether the unit uses a ranged weapon as their primary weapon.
 
- Parameters: is_ranged()
 
- Return: bool
 
- Function: is_mounted
 
- Description: Returns whether the unit is mounted.
 
- Parameters: is_mounted()
 
- Return: bool
 
- Function: percentage_proportion_of_full_strength
 
- Description: The % of soldiers in the unit. Returns a value 0.0-100.0
 
- Parameters: percentage_proportion_of_full_strength()
 
- Return: float
 
- Function: start_soldiers_or_hitpoints
 
- Description: The starting number of soldiers or hitpoints of the unit.
 
- Parameters: start_soldiers_or_hitpoints()
 
- Return: card32
 
- Function: num_soldiers_or_hitpoints
 
- Description: The current number of soldiers or hitpoints of the unit.
 
- Parameters: num_soldiers_or_hitpoints()
 
- Return: card32
 
- Function: has_banner_ancillary
 
- Description: Returns whether the unit has a banner equipped
 
- Parameters: has_banner_ancillary()
 
- Return: bool
 
- Function: banner_ancillary
 
- Description: Returns the ancillary key of the banner equipped by the unit, or an empty string if no banner is equipped
 
- Parameters: banner_ancillary()
 
- Return: String
 
- Function: can_upgrade_unit_equipment
 
- Description: Can this unit upgrade it's equipment
 
- Parameters: can_upgrade_unit_equipment()
 
- Return: bool
 
- Function: get_unit_stat_bonuses
 
- Description: Get the stat bonuses of this unit
 
- Parameters: get_unit_stat_bonuses()
 
- Return: bool
 
- Function: can_upgrade_unit
 
- Description: Can this unit be upgraded to another unit
 
- Parameters: can_upgrade_unit()
 
- Return: bool
 
- Function: has_upgrades
 
- Description: Has this unit upgrades
 
- Parameters: has_upgrades()
 
- Return: bool
 
- Function: experience_level
 
- Description: Returns the current experience level
 
- Parameters: experience_level()
 
- Return: card32
 
- Function: maximum_experience_level
 
- Description: Returns the max experience level
 
- Parameters: maximum_experience_level()
 
- Return: card32
 
- Function: experience_until_next_level
 
- Description: Experience points required for level-up.
 
- Parameters: experience_until_next_level()
 
- Return: card32
 
- Function: get_unit_custom_battle_cost
 
- Description: Get the cost of the unit in multiplayer or custom battle mode
 
- Parameters: get_unit_custom_battle_cost()
 
- Return: card32
 
- Function: is_custom_unit
 
- Description: Is this a unit created by a custom_unit_script_interface?
 
- Parameters: is_custom_unit()
 
- Return: bool
 
- Function: supply_points
 
- Description: A unit's supply points
 
- Parameters: supply_points()
 
- Return: card32
 
- Function: tier
 
- Description: A unit's tier
 
- Parameters: tier()
 
- Return: card32
 
- Function: get_all_attributes
 
- Description: Returns a table of strings containing all the unit's attributes.
 
- Parameters: get_all_attributes()
 
- Return: table
 
- Function: onscreen_name
 
- Description: Returns the unit's localised name.
 
- Parameters: onscreen_name()
 
- Return: UniString
 
- Function: get_recruitment_cost
 
- Description: Returns the unit's base recruitment cost as a table {gold =..., food = ..., etc.}.
 
- Parameters: get_recruitment_cost()
 
- Return: table
 
- Description: Contains entities that exist in the game world. Examples include the region manager and faction list
 
- is_null_interface
 
- faction_list
 
- region_manager
 
- province_manager
 
- sea_region_manager
 
- model
 
- faction_by_key
 
- faction_exists
 
- factions_with_state_religion
 
- ancillary_exists
 
- climate_phase_index
 
- god_manager
 
- whose_turn_is_it
 
- is_turn_phase_normal
 
- region_data
 
- land_region_data
 
- sea_region_data
 
- region_data_at_position
 
- get_civilization_level_int
 
- Function: is_null_interface
 
- Description: Is this the null script interface
 
- Parameters: is_null_interface()
 
- Return: bool
 
- Function: faction_list
 
- Description: Returns a list interface of all factions
 
- Parameters: faction_list()
 
- Return: FACTION_LIST_SCRIPT_INTERFACE
 
- Function: region_manager
 
- Description: Returns the region manager, which has access to all regions
 
- Parameters: region_manager()
 
- Return: REGION_MANAGER_SCRIPT_INTERFACE
 
- Function: province_manager
 
- Description: Returns the province manager, which has access to all provinces
 
- Parameters: province_manager()
 
- Return: PROVINCE_MANAGER_SCRIPT_INTERFACE
 
- Function: sea_region_manager
 
- Description: Returns the sea region manager, which has access to all sea regions
 
- Parameters: sea_region_manager()
 
- Return: SEA_REGION_MANAGER_SCRIPT_INTERFACE
 
- Function: model
 
- Description: Returns the campaign model
 
- Parameters: model()
 
- Return: MODEL_SCRIPT_INTERFACE
 
- Function: faction_by_key
 
- Description: Returns a faction script interface, by key
 
- Parameters: faction_by_key("rom_rome")
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: faction_exists
 
- Description: Returns if a faction exists in the game, by key
 
- Parameters: faction_exists("rom_rome")
 
- Return: bool
 
- Function: factions_with_state_religion
 
- Description: Returns an indexed list of keys of all factions that have the supplied state religion
 
- Parameters: factions_with_state_religion(religion_key)
 
- Return: table
 
- Function: ancillary_exists
 
- Description: Returns if a ancillary exists anywhere in the world
 
- Parameters: ancillary_exists("ancillary_name")
 
- Return: bool
 
- Function: climate_phase_index
 
- Description: Returns the current climate phase index
 
- Parameters: climate_phase_index()
 
- Return: int
 
- Function: god_manager
 
- Description: Returns the campaign model
 
- Parameters: god_manager()
 
- Return: GOD_MANAGER_SCRIPT_INTERFACE
 
- Function: whose_turn_is_it
 
- Description: Returns a faction script interface for the faction whose turn it currently is
 
- Parameters: whose_turn_is_it()
 
- Return: FACTION_SCRIPT_INTERFACE
 
- Function: is_turn_phase_normal
 
- Description: Are we in the normal turn phase of the current turn, where army movements are permitted?
 
- Parameters: is_turn_phase_normal()
 
- Return: bool
 
- Function: region_data
 
- Description: Returns a complete list of region data for the current campaign map
 
- Parameters: region_data()
 
- Return: REGION_DATA_LIST_SCRIPT_INTERFACE
 
- Function: land_region_data
 
- Description: Returns a list of region data for the current campaign map of the land type
 
- Parameters: land_region_data()
 
- Return: REGION_DATA_LIST_SCRIPT_INTERFACE
 
- Function: sea_region_data
 
- Description: Returns a list of region data for the current campaign map of the sea type
 
- Parameters: sea_region_data()
 
- Return: REGION_DATA_LIST_SCRIPT_INTERFACE
 
- Function: region_data_at_position
 
- Description: Returns the region data at the specified logical hex position. Null if the position is off map
 
- Parameters: region_data_at_position(card16 x, card16 y)
 
- Return: REGION_DATA_SCRIPT_INTERFACE
 
- Function: get_civilization_level_int
 
- Description: Returns the index of the current civilization level set in the world
 
- Parameters: get_civilization_level_int()
 
- Return: int32