2#include "dcon_generated.hpp"
3#include "common_types.hpp"
131 dcon::province_id
id;
221 dcon::national_identity_id
tag;
225 dcon::political_party_id
p;
229 dcon::reform_option_id
r;
233 dcon::issue_option_id
r;
263 dcon::commodity_id
c;
293 dcon::national_event_id
e;
302 dcon::free_national_event_id
e;
310 dcon::provincial_event_id
e;
319 dcon::free_provincial_event_id
e;
398 dcon::naval_battle_id
b;
402 dcon::land_battle_id
b;
556void start_land_unit_construction(
sys::state& state, dcon::nation_id source, dcon::province_id location, dcon::culture_id soldier_culture, dcon::unit_type_id type, dcon::province_id template_province = dcon::province_id{});
557bool can_start_land_unit_construction(
sys::state& state, dcon::nation_id source, dcon::province_id location, dcon::culture_id soldier_culture, dcon::unit_type_id type, dcon::province_id template_province = dcon::province_id{});
587 return budget_settings_data{ int8_t(-127), int8_t(-127), int8_t(-127), int8_t(-127), int8_t(-127), int8_t(-127), int8_t(-127),
588 int8_t(-127), int8_t(-127), int8_t(-127), int8_t(-127), int8_t(-127), int8_t(-127) };
608void expel_advisors(
sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
611void ban_embassy(
sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
612bool can_ban_embassy(
sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
618void decrease_opinion(
sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
678void fabricate_cb(
sys::state& state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id type);
699bool can_call_to_arms(
sys::state& state, dcon::nation_id asker, dcon::nation_id target, dcon::war_id w,
bool ignore_cost =
false);
713void declare_war(
sys::state& state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation,
bool call_attacker_allies);
714bool can_declare_war(
sys::state& state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation);
715void execute_declare_war(
sys::state& state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation,
bool call_attacker_allies);
717void add_war_goal(
sys::state& state, dcon::nation_id source, dcon::war_id w, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation);
718bool can_add_war_goal(
sys::state& state, dcon::nation_id source, dcon::war_id w, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation);
725void move_army(
sys::state& state, dcon::nation_id source, dcon::army_id a, dcon::province_id dest,
bool reset);
726std::vector<dcon::province_id>
can_move_army(
sys::state& state, dcon::nation_id source, dcon::army_id a, dcon::province_id dest);
728void move_navy(
sys::state& state, dcon::nation_id source, dcon::navy_id n, dcon::province_id dest,
bool reset);
729std::vector<dcon::province_id>
can_move_navy(
sys::state& state, dcon::nation_id source, dcon::navy_id n, dcon::province_id dest);
773 std::array<dcon::regiment_id, num_packed_units>
const& list);
788void invite_to_crisis(
sys::state& state, dcon::nation_id source, dcon::nation_id invitation_to, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation);
789bool can_invite_to_crisis(
sys::state& state, dcon::nation_id source, dcon::nation_id invitation_to, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation);
833void add_to_crisis_peace_offer(
sys::state& state, dcon::nation_id source, dcon::nation_id wargoal_from, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation);
834bool can_add_to_crisis_peace_offer(
sys::state& state, dcon::nation_id source, dcon::nation_id wargoal_from, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation);
846void chat_message(
sys::state& state, dcon::nation_id source, std::string_view body, dcon::nation_id target);
852void state_transfer(
sys::state& state, dcon::nation_id asker, dcon::nation_id target, dcon::state_definition_id sid);
bool can_state_transfer(sys::state &state, dcon::nation_id asker, dcon::nation_id target, dcon::state_definition_id sid)
bool can_increase_opinion(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target)
void execute_send_peace_offer(sys::state &state, dcon::nation_id source)
bool can_cancel_military_access(sys::state &state, dcon::nation_id source, dcon::nation_id target, bool ignore_cost)
void mark_ships_to_split(sys::state &state, dcon::nation_id source, std::array< dcon::ship_id, num_packed_units > const &list)
constexpr size_t num_packed_units
budget_settings_data make_empty_budget_settings()
bool can_start_research(sys::state &state, dcon::nation_id source, dcon::technology_id tech)
bool can_release_subject(sys::state &state, dcon::nation_id source, dcon::nation_id target)
bool can_send_crisis_peace_offer(sys::state &state, dcon::nation_id source)
bool can_expel_advisors(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
void start_land_unit_construction(sys::state &state, dcon::nation_id source, dcon::province_id location, dcon::culture_id soldier_culture, dcon::unit_type_id type, dcon::province_id template_province)
void enact_issue(sys::state &state, dcon::nation_id source, dcon::issue_option_id i)
bool can_add_to_sphere(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target)
bool can_invite_to_crisis(sys::state &state, dcon::nation_id source, dcon::nation_id invitation_to, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation)
bool can_give_war_subsidies(sys::state &state, dcon::nation_id source, dcon::nation_id target)
bool can_add_war_goal(sys::state &state, dcon::nation_id source, dcon::war_id w, dcon::nation_id target, dcon::cb_type_id cb_type, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation)
bool can_change_admiral(sys::state &state, dcon::nation_id source, dcon::navy_id a, dcon::leader_id l)
bool is_console_command(command_type t)
void execute_start_crisis_peace_offer(sys::state &state, dcon::nation_id source, bool is_concession)
bool can_give_military_access(sys::state &state, dcon::nation_id asker, dcon::nation_id target, bool ignore_cost)
void execute_call_to_arms(sys::state &state, dcon::nation_id asker, dcon::nation_id target, dcon::war_id w)
void toggle_rebel_hunting(sys::state &state, dcon::nation_id source, dcon::army_id a)
bool can_cancel_war_subsidies(sys::state &state, dcon::nation_id source, dcon::nation_id target)
bool can_cancel_factory_building_construction(sys::state &state, dcon::nation_id source, dcon::state_instance_id location, dcon::factory_type_id type)
bool can_notify_player_joins(sys::state &state, dcon::nation_id source, sys::player_name &name)
bool can_change_general(sys::state &state, dcon::nation_id source, dcon::army_id a, dcon::leader_id l)
bool can_intervene_in_war(sys::state &state, dcon::nation_id source, dcon::war_id w, bool for_attacker)
bool can_release_and_play_as(sys::state &state, dcon::nation_id source, dcon::national_identity_id t)
bool can_delete_factory(sys::state &state, dcon::nation_id source, dcon::factory_id f)
bool can_begin_factory_building_construction(sys::state &state, dcon::nation_id source, dcon::state_instance_id location, dcon::factory_type_id type, bool is_upgrade)
void give_war_subsidies(sys::state &state, dcon::nation_id source, dcon::nation_id target)
bool can_call_to_arms(sys::state &state, dcon::nation_id asker, dcon::nation_id target, dcon::war_id w, bool ignore_cost)
bool can_appoint_ruling_party(sys::state &state, dcon::nation_id source, dcon::political_party_id p)
bool can_begin_province_building_construction(sys::state &state, dcon::nation_id source, dcon::province_id p, economy::province_building_type type)
bool can_start_election(sys::state &state, dcon::nation_id source)
bool can_delete_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
void change_budget_settings(sys::state &state, dcon::nation_id source, budget_settings_data const &values)
bool can_start_crisis_peace_offer(sys::state &state, dcon::nation_id source, bool is_concession)
bool can_notify_player_leaves(sys::state &state, dcon::nation_id source, bool make_ai)
bool can_add_to_peace_offer(sys::state &state, dcon::nation_id source, dcon::wargoal_id goal)
bool can_ask_for_access(sys::state &state, dcon::nation_id asker, dcon::nation_id target, bool ignore_cost)
bool can_change_factory_settings(sys::state &state, dcon::nation_id source, dcon::factory_id f, uint8_t priority, bool subsidized)
void start_naval_unit_construction(sys::state &state, dcon::nation_id source, dcon::province_id location, dcon::unit_type_id type, dcon::province_id template_province)
void use_nation_button(sys::state &state, dcon::nation_id source, dcon::gui_def_id d, dcon::nation_id n)
void execute_add_to_sphere(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target)
void execute_intervene_in_war(sys::state &state, dcon::nation_id source, dcon::war_id w, bool for_attacker)
bool can_increase_relations(sys::state &state, dcon::nation_id source, dcon::nation_id target)
bool can_cancel_cb_fabrication(sys::state &state, dcon::nation_id source)
void retreat_from_land_battle(sys::state &state, dcon::nation_id source, dcon::land_battle_id b)
void mark_regiments_to_split(sys::state &state, dcon::nation_id source, std::array< dcon::regiment_id, num_packed_units > const &list)
bool can_upgrade_colony_to_state(sys::state &state, dcon::nation_id source, dcon::state_instance_id si)
bool can_civilize_nation(sys::state &state, dcon::nation_id source)
bool can_set_national_focus(sys::state &state, dcon::nation_id source, dcon::state_instance_id target_state, dcon::national_focus_id focus)
void evenly_split_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
bool can_retreat_from_land_battle(sys::state &state, dcon::nation_id source, dcon::land_battle_id b)
bool can_use_province_button(sys::state &state, dcon::nation_id source, dcon::gui_def_id d, dcon::province_id p)
void release_and_play_as(sys::state &state, dcon::nation_id source, dcon::national_identity_id t)
bool can_enact_reform(sys::state &state, dcon::nation_id source, dcon::reform_option_id r)
bool can_evenly_split_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
bool can_abandon_colony(sys::state &state, dcon::nation_id source, dcon::province_id pr)
bool can_ban_embassy(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
void execute_start_peace_offer(sys::state &state, dcon::nation_id source, dcon::nation_id target, dcon::war_id war, bool is_concession)
bool can_decrease_relations(sys::state &state, dcon::nation_id source, dcon::nation_id target)
bool can_move_capital(sys::state &state, dcon::nation_id source, dcon::province_id p)
void set_national_focus(sys::state &state, dcon::nation_id source, dcon::state_instance_id target_state, dcon::national_focus_id focus)
bool can_start_peace_offer(sys::state &state, dcon::nation_id source, dcon::nation_id target, dcon::war_id war, bool is_concession)
bool can_notify_player_kick(sys::state &state, dcon::nation_id source, dcon::nation_id target)
bool can_toggle_select_province(sys::state &state, dcon::nation_id source, dcon::province_id prov)
bool can_start_land_unit_construction(sys::state &state, dcon::nation_id source, dcon::province_id location, dcon::culture_id soldier_culture, dcon::unit_type_id type, dcon::province_id template_province)
void execute_remove_from_sphere(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
bool can_evenly_split_navy(sys::state &state, dcon::nation_id source, dcon::navy_id a)
void execute_send_crisis_peace_offer(sys::state &state, dcon::nation_id source)
void add_to_crisis_peace_offer(sys::state &state, dcon::nation_id source, dcon::nation_id wargoal_from, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation)
void retreat_from_naval_battle(sys::state &state, dcon::nation_id source, dcon::naval_battle_id b)
void execute_increase_opinion(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target)
bool can_disband_undermanned_regiments(sys::state &state, dcon::nation_id source, dcon::army_id a)
bool can_take_sides_in_crisis(sys::state &state, dcon::nation_id source, bool join_attacker)
bool can_change_stockpile_settings(sys::state &state, dcon::nation_id source, dcon::commodity_id c, float target_amount, bool draw_on_stockpiles)
void disband_undermanned_regiments(sys::state &state, dcon::nation_id source, dcon::army_id a)
bool can_take_decision(sys::state &state, dcon::nation_id source, dcon::decision_id d)
void enact_reform(sys::state &state, dcon::nation_id source, dcon::reform_option_id r)
bool can_make_leader(sys::state &state, dcon::nation_id source, bool general)
bool can_send_peace_offer(sys::state &state, dcon::nation_id source)
bool can_cancel_land_unit_construction(sys::state &state, dcon::nation_id source, dcon::province_id location, dcon::culture_id soldier_culture, dcon::unit_type_id type)
void execute_add_to_peace_offer(sys::state &state, dcon::nation_id source, dcon::wargoal_id goal)
bool can_make_vassal(sys::state &state, dcon::nation_id source, dcon::national_identity_id t)
bool can_merge_navies(sys::state &state, dcon::nation_id source, dcon::navy_id a, dcon::navy_id b)
void notify_console_command(sys::state &state)
bool can_discredit_advisors(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
bool can_add_to_crisis_peace_offer(sys::state &state, dcon::nation_id source, dcon::nation_id wargoal_from, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation)
bool can_cancel_naval_unit_construction(sys::state &state, dcon::nation_id source, dcon::province_id location, dcon::unit_type_id type)
bool can_remove_from_sphere(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
void execute_cancel_alliance(sys::state &state, dcon::nation_id source, dcon::nation_id target)
bool can_retreat_from_naval_battle(sys::state &state, dcon::nation_id source, dcon::naval_battle_id b)
bool can_change_budget_settings(sys::state &state, dcon::nation_id source, budget_settings_data const &values)
bool can_become_interested_in_crisis(sys::state &state, dcon::nation_id source)
bool can_split_navy(sys::state &state, dcon::nation_id source, dcon::navy_id a)
bool can_decrease_opinion(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
@ ask_for_military_access
@ change_factory_settings
@ cancel_land_unit_construction
@ respond_to_diplomatic_message
@ cancel_given_military_access
@ add_wargoal_to_crisis_offer
@ toggle_immigrator_province
@ change_influence_priority
@ notify_player_picks_nation
@ designate_split_regiments
@ begin_naval_unit_construction
@ send_crisis_peace_offer
@ upgrade_colony_to_state
@ begin_province_building_construction
@ change_stockpile_settings
@ toggle_interested_in_alliance
@ toggle_mobilized_is_ai_controlled
@ cancel_naval_unit_construction
@ start_crisis_peace_offer
@ cancel_factory_building_construction
@ release_and_play_nation
@ become_interested_in_crisis
@ begin_land_unit_construction
@ begin_factory_building_construction
bool can_suppress_movement(sys::state &state, dcon::nation_id source, dcon::movement_id m)
bool can_fabricate_cb(sys::state &state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id type)
bool can_delete_navy(sys::state &state, dcon::nation_id source, dcon::navy_id a)
void use_province_button(sys::state &state, dcon::nation_id source, dcon::gui_def_id d, dcon::province_id i)
bool can_split_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
bool can_invest_in_colony(sys::state &state, dcon::nation_id source, dcon::province_id p)
bool can_chat_message(sys::state &state, dcon::nation_id source, std::string_view body, dcon::nation_id target)
bool can_cancel_alliance(sys::state &state, dcon::nation_id source, dcon::nation_id target, bool ignore_cost)
bool can_notify_player_ban(sys::state &state, dcon::nation_id source, dcon::nation_id target)
void evenly_split_navy(sys::state &state, dcon::nation_id source, dcon::navy_id a)
bool can_declare_war(sys::state &state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation)
bool can_embark_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
bool can_toggle_interested_in_alliance(sys::state &state, dcon::nation_id asker, dcon::nation_id target)
void add_to_peace_offer(sys::state &state, dcon::nation_id source, dcon::wargoal_id goal)
bool can_use_nation_button(sys::state &state, dcon::nation_id source, dcon::gui_def_id d, dcon::nation_id n)
bool can_merge_armies(sys::state &state, dcon::nation_id source, dcon::army_id a, dcon::army_id b)
bool can_finish_colonization(sys::state &state, dcon::nation_id source, dcon::province_id p)
void execute_declare_war(sys::state &state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id primary_cb, dcon::state_definition_id cb_state, dcon::national_identity_id cb_tag, dcon::nation_id cb_secondary_nation, bool call_attacker_allies)
std::vector< dcon::province_id > can_move_navy(sys::state &state, dcon::nation_id source, dcon::navy_id n, dcon::province_id dest)
void make_event_choice(sys::state &state, event::pending_human_n_event const &e, uint8_t option_id)
bool can_notify_player_picks_nation(sys::state &state, dcon::nation_id source, dcon::nation_id target)
bool can_perform_command(sys::state &state, payload &c)
bool can_enact_issue(sys::state &state, dcon::nation_id source, dcon::issue_option_id i)
bool can_change_influence_priority(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, uint8_t priority)
bool can_cancel_given_military_access(sys::state &state, dcon::nation_id source, dcon::nation_id target, bool ignore_cost)
bool can_toggle_immigrator_province(sys::state &state, dcon::nation_id source, dcon::province_id prov)
void execute_pending_commands(sys::state &state)
void execute_decrease_opinion(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
bool can_ask_for_alliance(sys::state &state, dcon::nation_id asker, dcon::nation_id target, bool ignore_cost)
void execute_command(sys::state &state, payload &c)
bool can_start_naval_unit_construction(sys::state &state, dcon::nation_id source, dcon::province_id location, dcon::unit_type_id type, dcon::province_id template_province)
void execute_ask_for_alliance(sys::state &state, dcon::nation_id asker, dcon::nation_id target)
std::vector< dcon::province_id > can_move_army(sys::state &state, dcon::nation_id source, dcon::army_id a, dcon::province_id dest)
constexpr uint32_t max_chat_message_len
sys::checksum_key checksum
int8_t domestic_investment
int8_t administrative_spending
int8_t construction_spending
int8_t education_spending
char body[ui::max_chat_message_len]
dcon::invention_id invention
dcon::national_identity_id cb_tag
dcon::state_definition_id cb_state
dcon::nation_id cb_secondary_nation
dcon::state_instance_id location
dcon::factory_type_id type
dcon::province_id location
dcon::factory_type_id type
dcon::nation_id influence_target
dcon::nation_id gp_target
dcon::nation_id influence_target
dcon::culture_id pop_culture
dcon::province_id template_province
dcon::province_id location
diplomatic_message::type type
dcon::national_identity_id tag
dcon::issue_option_id iopt
dcon::national_focus_id focus
dcon::state_instance_id target_state
dcon::province_id template_province
dcon::province_id location
dcon::cb_type_id primary_cb
dcon::state_definition_id cb_state
dcon::national_identity_id cb_tag
bool call_attacker_allies
dcon::nation_id cb_secondary_nation
dcon::state_definition_id cb_state
dcon::nation_id cb_secondary_nation
dcon::national_identity_id cb_tag
sys::checksum_key checksum
sys::checksum_key checksum
union command::payload::dtype data
dcon::free_national_event_id e
dcon::free_provincial_event_id e
dcon::national_event_id e
dcon::provincial_event_id e
dcon::political_party_id p
dcon::province_id location
economy::province_building_type type
dcon::province_id location
dcon::regiment_id regs[num_packed_units]
dcon::ship_id ships[num_packed_units]
dcon::state_definition_id state
dcon::national_identity_id ident
war_target_data war_target
influence_priority_data influence_priority
rally_point_data rally_point
new_general_data new_general
pending_human_p_event_data pending_human_p_event
call_to_arms_data call_to_arms
naval_battle_data naval_battle
pending_human_f_p_event_data pending_human_f_p_event
army_movement_data army_movement
generic_location_data generic_location
cheat_location_data cheat_location
budget_settings_data budget_data
split_regiments_data split_regiments
new_admiral_data new_admiral
split_ships_data split_ships
land_battle_data land_battle
cheat_event_data cheat_event
nation_pick_data nation_pick
state_transfer_data state_transfer
national_focus_data nat_focus
influence_action_data influence_action
crisis_invitation_data crisis_invitation
pending_human_f_n_event_data pending_human_f_n_event
naval_unit_construction_data naval_unit_construction
new_war_goal_data new_war_goal
province_building_data start_province_building
crisis_join_data crisis_join
chat_message_data chat_message
political_party_data political_party
pending_human_n_event_data pending_human_n_event
diplo_action_data diplo_action
stockpile_settings_data stockpile_settings
notify_reload_data notify_reload
advance_tick_data advance_tick
navy_movement_data navy_movement
factory_building_data start_factory_building
land_unit_construction_data land_unit_construction
make_leader_data make_leader
notify_save_loaded_data notify_save_loaded
offer_wargoal_data offer_wargoal
tag_target_data tag_target
start_research_data start_research
cb_fabrication_data cb_fabrication
notify_leaves_data notify_leave
cheat_invention_data_t cheat_invention_data
merge_navy_data merge_navy
reform_selection_data reform_selection
sys::player_name player_name
merge_army_data merge_army
issue_selection_data issue_selection