Project Alice
Loading...
Searching...
No Matches
commands.hpp
Go to the documentation of this file.
1#pragma once
2#include "dcon_generated.hpp"
3#include "common_types.hpp"
4#include "events.hpp"
6
7namespace command {
8
9enum class command_type : uint8_t {
10 invalid = 0,
13 make_leader = 3,
21 delete_factory = 11,
22 make_vassal = 12,
24 war_subsidies = 14,
26 change_budget = 16,
27 start_election = 17,
30 expel_advisors = 20,
31 ban_embassy = 21,
34 add_to_sphere = 24,
38 abandon_colony = 28,
42 civilize_nation = 32,
51 take_decision = 41,
56 fabricate_cb = 46,
60 call_to_arms = 50,
63 cancel_alliance = 53,
65 declare_war = 55,
66 add_war_goal = 56,
70 move_army = 61,
71 move_navy = 62,
72 embark_army = 63,
73 merge_armies = 64,
74 merge_navies = 65,
75 split_army = 66,
76 split_navy = 67,
77 delete_army = 68,
78 delete_navy = 69,
81 naval_retreat = 72,
82 land_retreat = 73,
87 change_admiral = 78,
88 change_general = 79,
91 set_rally_point = 82,
92 save_game = 83,
95 even_split_army = 86,
96 even_split_navy = 87,
100 state_transfer = 91,
101 release_subject = 92,
102 enable_debt = 93,
103 move_capital = 94,
107 pbutton_script = 98,
108 nbutton_script = 99,
109
110 // network
111 notify_player_ban = 106,
112 notify_player_kick = 107,
116 notify_player_oos = 111,
117 notify_save_loaded = 112,
118 notify_start_game = 113, // for synchronized "start game"
119 notify_stop_game = 114, // "go back to lobby"
120 notify_pause_game = 115, // visual aid mostly
121 notify_reload = 116,
122 advance_tick = 120,
123 chat_message = 121,
124
125 // console cheats
126 console_command = 255,
127};
128
130 dcon::gui_def_id button;
131 dcon::province_id id;
132};
134 dcon::gui_def_id button;
135 dcon::nation_id id;
136};
137
139 dcon::state_instance_id target_state;
140 dcon::national_focus_id focus;
141};
142
144 dcon::technology_id tech;
145};
146
149};
150
153};
154
156 dcon::province_id location;
158};
159
161 dcon::state_instance_id location;
162 dcon::factory_type_id type;
164};
165
167 dcon::nation_id target;
168};
169
171 dcon::province_id location;
172 dcon::unit_type_id type;
173 dcon::province_id template_province;
174};
175
177 dcon::province_id location;
178 bool naval = false;
179 bool enable = false;
180};
181
183 dcon::province_id location;
184 dcon::culture_id pop_culture;
185 dcon::unit_type_id type;
186 dcon::province_id template_province;
187};
188
190 dcon::province_id location;
191 dcon::factory_type_id type;
194};
195
197 dcon::national_identity_id ident;
198};
199
201 dcon::nation_id influence_target;
202 dcon::nation_id gp_target;
203};
204
206 dcon::nation_id influence_target;
208};
209
211 dcon::province_id prov;
212};
213
215 dcon::province_id prov;
216 dcon::nation_id n;
217};
218
220 dcon::issue_option_id iopt;
221 dcon::national_identity_id tag;
222};
223
225 dcon::political_party_id p;
226};
227
229 dcon::reform_option_id r;
230};
231
233 dcon::issue_option_id r;
234};
235
244 int8_t poor_tax;
246 int8_t rich_tax;
247 int8_t tariffs;
249 int8_t overseas;
250};
251
253 dcon::war_id war;
255};
256
259};
260
262 float amount;
263 dcon::commodity_id c;
265};
266
268 dcon::decision_id d;
269};
270
272 dcon::nation_id from;
274 bool accept;
275};
276
278 dcon::nation_id target;
279 dcon::state_definition_id state;
280};
281
283 dcon::nation_id target;
284 dcon::war_id war;
285};
286
291 int32_t from_slot;
293 dcon::national_event_id e;
297};
302 dcon::free_national_event_id e;
304};
308 int32_t from_slot;
310 dcon::provincial_event_id e;
311 dcon::province_id p;
314};
319 dcon::free_provincial_event_id e;
320 dcon::province_id p;
322};
323
325 dcon::nation_id target;
326 dcon::cb_type_id type;
327};
328
330 dcon::nation_id target;
331 dcon::state_definition_id cb_state;
332 dcon::national_identity_id cb_tag;
333 dcon::nation_id cb_secondary_nation;
334 dcon::cb_type_id primary_cb;
336};
337
339 dcon::nation_id target;
340 dcon::state_definition_id cb_state;
341 dcon::national_identity_id cb_tag;
342 dcon::nation_id cb_secondary_nation;
343 dcon::war_id war;
344 dcon::cb_type_id cb_type;
345};
346
348 dcon::nation_id invited;
349 dcon::nation_id target;
350 dcon::state_definition_id cb_state;
351 dcon::national_identity_id cb_tag;
352 dcon::nation_id cb_secondary_nation;
353 dcon::cb_type_id cb_type;
354};
355
357 dcon::nation_id target;
358 dcon::war_id war;
360};
362 dcon::wargoal_id wg;
363};
364
366 dcon::army_id a;
367 dcon::province_id dest;
368 bool reset;
369};
370
372 dcon::navy_id n;
373 dcon::province_id dest;
374 bool reset;
375};
376
378 dcon::army_id a;
379 dcon::army_id b;
380};
381
383 dcon::navy_id a;
384 dcon::navy_id b;
385};
386
388 dcon::army_id a;
389 dcon::leader_id l;
390};
391
393 dcon::navy_id a;
394 dcon::leader_id l;
395};
396
398 dcon::naval_battle_id b;
399};
400
402 dcon::land_battle_id b;
403};
404
405constexpr inline size_t num_packed_units = 10;
406
408 dcon::regiment_id regs[num_packed_units];
409};
411 dcon::ship_id ships[num_packed_units];
412};
413
415 float value;
416};
418 int32_t value;
419};
421 int32_t value;
422 dcon::nation_id as;
423};
424
426 dcon::invention_id invention;
427};
428
431 dcon::nation_id target;
432};
433
435 dcon::nation_id target;
436};
437
440 int32_t speed;
441};
442
446 dcon::nation_id target;
447};
450};
453};
454
455struct payload {
456 union dtype {
518 dtype() { }
520 dcon::nation_id source;
522
524};
525
526void save_game(sys::state& state, dcon::nation_id source, bool and_quit);
527
528void set_rally_point(sys::state& state, dcon::nation_id source, dcon::province_id location, bool naval, bool enable);
529
531
532void set_national_focus(sys::state& state, dcon::nation_id source, dcon::state_instance_id target_state, dcon::national_focus_id focus);
533bool can_set_national_focus(sys::state& state, dcon::nation_id source, dcon::state_instance_id target_state, dcon::national_focus_id focus);
534
535void start_research(sys::state& state, dcon::nation_id source, dcon::technology_id tech);
536bool can_start_research(sys::state& state, dcon::nation_id source, dcon::technology_id tech);
537
538void make_leader(sys::state& state, dcon::nation_id source, bool general);
539bool can_make_leader(sys::state& state, dcon::nation_id source, bool general);
540
541void decrease_relations(sys::state& state, dcon::nation_id source, dcon::nation_id target);
542bool can_decrease_relations(sys::state& state, dcon::nation_id source, dcon::nation_id target);
543
544void begin_province_building_construction(sys::state& state, dcon::nation_id source, dcon::province_id p, economy::province_building_type type);
545bool can_begin_province_building_construction(sys::state& state, dcon::nation_id source, dcon::province_id p, economy::province_building_type type);
546
547void begin_factory_building_construction(sys::state& state, dcon::nation_id source, dcon::state_instance_id location, dcon::factory_type_id type, bool is_upgrade);
548bool 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);
549
550void cancel_factory_building_construction(sys::state& state, dcon::nation_id source, dcon::state_instance_id location, dcon::factory_type_id type);
551bool can_cancel_factory_building_construction(sys::state& state, dcon::nation_id source, dcon::state_instance_id location, dcon::factory_type_id type);
552
553void 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 = dcon::province_id{});
554bool 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 = dcon::province_id{});
555
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{});
558
559void cancel_naval_unit_construction(sys::state& state, dcon::nation_id source, dcon::province_id location, dcon::unit_type_id type);
560bool can_cancel_naval_unit_construction(sys::state& state, dcon::nation_id source, dcon::province_id location, dcon::unit_type_id type);
561
562void 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);
563bool 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);
564
565void delete_factory(sys::state& state, dcon::nation_id source, dcon::factory_id f);
566bool can_delete_factory(sys::state& state, dcon::nation_id source, dcon::factory_id f);
567
568void change_factory_settings(sys::state& state, dcon::nation_id source, dcon::factory_id f, uint8_t priority, bool subsidized);
569bool can_change_factory_settings(sys::state& state, dcon::nation_id source, dcon::factory_id f, uint8_t priority, bool subsidized);
570
571void make_vassal(sys::state& state, dcon::nation_id source, dcon::national_identity_id t);
572bool can_make_vassal(sys::state& state, dcon::nation_id source, dcon::national_identity_id t);
573
574void release_and_play_as(sys::state& state, dcon::nation_id source, dcon::national_identity_id t);
575bool can_release_and_play_as(sys::state& state, dcon::nation_id source, dcon::national_identity_id t);
576
577void give_war_subsidies(sys::state& state, dcon::nation_id source, dcon::nation_id target);
578bool can_give_war_subsidies(sys::state& state, dcon::nation_id source, dcon::nation_id target);
579
580void cancel_war_subsidies(sys::state& state, dcon::nation_id source, dcon::nation_id target);
581bool can_cancel_war_subsidies(sys::state& state, dcon::nation_id source, dcon::nation_id target);
582
583void increase_relations(sys::state& state, dcon::nation_id source, dcon::nation_id target);
584bool can_increase_relations(sys::state& state, dcon::nation_id source, dcon::nation_id target);
585
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) };
589}
590// when sending new budget settings, leaving any value as int8_t(-127) will cause it to be ignored, leaving the setting the same
591// You can use the function above to easily make an instance of the settings struct that will change no values
592// Also, in consideration for future networking performance, do not send this command as the slider moves; only send it when the
593// player has stopped dragging the slider, in the case of drag, or maybe even only when the window closes / a day passes while the
594// window is open, if you think we can get away with it. In any case, we want to try to minimize how many times the command is
595// sent per average interaction with the budget.
596void change_budget_settings(sys::state& state, dcon::nation_id source, budget_settings_data const& values);
597inline bool can_change_budget_settings(sys::state& state, dcon::nation_id source, budget_settings_data const& values);
598
599void start_election(sys::state& state, dcon::nation_id source);
600bool can_start_election(sys::state& state, dcon::nation_id source);
601
602void change_influence_priority(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, uint8_t priority);
603bool can_change_influence_priority(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, uint8_t priority);
604
605void discredit_advisors(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
606bool can_discredit_advisors(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
607
608void expel_advisors(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
609bool can_expel_advisors(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
610
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);
613
614void increase_opinion(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target);
615bool can_increase_opinion(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target);
616void execute_increase_opinion(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target);
617
618void decrease_opinion(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
619bool can_decrease_opinion(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
620void execute_decrease_opinion(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
621
622void add_to_sphere(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target);
623bool can_add_to_sphere(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target);
624void execute_add_to_sphere(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target);
625
626void remove_from_sphere(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
627bool can_remove_from_sphere(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
628void execute_remove_from_sphere(sys::state& state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp);
629
630void upgrade_colony_to_state(sys::state& state, dcon::nation_id source, dcon::state_instance_id si);
631bool can_upgrade_colony_to_state(sys::state& state, dcon::nation_id source, dcon::state_instance_id si);
632
633void invest_in_colony(sys::state& state, dcon::nation_id source, dcon::province_id p);
634bool can_invest_in_colony(sys::state& state, dcon::nation_id source, dcon::province_id p);
635
636void abandon_colony(sys::state& state, dcon::nation_id source, dcon::province_id p);
637bool can_abandon_colony(sys::state& state, dcon::nation_id source, dcon::province_id p);
638
639void finish_colonization(sys::state& state, dcon::nation_id source, dcon::province_id p);
640bool can_finish_colonization(sys::state& state, dcon::nation_id source, dcon::province_id p);
641
642void intervene_in_war(sys::state& state, dcon::nation_id source, dcon::war_id w, bool for_attacker);
643bool can_intervene_in_war(sys::state& state, dcon::nation_id source, dcon::war_id w, bool for_attacker);
644void execute_intervene_in_war(sys::state& state, dcon::nation_id source, dcon::war_id w, bool for_attacker);
645
646void suppress_movement(sys::state& state, dcon::nation_id source, dcon::movement_id m);
647bool can_suppress_movement(sys::state& state, dcon::nation_id source, dcon::movement_id m);
648
649void civilize_nation(sys::state& state, dcon::nation_id source);
650bool can_civilize_nation(sys::state& state, dcon::nation_id source);
651
652void appoint_ruling_party(sys::state& state, dcon::nation_id source, dcon::political_party_id p);
653bool can_appoint_ruling_party(sys::state& state, dcon::nation_id source, dcon::political_party_id p);
654
655void enact_reform(sys::state& state, dcon::nation_id source, dcon::reform_option_id r);
656bool can_enact_reform(sys::state& state, dcon::nation_id source, dcon::reform_option_id r);
657
658void enact_issue(sys::state& state, dcon::nation_id source, dcon::issue_option_id i);
659bool can_enact_issue(sys::state& state, dcon::nation_id source, dcon::issue_option_id i);
660
661void become_interested_in_crisis(sys::state& state, dcon::nation_id source);
662bool can_become_interested_in_crisis(sys::state& state, dcon::nation_id source);
663
664void take_sides_in_crisis(sys::state& state, dcon::nation_id source, bool join_attacker);
665bool can_take_sides_in_crisis(sys::state& state, dcon::nation_id source, bool join_attacker);
666
667void change_stockpile_settings(sys::state& state, dcon::nation_id source, dcon::commodity_id c, float target_amount, bool draw_on_stockpiles);
668bool can_change_stockpile_settings(sys::state& state, dcon::nation_id source, dcon::commodity_id c, float target_amount, bool draw_on_stockpiles);
669
670void take_decision(sys::state& state, dcon::nation_id source, dcon::decision_id d);
671bool can_take_decision(sys::state& state, dcon::nation_id source, dcon::decision_id d);
672
673void make_event_choice(sys::state& state, event::pending_human_n_event const& e, uint8_t option_id);
675void make_event_choice(sys::state& state, event::pending_human_p_event const& e, uint8_t option_id);
677
678void fabricate_cb(sys::state& state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id type);
679bool can_fabricate_cb(sys::state& state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id type);
680
681void cancel_cb_fabrication(sys::state& state, dcon::nation_id source);
682bool can_cancel_cb_fabrication(sys::state& state, dcon::nation_id source);
683
684void ask_for_military_access(sys::state& state, dcon::nation_id asker, dcon::nation_id target);
685bool can_ask_for_access(sys::state& state, dcon::nation_id asker, dcon::nation_id target, bool ignore_cost = false);
686
687void give_military_access(sys::state& state, dcon::nation_id asker, dcon::nation_id target);
688bool can_give_military_access(sys::state& state, dcon::nation_id asker, dcon::nation_id target, bool ignore_cost = false);
689
690void ask_for_alliance(sys::state& state, dcon::nation_id asker, dcon::nation_id target);
691bool can_ask_for_alliance(sys::state& state, dcon::nation_id asker, dcon::nation_id target, bool ignore_cost = false);
692void execute_ask_for_alliance(sys::state& state, dcon::nation_id asker, dcon::nation_id target);
693
694void toggle_interested_in_alliance(sys::state& state, dcon::nation_id asker, dcon::nation_id target);
695bool can_toggle_interested_in_alliance(sys::state& state, dcon::nation_id asker, dcon::nation_id target);
696
697void call_to_arms(sys::state& state, dcon::nation_id asker, dcon::nation_id target, dcon::war_id w);
698void execute_call_to_arms(sys::state& state, dcon::nation_id asker, dcon::nation_id target, dcon::war_id w);
699bool can_call_to_arms(sys::state& state, dcon::nation_id asker, dcon::nation_id target, dcon::war_id w, bool ignore_cost = false);
700
701void respond_to_diplomatic_message(sys::state& state, dcon::nation_id source, dcon::nation_id from, diplomatic_message::type type, bool accept);
702
703void cancel_military_access(sys::state& state, dcon::nation_id source, dcon::nation_id target);
704bool can_cancel_military_access(sys::state& state, dcon::nation_id source, dcon::nation_id target, bool ignore_cost = false);
705
706void cancel_alliance(sys::state& state, dcon::nation_id source, dcon::nation_id target);
707bool can_cancel_alliance(sys::state& state, dcon::nation_id source, dcon::nation_id target, bool ignore_cost = false);
708void execute_cancel_alliance(sys::state& state, dcon::nation_id source, dcon::nation_id target);
709
710void cancel_given_military_access(sys::state& state, dcon::nation_id source, dcon::nation_id target); // this is for cancelling the access someone has with you
711bool can_cancel_given_military_access(sys::state& state, dcon::nation_id source, dcon::nation_id target, bool ignore_cost = false);
712
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);
716
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);
719
720// NOTE: sending an invalid province id will stop movement of an army or navy;
721// otherwise path will be appended to its current destination if any
722// Thus, if you want to move the unit to a new location from its current location,
723// first stop its current movement and then send the new destination as a second command
724// ALSO: can returns an empty vector if no path could be made
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);
727
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);
730
731// This command is used for getting armies in/out of transports while those transports are docked in port
732// If the army is already embarked, it will disembark; if it is not embarked it will embark
733// Embarking an army onto/off a ship that is off the coast is done by moving the army into the sea/land tile instead.
734void embark_army(sys::state& state, dcon::nation_id source, dcon::army_id a);
735bool can_embark_army(sys::state& state, dcon::nation_id source, dcon::army_id a);
736
737void merge_armies(sys::state& state, dcon::nation_id source, dcon::army_id a, dcon::army_id b);
738bool can_merge_armies(sys::state& state, dcon::nation_id source, dcon::army_id a, dcon::army_id b);
739
740void merge_navies(sys::state& state, dcon::nation_id source, dcon::navy_id a, dcon::navy_id b);
741bool can_merge_navies(sys::state& state, dcon::nation_id source, dcon::navy_id a, dcon::navy_id b);
742
743void split_army(sys::state& state, dcon::nation_id source, dcon::army_id a);
744bool can_split_army(sys::state& state, dcon::nation_id source, dcon::army_id a);
745
746void disband_undermanned_regiments(sys::state& state, dcon::nation_id source, dcon::army_id a);
747bool can_disband_undermanned_regiments(sys::state& state, dcon::nation_id source, dcon::army_id a);
748
749void split_navy(sys::state& state, dcon::nation_id source, dcon::navy_id a);
750bool can_split_navy(sys::state& state, dcon::nation_id source, dcon::navy_id a);
751
752void evenly_split_army(sys::state& state, dcon::nation_id source, dcon::army_id a);
753bool can_evenly_split_army(sys::state& state, dcon::nation_id source, dcon::army_id a);
754
755void toggle_rebel_hunting(sys::state& state, dcon::nation_id source, dcon::army_id a);
756void toggle_unit_ai_control(sys::state& state, dcon::nation_id source, dcon::army_id a);
757void toggle_mobilized_is_ai_controlled(sys::state& state, dcon::nation_id source);
758
759void evenly_split_navy(sys::state& state, dcon::nation_id source, dcon::navy_id a);
760bool can_evenly_split_navy(sys::state& state, dcon::nation_id source, dcon::navy_id a);
761
762void delete_army(sys::state& state, dcon::nation_id source, dcon::army_id a);
763bool can_delete_army(sys::state& state, dcon::nation_id source, dcon::army_id a);
764
765void delete_navy(sys::state& state, dcon::nation_id source, dcon::navy_id a);
766bool can_delete_navy(sys::state& state, dcon::nation_id source, dcon::navy_id a);
767
768// Each ship / regiment carries a "to split" flag. When the split command is sent, any marked units will be split off into
769// a new army / navy and their split flag will be unset
770// The commands below *toggle* the split flag (you can also use them to turn the flag off)
771// Fill any unused slots with the invalid handle, but remember that each of these requires some network traffic
772void mark_regiments_to_split(sys::state& state, dcon::nation_id source,
773 std::array<dcon::regiment_id, num_packed_units> const& list);
774void mark_ships_to_split(sys::state& state, dcon::nation_id source, std::array<dcon::ship_id, num_packed_units> const& list);
775
776void retreat_from_naval_battle(sys::state& state, dcon::nation_id source, dcon::naval_battle_id b);
777bool can_retreat_from_naval_battle(sys::state& state, dcon::nation_id source, dcon::naval_battle_id b);
778
779void retreat_from_land_battle(sys::state& state, dcon::nation_id source, dcon::land_battle_id b);
780bool can_retreat_from_land_battle(sys::state& state, dcon::nation_id source, dcon::land_battle_id b);
781
782void change_general(sys::state& state, dcon::nation_id source, dcon::army_id a, dcon::leader_id l);
783bool can_change_general(sys::state& state, dcon::nation_id source, dcon::army_id a, dcon::leader_id l);
784
785void change_admiral(sys::state& state, dcon::nation_id source, dcon::navy_id a, dcon::leader_id l);
786bool can_change_admiral(sys::state& state, dcon::nation_id source, dcon::navy_id a, dcon::leader_id l);
787
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);
790
791void toggle_mobilization(sys::state& state, dcon::nation_id source);
792
793void enable_debt(sys::state& state, dcon::nation_id source, bool debt_is_enabled);
794
795void move_capital(sys::state& state, dcon::nation_id source, dcon::province_id p);
796bool can_move_capital(sys::state& state, dcon::nation_id source, dcon::province_id p);
797
798void use_province_button(sys::state& state, dcon::nation_id source, dcon::gui_def_id d, dcon::province_id p);
799bool can_use_province_button(sys::state& state, dcon::nation_id source, dcon::gui_def_id d, dcon::province_id p);
800
801void use_nation_button(sys::state& state, dcon::nation_id source, dcon::gui_def_id d, dcon::nation_id n);
802bool can_use_nation_button(sys::state& state, dcon::nation_id source, dcon::gui_def_id d, dcon::nation_id n);
803
804/*
805PEACE OFFER COMMANDS:
806
807IMPORTANT:
808Even though these are separate commands, they should be sent as a single sequence with no intermediate other commands:
809send start_peace_offer then repeat add_to_peace_offer to populate it, and then send_peace_offer to finish the process
810DO NOT attempt to issue these commands as the player constructs the offer in the ui
811Note that crisis offers are constructed in basically the same way. You cannot have a normal peace offer under construction / in
812flight while constructing / offering a crisis peace offer
813*/
814
815void start_peace_offer(sys::state& state, dcon::nation_id source, dcon::nation_id target, dcon::war_id war, bool is_concession);
816bool can_start_peace_offer(sys::state& state, dcon::nation_id source, dcon::nation_id target, dcon::war_id war, bool is_concession);
817void execute_start_peace_offer(sys::state& state, dcon::nation_id source, dcon::nation_id target, dcon::war_id war, bool is_concession);
818
819void add_to_peace_offer(sys::state& state, dcon::nation_id source, dcon::wargoal_id goal);
820bool can_add_to_peace_offer(sys::state& state, dcon::nation_id source, dcon::wargoal_id goal);
821void execute_add_to_peace_offer(sys::state& state, dcon::nation_id source, dcon::wargoal_id goal);
822
823void send_peace_offer(sys::state& state, dcon::nation_id source);
824bool can_send_peace_offer(sys::state& state, dcon::nation_id source);
825void execute_send_peace_offer(sys::state& state, dcon::nation_id source);
826
827// CRISIS PEACE OFFER COMMANDS
828
829void start_crisis_peace_offer(sys::state& state, dcon::nation_id source, bool is_concession);
830bool can_start_crisis_peace_offer(sys::state& state, dcon::nation_id source, bool is_concession);
831void execute_start_crisis_peace_offer(sys::state& state, dcon::nation_id source, bool is_concession);
832
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);
835
836void send_crisis_peace_offer(sys::state& state, dcon::nation_id source);
837bool can_send_crisis_peace_offer(sys::state& state, dcon::nation_id source);
838void execute_send_crisis_peace_offer(sys::state& state, dcon::nation_id source);
839
840void toggle_select_province(sys::state& state, dcon::nation_id source, dcon::province_id p);
841bool can_toggle_select_province(sys::state& state, dcon::nation_id source, dcon::province_id p);
842
843void toggle_immigrator_province(sys::state& state, dcon::nation_id source, dcon::province_id prov);
844bool can_toggle_immigrator_province(sys::state& state, dcon::nation_id source, dcon::province_id prov);
845
846void chat_message(sys::state& state, dcon::nation_id source, std::string_view body, dcon::nation_id target);
847bool can_chat_message(sys::state& state, dcon::nation_id source, std::string_view body, dcon::nation_id target);
848
849void release_subject(sys::state& state, dcon::nation_id source, dcon::nation_id target);
850bool can_release_subject(sys::state& state, dcon::nation_id source, dcon::nation_id target);
851
852void state_transfer(sys::state& state, dcon::nation_id asker, dcon::nation_id target, dcon::state_definition_id sid);
853bool can_state_transfer(sys::state& state, dcon::nation_id asker, dcon::nation_id target, dcon::state_definition_id sid);
854
855void advance_tick(sys::state& state, dcon::nation_id source);
856void notify_player_ban(sys::state& state, dcon::nation_id source, dcon::nation_id target);
857bool can_notify_player_ban(sys::state& state, dcon::nation_id source, dcon::nation_id target);
858void notify_player_kick(sys::state& state, dcon::nation_id source, dcon::nation_id target);
859bool can_notify_player_kick(sys::state& state, dcon::nation_id source, dcon::nation_id target);
860void notify_player_joins(sys::state& state, dcon::nation_id source, sys::player_name& name);
861bool can_notify_player_joins(sys::state& state, dcon::nation_id source, sys::player_name& name);
862void notify_player_leaves(sys::state& state, dcon::nation_id source, bool make_ai);
863bool can_notify_player_leaves(sys::state& state, dcon::nation_id source, bool make_ai);
864void notify_player_picks_nation(sys::state& state, dcon::nation_id source, dcon::nation_id target);
865bool can_notify_player_picks_nation(sys::state& state, dcon::nation_id source, dcon::nation_id target);
866void notify_player_oos(sys::state& state, dcon::nation_id source);
867void notify_save_loaded(sys::state& state, dcon::nation_id source);
868void notify_reload(sys::state& state, dcon::nation_id source);
869void notify_start_game(sys::state& state, dcon::nation_id source);
870void notify_stop_game(sys::state& state, dcon::nation_id source);
871void notify_pause_game(sys::state& state, dcon::nation_id source);
872
873void execute_command(sys::state& state, payload& c);
875bool can_perform_command(sys::state& state, payload& c);
876
878
879} // namespace command
880
bool can_state_transfer(sys::state &state, dcon::nation_id asker, dcon::nation_id target, dcon::state_definition_id sid)
Definition: commands.cpp:2375
bool can_increase_opinion(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target)
Definition: commands.cpp:1273
void execute_send_peace_offer(sys::state &state, dcon::nation_id source)
Definition: commands.cpp:3071
bool can_cancel_military_access(sys::state &state, dcon::nation_id source, dcon::nation_id target, bool ignore_cost)
Definition: commands.cpp:2500
void mark_ships_to_split(sys::state &state, dcon::nation_id source, std::array< dcon::ship_id, num_packed_units > const &list)
Definition: commands.cpp:4182
constexpr size_t num_packed_units
Definition: commands.hpp:405
budget_settings_data make_empty_budget_settings()
Definition: commands.hpp:586
bool can_start_research(sys::state &state, dcon::nation_id source, dcon::technology_id tech)
Definition: commands.cpp:183
bool can_release_subject(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:3807
bool can_send_crisis_peace_offer(sys::state &state, dcon::nation_id source)
Definition: commands.cpp:3104
bool can_expel_advisors(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
Definition: commands.cpp:1132
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)
Definition: commands.cpp:668
void enact_issue(sys::state &state, dcon::nation_id source, dcon::issue_option_id i)
Definition: commands.cpp:1878
bool can_add_to_sphere(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target)
Definition: commands.cpp:1410
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)
Definition: commands.cpp:4271
bool can_give_war_subsidies(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:238
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)
Definition: commands.cpp:2715
bool can_change_admiral(sys::state &state, dcon::nation_id source, dcon::navy_id a, dcon::leader_id l)
Definition: commands.cpp:4151
bool is_console_command(command_type t)
Definition: commands.cpp:19
void execute_start_crisis_peace_offer(sys::state &state, dcon::nation_id source, bool is_concession)
Definition: commands.cpp:2875
bool can_give_military_access(sys::state &state, dcon::nation_id asker, dcon::nation_id target, bool ignore_cost)
Definition: commands.cpp:2262
void execute_call_to_arms(sys::state &state, dcon::nation_id asker, dcon::nation_id target, dcon::war_id w)
Definition: commands.cpp:2451
void toggle_rebel_hunting(sys::state &state, dcon::nation_id source, dcon::army_id a)
Definition: commands.cpp:3683
bool can_cancel_war_subsidies(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:283
bool can_cancel_factory_building_construction(sys::state &state, dcon::nation_id source, dcon::state_instance_id location, dcon::factory_type_id type)
Definition: commands.cpp:453
bool can_notify_player_joins(sys::state &state, dcon::nation_id source, sys::player_name &name)
Definition: commands.cpp:4516
bool can_change_general(sys::state &state, dcon::nation_id source, dcon::army_id a, dcon::leader_id l)
Definition: commands.cpp:4132
bool can_intervene_in_war(sys::state &state, dcon::nation_id source, dcon::war_id w, bool for_attacker)
Definition: commands.cpp:1668
bool can_release_and_play_as(sys::state &state, dcon::nation_id source, dcon::national_identity_id t)
Definition: commands.cpp:905
bool can_delete_factory(sys::state &state, dcon::nation_id source, dcon::factory_id f)
Definition: commands.cpp:776
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)
Definition: commands.cpp:491
void give_war_subsidies(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:230
bool can_call_to_arms(sys::state &state, dcon::nation_id asker, dcon::nation_id target, dcon::war_id w, bool ignore_cost)
Definition: commands.cpp:2430
bool can_appoint_ruling_party(sys::state &state, dcon::nation_id source, dcon::political_party_id p)
Definition: commands.cpp:1822
bool can_begin_province_building_construction(sys::state &state, dcon::nation_id source, dcon::province_id p, economy::province_building_type type)
Definition: commands.cpp:402
bool can_start_election(sys::state &state, dcon::nation_id source)
Definition: commands.cpp:1003
bool can_delete_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
Definition: commands.cpp:4089
void change_budget_settings(sys::state &state, dcon::nation_id source, budget_settings_data const &values)
Definition: commands.cpp:945
bool can_start_crisis_peace_offer(sys::state &state, dcon::nation_id source, bool is_concession)
Definition: commands.cpp:2866
bool can_notify_player_leaves(sys::state &state, dcon::nation_id source, bool make_ai)
Definition: commands.cpp:4544
bool can_add_to_peace_offer(sys::state &state, dcon::nation_id source, dcon::wargoal_id goal)
Definition: commands.cpp:2927
bool can_ask_for_access(sys::state &state, dcon::nation_id asker, dcon::nation_id target, bool ignore_cost)
Definition: commands.cpp:2222
bool can_change_factory_settings(sys::state &state, dcon::nation_id source, dcon::factory_id f, uint8_t priority, bool subsidized)
Definition: commands.cpp:819
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)
Definition: commands.cpp:609
void use_nation_button(sys::state &state, dcon::nation_id source, dcon::gui_def_id d, dcon::nation_id n)
Definition: commands.cpp:4439
void execute_add_to_sphere(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target)
Definition: commands.cpp:1442
void execute_intervene_in_war(sys::state &state, dcon::nation_id source, dcon::war_id w, bool for_attacker)
Definition: commands.cpp:1751
bool can_increase_relations(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:325
bool can_cancel_cb_fabrication(sys::state &state, dcon::nation_id source)
Definition: commands.cpp:2196
void retreat_from_land_battle(sys::state &state, dcon::nation_id source, dcon::land_battle_id b)
Definition: commands.cpp:4228
void mark_regiments_to_split(sys::state &state, dcon::nation_id source, std::array< dcon::regiment_id, num_packed_units > const &list)
Definition: commands.cpp:4161
bool can_upgrade_colony_to_state(sys::state &state, dcon::nation_id source, dcon::state_instance_id si)
Definition: commands.cpp:1547
bool can_civilize_nation(sys::state &state, dcon::nation_id source)
Definition: commands.cpp:1807
bool can_set_national_focus(sys::state &state, dcon::nation_id source, dcon::state_instance_id target_state, dcon::national_focus_id focus)
Definition: commands.cpp:118
void evenly_split_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
Definition: commands.cpp:3875
bool can_retreat_from_land_battle(sys::state &state, dcon::nation_id source, dcon::land_battle_id b)
Definition: commands.cpp:4237
bool can_use_province_button(sys::state &state, dcon::nation_id source, dcon::gui_def_id d, dcon::province_id p)
Definition: commands.cpp:4423
void release_and_play_as(sys::state &state, dcon::nation_id source, dcon::national_identity_id t)
Definition: commands.cpp:897
bool can_enact_reform(sys::state &state, dcon::nation_id source, dcon::reform_option_id r)
Definition: commands.cpp:1862
bool can_evenly_split_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
Definition: commands.cpp:3883
bool can_abandon_colony(sys::state &state, dcon::nation_id source, dcon::province_id pr)
Definition: commands.cpp:1608
bool can_ban_embassy(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
Definition: commands.cpp:1202
void execute_start_peace_offer(sys::state &state, dcon::nation_id source, dcon::nation_id target, dcon::war_id war, bool is_concession)
Definition: commands.cpp:2850
bool can_decrease_relations(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:365
bool can_move_capital(sys::state &state, dcon::nation_id source, dcon::province_id p)
Definition: commands.cpp:4384
void set_national_focus(sys::state &state, dcon::nation_id source, dcon::state_instance_id target_state, dcon::national_focus_id focus)
Definition: commands.cpp:107
bool can_start_peace_offer(sys::state &state, dcon::nation_id source, dcon::nation_id target, dcon::war_id war, bool is_concession)
Definition: commands.cpp:2809
bool can_notify_player_kick(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:4599
bool can_toggle_select_province(sys::state &state, dcon::nation_id source, dcon::province_id prov)
Definition: commands.cpp:3769
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)
Definition: commands.cpp:679
void execute_remove_from_sphere(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
Definition: commands.cpp:1503
bool can_evenly_split_navy(sys::state &state, dcon::nation_id source, dcon::navy_id a)
Definition: commands.cpp:3939
void execute_send_crisis_peace_offer(sys::state &state, dcon::nation_id source)
Definition: commands.cpp:3115
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)
Definition: commands.cpp:2990
void retreat_from_naval_battle(sys::state &state, dcon::nation_id source, dcon::naval_battle_id b)
Definition: commands.cpp:4201
void execute_increase_opinion(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target)
Definition: commands.cpp:1301
bool can_disband_undermanned_regiments(sys::state &state, dcon::nation_id source, dcon::army_id a)
Definition: commands.cpp:3668
bool can_take_sides_in_crisis(sys::state &state, dcon::nation_id source, bool join_attacker)
Definition: commands.cpp:1953
bool can_change_stockpile_settings(sys::state &state, dcon::nation_id source, dcon::commodity_id c, float target_amount, bool draw_on_stockpiles)
Definition: commands.cpp:1992
void disband_undermanned_regiments(sys::state &state, dcon::nation_id source, dcon::army_id a)
Definition: commands.cpp:3660
bool can_take_decision(sys::state &state, dcon::nation_id source, dcon::decision_id d)
Definition: commands.cpp:2023
void enact_reform(sys::state &state, dcon::nation_id source, dcon::reform_option_id r)
Definition: commands.cpp:1854
bool can_make_leader(sys::state &state, dcon::nation_id source, bool general)
Definition: commands.cpp:222
bool can_send_peace_offer(sys::state &state, dcon::nation_id source)
Definition: commands.cpp:3065
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)
Definition: commands.cpp:752
void execute_add_to_peace_offer(sys::state &state, dcon::nation_id source, dcon::wargoal_id goal)
Definition: commands.cpp:2985
bool can_make_vassal(sys::state &state, dcon::nation_id source, dcon::national_identity_id t)
Definition: commands.cpp:878
bool can_merge_navies(sys::state &state, dcon::nation_id source, dcon::navy_id a, dcon::navy_id b)
Definition: commands.cpp:3613
void notify_console_command(sys::state &state)
Definition: commands.cpp:3816
bool can_discredit_advisors(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
Definition: commands.cpp:1057
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)
Definition: commands.cpp:3005
bool can_cancel_naval_unit_construction(sys::state &state, dcon::nation_id source, dcon::province_id location, dcon::unit_type_id type)
Definition: commands.cpp:728
bool can_remove_from_sphere(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
Definition: commands.cpp:1470
void execute_cancel_alliance(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:2598
bool can_retreat_from_naval_battle(sys::state &state, dcon::nation_id source, dcon::naval_battle_id b)
Definition: commands.cpp:4209
bool can_change_budget_settings(sys::state &state, dcon::nation_id source, budget_settings_data const &values)
Definition: commands.cpp:941
bool can_become_interested_in_crisis(sys::state &state, dcon::nation_id source)
Definition: commands.cpp:1910
bool can_split_navy(sys::state &state, dcon::nation_id source, dcon::navy_id a)
Definition: commands.cpp:4042
bool can_decrease_opinion(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
Definition: commands.cpp:1331
command_type
Definition: commands.hpp:9
bool can_suppress_movement(sys::state &state, dcon::nation_id source, dcon::movement_id m)
Definition: commands.cpp:1779
bool can_fabricate_cb(sys::state &state, dcon::nation_id source, dcon::nation_id target, dcon::cb_type_id type)
Definition: commands.cpp:2147
bool can_delete_navy(sys::state &state, dcon::nation_id source, dcon::navy_id a)
Definition: commands.cpp:4110
void use_province_button(sys::state &state, dcon::nation_id source, dcon::gui_def_id d, dcon::province_id i)
Definition: commands.cpp:4414
bool can_split_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
Definition: commands.cpp:3994
bool can_invest_in_colony(sys::state &state, dcon::nation_id source, dcon::province_id p)
Definition: commands.cpp:1562
bool can_chat_message(sys::state &state, dcon::nation_id source, std::string_view body, dcon::nation_id target)
Definition: commands.cpp:4496
bool can_cancel_alliance(sys::state &state, dcon::nation_id source, dcon::nation_id target, bool ignore_cost)
Definition: commands.cpp:2578
bool can_notify_player_ban(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:4568
void evenly_split_navy(sys::state &state, dcon::nation_id source, dcon::navy_id a)
Definition: commands.cpp:3931
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)
Definition: commands.cpp:2621
bool can_embark_army(sys::state &state, dcon::nation_id source, dcon::army_id a)
Definition: commands.cpp:3502
bool can_toggle_interested_in_alliance(sys::state &state, dcon::nation_id asker, dcon::nation_id target)
Definition: commands.cpp:2352
void add_to_peace_offer(sys::state &state, dcon::nation_id source, dcon::wargoal_id goal)
Definition: commands.cpp:2919
bool can_use_nation_button(sys::state &state, dcon::nation_id source, dcon::gui_def_id d, dcon::nation_id n)
Definition: commands.cpp:4448
bool can_merge_armies(sys::state &state, dcon::nation_id source, dcon::army_id a, dcon::army_id b)
Definition: commands.cpp:3558
bool can_finish_colonization(sys::state &state, dcon::nation_id source, dcon::province_id p)
Definition: commands.cpp:1631
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)
Definition: commands.cpp:2658
std::vector< dcon::province_id > can_move_navy(sys::state &state, dcon::nation_id source, dcon::navy_id n, dcon::province_id dest)
Definition: commands.cpp:3398
void make_event_choice(sys::state &state, event::pending_human_n_event const &e, uint8_t option_id)
Definition: commands.cpp:2058
bool can_notify_player_picks_nation(sys::state &state, dcon::nation_id source, dcon::nation_id target)
Definition: commands.cpp:4630
bool can_perform_command(sys::state &state, payload &c)
Definition: commands.cpp:4806
bool can_enact_issue(sys::state &state, dcon::nation_id source, dcon::issue_option_id i)
Definition: commands.cpp:1886
bool can_change_influence_priority(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, uint8_t priority)
Definition: commands.cpp:1020
bool can_cancel_given_military_access(sys::state &state, dcon::nation_id source, dcon::nation_id target, bool ignore_cost)
Definition: commands.cpp:2539
bool can_toggle_immigrator_province(sys::state &state, dcon::nation_id source, dcon::province_id prov)
Definition: commands.cpp:3788
void execute_pending_commands(sys::state &state)
Definition: commands.cpp:5524
void execute_decrease_opinion(sys::state &state, dcon::nation_id source, dcon::nation_id influence_target, dcon::nation_id affected_gp)
Definition: commands.cpp:1375
bool can_ask_for_alliance(sys::state &state, dcon::nation_id asker, dcon::nation_id target, bool ignore_cost)
Definition: commands.cpp:2297
void execute_command(sys::state &state, payload &c)
Definition: commands.cpp:5158
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)
Definition: commands.cpp:620
void execute_ask_for_alliance(sys::state &state, dcon::nation_id asker, dcon::nation_id target)
Definition: commands.cpp:2329
std::vector< dcon::province_id > can_move_army(sys::state &state, dcon::nation_id source, dcon::army_id a, dcon::province_id dest)
Definition: commands.cpp:3166
province_building_type
Definition: constants.hpp:578
slot_type
Definition: events.hpp:11
constexpr uint32_t max_chat_message_len
Definition: constants.hpp:586
uint uint32_t
uchar uint8_t
sys::checksum_key checksum
Definition: commands.hpp:439
dcon::province_id dest
Definition: commands.hpp:367
dcon::nation_id target
Definition: commands.hpp:283
dcon::nation_id target
Definition: commands.hpp:431
char body[ui::max_chat_message_len]
Definition: commands.hpp:430
dcon::nation_id as
Definition: commands.hpp:422
dcon::invention_id invention
Definition: commands.hpp:426
dcon::province_id prov
Definition: commands.hpp:215
dcon::national_identity_id cb_tag
Definition: commands.hpp:351
dcon::state_definition_id cb_state
Definition: commands.hpp:350
dcon::nation_id cb_secondary_nation
Definition: commands.hpp:352
dcon::decision_id d
Definition: commands.hpp:268
dcon::nation_id target
Definition: commands.hpp:167
dcon::state_instance_id location
Definition: commands.hpp:161
dcon::factory_type_id type
Definition: commands.hpp:162
dcon::province_id location
Definition: commands.hpp:190
dcon::factory_type_id type
Definition: commands.hpp:191
dcon::nation_id influence_target
Definition: commands.hpp:201
dcon::nation_id influence_target
Definition: commands.hpp:206
dcon::issue_option_id r
Definition: commands.hpp:233
dcon::land_battle_id b
Definition: commands.hpp:402
dcon::nation_id from
Definition: commands.hpp:272
diplomatic_message::type type
Definition: commands.hpp:273
dcon::national_identity_id tag
Definition: commands.hpp:221
dcon::issue_option_id iopt
Definition: commands.hpp:220
dcon::nation_id target
Definition: commands.hpp:435
dcon::national_focus_id focus
Definition: commands.hpp:140
dcon::state_instance_id target_state
Definition: commands.hpp:139
dcon::naval_battle_id b
Definition: commands.hpp:398
dcon::province_id dest
Definition: commands.hpp:373
dcon::gui_def_id button
Definition: commands.hpp:134
dcon::nation_id id
Definition: commands.hpp:135
dcon::nation_id target
Definition: commands.hpp:357
dcon::nation_id target
Definition: commands.hpp:330
dcon::cb_type_id primary_cb
Definition: commands.hpp:334
dcon::state_definition_id cb_state
Definition: commands.hpp:331
dcon::national_identity_id cb_tag
Definition: commands.hpp:332
dcon::nation_id cb_secondary_nation
Definition: commands.hpp:333
dcon::cb_type_id cb_type
Definition: commands.hpp:344
dcon::state_definition_id cb_state
Definition: commands.hpp:340
dcon::nation_id target
Definition: commands.hpp:339
dcon::nation_id cb_secondary_nation
Definition: commands.hpp:342
dcon::national_identity_id cb_tag
Definition: commands.hpp:341
sys::checksum_key checksum
Definition: commands.hpp:449
command_type type
Definition: commands.hpp:521
union command::payload::dtype data
dcon::nation_id source
Definition: commands.hpp:520
dcon::gui_def_id button
Definition: commands.hpp:130
dcon::province_id id
Definition: commands.hpp:131
dcon::free_national_event_id e
Definition: commands.hpp:302
dcon::free_provincial_event_id e
Definition: commands.hpp:319
dcon::national_event_id e
Definition: commands.hpp:293
dcon::provincial_event_id e
Definition: commands.hpp:310
dcon::political_party_id p
Definition: commands.hpp:225
dcon::province_id location
Definition: commands.hpp:156
economy::province_building_type type
Definition: commands.hpp:157
dcon::province_id location
Definition: commands.hpp:177
dcon::reform_option_id r
Definition: commands.hpp:229
dcon::regiment_id regs[num_packed_units]
Definition: commands.hpp:408
dcon::ship_id ships[num_packed_units]
Definition: commands.hpp:411
dcon::technology_id tech
Definition: commands.hpp:144
dcon::state_definition_id state
Definition: commands.hpp:279
dcon::national_identity_id ident
Definition: commands.hpp:197
save_game_data save_game
Definition: commands.hpp:509
war_target_data war_target
Definition: commands.hpp:471
influence_priority_data influence_priority
Definition: commands.hpp:469
rally_point_data rally_point
Definition: commands.hpp:505
new_general_data new_general
Definition: commands.hpp:501
pending_human_p_event_data pending_human_p_event
Definition: commands.hpp:481
call_to_arms_data call_to_arms
Definition: commands.hpp:486
naval_battle_data naval_battle
Definition: commands.hpp:498
pending_human_f_p_event_data pending_human_f_p_event
Definition: commands.hpp:482
army_movement_data army_movement
Definition: commands.hpp:492
generic_location_data generic_location
Definition: commands.hpp:470
cheat_location_data cheat_location
Definition: commands.hpp:513
budget_settings_data budget_data
Definition: commands.hpp:467
split_regiments_data split_regiments
Definition: commands.hpp:496
new_admiral_data new_admiral
Definition: commands.hpp:502
split_ships_data split_ships
Definition: commands.hpp:497
land_battle_data land_battle
Definition: commands.hpp:499
cheat_event_data cheat_event
Definition: commands.hpp:507
nation_pick_data nation_pick
Definition: commands.hpp:503
state_transfer_data state_transfer
Definition: commands.hpp:485
national_focus_data nat_focus
Definition: commands.hpp:457
message_data message
Definition: commands.hpp:484
influence_action_data influence_action
Definition: commands.hpp:468
crisis_invitation_data crisis_invitation
Definition: commands.hpp:500
pending_human_f_n_event_data pending_human_f_n_event
Definition: commands.hpp:480
naval_unit_construction_data naval_unit_construction
Definition: commands.hpp:463
movement_data movement
Definition: commands.hpp:472
new_war_goal_data new_war_goal
Definition: commands.hpp:488
cheat_data_int cheat_int
Definition: commands.hpp:506
province_building_data start_province_building
Definition: commands.hpp:460
crisis_join_data crisis_join
Definition: commands.hpp:476
chat_message_data chat_message
Definition: commands.hpp:504
factory_data factory
Definition: commands.hpp:466
political_party_data political_party
Definition: commands.hpp:473
new_offer_data new_offer
Definition: commands.hpp:489
pending_human_n_event_data pending_human_n_event
Definition: commands.hpp:479
diplo_action_data diplo_action
Definition: commands.hpp:461
nbutton_data nbutton
Definition: commands.hpp:515
new_war_data new_war
Definition: commands.hpp:487
stockpile_settings_data stockpile_settings
Definition: commands.hpp:477
notify_reload_data notify_reload
Definition: commands.hpp:511
advance_tick_data advance_tick
Definition: commands.hpp:508
navy_movement_data navy_movement
Definition: commands.hpp:493
factory_building_data start_factory_building
Definition: commands.hpp:462
land_unit_construction_data land_unit_construction
Definition: commands.hpp:464
make_leader_data make_leader
Definition: commands.hpp:459
notify_save_loaded_data notify_save_loaded
Definition: commands.hpp:510
offer_wargoal_data offer_wargoal
Definition: commands.hpp:490
tag_target_data tag_target
Definition: commands.hpp:465
start_research_data start_research
Definition: commands.hpp:458
cb_fabrication_data cb_fabrication
Definition: commands.hpp:483
notify_leaves_data notify_leave
Definition: commands.hpp:514
cheat_invention_data_t cheat_invention_data
Definition: commands.hpp:517
decision_data decision
Definition: commands.hpp:478
merge_navy_data merge_navy
Definition: commands.hpp:495
reform_selection_data reform_selection
Definition: commands.hpp:474
sys::player_name player_name
Definition: commands.hpp:512
merge_army_data merge_army
Definition: commands.hpp:494
pbutton_data pbutton
Definition: commands.hpp:516
issue_selection_data issue_selection
Definition: commands.hpp:475