Project Alice
Loading...
Searching...
No Matches
ai.hpp
Go to the documentation of this file.
1#pragma once
2#include "dcon_generated.hpp"
3#include "container_types.hpp"
4#include "text.hpp"
5
6namespace ai {
7
9void form_alliances(sys::state& state);
10void prune_alliances(sys::state& state);
11bool ai_will_accept_alliance(sys::state& state, dcon::nation_id target, dcon::nation_id from);
12void explain_ai_alliance_reasons(sys::state& state, dcon::nation_id target, text::layout_base& contents, int32_t indent);
13bool ai_will_grant_access(sys::state& state, dcon::nation_id target, dcon::nation_id from);
14void explain_ai_access_reasons(sys::state& state, dcon::nation_id target, text::layout_base& contents, int32_t indent);
19void update_focuses(sys::state& state);
20void identify_focuses(sys::state& state);
21void take_ai_decisions(sys::state& state);
23void get_craved_factory_types(sys::state& state, dcon::nation_id nid, dcon::market_id mid, std::vector<dcon::factory_type_id>& desired_types);
24void get_desired_factory_types(sys::state& state, dcon::nation_id nid, dcon::market_id mid, std::vector<dcon::factory_type_id>& desired_types);
28void upgrade_colonies(sys::state& state);
29void civilize(sys::state& state);
30void take_reforms(sys::state& state);
31bool will_be_crisis_primary_attacker(sys::state& state, dcon::nation_id n);
32bool will_be_crisis_primary_defender(sys::state& state, dcon::nation_id n);
33bool will_accept_crisis_peace_offer(sys::state& state, dcon::nation_id to, dcon::peace_offer_id peace);
35bool will_join_crisis_with_offer(sys::state& state, dcon::nation_id n, sys::full_wg offer);
37void state_target_list(std::vector<dcon::state_instance_id>& result, sys::state& state, dcon::nation_id for_nation, dcon::nation_id within);
39bool will_join_war(sys::state& state, dcon::nation_id, dcon::war_id, bool as_attacker);
40void add_free_ai_cbs_to_war(sys::state& state, dcon::nation_id n, dcon::war_id w);
41void add_gw_goals(sys::state& state);
42bool will_accept_peace_offer(sys::state& state, dcon::nation_id n, dcon::nation_id from, dcon::peace_offer_id p);
43void make_peace_offers(sys::state& state);
44void make_war_decs(sys::state& state);
45void update_budget(sys::state& state);
46void remove_ai_data(sys::state& state, dcon::nation_id n);
47void update_ships(sys::state& state);
48void build_ships(sys::state& state);
50void daily_cleanup(sys::state& state);
51void move_idle_guards(sys::state& state);
55void gather_to_battle(sys::state& state, dcon::nation_id n, dcon::province_id p);
56void make_attacks(sys::state& state);
57void make_defense(sys::state& state);
60
62 dcon::nation_id n, dcon::nation_id from,
63 dcon::nation_id prime_attacker, dcon::nation_id prime_defender,
64 float primary_warscore, float scoreagainst_me,
65 bool offer_from_attacker, bool concession,
66 int32_t overall_po_value, int32_t my_po_target,
67 int32_t target_personal_po_value, int32_t potential_peace_score_against,
68 int32_t my_side_against_target, int32_t my_side_peace_cost,
69 int32_t war_duration, bool contains_sq);
70
71bool will_accept_crisis_peace_offer(sys::state& state, dcon::nation_id to, bool is_concession, bool missing_wg);
72
73float estimate_army_offensive_strength(sys::state& state, dcon::army_id a);
74float estimate_army_defensive_strength(sys::state& state, dcon::army_id a);
75float estimate_rebel_strength(sys::state& state, dcon::province_id p);
76
77}
Definition: ai.cpp:13
void update_crisis_leaders(sys::state &state)
Definition: ai.cpp:2334
void get_craved_factory_types(sys::state &state, dcon::nation_id nid, dcon::market_id mid, std::vector< dcon::factory_type_id > &desired_types)
Definition: ai.cpp:1063
void initialize_ai_tech_weights(sys::state &state)
Definition: ai.cpp:451
void daily_cleanup(sys::state &state)
Definition: ai.cpp:4266
void take_reforms(sys::state &state)
Definition: ai.cpp:2022
void form_alliances(sys::state &state)
Definition: ai.cpp:158
void update_ai_ruling_party(sys::state &state)
Definition: ai.cpp:1030
void make_war_decs(sys::state &state)
Definition: ai.cpp:3673
void upgrade_colonies(sys::state &state)
Definition: ai.cpp:2004
void add_free_ai_cbs_to_war(sys::state &state, dcon::nation_id n, dcon::war_id w)
Definition: ai.cpp:3207
void update_cb_fabrication(sys::state &state)
Definition: ai.cpp:2926
bool ai_will_accept_alliance(sys::state &state, dcon::nation_id target, dcon::nation_id from)
Definition: ai.cpp:283
bool will_accept_peace_offer(sys::state &state, dcon::nation_id n, dcon::nation_id from, dcon::peace_offer_id p)
Definition: ai.cpp:3531
void state_target_list(std::vector< dcon::state_instance_id > &result, sys::state &state, dcon::nation_id for_nation, dcon::nation_id within)
Definition: ai.cpp:2264
void make_defense(sys::state &state)
Definition: ai.cpp:5455
float estimate_army_offensive_strength(sys::state &state, dcon::army_id a)
Definition: ai.cpp:5164
bool ai_will_grant_access(sys::state &state, dcon::nation_id target, dcon::nation_id from)
Definition: ai.cpp:351
float estimate_army_defensive_strength(sys::state &state, dcon::army_id a)
Definition: ai.cpp:5133
void refresh_home_ports(sys::state &state)
Definition: ai.cpp:4258
void remove_ai_data(sys::state &state, dcon::nation_id n)
Definition: ai.cpp:4008
bool will_be_crisis_primary_attacker(sys::state &state, dcon::nation_id n)
Definition: ai.cpp:2094
bool will_join_crisis_with_offer(sys::state &state, dcon::nation_id n, sys::full_wg offer)
Definition: ai.cpp:2241
void update_ai_colony_starting(sys::state &state)
Definition: ai.cpp:1954
void gather_to_battle(sys::state &state, dcon::nation_id n, dcon::province_id p)
Definition: ai.cpp:5049
void update_naval_transport(sys::state &state)
Definition: ai.cpp:4986
void update_focuses(sys::state &state)
Definition: ai.cpp:785
void get_desired_factory_types(sys::state &state, dcon::nation_id nid, dcon::market_id mid, std::vector< dcon::factory_type_id > &desired_types)
Definition: ai.cpp:1095
void update_budget(sys::state &state)
Definition: ai.cpp:3800
void move_gathered_attackers(sys::state &state)
Definition: ai.cpp:5464
float estimate_rebel_strength(sys::state &state, dcon::province_id p)
Definition: ai.cpp:6066
void update_ai_colonial_investment(sys::state &state)
Definition: ai.cpp:1895
void perform_influence_actions(sys::state &state)
Definition: ai.cpp:726
void make_attacks(sys::state &state)
Definition: ai.cpp:5446
void update_ships(sys::state &state)
Definition: ai.cpp:4031
void update_ai_econ_construction(sys::state &state)
Definition: ai.cpp:1344
bool will_join_war(sys::state &state, dcon::nation_id n, dcon::war_id w, bool as_attacker)
Definition: ai.cpp:2979
void build_ships(sys::state &state)
Definition: ai.cpp:4095
void prune_alliances(sys::state &state)
Definition: ai.cpp:187
void update_war_intervention(sys::state &state)
Definition: ai.cpp:2647
void explain_ai_access_reasons(sys::state &state, dcon::nation_id target, text::layout_base &contents, int32_t indent)
Definition: ai.cpp:371
void explain_ai_alliance_reasons(sys::state &state, dcon::nation_id target, text::layout_base &contents, int32_t indent)
Definition: ai.cpp:332
void update_influence_priorities(sys::state &state)
Definition: ai.cpp:600
void update_ai_research(sys::state &state)
Definition: ai.cpp:375
void update_ai_general_status(sys::state &state)
Definition: ai.cpp:58
void update_factory_types_priority(sys::state &state)
Definition: ai.cpp:496
void update_land_constructions(sys::state &state)
Definition: ai.cpp:5723
bool will_be_crisis_primary_defender(sys::state &state, dcon::nation_id n)
Definition: ai.cpp:2136
void identify_focuses(sys::state &state)
Definition: ai.cpp:766
void civilize(sys::state &state)
Definition: ai.cpp:2014
void make_peace_offers(sys::state &state)
Definition: ai.cpp:3360
bool will_accept_crisis_peace_offer(sys::state &state, dcon::nation_id to, bool is_concession, bool missing_wg)
Definition: ai.cpp:2546
void take_ai_decisions(sys::state &state)
Definition: ai.cpp:923
void general_ai_unit_tick(sys::state &state)
Definition: ai.cpp:6018
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)
Definition: ai.cpp:3454
void move_idle_guards(sys::state &state)
Definition: ai.cpp:4840
void add_gw_goals(sys::state &state)
Definition: ai.cpp:3330
Holds important data about the game world, state, and other data regarding windowing,...