Project Alice
Loading...
Searching...
No Matches
ai Namespace Reference

Classes

struct  classified_province
 
struct  crisis_str
 
struct  possible_cb
 

Enumerations

enum  ai_strategies { industrious , militant , technological }
 
enum class  province_class : uint8_t {
  interior = 0 , coast = 1 , low_priority_border = 2 , border = 3 ,
  threat_border = 4 , hostile_border = 5 , count = 6
}
 
enum class  fleet_activity {
  unspecified = 0 , boarding = 1 , transporting = 2 , returning_to_base = 3 ,
  attacking = 4 , merging = 5 , idle = 6 , unloading = 7 ,
  failed_transport = 8
}
 
enum class  army_activity {
  unspecified = 0 , on_guard = 1 , attacking = 2 , merging = 3 ,
  transport_guard = 4 , transport_attack = 5 , attack_gathered = 7 , attack_transport = 8
}
 

Functions

float estimate_strength (sys::state &state, dcon::nation_id n)
 
float estimate_defensive_strength (sys::state &state, dcon::nation_id n)
 
float estimate_additional_offensive_strength (sys::state &state, dcon::nation_id n, dcon::nation_id target)
 
void update_ai_general_status (sys::state &state)
 
void form_alliances (sys::state &state)
 
void prune_alliances (sys::state &state)
 
bool ai_is_close_enough (sys::state &state, dcon::nation_id target, dcon::nation_id from)
 
bool ai_will_accept_alliance (sys::state &state, dcon::nation_id target, dcon::nation_id from)
 
void explain_ai_alliance_reasons (sys::state &state, dcon::nation_id target, text::layout_base &contents, int32_t indent)
 
bool ai_will_grant_access (sys::state &state, dcon::nation_id target, dcon::nation_id from)
 
void explain_ai_access_reasons (sys::state &state, dcon::nation_id target, text::layout_base &contents, int32_t indent)
 
void update_ai_research (sys::state &state)
 
void initialize_ai_tech_weights (sys::state &state)
 
void update_factory_types_priority (sys::state &state)
 
void update_influence_priorities (sys::state &state)
 
void perform_influence_actions (sys::state &state)
 
void identify_focuses (sys::state &state)
 
void update_focuses (sys::state &state)
 
void take_ai_decisions (sys::state &state)
 
float estimate_pop_party_support (sys::state &state, dcon::nation_id n, dcon::political_party_id pid)
 
bool ai_can_appoint_political_party (sys::state &state, dcon::nation_id n)
 
void update_ai_ruling_party (sys::state &state)
 
void get_craved_factory_types (sys::state &state, dcon::nation_id nid, dcon::market_id mid, std::vector< dcon::factory_type_id > &desired_types)
 
void get_desired_factory_types (sys::state &state, dcon::nation_id nid, dcon::market_id mid, std::vector< dcon::factory_type_id > &desired_types)
 
void get_state_craved_factory_types (sys::state &state, dcon::nation_id nid, dcon::market_id mid, std::vector< dcon::factory_type_id > &desired_types)
 
void get_state_desired_factory_types (sys::state &state, dcon::nation_id nid, dcon::market_id mid, std::vector< dcon::factory_type_id > &desired_types)
 
int32_t future_rebels_in_nation (sys::state &state, dcon::nation_id n)
 
int16_t calculate_desired_army_size (sys::state &state, dcon::nation_id nation)
 
void update_ai_econ_construction (sys::state &state)
 
void update_ai_colonial_investment (sys::state &state)
 
void update_ai_colony_starting (sys::state &state)
 
void upgrade_colonies (sys::state &state)
 
void civilize (sys::state &state)
 
void take_reforms (sys::state &state)
 
bool will_be_crisis_primary_attacker (sys::state &state, dcon::nation_id n)
 
bool will_be_crisis_primary_defender (sys::state &state, dcon::nation_id n)
 
crisis_str estimate_crisis_str (sys::state &state)
 
bool will_join_crisis_with_offer (sys::state &state, dcon::nation_id n, sys::full_wg offer)
 
bool ai_offer_cb (sys::state &state, dcon::cb_type_id t)
 
void state_target_list (std::vector< dcon::state_instance_id > &result, sys::state &state, dcon::nation_id for_nation, dcon::nation_id within)
 
void update_crisis_leaders (sys::state &state)
 
bool will_accept_crisis_peace_offer (sys::state &state, dcon::nation_id to, bool is_concession, bool missing_wg)
 
bool will_accept_crisis_peace_offer (sys::state &state, dcon::nation_id to, dcon::peace_offer_id peace)
 
void update_war_intervention (sys::state &state)
 
void place_instance_in_result (sys::state &state, std::vector< possible_cb > &result, dcon::nation_id n, dcon::nation_id target, dcon::cb_type_id cb, std::vector< dcon::state_instance_id > const &target_states)
 
void sort_possible_justification_cbs (std::vector< possible_cb > &result, sys::state &state, dcon::nation_id n, dcon::nation_id target)
 
possible_cb pick_fabrication_type (sys::state &state, dcon::nation_id from, dcon::nation_id target)
 
bool valid_construction_target (sys::state &state, dcon::nation_id from, dcon::nation_id target)
 
void update_cb_fabrication (sys::state &state)
 
bool will_join_war (sys::state &state, dcon::nation_id n, dcon::war_id w, bool as_attacker)
 
void place_instance_in_result_war (sys::state &state, std::vector< possible_cb > &result, dcon::nation_id n, dcon::nation_id target, dcon::war_id w, dcon::cb_type_id cb, std::vector< dcon::state_instance_id > const &target_states)
 
void sort_available_cbs (std::vector< possible_cb > &result, sys::state &state, dcon::nation_id n, dcon::war_id w)
 
void sort_available_declaration_cbs (std::vector< possible_cb > &result, sys::state &state, dcon::nation_id n, dcon::nation_id target)
 
void add_free_ai_cbs_to_war (sys::state &state, dcon::nation_id n, dcon::war_id w)
 
dcon::cb_type_id pick_gw_extra_cb_type (sys::state &state, dcon::nation_id from, dcon::nation_id target)
 
dcon::nation_id pick_gw_target (sys::state &state, dcon::nation_id from, dcon::war_id w, bool is_attacker)
 
void add_wg_to_great_war (sys::state &state, dcon::nation_id n, dcon::war_id w)
 
void add_gw_goals (sys::state &state)
 
bool has_cores_occupied (sys::state &state, dcon::nation_id n)
 
void make_peace_offers (sys::state &state)
 
bool will_accept_peace_offer_value (sys::state &state, dcon::nation_id n, dcon::nation_id from, dcon::nation_id prime_attacker, dcon::nation_id prime_defender, float primary_warscore, float scoreagainst_me, bool offer_from_attacker, bool concession, int32_t overall_po_value, int32_t my_po_target, int32_t target_personal_po_value, int32_t potential_peace_score_against, int32_t my_side_against_target, int32_t my_side_peace_cost, int32_t war_duration, bool contains_sq)
 
bool will_accept_peace_offer (sys::state &state, dcon::nation_id n, dcon::nation_id from, dcon::peace_offer_id p)
 
bool naval_supremacy (sys::state &state, dcon::nation_id n, dcon::nation_id target)
 
void make_war_decs (sys::state &state)
 
void update_budget (sys::state &state)
 
void remove_ai_data (sys::state &state, dcon::nation_id n)
 
bool unit_on_ai_control (sys::state &state, dcon::army_id a)
 
void update_ships (sys::state &state)
 
void build_ships (sys::state &state)
 
dcon::province_id get_home_port (sys::state &state, dcon::nation_id n)
 
void refresh_home_ports (sys::state &state)
 
void daily_cleanup (sys::state &state)
 
bool navy_needs_repair (sys::state &state, dcon::navy_id n)
 
bool naval_advantage (sys::state &state, dcon::nation_id n)
 
void send_fleet_home (sys::state &state, dcon::navy_id n, fleet_activity moving_status=fleet_activity::returning_to_base, fleet_activity at_base=fleet_activity::idle)
 
bool set_fleet_target (sys::state &state, dcon::nation_id n, dcon::province_id start, dcon::navy_id for_navy)
 
void unload_units_from_transport (sys::state &state, dcon::navy_id n)
 
bool merge_fleet (sys::state &state, dcon::navy_id n, dcon::province_id p, dcon::nation_id owner)
 
void pickup_idle_ships (sys::state &state)
 
void distribute_guards (sys::state &state, dcon::nation_id n)
 
dcon::navy_id find_transport_fleet (sys::state &state, dcon::nation_id controller)
 
void move_idle_guards (sys::state &state)
 
void update_naval_transport (sys::state &state)
 
bool army_ready_for_battle (sys::state &state, dcon::nation_id n, dcon::army_id a)
 
void gather_to_battle (sys::state &state, dcon::nation_id n, dcon::province_id p)
 
float estimate_balanced_composition_factor (sys::state &state, dcon::army_id a)
 
float estimate_army_defensive_strength (sys::state &state, dcon::army_id a)
 
float estimate_army_offensive_strength (sys::state &state, dcon::army_id a)
 
float estimate_enemy_defensive_force (sys::state &state, dcon::province_id target, dcon::nation_id by)
 
void assign_targets (sys::state &state, dcon::nation_id n)
 
void make_attacks (sys::state &state)
 
void make_defense (sys::state &state)
 
void move_gathered_attackers (sys::state &state)
 
bool will_upgrade_units (sys::state &state, dcon::nation_id n)
 
void update_land_constructions (sys::state &state)
 
void new_units_and_merging (sys::state &state)
 
void general_ai_unit_tick (sys::state &state)
 
float estimate_rebel_strength (sys::state &state, dcon::province_id p)
 

Variables

constexpr float ally_overestimate = 2.f
 

Enumeration Type Documentation

◆ ai_strategies

Enumerator
industrious 
militant 
technological 

Definition at line 15 of file ai.cpp.

◆ army_activity

enum class ai::army_activity
strong
Enumerator
unspecified 
on_guard 
attacking 
merging 
transport_guard 
transport_attack 
attack_gathered 
attack_transport 

Definition at line 622 of file constants.hpp.

◆ fleet_activity

enum class ai::fleet_activity
strong
Enumerator
unspecified 
boarding 
transporting 
returning_to_base 
attacking 
merging 
idle 
unloading 
failed_transport 

Definition at line 610 of file constants.hpp.

◆ province_class

enum class ai::province_class : uint8_t
strong
Enumerator
interior 
coast 
low_priority_border 
border 
threat_border 
hostile_border 
count 

Definition at line 4641 of file ai.cpp.

Function Documentation

◆ add_free_ai_cbs_to_war()

void ai::add_free_ai_cbs_to_war ( sys::state state,
dcon::nation_id  n,
dcon::war_id  w 
)

Definition at line 3207 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_gw_goals()

void ai::add_gw_goals ( sys::state state)

Definition at line 3330 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ add_wg_to_great_war()

void ai::add_wg_to_great_war ( sys::state state,
dcon::nation_id  n,
dcon::war_id  w 
)

Definition at line 3288 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ai_can_appoint_political_party()

bool ai::ai_can_appoint_political_party ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1016 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ai_is_close_enough()

bool ai::ai_is_close_enough ( sys::state state,
dcon::nation_id  target,
dcon::nation_id  from 
)

Definition at line 251 of file ai.cpp.

Here is the caller graph for this function:

◆ ai_offer_cb()

bool ai::ai_offer_cb ( sys::state state,
dcon::cb_type_id  t 
)

Definition at line 2250 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ai_will_accept_alliance()

bool ai::ai_will_accept_alliance ( sys::state state,
dcon::nation_id  target,
dcon::nation_id  from 
)

Definition at line 283 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ai_will_grant_access()

bool ai::ai_will_grant_access ( sys::state state,
dcon::nation_id  target,
dcon::nation_id  from 
)

Definition at line 351 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ army_ready_for_battle()

bool ai::army_ready_for_battle ( sys::state state,
dcon::nation_id  n,
dcon::army_id  a 
)

Definition at line 5033 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ assign_targets()

void ai::assign_targets ( sys::state state,
dcon::nation_id  n 
)

Definition at line 5218 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ build_ships()

void ai::build_ships ( sys::state state)

Definition at line 4095 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ calculate_desired_army_size()

int16_t ai::calculate_desired_army_size ( sys::state state,
dcon::nation_id  nation 
)

Definition at line 1279 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ civilize()

void ai::civilize ( sys::state state)

Definition at line 2014 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ daily_cleanup()

void ai::daily_cleanup ( sys::state state)

Definition at line 4266 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ distribute_guards()

void ai::distribute_guards ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4656 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_additional_offensive_strength()

float ai::estimate_additional_offensive_strength ( sys::state state,
dcon::nation_id  n,
dcon::nation_id  target 
)

Definition at line 44 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_army_defensive_strength()

float ai::estimate_army_defensive_strength ( sys::state state,
dcon::army_id  a 
)

Definition at line 5133 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_army_offensive_strength()

float ai::estimate_army_offensive_strength ( sys::state state,
dcon::army_id  a 
)

Definition at line 5164 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_balanced_composition_factor()

float ai::estimate_balanced_composition_factor ( sys::state state,
dcon::army_id  a 
)

Definition at line 5094 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_crisis_str()

crisis_str ai::estimate_crisis_str ( sys::state state)

Definition at line 2188 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_defensive_strength()

float ai::estimate_defensive_strength ( sys::state state,
dcon::nation_id  n 
)

Definition at line 29 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_enemy_defensive_force()

float ai::estimate_enemy_defensive_force ( sys::state state,
dcon::province_id  target,
dcon::nation_id  by 
)

Definition at line 5190 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_pop_party_support()

float ai::estimate_pop_party_support ( sys::state state,
dcon::nation_id  n,
dcon::political_party_id  pid 
)

Definition at line 1004 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_rebel_strength()

float ai::estimate_rebel_strength ( sys::state state,
dcon::province_id  p 
)

Definition at line 6066 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ estimate_strength()

float ai::estimate_strength ( sys::state state,
dcon::nation_id  n 
)

Definition at line 19 of file ai.cpp.

Here is the caller graph for this function:

◆ explain_ai_access_reasons()

void ai::explain_ai_access_reasons ( sys::state state,
dcon::nation_id  target,
text::layout_base contents,
int32_t  indent 
)

Definition at line 371 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ explain_ai_alliance_reasons()

void ai::explain_ai_alliance_reasons ( sys::state state,
dcon::nation_id  target,
text::layout_base contents,
int32_t  indent 
)

Definition at line 332 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_transport_fleet()

dcon::navy_id ai::find_transport_fleet ( sys::state state,
dcon::nation_id  controller 
)

Definition at line 4812 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ form_alliances()

void ai::form_alliances ( sys::state state)

Definition at line 158 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ future_rebels_in_nation()

int32_t ai::future_rebels_in_nation ( sys::state state,
dcon::nation_id  n 
)

Definition at line 1267 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gather_to_battle()

void ai::gather_to_battle ( sys::state state,
dcon::nation_id  n,
dcon::province_id  p 
)

Definition at line 5049 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ general_ai_unit_tick()

void ai::general_ai_unit_tick ( sys::state state)

Definition at line 6018 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_craved_factory_types()

void ai::get_craved_factory_types ( sys::state state,
dcon::nation_id  nid,
dcon::market_id  mid,
std::vector< dcon::factory_type_id > &  desired_types 
)

Definition at line 1063 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_desired_factory_types()

void ai::get_desired_factory_types ( sys::state state,
dcon::nation_id  nid,
dcon::market_id  mid,
std::vector< dcon::factory_type_id > &  desired_types 
)

Definition at line 1095 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_home_port()

dcon::province_id ai::get_home_port ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4238 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_state_craved_factory_types()

void ai::get_state_craved_factory_types ( sys::state state,
dcon::nation_id  nid,
dcon::market_id  mid,
std::vector< dcon::factory_type_id > &  desired_types 
)

Definition at line 1184 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_state_desired_factory_types()

void ai::get_state_desired_factory_types ( sys::state state,
dcon::nation_id  nid,
dcon::market_id  mid,
std::vector< dcon::factory_type_id > &  desired_types 
)

Definition at line 1204 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ has_cores_occupied()

bool ai::has_cores_occupied ( sys::state state,
dcon::nation_id  n 
)

Definition at line 3342 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ identify_focuses()

void ai::identify_focuses ( sys::state state)

Definition at line 766 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initialize_ai_tech_weights()

void ai::initialize_ai_tech_weights ( sys::state state)

Definition at line 451 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_attacks()

void ai::make_attacks ( sys::state state)

Definition at line 5446 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_defense()

void ai::make_defense ( sys::state state)

Definition at line 5455 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_peace_offers()

void ai::make_peace_offers ( sys::state state)

Definition at line 3360 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ make_war_decs()

void ai::make_war_decs ( sys::state state)

Definition at line 3673 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ merge_fleet()

bool ai::merge_fleet ( sys::state state,
dcon::navy_id  n,
dcon::province_id  p,
dcon::nation_id  owner 
)

Definition at line 4403 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ move_gathered_attackers()

void ai::move_gathered_attackers ( sys::state state)

Definition at line 5464 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ move_idle_guards()

void ai::move_idle_guards ( sys::state state)

Definition at line 4840 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ naval_advantage()

bool ai::naval_advantage ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4293 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ naval_supremacy()

bool ai::naval_supremacy ( sys::state state,
dcon::nation_id  n,
dcon::nation_id  target 
)

Definition at line 3649 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ navy_needs_repair()

bool ai::navy_needs_repair ( sys::state state,
dcon::navy_id  n 
)

Definition at line 4271 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ new_units_and_merging()

void ai::new_units_and_merging ( sys::state state)

Definition at line 5904 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ perform_influence_actions()

void ai::perform_influence_actions ( sys::state state)

Definition at line 726 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pick_fabrication_type()

possible_cb ai::pick_fabrication_type ( sys::state state,
dcon::nation_id  from,
dcon::nation_id  target 
)

Definition at line 2844 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pick_gw_extra_cb_type()

dcon::cb_type_id ai::pick_gw_extra_cb_type ( sys::state state,
dcon::nation_id  from,
dcon::nation_id  target 
)

Definition at line 3230 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pick_gw_target()

dcon::nation_id ai::pick_gw_target ( sys::state state,
dcon::nation_id  from,
dcon::war_id  w,
bool  is_attacker 
)

Definition at line 3257 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ pickup_idle_ships()

void ai::pickup_idle_ships ( sys::state state)

Definition at line 4437 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ place_instance_in_result()

void ai::place_instance_in_result ( sys::state state,
std::vector< possible_cb > &  result,
dcon::nation_id  n,
dcon::nation_id  target,
dcon::cb_type_id  cb,
std::vector< dcon::state_instance_id > const &  target_states 
)

Definition at line 2707 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ place_instance_in_result_war()

void ai::place_instance_in_result_war ( sys::state state,
std::vector< possible_cb > &  result,
dcon::nation_id  n,
dcon::nation_id  target,
dcon::war_id  w,
dcon::cb_type_id  cb,
std::vector< dcon::state_instance_id > const &  target_states 
)

Definition at line 3010 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ prune_alliances()

void ai::prune_alliances ( sys::state state)

Definition at line 187 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ refresh_home_ports()

void ai::refresh_home_ports ( sys::state state)

Definition at line 4258 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_ai_data()

void ai::remove_ai_data ( sys::state state,
dcon::nation_id  n 
)

Definition at line 4008 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ send_fleet_home()

void ai::send_fleet_home ( sys::state state,
dcon::navy_id  n,
fleet_activity  moving_status = fleet_activity::returning_to_base,
fleet_activity  at_base = fleet_activity::idle 
)

Definition at line 4305 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_fleet_target()

bool ai::set_fleet_target ( sys::state state,
dcon::nation_id  n,
dcon::province_id  start,
dcon::navy_id  for_navy 
)

Definition at line 4327 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sort_available_cbs()

void ai::sort_available_cbs ( std::vector< possible_cb > &  result,
sys::state state,
dcon::nation_id  n,
dcon::war_id  w 
)

Definition at line 3101 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sort_available_declaration_cbs()

void ai::sort_available_declaration_cbs ( std::vector< possible_cb > &  result,
sys::state state,
dcon::nation_id  n,
dcon::nation_id  target 
)

Definition at line 3154 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sort_possible_justification_cbs()

void ai::sort_possible_justification_cbs ( std::vector< possible_cb > &  result,
sys::state state,
dcon::nation_id  n,
dcon::nation_id  target 
)

Definition at line 2789 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ state_target_list()

void ai::state_target_list ( std::vector< dcon::state_instance_id > &  result,
sys::state state,
dcon::nation_id  for_nation,
dcon::nation_id  within 
)

Definition at line 2264 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ take_ai_decisions()

void ai::take_ai_decisions ( sys::state state)

Definition at line 923 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ take_reforms()

void ai::take_reforms ( sys::state state)

Definition at line 2022 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unit_on_ai_control()

bool ai::unit_on_ai_control ( sys::state state,
dcon::army_id  a 
)

Definition at line 4018 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unload_units_from_transport()

void ai::unload_units_from_transport ( sys::state state,
dcon::navy_id  n 
)

Definition at line 4373 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_ai_colonial_investment()

void ai::update_ai_colonial_investment ( sys::state state)

Definition at line 1895 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_ai_colony_starting()

void ai::update_ai_colony_starting ( sys::state state)

Definition at line 1954 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_ai_econ_construction()

void ai::update_ai_econ_construction ( sys::state state)

Definition at line 1344 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_ai_general_status()

void ai::update_ai_general_status ( sys::state state)

Definition at line 58 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_ai_research()

void ai::update_ai_research ( sys::state state)

Definition at line 375 of file ai.cpp.

Here is the caller graph for this function:

◆ update_ai_ruling_party()

void ai::update_ai_ruling_party ( sys::state state)

Definition at line 1030 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_budget()

void ai::update_budget ( sys::state state)

Definition at line 3800 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_cb_fabrication()

void ai::update_cb_fabrication ( sys::state state)

Definition at line 2926 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_crisis_leaders()

void ai::update_crisis_leaders ( sys::state state)

Definition at line 2334 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_factory_types_priority()

void ai::update_factory_types_priority ( sys::state state)

Definition at line 496 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_focuses()

void ai::update_focuses ( sys::state state)

Definition at line 785 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_influence_priorities()

void ai::update_influence_priorities ( sys::state state)

Definition at line 600 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_land_constructions()

void ai::update_land_constructions ( sys::state state)

Definition at line 5723 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_naval_transport()

void ai::update_naval_transport ( sys::state state)

Definition at line 4986 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_ships()

void ai::update_ships ( sys::state state)

Definition at line 4031 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_war_intervention()

void ai::update_war_intervention ( sys::state state)

Definition at line 2647 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ upgrade_colonies()

void ai::upgrade_colonies ( sys::state state)

Definition at line 2004 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ valid_construction_target()

bool ai::valid_construction_target ( sys::state state,
dcon::nation_id  from,
dcon::nation_id  target 
)

Definition at line 2890 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ will_accept_crisis_peace_offer() [1/2]

bool ai::will_accept_crisis_peace_offer ( sys::state state,
dcon::nation_id  to,
bool  is_concession,
bool  missing_wg 
)

Definition at line 2546 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ will_accept_crisis_peace_offer() [2/2]

bool ai::will_accept_crisis_peace_offer ( sys::state state,
dcon::nation_id  to,
dcon::peace_offer_id  peace 
)

Definition at line 2584 of file ai.cpp.

Here is the call graph for this function:

◆ will_accept_peace_offer()

bool ai::will_accept_peace_offer ( sys::state state,
dcon::nation_id  n,
dcon::nation_id  from,
dcon::peace_offer_id  p 
)

Definition at line 3531 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ will_accept_peace_offer_value()

bool ai::will_accept_peace_offer_value ( sys::state state,
dcon::nation_id  n,
dcon::nation_id  from,
dcon::nation_id  prime_attacker,
dcon::nation_id  prime_defender,
float  primary_warscore,
float  scoreagainst_me,
bool  offer_from_attacker,
bool  concession,
int32_t  overall_po_value,
int32_t  my_po_target,
int32_t  target_personal_po_value,
int32_t  potential_peace_score_against,
int32_t  my_side_against_target,
int32_t  my_side_peace_cost,
int32_t  war_duration,
bool  contains_sq 
)

Definition at line 3454 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ will_be_crisis_primary_attacker()

bool ai::will_be_crisis_primary_attacker ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2094 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ will_be_crisis_primary_defender()

bool ai::will_be_crisis_primary_defender ( sys::state state,
dcon::nation_id  n 
)

Definition at line 2136 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ will_join_crisis_with_offer()

bool ai::will_join_crisis_with_offer ( sys::state state,
dcon::nation_id  n,
sys::full_wg  offer 
)

Definition at line 2241 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ will_join_war()

bool ai::will_join_war ( sys::state state,
dcon::nation_id  n,
dcon::war_id  w,
bool  as_attacker 
)

Definition at line 2979 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ will_upgrade_units()

bool ai::will_upgrade_units ( sys::state state,
dcon::nation_id  n 
)

Definition at line 5702 of file ai.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ ally_overestimate

constexpr float ai::ally_overestimate = 2.f
inlineconstexpr

Definition at line 281 of file ai.cpp.