Action Tools
Tools that modify game state
Tools that modify game state — unit commands, production, research, diplomacy. (34 tools)
appoint_governor
ActionAppoint a new governor.
Details
Args:
governor_type: e.g. GOVERNOR_THE_EDUCATOR (Pingala), GOVERNOR_THE_DEFENDER (Victor)
Requires available governor points. Use get_governors to see options.| Parameter | Type | Default | Description |
|---|---|---|---|
| governor_type* | string | — | Governor Type |
assign_governor
ActionAssign an appointed governor to a city.
Details
Args:
governor_type: The governor type (from get_governors output)
city_id: The city ID (from get_cities output)
Governor must already be appointed. Takes several turns to establish.| Parameter | Type | Default | Description |
|---|---|---|---|
| governor_type* | string | — | Governor Type |
| city_id* | integer | — | City Id |
change_government
ActionSwitch to a different government type.
Details
Args:
government_type: e.g. GOVERNMENT_CLASSICAL_REPUBLIC, GOVERNMENT_OLIGARCHY
Use get_policies to see current government. First switch after
unlocking a new tier is free (no anarchy).| Parameter | Type | Default | Description |
|---|---|---|---|
| government_type* | string | — | Government Type |
choose_dedication
ActionChoose a dedication/commemoration for the current era.
Details
Args:
dedication_index: The index of the dedication (from get_dedications output)
Use get_dedications first to see available options and their bonuses.| Parameter | Type | Default | Description |
|---|---|---|---|
| dedication_index* | integer | — | Dedication Index |
choose_pantheon
ActionFound a pantheon with the specified belief.
Details
Args:
belief_type: e.g. BELIEF_GOD_OF_THE_FORGE, BELIEF_DIVINE_SPARK
Use get_pantheon_beliefs first to see options. Requires enough faith
and no existing pantheon.| Parameter | Type | Default | Description |
|---|---|---|---|
| belief_type* | string | — | Belief Type |
city_action
ActionIssue a command to a city.
Details
Args:
city_id: City ID (from get_cities output)
action: Currently supported: 'attack' (city ranged attack)
target_x: Target X coordinate (required for attack)
target_y: Target Y coordinate (required for attack)
For attack: city must have walls and not have fired this turn.
Range is 2 tiles from city center.
For captured/disloyal city decisions (city_id is ignored, uses pending city):
- 'keep': Keep the city (works for both captured and loyalty-flipped cities)
- 'reject': Reject/free a disloyal city (loyalty flip only)
- 'raze': Raze a captured city (military conquest only)
- 'liberate_founder': Liberate to original founder
- 'liberate_previous': Liberate to previous owner| Parameter | Type | Default | Description |
|---|---|---|---|
| city_id* | integer | — | City Id |
| action* | string | — | Action |
| target_x | integer | null | Target X |
| target_y | integer | null | Target Y |
dismiss_popup
ActionDismiss any blocking popup in the game UI.
Details
Call this if you suspect a popup (e.g. historic moment, boost notification)
is blocking interaction.No parameters
form_alliance
ActionForm an alliance with another civilization.
Details
Args:
other_player_id: The player ID (from get_diplomacy output)
alliance_type: One of: MILITARY, RESEARCH, CULTURAL, ECONOMIC, RELIGIOUS
Requires declared friendship and Diplomatic Service civic.
Use get_trade_options to check alliance eligibility first.| Parameter | Type | Default | Description |
|---|---|---|---|
| other_player_id* | integer | — | Other Player Id |
| alliance_type | string | "MILITARY" | Alliance Type |
found_religion
ActionFound a religion with a chosen name, follower belief, and founder belief.
Details
Args:
religion_type: e.g. RELIGION_HINDUISM, RELIGION_BUDDHISM, RELIGION_ISLAM
follower_belief: e.g. BELIEF_WORK_ETHIC, BELIEF_CHORAL_MUSIC
founder_belief: e.g. BELIEF_STEWARDSHIP, BELIEF_CHURCH_PROPERTY
Requires your Great Prophet to have already activated on a Holy Site
(via UNITOPERATION_FOUND_RELIGION). Use get_religion_beliefs
first to see available options.| Parameter | Type | Default | Description |
|---|---|---|---|
| religion_type* | string | — | Religion Type |
| follower_belief* | string | — | Follower Belief |
| founder_belief* | string | — | Founder Belief |
get_dedications
ActionGet current era age, available dedications, and active ones.
Details
Shows era score thresholds, whether you're in a Golden/Dark/Normal age,
and lists available dedication choices with their bonuses.
Use choose_dedication to select one when required.No parameters
get_religion_beliefs
ActionGet religion founding status, available religions, and available beliefs.
Details
Shows whether you've founded a religion, available religion types to choose,
and beliefs grouped by class (Follower, Founder, Enhancer, Worship).
Use found_religion to found a religion after your Great Prophet activates.No parameters
patronize_great_person
ActionBuy a Great Person instantly with gold or faith.
Details
Args:
individual_id: The individual's ID (from get_great_people output)
yield_type: YIELD_GOLD (default) or YIELD_FAITH
Costs shown in get_great_people output under "Patronize:".
Requires enough gold/faith to cover the cost.| Parameter | Type | Default | Description |
|---|---|---|---|
| individual_id* | integer | — | Individual Id |
| yield_type | string | "YIELD_GOLD" | Yield Type |
promote_governor
ActionPromote a governor with a new ability.
Details
Args:
governor_type: The governor type (from get_governors output)
promotion_type: The promotion type (from get_governors output, shown under each governor)
Requires available governor points. Use get_governors to see available promotions.| Parameter | Type | Default | Description |
|---|---|---|---|
| governor_type* | string | — | Governor Type |
| promotion_type* | string | — | Promotion Type |
promote_unit
ActionApply a promotion to a unit.
Details
Args:
unit_id: The unit's composite ID (from get_units output)
promotion_type: e.g. PROMOTION_BATTLECRY, PROMOTION_TORTOISE
Use get_unit_promotions first to see available options.| Parameter | Type | Default | Description |
|---|---|---|---|
| unit_id* | integer | — | Unit Id |
| promotion_type* | string | — | Promotion Type |
propose_peace
ActionPropose white peace to a civilization you're at war with.
Details
Args:
other_player_id: The player ID (from get_diplomacy output)
Requires being at war and past the 10-turn war cooldown.
The AI may accept or reject based on war score and relationship.| Parameter | Type | Default | Description |
|---|---|---|---|
| other_player_id* | integer | — | Other Player Id |
propose_trade
ActionPropose a trade deal to another civilization.
Details
Args:
other_player_id: The player ID (from get_diplomacy output)
offer_gold: Lump sum gold to give them
offer_gold_per_turn: Gold per turn to give them (30-turn duration)
offer_resources: Comma-separated resource types to offer, e.g. "RESOURCE_SILK,RESOURCE_TEA"
offer_favor: Diplomatic favor to offer
offer_open_borders: True to offer our open borders
request_gold: Lump sum gold to request from them
request_gold_per_turn: Gold per turn to request (30-turn duration)
request_resources: Comma-separated resource types to request
request_favor: Diplomatic favor to request from them
request_open_borders: True to request their open borders
joint_war_target: Player ID of a third civ to declare joint war against
Examples: Gift 100 gold: offer_gold=100. Trade silk for 3 gpt: offer_resources="RESOURCE_SILK", request_gold_per_turn=3.
Mutual open borders: offer_open_borders=True, request_open_borders=True.
Trade favor for gold: offer_favor=20, request_gold=100.| Parameter | Type | Default | Description |
|---|---|---|---|
| other_player_id* | integer | — | Other Player Id |
| offer_gold | integer | 0 | Offer Gold |
| offer_gold_per_turn | integer | 0 | Offer Gold Per Turn |
| offer_resources | string | "" | Offer Resources |
| offer_favor | integer | 0 | Offer Favor |
| offer_open_borders | boolean | false | Offer Open Borders |
| request_gold | integer | 0 | Request Gold |
| request_gold_per_turn | integer | 0 | Request Gold Per Turn |
| request_resources | string | "" | Request Resources |
| request_favor | integer | 0 | Request Favor |
| request_open_borders | boolean | false | Request Open Borders |
| joint_war_target | integer | 0 | Joint War Target |
purchase_item
ActionPurchase a unit or building instantly with gold or faith.
Details
Args:
city_id: City ID (from get_cities output)
item_type: UNIT or BUILDING
item_name: e.g. UNIT_WARRIOR, BUILDING_MONUMENT
yield_type: YIELD_GOLD (default) or YIELD_FAITH
Costs gold/faith immediately. Use get_city_production to see what's available.| Parameter | Type | Default | Description |
|---|---|---|---|
| city_id* | integer | — | City Id |
| item_type* | string | — | Item Type |
| item_name* | string | — | Item Name |
| yield_type | string | "YIELD_GOLD" | Yield Type |
purchase_tile
ActionBuy a tile for a city with gold.
Details
Args:
city_id: City ID
x: Tile X coordinate
y: Tile Y coordinate
Use get_purchasable_tiles first to see costs and options.| Parameter | Type | Default | Description |
|---|---|---|---|
| city_id* | integer | — | City Id |
| x* | integer | — | X |
| y* | integer | — | Y |
queue_wc_votes
ActionPre-configure World Congress votes for the upcoming session.
Details
Args:
votes: JSON array of vote objects, e.g.
'[{"hash": -513644209, "option": 1, "target": 2, "votes": 5}]'
hash = resolution type hash (from get_world_congress)
option = 1 for A, 2 for B
target = player ID for PlayerType resolutions (from get_world_congress
target list, e.g. [target=2] Portugal), or target value for
non-player resolutions. The handler resolves to the correct
0-based index at runtime.
votes = max votes to allocate (will use as many as favor allows)
Call this BEFORE end_turn when get_world_congress shows 0 turns until next
session. Registers an event handler that fires during WC processing and
casts your votes with the specified preferences.
If you don't call this, end_turn will pause at the World Congress session
and return control to you for interactive voting.| Parameter | Type | Default | Description |
|---|---|---|---|
| votes* | string | — | Votes |
recruit_great_person
ActionRecruit a Great Person using accumulated GP points.
Details
Args:
individual_id: The individual's ID (from get_great_people output, shown after ability)
Requires enough Great Person points for that class.
The GP spawns in your capital. Use get_great_people to check [CAN RECRUIT] status.| Parameter | Type | Default | Description |
|---|---|---|---|
| individual_id* | integer | — | Individual Id |
reject_great_person
ActionPass on a Great Person (skip to the next one in that class).
Details
Args:
individual_id: The individual's ID (from get_great_people output)
Costs faith. The next Great Person in that class becomes available.
Use when you don't want the current GP and want to save points for a better one.| Parameter | Type | Default | Description |
|---|---|---|---|
| individual_id* | integer | — | Individual Id |
respond_to_diplomacy
ActionRespond to a pending diplomacy encounter.
Details
Args:
other_player_id: The player ID of the other civilization (from get_pending_diplomacy)
response: "POSITIVE" (friendly) or "NEGATIVE" (dismissive)
First meetings typically have 2-3 rounds. The tool automatically detects
and closes goodbye-phase sessions (where dialogue text stops changing).
If SESSION_CONTINUES is returned, send another response for the next round.| Parameter | Type | Default | Description |
|---|---|---|---|
| other_player_id* | integer | — | Other Player Id |
| response* | string | — | Response |
respond_to_trade
ActionAccept or reject a pending trade deal.
Details
Args:
other_player_id: The player ID of the civilization (from get_pending_trades)
accept: True to accept the deal, False to reject it
Use get_pending_trades first to see what's being offered.| Parameter | Type | Default | Description |
|---|---|---|---|
| other_player_id* | integer | — | Other Player Id |
| accept* | boolean | — | Accept |
send_diplomatic_action
ActionSend a proactive diplomatic action to another civilization.
Details
Args:
other_player_id: The player ID (from get_diplomacy output)
action: One of: DIPLOMATIC_DELEGATION, DECLARE_FRIENDSHIP, DENOUNCE,
RESIDENT_EMBASSY, OPEN_BORDERS
Delegations cost 25 gold and can be rejected if the civ dislikes you.
Embassies require Writing tech. Use get_diplomacy to see available actions.| Parameter | Type | Default | Description |
|---|---|---|---|
| other_player_id* | integer | — | Other Player Id |
| action* | string | — | Action |
send_envoy
ActionSend an envoy to a city-state.
Details
Args:
player_id: The city-state's player ID (from get_city_states)
Requires available envoy tokens. Use get_city_states to see options.| Parameter | Type | Default | Description |
|---|---|---|---|
| player_id* | integer | — | Player Id |
set_city_focus
ActionSet a city's citizen yield priority.
Details
Args:
city_id: City ID
focus: One of: food, production, gold, science, culture, faith, default
'default' clears all focus settings.
Cities automatically assign citizens to tiles. This biases the AI
toward the chosen yield type when assigning new citizens.| Parameter | Type | Default | Description |
|---|---|---|---|
| city_id* | integer | — | City Id |
| focus* | string | — | Focus |
set_city_production
ActionSet what a city should produce.
Details
Args:
city_id: City ID (from get_cities output)
item_type: UNIT, BUILDING, DISTRICT, or PROJECT
item_name: e.g. UNIT_WARRIOR, BUILDING_MONUMENT, DISTRICT_CAMPUS, PROJECT_LAUNCH_EARTH_SATELLITE
target_x: X coordinate for district placement (use get_district_advisor to find best tile)
target_y: Y coordinate for district placement
Tip: call get_cities first to see your cities and their IDs.| Parameter | Type | Default | Description |
|---|---|---|---|
| city_id* | integer | — | City Id |
| item_type* | string | — | Item Type |
| item_name* | string | — | Item Name |
| target_x | integer | null | Target X |
| target_y | integer | null | Target Y |
set_policies
ActionSet policy cards in government slots.
Details
Args:
assignments: Comma-separated slot assignments, e.g.
"0=POLICY_AGOGE,1=POLICY_URBAN_PLANNING"
Slots not listed will be cleared. Use get_policies to see
available policies and slot indices.
Wildcard slots can accept any policy type. Military slots accept
military policies, economic slots accept economic policies, etc.| Parameter | Type | Default | Description |
|---|---|---|---|
| assignments* | string | — | Assignments |
set_research
ActionChoose a technology or civic to research.
Details
Args:
tech_or_civic: The type name, e.g. TECH_POTTERY or CIVIC_CRAFTSMANSHIP
category: "tech" or "civic" (default: tech)
Tip: call get_tech_civics first to see available options.| Parameter | Type | Default | Description |
|---|---|---|---|
| tech_or_civic* | string | — | Tech Or Civic |
| category | string | "tech" | Category |
skip_remaining_units
ActionSkip all units that still have moves remaining.
Details
Useful after diplomacy encounters invalidate all standing orders.
Uses GameCore FinishMoves on each unit — fast, reliable, no async issues.No parameters
spy_action
ActionSend a spy to a city or launch a spy mission.
Details
Args:
unit_id: The spy's composite ID (from get_spies output)
action: 'travel' to move spy to a city, or a mission type to launch a mission.
Mission types: COUNTERSPY, GAIN_SOURCES, SIPHON_FUNDS, STEAL_TECH_BOOST,
SABOTAGE_PRODUCTION, GREAT_WORK_HEIST, RECRUIT_PARTISANS,
NEUTRALIZE_GOVERNOR, FABRICATE_SCANDAL
target_x: X coordinate of the target city tile
target_y: Y coordinate of the target city tile
Travel notes:
- Valid targets: your own cities and city-states only.
- Allied civ cities are NOT valid travel targets.
- Travel is queued end-of-turn; spy position updates after turn ends.
Mission notes:
- Spy must be physically IN the target city to launch any offensive mission.
- Use 'travel' first, then end the turn, then launch the mission.
- COUNTERSPY defends your own city (spy must be in your city).
- get_spies shows which ops are available at the spy's current location.| Parameter | Type | Default | Description |
|---|---|---|---|
| unit_id* | integer | — | Unit Id |
| action* | string | — | Action |
| target_x* | integer | — | Target X |
| target_y* | integer | — | Target Y |
unit_action
ActionIssue a command to a unit.
Details
Args:
unit_id: The unit's composite ID (from get_units output)
action: One of: move, attack, fortify, skip, found_city, improve, remove_feature, automate, heal, alert, sleep, delete, trade_route, activate, teleport, spread_religion
target_x: Target X coordinate (required for move/attack/trade_route/teleport)
target_y: Target Y coordinate (required for move/attack/trade_route/teleport)
improvement: Improvement type for builders (required for improve), e.g.
IMPROVEMENT_FARM, IMPROVEMENT_MINE, IMPROVEMENT_QUARRY,
IMPROVEMENT_PLANTATION, IMPROVEMENT_CAMP, IMPROVEMENT_PASTURE,
IMPROVEMENT_FISHING_BOATS, IMPROVEMENT_LUMBER_MILL
For move/attack: provide target_x and target_y.
For trade_route: provide target_x and target_y of destination city.
For teleport: provide target_x and target_y of destination city. Traders only, must be idle (not on active route).
For improve: provide improvement name. Builder must be on the tile.
For activate: activates a Great Person on their matching district.
For spread_religion: spreads religion at current tile. Missionaries/Apostles only.
For fortify/skip/found_city/automate/heal/alert/sleep/delete: no target needed.
heal = fortify until healed (auto-wake at full HP).
alert = sleep but auto-wake when enemy enters sight range.
delete = permanently disband the unit.| Parameter | Type | Default | Description |
|---|---|---|---|
| unit_id* | integer | — | Unit Id |
| action* | string | — | Action |
| target_x | integer | null | Target X |
| target_y | integer | null | Target Y |
| improvement | string | null | Improvement |
upgrade_unit
ActionUpgrade a unit to its next type (e.g. Slinger -> Archer).
Details
Args:
unit_id: The unit's composite ID (from get_units output)
Requires the right technology, enough gold, and the unit must have
moves remaining. The unit's movement is consumed by upgrading.| Parameter | Type | Default | Description |
|---|---|---|---|
| unit_id* | integer | — | Unit Id |
vote_world_congress
ActionVote on a World Congress resolution.
Details
Args:
resolution_hash: Resolution type hash (from get_world_congress)
option: 1 for option A, 2 for option B
target_index: 0-based index into the resolution's possible targets list
num_votes: Number of votes (1 is free, extras cost diplomatic favor)
After voting on all resolutions, call end_turn() to submit and advance.
Use get_world_congress first to see available resolutions and targets.| Parameter | Type | Default | Description |
|---|---|---|---|
| resolution_hash* | integer | — | Resolution Hash |
| option* | integer | — | Option |
| target_index* | integer | — | Target Index |
| num_votes | integer | 1 | Num Votes |