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_desired_factory_types(sys::state& state, dcon::nation_id nid, std::vector<dcon::factory_type_id>& desired_types);
27void upgrade_colonies(sys::state& state);
28void civilize(sys::state& state);
29void take_reforms(sys::state& state);
30bool will_be_crisis_primary_attacker(sys::state& state, dcon::nation_id n);
31bool will_be_crisis_primary_defender(sys::state& state, dcon::nation_id n);
32bool will_accept_crisis_peace_offer(sys::state& state, dcon::nation_id to, dcon::peace_offer_id peace);
34bool will_join_crisis_with_offer(sys::state& state, dcon::nation_id n, sys::crisis_join_offer const& offer);
37bool will_join_war(sys::state& state, dcon::nation_id, dcon::war_id, bool as_attacker);
38void add_free_ai_cbs_to_war(sys::state& state, dcon::nation_id n, dcon::war_id w);
39void add_gw_goals(sys::state& state);
40bool will_accept_peace_offer(sys::state& state, dcon::nation_id n, dcon::nation_id from, dcon::peace_offer_id p);
41void make_peace_offers(sys::state& state);
42void make_war_decs(sys::state& state);
43void update_budget(sys::state& state);
44void remove_ai_data(sys::state& state, dcon::nation_id n);
45void update_ships(sys::state& state);
46void build_ships(sys::state& state);
48void daily_cleanup(sys::state& state);
49void move_idle_guards(sys::state& state);
53void gather_to_battle(sys::state& state, dcon::nation_id n, dcon::province_id p);
54void make_attacks(sys::state& state);
55void make_defense(sys::state& state);
57
59 dcon::nation_id n, dcon::nation_id from,
60 dcon::nation_id prime_attacker, dcon::nation_id prime_defender,
61 float primary_warscore, float scoreagainst_me,
62 bool offer_from_attacker, bool concession,
63 int32_t overall_po_value, int32_t my_po_target,
64 int32_t target_personal_po_value, int32_t potential_peace_score_against,
65 int32_t my_side_against_target, int32_t my_side_peace_cost,
66 int32_t war_duration, bool contains_sq);
67
68bool will_accept_crisis_peace_offer(sys::state& state, dcon::nation_id to, bool is_concession, bool missing_wg);
69
70float estimate_army_offensive_strength(sys::state& state, dcon::army_id a);
71float estimate_army_defensive_strength(sys::state& state, dcon::army_id a);
72float estimate_rebel_strength(sys::state& state, dcon::province_id p);
73
74}
Definition: ai.cpp:13
void update_crisis_leaders(sys::state &state)
Definition: ai.cpp:1692
void initialize_ai_tech_weights(sys::state &state)
Definition: ai.cpp:429
void daily_cleanup(sys::state &state)
Definition: ai.cpp:3563
void take_reforms(sys::state &state)
Definition: ai.cpp:1401
void form_alliances(sys::state &state)
Definition: ai.cpp:150
void update_ai_ruling_party(sys::state &state)
Definition: ai.cpp:871
void make_war_decs(sys::state &state)
Definition: ai.cpp:2973
void upgrade_colonies(sys::state &state)
Definition: ai.cpp:1383
void add_free_ai_cbs_to_war(sys::state &state, dcon::nation_id n, dcon::war_id w)
Definition: ai.cpp:2507
void update_cb_fabrication(sys::state &state)
Definition: ai.cpp:2145
bool ai_will_accept_alliance(sys::state &state, dcon::nation_id target, dcon::nation_id from)
Definition: ai.cpp:275
bool will_accept_peace_offer(sys::state &state, dcon::nation_id n, dcon::nation_id from, dcon::peace_offer_id p)
Definition: ai.cpp:2831
void make_defense(sys::state &state)
Definition: ai.cpp:4752
float estimate_army_offensive_strength(sys::state &state, dcon::army_id a)
Definition: ai.cpp:4461
bool ai_will_grant_access(sys::state &state, dcon::nation_id target, dcon::nation_id from)
Definition: ai.cpp:343
float estimate_army_defensive_strength(sys::state &state, dcon::army_id a)
Definition: ai.cpp:4430
void refresh_home_ports(sys::state &state)
Definition: ai.cpp:3555
void remove_ai_data(sys::state &state, dcon::nation_id n)
Definition: ai.cpp:3305
bool will_be_crisis_primary_attacker(sys::state &state, dcon::nation_id n)
Definition: ai.cpp:1473
void update_ai_colony_starting(sys::state &state)
Definition: ai.cpp:1333
void gather_to_battle(sys::state &state, dcon::nation_id n, dcon::province_id p)
Definition: ai.cpp:4346
void update_naval_transport(sys::state &state)
Definition: ai.cpp:4283
void update_focuses(sys::state &state)
Definition: ai.cpp:656
void update_budget(sys::state &state)
Definition: ai.cpp:3100
void move_gathered_attackers(sys::state &state)
Definition: ai.cpp:4761
float estimate_rebel_strength(sys::state &state, dcon::province_id p)
Definition: ai.cpp:5276
void update_ai_colonial_investment(sys::state &state)
Definition: ai.cpp:1284
void perform_influence_actions(sys::state &state)
Definition: ai.cpp:597
void make_attacks(sys::state &state)
Definition: ai.cpp:4743
void update_ships(sys::state &state)
Definition: ai.cpp:3328
void update_ai_econ_construction(sys::state &state)
Definition: ai.cpp:965
bool will_join_war(sys::state &state, dcon::nation_id n, dcon::war_id w, bool as_attacker)
Definition: ai.cpp:2192
void build_ships(sys::state &state)
Definition: ai.cpp:3392
void prune_alliances(sys::state &state)
Definition: ai.cpp:179
void update_war_intervention(sys::state &state)
Definition: ai.cpp:2029
void explain_ai_access_reasons(sys::state &state, dcon::nation_id target, text::layout_base &contents, int32_t indent)
Definition: ai.cpp:363
void explain_ai_alliance_reasons(sys::state &state, dcon::nation_id target, text::layout_base &contents, int32_t indent)
Definition: ai.cpp:324
void update_influence_priorities(sys::state &state)
Definition: ai.cpp:474
bool will_join_crisis_with_offer(sys::state &state, dcon::nation_id n, sys::crisis_join_offer const &offer)
Definition: ai.cpp:1600
void update_ai_research(sys::state &state)
Definition: ai.cpp:367
void update_ai_general_status(sys::state &state)
Definition: ai.cpp:50
void update_land_constructions(sys::state &state)
Definition: ai.cpp:4999
bool will_be_crisis_primary_defender(sys::state &state, dcon::nation_id n)
Definition: ai.cpp:1514
void identify_focuses(sys::state &state)
Definition: ai.cpp:637
void civilize(sys::state &state)
Definition: ai.cpp:1393
void make_peace_offers(sys::state &state)
Definition: ai.cpp:2660
bool will_accept_crisis_peace_offer(sys::state &state, dcon::nation_id to, bool is_concession, bool missing_wg)
Definition: ai.cpp:1892
void take_ai_decisions(sys::state &state)
Definition: ai.cpp:791
void general_ai_unit_tick(sys::state &state)
Definition: ai.cpp:5245
void get_desired_factory_types(sys::state &state, dcon::nation_id nid, std::vector< dcon::factory_type_id > &desired_types)
Definition: ai.cpp:904
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:2754
void move_idle_guards(sys::state &state)
Definition: ai.cpp:4137
void add_gw_goals(sys::state &state)
Definition: ai.cpp:2630