Events

IncidentFailedEvent
RegionStrikes
PositiveDiplomaticEvent
CharacterGarrisonTargetEvent
RegionTurnEnd
AreaExitedEvent
DebugFactionEvent
PooledResourceEvent
ScriptedCharacterUnhidden
UnitCreated
DilemmaIssued
CharacterBuildingCompleted
CharacterGarrisonTargetAction
GarrisonResidenceExposedToFaction
ResearchCompleted
FactionLiberated
ImprisonmenRejectiontEvent
RegionPlagueStateChanged
CharacterCanLiberate
UITriggerScriptEvent
RegionSelected
ClanBecomesVassal
CharacterEmbarksNavy
CharacterCapturedSettlementUnopposed
GarrisonResidenceEvent
CampaignCoastalAssaultOnCharacter
CharacterSkillPointAllocated
CharacterLeavesGarrison
PendingBattle
CharacterRelativeKilled
FactionLeaderIssuesEdict
ImprisonmentEvent
CharacterPerformsActionAgainstFriendlyTarget
CharacterEvent
GovernorshipTaxRateChanged
CharacterLootedSettlement
UnitTrained
CharacterAncillaryGained
ForeignSlotManagerRemovedEvent
FactionTurnEnd
CharacterDisembarksNavy
CharacterTargetEvent
CharacterSackedSettlement
AreaEntered
CharacterTurnEnd
GarrisonAttackedEvent
PrisonActionTakenEvent
AreaEnteredEvent
FirstTickAfterNewCampaignStarted
PendingBankruptcy
FactionLeaderSignsPeaceTreaty
ResearchStarted
DilemmaChoiceMadeEvent
CharacterRankUpNeedsAncillary
CharacterPerformsSettlementOccupationDecision
SlotTurnStart
NewCampaignStarted
FactionCivilWarOccured
MissionStatusEvent
CharacterAttacksAlly
IncidentOccuredEvent
MilitaryForceDevelopmentPointChange
CharacterMilitaryForceTraditionPointAllocated
IncidentEvent
MovementPointsExhausted
FactionRoundStart
DebugRegionEvent
MissionCancelled
MissionEvent
CharacterPromoted
CharacterCandidateBecomesMinister
RegionAbandonedWithBuildingEvent
UniqueAgentSpawned
LandTradeRouteRaided
FactionGovernmentTypeChanged
CharacterTurnStart
ScriptedCharacterUnhiddenFailed
DilemmaEvent
ForceAdoptsStance
GovernorAssignedCharacterEvent
UniqueAgentEvent
BuildingCompleted
WorldCreated
FactionBecomesLiberationVassal
RitualCancelledEvent
UnitCompletedBattle
FactionCookedDish
MissionFailed
NewCharacterEnteredRecruitmentPool
SlotSelected
ForcePlagueStateChanged
MissionIssued
CharacterEntersAttritionalArea
CharacterSelected
MissionGenerationFailed
FactionEvent
CharacterCompletedBattle
ForeignSlotBuildingCompleteEvent
MultiTurnMove
HaveCharacterWithinRangeOfPositionMissionEvaluationResultEvent
RegionFactionChangeEvent
PooledResourceEffectChangedEvent
SlotRoundStart
FactionBeginTurnPhaseNormal
MilitaryForceBuildingCompleteEvent
CharacterCharacterTargetAction
CharacterBlockadedPort
DebugCharacterEvent
CharacterBecomesFactionLeader
MilitaryForceCreated
CharacterRazedSettlement
CharacterComesOfAge
RegionIssuesDemands
RegionSlotEvent
CharacterRankUp
FactionLeaderDeclaresWar
FactionEncountersOtherFaction
BuildingConstructionIssuedByPlayer
RegionEvent
ForeignSlotBuildingDamagedEvent
MissionSucceeded
RecruitmentItemIssuedByPlayer
CampaignCoastalAssaultOnGarrison
CharacterFamilyRelationDied
SettlementSelected
CampaignEffectsBundleAwarded
ForeignSlotManagerDiscoveredEvent
UnitTurnEnd
FactionSubjugatesOtherFaction
NegativeDiplomaticEvent
CharacterParticipatedAsSecondaryGeneralInBattle
FactionAboutToEndTurn
RitualStartedEvent
MissionNearingExpiry
TriggerPostBattleAncillaries
DiplomaticOfferRejected
CharacterBesiegesSettlement
CharacterEntersGarrison
SeaTradeRouteRaided
CampaignArmiesMerge
TradeRouteEstablished
FactionTurnStart
SlotOpens
FirstTickAfterWorldCreated
FactionJoinsConfederation
TradeNodeConnected
CharacterMilitaryForceTraditionPointAvailable
CharacterMarriage
UnitEffectPurchased
CharacterFinishedMovingEvent
NominalDifficultyLevelChangedEvent
CampaignBuildingDamaged
CharacterBrokePortBlockade
UnitDisbanded
UniqueAgentDespawned
RitualEvent
ClimatePhaseChange
GarrisonOccupiedEvent
UnitSelectedCampaign
UnitEvent
UnitConverted
RitualCompletedEvent
CharacterCreated
UnitMergedAndDestroyed
RegionRebels
CharacterInfoPanelOpened
RegionTurnStart
DilemmaGenerationFailedEvent
RitualsCompletedAndDelayedEvent
RegionRiots
CharacterConvalescedOrKilled
AreaExited

Interfaces

FACTION_COOKING_INFO_SCRIPT_INTERFACE
COOKING_SYSTEM_SCRIPT_INTERFACE
COOKING_DISH_SCRIPT_INTERFACE
EFFECT_SCRIPT_INTERFACE
EFFECT_LIST_SCRIPT_INTERFACE
EFFECT_BUNDLE_SCRIPT_INTERFACE
EFFECT_BUNDLE_LIST_SCRIPT_INTERFACE
CUSTOM_EFFECT_BUNDLE_SCRIPT_INTERFACE
MILITARY_FORCE_TYPE_SCRIPT_INTERFACE
PRISON_SYSTEM_SCRIPT_INTERFACE
CHARACTER_IMPRISONMENT_REJECTION_REASON_MASK_SCRIPTING_INTERFACE
RITUAL_PERFORMING_CHARACTER_STATUS_SCRIPT_INTERFACE
RITUAL_PERFORMING_CHARACTER_SCRIPT_INTERFACE
RITUAL_PERFORMING_CHARACTER_LIST_SCRIPT_INTERFACE
MODIFY_RITUAL_PERFORMING_CHARACTER_SCRIPT_INTERFACE
MODIFY_RITUAL_PERFORMING_CHARACTER_LIST_SCRIPT_INTERFACE
ACTIVE_RITUAL_SCRIPT_INTERFACE
ACTIVE_RITUAL_LIST_SCRIPT_INTERFACE
FACTION_RITUALS_SCRIPT_INTERFACE
RITUAL_STATUS_SCRIPT_INTERFACE
RITUAL_SETUP_SCRIPT_INTERFACE
MODIFY_RITUAL_SETUP_SCRIPT_INTERFACE
RITUAL_TARGET_FACTION_STATUS_SCRIPT_INTERFACE
RITUAL_TARGET_REGION_STATUS_SCRIPT_INTERFACE
RITUAL_TARGET_MILITARY_FORCE_STATUS_SCRIPT_INTERFACE
RITUAL_TARGET_SCRIPT_INTERFACE
MODIFY_RITUAL_TARGET_SCRIPT_INTERFACE
NULL_SCRIPT_INTERFACE
WORLD_SCRIPT_INTERFACE
MODEL_SCRIPT_INTERFACE
FACTION_SCRIPT_INTERFACE
FACTION_LIST_SCRIPT_INTERFACE
CHARACTER_SCRIPT_INTERFACE
CHARACTER_LIST_SCRIPT_INTERFACE
CHARACTER_DETAILS_SCRIPT_INTERFACE
CHARACTER_DETAILS_LIST_SCRIPT_INTERFACE
FAMILY_MEMBER_SCRIPT_INTERFACE
FAMILY_MEMBER_LIST_SCRIPT_INTERFACE
REGION_MANAGER_SCRIPT_INTERFACE
REGION_SCRIPT_INTERFACE
REGION_LIST_SCRIPT_INTERFACE
SEA_REGION_MANAGER_SCRIPT_INTERFACE
SEA_REGION_SCRIPT_INTERFACE
SEA_REGION_LIST_SCRIPT_INTERFACE
REGION_DATA_SCRIPT_INTERFACE
REGION_DATA_LIST_SCRIPT_INTERFACE
GARRISON_RESIDENCE_SCRIPT_INTERFACE
SETTLEMENT_SCRIPT_INTERFACE
SLOT_SCRIPT_INTERFACE
SLOT_LIST_SCRIPT_INTERFACE
BUILDING_SCRIPT_INTERFACE
BUILDING_LIST_SCRIPT_INTERFACE
MILITARY_FORCE_SCRIPT_INTERFACE
MILITARY_FORCE_LIST_SCRIPT_INTERFACE
UNIT_SCRIPT_INTERFACE
UNIT_LIST_SCRIPT_INTERFACE
PENDING_BATTLE_SCRIPT_INTERFACE
CAMPAIGN_MISSION_SCRIPT_INTERFACE
UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
UNIQUE_AGENT_DETAILS_LIST_SCRIPT_INTERFACE
CAMPAIGN_AI_SCRIPT_INTERFACE
POOLED_RESOURCE_FACTOR_SCRIPT_INTERFACE
POOLED_RESOURCE_FACTOR_LIST_SCRIPT_INTERFACE
POOLED_RESOURCE_SCRIPT_INTERFACE
POOLED_RESOURCE_LIST_SCRIPT_INTERFACE
RESOURCE_TRANSACTION_SCRIPT_INTERFACE
FOREIGN_SLOT_SCRIPT_INTERFACE
FOREIGN_SLOT_LIST_SCRIPT_INTERFACE
FOREIGN_SLOT_MANAGER_SCRIPT_INTERFACE
FOREIGN_SLOT_MANAGER_LIST_SCRIPT_INTERFACE
UNIT_PURCHASABLE_EFFECT_SCRIPT_INTERFACE
UNIT_PURCHASABLE_EFFECT_LIST_SCRIPT_INTERFACE

Event Functions

IncidentFailedEvent

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

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

RegionStrikes

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

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?

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

RegionTurnEnd

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

AreaExitedEvent

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

DebugFactionEvent

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

PooledResourceEvent

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

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

ScriptedCharacterUnhidden

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

UnitCreated

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit 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

CharacterBuildingCompleted

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

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

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

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

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

FactionLiberated

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

ImprisonmenRejectiontEvent

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

RegionPlagueStateChanged

Function Name: is_infected
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region's infection state

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

CharacterCanLiberate

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

UITriggerScriptEvent

Function Name: faction_cqi
Interface: NONE
Description: Access the faction that owns the resource

Function Name: trigger
Interface: NONE
Description: Access the faction that owns the resource

RegionSelected

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

ClanBecomesVassal

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

CharacterEmbarksNavy

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

GarrisonResidenceEvent

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

CharacterSkillPointAllocated

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

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

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

CharacterRelativeKilled

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

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

CharacterPerformsActionAgainstFriendlyTarget

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

GovernorshipTaxRateChanged

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

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

UnitTrained

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

CharacterAncillaryGained

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

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

FactionTurnEnd

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

CharacterDisembarksNavy

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

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

AreaEntered

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

CharacterTurnEnd

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

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

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

AreaEnteredEvent

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

FirstTickAfterNewCampaignStarted

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

FactionLeaderSignsPeaceTreaty

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

ResearchStarted

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

DilemmaChoiceMadeEvent

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

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

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

Function Name: dilemma
Interface: NONE
Description: Access the key of the dilemma in the event

CharacterRankUpNeedsAncillary

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

SlotTurnStart

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

NewCampaignStarted

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

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

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

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

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

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

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

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

MovementPointsExhausted

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

FactionRoundStart

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

DebugRegionEvent

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

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

CharacterPromoted

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

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

UniqueAgentSpawned

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

LandTradeRouteRaided

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

FactionGovernmentTypeChanged

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

CharacterTurnStart

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

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

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

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

UniqueAgentEvent

Function Name: unique_agent_details
Interface: UNIQUE_AGENT_DETAILS_SCRIPT_INTERFACE
Description: Access the unique agent details for this 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

WorldCreated

Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world 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

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

UnitCompletedBattle

Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit 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

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

NewCharacterEnteredRecruitmentPool

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

SlotSelected

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

ForcePlagueStateChanged

Function Name: military_force
Interface: MILITARY_FORCE_SCRIPT_INTERFACE
Description: Access the military force infected with a plague

Function Name: is_infected
Interface: NONE
Description: Access the military force's infection state

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

CharacterEntersAttritionalArea

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

MissionGenerationFailed

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

FactionEvent

Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction 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

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

MultiTurnMove

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

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

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

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: resource
Interface: POOLED_RESOURCE_SCRIPT_INTERFACE
Description: Access the resource interface

SlotRoundStart

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

FactionBeginTurnPhaseNormal

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

MilitaryForceBuildingCompleteEvent

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

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

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

DebugCharacterEvent

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

CharacterBecomesFactionLeader

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

MilitaryForceCreated

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

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

CharacterComesOfAge

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

RegionIssuesDemands

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

CharacterRankUp

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

FactionLeaderDeclaresWar

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

FactionEncountersOtherFaction

Function Name: other_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the other faction 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

RegionEvent

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

ForeignSlotBuildingDamagedEvent

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

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

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

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

CharacterFamilyRelationDied

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

SettlementSelected

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

CampaignEffectsBundleAwarded

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

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

UnitTurnEnd

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

FactionSubjugatesOtherFaction

Function Name: other_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the other faction 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?

CharacterParticipatedAsSecondaryGeneralInBattle

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

FactionAboutToEndTurn

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

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

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

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

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

CharacterBesiegesSettlement

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

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

SeaTradeRouteRaided

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

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

TradeRouteEstablished

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

SlotOpens

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

FirstTickAfterWorldCreated

Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world 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

TradeNodeConnected

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

CharacterMilitaryForceTraditionPointAvailable

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

CharacterMarriage

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character 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

CharacterFinishedMovingEvent

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

NominalDifficultyLevelChangedEvent

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

CampaignBuildingDamaged

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

CharacterBrokePortBlockade

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

UnitDisbanded

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

UniqueAgentDespawned

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

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

ClimatePhaseChange

Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world 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

UnitSelectedCampaign

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

UnitEvent

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

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

CharacterCreated

Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character 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

RegionRebels

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

CharacterInfoPanelOpened

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

RegionTurnStart

Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region 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

RitualsCompletedAndDelayedEvent

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

RegionRiots

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

CharacterConvalescedOrKilled

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

AreaExited

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

Interface Functions

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

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

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

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

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

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
remove_effect

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

Function: key
Description: Key of the effect bundle record
Parameters: key()
Return: String

Function: effects
Description: Effects currently provided by this effect bundle
Parameters: effects()
Return: EFFECT_LIST_SCRIPT_INTERFACE

Function: duration
Description: Number of rounds this effect bundle will persist for. Zero means infinite duration
Parameters: duration()
Return: card32

Function: set_duration
Description: Set the number of rounds this effect bundle will persist for
Parameters: set_duration(card32 num_rounds)
Return: void

Function: add_effect
Description: Add a new effect to the effect bundle
Parameters: add_effect(String effect_key, String scope_key, float32 value)
Return: bool

Function: set_effect_value
Description: Change the value of the specified effect
Parameters: set_effect_value(EFFECT_SCRIPT_INTERFACE effect, float32 new_value)
Return: bool

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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
faction_by_key
faction_exists
ancillary_exists
climate_phase_index
whose_turn_is_it
region_data
land_region_data
sea_region_data
cooking_system

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: 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 faction script interface for the faction whose turn it currently is
Parameters: whose_turn_is_it()
Return: FACTION_SCRIPT_INTERFACE

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

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
random_percent
random_int
is_multiplayer
is_player_turn
character_can_reach_character
character_can_reach_settlement
difficulty_level
combined_difficulty_level
faction_is_local
player_steam_id_is_even
campaign_ai
campaign_type
prison_system
character_for_command_queue_index
military_force_for_command_queue_index
faction_for_command_queue_index
has_character_command_queue_index
has_military_force_command_queue_index
has_faction_command_queue_index

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: 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: Two characters e.g. character_can_reach_character(context:character(), context:target_character())
Return: bool

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

Function: difficulty_level
Description: What is the local faction's difficulty level?
Parameters: difficulty_level()
Return: int

Function: combined_difficulty_level
Description: What is the combined difficulty level of all player factions?
Parameters: combined_difficulty_level()
Return: int

Function: faction_is_local
Description: Is the provided faction the local faction?
Parameters: faction_is_local("rom_rome")
Return: bool

Function: player_steam_id_is_even
Description: Does the player have an even steam id
Parameters: player_steam_id_is_even()
Return: bool

Function: campaign_ai
Description: Access campaign AI script interface
Parameters: campaign_ai()
Return: CAMPAIGN_AI_SCRIPT_INTERFACE

Function: campaign_type
Description: Returns the type of the campaign
Parameters: campaign_type()
Return: card32

Function: prison_system
Description: Returns the prison system
Parameters: prison_system()
Return: PRISON_SYSTEM_SCRIPT_INTERFACE

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

FACTION_SCRIPT_INTERFACE

Description: Faction interface

is_null_interface
command_queue_index
region_list
character_list
military_force_list
model
is_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
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
trade_ship_not_in_trade_node
treasury
treasury_percent
losing_money
tax_level
upkeep_expenditure_percent
research_queue_idle
has_technology
state_religion
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
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_resources
pooled_resource
has_pooled_resource
has_ritual_chain
has_access_to_ritual_category
get_climate_suitability
foreign_slot_managers
is_allowed_to_capture_territory
effect_bundles
is_rebel
is_faction
unit_cap
unit_cap_remaining

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_human
Description: Is this a human faction?
Parameters: is_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: 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: trade_ship_not_in_trade_node
Description: Does the faction have a trade ship that is not in a trade node
Parameters: trade_ship_not_in_trade_node()
Return: bool

Function: treasury
Description: Returns the factions treasury value
Parameters: treasury()
Return: int

Function: treasury_percent
Description: Returns the characters factions treasury value as a percentage of the sum of all factions treasury values
Parameters: treasury_percent()
Return: int

Function: losing_money
Description: Returns whether or not the factions regular expenditure exceeds their regular income
Parameters: losing_money()
Return: bool

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

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

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

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

Function: state_religion
Description: Returns the state religion of the faction
Parameters: state_religion()
Return: string

Function: num_generals
Description: How many generals does this faction have?
Parameters: num_generals()
Return: int

Function: culture
Description: Returns the culture for the faction
Parameters: culture()
Return: string

Function: subculture
Description: Returns the subculture for the faction
Parameters: subculture()
Return: string

Function: has_food_shortages
Description: returns true of the faction has food shortages
Parameters: has_food_shortage()
Return: bool

Function: imperium_level
Description: returns the current imperium level
Parameters: imperium_level();
Return: card32

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

Function: has_faction_slaves
Description: Does this faction support Faction Slaves
Parameters: has_faction_slaves()
Return: bool

Function: num_faction_slaves
Description: Number of slaves in the faction
Parameters: num_faction_slaves()
Return: int

Function: max_faction_slaves
Description: Maximum number of slaves for the faction
Parameters: max_faction_slaves()
Return: int

Function: percentage_faction_slaves
Description: Percentage faction slaves of the maximum
Parameters: percentage_faction_slaves()
Return: float

Function: pooled_resources
Description: All pooled resources owned by this faction
Parameters: pooled_resources()
Return: POOLED_RESOURCE_LIST_SCRIPT_INTERFACE

Function: pooled_resource
Description: Get pooled resource by key. Null if the faction doesn't own the resource
Parameters: pooled_resource(String resource_key)
Return: POOLED_RESOURCE_LIST_SCRIPT_INTERFACE

Function: has_pooled_resource
Description: True if faction has the specified pooled resource
Parameters: has_pooled_resource(String resource_key)
Return: POOLED_RESOURCE_LIST_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: 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

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

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
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
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
gravitas
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
has_effect_bundle

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: 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: 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: gravitas
Description: returns the characters gravitas
Parameters: gravitas()
Return: card32

Function: has_father
Description: returns whether a character has a father or not
Parameters: has_father()
Return: bool

Function: has_mother
Description: returns whether a character has a mother or not
Parameters: has_mother()
Return: bool

Function: mother
Description: returns a character mother's family member script interface
Parameters: mother()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: father
Description: returns a characters father's family member script interface
Parameters: father()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: family_member
Description: returns a characters family member script interface
Parameters: family_member()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: 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: has_effect_bundle
Description: Test if this character has the specified effect bundle
Parameters: has_effect_bundle()
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_DETAILS_SCRIPT_INTERFACE

Description: Character details interface

is_null_interface
model
faction
forename
surname
get_forename
get_surname
character_type
has_trait
trait_points
has_ancillary
is_male
age
has_skill
number_of_traits
trait_level
loyalty
personal_loyalty_factor
gravitas
has_father
has_mother
mother
father
family_member

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("ninja")
Return: bool

Function: has_trait
Description: Returns if the character has the specified trait
Parameters: Trait key, e.g. has_trait("drunkard")
Return: int

Function: trait_points
Description: Returns the number of trait points for the specified trait (0 if not present)
Parameters: Trait key, e.g. trait_points("drunkard")
Return: int

Function: has_ancillary
Description: Returns if the character has the specified ancillary
Parameters: Key ancillaries table, e.g. has_ancillary("duck")
Return: bool

Function: is_male
Description: Is the character male?
Parameters: is_male()
Return: bool

Function: age
Description: The character's age
Parameters: age()
Return: int

Function: has_skill
Description: Has the skill passed
Parameters: has_skill()
Return: bool

Function: number_of_traits
Description: The number of traits the chracter has
Parameters: number_of_traits()
Return: card32

Function: trait_level
Description: returns the level of the specified trait
Parameters: trait_level("trait")
Return: int32

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

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

Function: gravitas
Description: returns the characters gravitas
Parameters: gravitas()
Return: card32

Function: has_father
Description: returns whether a character has a father or not
Parameters: has_father()
Return: bool

Function: has_mother
Description: returns whether a character has a mother or not
Parameters: has_mother()
Return: bool

Function: mother
Description: returns a character mother's family member script interface
Parameters: mother()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: father
Description: returns a characters father's family member script interface
Parameters: father()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

Function: family_member
Description: returns a characters family member script interface
Parameters: family_member()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE

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

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
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: character
Description: return character assosciated with this family member. May be null if the character is dead
Parameters: character()
Return: CHARACTER_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

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
town_wealth_growth
adjacent_region_list
majority_religion
region_wealth_change_percent
squalor
sanitation
is_abandoned
religion_proportion
can_recruit_agent_at_settlement
faction_province_growth
faction_province_growth_per_turn
is_province_capital
has_development_points_to_upgrade
has_faction_province_slaves
num_faction_province_slaves
max_faction_province_slaves
percentage_faction_province_slaves
has_active_storm
region_data_interface
get_selected_edict_key
get_active_edict_key
foreign_slot_managers
foreign_slot_manager_for_faction
effect_bundles
faction_province_effect_bundles
has_effect_bundle
faction_province_has_effect_bundle

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: town_wealth_growth
Description: Returns the town wealth growth in the region
Parameters: town_wealth_growth()
Return: int

Function: adjacent_region_list
Description: Returns the list of regions adjacent to this one (including where the connection is not traversable)
Parameters: adjacent_region_list()
Return: REGION_LIST_SCRIPT_INTERFACE

Function: majority_religion
Description: Returns key of the majority religion in the region
Parameters: majority_religion()
Return: String

Function: region_wealth_change_percent
Description: Returns key of the % region wealth change
Parameters: region_wealth_change_percent()
Return: float

Function: squalor
Description: Returns the current squalor in the region
Parameters: squalor()
Return: card32

Function: sanitation
Description: Returns the current sanitation in the region
Parameters: sanitation()
Return: card32

Function: is_abandoned
Description: Returns true if the region is abandoned
Parameters: is_abandoned()
Return: bool

Function: religion_proportion
Description: Returns the proportion domination of the specified religion
Parameters: religion_proportion()
Return: float32

Function: can_recruit_agent_at_settlement
Description: Returns true if you can recruite the specified agent type at the regions settlement
Parameters: can_recruit_agent_at_settlement()
Return: bool

Function: faction_province_growth
Description: Returns the total amount of growth points accumulated in a province towards the next population point
Parameters: faction_province_growth()
Return: card32

Function: faction_province_growth_per_turn
Description: Returns the amount of growth points added in a province towards the next population point this turn
Parameters: faction_province_growth_per_turn()
Return: card32

Function: is_province_capital
Description: Is this region the province capital?
Parameters: is_province_capital()
Return: bool

Function: has_development_points_to_upgrade
Description: Does this region have enough development points to upgrade?
Parameters: has_development_points_to_upgrade()
Return: bool

Function: has_faction_province_slaves
Description: Does this region's owner support Faction Slaves
Parameters: has_faction_province_slaves()
Return: bool

Function: num_faction_province_slaves
Description: Number of slaves in the faction province
Parameters: num_faction_province_slaves()
Return: int

Function: max_faction_province_slaves
Description: Maximum number of slaves for the faction province
Parameters: max_faction_province_slaves()
Return: int

Function: percentage_faction_province_slaves
Description: Percentage faction province slaves of the maximum
Parameters: percentage_faction_province_slaves()
Return: float

Function: has_active_storm
Description: Returns true if region has an active storm
Parameters: has_active_storm()
Return: bool

Function: region_data_interface
Description: Gets the REGION_DATA interface of the region
Parameters: region_data_interface()
Return: REGION_DATA_SCRIPT_INTERFACE

Function: get_selected_edict_key
Description: Gets the key of the currently selected edict of the region, returns "" if there is no edict active
Parameters: get_selected_edict_key()
Return: REGION_DATA_SCRIPT_INTERFACE

Function: get_active_edict_key
Description: Gets the key of the currently active edict of the region, returns "" if there is no edict active
Parameters: get_active_edict_key()
Return: REGION_DATA_SCRIPT_INTERFACE

Function: foreign_slot_managers
Description: Returns the complete list of foreign slot managers currently active in this region
Parameters: foreign_slot_managers()
Return: FOREIGN_SLOT_MANAGER_LIST_SCRIPT_INTERFACE

Function: foreign_slot_manager_for_faction
Description: Returns the foreign slot manager that belongs to the specified faction. Will be null if they do not have a foreign slot manager in this region
Parameters: foreign_slot_manager_for_faction(faction_key)
Return: FOREIGN_SLOT_MANAGER_SCRIPT_INTERFACE

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

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

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

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

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

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

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

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_LIST_SCRIPT_INTERFACE

Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
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
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: 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)

SETTLEMENT_SCRIPT_INTERFACE

Description: Settlement script interface

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

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

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

BUILDING_SCRIPT_INTERFACE

Description: Building script interface

is_null_interface
model
faction
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: 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

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_LIST_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
can_recruit_agent_at_force
can_recruit_unit
can_recruit_unit_class
can_recruit_unit_category
strength
has_effect_bundle
effect_bundles
force_type

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

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_LIST_SCRIPT_INTERFACE

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

UNIT_SCRIPT_INTERFACE

Description: Unit script interface. Land units and Naval units are derived from Unit.

is_null_interface
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
can_upgrade_unit_equipment
can_upgrade_unit
get_unit_custom_battle_cost
can_purchase_effect
get_unit_purchasable_effects

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

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

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

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_battle_result
defender_battle_result
naval_battle
seige_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
is_auto_resolved

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_battle_result
Description: The battle result for the attacker
Parameters: attacker_battle_result()
Return: String (close_victory, decisive_victory, heroic_victory, pyrrhic_victory, close_defeat, decisive_defeat, crushing_defeat, valiant_defeat

Function: defender_battle_result
Description: The battle result for the defender
Parameters: defender_battle_result()
Return: String (close_victory, decisive_victory, heroic_victory, pyrrhic_victory, close_defeat, decisive_defeat, crushing_defeat, valiant_defeat

Function: naval_battle
Description: The battle is a naval battle
Parameters: naval_battle()
Return: bool

Function: seige_battle
Description: The battle is a seige battle
Parameters: seige_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: is_auto_resolved
Description: True if the pending battle was autoresolved
Parameters: is_auto_resolved()
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

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

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

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

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:

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

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

POOLED_RESOURCE_SCRIPT_INTERFACE

Description: Pooled Resource Script Interface

is_null_interface
key
value
percentage_of_capacity
minimum_value
maximum_value
active_effect
number_of_effect_types
factors
factor_by_key

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

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

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

RESOURCE_TRANSACTION_SCRIPT_INTERFACE

Description: Resource Transaction Script Interface

is_null_interface
total_treasury_change
total_resource_change

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

Function: total_treasury_change
Description: Total net treasury change applied by this resource transaction
Parameters: total_treasury_change()
Return: RESOURCE_TRANSACTION_SCRIPT_INTERFACE

Function: total_resource_change
Description: Total net change applied to the specified resource by this resource transaction
Parameters: total_resource_change(String resource_key)
Return: RESOURCE_TRANSACTION_SCRIPT_INTERFACE

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

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

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

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