Warhammer 3 Events & Interfaces

Events

AreaEntered
AreaExited
BattleBeingFought
BattleCompleted
BattleCompletedCameraMove
BuildingCancelled
BuildingCompleted
BuildingConstructionIssuedByPlayer
BuildingLifecycleDevelops
CampaignArmiesMerge
CampaignBuildingDamaged
CampaignCoastalAssaultOnCharacter
CampaignCoastalAssaultOnGarrison
CampaignEffectsBundleAwarded
CaravanCompleted
CaravanEvent
CaravanMoved
CaravanRecruited
CaravanReturned
CaravanSpawned
CaravanWaylaid
CharacterAncillaryGained
CharacterArmoryItemEquipped
CharacterArmoryItemEvent
CharacterArmoryItemUnequipped
CharacterArmoryItemUnlocked
CharacterAttacksAlly
CharacterBecomesFactionLeader
CharacterBesiegesSettlement
CharacterBlockadedPort
CharacterBrokePortBlockade
CharacterCanLiberate
CharacterCandidateBecomesMinister
CharacterCapturedSettlementUnopposed
CharacterCharacterTargetAction
CharacterComesOfAge
CharacterCompletedBattle
CharacterConvalescedOrKilled
CharacterCreated
CharacterDestroyed
CharacterDiscovered
CharacterDisembarksNavy
CharacterEmbarksNavy
CharacterEntersAttritionalArea
CharacterEntersGarrison
CharacterEvent
CharacterFactionCompletesResearch
CharacterFamilyRelationDied
CharacterFinishedMovingEvent
CharacterGarrisonTargetAction
CharacterGarrisonTargetEvent
CharacterInfoPanelOpened
CharacterInitiativeActivationChangedEvent
CharacterInitiativeEvent
CharacterLeavesGarrison
CharacterLoanedEvent
CharacterLootedSettlement
CharacterMarriage
CharacterMilitaryForceTraditionPointAllocated
CharacterMilitaryForceTraditionPointAvailable
CharacterParticipatedAsSecondaryGeneralInBattle
CharacterPerformsActionAgainstFriendlyTarget
CharacterPerformsSettlementOccupationDecision
CharacterPostBattleCaptureOption
CharacterPostBattleEnslave
CharacterPostBattleRelease
CharacterPostBattleSlaughter
CharacterPromoted
CharacterRankUp
CharacterRankUpNeedsAncillary
CharacterRazedSettlement
CharacterRecruited
CharacterRelativeKilled
CharacterSackedSettlement
CharacterSelected
CharacterSkillPointAllocated
CharacterSkillPointAvailable
CharacterTargetEvent
CharacterTurnEnd
CharacterTurnStart
CharacterWaaaghOccurred
CharacterWithdrewFromBattle
ClanBecomesVassal
ClimatePhaseChange
CorruptionCounterIntervalEvent
DebugCharacterEvent
DebugFactionEvent
DebugRegionEvent
DilemmaChoiceMadeEvent
DilemmaEvent
DilemmaGenerationFailedEvent
DilemmaIssued
DiplomacyManipulationExecutedEvent
DiplomaticOfferRejected
EventFeedEventRecordedEvent
FactionAboutToEndTurn
FactionBecomesActiveHuman
FactionBecomesIdleHuman
FactionBecomesLiberationVassal
FactionBeginTurnPhaseNormal
FactionBribesUnit
FactionCharacterTagAddedEvent
FactionCharacterTagEntryEvent
FactionCharacterTagRemovedEvent
FactionCivilWarOccured
FactionCookedDish
FactionEncountersOtherFaction
FactionEvent
FactionGainedAncillary
FactionGovernmentTypeChanged
FactionJoinsConfederation
FactionLeaderDeclaresWar
FactionLeaderIssuesEdict
FactionLeaderSignsPeaceTreaty
FactionLiberated
FactionRoundStart
FactionSubjugatesOtherFaction
FactionTurnEnd
FactionTurnStart
FirstTickAfterNewCampaignStarted
FirstTickAfterWorldCreated
ForceAdoptsStance
ForeignBuildingCancelled
ForeignSlotBuildingCompleteEvent
ForeignSlotBuildingDamagedEvent
ForeignSlotManagerCreatedEvent
ForeignSlotManagerDiscoveredEvent
ForeignSlotManagerRemovedEvent
GarrisonAttackedEvent
GarrisonOccupiedEvent
GarrisonResidenceEvent
GarrisonResidenceExposedToFaction
GovernorAssignedCharacterEvent
HaveCharacterWithinRangeOfPositionMissionEvaluationResultEvent
ImprisonmentEvent
ImprisonmentRejectionEvent
IncidentEvent
IncidentFailedEvent
IncidentOccuredEvent
LandTradeRouteRaided
MilitaryForceBuildingCancelled
MilitaryForceBuildingCompleteEvent
MilitaryForceCreated
MilitaryForceDevelopmentPointChange
MilitaryForceInfectionEvent
MissionCancelled
MissionEvent
MissionFailed
MissionGenerationFailed
MissionIssued
MissionNearingExpiry
MissionStatusEvent
MissionSucceeded
MovementPointsExhausted
MultiTurnMove
NegativeDiplomaticEvent
NewCampaignStarted
NewCharacterEnteredRecruitmentPool
NominalDifficultyLevelChangedEvent
PendingBankruptcy
PendingBattle
PooledResourceChanged
PooledResourceEffectChangedEvent
PooledResourceEvent
PooledResourceThresholdOperationReached
PositiveDiplomaticEvent
PrisonActionTakenEvent
ProvinceGovernorAppointed
ProvinceGovernorMoved
ProvinceGovernorshipNewDecisionAvailable
QueryShouldWaylayCaravan
QueryTeleportationNetworkHandoverNodeClosure
QueryTeleportationNetworkShouldHandoverCharacterNodeClosure
RecruitmentItemCancelledByPlayer
RecruitmentItemIssuedByPlayer
RegionAbandonedWithBuildingEvent
RegionBuildingCancelled
RegionEvent
RegionFactionChangeEvent
RegionInfectionEvent
RegionIssuesDemands
RegionPlagueStateChanged
RegionRebels
RegionRiots
RegionSelected
RegionSlotEvent
RegionStrikes
RegionTurnEnd
RegionTurnStart
ResearchCompleted
ResearchStarted
RitualCancelledEvent
RitualCompletedEvent
RitualEvent
RitualStartedEvent
RitualsCompletedAndDelayedEvent
ScriptedCharacterUnhidden
ScriptedCharacterUnhiddenFailed
SeaTradeRouteRaided
SettlementSelected
SharedStateChanged
SharedStateRemoved
SlotOpens
SlotRoundStart
SlotSelected
SlotTurnStart
SpawnableForceCreatedEvent
StreakEffectLevelsEntered
TeleportationNetworkCharacterInteractionStarted
TeleportationNetworkCharacterNodeClosureHandedOver
TeleportationNetworkMoveCompleted
TeleportationNetworkMoveStart
TeleportationNetworkNodeClosed
TeleportationNetworkNodeEvent
TeleportationNetworkNodeOpened
TradeNodeConnected
TradeRouteEstablished
TriggerPostBattleAncillaries
UITrigger
UniqueAgentDespawned
UniqueAgentEvent
UniqueAgentSpawned
UnitCompletedBattle
UnitConverted
UnitCreated
UnitDisbanded
UnitEffectPurchased
UnitEffectUnpurchased
UnitEvent
UnitMergedAndDestroyed
UnitSelectedCampaign
UnitTrained
UnitTurnEnd
WarCoordinationRequestIssued
WoMCompassUserActionTriggeredEvent
WoMCompassUserDirectionSelectedEvent
WorldCreated
WorldStartRound

Interfaces

ACTIVE_RITUAL_LIST_SCRIPT_INTERFACE
ACTIVE_RITUAL_SCRIPT_INTERFACE
ARMORY_SCRIPT_INTERFACE
BONUS_VALUES_SCRIPT_INTERFACE
BUILDING_LIST_SCRIPT_INTERFACE
BUILDING_SCRIPT_INTERFACE
CAMPAIGN_AI_SCRIPT_INTERFACE
CAMPAIGN_DILEMMA_BUILDER_SCRIPT_INTERFACE
CAMPAIGN_MISSION_SCRIPT_INTERFACE
CAMPAIGN_PAYLOAD_BUILDER_SCRIPT_INTERFACE
CARAVANS_SYSTEM_SCRIPT_INTERFACE
CARAVAN_LIST_SCRIPT_INTERFACE
CARAVAN_RECRUITMENT_ITEM_LIST_SCRIPT_INTERFACE
CARAVAN_RECRUITMENT_ITEM_SCRIPT_INTERFACE
CARAVAN_SCRIPT_INTERFACE
CHARACTER_DETAILS_LIST_SCRIPT_INTERFACE
CHARACTER_DETAILS_SCRIPT_INTERFACE
CHARACTER_IMPRISONMENT_REJECTION_REASON_MASK_SCRIPTING_INTERFACE
CHARACTER_INITIATIVE_LIST_SCRIPT_INTERFACE
CHARACTER_INITIATIVE_SCRIPT_INTERFACE
CHARACTER_INITIATIVE_SET_LIST_SCRIPT_INTERFACE
CHARACTER_INITIATIVE_SET_SCRIPT_INTERFACE
CHARACTER_INITIATIVE_STATUS_SCRIPT_INTERFACE
CHARACTER_LIST_SCRIPT_INTERFACE
CHARACTER_OBSERVATION_OPTIONS_SCRIPT_INTERFACE
CHARACTER_SCRIPT_INTERFACE
COOKING_DISH_SCRIPT_INTERFACE
COOKING_SYSTEM_SCRIPT_INTERFACE
CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE
DEBUG_DRAWING_SCRIPT_INTERFACE
EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE
EFFECT_BUNDLE_SCRIPT_INTERFACE
EFFECT_LIST_SCRIPT_INTERFACE
EFFECT_SCRIPT_INTERFACE
FACTION_CARAVANS_SCRIPT_INTERFACE
FACTION_CHARACTER_TAGGING_SYSTEM_SCRIPT_INTERFACE
FACTION_CHARACTER_TAG_ENTRY_LIST_SCRIPT_INTERFACE
FACTION_CHARACTER_TAG_ENTRY_SCRIPT_INTERFACE
FACTION_COOKING_INFO_SCRIPT_INTERFACE
FACTION_LIST_SCRIPT_INTERFACE
FACTION_PROVINCE_MANAGER_LIST_SCRIPT_INTERFACE
FACTION_PROVINCE_MANAGER_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
MILITARY_FORCE_LIST_SCRIPT_INTERFACE
MILITARY_FORCE_SCRIPT_INTERFACE
MILITARY_FORCE_SLOT_SCRIPT_INTERFACE
MILITARY_FORCE_TYPE_SCRIPT_INTERFACE
MODEL_SCRIPT_INTERFACE
MODIFY_RITUAL_PERFORMING_CHARACTER_LIST_SCRIPT_INTERFACE
MODIFY_RITUAL_PERFORMING_CHARACTER_SCRIPT_INTERFACE
MODIFY_RITUAL_SETUP_SCRIPT_INTERFACE
MODIFY_RITUAL_TARGET_SCRIPT_INTERFACE
NULL_SCRIPT_INTERFACE
OBSERVATION_OPTIONS_SCRIPT_INTERFACE
PENDING_BATTLE_SCRIPT_INTERFACE
PLAGUE_SCRIPT_INTERFACE
POOLED_RESOURCE_FACTOR_LIST_SCRIPT_INTERFACE
POOLED_RESOURCE_FACTOR_SCRIPT_INTERFACE
POOLED_RESOURCE_LIST_SCRIPT_INTERFACE
POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE
POOLED_RESOURCE_SCRIPT_INTERFACE
PRISON_SYSTEM_SCRIPT_INTERFACE
PROVINCE_LIST_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
RITUAL_PERFORMING_CHARACTER_LIST_SCRIPT_INTERFACE
RITUAL_PERFORMING_CHARACTER_SCRIPT_INTERFACE
RITUAL_PERFORMING_CHARACTER_STATUS_SCRIPT_INTERFACE
RITUAL_SETUP_SCRIPT_INTERFACE
RITUAL_STATUS_SCRIPT_INTERFACE
RITUAL_TARGET_FACTION_STATUS_SCRIPT_INTERFACE
RITUAL_TARGET_MILITARY_FORCE_STATUS_SCRIPT_INTERFACE
RITUAL_TARGET_REGION_STATUS_SCRIPT_INTERFACE
RITUAL_TARGET_SCRIPT_INTERFACE
ROUTE_NETWORK_SCRIPT_INTERFACE
ROUTE_NODE_LIST_SCRIPT_INTERFACE
ROUTE_NODE_SCRIPT_INTERFACE
ROUTE_PATH_SCRIPT_INTERFACE
ROUTE_POSITION_SCRIPT_INTERFACE
ROUTE_SEGMENT_LIST_SCRIPT_INTERFACE
ROUTE_SEGMENT_SCRIPT_INTERFACE
SEA_REGION_LIST_SCRIPT_INTERFACE
SEA_REGION_MANAGER_SCRIPT_INTERFACE
SEA_REGION_SCRIPT_INTERFACE
SETTLEMENT_SCRIPT_INTERFACE
SHARED_STATES_MANAGER_SCRIPT_INTERFACE
SLOT_LIST_SCRIPT_INTERFACE
SLOT_SCRIPT_INTERFACE
TELEPORTATION_NETWORK_LIST_SCRIPT_INTERFACE
TELEPORTATION_NETWORK_SCRIPT_INTERFACE
TELEPORTATION_NETWORK_SYSTEM_SCRIPT_INTERFACE
TELEPORTATION_NODE_LIST_SCRIPT_INTERFACE
TELEPORTATION_NODE_RECORD_LIST_SCRIPT_INTERFACE
TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
TELEPORTATION_NODE_SCRIPT_INTERFACE
UNIQUE_AGENT_DETAILS_LIST_SCRIPT_INTERFACE
UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
UNIT_LIST_SCRIPT_INTERFACE
UNIT_PURCHASABLE_EFFECT_LIST_SCRIPT_INTERFACE
UNIT_PURCHASABLE_EFFECT_SCRIPT_INTERFACE
UNIT_SCRIPT_INTERFACE
WAR_COORDINATION_SCRIPT_INTERFACE
WOM_COMPASS_SCRIPT_INTERFACE
WORLD_SCRIPT_INTERFACE

Event Functions

AreaEntered

Function Name: area_key
Interface: NONE
Description: Key of the area triggered

Function Name: family_member
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Family member of the character that entered the area

AreaExited

Function Name: area_key
Interface: NONE
Description: ID of the area triggered

Function Name: family_member
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Family member of the character that exited the area

BattleBeingFought

Function Name: is_autoresolved
Interface: none
Description: Is the battle being fought autoresolved

BattleCompleted

Function Name: model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model in the event

BattleCompletedCameraMove

Function Name: model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model in the event

BuildingCancelled

Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event

BuildingCompleted

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

BuildingConstructionIssuedByPlayer

Function Name: building
Interface: NONE
Description: Access the building in the event

Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event

BuildingLifecycleDevelops

Function Name: previous
Interface: NONE
Description: Record key of the previous lifecycle building level

Function Name: current
Interface: BUILDING_SCRIPT_INTERFACE
Description: Record key of the current lifecycle building level. Empty if the building has been destroyed

Function Name: has_restarted
Interface: NONE
Description: Is this building restarting its lifecycle?

Function Name: has_ended
Interface: NONE
Description: Has this building completed its lifecycle and is not restarting?

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Region that contains this building

CampaignArmiesMerge

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

CampaignBuildingDamaged

Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event

CampaignCoastalAssaultOnCharacter

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

CampaignCoastalAssaultOnGarrison

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

CampaignEffectsBundleAwarded

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

CaravanCompleted

Function Name: cargo
Interface: NONE
Description: Amount of cargo the caravan was completed with

Function Name: cargo_value
Interface: NONE
Description: Total value the caravan cargo was sold for

Function Name: complete_position
Interface: NONE
Description: Route position that the journey was completed at

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

Function Name: caravan_master
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the caravan master in the event

Function Name: caravan
Interface: CARAVAN_SCRIPT_INTERFACE
Description: Access the caravan in the event. Warning: This is a lookup

CaravanEvent

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

Function Name: caravan_master
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the caravan master in the event

Function Name: caravan
Interface: CARAVAN_SCRIPT_INTERFACE
Description: Access the caravan in the event. Warning: This is a lookup

CaravanMoved

Function Name: from
Interface: ROUTE_POSITION_SCRIPT_INTERFACE
Description: The route position the caravan move from

Function Name: to
Interface: ROUTE_POSITION_SCRIPT_INTERFACE
Description: The route position the caravan move to

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

Function Name: caravan_master
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the caravan master in the event

Function Name: caravan
Interface: CARAVAN_SCRIPT_INTERFACE
Description: Access the caravan in the event. Warning: This is a lookup

CaravanRecruited

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

Function Name: caravan_master
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the caravan master in the event

Function Name: caravan
Interface: CARAVAN_SCRIPT_INTERFACE
Description: Access the caravan in the event. Warning: This is a lookup

CaravanReturned

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

Function Name: caravan_master
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the caravan master in the event

Function Name: caravan
Interface: CARAVAN_SCRIPT_INTERFACE
Description: Access the caravan in the event. Warning: This is a lookup

CaravanSpawned

Function Name: cargo
Interface: NONE
Description: Amount of cargo the caravan was spawned with

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

Function Name: caravan_master
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the caravan master in the event

Function Name: caravan
Interface: CARAVAN_SCRIPT_INTERFACE
Description: Access the caravan in the event. Warning: This is a lookup

CaravanWaylaid

Function Name: context
Interface: NONE
Description: Context string provided by script when the caravan was flagged

Function Name: from
Interface: ROUTE_POSITION_SCRIPT_INTERFACE
Description: The route position the caravan move from

Function Name: to
Interface: ROUTE_POSITION_SCRIPT_INTERFACE
Description: The route position the caravan move to

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

Function Name: caravan_master
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the caravan master in the event

Function Name: caravan
Interface: CARAVAN_SCRIPT_INTERFACE
Description: Access the caravan in the event. Warning: This is a lookup

CharacterAncillaryGained

Function Name: ancillary
Interface: NONE
Description: Access the ancillary gained

CharacterArmoryItemEquipped

Function Name: item_variant_key
Interface: NONE
Description: Key of the armory item variant equipped

CharacterArmoryItemEvent

Function Name: item_variant_key
Interface: NONE
Description: Key of the armory item variant equipped

CharacterArmoryItemUnequipped

Function Name: item_variant_key
Interface: NONE
Description: Key of the armory item variant equipped

CharacterArmoryItemUnlocked

Function Name: armory_item
Interface: NONE
Description: Access the unlocked armory item

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterAttacksAlly

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

CharacterBecomesFactionLeader

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterBesiegesSettlement

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region besieged

CharacterBlockadedPort

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

CharacterBrokePortBlockade

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterCanLiberate

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterCandidateBecomesMinister

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterCapturedSettlementUnopposed

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

CharacterCharacterTargetAction

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

CharacterComesOfAge

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterCompletedBattle

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

CharacterConvalescedOrKilled

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterCreated

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterDestroyed

Function Name: family_member
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Family Member of the character that was destroyed

CharacterDiscovered

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterDisembarksNavy

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterEmbarksNavy

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterEntersAttritionalArea

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterEntersGarrison

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

CharacterEvent

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterFactionCompletesResearch

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterFamilyRelationDied

Function Name: relationship
Interface: NONE
Description: Access the relationship to the dead character

CharacterFinishedMovingEvent

Function Name: was_flee
Interface: NONE
Description: Was the movement a result of fleeing?

CharacterGarrisonTargetAction

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

CharacterGarrisonTargetEvent

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

CharacterInfoPanelOpened

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterInitiativeActivationChangedEvent

Function Name: active
Interface: NONE
Description: Whether the initiative is now active or not

Function Name: initiative
Interface: CHARACTER_INITIATIVE_SCRIPT_INTERFACE
Description: Initiative interface

Function Name: initiative_set
Interface: CHARACTER_INITIATIVE_SET_SCRIPT_INTERFACE
Description: Initiative set interface

CharacterInitiativeEvent

Function Name: initiative
Interface: CHARACTER_INITIATIVE_SCRIPT_INTERFACE
Description: Initiative interface

Function Name: initiative_set
Interface: CHARACTER_INITIATIVE_SET_SCRIPT_INTERFACE
Description: Initiative set interface

CharacterLeavesGarrison

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

CharacterLoanedEvent

Function Name: original_faction
Interface: NONE
Description: Access the original faction

CharacterLootedSettlement

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

CharacterMarriage

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterMilitaryForceTraditionPointAllocated

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

CharacterMilitaryForceTraditionPointAvailable

Function Name: military_force
Interface: MILITARY_FORCE_SCRIPT_INTERFACE
Description: Access the military force the tradition is available to

CharacterParticipatedAsSecondaryGeneralInBattle

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterPerformsActionAgainstFriendlyTarget

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterPerformsSettlementOccupationDecision

Function Name: occupation_decision
Interface: NONE
Description: Access the key for the culture_settlement_occupation_option record in the event

Function Name: settlement_option
Interface: NONE
Description: Access the settlement option key for the culture_settlement_occupation_option record in the event

Function Name: occupation_decision_type
Interface: NONE
Description: Access the occuptation type key for the event

Function Name: previous_owner
Interface: NONE
Description: Access the previous owner faction key. Empty if rebels

Function Name: previous_owner_subculture
Interface: NONE
Description: Access the previous owner subculture key. Empty if rebels

Function Name: previous_owner_culture
Interface: NONE
Description: Access the previous owner culture key. Empty if rebels

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

CharacterPostBattleCaptureOption

Function Name: get_record_key
Interface: NONE
Description: Returns the post battle captive option record.

Function Name: get_outcome_key
Interface: NONE
Description: Returns the outcome key of the selected captive option.

CharacterPostBattleEnslave

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterPostBattleRelease

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterPostBattleSlaughter

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterPromoted

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterRankUp

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterRankUpNeedsAncillary

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterRazedSettlement

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

CharacterRecruited

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterRelativeKilled

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterSackedSettlement

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

CharacterSelected

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterSkillPointAllocated

Function Name: skill_point_spent_on
Interface: NONE
Description: Access the skill allocated

CharacterSkillPointAvailable

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterTargetEvent

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

CharacterTurnEnd

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterTurnStart

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterWaaaghOccurred

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

CharacterWithdrewFromBattle

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

ClanBecomesVassal

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

ClimatePhaseChange

Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world in the event

CorruptionCounterIntervalEvent

Function Name: counter
Interface: NONE
Description: The counter record

Function Name: interval
Interface: NONE
Description: The interval record

Function Name: is_entrance
Interface: NONE
Description: Was the interval entered?

Function Name: is_lower_bound
Interface: NONE
Description: Was the interval entered/exited from the lower bound?

DebugCharacterEvent

Function Name: id
Interface: NONE
Description: Access event id

DebugFactionEvent

Function Name: id
Interface: NONE
Description: Access event id

DebugRegionEvent

Function Name: id
Interface: NONE
Description: Access event id

DilemmaChoiceMadeEvent

Function Name: choice_key
Interface: NONE
Description: Access the choice made for the dilemma in the event

Function Name: choice
Interface: NONE
Description: Index of 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

DilemmaEvent

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

DilemmaGenerationFailedEvent

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

DilemmaIssued

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

DiplomacyManipulationExecutedEvent

Function Name: performing_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the performing faction in the event

Function Name: diplomacy_target_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the target faction in the event

Function Name: diplomacy_manipulation_category
Interface: NONE
Description: Access the diplomacy manipulation category in the event

DiplomaticOfferRejected

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

EventFeedEventRecordedEvent

Function Name: event_key
Interface: NONE
Description: The database record key of the event that was recorded

FactionAboutToEndTurn

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FactionBecomesActiveHuman

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FactionBecomesIdleHuman

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FactionBecomesLiberationVassal

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

FactionBeginTurnPhaseNormal

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FactionBribesUnit

Function Name: ancillary
Interface: NONE
Description: Access the unit bribed by the faction

FactionCharacterTagAddedEvent

Function Name: tagging_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Faction that owns the tag

Function Name: tag_entry
Interface: FACTION_CHARACTER_TAG_ENTRY_SCRIPT_INTERFACE
Description: Faction character tag interface

FactionCharacterTagEntryEvent

Function Name: tagging_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Faction that owns the tag

Function Name: tag_entry
Interface: FACTION_CHARACTER_TAG_ENTRY_SCRIPT_INTERFACE
Description: Faction character tag interface

FactionCharacterTagRemovedEvent

Function Name: tagging_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Faction that owns the tag

Function Name: tag_entry
Interface: FACTION_CHARACTER_TAG_ENTRY_SCRIPT_INTERFACE
Description: Faction character tag interface

FactionCivilWarOccured

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

FactionCookedDish

Function Name: dish
Interface: COOKING_DISH_SCRIPT_INTERFACE
Description: Access the dish that was cooked

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FactionEncountersOtherFaction

Function Name: other_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the other faction in the event

FactionEvent

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FactionGainedAncillary

Function Name: ancillary
Interface: NONE
Description: Access the ancillary gained by the faction

FactionGovernmentTypeChanged

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FactionJoinsConfederation

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

FactionLeaderDeclaresWar

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

FactionLeaderIssuesEdict

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

FactionLeaderSignsPeaceTreaty

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

FactionLiberated

Function Name: liberating_character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character involved in the liberation

FactionRoundStart

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FactionSubjugatesOtherFaction

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

FactionTurnEnd

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FactionTurnStart

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

FirstTickAfterNewCampaignStarted

Function Name: model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model in the event

FirstTickAfterWorldCreated

Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world in the event

ForceAdoptsStance

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

ForeignBuildingCancelled

Function Name: slot
Interface: FOREIGN_SLOT_SCRIPT_INTERFACE
Description: Access the building slot in the event

Function Name: key
Interface: NONE
Description: Key of the canceld building

Function Name: chain
Interface: NONE
Description: Chain of the canceld building

Function Name: superchain
Interface: NONE
Description: Superchain of the canceld building

ForeignSlotBuildingCompleteEvent

Function Name: building
Interface: NONE
Description: Key of the building constructed

Function Name: slot_manager
Interface: FOREIGN_SLOT_MANAGER_SCRIPT_INTERFACE
Description: Slot manager for this slot

ForeignSlotBuildingDamagedEvent

Function Name: building
Interface: NONE
Description: Key of the building damaged

ForeignSlotManagerCreatedEvent

Function Name: requesting_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Faction script interface for the requesting faction that created the slot manager.

Function Name: slot_owner
Interface: FACTION_SCRIPT_INTERFACE
Description: Faction script interface for the slot owner.

Function Name: is_allied
Interface: NONE
Description: Whether the slot manager is allied or not.

ForeignSlotManagerDiscoveredEvent

Function Name: owner
Interface: FACTION_SCRIPT_INTERFACE
Description: Faction script interface for the foreign slot manager's owner

Function Name: discoveree
Interface: FACTION_SCRIPT_INTERFACE
Description: Faction script interface for the faction that discovered the foreign slot manager

Function Name: slot_manager
Interface: FOREIGN_SLOT_MANAGER_SCRIPT_INTERFACE
Description: Slot manager for this event

ForeignSlotManagerRemovedEvent

Function Name: owner
Interface: FACTION_SCRIPT_INTERFACE
Description: Faction script interface for the foreign slot manager's owner

Function Name: remover
Interface: FACTION_SCRIPT_INTERFACE
Description: Faction script interface for the faction that discovered the foreign slot manager

Function Name: cause_was_razing
Interface: FOREIGN_SLOT_MANAGER_SCRIPT_INTERFACE
Description: Whether this event was caused by a raze action

GarrisonAttackedEvent

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

GarrisonOccupiedEvent

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

GarrisonResidenceEvent

Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event

GarrisonResidenceExposedToFaction

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

GovernorAssignedCharacterEvent

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

HaveCharacterWithinRangeOfPositionMissionEvaluationResultEvent

Function Name: mission_key
Interface: NONE
Description: Will return the key for the mission that was evaluated.

Function Name: mission_cqi
Interface: NONE
Description: Will return the CQI for the mission that was evaluated.

Function Name: was_successful
Interface: NONE
Description: Will return whether the character fulfilled the missions completion conditions or not.

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

ImprisonmentEvent

Function Name: prisoner_family_member
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the prisoner in the event

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

ImprisonmentRejectionEvent

Function Name: prisoner_family_member
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the prisoner in the event

Function Name: rejection_reasons
Interface: CHARACTER_IMPRISONMENT_REJECTION_REASON_MASK_SCRIPTING_INTERFACE
Description: Access the reasons beyond the rejection

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

IncidentEvent

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

IncidentFailedEvent

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

Function Name: record_key
Interface: NONE
Description: Get the name of the INCIDENT_RECORD that is associated with this event

IncidentOccuredEvent

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

LandTradeRouteRaided

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

MilitaryForceBuildingCancelled

Function Name: slot
Interface: MILITARY_FORCE_SLOT_SCRIPT_INTERFACE
Description: Access the building slot in the event

Function Name: key
Interface: NONE
Description: Key of the canceld building

Function Name: chain
Interface: NONE
Description: Chain of the canceld building

Function Name: superchain
Interface: NONE
Description: Superchain of the canceld building

MilitaryForceBuildingCompleteEvent

Function Name: building
Interface: NONE
Description: Key of the building constructed

MilitaryForceCreated

Function Name: military_force_created
Interface: MILITARY_FORCE_SCRIPT_INTERFACE
Description: Access the military force created

MilitaryForceDevelopmentPointChange

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

MilitaryForceInfectionEvent

Function Name: target_force
Interface: MILITARY_FORCE_SCRIPT_INTERFACE
Description: The target military force

Function Name: is_creation
Interface: NONE
Description: Has the infection been created or has it expired

Function Name: plague
Interface: PLAGUE_SCRIPT_INTERFACE
Description: The plague interface

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

MissionCancelled

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

MissionEvent

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

MissionFailed

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

MissionGenerationFailed

Function Name: mission
Interface: NONE
Description: Access the ID of the mission

MissionIssued

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

MissionNearingExpiry

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

MissionStatusEvent

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

MissionSucceeded

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

MovementPointsExhausted

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

MultiTurnMove

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

NegativeDiplomaticEvent

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: FACTION_SCRIPT_INTERFACE
Description: Was the event a broken alliance?

Function Name: was_military_alliance
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event a broken military alliance?

Function Name: was_defensive_alliance
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event a broken defensive alliance?

Function Name: is_war
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event a declaration of war?

Function Name: was_military_access
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event ending military access?

Function Name: was_trade_agreement
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event ending a trade agreement?

Function Name: was_non_aggression_pact
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event breaking a non-aggression pact?

Function Name: was_vassalage
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event breaking a vassalage?

Function Name: proposer_was_vassal
Interface: FACTION_SCRIPT_INTERFACE
Description: When the event was breaking a vassalage, was the proposer the vassal, or was the recipient?

Function Name: result_of_confederation
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the negative event the result of the faction being confederated?

NewCampaignStarted

Function Name: model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model in the event

NewCharacterEnteredRecruitmentPool

Function Name: character_details
Interface: CHARACTER_DETAILS_SCRIPT_INTERFACE
Description: Access the character details in the event

NominalDifficultyLevelChangedEvent

Function Name: model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model in the event

PendingBankruptcy

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

PendingBattle

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

PooledResourceChanged

Function Name: factor
Interface: POOLED_RESOURCE_FACTOR_SCRIPT_INTERFACE
Description: Factor of the pooled resource change

Function Name: amount
Interface: NONE
Description: Amount the pooled resource has changed by

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction that owns the resource

Function Name: has_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Does a faction own the resource? This is true for faction, character, military force pooled resources etc, false for provinces and others.

Function Name: resource
Interface: POOLED_RESOURCE_SCRIPT_INTERFACE
Description: Access the resource interface

PooledResourceEffectChangedEvent

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: has_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Does a faction own the resource? This is true for faction, character, military force pooled resources etc, false for provinces and others.

Function Name: resource
Interface: POOLED_RESOURCE_SCRIPT_INTERFACE
Description: Access the resource interface

PooledResourceEvent

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction that owns the resource

Function Name: has_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Does a faction own the resource? This is true for faction, character, military force pooled resources etc, false for provinces and others.

Function Name: resource
Interface: POOLED_RESOURCE_SCRIPT_INTERFACE
Description: Access the resource interface

PooledResourceThresholdOperationReached

Function Name: pooled_threshold_operation_record
Interface: NONE
Description: Access pooled resource threshold operation record

PositiveDiplomaticEvent

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_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: 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_state_gift
Interface: FACTION_SCRIPT_INTERFACE
Description: Is the event a state gift?

Function Name: state_gift_amount
Interface: FACTION_SCRIPT_INTERFACE
Description: What's the value of the gift?

PrisonActionTakenEvent

Function Name: prisoner_family_member
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the prisoner in the event

Function Name: action_key
Interface: String
Description: Access the action key in the event

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

ProvinceGovernorAppointed

Function Name: province
Interface: PROVINCE_SCRIPT_INTERFACE
Description: Access the province in the event

Function Name: family_member
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the family member interface of the governor character

ProvinceGovernorMoved

Function Name: from_province
Interface: PROVINCE_SCRIPT_INTERFACE
Description: Access the province being moved from

Function Name: to_province
Interface: PROVINCE_SCRIPT_INTERFACE
Description: Access the province being moved to

Function Name: family_member
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the family member interface of the governor character

ProvinceGovernorshipNewDecisionAvailable

Function Name: province
Interface: PROVINCE_SCRIPT_INTERFACE
Description: Access the province in the event

Function Name: campaign_decision_record
Interface: NONE
Description: Access the campaign_decision record in the event

QueryShouldWaylayCaravan

Function Name: flag_for_waylay
Interface: NONE
Description: flag_for_waylay(String context); If called, will set the waylay flag for this caravan. Expects a string paramater to provide context for followup events. The move will be interrupted and script takes responsibility for what happens to the caravan this turn

Function Name: from
Interface: ROUTE_POSITION_SCRIPT_INTERFACE
Description: The route position the caravan move from

Function Name: to
Interface: ROUTE_POSITION_SCRIPT_INTERFACE
Description: The route position the caravan move to

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

Function Name: caravan_master
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Access the caravan master in the event

Function Name: caravan
Interface: CARAVAN_SCRIPT_INTERFACE
Description: Access the caravan in the event. Warning: This is a lookup

QueryTeleportationNetworkHandoverNodeClosure

Function Name: node_key
Interface: NONE
Description: Key of the nodes database record

Function Name: template_key
Interface: NONE
Description: Key of the nodes template record

Function Name: node_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface

QueryTeleportationNetworkShouldHandoverCharacterNodeClosure

Function Name: character_family_member
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Family member script interface of the closing character

Function Name: flag_for_script_handover
Interface: NONE
Description: Call to suppress closure of the node from code and have script take responsibility for it

RecruitmentItemCancelledByPlayer

Function Name: main_unit_record
Interface: NONE
Description: Access unit record

RecruitmentItemIssuedByPlayer

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

RegionAbandonedWithBuildingEvent

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

RegionBuildingCancelled

Function Name: slot
Interface: SLOT_SCRIPT_INTERFACE
Description: Access the building slot in the event

Function Name: key
Interface: NONE
Description: Key of the canceld building

Function Name: chain
Interface: NONE
Description: Chain of the canceld building

Function Name: superchain
Interface: NONE
Description: Superchain of the canceld building

RegionEvent

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

RegionFactionChangeEvent

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: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

RegionInfectionEvent

Function Name: target_region
Interface: REGION_SCRIPT_INTERFACE
Description: The target region

Function Name: is_creation
Interface: NONE
Description: Has the infection been created or has it expired

Function Name: plague
Interface: PLAGUE_SCRIPT_INTERFACE
Description: The plague interface

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

RegionIssuesDemands

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

RegionPlagueStateChanged

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

RegionRebels

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

RegionRiots

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

RegionSelected

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

RegionSlotEvent

Function Name: region_slot
Interface: SLOT_SCRIPT_INTERFACE
Description: Access the region slot in the event

RegionStrikes

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

RegionTurnEnd

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

RegionTurnStart

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event

ResearchCompleted

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

ResearchStarted

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

RitualCancelledEvent

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

RitualCompletedEvent

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

RitualEvent

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

RitualStartedEvent

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

RitualsCompletedAndDelayedEvent

Function Name: rituals
Interface: ACTIVE_RITUAL_LIST_SCRIPT_INTERFACE
Description: The active rituals that have been delayed

ScriptedCharacterUnhidden

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

ScriptedCharacterUnhiddenFailed

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

SeaTradeRouteRaided

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

SettlementSelected

Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event

SharedStateChanged

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

SharedStateRemoved

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

SlotOpens

Function Name: region_slot
Interface: SLOT_SCRIPT_INTERFACE
Description: Access the region slot in the event

SlotRoundStart

Function Name: region_slot
Interface: SLOT_SCRIPT_INTERFACE
Description: Access the region slot in the event

SlotSelected

Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event

SlotTurnStart

Function Name: region_slot
Interface: SLOT_SCRIPT_INTERFACE
Description: Access the region slot in the event

SpawnableForceCreatedEvent

Function Name: parent_character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the parent character in the event

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

StreakEffectLevelsEntered

Function Name: military_force
Interface: MILITARY_FORCE_SCRIPT_INTERFACE
Description: Access the military force

Function Name: streak_effect_record
Interface: none
Description: Access the newly activated streak effect record

TeleportationNetworkCharacterInteractionStarted

Function Name: interacting_character
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Character that is interacting with the node

Function Name: node_key
Interface: NONE
Description: Key of the nodes database record

Function Name: template_key
Interface: NONE
Description: Key of the nodes template record. May be empty if the node has been closed

Function Name: node_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface

TeleportationNetworkCharacterNodeClosureHandedOver

Function Name: character_family_member
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Family member script interface of the closing character

Function Name: node_key
Interface: NONE
Description: Key of the nodes database record

Function Name: template_key
Interface: NONE
Description: Key of the nodes template record

Function Name: node_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface

TeleportationNetworkMoveCompleted

Function Name: from_key
Interface: NONE
Description: Key of the start nodes database record

Function Name: from_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface for the start node

Function Name: to_key
Interface: NONE
Description: Key of the end nodes database record

Function Name: to_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface for the end node

Function Name: character
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Character that is teleporting

Function Name: success
Interface: NONE
Description: Was this a successful move?

TeleportationNetworkMoveStart

Function Name: from_key
Interface: NONE
Description: Key of the start nodes database record

Function Name: from_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface for the start node

Function Name: to_key
Interface: NONE
Description: Key of the end nodes database record

Function Name: to_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface for the end node

Function Name: character
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Character that is teleporting

Function Name: node_key
Interface: NONE
Description: Key of the nodes database record

Function Name: template_key
Interface: NONE
Description: Key of the nodes template record

Function Name: node_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface

TeleportationNetworkNodeClosed

Function Name: closing_character
Interface: FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Character that closed the node. May be null.

Function Name: node_key
Interface: NONE
Description: Key of the nodes database record

Function Name: template_key
Interface: NONE
Description: Key of the nodes template record

Function Name: node_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface

TeleportationNetworkNodeEvent

Function Name: node_key
Interface: NONE
Description: Key of the nodes database record

Function Name: template_key
Interface: NONE
Description: Key of the nodes template record

Function Name: node_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface

TeleportationNetworkNodeOpened

Function Name: node_key
Interface: NONE
Description: Key of the nodes database record

Function Name: template_key
Interface: NONE
Description: Key of the nodes template record

Function Name: node_record
Interface: TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE
Description: Node record script interface

TradeNodeConnected

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event

TradeRouteEstablished

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

TriggerPostBattleAncillaries

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

UITrigger

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

UniqueAgentDespawned

Function Name: unique_agent_details
Interface: UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
Description: Access the unique agent details for this event

UniqueAgentEvent

Function Name: unique_agent_details
Interface: UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
Description: Access the unique agent details for this event

UniqueAgentSpawned

Function Name: unique_agent_details
Interface: UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
Description: Access the unique agent details for this event

UnitCompletedBattle

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event

UnitConverted

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

UnitCreated

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event

UnitDisbanded

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event

UnitEffectPurchased

Function Name: effect
Interface: UNIT_PURCHASABLE_EFFECT_SCRIPT_INTERFACE
Description: Access the new unit which the effect was purchased for

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event

UnitEffectUnpurchased

Function Name: effect
Interface: UNIT_PURCHASABLE_EFFECT_SCRIPT_INTERFACE
Description: Access the new unit which the effect was unpurchased for

UnitEvent

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event

UnitMergedAndDestroyed

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

UnitSelectedCampaign

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event

UnitTrained

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event

UnitTurnEnd

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event

WarCoordinationRequestIssued

Function Name: has_recipient_faction
Interface: NONE
Description: Is the request issued to a faction?

Function Name: recipient_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Get the faction this request is issued to

Function Name: has_recipient_military_force
Interface: NONE
Description: Is the request issued to a military force?

Function Name: recipient_military_force
Interface: MILITARY_FORCE_SCRIPT_INTERFACE
Description: Get the military force this request is issued to

Function Name: has_target_region
Interface: NONE
Description: Is the target of the request a region?

Function Name: target_region
Interface: REGION_SCRIPT_INTERFACE
Description: Get the region target of this request

Function Name: has_target_military_force
Interface: NONE
Description: Is the target of the request a military force?

Function Name: target_military_force
Interface: MILITARY_FORCE_SCRIPT_INTERFACE
Description: Get the military force target of this request

Function Name: is_offensive
Interface: NONE
Description: Is this a request to attack the target? If not, then it is to defend the target.

Function Name: favour_cost
Interface: NONE
Description: Get the favour cost of this request

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

WoMCompassUserActionTriggeredEvent

Function Name: direction
Interface: NONE
Description: Access the compass direction in the event

Function Name: action
Interface: NONE
Description: Access the compass action in the event

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

WoMCompassUserDirectionSelectedEvent

Function Name: direction
Interface: NONE
Description: Access the compass direction in the event

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event

WorldCreated

Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world in the event

WorldStartRound

Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world in the event

Interface Functions

ACTIVE_RITUAL_LIST_SCRIPT_INTERFACE

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

ACTIVE_RITUAL_SCRIPT_INTERFACE

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
ritual_target
characters_who_performed

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

Function: ritual_target
Description: The target of this ritual
Parameters: ritual_target()
Return: RITUAL_TARGET_SCRIPT_INTERFACE

Function: characters_who_performed
Description: The characters that performed this ritual
Parameters: characters_who_performed()
Return: FAMILY_MEMBER_LIST_SCRIPT_INTERFACE

ARMORY_SCRIPT_INTERFACE

Description: A way to get armory information for a family member. Owned by a family member

is_null_interface
get_all_active_variant_slot_states
get_currently_registered_armory_items
number_of_equipped_items_of_category
number_of_equipped_items_of_ui_type

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: get_all_active_variant_slot_states
Description: Get the current equipment state of the family member, please refer to the armory_slot_types table for their names and to ARMORY_SLOT_TYPE which position in your result will contain which your slot. slot entries can be null signifying an empty slot.
Parameters: get_all_active_variant_slot_states()
Return: String table

Function: get_currently_registered_armory_items
Description: Get the currently registered armory items of the family member.
Parameters: get_currently_registered_armory_items()
Return: String table

Function: number_of_equipped_items_of_category
Description: Get the number of equipped items belonging to a given category.
Parameters: number_of_equipped_items_of_category(String category_key)
Return: int

Function: number_of_equipped_items_of_ui_type
Description: Get the number of equipped items belonging to a given ui type.
Parameters: number_of_equipped_items_of_ui_type(String ui_type_key)
Return: int

BONUS_VALUES_SCRIPT_INTERFACE

Description: Bonus values for a campaign object

is_null_interface
agent_value
basic_value
building_chain_value
projectile_value
projectile_shot_type_value
subculture_value
faction_value
resource_value
unit_ability_value
missile_weapon_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
unit_set_special_ability_phase_value
loyalty_event_effect_value
pooled_resource_factor_junction_value
pooled_resource_value
special_ability_group_value
character_training_group_value
public_order_provider_value
scripted_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: 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: missile_weapon_value
Description: Returns a bonus value parameterised on a missile weapon
Parameters: missile_weapon_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: unit_set_special_ability_phase_value
Description: Returns a bonus value parameterised on a unit set and a special ability phase record
Parameters: unit_set_special_ability_phase_value(String unit_set_key, String special_ability_phase_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: special_ability_group_value
Description: Returns a bonus value parameterised on a special ability group record
Parameters: special_ability_group_value(String record_key, String bonus_value_id)
Return: float32

Function: character_training_group_value
Description: Returns a bonus value parameterised on a character training group record
Parameters: character_training_group_value(String record_key, String bonus_value_id)
Return: float32

Function: public_order_provider_value
Description: Returns a bonus value parameterised on a public order provider record
Parameters: public_order_provider_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

BUILDING_LIST_SCRIPT_INTERFACE

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

BUILDING_SCRIPT_INTERFACE

Description: Building script interface

is_null_interface
model
faction
unlocks_technologies
has_lifecycle
shadow_building_level
effects
region
slot
name
chain
superchain
percent_health
building_level

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: unlocks_technologies
Description: Does this building unlock any technologies when constructed?
Parameters: unlocks_technologies()
Return: bool

Function: has_lifecycle
Description: Does this building have a lifecycle
Parameters: has_lifecycle()
Return: bool

Function: shadow_building_level
Description: The shadow building level key, for if this building has a lifecycle. A blank string is returned if the building has no lifecycle.
Parameters: shadow_building_level()
Return: String

Function: effects
Description: Get the list of effects this building provides
Parameters: effects()
Return: EFFECT_LIST_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: 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: percent_health
Description: The health of a building as a percentage between 0-100
Parameters: percent_health()
Return: 100 >= int >= 0

Function: building_level
Description: Level of this building
Parameters: building_level()
Return: card32

CAMPAIGN_AI_SCRIPT_INTERFACE

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
funds_available_for_immediate_payment_for_faction_by_area
funds_available_for_upkeep_for_faction_by_area

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:

Function: funds_available_for_immediate_payment_for_faction_by_area
Description: Return the available immediate budget for a given faction for a given budgetary area.
Parameters: funds_available_for_immediate_payment_for_faction_by_area(faction_key, [CONSTRUCTION | ARMIES | NAVIES | DIPLOMACY | AGENTS | TECHNOLOGIES | CHARACTERS])
Return:

Function: funds_available_for_upkeep_for_faction_by_area
Description: Return the available remaining upkeep budget for a given faction for a given budgetary area.
Parameters: funds_available_for_upkeep_for_faction_by_area(faction_key, [CONSTRUCTION | ARMIES | NAVIES | DIPLOMACY | AGENTS | TECHNOLOGIES | CHARACTERS])
Return:

CAMPAIGN_DILEMMA_BUILDER_SCRIPT_INTERFACE

Description: Provides an interface for building a campaign dilemma

is_null_interface
possible_choices
add_choice_payload
remove_choice_payload
add_target

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: possible_choices
Description: Get a list of all choices that are defined for this dilemma in the database
Parameters: none
Return: Table(String)

Function: add_choice_payload
Description: Add a choice payload to the dilemma. This copies the payload, so you may reuse the payload builder after this call. Will fail if a payload already exists for the choice. The choice *must* be defined in the database
Parameters: String choice_key, CAMPAIGN_PAYLOAD_BUILDER_SCRIPT_INTERFACE payload
Return: bool

Function: remove_choice_payload
Description: Remove a choice payload from this dilemma
Parameters: String choice_key
Return: bool

Function: add_target
Description: Set an event target. Not required for payloads but can still provide information to the UI.
Parameters: String cdir_events_target_key, (FACTION/REGION/FAMILY_MEMBER/MILITARY_FORCE) SCRIPT_INTERFACE
Return: bool

CAMPAIGN_MISSION_SCRIPT_INTERFACE

Description: Mission script interface.

is_null_interface
model
faction
mission_record_key
mission_issuer_record_key

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

CAMPAIGN_PAYLOAD_BUILDER_SCRIPT_INTERFACE

Description: Provides an interface for building a campaign payload

is_null_interface
faction_ancillary_gain
character_ancillary_gain
ancillary_loss
random_ancillary_loss
building_chain_demolition
character_experience_change
character_loyalty_adjustment
character_loyalty_effect
character_post_assignment
character_to_kill
character_to_wound
damage_buildings
damage_buildings_home_region
damage_character
diplomatic_attitude_adjustment
diplomatic_attitude_adjustment_between
effect_bundle_to_all_factions
effect_bundle_to_faction
effect_bundle_to_faction_province
effect_bundle_to_force
effect_bundle_to_home_region
effect_bundle_to_region
effect_bundle_to_region_group
effect_bundle_to_character
form_confederation
give_region
grant_vision_of_faction_characters
grant_vision_of_faction_regions
grant_vision
province_development_point_increase
rebellion
scripted_mission
spawn_agent
spawn_unit
spawn_unit_home_region
subpayload
text_display
character_trait_change
treasury_adjustment
unit_capacity_adjustment
war_coordination_target
influence_adjustment
spawn_military_force
spawn_military_force_ritual_site
province_slaves_adjustment
faction_slaves_adjustment
add_mercenary_to_faction_pool
faction_pooled_resource_transaction
faction_pooled_resource_transaction_percentage
faction_pooled_resource_transaction_from_record
faction_pooled_resource_transfer
spawn_storm
located
random_subpayload
components_from_record
favour_points
action_points_percentage_change
agent_capacity_adjustment
damage_army
region_transfer
reveal_foreign_slots
army_transfer
foreign_slot
foreign_slot_transfer
destroy_faction
demolish_secondary_buildings
transported_military_force
damage_walls
faction_province_pooled_resource_transaction
faction_province_pooled_resource_transaction_percentage
region_pooled_resource_transaction
region_pooled_resource_transaction_percentage
military_force_pooled_resource_transaction
military_force_pooled_resource_transaction_percentage
winds_of_magic_strength_change
show_war_coordinaton_extra_information
open_gates
disable_faction_characters_movement
teleport_army
entity_resource_transaction
abandon_settlement
add_unit
destroy_unit
remove_unit
valid
clear

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: faction_ancillary_gain
Description: Grant an ancillary to a faction. If no faction is specified, the applicant faction will be used
Parameters: (optional)FACTION_SCRIPT_INTERFACE target, String ancillary_key
Return: bool

Function: character_ancillary_gain
Description: Grant an ancillary to a character
Parameters: CHARACTER_SCRIPT_INTERFACE target, String ancillary_key, bool replace_equipped
Return: bool

Function: ancillary_loss
Description: Remove an ancillary from a character
Parameters: CHARACTER_SCRIPT_INTERFACE character, String ancillary_key
Return: bool

Function: random_ancillary_loss
Description: Remove a random ancillary from a character
Parameters: CHARACTER_SCRIPT_INTERFACE character
Return: bool

Function: building_chain_demolition
Description: Demolish every instance of a building chain in the faction the payload is applied to
Parameters: String building_chain_key
Return: bool

Function: character_experience_change
Description: Grant an amount of experience to a character. (Cannot be negative)
Parameters: CHARACTER_SCRIPT_INTERFACE character, card32 amount
Return: bool

Function: character_loyalty_adjustment
Description: Adjust a characters loyalty by the specified amount
Parameters: CHARACTER_SCRIPT_INTERFACE character, int32 amount
Return: bool

Function: character_loyalty_effect
Description: Apply a db defined loyalty effect to a character
Parameters: CHARACTER_SCRIPT_INTERFACE character, String loyalty_effect_key
Return: bool

Function: character_post_assignment
Description: Assign a character to a post (ministerial position)
Parameters: CHARACTER_SCRIPT_INTERFACE character, String ministerial_position_key
Return: bool

Function: character_to_kill
Description: Kill a character
Parameters: CHARACTER_SCRIPT_INTERFACE character
Return: bool

Function: character_to_wound
Description: Wound a character
Parameters: CHARACTER_SCRIPT_INTERFACE character
Return: bool

Function: damage_buildings
Description: Damage buildings in a region by a semi-random amount
Parameters: REGION_SCRIPT_INTERFACE region, card32 min_damage, card32 max_damage
Return: bool

Function: damage_buildings_home_region
Description: Damage buildings in the payload applicants home region, by a semi-random amount
Parameters: card32 min_amount, card32 max_amount
Return: bool

Function: damage_character
Description: Damage a character by a percentage
Parameters: CHARACTER_SCRIPT_INTERFACE character, float percentage_damage
Return: bool

Function: diplomatic_attitude_adjustment
Description: Adjust diplomatic attitude between a faction and the payload applicant
Parameters: FACTION_SCRIPT_INTERFACE other_faction, int adjustment
Return: bool

Function: diplomatic_attitude_adjustment_between
Description: Apply an attitude adjustment between two factions
Parameters: FACTION_SCRIPT_INTERFACE faction_a, FACTION_SCRIPT_INTERFACE faction_b, int32 attitude
Return: bool

Function: effect_bundle_to_all_factions
Description: Apply an effect bundle to every single faction in the game
Parameters: (String | EFFECT_BUNDLE_SCRIPT_INTERFACE | CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE) effect_bundle
Return: bool

Function: effect_bundle_to_faction
Description: Apply an effect bundle to the payload applicant
Parameters: (String | EFFECT_BUNDLE_SCRIPT_INTERFACE | CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE) effect_bundle
Return: bool

Function: effect_bundle_to_faction_province
Description: Apply an effect bundle to a faction province
Parameters: FACTION_PROVINCE_SCRIPT_INTERFACE province, (String | EFFECT_BUNDLE_SCRIPT_INTERFACE | CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE) effect_bundle
Return: bool

Function: effect_bundle_to_force
Description: Apply an effect bundle to a military force
Parameters: MILITARY_FORCE_SCRIPT_INTERFACE force, (String | EFFECT_BUNDLE_SCRIPT_INTERFACE | CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE) effect_bundle
Return: bool

Function: effect_bundle_to_home_region
Description: Apply an effect bundle to the home region of the payload applicant
Parameters: (String | EFFECT_BUNDLE_SCRIPT_INTERFACE | CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE) effect_bundle
Return: bool

Function: effect_bundle_to_region
Description: Apply an effect bundle to a region
Parameters: REGION_SCRIPT_INTERFACE region, (String | EFFECT_BUNDLE_SCRIPT_INTERFACE | CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE) effect_bundle
Return: bool

Function: effect_bundle_to_region_group
Description: Apply an effect bundle to a region group
Parameters: String region_group_key, (String | EFFECT_BUNDLE_SCRIPT_INTERFACE | CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE) effect_bundle
Return: bool

Function: effect_bundle_to_character
Description: Apply an effect bundle to a character
Parameters: CHARACTER_SCRIPT_INTERFACE character, (String | EFFECT_BUNDLE_SCRIPT_INTERFACE | CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE) effect_bundle
Return: bool

Function: form_confederation
Description: Form a confederation between a faction and the payload applicant
Parameters: FACTION_SCRIPT_INTERFACE owner_faction, FACTION_SCRIPT_INTERFACE other_faction, bool awake_from_death
Return: bool

Function: give_region
Description: Give a region to the applicant faction
Parameters: REGION_SCRIPT_INTERFACE region
Return: bool

Function: grant_vision_of_faction_characters
Description: Grant vision of factions characters. Vision will be granted to the payload applicant if no receiving faction is provided
Parameters: FACTION_SCRIPT_INTERFACE target, int32 duration, (optional) FACTION_SCRIPT_INTERFACE receiver
Return: bool

Function: grant_vision_of_faction_regions
Description: Grant vision of factions regions. Vision will be granted to the payload applicant if no receiving faction is provided
Parameters: FACTION_SCRIPT_INTERFACE target, int32 duration, (optional) FACTION_SCRIPT_INTERFACE receiver
Return: bool

Function: grant_vision
Description: Grant vision of a single object. Vision will be granted to the payload applicant if no receiving faction is provided
Parameters: (MILITARY_FORCE_SCRIPT_INTERFACE | REGION_SCRIPT_INTERFACE | SEA_REGION_SCRIPT_INTERFACE | PROVINCE_SCRIPT_INTERFACE) object, int32 duration, (optional) FACTION_SCRIPT_INTERFACE receiver
Return: bool

Function: province_development_point_increase
Description: Add a development point to a province
Parameters: PROVINCE_SCRIPT_INTERFACE province, FACTION_SCRIPT_INTERFACE faction
Return: bool

Function: rebellion
Description: Cause a rebellion in a region
Parameters: REGION_SCRIPT_INTERFACE region
Return: bool

Function: scripted_mission
Description: Trigger a scripted mission
Parameters: String mission_string
Return: bool

Function: spawn_agent
Description: Spawn an agent
Parameters: String agent_key, String agent_subtype_key, String historical_character_key, bool spawn_to_pool, (optional) REGION_SCRIPT_INTERFACE target_region, (optional) float32 ap_factor
Return: bool

Function: spawn_unit
Description: Spawn a unit into a garrison army
Parameters: String unit_key, (Optional)REGION_SCRIPT_INTERFACE region
Return: bool

Function: spawn_unit_home_region
Description: Spawn a unit into a factions home regions' garrison army
Parameters: String unit_key
Return: bool

Function: subpayload
Description: Add a subpayload. Please don't add a payload to itself
Parameters: CAMPAIGN_PAYLOAD_BUILDER_SCRIPT_INTERFACE sub_payload
Return: bool

Function: text_display
Description: Add text display to the payload
Parameters: String payload_ui_detail_key
Return: bool

Function: character_trait_change
Description: Add/Remove a character trait
Parameters: CHARACTER_SCRIPT_INTERFACE character, String trait_level_key, bool is_removal
Return: bool

Function: treasury_adjustment
Description: Adjust the payload applicant factions treasury
Parameters: int32 amount
Return: bool

Function: unit_capacity_adjustment
Description: Additive modifier to the capacity of a specific unit available to a faction
Parameters: FACTION_SCRIPT_INTERFACE faction, String unit_record_key, int32 change
Return: bool

Function: war_coordination_target
Description: Set a war coordination target for a faction
Parameters: FACTION_SCRIPT_INTERFACE faction (REGION_SCRIPT_INTERFACE | MILITARY_FORCE_SCRIPT_INTERFACE) target, bool offensive
Return: bool

Function: influence_adjustment
Description: Adjust the payload applicant factions influence balance
Parameters: int32 amount
Return: bool

Function: spawn_military_force
Description: Spawn a military force. If no owning faction is provided, the payload applicant will receive the force
Parameters: String spawnable_force_key, (optional) FACTION_SCRIPT_INTERFACE owning_faction
Return: bool

Function: spawn_military_force_ritual_site
Description: Spawn a military force at a ritual site. If no owning faction is provided, then the payload applicant faction will own the force
Parameters: String spawnable_force_key, (optional) FACTION_SCRIPT_INTERFACE owning_faction
Return: bool

Function: province_slaves_adjustment
Description: Adjust the amount of slaves in a province
Parameters: PROVINCE_SCRIPT_INTERFACE target_province, int32 amount
Return: bool

Function: faction_slaves_adjustment
Description: Adjust the payload applicants slave balance
Parameters: int32 amount
Return: bool

Function: add_mercenary_to_faction_pool
Description: Add a mercenary unit to the faction pool
Parameters: String unit_key, card32 amount
Return: bool

Function: faction_pooled_resource_transaction
Description: Add/Remove an amount of pooled resource from the payload applicant faction. If "required" is true then dilemma options with this payload will only be selectable if the faction has the resources to afford this cost
Parameters: String pooled_resource_key, String pooled_resource_factor_key, int32 amount, bool required
Return: bool

Function: faction_pooled_resource_transaction_percentage
Description: Add/Remove a percentage of the existing amount of pooled resource from the payload applicant faction. If "required" is true then dilemma options with this payload will only be selectable if the faction has the resources to afford this cost
Parameters: String pooled_resource_key, String pooled_resource_factor_key, int32 amount, bool required
Return: bool

Function: faction_pooled_resource_transaction_from_record
Description: Apply a pooled resource transaction from a record. If "required" is true then dilemma options with this payload will only be selectable if the faction has the resources to afford this cost
Parameters: String resource_cost_key, bool required
Return: bool

Function: faction_pooled_resource_transfer
Description: Transfer resources from the payload applicant to another faction
Parameters: String resource_cost_key, FACTION_SCRIPT_INTERFACE receiving_faction
Return: bool

Function: spawn_storm
Description: Spawn a storm
Parameters: String storm_type_key, card32 strength, card32 max_duration, (optional) REGION_SCRIPT_INTERFACE target_region
Return: bool

Function: located
Description: Add a location to the payload. This is for information only
Parameters: (FACTION_SCRIPT_INTERFACE | CHARACTER_SCRIPT_INTERFACE | REGION_SCRIPT_INTERFACE | PROVINCE_SCRIPT_INTERFACE) object
Return: bool

Function: random_subpayload
Description: Add a weighted set of subpayload which will be randomly selected from when the payload is applied
Parameters: lua table {{weight, CAMPAIGN_PAYLOAD_BUILDER_SCRIPT_INTERFACE}}
Return: bool

Function: components_from_record
Description: Add all components from a campaign payload record. ContextVariant = (CHARACTER_SCRIPT_INTERFACE | FACTION_SCRIPT_INTERFACE | REGION_SCRIPT_INTERFACE | SETTLEMENT_SCRIPT_INTERFACE | MILITARY_FORCE_SCRIPT_INTERFACE | PROVINCE_SCRIPT_INTERFACE | FACTION_PROVINCE_MANAGER_SCRIPT_INTERFACE)
Parameters: String payload_key, ContextVariant source, ContextVariant target
Return: bool

Function: favour_points
Description: Grant favour points between the payload applicant and another faction
Parameters: FACTION_SCRIPT_INTERFACE to_faction, int32 amount
Return: bool

Function: action_points_percentage_change
Description: Change target character's action points by a percentage of their amount per turn
Parameters: CHARACTER_SCRIPT_INTERFACE target_character, int32 percentage
Return: bool

Function: agent_capacity_adjustment
Description: Apply an additive modifier to a factions agent capacity
Parameters: FACTION_SCRIPT_INTERFACE faction, String agent_key, int32 change
Return: bool

Function: damage_army
Description: Damage an army by a percentage amount
Parameters: MILITARY_FORCE_SCRIPT_INTERFACE force, card16 percentage
Return: bool

Function: region_transfer
Description: Transfer a region to a new faction. If no new owner is provided, the payload applicant will be given the region
Parameters: REGION_SCRIPT_INTERFACE region, (optional) FACTION_SCRIPT_INTERFACE new_owner
Return: bool

Function: reveal_foreign_slots
Description: Reveal the foreign slots present in a region for a time. If no target faction is provided, then the foreign slots will be revealed to the payload applicant
Parameters: REGION_SCRIPT_INTERFACE region, int32 duration, (optional) FACTION_SCRIPT_INTERFACE revealed_to
Return: bool

Function: army_transfer
Description: Transfer an army to another faction. If no new owner is provided, then the payload applicant will receive the army
Parameters: MILITARY_FORCE_SCRIPT_INTERFACE force, FACTION_SCRIPT_INTERFACE faction
Return: bool

Function: foreign_slot
Description: Transfer a foreign slot to another faction. If no new owner is provided then the payload applicant will receive the foreign slot set
Parameters: REGION_SCRIPT_INTERFACE region, (optional) FACTION_SCRIPT_INTERFACE new_owner
Return: bool

Function: foreign_slot_transfer
Description: Transfer a foreign slot to another faction. If no new owner is provided then the payload applicant will receive the foreign slot set
Parameters: REGION_SCRIPT_INTERFACE region, (optional) FACTION_SCRIPT_INTERFACE new_owner
Return: bool

Function: destroy_faction
Description: Kill a faction
Parameters: FACTION_SCRIPT_INTERFACE victim
Return: bool

Function: demolish_secondary_buildings
Description: Demolish secondary buildings in a region. If amount is negative, all buildings will be destroyed
Parameters: REGION_SCRIPT_INTERFACE region, int32 amount
Return: bool

Function: transported_military_force
Description: Add/Remove a transported military force from every military force owned by the payload applicant
Parameters: String transported_force_key, bool is_removal
Return: bool

Function: damage_walls
Description: Damage the walls in a region
Parameters: REGION_SCRIPT_INTERFACE region, card32 breaches_to_add
Return: bool

Function: faction_province_pooled_resource_transaction
Description: Apply a pooled resource transaction to a faction province
Parameters: PROVINCE_SCRIPT_INTERFACE province, String resource_key, String factor_key, int32 amount, bool required
Return: bool

Function: faction_province_pooled_resource_transaction_percentage
Description: Apply a percentage pooled resource transaction to a faction province
Parameters: PROVINCE_SCRIPT_INTERFACE province, String resource_key, String factor_key, int32 amount, bool required
Return: bool

Function: region_pooled_resource_transaction
Description: Apply a pooled resource transaction to a region
Parameters: REGION_SCRIPT_INTERFACE region, String resource_key, String factor_key, int32 amount, bool required
Return: bool

Function: region_pooled_resource_transaction_percentage
Description: Apply a percentage pooled resource transaction to a region
Parameters: REGION_SCRIPT_INTERFACE region, String resource_key, String factor_key, int32 amount, bool required
Return: bool

Function: military_force_pooled_resource_transaction
Description: Apply a pooled resource transaction to a military force
Parameters: MILITARY_FORCE_SCRIPT_INTERFACE force, String resource_key, String factor_key, int32 amount, bool required
Return: bool

Function: military_force_pooled_resource_transaction_percentage
Description: Apply a percentage pooled resource transaction to a military force
Parameters: MILITARY_FORCE_SCRIPT_INTERFACE force, String resource_key, String factor_key, int32 amount, bool required
Return: bool

Function: winds_of_magic_strength_change
Description: Set the winds of magic strength in an areas
Parameters: String winds_of_magic_area_key, String winds_of_magic_strength_key
Return: bool

Function: show_war_coordinaton_extra_information
Description: desc
Parameters: params
Return: bool

Function: open_gates
Description: Sabotage the gates on a region
Parameters: REGION_SCRIPT_INTERFACE region, card32 duration
Return: bool

Function: disable_faction_characters_movement
Description: Disable movement for a faction. This is for temporary disabling, don't use this to try and disable a faction for good
Parameters: FACTION_SCRIPT_INTERFACE faction, card32 duration
Return: bool

Function: teleport_army
Description: Teleport an army to a region
Parameters: MILITARY_FORCE_SCRIPT_INTERFACE force, REGION_DATA_SCRIPT_INTERFACE target_region
Return: bool

Function: entity_resource_transaction
Description: Apply a resource transaction to an entity
Parameters: EntityInterface target_entity, String resource_cost_key, int32 duration (-1 once, 0 infinitE, N Rounds), bool required, bool apply_immediately
Return: bool

Function: abandon_settlement
Description: Abandon the target regions settlement
Parameters: REGION_SCRIPT_INTERFACE region
Return: bool

Function: add_unit
Description: Add units to a military force
Parameters: MILITARY_FORCE_SCRIPT_INTERFACE target_force, String main_unit_key, card32 amount, card8 xp
Return: bool

Function: destroy_unit
Description: Destroy a given unit
Parameters: UNIT_SCRIPT_INTERFACE target_unit
Return: bool

Function: remove_unit
Description: Remove a unit from a given military force based on the unit record
Parameters: MILITARY_FORCE_SCRIPT_INTERFACE target_force, String main_unit_key
Return: bool

Function: valid
Description: Ensure the payload is valid. This will return false if an object required has been destroyed or if the payload state is just generally not valid anymore
Parameters: FACTION_SCRIPT_INTERFACE target_faction
Return: bool

Function: clear
Description: Remove all components from the payload
Parameters: none
Return: void

CARAVANS_SYSTEM_SCRIPT_INTERFACE

Description: Caravans System Script Interface

is_null_interface
faction_caravans
faction_caravans_by_key
banditry_for_region
banditry_for_region_by_key
total_banditry_for_regions
total_banditry_for_regions_by_key
maximum_banditry

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: faction_caravans
Description: Get caravans data for the specified faction
Parameters: faction_caravans(FACTION_SCRIPT_INTERFACE faction)
Return: FACTION_CARAVANS_SCRIPT_INTERFACE

Function: faction_caravans_by_key
Description: Get caravans data for the specified faction, by key
Parameters: faction_caravans_by_key(String faction_key)
Return: FACTION_CARAVANS_SCRIPT_INTERFACE

Function: banditry_for_region
Description: Get the current banditry value of a region
Parameters: banditry_for_region(REGION_DATA_SCRIPT_INTERFACE region)
Return: int32

Function: banditry_for_region_by_key
Description: Get the current banditry value of a region, by key
Parameters: banditry_for_region_by_key(String region_key)
Return: int32

Function: total_banditry_for_regions
Description: Get the total banditry value of a table of regions
Parameters: total_banditry_for_regions(REGION_DATA_SCRIPT_INTERFACE (table) regions)
Return: int32

Function: total_banditry_for_regions_by_key
Description: Get the total banditry value of a table of regions, by key
Parameters: total_banditry_for_regions_by_key(String (table) region_keys)
Return: int32

Function: maximum_banditry
Description: Get the maximum banditry value
Parameters: maximum_banditry()
Return: int32

CARAVAN_LIST_SCRIPT_INTERFACE

Description: A list of caravan 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: CARAVAN_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

CARAVAN_RECRUITMENT_ITEM_LIST_SCRIPT_INTERFACE

Description: A list of caravan recruitment item 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: CARAVAN_RECRUITMENT_ITEM_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

CARAVAN_RECRUITMENT_ITEM_SCRIPT_INTERFACE

Description: Caravan Recruitment Item Script Interface

is_null_interface
valid
caravan_master
cost

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: valid
Description: Is this recruitment item valid for recruitment?
Parameters: valid()
Return: bool

Function: caravan_master
Description: Caravan master that would be recruited
Parameters: caravan_master()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: cost
Description: Treasury cost of this item
Parameters: cost()
Return: int

CARAVAN_SCRIPT_INTERFACE

Description: Caravan Script Interface

is_null_interface
path
position
caravan_master
caravan_force
cargo
is_returning
rounds_until_return

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: path
Description: The path this caravan is currently set to follow. This will be null if the caravan has an invalid position
Parameters: path()
Return: ROUTE_PATH_SCRIPT_INTERFACE

Function: position
Description: The current route position of this caravan. This may be invalid
Parameters: position()
Return: ROUTE_POSITION_SCRIPT_INTERFACE

Function: caravan_master
Description: Character that commands this caravan
Parameters: caravan_master()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: caravan_force
Description: Military force of this caravan
Parameters: caravan_force()
Return: MILITARY_FORCE_SCRIPT_INTERFACE

Function: cargo
Description: Cargo amount that this caravan is currently carrying
Parameters: cargo()
Return: int32

Function: is_returning
Description: Is this caravan returning from a successful journey?
Parameters: is_returning()
Return: bool

Function: rounds_until_return
Description: Rounds until this caravan will become available, after a successful journey
Parameters: rounds_until_return()
Return: card32

CHARACTER_DETAILS_LIST_SCRIPT_INTERFACE

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

CHARACTER_DETAILS_SCRIPT_INTERFACE

Description: Character details interface

is_null_interface
model
faction
forename
surname
get_forename
get_surname
character_type
character_type_key
character_subtype
character_subtype_key
character_subtype_has_female_name
is_immortal
has_trait
trait_points
has_ancillary
is_male
age
has_skill
number_of_traits
trait_level
loyalty
personal_loyalty_factor
has_father
has_mother
mother
father
family_member
character_initiative_sets
lookup_character_initiative_set_by_key
pooled_resource_manager
primary_character

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: 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: character_type
Description: Returns true if the character context is of the agent type specified
Parameters: Key from agents table, e.g. character_type("general")
Return: bool

Function: character_type_key
Description: Returns the character's type key, from the agents table
Parameters:
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("wh_main_emp_lord")
Return: bool

Function: character_subtype_key
Description: Returns the key of the character's agent subtype record
Parameters:
Return: String

Function: character_subtype_has_female_name
Description: Returns whether the agent subtype record associated with the character has a female name
Parameters:
Return: bool

Function: is_immortal
Description: Returns whether this character is immortal
Parameters:
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: int32

Function: personal_loyalty_factor
Description: returns the characters personal loyalty factor
Parameters: personal_loyalty_factor()
Return: int32

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_initiative_sets
Description: Initiative sets that this character has access to
Parameters: character_initiative_sets()
Return: CHARACTER_INITIATIVE_SET_LIST_SCRIPT_INTERFACE

Function: lookup_character_initiative_set_by_key
Description: Attempt to get a character initiative set (owned by this character), by key. *MAY BE NULL*
Parameters: lookup_character_initiative_set_by_key(String record_key)
Return: CHARACTER_INITIATIVE_SET_SCRIPT_INTERFACE

Function: pooled_resource_manager
Description: Pooled resource manager of this character
Parameters: pooled_resource_manager()
Return: POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE

Function: primary_character
Description: Primary character of these details. May be null if dead
Parameters: primary_character()
Return: CHARACTER_SCRIPT_INTERFACE

CHARACTER_IMPRISONMENT_REJECTION_REASON_MASK_SCRIPTING_INTERFACE

Description: Character Imprisonment Rejection Reason Mask Scripting Interface

is_null_interface
is_member_of_garrison
is_placeholder_character
is_from_rebel_faction
is_from_companion_faction
is_from_dead_faction
any

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: is_member_of_garrison
Description: Is it because the prisoner is a member of a garrison?
Parameters: is_member_of_garrison()
Return: bool

Function: is_placeholder_character
Description: Is it because the prisoner is a placeholder character?
Parameters: is_placeholder_character()
Return: bool

Function: is_from_rebel_faction
Description: Is it because the prisoner is from a rebel faction?
Parameters: is_from_rebel_faction()
Return: bool

Function: is_from_companion_faction
Description: Is it because the prisoner is from a companion faction?
Parameters: is_from_companion_faction()
Return: bool

Function: is_from_dead_faction
Description: Is it because the prisoner is from a dead faction?
Parameters: is_from_dead_faction()
Return: bool

Function: any
Description: Is it because of any reason?
Parameters: any()
Return: bool

CHARACTER_INITIATIVE_LIST_SCRIPT_INTERFACE

Description: A list of character initiative 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_INITIATIVE_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

CHARACTER_INITIATIVE_SCRIPT_INTERFACE

Description: A character initiative. Provides effects over a duration, closer in behaviour to skills than effect bundles. Owned by a character

is_null_interface
record_key
duration
has_infinite_duration
is_script_locked

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: record_key
Description: Record key of this initiative
Parameters: record_key()
Return: String

Function: duration
Description: Duration of this initiative
Parameters: duration()
Return: int32

Function: has_infinite_duration
Description: Does this initiative have an infinite duration?
Parameters: has_infinite_duration()
Return: bool

Function: is_script_locked
Description: Is this initiative script locked?
Parameters: is_script_locked()
Return: bool

CHARACTER_INITIATIVE_SET_LIST_SCRIPT_INTERFACE

Description: A list of character initiative set 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_INITIATIVE_SET_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

CHARACTER_INITIATIVE_SET_SCRIPT_INTERFACE

Description: A collection of related character initiatives. Owned by a character

is_null_interface
all_initiatives
active_initiatives
lookup_initiative_by_key
initiative_status_by_key
initiative_status
cooldown_remaining

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: all_initiatives
Description: Returns a list of every initiative in this set
Parameters: all_initiatives()
Return: CHARACTER_INITIATIVE_LIST_SCRIPT_INTERFACE

Function: active_initiatives
Description: Returns a list of all active initiatives in this set
Parameters: active_initiatives()
Return: CHARACTER_INITIATIVE_LIST_SCRIPT_INTERFACE

Function: lookup_initiative_by_key
Description: Attempts ot find the character initiative in this set with the specified record key. *MAY BE NULL*
Parameters: lookup_initiative_by_key(String record_key)
Return: CHARACTER_INITIATIVE_SCRIPT_INTERFACE

Function: initiative_status_by_key
Description: Attempts ot find the character initiative in this set with the specified record key and give you back a valid status interface
Parameters: initiative_status_by_key(String record_key)
Return: CHARACTER_INITIATIVE_STATUS_SCRIPT_INTERFACE

Function: initiative_status
Description: Returns a status interface for the specified initiative
Parameters: initiative_status(CHARACTER_INITIATIVE_SCRIPT_INTERFACE initiative)
Return: CHARACTER_INITIATIVE_STATUS_SCRIPT_INTERFACE

Function: cooldown_remaining
Description: Number of rounds that the initiative set is on cooldown for. Zero if it's not on cooldown
Parameters: cooldown_remaining()
Return: card32

CHARACTER_INITIATIVE_STATUS_SCRIPT_INTERFACE

Description: Status of a character initiative. Status is from the time this interface is returned

is_null_interface
is_active
is_script_locked
is_set_capacity_reached
is_unavailable
is_set_on_cooldown

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: is_active
Description: Is this initiative active?
Parameters: is_active()
Return: bool

Function: is_script_locked
Description: Is this initiative script locked?
Parameters: is_script_locked()
Return: bool

Function: is_set_capacity_reached
Description: Is this initiative in a set that has reached its capacity (and not active)?
Parameters: is_set_capacity_reached()
Return: bool

Function: is_unavailable
Description: Is this initiative unavailable from the queried set?
Parameters: is_unavailable()
Return: bool

Function: is_set_on_cooldown
Description: Is the set that this initiative is a part of, on cooldown?
Parameters: is_set_on_cooldown()
Return: bool

CHARACTER_LIST_SCRIPT_INTERFACE

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

CHARACTER_OBSERVATION_OPTIONS_SCRIPT_INTERFACE

Description: Character Observation Options Script Interface

is_null_interface
faction
armies_options
set_armies_options
navies_options
set_navies_options
agents_options
set_agents_options

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: faction
Description: Faction that this observation option set targets. May be null
Parameters: faction()
Return: FACTION_SCRIPT_INTERFACE

Function: armies_options
Description: Observation options for armies
Parameters: armies_options()
Return: OBSERVATION_OPTIONS_SCRIPT_INTERFACE

Function: set_armies_options
Description: Set the observation options for armies
Parameters: set_armies_options()
Return: VOID

Function: navies_options
Description: Observation options for navies
Parameters: navies_options()
Return: OBSERVATION_OPTIONS_SCRIPT_INTERFACE

Function: set_navies_options
Description: Set the observation options for navies
Parameters: set_navies_options()
Return: VOID

Function: agents_options
Description: Observation options for agents
Parameters: agents_options()
Return: OBSERVATION_OPTIONS_SCRIPT_INTERFACE

Function: set_agents_options
Description: Set the observation options for agents
Parameters: set_agents_options()
Return: VOID

CHARACTER_SCRIPT_INTERFACE

Description: Character interface

is_null_interface
command_queue_index
has_garrison_residence
has_region
has_military_force
model
garrison_residence
faction
region
sea_region
region_data
military_force
forename
surname
get_forename
get_surname
flag_path
in_settlement
in_port
is_besieging
is_blockading
is_carrying_troops
character_type
character_type_key
character_subtype
character_subtype_key
is_governor
has_trait
trait_points
has_ancillary
battles_fought
action_points_remaining_percent
action_points_per_turn
is_male
age
performed_action_this_turn
is_ambushing
turns_at_sea
turns_in_own_regions
turns_in_enemy_regions
is_faction_leader
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
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
is_hidden
routed_in_battle
body_guard_casulties
is_deployed
is_at_sea
has_recruited_mercenaries
number_of_traits
trait_level
loyalty
personal_loyalty_factor
interfaction_loyalty
has_father
has_mother
mother
father
family_member
is_politician
post_battle_ancilary_chance
is_caster
is_visible_to_faction
can_equip_ancillary
is_wounded
character_details
effect_bundles
can_reach_character
can_reach_settlement
can_reach_position
can_reach_character_in_stance
can_reach_settlement_in_stance
can_reach_position_in_stance
has_effect_bundle
pooled_resource_manager
bonus_values

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: 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: get_surname
Description: Returns the character surname
Parameters: get_surname()
Return: string

Function: flag_path
Description: Returns the flag path used for this character
Parameters: flag_path()
Return: string

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: 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: is_governor
Description: Returns whther or not the character is governor.
Parameters: is_governor()
Return: int

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: 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: 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: 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: 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: 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: personal_loyalty_factor
Description: returns the characters personal loyalty factor
Parameters: personal_loyalty_factor()
Return: int32

Function: interfaction_loyalty
Description: returns the characters interfaction loyalty
Parameters: interfaction_loyalty()
Return: int32

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: 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: 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: character_details
Description: persistent details of this character
Parameters: character_details()
Return: CHARACTER_DETAILS_SCRIPT_INTERFACE

Function: effect_bundles
Description: Effect bundles currently active on the character
Parameters: effect_bundles()
Return: EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE

Function: can_reach_character
Description: Can a this character reach another character this turn?
Parameters: can_reach_character(target_character)
Return: bool

Function: can_reach_settlement
Description: Can this character reach a settlement this turn?
Parameters: can_reach_settlement(settlement)
Return: bool

Function: can_reach_position
Description: Can this character reach a (loigcal hex map) position this turn?
Parameters: can_reach_position(x, y)
Return: bool

Function: can_reach_character_in_stance
Description: Can this character, in the specified stance, reach another character this turn?
Parameters: can_reach_character_in_stance(target_character, stance_key)
Return: bool

Function: can_reach_settlement_in_stance
Description: Can this character, in the specified stance, reach a settlement this turn?
Parameters: can_reach_settlement_in_stance(settlement, stance_key)
Return: bool

Function: can_reach_position_in_stance
Description: Can this character, in the specified stance, reach a (logical hex map) position this turn?
Parameters: can_reach_position_in_stance(x, y, stance_key)
Return: bool

Function: has_effect_bundle
Description: Test if this character has the specified effect bundle
Parameters: has_effect_bundle()
Return: bool

Function: pooled_resource_manager
Description: Pooled resource manager of this character
Parameters: pooled_resource_manager()
Return: POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE

Function: bonus_values
Description: Active bonus values of this character
Parameters: bonus_values()
Return: BONUS_VALUES_SCRIPT_INTERFACE

COOKING_DISH_SCRIPT_INTERFACE

Description: Cook Dish Script Interface

is_null_interface
recipe
ingredients
faction_effects
faction_leader_effects
remaining_duration

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: recipe
Description: Recipe of the dish
Parameters: recipe()
Return: String

Function: ingredients
Description: Ingredients used in the dish
Parameters: ingredients()
Return: Lua String Table

Function: faction_effects
Description: Effects provided to the faction
Parameters: faction_effects()
Return: EFFECT_LIST_SCRIPT_INTERFACE

Function: faction_leader_effects
Description: Effects provided to the faction leader
Parameters: faction_leader_effects()
Return: EFFECT_LIST_SCRIPT_INTERFACE

Function: remaining_duration
Description: Number of rounds remaining for this dish
Parameters: remaining_duration()
Return: card32

COOKING_SYSTEM_SCRIPT_INTERFACE

Description: Cook System Script Interface

is_null_interface
faction_cooking_info

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: faction_cooking_info
Description: Returns the cooking info for the specified faction. Null if the faction does not cook
Parameters: faction_cooking_info(FACTION_SCRIPT_INTERFACE faction)
Return: FACTION_COOKING_INFO_SCRIPT_INTERFACE

CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE

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
set_effect_value_by_key
remove_effect
remove_effect_by_key

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: set_effect_value_by_key
Description: Change the value of the specified effect, bby key
Parameters: set_effect_value_by_key(String effect_key, float32 new_value)
Return: bool

Function: remove_effect
Description: Remove the specified effect
Parameters: remove_effect(EFFECT_SCRIPT_INTERFACE effect)
Return: bool

Function: remove_effect_by_key
Description: Remove the specified effect, by key
Parameters: remove_effect_by_key(String effect_key)
Return: bool

DEBUG_DRAWING_SCRIPT_INTERFACE

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

EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE

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

EFFECT_BUNDLE_SCRIPT_INTERFACE

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

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: duration()
Return: card32

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

EFFECT_LIST_SCRIPT_INTERFACE

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

EFFECT_SCRIPT_INTERFACE

Description: An effect that provides bonus values via a scope

is_null_interface
key
scope
value

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

FACTION_CARAVANS_SCRIPT_INTERFACE

Description: Faction Caravans Script Interface

is_null_interface
faction
active_caravans
idle_caravans
maximum_active_caravans
number_of_active_caravans
valid_caravan_start_points
available_caravan_recruitment_items
can_recruit_caravan
can_start_caravan
route_network

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: faction
Description: Owning faction
Parameters: faction()
Return: FACTION_SCRIPT_INTERFACE

Function: active_caravans
Description: Active caravans owned by this faction
Parameters: active_caravans()
Return: CARAVAN_LIST_SCRIPT_INTERFACE

Function: idle_caravans
Description: Idle caravans owned by this faction
Parameters: idle_caravans()
Return: CARAVAN_LIST_SCRIPT_INTERFACE

Function: maximum_active_caravans
Description: Maximum caravans this faction can have active at any time
Parameters: maximum_active_caravans()
Return: int32

Function: number_of_active_caravans
Description: Number of caravans this faction currently has active
Parameters: number_of_active_caravans()
Return: int32

Function: valid_caravan_start_points
Description: Exhaustive list of route nodes this faction may start a caravan from
Parameters: valid_caravan_start_points()
Return: ROUTE_NODE_LIST_SCRIPT_INTERFACE

Function: available_caravan_recruitment_items
Description: List of all caravans that may be recruited
Parameters: available_caravan_recruitment_items()
Return: CARAVAN_RECRUITMENT_ITEM_LIST_SCRIPT_INTERFACE

Function: can_recruit_caravan
Description: Can the given caravan be recruited?
Parameters: can_recruit_caravan(FAMILY_MEMBER_SCRIPT_INTERFACE caravan_master)
Return: bool

Function: can_start_caravan
Description: Can the given caravan be started?
Parameters: can_start_caravan(FAMILY_MEMBER_SCRIPT_INTERFACE caravan_master)
Return: bool

Function: route_network
Description: Route network that this faction uses for its caravans
Parameters: route_network()
Return: ROUTE_NETWORK_SCRIPT_INTERFACE

FACTION_CHARACTER_TAGGING_SYSTEM_SCRIPT_INTERFACE

Description: Faction Character Tagging System Script Interface

is_null_interface
faction_tags
character_tag
faction_that_has_tagged_character
is_character_tagged
is_character_tagged_by_faction
is_character_tagged_by_one_of_factions

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: faction_tags
Description: Returns a list of character tags owned by the faction. Null if faction isn't present in the system
Parameters: faction_tags(FACTION_SCRIPT_INTERFACE faction)
Return: FACTION_CHARACTER_TAG_ENTRY_LIST_SCRIPT_INTERFACE

Function: character_tag
Description: Returns the character tag entry for this character. Null if the character is not tagged
Parameters: character_tag(FAMILY_MEMBER_SCRIPT_INTERFACE character)
Return: FACTION_CHARACTER_TAG_ENTRY_SCRIPT_INTERFACE

Function: faction_that_has_tagged_character
Description: Returns the faction that has tagged the specified character. Null if the character is not tagged
Parameters: faction_that_has_tagged_character(FAMILY_MEMBER_SCRIPT_INTERFACE character)
Return: FACTION_SCRIPT_INTERFACE

Function: is_character_tagged
Description: Is the specified character tagged by any faction?
Parameters: is_character_tagged(FAMILY_MEMBER_SCRIPT_INTERFACE character)
Return: bool

Function: is_character_tagged_by_faction
Description: Is the specified character tagged by the specified faction?
Parameters: is_character_tagged_by_faction(FAMILY_MEMBER_SCRIPT_INTERFACE character, FACTION_SCRIPT_INTERFACE faction)
Return: bool

Function: is_character_tagged_by_one_of_factions
Description: Is the specified character tagged by one of the specified factions?
Parameters: is_character_tagged_by_one_of_factions(FAMILY_MEMBER_SCRIPT_INTERFACE character, FACTION_SCRIPT_INTERFACE_TABLE factions)
Return: bool

FACTION_CHARACTER_TAG_ENTRY_LIST_SCRIPT_INTERFACE

Description: A list of faction character tag entry 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_CHARACTER_TAG_ENTRY_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

FACTION_CHARACTER_TAG_ENTRY_SCRIPT_INTERFACE

Description: Faction Character Tag Entry Script Interface

is_null_interface
character
tag_record_key

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: character
Description: Character of this tag
Parameters: character()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: tag_record_key
Description: Key of the tag record
Parameters: tag_record_key()
Return: String

FACTION_COOKING_INFO_SCRIPT_INTERFACE

Description: Faction Cooking Info Script Interface

is_null_interface
is_recipe_available
is_ingredient_available
is_recipe_unlocked
is_ingredient_unlocked
active_dish
max_primary_ingredients
max_secondary_ingredients

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: is_recipe_available
Description: Can the faction ever cook this recipe?
Parameters: is_recipe_available(String recipe_key)
Return: bool

Function: is_ingredient_available
Description: Can the faction ever unlock this ingredient?
Parameters: is_ingredient_available(String ingredient_key)
Return: bool

Function: is_recipe_unlocked
Description: Is this recipe unlocked/known?
Parameters: is_recipe_unlocked(String recipe_key)
Return: bool

Function: is_ingredient_unlocked
Description: Is this ingredient unlocked?
Parameters: is_ingredient_unlocked(String ingredient_key)
Return: bool

Function: active_dish
Description: Key of the currently active dish. Empty if none
Parameters: active_dish()
Return: String

Function: max_primary_ingredients
Description: Maximum amount of primary ingredients this faction may cook with
Parameters: max_primary_ingredients()
Return: card32

Function: max_secondary_ingredients
Description: Maximum amount of secondary ingredients this faction may cook with
Parameters: max_secondary_ingredients()
Return: card32

FACTION_LIST_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

FACTION_PROVINCE_MANAGER_LIST_SCRIPT_INTERFACE

Description: A list of faction province manager 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_PROVINCE_MANAGER_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

FACTION_PROVINCE_MANAGER_SCRIPT_INTERFACE

Description: Faction Province manager script interface. Represents the segment of a province owned by a faction

is_null_interface
province
regions
has_effect_bundle
pooled_resource_manager
bonus_values
gdp

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: province
Description: Geographical province that contains this faction province
Parameters: province()
Return: PROVINCE_SCRIPT_INTERFACE

Function: regions
Description: Regions controlled by this faction province manager
Parameters: regions()
Return: REGION_LIST_SCRIPT_INTERFACE

Function: has_effect_bundle
Description: does the province contain the specified effect bundle?
Parameters: has_effect_bundle(String effect_bundle_key)
Return: bool

Function: pooled_resource_manager
Description: Pooled resource manager of this faction province
Parameters: pooled_resource_manager()
Return: POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE

Function: bonus_values
Description: Active bonus values of this faction province
Parameters: bonus_values()
Return: BONUS_VALUES_SCRIPT_INTERFACE

Function: gdp
Description: Returns the gross domestic produce of all regions in this faction province
Parameters: gdp()
Return: number

FACTION_RITUALS_SCRIPT_INTERFACE

Description: Faction Rituals Script Interface

is_null_interface
active_rituals
ritual_status

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_SCRIPT_INTERFACE

Function: ritual_status
Description: status of the specified ritual for this faction NOTE: The result of this call is a bit mask and needs to be checked accordingly
Parameters: ritual_status(String ritual_record_key)
Return: RITUAL_STATUS_SCRIPT_INTERFACE

FACTION_SCRIPT_INTERFACE

Description: Faction interface

is_null_interface
command_queue_index
region_list
character_list
military_force_list
model
is_factions_turn
is_human
is_idle_human
name
home_region
faction_leader
has_faction_leader
has_home_region
flag_path
started_war_this_turn
ended_war_this_turn
ancillary_exists
num_allies
at_war
allied_with
non_aggression_pact_with
trade_agreement_with
military_allies_with
defensive_allies_with
is_vassal_of
is_ally_vassal_or_client_state_of
at_war_with
trade_resource_exists
trade_value
trade_value_percent
unused_international_trade_route
trade_route_limit_reached
sea_trade_route_raided
treasury
treasury_percent
losing_money
expenditure
income
net_income
tax_level
upkeep
upkeep_income_percent
upkeep_expenditure_percent
research_queue_idle
has_technology
is_currently_researching
has_available_technologies
num_completed_technologies
num_generals
culture
subculture
has_food_shortages
imperium_level
diplomatic_standing_with
diplomatic_attitude_towards
factions_non_aggression_pact_with
factions_trading_with
factions_at_war_with
factions_met
factions_of_same_culture
factions_of_same_subculture
factions_allied_with
factions_defensive_allies_with
factions_military_allies_with
get_foreign_visible_characters_for_player
get_foreign_visible_regions_for_player
is_quest_battle_faction
holds_entire_province
is_vassal
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_resource_manager
has_ritual_chain
has_access_to_ritual_category
get_climate_suitability
foreign_slot_managers
is_allowed_to_capture_territory
can_be_human
effect_bundles
is_rebel
is_faction
unit_cap
unit_cap_remaining
bonus_values
agent_cap
agent_cap_remaining
agent_subtype_cap
agent_subtype_cap_remaining
team_mates
is_team_mate
is_primary_faction
turn_is_skipped
num_provinces
num_complete_provinces
provinces
complete_provinces

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: region_list
Description: A list of regions owned by the faction
Parameters: region_list()
Return: REGION_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_factions_turn
Description: Is it currently this faction's turn?
Parameters: is_factions_turn()
Return: bool

Function: is_human
Description: Is this a human faction?
Parameters: is_human()
Return: bool

Function: is_idle_human
Description: Is this an idle human faction? An idle human faction started the campaign human-player controlled but they've dropped out at some point and not yet resumed.
Parameters: is_idle_human()
Return: bool

Function: name
Description: The faction's name
Parameters: name()
Return: string

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: 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: flag_path
Description: Gets the flag folder path used by this faction
Parameters: flag_path()
Return: String

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: num_allies
Description: Number of factions allied with this faction
Parameters: num_allies()
Return: int

Function: at_war
Description: Is this faction at war?
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: non_aggression_pact_with
Description: Does this faction have a non-aggression pact with another faction?
Parameters: non_aggression_pact_with(context:character():faction())
Return: bool

Function: trade_agreement_with
Description: Does this faction have a trade agreement with another faction?
Parameters: trade_agreement_with(context:character():faction())
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_ally_vassal_or_client_state_of
Description: Is this faction allied, vassal of or client state of another faction?
Parameters: is_ally_vassal_or_client_state_of(context:character():faction())
Return: bool

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: 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: expenditure
Description: Returns the factions regular expenditure
Parameters: expenditure()
Return: int

Function: income
Description: Returns the factions regular income. This is the income before expenditure is subtracted
Parameters: income()
Return: int

Function: net_income
Description: Returns the factions net income, after expenditure is subtracted
Parameters: net_income()
Return: int

Function: tax_level
Description: Returns the average tax level for the faction
Parameters: tax_level()
Return: int

Function: upkeep
Description: Returns the upkeep cost of all units in the faction
Parameters: upkeep()
Return: int

Function: upkeep_income_percent
Description: Returns the proportion of total income consumed by unit upkeep
Parameters: upkeep_income_percent()
Return: float

Function: upkeep_expenditure_percent
Description: Returns the percentage of total expenditure consumed by unit upkeep
Parameters: upkeep_expenditure_percent()
Return: float

Function: research_queue_idle
Description: Is faction not researching any tech even though they could be
Parameters: research_queue_idle()
Return: bool

Function: has_technology
Description: Does the characters faction have the specified technology
Parameters: has_technology("beer")
Return: bool

Function: is_currently_researching
Description: Is the faction currently researching a technology?
Parameters: is_currently_researching()
Return: bool

Function: has_available_technologies
Description: Does the faction have any technologies currently available for research
Parameters: has_available_technologies()
Return: bool

Function: num_completed_technologies
Description: How many technologies has this faction completed researching?
Parameters: num_completed_technologies()
Return: int

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: 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: 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_trading_with
Description: return the factions this faction is trading with
Parameters: factions_trading_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_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: factions_allied_with
Description: return the factions allied to this faction
Parameters: factions_allied_with()
Return: FACTION_LIST_SCRIPT_INTERFACE

Function: factions_defensive_allies_with
Description: return the factions this faction has a defensive alliance with
Parameters: factions_defensive_allies_with()
Return: FACTION_LIST_SCRIPT_INTERFACE

Function: factions_military_allies_with
Description: return the factions this faction has a military alliance with
Parameters: factions_military_allies_with()
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: REGION_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
Parameters: holds_entire_province(String province, bool include_vassals)
Return: bool

Function: is_vassal
Description: Is this faction a vassel
Parameters: is_vassal()
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_SCRIPT_INTERFACE

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_resource_manager
Description: Manager for pooled resources contained by this faction
Parameters: pooled_resource_manager()
Return: POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE

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: 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: can_be_human
Description: Returns whether the faction can be played by a human player
Parameters: can_be_human()
Return: bool

Function: effect_bundles
Description: Effect bundles active on the faction
Parameters: effect_bundles()
Return: EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE

Function: is_rebel
Description: Is this the rebel faction?
Parameters: is_rebel()
Return: bool

Function: is_faction
Description: Is this the same faction as another interface?
Parameters: is_faction(FACTION_SCRIPT_INTERFACE other)
Return: bool

Function: unit_cap
Description: Unit cap for the specified unit. -1 if unlimited.
Parameters: unit_cap(String unit_record_key)
Return: int32

Function: unit_cap_remaining
Description: Unit cap remaining for the specified unit. -1 if unlimited.
Parameters: unit_cap_available(String unit_record_key)
Return: int32

Function: bonus_values
Description: Active bonus values of this faction
Parameters: bonus_values()
Return: BONUS_VALUES_SCRIPT_INTERFACE

Function: agent_cap
Description: Total capacity for agents of the given type in this faction
Parameters: agent_cap(String agent_key)
Return: card32

Function: agent_cap_remaining
Description: Remaining capacity for agents of the given type in this faction
Parameters: agent_cap_remaining(String agent_key)
Return: card32

Function: agent_subtype_cap
Description: Total capacity for agents of the given subtype in this faction
Parameters: agent_subtype_cap(String agent_subtype_key)
Return: card32

Function: agent_subtype_cap_remaining
Description: Remaining capacity for agents of the given subtype in this faction
Parameters: agent_subtype_cap_remaining(String agent_subtype_key)
Return: card32

Function: team_mates
Description: Faction list - Team mates of given faction
Parameters: team_mates()
Return: FACTION_LIST_SCRIPT_INTERFACE

Function: is_team_mate
Description: Does the faction a team mate of this faction
Parameters: is_team_mate(FACTION_SCRIPT_INTERFACE other)
Return: bool

Function: is_primary_faction
Description: Is this faction currently a primary faction for its subculture?
Parameters: is_primary_faction()
Return: bool

Function: turn_is_skipped
Description: Is this faction currently having its turn skipped?
Parameters: turn_is_skipped()
Return: bool

Function: num_provinces
Description: Get the total number of provinces where this faction controls one or more regions
Parameters: num_provinces()
Return: card32

Function: num_complete_provinces
Description: Get the total number of provinces where this faction controls all regions
Parameters: num_complete_provinces()
Return: card32

Function: provinces
Description: Return a list of province interfaces for every province that this faction controls one or more regions in. Use the num_provinces method instead if you just want the count
Parameters: provinces()
Return: FACTION_PROVINCE_MANAGER_LIST_SCRIPT_INTERFACE

Function: complete_provinces
Description: Return a list of province interfaces for every province that this faction controls completely. Use the num_complete_provinces method instead if you just want the count
Parameters: complete_provinces()
Return: FACTION_PROVINCE_MANAGER_LIST_SCRIPT_INTERFACE

FAMILY_MEMBER_LIST_SCRIPT_INTERFACE

Description: A list of family member 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

FAMILY_MEMBER_SCRIPT_INTERFACE

Description: Family interface

is_null_interface
has_father
has_mother
father
mother
has_trait
come_of_age
command_queue_index
character_details
armory
character

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_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_details
Description: return persistent character details assosciated with this family member/character
Parameters: character_details()
Return: CHARACTER_DETAILS_SCRIPT_INTERFACE

Function: armory
Description: return the armory interface for the current family member
Parameters: armory()
Return: ARMORY_SCRIPT_INTERFACE

Function: character
Description: return the character attached to this family member. May be null if the character is dead
Parameters: character()
Return: CHARACTER_SCRIPT_INTERFACE

FOREIGN_SLOT_LIST_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_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

FOREIGN_SLOT_MANAGER_LIST_SCRIPT_INTERFACE

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_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

FOREIGN_SLOT_MANAGER_SCRIPT_INTERFACE

Description: Foreign Slot Manager Script Interface

is_null_interface
faction
region
slots
num_slots
has_upgrade_available
gdp
has_been_discovered
current_discoverability
discoverability_threshold

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: gdp()
Return: card32

Function: has_been_discovered
Description: returns whether the foreign slots in this region have already been discovered or not, will return false in case of invalid CQI or missing parameter
Parameters: has_been_discovered()
Return: bool

Function: current_discoverability
Description: returns the current discoverability value, which is made up of all positive and negative effects, will return 0 in case of invalid faction_cqi or missing parameter
Parameters: current_discoverability()
Return: int32

Function: discoverability_threshold
Description: returns the current threshold discoverability value, the foreign slots will be revealed should the current_discoverability exceed this value
Parameters: discoverability_threshold()
Return: int32

FOREIGN_SLOT_SCRIPT_INTERFACE

Description: Foreign Slot Script Interface

is_null_interface
cqi
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: cqi
Description: Command Queue Index of this slot
Parameters: cqi()
Return: card32

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

GARRISON_RESIDENCE_SCRIPT_INTERFACE

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
has_army
has_navy
model
faction
army
navy
region
unit_count
buildings
is_under_siege
besieging_character
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: 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: 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: 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: is_under_siege
Description: Is the garrison under siege?
Parameters: is_under_siege()
Return: bool

Function: besieging_character
Description: Get the character besieging this garrison
Parameters: besieging_character()
Return: CHARACTER_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)

MILITARY_FORCE_LIST_SCRIPT_INTERFACE

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

MILITARY_FORCE_SCRIPT_INTERFACE

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
character_list
general_character
faction
has_garrison_residence
garrison_residence
contains_mercenaries
upkeep
active_stance
can_activate_stance
morale
is_armed_citizenry
will_suffer_any_attrition
can_recruit_agent_at_force
can_recruit_unit
can_recruit_unit_class
can_recruit_unit_category
strength
has_effect_bundle
effect_bundles
force_type
pooled_resource_manager
bonus_values
is_set_piece_battle_army
set_piece_battle_army_key
has_access_to_military_force_mercenary_pool_of_recruitment_source
lookup_streak_value

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: 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: will_suffer_any_attrition
Description: returns true if the force will suffer attrition
Parameters: will_suffer_any_attrition()
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: 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: effect_bundles
Description: Effect bundles currently active on the military force
Parameters: effect_bundles()
Return: EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE

Function: force_type
Description: Military force type
Parameters: force_type()
Return: MILITARY_FORCE_TYPE_SCRIPT_INTERFACE

Function: pooled_resource_manager
Description: Pooled resource manager of this military force
Parameters: pooled_resource_manager()
Return: POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE

Function: bonus_values
Description: Active bonus values of this military force
Parameters: bonus_values()
Return: BONUS_VALUES_SCRIPT_INTERFACE

Function: is_set_piece_battle_army
Description: Has this army been spawned as part of a set piece battle?
Parameters: is_set_piece_battle_army()
Return: bool

Function: set_piece_battle_army_key
Description: battle_set_piece_armies record key for this military force. Will be empty if this is not a quest battle army
Parameters: set_piece_battle_army_key()
Return: String

Function: has_access_to_military_force_mercenary_pool_of_recruitment_source
Description: Test if this military force has access to a mercenary pool of a specific recruitment source type. (recruitment sources table)
Parameters: has_access_to_military_force_mercenary_pool_of_recruitment_source(String recruitment_source_key)
Return: bool

Function: lookup_streak_value
Description: Get the current streak value of this military force. Will return -1 if no streak is present. This is a lookup, please cache the results.
Parameters: lookup_streak_value(String streak_key)
Return: int32

MILITARY_FORCE_SLOT_SCRIPT_INTERFACE

Description: Military Force Slot Script Interface

is_null_interface
model
military_force
has_building
building
type_key
template_key
active
faction

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: model
Description: Campaign Modle
Parameters: model()
Return: MODEL_SCRIPT_INTERFACE

Function: military_force
Description: Military Force containing the slot
Parameters: military_force()
Return: MILITARY_FORCE_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

Function: faction
Description: Faction of the containing slot
Parameters: faction()
Return: FACTION_SCRIPT_INTERFACE

MILITARY_FORCE_TYPE_SCRIPT_INTERFACE

Description: A military force type record

is_null_interface
key
has_feature
can_convert_to
can_automatically_convert_to

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 force_type
Parameters: key()
Return: String

Function: has_feature
Description: Does this force type have the specified feature available?
Parameters: has_feature(String feature_key)
Return: bool

Function: can_convert_to
Description: Can this force type convert to the specified other force type?
Parameters: can_convert_to(String force_type_key)
Return: bool

Function: can_automatically_convert_to
Description: Can this force type automatically convert to the specified other force type?
Parameters: can_automatically_convert_to(String force_type_key)
Return: bool

MODEL_SCRIPT_INTERFACE

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
turn_number
campaign_name
campaign_name_key
random_percent
random_int
is_multiplayer
is_player_turn
character_can_reach_character
character_can_reach_settlement
character_can_reach_position
character_can_reach_character_in_stance
character_can_reach_settlement_in_stance
character_can_reach_position_in_stance
character_can_ever_reach_position
character_can_ever_reach_character
character_can_ever_reach_settlement
difficulty_level
combined_difficulty_level
faction_is_local
player_steam_id_is_even
campaign_ai
campaign_type
prison_system
family_member_for_command_queue_index
character_for_command_queue_index
military_force_for_command_queue_index
faction_for_command_queue_index
unit_for_command_queue_index
has_family_member_command_queue_index
has_character_command_queue_index
has_military_force_command_queue_index
has_faction_command_queue_index
shared_states_manager
unit_size_multiplier
has_unit_command_queue_index
logical_position_for_display_position
display_position_for_logical_position
debug_drawing

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: turn_number
Description: Returns the number of the turn currently being taken, starting at 1
Parameters: turn_number()
Return: int

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: is_multiplayer
Description: Returns true when in multiplayer campaign
Parameters: is_multiplayer()
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: character_can_reach_character(character, 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: character_can_reach_position
Description: Can a character reach a (loigcal hex map) position this turn?
Parameters: character_can_reach_position(character, x, y)
Return: bool

Function: character_can_reach_character_in_stance
Description: Can a character, in the specified stance, reach another character this turn?
Parameters: character_can_reach_character_in_stance(character, target_character, stance_key)
Return: bool

Function: character_can_reach_settlement_in_stance
Description: Can a character, in the specified stance, reach a settlement this turn?
Parameters: character_can_reach_settlement_in_stance(character, settlement, stance_key)
Return: bool

Function: character_can_reach_position_in_stance
Description: Can a character, in the specified stance, reach a (logical hex map) position this turn?
Parameters: character_can_reach_position_in_stance(character, x, y, stance_key)
Return: bool

Function: character_can_ever_reach_position
Description: Can a character, reach a (logical hex map) position in any number of turns?
Parameters: character_can_ever_reach_position(character, x, y)
Return: bool

Function: character_can_ever_reach_character
Description: Can a character, reach a character in any number of turns?
Parameters: character_can_ever_reach_character(CHARACTER_SCRIPT_INTERFACE source, CHARACTER_SCRIPT_INTERFACE target)
Return: bool

Function: character_can_ever_reach_settlement
Description: Can a character, reach a settlement in any number of turns?
Parameters: character_can_ever_reach_settlement(CHARACTER_SCRIPT_INTERFACE source, SETTLEMENT_SCRIPT_INTERFACE target)
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: int32

Function: prison_system
Description: Returns the prison system
Parameters: prison_system()
Return: PRISON_SYSTEM_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: 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: 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: 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_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_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: shared_states_manager
Description: Returns shared states manager interface
Parameters: shared_states_manager()
Return: SHARED_STATES_MANAGER_SCRIPT_INTERFACE

Function: unit_size_multiplier
Description: Returns the active unit size multiplier as a decimal percentage. e.g 0.75 for 75% base scale.
Parameters: unit_size_multiplier()
Return: float

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: 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

MODIFY_RITUAL_PERFORMING_CHARACTER_LIST_SCRIPT_INTERFACE

Description: A list of mutable ritual performing character 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: MODIFY_RITUAL_PERFORMING_CHARACTER_LIST_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

MODIFY_RITUAL_PERFORMING_CHARACTER_SCRIPT_INTERFACE

Description: Modify Ritual Performing Character Script Interface

is_null_interface
performer_record
performer
status
status_with_performer
required_agent_type
required_agent_subtype
required_level
recovery_time
set_performer
clear

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: performer_record
Description: Ritual performing character record key
Parameters: performer_record()
Return: String

Function: performer
Description: Family member of the character currently in the slot
Parameters: performer()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: status
Description: Status with the character currently in the slot
Parameters: status(RITUAL_SETUP_SCRIPT_INTERFACE setup)
Return: RITUAL_PERFORMING_CHARACTER_STATUS_SCRIPT_INTERFACE

Function: status_with_performer
Description: Status with the specified character
Parameters: status_with_performer(RITUAL_SETUP_SCRIPT_INTERFACE setup, FAMILY_MEMBER_SCRIPT_INTERFACE performer)
Return: RITUAL_PERFORMING_CHARACTER_STATUS_SCRIPT_INTERFACE

Function: required_agent_type
Description: Required agent type. Empty if none
Parameters: required_agent_type()
Return: String

Function: required_agent_subtype
Description: Required agent subtype. Empty if none
Parameters: required_agent_subtype()
Return: String

Function: required_level
Description: Required level
Parameters: required_level()
Return: card32

Function: recovery_time
Description: Number of rounds the performer will convalesce after performing the ritual
Parameters: recovery_time()
Return: card32

Function: set_performer
Description: Attempt to set the character in the performer slot
Parameters: set_performer(RITUAL_SETUP_SCRIPT_INTERFACE setup, FAMILY_MEMBER_SCRIPT_INTERFACE performer)
Return: bool

Function: clear
Description: Clear the slot
Parameters: clear()
Return: void

MODIFY_RITUAL_SETUP_SCRIPT_INTERFACE

Description: Modify Ritual Setup Script Interface

is_null_interface
performing_faction
ritual_record
performing_characters_valid
performing_characters
target
change_ritual
change_performing_faction

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: performing_faction
Description: The faction performing the ritual
Parameters: performing_faction()
Return: FACTION_SCRIPT_INTERFACE

Function: ritual_record
Description: The ritual to be performed
Parameters: ritual_record()
Return: String

Function: performing_characters_valid
Description: Are all the performing character slots valid?
Parameters: performing_characters_valid()
Return: bool

Function: performing_characters
Description: A list of the performing character slots
Parameters: performing_characters()
Return: MODIFY_RITUAL_PERFORMING_CHARACTER_LIST_SCRIPT_INTERFACE

Function: target
Description: The target of this ritual
Parameters: target()
Return: MODIFY_RITUAL_TARGET_SCRIPT_INTERFACE

Function: change_ritual
Description: Change the ritual setup to a different ritual. This will clear performing characters
Parameters: change_ritual()
Return: void

Function: change_performing_faction
Description: Change the performing faction to a different faction. This will clear performing characters
Parameters: change_performing_faction()
Return: void

MODIFY_RITUAL_TARGET_SCRIPT_INTERFACE

Description: Modify Ritual Target Script Interface

is_null_interface
valid
target_faction_status
target_region_status
target_force_status
target_type
target_record_key
get_target_faction
get_target_region
get_target_force
is_faction_valid_target
is_region_valid_target
is_force_valid_target
can_target_self
status_for_faction_target
status_for_region_target
status_for_force_target
get_all_valid_target_forces_in_faction
get_all_valid_target_regions_in_faction
get_all_valid_target_factions
clear
set_target_faction
set_target_region
set_target_force

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: valid
Description: Is the target currently valid?
Parameters: valid()
Return: bool

Function: target_faction_status
Description: Get the status of the current target faction
Parameters: target_faction_status()
Return: RITUAL_TARGET_FACTION_STATUS_SCRIPT_INTERFACE

Function: target_region_status
Description: Get the status of the current target region
Parameters: target_region_status()
Return: RITUAL_TARGET_REGION_STATUS_SCRIPT_INTERFACE

Function: target_force_status
Description: Get the status of the current target force
Parameters: target_force_status()
Return: RITUAL_TARGET_MILITARY_FORCE_STATUS_SCRIPT_INTERFACE

Function: target_type
Description: Get the target type
Parameters: target_type()
Return: String

Function: target_record_key
Description: Get the key of the target record
Parameters: target_record_key()
Return: String

Function: get_target_faction
Description: Attempt to get the target faction. May be null
Parameters: get_target_faction()
Return: FACTION_SCRIPT_INTERFACE

Function: get_target_region
Description: Attempt to get the target region. May be null
Parameters: get_target_region()
Return: REGION_SCRIPT_INTERFACE

Function: get_target_force
Description: Attempt to get the target force. May be null
Parameters: get_target_force()
Return: MILITARY_FORCE_SCRIPT_INTERFACE

Function: is_faction_valid_target
Description: Is the specified faction a valid target?
Parameters: is_faction_valid_target(FACTION_SCRIPT_INTERFACE faction)
Return: bool

Function: is_region_valid_target
Description: Is the specified region a valid target?
Parameters: is_region_valid_target(REGION_SCRIPT_INTERFACE faction)
Return: bool

Function: is_force_valid_target
Description: Is the specified force a valid target?
Parameters: is_region_valid_target(REGION_SCRIPT_INTERFACE faction)
Return: bool

Function: can_target_self
Description: Is the performing faction able to target itself?
Parameters: can_target_self()
Return: bool

Function: status_for_faction_target
Description: Status for the provided faction.
Parameters: status_for_faction_target(FACTION_SCRIPT_INTERFACE faction)
Return: RITUAL_TARGET_FACTION_STATUS_SCRIPT_INTERFACE

Function: status_for_region_target
Description: Status for the provided region.
Parameters: status_for_region_target(REGION_SCRIPT_INTERFACE region)
Return: RITUAL_TARGET_REGION_STATUS_SCRIPT_INTERFACE

Function: status_for_force_target
Description: Status for the provided force.
Parameters: status_for_force_target(MILITARY_FORCE_SCRIPT_INTERFACE force)
Return: RITUAL_TARGET_MILITARY_FORCE_STATUS_SCRIPT_INTERFACE

Function: get_all_valid_target_forces_in_faction
Description: Get a list of all of the forces that can be targeted by this ritual, in the specified faction.
Parameters: get_all_valid_target_forces_in_faction(FACTION_SCRIPT_INTERFACE faction)
Return: MILITARY_FORCE_LIST_SCRIPT_INTERFACE

Function: get_all_valid_target_regions_in_faction
Description: Get a list of all of the regions that can be targeted by this ritual, in the specified faction.
Parameters: get_all_valid_target_regions_in_faction(FACTION_SCRIPT_INTERFACE faction)
Return: REGION_LIST_SCRIPT_INTERFACE

Function: get_all_valid_target_factions
Description: Get a list of all of the factions that can be targeted by this ritual.
Parameters: get_all_valid_target_factions()
Return: FACTION_LIST_SCRIPT_INTERFACE

Function: clear
Description: Clear the current target
Parameters: clear()
Return: void

Function: set_target_faction
Description: Attempt to set the target faction
Parameters: set_target_faction(FACTION_SCRIPT_INTERFACE target)
Return: bool

Function: set_target_region
Description: Attempt to set the target region
Parameters: set_target_region(REGION_SCRIPT_INTERFACE target)
Return: bool

Function: set_target_force
Description: Attempt to set the target force
Parameters: set_target_force(MILITARY_FORCE_SCRIPT_INTERFACE target)
Return: bool

NULL_SCRIPT_INTERFACE

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

OBSERVATION_OPTIONS_SCRIPT_INTERFACE

Description: Observation Options Script Interface

is_null_interface
locomotion_speed
set_locomotion_speeds
camera_follow_behaviour
set_camera_follow_behaviour

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: locomotion_speed
Description: Locomotion speed setting for characters in this observation group. NORMAL, FAST or VERYFAST
Parameters: locomotion_speed()
Return: String

Function: set_locomotion_speeds
Description: Set the locomotion speed setting for characters in this observation group. NORMAL, FAST or VERYFAST
Parameters: set_locomotion_speed(String locomotion_speed_type)
Return: VOID

Function: camera_follow_behaviour
Description: Camera follow behaviour for characters in this observation group. OFF, CINEMATIC, LOW, MEDIUM, HIGH or VERYHIGH
Parameters: camera_follow_behaviour()
Return: String

Function: set_camera_follow_behaviour
Description: Set the camera follow behaviour for characters in this observation group. OFF, CINEMATIC, LOW, MEDIUM, HIGH or VERYHIGH
Parameters: set_camera_follow_behaviour(String camera_follow_behaviour)
Return: VOID

PENDING_BATTLE_SCRIPT_INTERFACE

Description: Pending battle script interface.

is_null_interface
has_attacker
has_defender
has_contested_garrison
model
attacker
secondary_attackers
defender
secondary_defenders
contested_garrison
is_active
attacker_is_stronger
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
attacker_casulaties
defender_casulaties
attacker_kills
defender_kills
attacker_ending_cp_kill_score
defender_ending_cp_kill_score
attacker_total_hp_lost
defender_total_hp_lost
naval_battle
siege_battle
ambush_battle
failed_ambush_battle
night_battle
battle_type
attacker_strength
defender_strength
has_been_fought
set_piece_battle_key
has_scripted_tile_upgrade
get_how_many_times_ability_has_been_used_in_battle
region_data
logical_position
display_position
is_auto_resolved
ended_with_withdraw

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: model
Description: Access to the campaign model
Parameters: model()
Return: MODEL_SCRIPT_INTERFACE

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
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: is_active
Description: Is a pending battle active?
Parameters: is_active()
Return: bool

Function: attacker_is_stronger
Description: Is the attacking force stronger than the defender?
Parameters: attacker_is_stronger()
Return: bool

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: attacker_casulaties
Description: Number of men the attacker lost in the battle
Parameters: attacker_casulaties()
Return: card32

Function: defender_casulaties
Description: Number of men the defender lost in the battle
Parameters: defender_casulaties()
Return: card32

Function: attacker_kills
Description: Number of men the attacker killed in the battle
Parameters: attacker_kills()
Return: card32

Function: defender_kills
Description: Number of men the defender killed in the battle
Parameters: defender_kills()
Return: card32

Function: attacker_ending_cp_kill_score
Description: ending CP kill score of the attacker (damage)
Parameters: attacker_ending_cp_kill_score()
Return: card32

Function: defender_ending_cp_kill_score
Description: ending CP kill score of the defender (damage)
Parameters: defender_ending_cp_kill_score()
Return: card32

Function: attacker_total_hp_lost
Description: total amount of hp lost by the attacker's units
Parameters: attacker_total_hp_lost()
Return: card32

Function: defender_total_hp_lost
Description: total amount of hp lost by the defender's units
Parameters: defender_total_hp_lost()
Return: card32

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: 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: 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: 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: has_scripted_tile_upgrade
Description: True if the pending battle has the specified tile upgrade tag.
Parameters: has_scripted_tile_upgrade(String tag)
Return: bool

Function: get_how_many_times_ability_has_been_used_in_battle
Description: Expects a faction CQI for and the String tag for the unit ability in question and will return the number of times it was used.
Parameters: get_how_many_times_ability_has_been_used_in_battle(card32 faction_cqi, String tag)
Return: int32

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: is_auto_resolved
Description: True if the pending battle was autoresolved
Parameters: is_auto_resolved()
Return: bool

Function: ended_with_withdraw
Description: True if the battle has been fought and ended with an army withdrawing
Parameters: ended_with_withdraw()
Return: bool

PLAGUE_SCRIPT_INTERFACE

Description: Plague Script Interface

is_null_interface
plague_record
component_records

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: plague_record
Description: Returns the plague's record
Parameters: plague_record()
Return: string

Function: component_records
Description: Returns the plague's components' records
Parameters: component_records()
Return: string

POOLED_RESOURCE_FACTOR_LIST_SCRIPT_INTERFACE

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

POOLED_RESOURCE_FACTOR_SCRIPT_INTERFACE

Description: Pooled Resource Factor Script Interface

is_null_interface
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: key
Description: Pooled resource factor record key of this factor
Parameters: 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

POOLED_RESOURCE_LIST_SCRIPT_INTERFACE

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_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE

Description: Pooled Resource Manager Script Interface

is_null_interface
can_afford_resource_cost
scope
has_owning_faction
owning_faction
has_region
region
has_character
character
has_military_force
military_force
has_province
province
has_faction_province
faction_province
resources
resource

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: can_afford_resource_cost
Description: Test whether the resources contained in this manager could afford to pay the specified resource cost
Parameters: bool can_afford_resource_transaction(String resource_cost_key)
Return: POOLED_RESOURCE_FACTOR_LIST_SCRIPT_INTERFACE

Function: scope
Description: Scope of this pooled resource manager
Parameters: String scope()
Return: String

Function: has_owning_faction
Description: Is the pooled resource manager associated with a faction? This is also true if the manager is associated with a character, military force, region etc
Parameters: has_owning_faction()
Return: bool

Function: owning_faction
Description: Faction that owns this pooled resource manager, if any
Parameters: owning_faction
Return: FACTION_SCRIPT_INTERFACE

Function: has_region
Description: Is the pooled resource manager associated with a region?
Parameters: has_region()
Return: bool

Function: region
Description: Gets the region associated with this pooled resource manager, if any
Parameters: region()
Return: REGION_SCRIPT_INTERFACE

Function: has_character
Description: Is the pooled resource manager associated with a character?
Parameters: has_character()
Return: bool

Function: character
Description: Gets the character associated with this pooled resource manager, if any
Parameters: character()
Return: CHARACTER_SCRIPT_INTERFACE

Function: has_military_force
Description: Is the pooled resource manager associated with a military force?
Parameters: has_military_force()
Return: bool

Function: military_force
Description: Gets the military force associated with this pooled resource manager, if any
Parameters: military_force()
Return: MILITARY_FORCE_SCRIPT_INTERFACE

Function: has_province
Description: Is the pooled resource manager associated with a province?
Parameters: has_province()
Return: bool

Function: province
Description: Gets the province associated with this pooled resource manager, if any
Parameters: province()
Return: PROVINCE_SCRIPT_INTERFACE

Function: has_faction_province
Description: Is the pooled resource manager associated with a faction province manager?
Parameters: has_faction_province()
Return: bool

Function: faction_province
Description: Gets the faction province associated with this pooled resource manager, if any
Parameters: faction_province()
Return: FACTION_PROVINCE_SCRIPT_INTERFACE

Function: resources
Description: List of all resources contained in this manager
Parameters: resources()
Return: POOLED_RESOURCE_LIST_SCRIPT_INTERFACE

Function: resource
Description: Pooled resource with the specified record key. Null if not present
Parameters: resource(String pooled_resource_key)
Return: POOLED_RESOURCE_SCRIPT_INTERFACE

POOLED_RESOURCE_SCRIPT_INTERFACE

Description: Pooled Resource Script Interface

is_null_interface
key
value
manager
percentage_of_capacity
minimum_value
maximum_value
active_effect
number_of_effect_types
factors
factor_by_key
scope
has_persistent_factors

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: value
Description: Total value of this pool
Parameters: value()
Return: int32

Function: manager
Description: Returns the Pooled Resource Manager
Parameters: manager()
Return: POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE

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: 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: 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: factor_by_key
Description: Lookup a pooled resource factor by resource factor key
Parameters: factor_by_key()
Return: POOLED_RESOURCE_FACTOR_SCRIPT_INTERFACE

Function: scope
Description: Scope of the pooled resource. Where it resides and gathers income
Parameters: scope()
Return: String

Function: has_persistent_factors
Description: Does this pooled resource have persistent factors? If true the factor breakdown of this resource is not reset when regular income is applied
Parameters: has_persistent_factors()
Return: bool

PRISON_SYSTEM_SCRIPT_INTERFACE

Description: Prison System Script Interface

is_null_interface
get_faction_prisoners

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: get_faction_prisoners
Description: Returns the prisoners held by the warden faction. Empty if the faction does not have access to campaign prison
Parameters: get_faction_prisoners(FACTION_SCRIPT_INTERFACE faction)
Return: FAMILY_MEMBER_LIST_SCRIPT_INTERFACE

PROVINCE_LIST_SCRIPT_INTERFACE

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

PROVINCE_SCRIPT_INTERFACE

Description: Province script interface. Represents a geographic province

is_null_interface
key
faction_provinces
faction_province_for_faction
capital_region
regions
adjacent_provinces
pooled_resource_manager

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: key
Description: Province record key
Parameters: key()
Return: String

Function: faction_provinces
Description: All faction provinces present in this province
Parameters: faction_provinces()
Return: FACTION_PROVINCE_MANAGER_LIST_SCRIPT_INTERFACE

Function: faction_province_for_faction
Description: Lookup the faction province manager of the provided faction
Parameters: faction_province_for_faction(FACTION_SCRIPT_INTERFACE faction)
Return: FACTION_PROVINCE_MANAGER_SCRIPT_INTERFACE

Function: capital_region
Description: Returns the region containing the province capital settlement
Parameters: capital_region()
Return: REGION_SCRIPT_INTERFACE

Function: regions
Description: All regions contained within this province
Parameters: regions()
Return: REGION_LIST_SCRIPT_INTERFACE

Function: adjacent_provinces
Description: Returns all adjacent provinces to this province
Parameters: adjacent_provinces()
Return: PROVINCE_LIST_SCRIPT_INTERFACE

Function: pooled_resource_manager
Description: Pooled resource manager of this province
Parameters: pooled_resource_manager()
Return: POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE

REGION_DATA_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

REGION_DATA_SCRIPT_INTERFACE

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
get_bounds
region
sea_region
winds_of_magic_strength
characters_of_faction_in_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: get_bounds
Description: Returns x_min, y_min, x_max, y_max components of the regions bounds
Parameters: get_bounds()
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

Function: winds_of_magic_strength
Description: Returns the winds of magic level of the region, both as a numeric index and string key from the campaign_map_winds_of_magic_strength table
Parameters: winds_of_magic_strength()
Return: int, String

Function: characters_of_faction_in_region
Description: Returns a list of characters of a specified faction who are currently in the region
Parameters: characters_of_faction_in_region(FACTION_SCRIPT_INTERFACE faction)
Return: CHARACTER_LIST_SCRIPT_INTERFACE

REGION_LIST_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

REGION_MANAGER_SCRIPT_INTERFACE

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.

REGION_SCRIPT_INTERFACE

Description: Region script interface, includes region finance and slot/settlement info

is_null_interface
cqi
model
owning_faction
slot_list
settlement
garrison_residence
name
province_name
public_order
num_buildings
slot_type_exists
building_exists
last_building_constructed_key
resource_exists
any_resource_available
adjacent_region_list
is_abandoned
can_recruit_agent_at_settlement
faction_province_growth
faction_province_growth_per_turn
gdp
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
faction_province_effect_bundles
has_effect_bundle
faction_province_has_effect_bundle
province
faction_province
pooled_resource_manager
bonus_values

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: cqi
Description: Command Queue Index of this region
Parameters: cqi()
Return: card32

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_name
Description: Key of the province containing the region
Parameters: province_name()
Return: String

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: 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: is_abandoned
Description: Returns true if the region is abandoned
Parameters: is_abandoned()
Return: bool

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(string agent_key)
Return: bool

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: gdp
Description: Returns the current gross domestic produce of this region
Parameters: gdp()
Return: int32

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: 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: has_effect_bundle
Description: Test if this region has the specified effect bundle
Parameters: has_effect_bundle(String effect_bundle_key)
Return: bool

Function: faction_province_has_effect_bundle
Description: Test if this regions faction province has the specified effect bundle
Parameters: faction_province_has_effect_bundle(String effect_bundle_key)
Return: bool

Function: province
Description: Geographical province that contains this region
Parameters: province()
Return: PROVINCE_SCRIPT_INTERFACE

Function: faction_province
Description: Faction province that owns this region
Parameters: faction_province()
Return: FACTION_PROVINCE_MANAGER_SCRIPT_INTERFACE

Function: pooled_resource_manager
Description: Pooled resource manager of this region
Parameters: pooled_resource_manager()
Return: POOLED_RESOURCE_MANAGER_SCRIPT_INTERFACE

Function: bonus_values
Description: Active bonus values of this region
Parameters: bonus_values()
Return: BONUS_VALUES_SCRIPT_INTERFACE

RESOURCE_TRANSACTION_SCRIPT_INTERFACE

Description: Resource Transaction Script Interface

is_null_interface
total_treasury_change
absolute_resource_change
precentage_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: absolute_resource_change
Description: Total absolute value change applied to the specified resource by this resource transaction
Parameters: absolute_resource_change(String resource_key)
Return: int32

Function: precentage_resource_change
Description: Total percentage value change applied to the specified resource by this resource transaction
Parameters: precentage_resource_change(String resource_key)
Return: int32

RITUAL_PERFORMING_CHARACTER_LIST_SCRIPT_INTERFACE

Description: A list of ritual performing character 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: RITUAL_PERFORMING_CHARACTER_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

RITUAL_PERFORMING_CHARACTER_SCRIPT_INTERFACE

Description: Ritual Performing Character Script Interface

is_null_interface
performer_record
performer
status
status_with_performer
required_agent_type
required_agent_subtype
required_level
recovery_time

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: performer_record
Description: Ritual performing character record key
Parameters: performer_record()
Return: String

Function: performer
Description: Family member of the character currently in the slot
Parameters: performer()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: status
Description: Status with the character currently in the slot
Parameters: status(RITUAL_SETUP_SCRIPT_INTERFACE setup)
Return: RITUAL_PERFORMING_CHARACTER_STATUS_SCRIPT_INTERFACE

Function: status_with_performer
Description: Status with the specified character
Parameters: status_with_performer(RITUAL_SETUP_SCRIPT_INTERFACE setup, FAMILY_MEMBER_SCRIPT_INTERFACE performer)
Return: RITUAL_PERFORMING_CHARACTER_STATUS_SCRIPT_INTERFACE

Function: required_agent_type
Description: Required agent type. Empty if none
Parameters: required_agent_type()
Return: String

Function: required_agent_subtype
Description: Required agent subtype. Empty if none
Parameters: required_agent_subtype()
Return: String

Function: required_level
Description: Required level
Parameters: required_level()
Return: card32

Function: recovery_time
Description: Number of rounds the performer will convalesce after performing the ritual
Parameters: recovery_time()
Return: card32

RITUAL_PERFORMING_CHARACTER_STATUS_SCRIPT_INTERFACE

Description: Ritual Performing Character Status Script Interface

is_null_interface
valid
no_performer_provided
dead
wounded
wrong_agent_type
wrong_agent_subtype
level_too_low
duplicate_performer

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: valid
Description: Are there no error flags set?
Parameters: valid()
Return: bool

Function: no_performer_provided
Description: There is no performer present in the slot
Parameters: no_performer_provided()
Return: bool

Function: dead
Description: The performer is dead
Parameters: dead()
Return: bool

Function: wounded
Description: The performer is wounded
Parameters: wounded()
Return: bool

Function: wrong_agent_type
Description: The performer is the wrong agent type
Parameters: wrong_agent_type()
Return: bool

Function: wrong_agent_subtype
Description: The performer is the wrong agent subtype
Parameters: wrong_agent_subtype()
Return: bool

Function: level_too_low
Description: The performer is too low level
Parameters: level_too_low()
Return: bool

Function: duplicate_performer
Description: The performer is already present in another slot
Parameters: duplicate_performer()
Return: bool

RITUAL_SETUP_SCRIPT_INTERFACE

Description: Ritual Setup Script Interface

is_null_interface
performing_faction
ritual_record
performing_characters_valid
performing_characters
target
clone_as_modify_interface

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: performing_faction
Description: The faction performing the ritual
Parameters: performing_faction()
Return: FACTION_SCRIPT_INTERFACE

Function: ritual_record
Description: The ritual to be performed
Parameters: ritual_record()
Return: String

Function: performing_characters_valid
Description: Are all the performing character slots valid?
Parameters: performing_characters_valid()
Return: bool

Function: performing_characters
Description: A list of the performing character slots
Parameters: performing_characters()
Return: RITUAL_PERFORMING_CHARACTER_LIST_SCRIPT_INTERFACE

Function: target
Description: The target of this ritual
Parameters: target()
Return: RITUAL_TARGET_SCRIPT_INTERFACE

Function: clone_as_modify_interface
Description: Create a new copy of this ritual setup in a modify interface
Parameters: clone_as_modify_interface()
Return: MODIFY_RITUAL_SETUP_SCRIPT_INTERFACE

RITUAL_STATUS_SCRIPT_INTERFACE

Description: Ritual Status Script Interface

is_null_interface
available
disabled
cannot_afford_resource_cost
unlock_mission_not_completed
chain_locked
prior_chain_stages_incomplete
already_completed_in_chain
on_cooldown
chain_locked_by_another_faction
reaction_constraints_not_met
not_enough_slaves
no_available_ritual_sites
script_locked
war_declaration_required
invalid_performing_characters
invalid_target
blocked_by_pending_battle
blocked_by_pending_action

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: available
Description: available
Parameters: available()
Return: bool

Function: disabled
Description: disabled
Parameters: disabled()
Return: bool

Function: cannot_afford_resource_cost
Description: cannot afford resource cost
Parameters: cannot_afford_resource_cost()
Return: bool

Function: unlock_mission_not_completed
Description: unlock mission not completed
Parameters: unlock_mission_not_completed()
Return: bool

Function: chain_locked
Description: chain locked
Parameters: chain_locked()
Return: bool

Function: prior_chain_stages_incomplete
Description: prior chain stages incomplete
Parameters: prior_chain_stages_incomplete()
Return: bool

Function: already_completed_in_chain
Description: already completed in chain
Parameters: already_completed_in_chain()
Return: bool

Function: on_cooldown
Description: on cooldown
Parameters: on_cooldown()
Return: bool

Function: chain_locked_by_another_faction
Description: chain locked by another faction
Parameters: chain_locked_by_another_faction()
Return: bool

Function: reaction_constraints_not_met
Description: reaction constraints not met
Parameters: reaction_constraints_not_met()
Return: bool

Function: not_enough_slaves
Description: not enough slaves
Parameters: not_enough_slaves()
Return: bool

Function: no_available_ritual_sites
Description: no available ritual sites
Parameters: no_available_ritual_sites()
Return: bool

Function: script_locked
Description: script locked
Parameters: script_locked()
Return: bool

Function: war_declaration_required
Description: war declaration required
Parameters: war_declaration_required()
Return: bool

Function: invalid_performing_characters
Description: Invalid performing charcacter
Parameters: invalid_performing_characters()
Return: bool

Function: invalid_target
Description: invalid target
Parameters: invalid_target()
Return: bool

Function: blocked_by_pending_battle
Description: blocked by pending battle
Parameters: blocked_by_pending_battle()
Return: bool

Function: blocked_by_pending_action
Description: blocked by pending action
Parameters: blocked_by_pending_action()
Return: bool

RITUAL_TARGET_FACTION_STATUS_SCRIPT_INTERFACE

Description: Ritual Target Faction Status Script Interface

is_null_interface
valid
wrong_type
no_target
not_own
is_own
invalid_for_any_ritual
human
not_human
faction_not_permitted

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: valid
Description: No invalid flags are currently set
Parameters: valid()
Return: bool

Function: wrong_type
Description: The target type is not a faction
Parameters: wrong_type()
Return: bool

Function: no_target
Description: There is currently no target set
Parameters: no_target()
Return: bool

Function: not_own
Description: This is not your own faction, and only your own faction is valid.
Parameters: not_own()
Return: bool

Function: is_own
Description: This is your own faction, and your own faction is not valid.
Parameters: is_own()
Return: bool

Function: invalid_for_any_ritual
Description: This faction will never be valid for any ritual. Ever.
Parameters: invalid_for_any_ritual()
Return: bool

Function: human
Description: This faction is human and this ritual may only target non-humans
Parameters: human()
Return: bool

Function: not_human
Description: This faction is not human and this ritual may only target humans
Parameters: not_human()
Return: bool

Function: faction_not_permitted
Description: This faction is excluded from the permitted faction set for this ritual
Parameters: faction_not_permitted()
Return: bool

RITUAL_TARGET_MILITARY_FORCE_STATUS_SCRIPT_INTERFACE

Description: Ritual Target Military Force Status Script Interface

is_null_interface
valid
wrong_type
no_target
not_own
is_own
invalid_subculture
invalid_for_any_ritual
not_on_sea
not_on_land

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: valid
Description: No invalid flags are currently set
Parameters: valid()
Return: bool

Function: wrong_type
Description: This is not a military force target
Parameters: wrong_type()
Return: bool

Function: no_target
Description: There is currently no target set
Parameters: no_target()
Return: bool

Function: not_own
Description: This force is not owned by you, and it must be to perform this ritual.
Parameters: not_own()
Return: bool

Function: is_own
Description: This force is owned by you, and it must not be to perform this ritual.
Parameters: is_own()
Return: bool

Function: invalid_subculture
Description: This force is not the correct subculture.
Parameters: invalid_subculture()
Return: bool

Function: invalid_for_any_ritual
Description: This force will never be valid for any ritual. Ever.
Parameters: invalid_for_any_ritual()
Return: bool

Function: not_on_sea
Description: This force is not on sea, and it must be to perform this ritual
Parameters: not_on_sea()
Return: bool

Function: not_on_land
Description: This force is not on land, and it must be to perform this ritual
Parameters: not_on_land()
Return: bool

RITUAL_TARGET_REGION_STATUS_SCRIPT_INTERFACE

Description: Ritual Target Region Status Script Interface

is_null_interface
valid
wrong_type
no_target
not_own
is_own
invalid_subculture
foreign_slot_subculture_not_present
foreign_slot_set_not_present
foreign_slot_set_present
is_ruin
is_not_ruin

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: valid
Description: No invalid flags are currently set
Parameters: valid()
Return: bool

Function: wrong_type
Description: This is not a region target
Parameters: wrong_type()
Return: bool

Function: no_target
Description: There is currently no target set
Parameters: no_target()
Return: bool

Function: not_own
Description: This region is not owned by you, and it must be to perform this ritual.
Parameters: not_own()
Return: bool

Function: is_own
Description: This region is owned by you, and it must not be to perform this ritual.
Parameters: is_own()
Return: bool

Function: invalid_subculture
Description: This region is not the correct subculture.
Parameters: invalid_subculture()
Return: bool

Function: foreign_slot_subculture_not_present
Description: This region does not contain a foreign slot with the appropriate subculture.
Parameters: foreign_slot_subculture_not_present()
Return: bool

Function: foreign_slot_set_not_present
Description: This region does not contain a foreign slot with the appropriate foreign slot set record.
Parameters: foreign_slot_set_not_present()
Return: bool

Function: foreign_slot_set_present
Description: This region already contains a foreign slot with the inappropriate foreign slot set record.
Parameters: foreign_slot_set_present()
Return: bool

Function: is_ruin
Description: This region is a ruin and this ritual may not target ruins.
Parameters: is_ruin()
Return: bool

Function: is_not_ruin
Description: This region is not ruin and this ritual must target only ruins.
Parameters: is_not_ruin()
Return: bool

RITUAL_TARGET_SCRIPT_INTERFACE

Description: Ritual Target Script Interface

is_null_interface
valid
target_faction_status
target_region_status
target_force_status
target_type
target_record_key
get_target_faction
get_target_region
get_target_force
is_faction_valid_target
is_region_valid_target
is_force_valid_target
can_target_self
status_for_faction_target
status_for_region_target
status_for_force_target
get_all_valid_target_forces_in_faction
get_all_valid_target_regions_in_faction
get_all_valid_target_factions

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: valid
Description: Is the target currently valid?
Parameters: valid()
Return: bool

Function: target_faction_status
Description: Get the status of the current target faction
Parameters: target_faction_status()
Return: RITUAL_TARGET_FACTION_STATUS_SCRIPT_INTERFACE

Function: target_region_status
Description: Get the status of the current target region
Parameters: target_region_status()
Return: RITUAL_TARGET_REGION_STATUS_SCRIPT_INTERFACE

Function: target_force_status
Description: Get the status of the current target force
Parameters: target_force_status()
Return: RITUAL_TARGET_MILITARY_FORCE_STATUS_SCRIPT_INTERFACE

Function: target_type
Description: Get the target type
Parameters: target_type()
Return: String

Function: target_record_key
Description: Get the key of the target record
Parameters: target_record_key()
Return: String

Function: get_target_faction
Description: Attempt to get the target faction. May be null
Parameters: get_target_faction()
Return: FACTION_SCRIPT_INTERFACE

Function: get_target_region
Description: Attempt to get the target region. May be null
Parameters: get_target_region()
Return: REGION_SCRIPT_INTERFACE

Function: get_target_force
Description: Attempt to get the target force. May be null
Parameters: get_target_force()
Return: MILITARY_FORCE_SCRIPT_INTERFACE

Function: is_faction_valid_target
Description: Is the specified faction a valid target?
Parameters: is_faction_valid_target(FACTION_SCRIPT_INTERFACE faction)
Return: bool

Function: is_region_valid_target
Description: Is the specified region a valid target?
Parameters: is_region_valid_target(REGION_SCRIPT_INTERFACE faction)
Return: bool

Function: is_force_valid_target
Description: Is the specified force a valid target?
Parameters: is_region_valid_target(REGION_SCRIPT_INTERFACE faction)
Return: bool

Function: can_target_self
Description: Is the performing faction able to target itself?
Parameters: can_target_self()
Return: bool

Function: status_for_faction_target
Description: Status for the provided faction.
Parameters: status_for_faction_target(FACTION_SCRIPT_INTERFACE faction)
Return: RITUAL_TARGET_FACTION_STATUS_SCRIPT_INTERFACE

Function: status_for_region_target
Description: Status for the provided region.
Parameters: status_for_region_target(REGION_SCRIPT_INTERFACE region)
Return: RITUAL_TARGET_REGION_STATUS_SCRIPT_INTERFACE

Function: status_for_force_target
Description: Status for the provided force.
Parameters: status_for_force_target(MILITARY_FORCE_SCRIPT_INTERFACE force)
Return: RITUAL_TARGET_MILITARY_FORCE_STATUS_SCRIPT_INTERFACE

Function: get_all_valid_target_forces_in_faction
Description: Get a list of all of the forces that can be targeted by this ritual, in the specified faction.
Parameters: get_all_valid_target_forces_in_faction(FACTION_SCRIPT_INTERFACE faction)
Return: MILITARY_FORCE_LIST_SCRIPT_INTERFACE

Function: get_all_valid_target_regions_in_faction
Description: Get a list of all of the regions that can be targeted by this ritual, in the specified faction.
Parameters: get_all_valid_target_regions_in_faction(FACTION_SCRIPT_INTERFACE faction)
Return: REGION_LIST_SCRIPT_INTERFACE

Function: get_all_valid_target_factions
Description: Get a list of all of the factions that can be targeted by this ritual.
Parameters: get_all_valid_target_factions()
Return: FACTION_LIST_SCRIPT_INTERFACE

ROUTE_NETWORK_SCRIPT_INTERFACE

Description: Route Network Script Interface

is_null_interface
network_id
record_key
node_for_id
node_for_position
node_for_record_key
segment_between_nodes
segment_between_nodes_by_id
segment_between_nodes_by_key
find_path
find_path_by_id
find_path_by_key
find_nearest_node
entry_nodes
exit_nodes

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: network_id
Description: Numeric ID of this network
Parameters: network_id()
Return: int

Function: record_key
Description: Record key of this network
Parameters: record_key()
Return: String

Function: node_for_id
Description: Lookup a node in this network by its numeric ID
Parameters: node_for_id(int node_id)
Return: ROUTE_NODE_SCRIPT_INTERFACE

Function: node_for_position
Description: Lookup a node in this network by its route position
Parameters: node_for_position(ROUTE_POSITION_SCRIPT_INTERFACE position)
Return: ROUTE_NODE_SCRIPT_INTERFACE

Function: node_for_record_key
Description: Lookup a node in this network by its record
Parameters: node_for_record_key(String node_key)
Return: ROUTE_NODE_SCRIPT_INTERFACE

Function: segment_between_nodes
Description: Lookup a segment link between two nodes
Parameters: segment_between_nodes(ROUTE_NODE_SCRIPT_INTERFACE from, ROUTE_NODE_SCRIPT_INTERFACE to)
Return: ROUTE_SEGMENT_SCRIPT_INTERFACE

Function: segment_between_nodes_by_id
Description: Lookup a segment link between two nodes, by id
Parameters: segment_between_nodes_by_id(NodeID from, NodeID to)
Return: ROUTE_SEGMENT_SCRIPT_INTERFACE

Function: segment_between_nodes_by_key
Description: Lookup a segment link between two nodes, by key
Parameters: segment_between_nodes_by_key(String from_node_key, String to_node_key)
Return: ROUTE_SEGMENT_SCRIPT_INTERFACE

Function: find_path
Description: Attempt to find a path between the two nodes. Path will be empty if no path could be found
Parameters: find_path(ROUTE_NODE_SCRIPT_INTERFACE from_node, ROUTE_NODE_SCRIPT_INTERFACE to_node)
Return: ROUTE_SEGMENT_SCRIPT_INTERFACE

Function: find_path_by_id
Description: Attempt to find a path between the two nodes, by ID. Path will be empty if no path could be found
Parameters: find_path(NodeID from_node, NodeID to_node)
Return: ROUTE_SEGMENT_SCRIPT_INTERFACE

Function: find_path_by_key
Description: Attempt to find a path between the two nodes, by node record key. Path will be empty if no path could be found
Parameters: find_path_by_key(String from_node_key, String to_node_key)
Return: ROUTE_SEGMENT_SCRIPT_INTERFACE

Function: find_nearest_node
Description: Find the node on this network closest to the given logical position. May be null if the network is empty or params are incorrect
Parameters: find_nearest_node(int x, int y)
Return: ROUTE_NODE_SCRIPT_INTERFACE

Function: entry_nodes
Description: Get a list of all entry nodes in this network
Parameters: entry_nodes()
Return: ROUTE_NODE_LIST_SCRIPT_INTERFACE

Function: exit_nodes
Description: Get a list of all exit nodes in this network
Parameters: exit_nodes()
Return: ROUTE_NODE_LIST_SCRIPT_INTERFACE

ROUTE_NODE_LIST_SCRIPT_INTERFACE

Description: A list of route node 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: ROUTE_NODE_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

ROUTE_NODE_SCRIPT_INTERFACE

Description: Route Node Script Interface

is_null_interface
route_position
record_key
logical_position
world_position
region_key
region_data
link_segments
link_to_node_id
link_to_node_record
is_entrance
is_exit

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: route_position
Description: Returns the route position of this node
Parameters: route_position()
Return: ROUTE_POSITION_SCRIPT_INTERFACE

Function: record_key
Description: Returns the record key of this node
Parameters: record_key()
Return: String

Function: logical_position
Description: Returns the logical position of this node
Parameters: logical_position()
Return: (X, Y)

Function: world_position
Description: Returns the world position of this node
Parameters: world_position()
Return: (X, Y)

Function: region_key
Description: Returns the key of the region this node is inside of
Parameters: region_key()
Return: String

Function: region_data
Description: Returns the region data this node is inside of
Parameters: region_data()
Return: REGION_DATA_SCRIPT_INTERFACE

Function: link_segments
Description: Returns the a list of route segments that can be used to leave this node
Parameters: link_segments()
Return: ROUTE_SEGMENT_LIST_SCRIPT_INTERFACE

Function: link_to_node_id
Description: Attempt to find the segment between this node and the specified node
Parameters: link_to_node_id(int node_id)
Return: ROUTE_SEGMENT_SCRIPT_INTERFACE

Function: link_to_node_record
Description: Attempt to find the segment between this node and the specified node
Parameters: link_to_node_record(String record_key)
Return: ROUTE_SEGMENT_SCRIPT_INTERFACE

Function: is_entrance
Description: True if this node is treated as a network entrance point
Parameters: is_entrance()
Return: bool

Function: is_exit
Description: True if this node is treated as a network exit point
Parameters: is_exit()
Return: bool

ROUTE_PATH_SCRIPT_INTERFACE

Description: Route Path Script Interface

is_null_interface
network
set_network
push_node
push_node_by_id
push_node_by_position
push_node_by_key
pop_back
clear
as_node_id_table
as_node_list
valid

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: network
Description: Route network that this path is on
Parameters: network()
Return: ROUTE_NETWORK_SCRIPT_INTERFACE

Function: set_network
Description: Set the route network that this path is on
Parameters: set_network(ROUTE_NETWORK_SCRIPT_INTERFACE network)
Return: bool

Function: push_node
Description: Appends a node to the path
Parameters: push_node(ROUTE_NODE_SCRIPT_INTERFACE node)
Return: void

Function: push_node_by_id
Description: Appends a node to the path, by id
Parameters: push_node_by_id(int node_id)
Return: void

Function: push_node_by_position
Description: Appends a node to the path, by position
Parameters: push_node_by_position(ROUTE_POSITION_SCRIPT_INTERFACE node_position)
Return: void

Function: push_node_by_key
Description: Appends a node to the path, by node key
Parameters: push_node_by_key(String node_key)
Return: void

Function: pop_back
Description: Removes the end node of the path. Returns true if a node was popped
Parameters: pop_back()
Return: bool

Function: clear
Description: Removes all nodes from the path
Parameters: clear()
Return: void

Function: as_node_id_table
Description: Returns the path as a node ID lua table
Parameters: as_node_id_table()
Return: NodeID table

Function: as_node_list
Description: Returns the path as a node list interface
Parameters: as_node_list()
Return: ROUTE_NODE_LIST_SCRIPT_INTERFACE

Function: valid
Description: Is this path valid and can it actually be followed?
Parameters: valid()
Return: bool

ROUTE_POSITION_SCRIPT_INTERFACE

Description: Route Position Script Interface

is_null_interface
network
network_id
node
node_id
valid

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: network
Description: Network that this position resides within
Parameters: network()
Return: ROUTE_NETWORK_SCRIPT_INTERFACE

Function: network_id
Description: ID of the Network that this position resides within
Parameters: network_id()
Return: int

Function: node
Description: Node that this position represents
Parameters: node()
Return: ROUTE_NODE_SCRIPT_INTERFACE

Function: node_id
Description: ID of the node that this position represents
Parameters: node_id()
Return: int

Function: valid
Description: Is this a valid position?
Parameters: valid()
Return: bool

ROUTE_SEGMENT_LIST_SCRIPT_INTERFACE

Description: A list of route segment 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: ROUTE_SEGMENT_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

ROUTE_SEGMENT_SCRIPT_INTERFACE

Description: Route Segment Script Interface

is_null_interface
to
regions

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: to
Description: Node that this segment links to
Parameters: to()
Return: ROUTE_NODE_SCRIPT_INTERFACE

Function: regions
Description: List of regions that this segment passes through
Parameters: regions()
Return: REGION_DATA_LIST_SCRIPT_INTERFACE

SEA_REGION_LIST_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

SEA_REGION_MANAGER_SCRIPT_INTERFACE

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

SEA_REGION_SCRIPT_INTERFACE

Description: Sea Region script interface, only basic information as sea regions do not contain settlements

is_null_interface
model
name
region_data_interface

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: model
Description: Campaign Model
Parameters: model()
Return: CAMPAIGN_MODEL

Function: name
Description: Sea Region Record Key
Parameters: name()
Return: String

Function: region_data_interface
Description: Gets the REGION_DATA interface of the region
Parameters: region_data_interface()
Return: REGION_DATA_SCRIPT_INTERFACE

SETTLEMENT_SCRIPT_INTERFACE

Description: Settlement script interface

is_null_interface
key
cqi
has_commander
logical_position_x
logical_position_y
display_position_x
display_position_y
display_primary_building_chain
primary_building_chain
model
commander
faction
region
slot_list
is_port
get_climate
primary_slot
port_slot
active_secondary_slots
first_empty_active_secondary_slot

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: cqi
Description: Command queue index of this settlement
Parameters: cqi()
Return: card32

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: display_primary_building_chain
Description: Building chain used to display this settlement. May not be the same as the logical building chain
Parameters: display_primary_building_chain()
Return: String

Function: primary_building_chain
Description: Primary building chain of this settlement
Parameters: primary_building_chain()
Return: String

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

SHARED_STATES_MANAGER_SCRIPT_INTERFACE

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

SLOT_LIST_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_LIST_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

SLOT_SCRIPT_INTERFACE

Description: Slot script interface

is_null_interface
has_building
model
region
building
faction
type
name
template_key
resource_key
active

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 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: active
Description: Is this slot active?
Parameters: active()
Return: bool

TELEPORTATION_NETWORK_LIST_SCRIPT_INTERFACE

Description: A list of teleportation network 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: TELEPORTATION_NETWORK_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

TELEPORTATION_NETWORK_SCRIPT_INTERFACE

Description: Teleportation Network Script Interface

is_null_interface
record_key
lookup_open_node
open_nodes
open_nodes_of_template
is_node_closed
closed_nodes
closed_nodes_of_template

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: record_key
Description: Database record key for this network
Parameters: record_key()
Return: String

Function: lookup_open_node
Description: Attempt to lookup the specified open node
Parameters: lookup_open_node(String node_key)
Return: TELEPORTATION_NODE_SCRIPT_INTERFACE

Function: open_nodes
Description: Return a list of all open nodes
Parameters: open_nodes()
Return: TELEPORTATION_NODE_LIST_SCRIPT_INTERFACE

Function: open_nodes_of_template
Description: Return a list of all open nodes of the specified template
Parameters: open_nodes_of_template(String template_key)
Return: TELEPORTATION_NODE_LIST_SCRIPT_INTERFACE

Function: is_node_closed
Description: Is the node currently closed
Parameters: is_node_closed(String node_key)
Return: bool

Function: closed_nodes
Description: Return a list of all closed nodes
Parameters: closed_nodes()
Return: TELEPORTATION_NODE_RECORD_LIST_SCRIPT_INTERFACE

Function: closed_nodes_of_template
Description: Return a list all closed nodes of the specified template
Parameters: closed_nodes_of_template(String template_key)
Return: TELEPORTATION_NODE_RECORD_LIST_SCRIPT_INTERFACE

TELEPORTATION_NETWORK_SYSTEM_SCRIPT_INTERFACE

Description: Teleportation Network Script Interface

is_null_interface
lookup_network
lookup_open_node

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: lookup_network
Description: Lookup a teleportation network by key
Parameters: lookup_network(String network_key)
Return: TELEPORTATION_NETWORK_SCRIPT_INTERFACE

Function: lookup_open_node
Description: Lookup an open teleportation node by key. You should favour looking up the network first if looking up many nodes
Parameters: lookup_node(String node_key)
Return: TELEPORTATION_NODE_SCRIPT_INTERFACE

TELEPORTATION_NODE_LIST_SCRIPT_INTERFACE

Description: A list of teleportation network node 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: TELEPORTATION_NODE_LIST_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

TELEPORTATION_NODE_RECORD_LIST_SCRIPT_INTERFACE

Description: A list of teleportation network node record 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: TELEPORTATION_NODE_RECORD_LIST_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

TELEPORTATION_NODE_RECORD_SCRIPT_INTERFACE

Description: Teleportation Node Record Script Interface

is_null_interface
key
template_key
network_key
position

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: key
Description: Record key
Parameters: key()
Return: String

Function: template_key
Description: Fixed template record key for this node. Empty if the node can accept any template
Parameters: template_key()
Return: String

Function: network_key
Description: Database record key of the network this node belongs to
Parameters: network_key()
Return: String

Function: position
Description: Logical position of this node
Parameters: position()
Return: (card16 x, card16 y

TELEPORTATION_NODE_SCRIPT_INTERFACE

Description: Teleportation Node Script Interface

is_null_interface
record_key
template_key
round_opened
number_of_incoming_travellers
closable
position

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: record_key
Description: Database record key of this node
Parameters: record_key()
Return: String

Function: template_key
Description: Database record key of this nodes template
Parameters: template_key()
Return: String

Function: round_opened
Description: Round this node was opened
Parameters: round_opened()
Return: int32

Function: number_of_incoming_travellers
Description: Number of characters travelling through the network to this specific node
Parameters: number_of_incoming_travellers()
Return: int32

Function: closable
Description: Can this node be closed by a character?
Parameters: closable()
Return: bool

Function: position
Description: Logical hex position of this node
Parameters: position()
Return: (card16 x, card16 y)

UNIQUE_AGENT_DETAILS_LIST_SCRIPT_INTERFACE

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

UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE

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

UNIT_LIST_SCRIPT_INTERFACE

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

UNIT_PURCHASABLE_EFFECT_LIST_SCRIPT_INTERFACE

Description: A list of unit purchasable 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: UNIT_PURCHASABLE_EFFECT_LIST_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool

UNIT_PURCHASABLE_EFFECT_SCRIPT_INTERFACE

Description: Unit purchasable effect script interface.

is_null_interface
record_key

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: record_key
Description: Unit purchasable effect record key
Parameters: record_key()
Return: String

UNIT_SCRIPT_INTERFACE

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
percentage_proportion_of_full_strength
has_banner_ancillary
banner_ancillary
experience_level
can_upgrade_unit_equipment
can_upgrade_unit
get_unit_custom_battle_cost
can_purchase_effect
can_unpurchase_effect
get_unit_purchasable_effects
get_unit_purchased_effects

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: 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: 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: experience_level
Description: Get the experience level of this unit, which is the number of chevrons it has
Parameters: experience_level()
Return: card32

Function: can_upgrade_unit_equipment
Description: Can this unit upgrade it's equipment
Parameters: can_upgrade_unit_equipment()
Return: bool

Function: can_upgrade_unit
Description: Can this unit be upgraded to another unit
Parameters: can_upgrade_unit()
Return: bool

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: can_purchase_effect
Description: Can the specified purchase happen
Parameters: can_purchase_effect(faction, effect)
Return: bool

Function: can_unpurchase_effect
Description: Can the specified unpurchase happen
Parameters: can_unpurchase_effect(effect)
Return: bool

Function: get_unit_purchasable_effects
Description: Get the list of unit purchasable effects linked to this unit
Parameters: get_unit_purchasable_effects()
Return: UNIT_PURCHASABLE_EFFECT_LIST_SCRIPT_INTERFACE

Function: get_unit_purchased_effects
Description: Get the list of purchasable effects purchased for the unit
Parameters: get_unit_purchased_effects()
Return: UNIT_PURCHASABLE_EFFECT_LIST_SCRIPT_INTERFACE

WAR_COORDINATION_SCRIPT_INTERFACE

Description: Favour Points Script Interface. Can be accessed from the episodic scripting interface.

is_null_interface
get_faction_favour_points_toward_faction
set_faction_favour_points_toward_faction

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: get_faction_favour_points_toward_faction
Description: Get favour points of a faction toward another faction
Parameters: get_favour_points_towards_faction(FACTION_SCRIPT_INTERFACE owner_faction, FACTION_SCRIPT_INTERFACE toward_faction)
Return: float32

Function: set_faction_favour_points_toward_faction
Description: Set favour points of a faction toward another faction
Parameters: set_faction_favour_points_toward_faction(FACTION_SCRIPT_INTERFACE owner_faction, FACTION_SCRIPT_INTERFACE toward_faction, number amount)
Return: nil

WOM_COMPASS_SCRIPT_INTERFACE

Description: Winds Of Magic Compass Script Interface

is_null_interface
get_compass_cooldown
faction_can_make_selection
get_faction_cooldown
get_directions
get_selected_direction
get_direction_power_level

Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool

Function: get_compass_cooldown
Description: Returns the cooldown to be able change the direction
Parameters: get_compass_cooldown()
Return: card32

Function: faction_can_make_selection
Description: Can the faction operate the compass?
Parameters: faction_can_make_selection()
Return: bool

Function: get_faction_cooldown
Description: Returns the cooldown to be able change the direction for a faction
Parameters: get_faction_cooldown()
Return: card32

Function: get_directions
Description: Returns all the possible directions
Parameters: get_selected_direction()
Return: String table

Function: get_selected_direction
Description: Returns the selected direction key
Parameters: get_selected_direction()
Return: String

Function: get_direction_power_level
Description: Returns the power level for a given direction
Parameters: get_direction_power_level()
Return: int32

WORLD_SCRIPT_INTERFACE

Description: Contains entities that exist in the game world. Examples include the region manager and faction list

is_null_interface
faction_list
region_manager
sea_region_manager
model
province_list
province_exists
province_by_key
faction_by_key
faction_exists
ancillary_exists
climate_phase_index
whose_turn_is_it
is_factions_turn_by_key
region_data
land_region_data
sea_region_data
cooking_system
characters_owning_ancillary
faction_character_tagging_system
region_data_at_position
region_data_for_key
observation_options_for_faction
observation_options_for_allies
observation_options_for_enemies
observation_options_for_neutrals
caravans_system
lookup_route_network
winds_of_magic_compass
teleportation_network_system
faction_strength_rank

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: 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: province_list
Description: Returns a list of all provinces
Parameters: province_list()
Return: PROVINCE_LIST_SCRIPT_INTERFACE

Function: province_exists
Description: Returns if a province with the given key exists on the campaign map
Parameters: province_exists("")
Return: bool

Function: province_by_key
Description: Returns a province script interface, by key
Parameters: province_by_key("")
Return: PROVINCE_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: 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: whose_turn_is_it
Description: Returns a list of faction script interfaces for the factions whose turn it currently is
Parameters: whose_turn_is_it()
Return: FACTION_LIST_SCRIPT_INTERFACE

Function: is_factions_turn_by_key
Description: Is it the specified factions turn? The faction is specified by key.
Parameters: is_factions_turn_by_key("wh_main_emp_empire")
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: cooking_system
Description: Returns the cooking system interface
Parameters: cooking_system()
Return: COOKING_SYSTEM_SCRIPT_INTERFACE

Function: characters_owning_ancillary
Description: Returns characters list interface for characters owning ancillary
Parameters: characters_owning_ancillaries("ancillary_name")
Return: CHARACTER_LIST_SCRIPT_INTERFACE

Function: faction_character_tagging_system
Description: Returns the faction character tagging system interface
Parameters: faction_character_tagging_system()
Return: FACTION_CHARACTER_TAGGING_SYSTEM_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: region_data_for_key
Description: Returns the region data at the specified logical hex position. Null if the position is off map
Parameters: region_data_for_key(String key)
Return: REGION_DATA_SCRIPT_INTERFACE

Function: observation_options_for_faction
Description: Returns the observation options that apply to the specified faction
Parameters: observation_options_for_faction(FACTION_SCRIPT_INTERFACE faction, FACTION_SCRIPT_INTERFACE observer)
Return: CHARACTER_OBSERVATION_OPTIONS_SCRIPT_INTERFACE

Function: observation_options_for_allies
Description: Returns the observation options that apply to allied factions
Parameters: observation_options_for_allies()
Return: CHARACTER_OBSERVATION_OPTIONS_SCRIPT_INTERFACE

Function: observation_options_for_enemies
Description: Returns the observation options that apply to enemy factions
Parameters: observation_options_for_enemies()
Return: CHARACTER_OBSERVATION_OPTIONS_SCRIPT_INTERFACE

Function: observation_options_for_neutrals
Description: Returns the observation options that apply to neutral factions
Parameters: observation_options_for_neutrals()
Return: CHARACTER_OBSERVATION_OPTIONS_SCRIPT_INTERFACE

Function: caravans_system
Description: Access the caravans system
Parameters: caravans_system()
Return: CARAVANS_SYSTEM_SCRIPT_INTERFACE

Function: lookup_route_network
Description: Lookup a route network by its record key
Parameters: lookup_route_network()
Return: ROUTE_NETWORK_SCRIPT_INTERFACE

Function: winds_of_magic_compass
Description: Access the compass system
Parameters: winds_of_magic_compass()
Return: WOM_COMPASS_SCRIPT_INTERFACE

Function: teleportation_network_system
Description: Access the teleportation network system
Parameters: teleportation_network_system()
Return: TELEPORTATION_NETWORK_SYSTEM_SCRIPT_INTERFACE

Function: faction_strength_rank
Description: Get faction strength rank
Parameters: faction_strength_rank(FACTION_SCRIPT_INTERFACE faction)
Return: card32