Total War: ATTILA KIT - Extra Scripting Guides
This lists events that the campaign code triggers, as well as the contextual objects these events supply. These contextual objects represent object within the game, and can be queried to discover their state. They also provide access to a hierarchy of other objects that can be navigated around to discover the wider game state. Following the hyperlinks around the document to see how object types within the hierarchy link together.
Event Functions
CharacterRankUpNeedsAncillary
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
CharacterEvent
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterRelativeKilled
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
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
SettlementSelected
Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event
CharacterSkillPointAllocated
Function Name: skill_point_spent_on
Interface: NONE
Description: Access the skill allocated
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: Was the event an alliance
Function Name: is_peace_treaty
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event a peace treaty
Function Name: is_military_access
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event military acceess
Function Name: is_trade_agreement
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event a trade agreement
Function Name: is_form_confederation
Interface: FACTION_SCRIPT_INTERFACE
Description: Was the event forming a confederation
MovementPointsExhausted
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
BuildingConstructionIssuedByPlayer
Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event
FactionCapturesKyoto
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
NewCampaignStarted
Function Name: model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model 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
RegionTurnEnd
Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event
CharacterPerformsOccupationDecisionSack
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterPerformsOccupationDecisionRaze
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterEmbarksNavy
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
GarrisonResidenceEvent
Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event
CharacterInfoPanelOpened
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
SlotRoundStart
Function Name: region_slot
Interface: SLOT_SCRIPT_INTERFACE
Description: Access the region slot in the event
SlotTurnStart
Function Name: region_slot
Interface: SLOT_SCRIPT_INTERFACE
Description: Access the region slot in the event
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
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
FactionSubjugatesOtherFaction
Function Name: other_faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the other faction in the event
CharacterCanLiberate
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterBrokePortBlockade
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
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
UnitCompletedBattle
Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit 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
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
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
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
CharacterCreated
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterTurnStart
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
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
CharacterTurnEnd
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
SlotSelected
Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event
TradeNodeConnected
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterGarrisonTargetEvent
Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the target garrison in the event
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
ScriptedCharacterUnhiddenFailed
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
RegionSlotEvent
Function Name: region_slot
Interface: SLOT_SCRIPT_INTERFACE
Description: Access the region slot in the event
FactionRoundStart
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction 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
CharacterPromoted
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
PendingBankruptcy
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
RegionIssuesDemands
Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region 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
CharacterMarriage
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterParticipatedAsSecondaryGeneralInBattle
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
SlotOpens
Function Name: region_slot
Interface: SLOT_SCRIPT_INTERFACE
Description: Access the region slot in the event
RegionRiots
Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event
WorldCreated
Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world in the event
FactionBecomesShogun
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
FactionLeaderSignsPeaceTreaty
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
ScriptedCharacterUnhidden
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
RegionStrikes
Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event
CharacterEntersAttritionalArea
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
CharacterBesiegesSettlement
Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region besieged
UnitTrained
Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event
RegionSelected
Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event
RegionRebels
Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event
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: 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
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
RegionTurnStart
Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region 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
FactionGovernmentTypeChanged
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
MultiTurnMove
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
LandTradeRouteRaided
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
FirstTickAfterWorldCreated
Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world in the event
TradeRouteEstablished
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
UnitTurnEnd
Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit 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
ResearchStarted
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
FactionBecomesLiberationVassal
Function Name: liberating_character
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the character involved in the liberation
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
SeaTradeRouteRaided
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterBecomesFactionLeader
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
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
ClanBecomesVassal
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction 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
CharacterPerformsOccupationDecisionResettle
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterCharacterTargetAction
Function Name: mission_result_critial_success
Interface: NONE
Description: Was the mission a critical success?
Function Name: mission_result_success
Interface: NONE
Description: Was the mission a success?
Function Name: mission_result_opportune_failure
Interface: NONE
Description: Was the mission an opportune failure?
Function Name: mission_result_failure
Interface: NONE
Description: Was the mission a failure?
Function Name: mission_result_critial_failure
Interface: NONE
Description: Was the mission a critical failure?
Function Name: ability
Interface: NONE
Description: String key for the ability used (from abilities table)
Function Name: attribute
Interface: NONE
Description: String key for the attribute used (from attributes table)
Function Name: agent_action_key
Interface: NONE
Description: String key for the agent action
Function Name: target_character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the target character in the event
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterSelected
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CampaignBuildingDamaged
Function Name: garrison_residence
Interface: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Description: Access the garrison residence in the event
FactionTurnEnd
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
ResearchCompleted
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
MissionCancelled
Function Name: mission
Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
Description: Access the mission in the event
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
Function Name: campaign_model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model in the event
MissionEvent
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
Function Name: campaign_model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model in the event
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
ClimatePhaseChange
Function Name: world
Interface: WORLD_SCRIPT_INTERFACE
Description: Access the world in the event
CharacterCandidateBecomesMinister
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterDisembarksNavy
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
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
CharacterPerformsActionAgainstFriendlyTarget
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character 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
CharacterRankUp
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
CharacterPerformsOccupationDecisionLoot
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
MissionNearingExpiry
Function Name: mission
Interface: CAMPAIGN_MISSION_SCRIPT_INTERFACE
Description: Access the mission in the event
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
Function Name: campaign_model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model in the event
FactionBeginTurnPhaseNormal
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
CampaignEffectsBundleAwarded
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction 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
CharacterComesOfAge
Function Name: character
Interface: CHARACTER_SCRIPT_INTERFACE
Description: Access the character in the event
CharacterPerformsOccupationDecisionOccupy
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
FactionEvent
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
UnitEvent
Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event
CharacterMilitaryForceTraditionPointAllocated
Function Name: military_force
Interface: MILITARY_FORCE_SCRIPT_INTERFACE
Description: Access the military force the tradition was assigned to
Function Name: tradition_point_spent_on
Interface: NONE
Description: Access the tradition allocated
FactionAboutToEndTurn
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction in the event
FirstTickAfterNewCampaignStarted
Function Name: model
Interface: MODEL_SCRIPT_INTERFACE
Description: Access the model in the event
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
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
RegionEvent
Function Name: region
Interface: REGION_SCRIPT_INTERFACE
Description: Access the region in the event
FactionTurnStart
Function Name: faction
Interface: FACTION_SCRIPT_INTERFACE
Description: Access the faction 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
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
UnitSelectedCampaign
Function Name: unit
Interface: UNIT_SCRIPT_INTERFACE
Description: Access the unit in the event
CharacterMilitaryForceTraditionPointAvailable
Function Name: military_force
Interface: MILITARY_FORCE_SCRIPT_INTERFACE
Description: Access the military force the tradition is available to
Interface Functions
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
model
faction_by_key
faction_exists
ancillary_exists
climate_phase_index
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: 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
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
is_multiplayer
is_player_turn
character_can_reach_character
difficulty_level
faction_is_local
player_steam_id_is_even
campaign_ai
campaign_type
season
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: 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: difficulty_level
Description: What is the local faction's difficulty level?
Parameters: 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: season
Description: Returns the season the model is currently in
Parameters: season()
Return: card32
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
started_war_this_turn
ended_war_this_turn
ancillary_exists
num_allies
at_war
allied_with
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
state_religion_percentage
num_generals
culture
subculture
has_food_shortage
imperium_level
is_horde
is_trading_with
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: 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: 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: state_religion_percentage
Description: Returns the percentage of the faction state religion, between (0, 100). Returns 0 if faction doesn't have a state religion.
Parameters: state_religion_percentage()
Return: float
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_shortage
Description: returns true of the faction has food shortages
Parameters: has_food_shortage()
Return: bool
Function: imperium_level
Description: returns the current imperium level
Parameters: imperium_level();
Return: card32
Function: is_horde
Description: return weather the faction is currently a horde
Parameters: is_horde()
Return: bool
Function: is_trading_with
Description: Is this faction trading with another faction?
Parameters: is_trading_with(context:character():faction())
Return: bool
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
in_settlement
in_port
is_besieging
is_blockading
is_carrying_troops
character_type
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
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
has_skill
is_hidden
routed_in_battle
body_guard_casulties
is_deployed
has_recruited_mercenaries
number_of_traits
trait_level
is_politician
loyalty
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: 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: 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: 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: 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: 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: 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: is_politician
Description: returns whether a character is a politian or not
Parameters: is_politician()
Return: bool
Function: loyalty
Description: returns the characters loyalty
Parameters: loyalty()
Return: card32
Function: gravitas
Description: returns the characters gravitas
Parameters: gravitas()
Return: card32
Function: has_father
Description: returns whether a character has a father or not
Parameters: has_father()
Return: bool
Function: has_mother
Description: returns whether a character has a mother or not
Parameters: has_mother()
Return: bool
Function: mother
Description: returns a character mother's family member script interface
Parameters: mother()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE
Function: father
Description: returns a characters father's family member script interface
Parameters: father()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE
Function: family_member
Description: returns a characters family member script interface
Parameters: family_member()
Return: FAMILY_MEMBER_SCRIPT_INTERFACE
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
FAMILY_MEMBER_SCRIPT_INTERFACE
Description: Family interface
is_null_interface
has_father
has_mother
father
mother
has_trait
come_of_age
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
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
model
owning_faction
slot_list
settlement
garrison_residence
name
public_order
num_buildings
slot_type_exists
building_exists
last_building_constructed_key
resource_exists
town_wealth_growth
adjacent_region_list
majority_religion
majority_religion_percentage
region_wealth_change_percent
building_superchain_exists
governor
has_governor
squalor
sanitation
Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool
Function: model
Description: Access to the model
Parameters: model()
Return: MODEL_SCRIPT_INTERFACE
Function: owning_faction
Description: Access to the faction that owns the region
Parameters: owning_faction()
Return: FACTION_SCRIPT_INTERFACE
Function: slot_list
Description: A list of slots contained in the region
Parameters: slot_list()
Return: SLOT_LIST_SCRIPT_INTERFACE
Function: settlement
Description: The region settlement
Parameters: settlement()
Return: SETTLEMENT_SCRIPT_INTERFACE
Function: garrison_residence
Description: The regions settlement as a garrison_residence
Parameters: garrison_residence()
Return: GARRISON_RESIDENCE_SCRIPT_INTERFACE
Function: name
Description: The region key
Parameters: name()
Return: String
Function: 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: 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: majority_religion_percentage
Description: Returns the percentage of the majority religion in this region, between (0, 100). Returns 0 if majority religion not found.
Parameters: majority_religion_percentage()
Return: float
Function: region_wealth_change_percent
Description: Returns key of the % region wealth change
Parameters: region_wealth_change_percent()
Return: float
Function: building_superchain_exists
Description: Does a building superchain with the given key exist in the region
Parameters: building_superchain_exists("key")
Return: bool
Function: governor
Description: Returns the governor character of the province (if one exists)
Parameters: governor()
Return: CHARACTER_SCRIPT_INTERFACE (or NULL_SCRIPT_INTERFACE if the province doesn't have a governor)
Function: has_governor
Description: Does the province the region is in have a governor?
Parameters: has_governor()
Return: bool
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
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
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
has_army
has_navy
model
faction
army
navy
region
unit_count
buildings
is_under_siege
can_assault
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: 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: 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
has_commander
logical_position_x
logical_position_y
display_position_x
display_position_y
model
commander
faction
region
slot_list
Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool
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: 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
SLOT_SCRIPT_INTERFACE
Description: Slot script interface
is_null_interface
has_building
model
region
building
faction
type
name
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 (key)
Parameters: name()
Return: string
SLOT_LIST_SCRIPT_INTERFACE
Description: A list of slot interfaces
num_items
item_at
is_empty
slot_type_exists
buliding_type_exists
Function: num_items
Description: Returns the number of items in the list
Parameters: num_items()
Return: positive int
Function: item_at
Description: Returns the item at the index. Make sure the index is between 0 and (max items - 1)
Parameters: positive int
Return: SLOT_LIST_SCRIPT_INTERFACE
Function: is_empty
Description: Returns a true if there are 0 items in the list
Parameters: is_empty()
Return: bool
Function: slot_type_exists
Description: Does a slot with this key exist in the list?
Parameters: input a slot key to query, slot_type_exists( "slot_key" )
Return: bool
Function: buliding_type_exists
Description: Does a building with this key exist in the list? (building_level_record key)
Parameters: input a slot key to query, buliding_type_exists( "building_level_record_key" )
Return: bool
BUILDING_SCRIPT_INTERFACE
Description: Building script interface
is_null_interface
model
faction
region
slot
name
chain
superchain
percent_health
military_force
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: military_force
Description: The military force containing the building
Parameters: military_force()
Return: MILITARY_FORCE_SCRIPT_INTERFACE
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
building_exists
is_horde
buildings
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: building_exists
Description: Does a building with a given key exist in the military force?
Parameters: input a building key, e.g. building_exists("key")
Return: bool
Function: is_horde
Description: Is this military force a horde?
Parameters: is_horde()
Return: bool
Function: buildings
Description: All non empty buildings in this military force
Parameters: buildings()
Return: MILITARY_FORCE_BUILDING_LIST_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
MILITARY_FORCE_BUILDING_SCRIPT_INTERFACE
Description: Military Force Building script interface
is_null_interface
model
faction
name
chain
superchain
percent_health
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: 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
MILITARY_FORCE_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: MILITARY_FORCE_BUILDING_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
can_upgrade_unit_equipment
can_upgrade_unit
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: 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
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
defender
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
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: 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: 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
CAMPAIGN_MISSION_SCRIPT_INTERFACE
Description: Mission script interface.
is_null_interface
model
faction
mission_record_key
mission_issuer_record_key
Function: is_null_interface
Description: Is this the null script interface
Parameters: is_null_interface()
Return: bool
Function: model
Description: Access to the campaign model interface
Parameters: model()
Return: MODEL_SCRIPT_INTERFACE
Function: faction
Description: Access to the faction interface
Parameters: faction()
Return: FACTION_SCRIPT_INTERFACE
Function: mission_record_key
Description: Returns the mission record key
Parameters: mission_record_key()
Return: String
Function: mission_issuer_record_key
Description: Returns the mission issuer record key
Parameters: mission_issuer_record_key()
Return: String
CAMPAIGN_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: