Project Alice
Loading...
Searching...
No Matches
parsers_declarations.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <stdint.h>
4#include <optional>
5#include <string_view>
6#include <string>
7
8#include "constants.hpp"
9#include "parsers.hpp"
10#include "unordered_dense.h"
11#include "gui_graphics.hpp"
12#include "modifiers.hpp"
13#include "culture.hpp"
14#include "date_interface.hpp"
15#include "script_constants.hpp"
16#include "container_types.hpp"
17#include "military.hpp"
18#include "nations.hpp"
19
20namespace parsers {
21
22//
23// structures and functions for parsing .gfx files
24//
25std::string lowercase_str(std::string_view sv);
26
28 std::string original_file;
30 dcon::gui_def_id button_element;
31};
32
36 std::vector<simple_fs::file> gui_files;
37 ankerl::unordered_dense::map<std::string, dcon::gfx_object_id> map_of_names;
38 ankerl::unordered_dense::map<std::string, dcon::texture_id> map_of_texture_names;
39 std::vector<pending_button_script> province_buttons_allow;
40 std::vector<pending_button_script> nation_buttons_allow;
41 std::vector<pending_button_script> province_buttons_effect;
42 std::vector<pending_button_script> nation_buttons_effect;
43 bool on_second_pair_y = false;
45};
46
48 int32_t x = 0;
49 int32_t y = 0;
50
51 void free_value(int32_t v, error_handler& err, int32_t line, building_gfx_context& context) {
52 if(context.on_second_pair_y) {
53 if(y != 0) {
54 err.accumulated_errors += "More than 2 elements for pair " + err.file_name + " line " + std::to_string(line) + "\n";
55 }
56 y = v;
57 } else {
58 x = v;
59 context.on_second_pair_y = true;
60 }
61 }
63 context.on_second_pair_y = false;
64 }
65};
66
67struct gfx_object {
68 std::optional<int32_t> size;
69 std::optional<gfx_xy_pair> size_obj;
70 std::optional<gfx_xy_pair> bordersize;
71 std::string_view name;
72 std::string_view primary_texture;
73 std::string_view secondary_texture;
74
75 int32_t noofframes = 1;
76
77 bool horizontal = true;
78 bool allwaystransparent = false;
79 bool flipv = false;
80 bool clicksound_set = false;
81 bool transparencecheck = false;
82
83 void clicksound(parsers::association_type, std::string_view, parsers::error_handler& err, int32_t line,
84 building_gfx_context& context) {
85 clicksound_set = true;
86 }
87
88 void finish(building_gfx_context& context) { }
89};
90
92 void spritetype(gfx_object const& obj, parsers::error_handler& err, int32_t line, building_gfx_context& context);
93 void corneredtilespritetype(gfx_object const& obj, parsers::error_handler& err, int32_t line, building_gfx_context& context);
94 void maskedshieldtype(gfx_object const& obj, parsers::error_handler& err, int32_t line, building_gfx_context& context);
95 void textspritetype(gfx_object const& obj, parsers::error_handler& err, int32_t line, building_gfx_context& context);
96 void tilespritetype(gfx_object const& obj, parsers::error_handler& err, int32_t line, building_gfx_context& context);
97 void progressbartype(gfx_object const& obj, parsers::error_handler& err, int32_t line, building_gfx_context& context);
98 void barcharttype(gfx_object const& obj, parsers::error_handler& err, int32_t line, building_gfx_context& context);
99 void piecharttype(gfx_object const& obj, parsers::error_handler& err, int32_t line, building_gfx_context& context);
100 void linecharttype(gfx_object const& obj, parsers::error_handler& err, int32_t line, building_gfx_context& context);
101
102 void finish(building_gfx_context const& context) { }
103};
104
105void gfx_add_obj(parsers::token_generator& gen, parsers::error_handler& err, building_gfx_context& context);
106
107struct gfx_files {
108 void finish(building_gfx_context& context) { }
109};
110
111//
112// structures and functions for parsing .gui files
113//
114
117 dcon::text_key extension;
118
120 void size(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
121 void position(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
122 void orientation(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
123 void name(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
124 void extends(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
125 void rotation(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
126 void maxwidth(association_type, int32_t v, error_handler& err, int32_t line, building_gfx_context& context);
127 void maxheight(association_type, int32_t v, error_handler& err, int32_t line, building_gfx_context& context);
128 void maxsize(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
129 void add_size(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
130 void add_position(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
131 void table_layout(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
132 void finish(building_gfx_context& context) { }
133};
134
135struct button : public gui_element_common {
136 button();
137 void spritetype(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
138 void shortcut(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
139 void buttontext(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
140 void buttonfont(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
141 void format(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
142 void clicksound(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
143};
144
146 int32_t added_allow = -1;
147 int32_t added_effect = -1;
148 void allow(bool, error_handler& err, int32_t line, building_gfx_context& context);
149 void effect(bool, error_handler& err, int32_t line, building_gfx_context& context);
150};
151
153 int32_t added_allow = -1;
154 int32_t added_effect = -1;
155 void allow(bool, error_handler& err, int32_t line, building_gfx_context& context);
156 void effect(bool, error_handler& err, int32_t line, building_gfx_context& context);
157};
158
163
164struct image : public gui_element_common {
165 image();
166 void frame(association_type, uint32_t v, error_handler& err, int32_t line, building_gfx_context& context);
167 void spritetype(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
168 void scale(association_type, float v, error_handler& err, int32_t line, building_gfx_context& context);
169};
170
172 textbox();
173 void bordersize(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
174 void fixedsize(association_type, bool v, error_handler& err, int32_t line, building_gfx_context& context);
175 void font(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
176 void format(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
177 void text(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
178 void texturefile(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
179};
180
182 listbox();
183 void background(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
184 void bordersize(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
185 void offset(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
186 void spacing(association_type, uint32_t v, error_handler& err, int32_t line, building_gfx_context& context);
187};
188
190 overlapping();
191 void format(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
192 void spacing(association_type, float v, error_handler& err, int32_t line, building_gfx_context& context);
193};
194
196 std::vector<ui::element_data> children;
197 std::string_view leftbutton_;
198 std::string_view rightbutton_;
199 std::string_view rangelimitmaxicon_;
200 std::string_view rangelimitminicon_;
201 std::string_view track_;
202 std::string_view slider_;
203
204 scrollbar();
205 void horizontal(association_type, bool v, error_handler& err, int32_t line, building_gfx_context& context);
206 void leftbutton(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
207 void rightbutton(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
208 void lockable(association_type, bool v, error_handler& err, int32_t line, building_gfx_context& context);
209 void maxvalue(association_type, uint32_t v, error_handler& err, int32_t line, building_gfx_context& context);
210 void rangelimitmaxicon(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
211 void rangelimitminicon(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
212 void slider(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
213 void track(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
214 void stepsize(association_type, std::string_view txt, error_handler& err, int32_t line, building_gfx_context& context);
215 void userangelimit(association_type, bool v, error_handler& err, int32_t line, building_gfx_context& context);
216 void bordersize(gfx_xy_pair const& pr, error_handler& err, int32_t line, building_gfx_context& context);
217 void guibuttontype(button const& v, error_handler& err, int32_t line, building_gfx_context& context);
218 void icontype(image const& v, error_handler& err, int32_t line, building_gfx_context& context);
219 void finish(building_gfx_context& context);
220};
221
222struct window : public gui_element_common {
225 int32_t pallow = -1;
226 int32_t peffect = -1;
227 int32_t nallow = -1;
228 int32_t neffect = -1;
229 };
230 std::vector<ui::element_data> children;
231 std::vector<scripted_children> sc;
232 window();
233 void fullscreen(association_type, bool v, error_handler& err, int32_t line, building_gfx_context& context);
234 void moveable(association_type, bool v, error_handler& err, int32_t line, building_gfx_context& context);
235 void guibuttontype(button const& v, error_handler& err, int32_t line, building_gfx_context& context);
236 void icontype(image const& v, error_handler& err, int32_t line, building_gfx_context& context);
237 void eu3dialogtype(window const& v, error_handler& err, int32_t line, building_gfx_context& context);
238 void instanttextboxtype(textbox const& v, error_handler& err, int32_t line, building_gfx_context& context);
239 void listboxtype(listbox const& v, error_handler& err, int32_t line, building_gfx_context& context);
240 void positiontype(gui_element_common const& v, error_handler& err, int32_t line, building_gfx_context& context);
241 void scrollbartype(scrollbar const& v, error_handler& err, int32_t line, building_gfx_context& context);
242 void windowtype(window const& v, error_handler& err, int32_t line, building_gfx_context& context);
243 void checkboxtype(button const& v, error_handler& err, int32_t line, building_gfx_context& context);
244 void shieldtype(image const& v, error_handler& err, int32_t line, building_gfx_context& context);
245 void overlappingelementsboxtype(overlapping const& v, error_handler& err, int32_t line, building_gfx_context& context);
246 void editboxtype(textbox const& v, error_handler& err, int32_t line, building_gfx_context& context);
247 void textboxtype(textbox const& v, error_handler& err, int32_t line, building_gfx_context& context);
248 void provincescriptbuttontype(province_script_button const& v, error_handler& err, int32_t line, building_gfx_context& context);
249 void nationscriptbuttontype(nation_script_button const& v, error_handler& err, int32_t line, building_gfx_context& context);
250 void finish(building_gfx_context& context);
251};
252
253struct guitypes {
254 void finish(building_gfx_context& context) { }
255 void guibuttontype(button const& v, error_handler& err, int32_t line, building_gfx_context& context);
256 void icontype(image const& v, error_handler& err, int32_t line, building_gfx_context& context);
257 void eu3dialogtype(window const& v, error_handler& err, int32_t line, building_gfx_context& context);
258 void instanttextboxtype(textbox const& v, error_handler& err, int32_t line, building_gfx_context& context);
259 void listboxtype(listbox const& v, error_handler& err, int32_t line, building_gfx_context& context);
260 void positiontype(gui_element_common const& v, error_handler& err, int32_t line, building_gfx_context& context);
261 void scrollbartype(scrollbar const& v, error_handler& err, int32_t line, building_gfx_context& context);
262 void windowtype(window const& v, error_handler& err, int32_t line, building_gfx_context& context);
263 void checkboxtype(button const& v, error_handler& err, int32_t line, building_gfx_context& context);
264 void shieldtype(image const& v, error_handler& err, int32_t line, building_gfx_context& context);
265 void overlappingelementsboxtype(overlapping const& v, error_handler& err, int32_t line, building_gfx_context& context);
266 void editboxtype(textbox const& v, error_handler& err, int32_t line, building_gfx_context& context);
267 void textboxtype(textbox const& v, error_handler& err, int32_t line, building_gfx_context& context);
268 void provincescriptbuttontype(province_script_button const& v, error_handler& err, int32_t line, building_gfx_context& context);
269 void nationscriptbuttontype(nation_script_button const& v, error_handler& err, int32_t line, building_gfx_context& context);
270};
271struct gui_files {
272 void finish(building_gfx_context& context) { }
273};
274
277 dcon::ideology_id id;
278};
281 dcon::issue_option_id id;
282};
285 dcon::reform_option_id id;
286};
289 dcon::cb_type_id id;
290};
293 dcon::crime_id id;
294};
298};
301 dcon::rebel_type_id id;
302};
303
305 int32_t id = 0; // original
306 bool is_sea = false;
307};
309 dcon::modifier_id id;
311};
314 dcon::technology_id id;
315};
318 dcon::invention_id id;
319};
321 std::string original_file;
322 dcon::national_event_id id;
327 bool text_assigned = false;
328 bool processed = false;
330
331 pending_nat_event() = default;
343};
345 dcon::stored_trigger_id id;
349};
351 std::string original_file;
352 dcon::provincial_event_id id;
357 bool text_assigned = false;
358 bool processed = false;
360
373};
376
378 ankerl::unordered_dense::map<uint32_t, dcon::national_identity_id> map_of_ident_names;
380
381 ankerl::unordered_dense::map<std::string, dcon::religion_id> map_of_religion_names;
382 ankerl::unordered_dense::map<std::string, dcon::culture_id> map_of_culture_names;
383 ankerl::unordered_dense::map<std::string, dcon::culture_group_id> map_of_culture_group_names;
384 ankerl::unordered_dense::map<std::string, dcon::commodity_id> map_of_commodity_names;
385 ankerl::unordered_dense::map<std::string, dcon::factory_type_id> map_of_production_types;
386 ankerl::unordered_dense::map<std::string, dcon::factory_type_id> map_of_factory_names;
387 ankerl::unordered_dense::map<std::string, pending_ideology_content> map_of_ideologies;
388 ankerl::unordered_dense::map<std::string, dcon::ideology_group_id> map_of_ideology_groups;
389 ankerl::unordered_dense::map<std::string, pending_option_content> map_of_ioptions;
390 ankerl::unordered_dense::map<std::string, pending_roption_content> map_of_roptions;
391 ankerl::unordered_dense::map<std::string, dcon::issue_id> map_of_iissues;
392 ankerl::unordered_dense::map<std::string, dcon::reform_id> map_of_reforms;
393 ankerl::unordered_dense::map<std::string, dcon::government_type_id> map_of_governments;
394 ankerl::unordered_dense::map<std::string, pending_cb_content> map_of_cb_types;
395 ankerl::unordered_dense::map<std::string, dcon::leader_trait_id> map_of_leader_traits;
396 ankerl::unordered_dense::map<std::string, pending_crime_content> map_of_crimes;
397 std::vector<pending_triggered_modifier_content> set_of_triggered_modifiers;
398 ankerl::unordered_dense::map<std::string, dcon::modifier_id> map_of_modifiers;
399 ankerl::unordered_dense::map<std::string, dcon::pop_type_id> map_of_poptypes;
400 ankerl::unordered_dense::map<std::string, pending_rebel_type_content> map_of_rebeltypes;
401 ankerl::unordered_dense::map<std::string, terrain_type> map_of_terrain_types;
402 ankerl::unordered_dense::map<std::string, int32_t> map_of_tech_folders;
403 ankerl::unordered_dense::map<std::string, pending_tech_content> map_of_technologies;
404 ankerl::unordered_dense::map<std::string, pending_invention_content> map_of_inventions;
405 ankerl::unordered_dense::map<std::string, dcon::unit_type_id> map_of_unit_types;
406 ankerl::unordered_dense::map<std::string, dcon::national_variable_id> map_of_national_variables;
407 ankerl::unordered_dense::map<std::string, dcon::national_flag_id> map_of_national_flags;
408 ankerl::unordered_dense::map<std::string, dcon::global_flag_id> map_of_global_flags;
409 ankerl::unordered_dense::map<std::string, dcon::state_definition_id> map_of_state_names;
410 ankerl::unordered_dense::map<std::string, dcon::region_id> map_of_region_names;
411 ankerl::unordered_dense::map<int32_t, pending_nat_event> map_of_national_events;
412 ankerl::unordered_dense::map<int32_t, pending_prov_event> map_of_provincial_events;
413 ankerl::unordered_dense::map<std::string, dcon::leader_images_id> map_of_leader_graphics;
414 ankerl::unordered_dense::map<std::string, std::vector<saved_stored_condition>> map_of_stored_triggers;
415 ankerl::unordered_dense::map<std::string, dcon::national_focus_id> map_of_national_focuses;
416
418 std::vector<dcon::province_id> original_id_to_prov_id_map;
419
420 ankerl::unordered_dense::map<uint32_t, dcon::province_id> map_color_to_province_id;
421
422 std::optional<simple_fs::file> ideologies_file;
423 std::optional<simple_fs::file> issues_file;
424 std::optional<simple_fs::file> cb_types_file;
425 std::optional<simple_fs::file> crimes_file;
426 std::optional<simple_fs::file> triggered_modifiers_file;
427 std::optional<simple_fs::file> rebel_types_file;
428 std::vector<simple_fs::file> tech_and_invention_files;
429
430 std::vector<dcon::province_id> special_impassible;
431
432 dcon::text_key noimage;
433
434 dcon::modifier_id modifier_by_terrain_index[64] = {}; // these are the given mappings from the raw palette index to terrain type
436 0}; // these are the (packed) colors given for the terrain type modifier at the given palette index
437 dcon::modifier_id ocean_terrain;
438
440
441 dcon::national_variable_id get_national_variable(std::string const& name);
442 dcon::national_flag_id get_national_flag(std::string const& name);
443 dcon::global_flag_id get_global_flag(std::string const& name);
444
447 bool new_maps = false;
448 bool money_set = false;
449};
450
452 void any_value(std::string_view tag, association_type, std::string_view txt, error_handler& err, int32_t line,
455};
456
459 template<typename T>
460 void free_value(float v, error_handler& err, int32_t line, T& context) {
461 value = (value >> 8) | (uint32_t(v * 255.0f) << 16);
462 }
463 template<typename T>
464 void finish(T& context) { }
465};
466
468 dcon::religion_id id;
470};
472 void icon(association_type, int32_t v, error_handler& err, int32_t line, religion_context& context);
473 void color(color_from_3f v, error_handler& err, int32_t line, religion_context& context);
474 void pagan(association_type, bool v, error_handler& err, int32_t line, religion_context& context);
475 void finish(religion_context& context) { }
476};
477
478void make_religion(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
479
482};
483
485 void any_group(std::string_view name, religion_group, error_handler& err, int32_t line, scenario_building_context& context) { }
487};
488
491 template<typename T>
492 void free_value(int32_t v, error_handler& err, int32_t line, T& context) {
493 value = (value >> 8) | (uint32_t(v & 0xFF) << 16);
494 }
495 template<typename T>
496 void finish(T& context) { }
497};
498
500 dcon::culture_group_id id;
502};
504 dcon::culture_id id;
506};
508 dcon::culture_id id;
509 bool first_names = false;
511};
512
513void make_culture_group(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
514void make_culture(std::string_view name, token_generator& gen, error_handler& err, culture_group_context& context);
517
519 void free_value(std::string_view text, error_handler& err, int32_t line, names_context& context);
520 void finish(names_context& context) { }
521};
522
523struct culture {
524 void color(color_from_3i v, error_handler& err, int32_t line, culture_context& context);
525 void radicalism(association_type, int32_t v, error_handler& err, int32_t line, culture_context& context);
526 void finish(culture_context& context) { }
527};
528
530 void leader(association_type, std::string_view name, error_handler& err, int32_t line, culture_group_context& context);
531 void is_overseas(association_type, bool v, error_handler& err, int32_t line, culture_group_context& context);
532 void union_tag(association_type, uint32_t v, error_handler& err, int32_t line, culture_group_context& context);
533 void finish(culture_group_context& context) { }
534};
535
538};
539
543};
545 dcon::commodity_id id;
547};
548
549struct good {
550 void money(association_type, bool v, error_handler& err, int32_t line, good_context& context);
551 void color(color_from_3i v, error_handler& err, int32_t line, good_context& context);
552 void cost(association_type, float v, error_handler& err, int32_t line, good_context& context);
553 void available_from_start(association_type, bool b, error_handler& err, int32_t line, good_context& context);
554 void overseas_penalty(association_type, bool b, error_handler& err, int32_t line, good_context& context);
555
556 void finish(good_context& context);
557};
558
559void make_good(std::string_view name, token_generator& gen, error_handler& err, good_group_context& context);
560void make_goods_group(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
561
563 void finish(good_group_context& context) { }
564};
565
568};
569
570#define MOD_PROV_FUNCTION(X) \
571 template<typename T> \
572 void X(association_type, float v, error_handler& err, int32_t line, T& context) { \
573 if(v == 0.0f) return; \
574 if(next_to_add_p >= sys::provincial_modifier_definition::modifier_definition_size) { \
575 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n"; \
576 } else { \
577 constructed_definition_p.offsets[next_to_add_p] = sys::provincial_mod_offsets::X; \
578 constructed_definition_p.values[next_to_add_p] = v; \
579 ++next_to_add_p; \
580 } \
581 }
582#define MOD_NAT_FUNCTION(X) \
583 template<typename T> \
584 void X(association_type, float v, error_handler& err, int32_t line, T& context) { \
585 if(v == 0.0f) return; \
586 if(next_to_add_n >= sys::national_modifier_definition::modifier_definition_size) { \
587 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n"; \
588 } else { \
589 constructed_definition_n.offsets[next_to_add_n] = sys::national_mod_offsets::X; \
590 constructed_definition_n.values[next_to_add_n] = v; \
591 ++next_to_add_n; \
592 } \
593 }
594
596protected:
599
600public:
604 template<typename T>
605 void icon(association_type, uint32_t v, error_handler& err, int32_t line, T& context) {
606 icon_index = uint8_t(v);
607 }
608
609 MOD_PROV_FUNCTION(supply_limit)
610 MOD_PROV_FUNCTION(attrition)
611 MOD_PROV_FUNCTION(max_attrition)
612 MOD_NAT_FUNCTION(war_exhaustion)
613 MOD_NAT_FUNCTION(max_war_exhaustion)
614 MOD_NAT_FUNCTION(leadership)
615 MOD_NAT_FUNCTION(leadership_modifier)
616 MOD_NAT_FUNCTION(supply_consumption)
617 MOD_NAT_FUNCTION(org_regain)
618 MOD_NAT_FUNCTION(reinforce_speed)
619 MOD_NAT_FUNCTION(land_organisation)
620 MOD_NAT_FUNCTION(naval_organisation)
621 MOD_NAT_FUNCTION(research_points)
622 MOD_NAT_FUNCTION(research_points_modifier)
623 MOD_NAT_FUNCTION(research_points_on_conquer)
624 MOD_NAT_FUNCTION(import_cost)
625 MOD_NAT_FUNCTION(loan_interest)
626 template<typename T>
627 void tax_efficiency(association_type, float v, error_handler& err, int32_t line, T& context) {
628 if(v == 0.0f) return;
630 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n";
631 } else {
632 constructed_definition_n.offsets[next_to_add_n] = sys::national_mod_offsets::tax_efficiency;
635 }
636 }
637 MOD_NAT_FUNCTION(min_tax)
638 MOD_NAT_FUNCTION(max_tax)
639 MOD_NAT_FUNCTION(min_military_spending)
640 MOD_NAT_FUNCTION(max_military_spending)
641 MOD_NAT_FUNCTION(min_social_spending)
642 MOD_NAT_FUNCTION(max_social_spending)
643 MOD_NAT_FUNCTION(min_domestic_investment)
644 MOD_NAT_FUNCTION(max_domestic_investment)
645 MOD_NAT_FUNCTION(factory_owner_cost)
646 MOD_NAT_FUNCTION(min_tariff)
647 MOD_NAT_FUNCTION(max_tariff)
648 MOD_NAT_FUNCTION(ruling_party_support)
649 MOD_PROV_FUNCTION(local_ruling_party_support)
650 MOD_NAT_FUNCTION(rich_vote)
651 MOD_NAT_FUNCTION(middle_vote)
652 MOD_NAT_FUNCTION(poor_vote)
653 MOD_NAT_FUNCTION(minimum_wage)
654 MOD_NAT_FUNCTION(factory_maintenance)
655 MOD_PROV_FUNCTION(poor_life_needs)
656 MOD_PROV_FUNCTION(rich_life_needs)
657 MOD_PROV_FUNCTION(middle_life_needs)
658 MOD_PROV_FUNCTION(poor_everyday_needs)
659 MOD_PROV_FUNCTION(middle_everyday_needs)
660 MOD_PROV_FUNCTION(rich_everyday_needs)
661 MOD_PROV_FUNCTION(poor_luxury_needs)
662 MOD_PROV_FUNCTION(middle_luxury_needs)
663 MOD_PROV_FUNCTION(rich_luxury_needs)
664 MOD_NAT_FUNCTION(unemployment_benefit)
665 MOD_NAT_FUNCTION(pension_level)
666 MOD_PROV_FUNCTION(population_growth)
667 template<typename T>
668 void global_population_growth(association_type, float v, error_handler& err, int32_t line, T& context) {
669 if(v == 0.0f) return;
671 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n";
672 } else {
673 constructed_definition_n.offsets[next_to_add_n] = sys::national_mod_offsets::pop_growth;
676 }
677 }
678 MOD_NAT_FUNCTION(factory_input)
679 MOD_NAT_FUNCTION(factory_output)
680 MOD_NAT_FUNCTION(factory_throughput)
681 MOD_NAT_FUNCTION(rgo_input)
682 MOD_NAT_FUNCTION(rgo_output)
683 MOD_NAT_FUNCTION(rgo_throughput)
684 MOD_NAT_FUNCTION(artisan_input)
685 MOD_NAT_FUNCTION(artisan_output)
686 MOD_NAT_FUNCTION(artisan_throughput)
687 MOD_PROV_FUNCTION(local_factory_input)
688 MOD_PROV_FUNCTION(local_factory_output)
689 MOD_PROV_FUNCTION(local_factory_throughput)
690 MOD_PROV_FUNCTION(local_rgo_input)
691 MOD_PROV_FUNCTION(local_rgo_output)
692 MOD_PROV_FUNCTION(local_rgo_throughput)
693 MOD_PROV_FUNCTION(local_artisan_input)
694 MOD_PROV_FUNCTION(local_artisan_output)
695 MOD_PROV_FUNCTION(local_artisan_throughput)
696 MOD_PROV_FUNCTION(number_of_voters)
697 MOD_PROV_FUNCTION(goods_demand)
698 MOD_NAT_FUNCTION(badboy)
699 MOD_PROV_FUNCTION(assimilation_rate)
700 MOD_NAT_FUNCTION(global_assimilation_rate)
701 MOD_NAT_FUNCTION(prestige)
702 MOD_NAT_FUNCTION(factory_cost)
703 MOD_PROV_FUNCTION(life_rating)
704 MOD_PROV_FUNCTION(farm_rgo_eff)
705 MOD_PROV_FUNCTION(mine_rgo_eff)
706 MOD_PROV_FUNCTION(farm_rgo_size)
707 MOD_PROV_FUNCTION(mine_rgo_size)
708 MOD_PROV_FUNCTION(conversion_rate)
709 MOD_NAT_FUNCTION(global_conversion_rate)
710 template<typename T>
711 void m_rgo_size(association_type, float v, error_handler& err, int32_t line, T& context) {
712 if(v == 0.0f) return;
714 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n";
715 } else {
716 constructed_definition_p.offsets[next_to_add_p] = sys::provincial_mod_offsets::farm_rgo_size;
719 }
721 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n";
722 } else {
723 constructed_definition_p.offsets[next_to_add_p] = sys::provincial_mod_offsets::mine_rgo_size;
726 }
727 }
728 MOD_NAT_FUNCTION(issue_change_speed)
729 MOD_NAT_FUNCTION(social_reform_desire)
730 MOD_NAT_FUNCTION(political_reform_desire)
731 MOD_NAT_FUNCTION(literacy_con_impact)
732 MOD_PROV_FUNCTION(pop_militancy_modifier)
733 MOD_PROV_FUNCTION(pop_consciousness_modifier)
734 MOD_PROV_FUNCTION(rich_income_modifier)
735 MOD_PROV_FUNCTION(middle_income_modifier)
736 MOD_PROV_FUNCTION(poor_income_modifier)
737 MOD_PROV_FUNCTION(boost_strongest_party)
738 MOD_NAT_FUNCTION(global_immigrant_attract)
739 template<typename T>
740 void immigration(association_type, float v, error_handler& err, int32_t line, T& context) {
741 if(v == 0.0f) return;
743 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n";
744 } else {
745 constructed_definition_p.offsets[next_to_add_p] = sys::provincial_mod_offsets::immigrant_attract;
748 }
749 }
750 MOD_PROV_FUNCTION(immigrant_attract)
751 MOD_PROV_FUNCTION(immigrant_push)
752 MOD_PROV_FUNCTION(local_repair)
753 MOD_PROV_FUNCTION(local_ship_build)
754 MOD_NAT_FUNCTION(poor_savings_modifier)
755 MOD_NAT_FUNCTION(influence_modifier)
756 MOD_NAT_FUNCTION(diplomatic_points_modifier)
757 MOD_NAT_FUNCTION(mobilization_size)
758 MOD_NAT_FUNCTION(global_pop_militancy_modifier)
759 MOD_NAT_FUNCTION(global_pop_consciousness_modifier)
760 MOD_PROV_FUNCTION(movement_cost)
761 MOD_PROV_FUNCTION(combat_width)
762 MOD_PROV_FUNCTION(min_build_naval_base)
763 MOD_PROV_FUNCTION(min_build_railroad)
764 MOD_PROV_FUNCTION(min_build_fort)
765 MOD_PROV_FUNCTION(min_build_bank)
766 MOD_PROV_FUNCTION(min_build_university)
767 MOD_PROV_FUNCTION(attack)
768 template<typename T>
769 void defender(association_type, float v, error_handler& err, int32_t line, T& context) {
770 if(v == 0.0f) return;
772 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n";
773 } else {
774 constructed_definition_p.offsets[next_to_add_p] = sys::provincial_mod_offsets::defense;
777 }
778 }
779 template<typename T>
780 void attacker(association_type, float v, error_handler& err, int32_t line, T& context) {
781 if(v == 0.0f) return;
783 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n";
784 } else {
785 constructed_definition_p.offsets[next_to_add_p] = sys::provincial_mod_offsets::attack;
788 }
789 }
790 template<typename T>
791 void defence(association_type, float v, error_handler& err, int32_t line, T& context) {
792 if(v == 0.0f) return;
794 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n";
795 } else {
796 constructed_definition_p.offsets[next_to_add_p] = sys::provincial_mod_offsets::defense;
799 }
800 }
801 MOD_NAT_FUNCTION(core_pop_militancy_modifier)
802 MOD_NAT_FUNCTION(core_pop_consciousness_modifier)
803 MOD_NAT_FUNCTION(non_accepted_pop_militancy_modifier)
804 MOD_NAT_FUNCTION(seperatism)
805 MOD_NAT_FUNCTION(non_accepted_pop_consciousness_modifier)
806 MOD_NAT_FUNCTION(cb_generation_speed_modifier)
807 MOD_NAT_FUNCTION(mobilization_impact)
808 MOD_NAT_FUNCTION(suppression_points_modifier)
809 MOD_NAT_FUNCTION(education_efficiency_modifier)
810 MOD_NAT_FUNCTION(civilization_progress_modifier)
811 MOD_NAT_FUNCTION(administrative_efficiency_modifier)
812 MOD_NAT_FUNCTION(land_unit_start_experience)
813 MOD_NAT_FUNCTION(naval_unit_start_experience)
814 MOD_NAT_FUNCTION(naval_attack_modifier)
815 MOD_NAT_FUNCTION(naval_defense_modifier)
816 MOD_NAT_FUNCTION(land_attack_modifier)
817 MOD_NAT_FUNCTION(land_defense_modifier)
818 MOD_NAT_FUNCTION(tariff_efficiency_modifier)
819 MOD_NAT_FUNCTION(max_loan_modifier)
820 MOD_NAT_FUNCTION(unciv_economic_modifier)
821 MOD_NAT_FUNCTION(unciv_military_modifier)
822 MOD_NAT_FUNCTION(self_unciv_economic_modifier)
823 MOD_NAT_FUNCTION(self_unciv_military_modifier)
824 MOD_NAT_FUNCTION(commerce_tech_research_bonus)
825 MOD_NAT_FUNCTION(army_tech_research_bonus)
826 MOD_NAT_FUNCTION(industry_tech_research_bonus)
827 MOD_NAT_FUNCTION(navy_tech_research_bonus)
828 MOD_NAT_FUNCTION(culture_tech_research_bonus)
829 MOD_NAT_FUNCTION(colonial_migration)
830 MOD_NAT_FUNCTION(max_national_focus)
831 MOD_NAT_FUNCTION(education_efficiency)
832 MOD_NAT_FUNCTION(reinforce_rate)
833 MOD_NAT_FUNCTION(influence)
834 MOD_NAT_FUNCTION(dig_in_cap)
835 MOD_NAT_FUNCTION(military_tactics)
836 MOD_NAT_FUNCTION(supply_range)
837 MOD_NAT_FUNCTION(regular_experience_level)
838 MOD_NAT_FUNCTION(permanent_prestige)
839 MOD_NAT_FUNCTION(soldier_to_pop_loss)
840 MOD_NAT_FUNCTION(naval_attrition)
841 MOD_NAT_FUNCTION(land_attrition)
842 template<typename T>
843 void pop_growth(association_type, float v, error_handler& err, int32_t line, T& context) {
844 if(v == 0.0f) return;
846 err.accumulated_errors += "Too many modifier values; " + err.file_name + " line " + std::to_string(line) + "\n";
847 } else {
848 constructed_definition_n.offsets[next_to_add_n] = sys::national_mod_offsets::pop_growth;
851 }
852 }
853 MOD_NAT_FUNCTION(colonial_life_rating)
854 MOD_NAT_FUNCTION(colonial_prestige)
855
856 template<typename T>
857 void unit_start_experience(association_type type, float v, error_handler& err, int32_t line, T& context) {
858 land_unit_start_experience(type, v, err, line, context);
859 naval_unit_start_experience(type, v, err, line, context);
860 }
861
862 MOD_NAT_FUNCTION(military_theory_tech_research_bonus)
863 MOD_NAT_FUNCTION(diplomacy_tech_research_bonus)
864 MOD_NAT_FUNCTION(population_tech_research_bonus)
865 MOD_NAT_FUNCTION(flavor_tech_research_bonus)
866
867 template<typename T>
868 void finish(T& context) { }
869
872 }
875 }
878 auto temp_next = next_to_add_n;
880 if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::poor_life_needs) {
882 temp.offsets[temp_next] = sys::national_mod_offsets::poor_life_needs;
883 temp.values[temp_next] = constructed_definition_p.values[i];
884 ++temp_next;
885 }
886 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::middle_life_needs) {
888 temp.offsets[temp_next] = sys::national_mod_offsets::middle_life_needs;
889 temp.values[temp_next] = constructed_definition_p.values[i];
890 ++temp_next;
891 }
892 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::rich_life_needs) {
894 temp.offsets[temp_next] = sys::national_mod_offsets::rich_life_needs;
895 temp.values[temp_next] = constructed_definition_p.values[i];
896 ++temp_next;
897 }
898 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::poor_everyday_needs) {
900 temp.offsets[temp_next] = sys::national_mod_offsets::poor_everyday_needs;
901 temp.values[temp_next] = constructed_definition_p.values[i];
902 ++temp_next;
903 }
904 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::middle_everyday_needs) {
906 temp.offsets[temp_next] = sys::national_mod_offsets::middle_everyday_needs;
907 temp.values[temp_next] = constructed_definition_p.values[i];
908 ++temp_next;
909 }
910 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::rich_everyday_needs) {
912 temp.offsets[temp_next] = sys::national_mod_offsets::rich_everyday_needs;
913 temp.values[temp_next] = constructed_definition_p.values[i];
914 ++temp_next;
915 }
916 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::poor_luxury_needs) {
918 temp.offsets[temp_next] = sys::national_mod_offsets::poor_luxury_needs;
919 temp.values[temp_next] = constructed_definition_p.values[i];
920 ++temp_next;
921 }
922 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::middle_luxury_needs) {
924 temp.offsets[temp_next] = sys::national_mod_offsets::middle_luxury_needs;
925 temp.values[temp_next] = constructed_definition_p.values[i];
926 ++temp_next;
927 }
928 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::rich_luxury_needs) {
930 temp.offsets[temp_next] = sys::national_mod_offsets::rich_luxury_needs;
931 temp.values[temp_next] = constructed_definition_p.values[i];
932 ++temp_next;
933 }
934 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::goods_demand) {
936 temp.offsets[temp_next] = sys::national_mod_offsets::goods_demand;
937 temp.values[temp_next] = constructed_definition_p.values[i];
938 ++temp_next;
939 }
940 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::farm_rgo_eff) {
942 temp.offsets[temp_next] = sys::national_mod_offsets::farm_rgo_eff;
943 temp.values[temp_next] = constructed_definition_p.values[i];
944 ++temp_next;
945 }
946 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::mine_rgo_eff) {
948 temp.offsets[temp_next] = sys::national_mod_offsets::mine_rgo_eff;
949 temp.values[temp_next] = constructed_definition_p.values[i];
950 ++temp_next;
951 }
952 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::farm_rgo_size) {
954 temp.offsets[temp_next] = sys::national_mod_offsets::farm_rgo_size;
955 temp.values[temp_next] = constructed_definition_p.values[i];
956 ++temp_next;
957 }
958 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::mine_rgo_size) {
960 temp.offsets[temp_next] = sys::national_mod_offsets::mine_rgo_size;
961 temp.values[temp_next] = constructed_definition_p.values[i];
962 ++temp_next;
963 }
964 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::rich_income_modifier) {
966 temp.offsets[temp_next] = sys::national_mod_offsets::rich_income_modifier;
967 temp.values[temp_next] = constructed_definition_p.values[i];
968 ++temp_next;
969 }
970 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::middle_income_modifier) {
972 temp.offsets[temp_next] = sys::national_mod_offsets::middle_income_modifier;
973 temp.values[temp_next] = constructed_definition_p.values[i];
974 ++temp_next;
975 }
976 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::poor_income_modifier) {
978 temp.offsets[temp_next] = sys::national_mod_offsets::poor_income_modifier;
979 temp.values[temp_next] = constructed_definition_p.values[i];
980 ++temp_next;
981 }
982 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::combat_width) {
984 temp.offsets[temp_next] = sys::national_mod_offsets::combat_width;
985 temp.values[temp_next] = constructed_definition_p.values[i];
986 ++temp_next;
987 }
988 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::assimilation_rate) {
990 temp.offsets[temp_next] = sys::national_mod_offsets::global_assimilation_rate;
991 temp.values[temp_next] = constructed_definition_p.values[i];
992 ++temp_next;
993 }
994 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::pop_militancy_modifier) {
996 temp.offsets[temp_next] = sys::national_mod_offsets::global_pop_militancy_modifier;
997 temp.values[temp_next] = constructed_definition_p.values[i];
998 ++temp_next;
999 }
1000 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::pop_consciousness_modifier) {
1002 temp.offsets[temp_next] = sys::national_mod_offsets::global_pop_consciousness_modifier;
1003 temp.values[temp_next] = constructed_definition_p.values[i];
1004 ++temp_next;
1005 }
1006 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::supply_limit) {
1008 temp.offsets[temp_next] = sys::national_mod_offsets::supply_limit;
1009 temp.values[temp_next] = constructed_definition_p.values[i];
1010 ++temp_next;
1011 }
1012 } else if(constructed_definition_p.offsets[i] == sys::provincial_mod_offsets::conversion_rate) {
1014 temp.offsets[temp_next] = sys::national_mod_offsets::global_conversion_rate;
1015 temp.values[temp_next] = constructed_definition_p.values[i];
1016 ++temp_next;
1017 }
1018 }
1019 }
1020 return temp;
1021 }
1022};
1023
1024#undef MOD_PROV_FUNCTION
1025#undef MOD_NAT_FUNCTION
1026
1028 std::vector<int32_t> data;
1029 template<typename T>
1030 void free_value(int32_t v, error_handler& err, int32_t line, T& context) {
1031 data.push_back(v);
1032 }
1033 template<typename T>
1034 void finish(T& context) { }
1035};
1038
1039 void any_value(std::string_view name, association_type, float value, error_handler& err, int32_t line,
1040 scenario_building_context& context) {
1041 auto found_commodity = context.map_of_commodity_names.find(std::string(name));
1042 if(found_commodity != context.map_of_commodity_names.end()) {
1043 data.safe_get(found_commodity->second) = value;
1044 } else {
1045 err.accumulated_errors +=
1046 "Unknown commodity " + std::string(name) + " in file " + err.file_name + " line " + std::to_string(line) + "\n";
1047 }
1048 }
1049
1050 void finish(scenario_building_context& context);
1051};
1052
1056 bool default_enabled = false;
1057 std::string_view production_type;
1058 float infrastructure = 0.0f;
1059 int32_t colonial_range = 0;
1060 int32_t max_level = 0;
1061 int32_t naval_capacity = 0;
1062 int32_t time = 0;
1063 int32_t cost = 0;
1065
1066 void type(association_type, std::string_view value, error_handler& err, int32_t line, scenario_building_context& context);
1068};
1069
1071 void result(std::string_view name, building_definition&& res, error_handler& err, int32_t line,
1072 scenario_building_context& context);
1074};
1075
1078 dcon::ideology_group_id id;
1079};
1082};
1083
1086};
1087
1088void register_ideology(std::string_view name, token_generator& gen, error_handler& err, ideology_group_context& context);
1089void make_ideology_group(std::string_view name, token_generator& gen, error_handler& err, culture_group_context& context);
1090
1093 dcon::issue_id id;
1094};
1097 dcon::reform_id id;
1098};
1102
1105};
1106struct issue {
1107 void next_step_only(association_type, bool value, error_handler& err, int32_t line, issue_context& context);
1108 void administrative(association_type, bool value, error_handler& err, int32_t line, issue_context& context);
1110 void next_step_only(association_type, bool value, error_handler& err, int32_t line, reform_context& context);
1111 void administrative(association_type, bool value, error_handler& err, int32_t line, reform_context& context);
1113};
1116};
1119};
1120
1121void make_issues_group(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1122void make_issue(std::string_view name, token_generator& gen, error_handler& err, issue_group_context& context);
1123void register_option(std::string_view name, token_generator& gen, error_handler& err, issue_context& context);
1124void register_option(std::string_view name, token_generator& gen, error_handler& err, reform_context& context);
1125
1128 dcon::government_type_id id;
1129};
1131 void election(association_type, bool value, error_handler& err, int32_t line, government_type_context& context);
1132 void appoint_ruling_party(association_type, bool value, error_handler& err, int32_t line, government_type_context& context);
1133 void duration(association_type, int32_t value, error_handler& err, int32_t line, government_type_context& context);
1134 void flagtype(association_type, std::string_view value, error_handler& err, int32_t line, government_type_context& context);
1135 void any_value(std::string_view text, association_type, bool value, error_handler& err, int32_t line,
1136 government_type_context& context);
1137
1139};
1140
1143};
1144
1145void make_government(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1146
1147struct cb_list {
1148 void free_value(std::string_view text, error_handler& err, int32_t line, scenario_building_context& context);
1150};
1151
1152void register_cb_type(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1153
1157};
1158
1161 dcon::leader_trait_id id;
1162};
1163
1164struct trait {
1165 void organisation(association_type, float value, error_handler& err, int32_t line, trait_context& context);
1166 void morale(association_type, float value, error_handler& err, int32_t line, trait_context& context);
1167 void attack(association_type, float value, error_handler& err, int32_t line, trait_context& context);
1168 void defence(association_type, float value, error_handler& err, int32_t line, trait_context& context);
1169 void reconnaissance(association_type, float value, error_handler& err, int32_t line, trait_context& context);
1170 void speed(association_type, float value, error_handler& err, int32_t line, trait_context& context);
1171 void experience(association_type, float value, error_handler& err, int32_t line, trait_context& context);
1172 void reliability(association_type, float value, error_handler& err, int32_t line, trait_context& context);
1174};
1175
1178};
1179
1182};
1183
1184void make_trait(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1185void personality_traits_set(token_generator& gen, error_handler& err, scenario_building_context& context);
1186void background_traits_set(token_generator& gen, error_handler& err, scenario_building_context& context);
1187
1188void register_crime(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1189
1192};
1193
1197 std::string_view name;
1200};
1201
1204};
1205
1208};
1209
1210void register_trigger(token_generator& gen, error_handler& err, triggered_modifier_context& context);
1211void make_triggered_modifier(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1212
1213void make_national_value(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1214
1217};
1218
1219void m_very_easy_player(token_generator& gen, error_handler& err, scenario_building_context& context);
1220void m_easy_player(token_generator& gen, error_handler& err, scenario_building_context& context);
1221void m_hard_player(token_generator& gen, error_handler& err, scenario_building_context& context);
1222void m_very_hard_player(token_generator& gen, error_handler& err, scenario_building_context& context);
1223void m_very_easy_ai(token_generator& gen, error_handler& err, scenario_building_context& context);
1224void m_easy_ai(token_generator& gen, error_handler& err, scenario_building_context& context);
1225void m_hard_ai(token_generator& gen, error_handler& err, scenario_building_context& context);
1226void m_very_hard_ai(token_generator& gen, error_handler& err, scenario_building_context& context);
1227void m_overseas(token_generator& gen, error_handler& err, scenario_building_context& context);
1228void m_coastal(token_generator& gen, error_handler& err, scenario_building_context& context);
1229void m_non_coastal(token_generator& gen, error_handler& err, scenario_building_context& context);
1230void m_coastal_sea(token_generator& gen, error_handler& err, scenario_building_context& context);
1231void m_sea_zone(token_generator& gen, error_handler& err, scenario_building_context& context);
1232void m_land_province(token_generator& gen, error_handler& err, scenario_building_context& context);
1233void m_blockaded(token_generator& gen, error_handler& err, scenario_building_context& context);
1234void m_no_adjacent_controlled(token_generator& gen, error_handler& err, scenario_building_context& context);
1235void m_core(token_generator& gen, error_handler& err, scenario_building_context& context);
1236void m_has_siege(token_generator& gen, error_handler& err, scenario_building_context& context);
1237void m_occupied(token_generator& gen, error_handler& err, scenario_building_context& context);
1238void m_nationalism(token_generator& gen, error_handler& err, scenario_building_context& context);
1239void m_infrastructure(token_generator& gen, error_handler& err, scenario_building_context& context);
1240void m_base_values(token_generator& gen, error_handler& err, scenario_building_context& context);
1241void m_war(token_generator& gen, error_handler& err, scenario_building_context& context);
1242void m_peace(token_generator& gen, error_handler& err, scenario_building_context& context);
1243void m_disarming(token_generator& gen, error_handler& err, scenario_building_context& context);
1244void m_war_exhaustion(token_generator& gen, error_handler& err, scenario_building_context& context);
1245void m_badboy(token_generator& gen, error_handler& err, scenario_building_context& context);
1246void m_debt_default_to(token_generator& gen, error_handler& err, scenario_building_context& context);
1247void m_bad_debter(token_generator& gen, error_handler& err, scenario_building_context& context);
1248void m_great_power(token_generator& gen, error_handler& err, scenario_building_context& context);
1249void m_second_power(token_generator& gen, error_handler& err, scenario_building_context& context);
1250void m_civ_nation(token_generator& gen, error_handler& err, scenario_building_context& context);
1251void m_unciv_nation(token_generator& gen, error_handler& err, scenario_building_context& context);
1252void m_average_literacy(token_generator& gen, error_handler& err, scenario_building_context& context);
1253void m_plurality(token_generator& gen, error_handler& err, scenario_building_context& context);
1254void m_generalised_debt_default(token_generator& gen, error_handler& err, scenario_building_context& context);
1255void m_total_occupation(token_generator& gen, error_handler& err, scenario_building_context& context);
1256void m_total_blockaded(token_generator& gen, error_handler& err, scenario_building_context& context);
1257void m_in_bankrupcy(token_generator& gen, error_handler& err, scenario_building_context& context);
1258
1261};
1262
1263void make_event_modifier(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1264
1267};
1268
1269void register_rebel_type(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1270
1273};
1274
1275struct sea_list {
1276 void free_value(int32_t value, error_handler& err, int32_t line, scenario_building_context& context);
1278};
1279
1282
1283 void max_provinces(association_type, int32_t value, error_handler& err, int32_t line, scenario_building_context& context);
1285};
1286
1287void read_map_colors(char const* start, char const* end, error_handler& err, scenario_building_context& context);
1288void read_map_adjacency(char const* start, char const* end, error_handler& err, scenario_building_context& context);
1289
1293};
1294
1297};
1298
1300 int32_t free_value = 0;
1302};
1303
1305 std::string_view type;
1307 void finish(scenario_building_context& context);
1308};
1309
1314};
1315
1316void make_terrain_modifier(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1317
1320 std::vector<dcon::province_id> provinces;
1321};
1322
1324 void free_value(int32_t value, error_handler& err, int32_t line, state_def_building_context& context);
1326};
1327
1330};
1331
1332void make_state_definition(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1333
1336 dcon::modifier_id id;
1337};
1338
1340 void free_value(int32_t value, error_handler& err, int32_t line, continent_building_context& context);
1342};
1343
1346 void free_value(int32_t value, error_handler& err, int32_t line, continent_building_context& context);
1348};
1349
1352};
1353
1354void make_continent_definition(std::string_view name, token_generator& gen, error_handler& err,
1355 scenario_building_context& context);
1356
1359 dcon::modifier_id id;
1360};
1361
1363 void free_value(int32_t value, error_handler& err, int32_t line, climate_building_context& context);
1365};
1366
1369};
1370
1371void make_climate_definition(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1372
1378};
1380 void free_value(std::string_view name, error_handler& err, int32_t line, tech_group_context& context);
1382};
1385};
1388};
1393};
1396};
1397
1398void make_tech_folder_list(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1399void read_school_modifier(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1400void register_technology(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1401
1404};
1405
1406void register_invention(std::string_view name, token_generator& gen, error_handler& err, tech_group_context& context); // but not at the patent office
1407
1409 int32_t num_added = 0;
1410 void any_value(std::string_view name, association_type, float value, error_handler& err, int32_t line,
1411 scenario_building_context& context);
1412
1414};
1415
1417 void unit_type_text(association_type, std::string_view value, error_handler& err, int32_t line, scenario_building_context& context) {
1418 if(is_fixed_token_ci(value.data(), value.data() + value.length(), "support"))
1420 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "big_ship"))
1422 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "cavalry"))
1424 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "transport"))
1426 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "light_ship"))
1428 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "special"))
1430 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "infantry"))
1432 else {
1433 err.accumulated_errors += std::string(value) + " is not a valid unit type (" + err.file_name + " line " + std::to_string(line) + ")\n";
1434 }
1435 }
1436 void type_text(association_type, std::string_view value, error_handler& err, int32_t line, scenario_building_context& context) {
1437 if(is_fixed_token_ci(value.data(), value.data() + value.length(), "land")) {
1438 is_land = true;
1439 } else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "naval")) {
1440 is_land = false;
1441 } else {
1442 err.accumulated_errors += std::string(value) + " is not a valid land/naval type (" + err.file_name + " line " + std::to_string(line) + ")\n";
1443 }
1444 }
1446};
1447
1450};
1451
1452void make_base_units(scenario_building_context& context);
1453void make_unit(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1454
1457 dcon::national_identity_id id;
1458};
1459
1462 dcon::political_party_id id;
1463};
1466 dcon::national_identity_id id;
1467 dcon::unit_type_id u_id;
1468};
1469
1470struct party {
1471 dcon::trigger_key trigger;
1472 void ideology(association_type, std::string_view text, error_handler& err, int32_t line, party_context& context);
1473 void name(association_type, std::string_view text, error_handler& err, int32_t line, party_context& context);
1474 void start_date(association_type, sys::year_month_day ymd, error_handler& err, int32_t line, party_context& context);
1475 void end_date(association_type, sys::year_month_day ymd, error_handler& err, int32_t line, party_context& context);
1476 void any_value(std::string_view issue, association_type, std::string_view option, error_handler& err, int32_t line, party_context& context);
1477 void finish(party_context& context);
1478};
1480 void free_value(std::string_view text, error_handler& err, int32_t line, unit_names_context& context);
1482};
1485};
1488 void color(color_from_3i cvalue, error_handler& err, int32_t line, country_file_context& context);
1489 void template_(association_type, std::string_view value, error_handler& err, int32_t line, country_file_context& context);
1490 void any_group(std::string_view name, color_from_3i, error_handler& err, int32_t line, country_file_context& context);
1492};
1493
1494void make_party(token_generator& gen, error_handler& err, country_file_context& context);
1495void make_unit_names_list(std::string_view name, token_generator& gen, error_handler& err, country_file_context& context);
1496
1499 dcon::province_id id;
1500};
1501
1503 int32_t loyalty_value = 0;
1504 dcon::ideology_id id;
1505 void ideology(association_type, std::string_view text, error_handler& err, int32_t line, province_file_context& context) {
1506 if(auto it = context.outer_context.map_of_ideologies.find(std::string(text));
1507 it != context.outer_context.map_of_ideologies.end()) {
1508 id = it->second.id;
1509 } else {
1510 err.accumulated_errors +=
1511 std::string(text) + " is not a valid ideology name (" + err.file_name + " line " + std::to_string(line) + ")\n";
1512 }
1513 }
1515};
1517 int32_t level = 1;
1518 dcon::factory_type_id id;
1519 void building(association_type, std::string_view text, error_handler& err, int32_t line, province_file_context& context) {
1520 if(auto it = context.outer_context.map_of_factory_names.find(std::string(text));
1521 it != context.outer_context.map_of_factory_names.end()) {
1522 id = it->second;
1523 } else {
1524 err.accumulated_errors +=
1525 std::string(text) + " is not a valid factory name (" + err.file_name + " line " + std::to_string(line) + ")\n";
1526 }
1527 }
1529};
1530
1532 dcon::commodity_id trade_good_id;
1534 void max_employment(association_type, uint32_t value, error_handler& err, int32_t line, province_file_context& context);
1535 void trade_good(association_type, std::string_view text, error_handler& err, int32_t line, province_file_context& context);
1537};
1538
1540 void entry(province_rgo_ext_desc const& value, error_handler& err, int32_t line, province_file_context& context);
1542};
1543
1545 void life_rating(association_type, uint32_t value, error_handler& err, int32_t line, province_file_context& context);
1546 void colony(association_type, uint32_t value, error_handler& err, int32_t line, province_file_context& context);
1547 void trade_goods(association_type, std::string_view text, error_handler& err, int32_t line, province_file_context& context);
1548 void owner(association_type, uint32_t value, error_handler& err, int32_t line, province_file_context& context);
1549 void controller(association_type, uint32_t value, error_handler& err, int32_t line, province_file_context& context);
1550 void terrain(association_type, std::string_view text, error_handler& err, int32_t line, province_file_context& context);
1551 void add_core(association_type, uint32_t value, error_handler& err, int32_t line, province_file_context& context);
1552 void remove_core(association_type, uint32_t value, error_handler& err, int32_t line, province_file_context& context);
1553 void party_loyalty(pv_party_loyalty const& value, error_handler& err, int32_t line, province_file_context& context);
1554 void state_building(pv_state_building const& value, error_handler& err, int32_t line, province_file_context& context);
1555 void is_slave(association_type, bool value, error_handler& err, int32_t line, province_file_context& context);
1556 void rgo_distribution(province_rgo_ext const& value, error_handler& err, int32_t line, province_file_context& context);
1557 void any_value(std::string_view name, association_type, uint32_t value, error_handler& err, int32_t line, province_file_context& context);
1559};
1560
1561void enter_dated_block(std::string_view name, token_generator& gen, error_handler& err, province_file_context& context);
1562
1565 dcon::province_id id;
1566};
1567
1569 dcon::religion_id rel_id;
1570 dcon::culture_id cul_id;
1571 dcon::rebel_type_id reb_id;
1572 int32_t size = 0;
1573 float militancy = 0;
1574 void culture(association_type, std::string_view value, error_handler& err, int32_t line, pop_history_province_context& context);
1575 void religion(association_type, std::string_view value, error_handler& err, int32_t line,
1577 void rebel_type(association_type, std::string_view value, error_handler& err, int32_t line,
1580};
1581
1583 void any_group(std::string_view type, pop_history_definition const& def, error_handler& err, int32_t line,
1586};
1587
1590};
1591
1592void parse_csv_pop_history_file(sys::state& state, const char *start, const char *end, error_handler& err, scenario_building_context& context);
1593void parse_csv_province_history_file(sys::state& state, const char* start, const char* end, error_handler& err, scenario_building_context& context);
1594
1595void make_pop_province_list(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1596
1599 dcon::pop_type_id id;
1600};
1601
1604};
1605
1608};
1609
1612};
1613
1614struct income {
1615 float weight = 0;
1617 void type(association_type, std::string_view value, error_handler& err, int32_t line, poptype_context& context) {
1618 if(is_fixed_token_ci(value.data(), value.data() + value.length(), "administration"))
1620 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "military"))
1622 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "education"))
1624 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "reforms"))
1626 else {
1627 err.accumulated_errors +=
1628 "Invalid income type " + std::string(value) + " (" + err.file_name + " line " + std::to_string(line) + ")\n";
1629 }
1630 }
1632};
1633
1636 void sprite(association_type, int32_t value, error_handler& err, int32_t line, poptype_context& context);
1637 void color(color_from_3i cvalue, error_handler& err, int32_t line, poptype_context& context);
1638 void is_artisan(association_type, bool value, error_handler& err, int32_t line, poptype_context& context);
1639 void strata(association_type, std::string_view value, error_handler& err, int32_t line, poptype_context& context);
1640 void unemployment(association_type, bool value, error_handler& err, int32_t line, poptype_context& context);
1641 void is_slave(association_type, bool value, error_handler& err, int32_t line, poptype_context& context);
1642 void allowed_to_vote(association_type, bool value, error_handler& err, int32_t line, poptype_context& context);
1643 void can_be_recruited(association_type, bool value, error_handler& err, int32_t line, poptype_context& context);
1644 void state_capital_only(association_type, bool value, error_handler& err, int32_t line, poptype_context& context);
1645 void leadership(association_type, int32_t value, error_handler& err, int32_t line, poptype_context& context);
1646 void research_optimum(association_type, float value, error_handler& err, int32_t line, poptype_context& context);
1647 void administrative_efficiency(association_type, bool value, error_handler& err, int32_t line, poptype_context& context);
1648 void tax_eff(association_type, float value, error_handler& err, int32_t line, poptype_context& context);
1649 void can_build(association_type, bool value, error_handler& err, int32_t line, poptype_context& context);
1650 void research_points(association_type, float value, error_handler& err, int32_t line, poptype_context& context);
1651 void can_reduce_consciousness(association_type, bool value, error_handler& err, int32_t line, poptype_context& context);
1652 void workplace_input(association_type, float value, error_handler& err, int32_t line, poptype_context& context);
1653 void workplace_output(association_type, float value, error_handler& err, int32_t line, poptype_context& context);
1654 void equivalent(association_type, std::string_view value, error_handler& err, int32_t line, poptype_context& context);
1655 void life_needs(commodity_array const& value, error_handler& err, int32_t line, poptype_context& context);
1656 void everyday_needs(commodity_array const& value, error_handler& err, int32_t line, poptype_context& context);
1657 void luxury_needs(commodity_array const& value, error_handler& err, int32_t line, poptype_context& context);
1661
1662 void life_needs_income(income const& value, error_handler& err, int32_t line, poptype_context& context);
1663 void everyday_needs_income(income const& value, error_handler& err, int32_t line, poptype_context& context);
1664 void luxury_needs_income(income const& value, error_handler& err, int32_t line, poptype_context& context);
1665};
1666
1668void read_promotion_target(std::string_view name, token_generator& gen, error_handler& err, poptype_context& context);
1669void read_pop_ideology(std::string_view name, token_generator& gen, error_handler& err, poptype_context& context);
1670void read_pop_issue(std::string_view name, token_generator& gen, error_handler& err, poptype_context& context);
1673
1676 dcon::ideology_id id;
1677};
1678
1681 void can_reduce_militancy(association_type, bool value, error_handler& err, int32_t line, individual_ideology_context& context);
1682 void uncivilized(association_type, bool value, error_handler& err, int32_t line, individual_ideology_context& context);
1683 void civilized(association_type, bool value, error_handler& err, int32_t line, individual_ideology_context& context);
1684 void color(color_from_3i cvalue, error_handler& err, int32_t line, individual_ideology_context& context);
1686 void add_political_reform(dcon::value_modifier_key value, error_handler& err, int32_t line,
1688 void remove_political_reform(dcon::value_modifier_key value, error_handler& err, int32_t line,
1690 void add_social_reform(dcon::value_modifier_key value, error_handler& err, int32_t line, individual_ideology_context& context);
1691 void remove_social_reform(dcon::value_modifier_key value, error_handler& err, int32_t line,
1693 void add_military_reform(dcon::value_modifier_key value, error_handler& err, int32_t line,
1695 void add_economic_reform(dcon::value_modifier_key value, error_handler& err, int32_t line,
1697};
1698
1699dcon::value_modifier_key ideology_condition(token_generator& gen, error_handler& err, individual_ideology_context& context);
1701
1704 dcon::cb_type_id id;
1705};
1706
1707struct cb_body {
1708 void finish(individual_cb_context& context);
1709 void is_civil_war(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1710 void months(association_type, int32_t value, error_handler& err, int32_t line, individual_cb_context& context);
1711 void truce_months(association_type, int32_t value, error_handler& err, int32_t line, individual_cb_context& context);
1712 void sprite_index(association_type, int32_t value, error_handler& err, int32_t line, individual_cb_context& context);
1713 void always(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1714 void is_triggered_only(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1715 void constructing_cb(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1716 void great_war_obligatory(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1717 void all_allowed_states(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1718 void crisis(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1719 void po_clear_union_sphere(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1720 void po_gunboat(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1721 void po_annex(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1722 void po_demand_state(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1723 void po_add_to_sphere(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1724 void po_disarmament(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1725 void po_reparations(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1726 void po_transfer_provinces(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1727 void po_remove_prestige(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1728 void po_make_puppet(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1729 void po_release_puppet(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1730 void po_status_quo(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1731 void po_install_communist_gov_type(association_type, bool value, error_handler& err, int32_t line,
1732 individual_cb_context& context);
1733 void po_uninstall_communist_gov_type(association_type, bool value, error_handler& err, int32_t line,
1734 individual_cb_context& context);
1735 void po_remove_cores(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1736 void po_colony(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1737 void po_destroy_forts(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1738 void po_destroy_naval_bases(association_type, bool value, error_handler& err, int32_t line, individual_cb_context& context);
1739 void war_name(association_type, std::string_view value, error_handler& err, int32_t line, individual_cb_context& context);
1740 void badboy_factor(association_type, float value, error_handler& err, int32_t line, individual_cb_context& context);
1741 void prestige_factor(association_type, float value, error_handler& err, int32_t line, individual_cb_context& context);
1742 void peace_cost_factor(association_type, float value, error_handler& err, int32_t line, individual_cb_context& context);
1743 void penalty_factor(association_type, float value, error_handler& err, int32_t line, individual_cb_context& context);
1744 void break_truce_prestige_factor(association_type, float value, error_handler& err, int32_t line,
1745 individual_cb_context& context);
1746 void break_truce_infamy_factor(association_type, float value, error_handler& err, int32_t line, individual_cb_context& context);
1747 void break_truce_militancy_factor(association_type, float value, error_handler& err, int32_t line,
1748 individual_cb_context& context);
1749 void good_relation_prestige_factor(association_type, float value, error_handler& err, int32_t line,
1750 individual_cb_context& context);
1751 void good_relation_infamy_factor(association_type, float value, error_handler& err, int32_t line,
1752 individual_cb_context& context);
1753 void good_relation_militancy_factor(association_type, float value, error_handler& err, int32_t line,
1754 individual_cb_context& context);
1755 void construction_speed(association_type, float value, error_handler& err, int32_t line, individual_cb_context& context);
1756 void tws_battle_factor(association_type, float value, error_handler& err, int32_t line, individual_cb_context& context);
1757 void allowed_states(dcon::trigger_key value, error_handler& err, int32_t line, individual_cb_context& context);
1758 void allowed_states_in_crisis(dcon::trigger_key value, error_handler& err, int32_t line, individual_cb_context& context);
1759 void allowed_substate_regions(dcon::trigger_key value, error_handler& err, int32_t line, individual_cb_context& context);
1760 void allowed_countries(dcon::trigger_key value, error_handler& err, int32_t line, individual_cb_context& context);
1761 void can_use(dcon::trigger_key value, error_handler& err, int32_t line, individual_cb_context& context);
1762 void on_add(dcon::effect_key value, error_handler& err, int32_t line, individual_cb_context& context);
1763 void on_po_accepted(dcon::effect_key value, error_handler& err, int32_t line, individual_cb_context& context);
1764};
1765
1766dcon::trigger_key cb_allowed_states(token_generator& gen, error_handler& err, individual_cb_context& context);
1767dcon::trigger_key cb_allowed_crisis_states(token_generator& gen, error_handler& err, individual_cb_context& context);
1768dcon::trigger_key cb_allowed_substates(token_generator& gen, error_handler& err, individual_cb_context& context);
1769dcon::trigger_key cb_allowed_countries(token_generator& gen, error_handler& err, individual_cb_context& context);
1770dcon::trigger_key cb_can_use(token_generator& gen, error_handler& err, individual_cb_context& context);
1771dcon::effect_key cb_on_add(token_generator& gen, error_handler& err, individual_cb_context& context);
1772dcon::effect_key cb_on_po_accepted(token_generator& gen, error_handler& err, individual_cb_context& context);
1773
1775 bool active = false;
1776 dcon::trigger_key trigger;
1777};
1778
1779dcon::trigger_key make_party_trigger(token_generator& gen, error_handler& err, party_context& context);
1780dcon::trigger_key make_crime_trigger(token_generator& gen, error_handler& err, scenario_building_context& context);
1781void read_pending_crime(dcon::crime_id id, token_generator& gen, error_handler& err, scenario_building_context& context);
1782
1785 dcon::issue_option_id id;
1786};
1787
1790 dcon::reform_option_id id;
1791};
1792
1795 void build_factory(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1796 void expand_factory(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1797 void open_factory(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1798 void destroy_factory(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1799 void factory_priority(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1800 void can_subsidise(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1801 void pop_build_factory(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1802 void pop_expand_factory(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1803 void pop_open_factory(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1804 void delete_factory_if_no_input(association_type, bool value, error_handler& err, int32_t line,
1805 individual_option_context& context);
1806 void build_factory_invest(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1807 void expand_factory_invest(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1808 void open_factory_invest(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1809 void build_railway_invest(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1810 void can_invest_in_pop_projects(association_type, bool value, error_handler& err, int32_t line,
1811 individual_option_context& context);
1812 void pop_build_factory_invest(association_type, bool value, error_handler& err, int32_t line,
1813 individual_option_context& context);
1814 void pop_expand_factory_invest(association_type, bool value, error_handler& err, int32_t line,
1815 individual_option_context& context);
1816 void pop_open_factory_invest(association_type, bool value, error_handler& err, int32_t line,
1817 individual_option_context& context);
1818 void allow_foreign_investment(association_type, bool value, error_handler& err, int32_t line,
1819 individual_option_context& context);
1820 void slavery_allowed(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1821 void primary_culture_voting(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1822 void culture_voting(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1823 void all_voting(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1824 void largest_share(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1825 void dhont(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1826 void sainte_laque(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1827 void same_as_ruling_party(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1828 void rich_only(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1829 void state_vote(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1830 void population_vote(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1831 void build_railway(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1832 void build_bank(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1833 void build_university(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1834
1836 void build_factory(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1837 void expand_factory(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1838 void open_factory(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1839 void destroy_factory(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1840 void factory_priority(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1841 void can_subsidise(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1842 void pop_build_factory(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1843 void pop_expand_factory(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1844 void pop_open_factory(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1845 void delete_factory_if_no_input(association_type, bool value, error_handler& err, int32_t line,
1847 void build_factory_invest(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1848 void expand_factory_invest(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1849 void open_factory_invest(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1850 void build_railway_invest(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1851 void can_invest_in_pop_projects(association_type, bool value, error_handler& err, int32_t line,
1853 void pop_build_factory_invest(association_type, bool value, error_handler& err, int32_t line,
1855 void pop_expand_factory_invest(association_type, bool value, error_handler& err, int32_t line,
1857 void pop_open_factory_invest(association_type, bool value, error_handler& err, int32_t line,
1859 void allow_foreign_investment(association_type, bool value, error_handler& err, int32_t line,
1861 void slavery_allowed(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1862 void primary_culture_voting(association_type, bool value, error_handler& err, int32_t line,
1864 void culture_voting(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1865 void all_voting(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1866 void largest_share(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1867 void dhont(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1868 void sainte_laque(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1869 void same_as_ruling_party(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1870 void rich_only(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1871 void state_vote(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1872 void population_vote(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1873 void build_railway(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1874 void build_bank(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1875 void build_university(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context);
1876};
1877
1879 dcon::trigger_key trigger;
1880 dcon::effect_key effect;
1883};
1884
1888};
1889
1890void make_issue_vote_modifier(std::string_view name, token_generator& gen, error_handler& err, individual_option_context& context);
1891void make_issue_vote_modifier(std::string_view name, token_generator& gen, error_handler& err, individual_roption_context& context);
1892
1894 void technology_cost(association_type, int32_t value, error_handler& err, int32_t line, individual_option_context& context);
1895 void war_exhaustion_effect(association_type, float value, error_handler& err, int32_t line, individual_option_context& context);
1896 void administrative_multiplier(association_type, float value, error_handler& err, int32_t line,
1897 individual_option_context& context);
1898 void is_jingoism(association_type, bool value, error_handler& err, int32_t line, individual_option_context& context);
1899 void on_execute(on_execute_body const& value, error_handler& err, int32_t line, individual_option_context& context);
1900
1901 void technology_cost(association_type, int32_t value, error_handler& err, int32_t line, individual_roption_context& context);
1902 void war_exhaustion_effect(association_type, float value, error_handler& err, int32_t line,
1904 void administrative_multiplier(association_type, float value, error_handler& err, int32_t line,
1906 void on_execute(on_execute_body const& value, error_handler& err, int32_t line, individual_roption_context& context);
1907 void is_jingoism(association_type, bool value, error_handler& err, int32_t line, individual_roption_context& context) { }
1908 void vote_modifiers(vote_modifiers_body const& value, error_handler& err, int32_t line, individual_option_context& context) { }
1909 void vote_modifiers(vote_modifiers_body const& value, error_handler& err, int32_t line, individual_roption_context& context) { }
1911};
1912
1914dcon::trigger_key make_execute_trigger(token_generator& gen, error_handler& err, individual_option_context& context);
1915dcon::effect_key make_execute_effect(token_generator& gen, error_handler& err, individual_option_context& context);
1919void read_pending_option(dcon::issue_option_id id, token_generator& gen, error_handler& err, scenario_building_context& context);
1920void read_pending_reform(dcon::reform_option_id id, token_generator& gen, error_handler& err, scenario_building_context& context);
1921
1924 dcon::national_focus_id id;
1926};
1927
1930 void railroads(association_type, float value, error_handler& err, int32_t line, national_focus_context& context);
1931 void limit(dcon::trigger_key value, error_handler& err, int32_t line, national_focus_context& context);
1932 void has_flashpoint(association_type, bool value, error_handler& err, int32_t line, national_focus_context& context);
1933 void flashpoint_tension(association_type, float value, error_handler& err, int32_t line, national_focus_context& context);
1934 void ideology(association_type, std::string_view value, error_handler& err, int32_t line, national_focus_context& context);
1935 void loyalty_value(association_type, float value, error_handler& err, int32_t line, national_focus_context& context);
1936 void any_value(std::string_view label, association_type, float value, error_handler& err, int32_t line, national_focus_context& context);
1937};
1938
1941};
1944};
1945
1946dcon::trigger_key make_focus_limit(token_generator& gen, error_handler& err, national_focus_context& context);
1947void make_focus(std::string_view name, token_generator& gen, error_handler& err, national_focus_context& context);
1948void make_focus_group(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
1949
1952 void promotion_chance(dcon::value_modifier_key value, error_handler& err, int32_t line, scenario_building_context& context);
1953 void demotion_chance(dcon::value_modifier_key value, error_handler& err, int32_t line, scenario_building_context& context);
1954 void migration_chance(dcon::value_modifier_key value, error_handler& err, int32_t line, scenario_building_context& context);
1955 void colonialmigration_chance(dcon::value_modifier_key value, error_handler& err, int32_t line,
1956 scenario_building_context& context);
1957 void emigration_chance(dcon::value_modifier_key value, error_handler& err, int32_t line, scenario_building_context& context);
1958 void assimilation_chance(dcon::value_modifier_key value, error_handler& err, int32_t line, scenario_building_context& context);
1959 void conversion_chance(dcon::value_modifier_key value, error_handler& err, int32_t line, scenario_building_context& context);
1960};
1961
1962dcon::value_modifier_key make_poptype_pop_chance(token_generator& gen, error_handler& err, scenario_building_context& context);
1963
1966 dcon::technology_id id;
1967};
1970 dcon::invention_id id;
1971};
1972
1974 template<typename T>
1975 void finish(T&) { }
1976};
1977
1980 void any_value(std::string_view label, association_type, float value, error_handler& err, int32_t line, tech_context& context);
1981};
1984 void any_value(std::string_view label, association_type, float value, error_handler& err, int32_t line, tech_context& context);
1985};
1986
1990 void any_value(std::string_view label, association_type, float value, error_handler& err, int32_t line, tech_context& context);
1991 void any_value(std::string_view label, association_type, float value, error_handler& err, int32_t line, invention_context& context);
1992};
1993
1995 void any_group(std::string_view label, unit_modifier_body const& value, error_handler& err, int32_t line,
1996 tech_context& context);
1997 void any_value(std::string_view name, association_type, int32_t value, error_handler& err, int32_t line, tech_context& context);
1998 void ai_chance(dcon::value_modifier_key value, error_handler& err, int32_t line, tech_context& context);
1999 void year(association_type, int32_t value, error_handler& err, int32_t line, tech_context& context);
2000 void cost(association_type, int32_t value, error_handler& err, int32_t line, tech_context& context);
2001 void area(association_type, std::string_view value, error_handler& err, int32_t line, tech_context& context);
2002 void colonial_points(association_type, int32_t value, error_handler& err, int32_t line, tech_context& context);
2003 void activate_unit(association_type, std::string_view value, error_handler& err, int32_t line, tech_context& context);
2004 void activate_building(association_type, std::string_view value, error_handler& err, int32_t line, tech_context& context);
2005 void plurality(association_type, float value, error_handler& err, int32_t line, tech_context& context);
2006
2010};
2011
2012dcon::value_modifier_key make_ai_chance(token_generator& gen, error_handler& err, tech_context& context);
2013void read_pending_technology(dcon::technology_id id, token_generator& gen, error_handler& err, scenario_building_context& context);
2014
2015
2016
2019 void any_value(std::string_view label, association_type, float value, error_handler& err, int32_t line,
2020 invention_context& context);
2021};
2024 void any_value(std::string_view label, association_type, float value, error_handler& err, int32_t line,
2025 invention_context& context);
2026};
2029 void any_value(std::string_view label, association_type, float value, error_handler& err, int32_t line,
2030 invention_context& context);
2031};
2034 dcon::rebel_type_id faction_;
2035 float value = 0.0f;
2036 void faction(association_type, std::string_view v, error_handler& err, int32_t line, invention_context& context);
2037};
2038struct inv_effect : public modifier_base {
2039 void any_group(std::string_view label, unit_modifier_body const& value, error_handler& err, int32_t line,
2040 invention_context& context);
2041 void any_value(std::string_view name, association_type, int32_t value, error_handler& err, int32_t line, invention_context& context);
2042 void activate_unit(association_type, std::string_view value, error_handler& err, int32_t line, invention_context& context);
2043 void activate_building(association_type, std::string_view value, error_handler& err, int32_t line, invention_context& context);
2048
2049 void shared_prestige(association_type, float value, error_handler& err, int32_t line, invention_context& context);
2050 void plurality(association_type, float value, error_handler& err, int32_t line, invention_context& context);
2051 void colonial_points(association_type, int32_t value, error_handler& err, int32_t line, invention_context& context);
2052 void enable_crime(association_type, std::string_view value, error_handler& err, int32_t line, invention_context& context);
2053 void gas_attack(association_type, bool value, error_handler& err, int32_t line, invention_context& context);
2054 void gas_defence(association_type, bool value, error_handler& err, int32_t line, invention_context& context);
2055 void rebel_org_gain(inv_rebel_org_gain const& value, error_handler& err, int32_t line, invention_context& context);
2056};
2057
2059 void limit(dcon::trigger_key value, error_handler& err, int32_t line, invention_context& context);
2060 void chance(dcon::value_modifier_key value, error_handler& err, int32_t line, invention_context& context);
2061 void effect(inv_effect const& value, error_handler& err, int32_t line, invention_context& context);
2062 void shared_prestige(association_type, float value, error_handler& err, int32_t line, invention_context& context);
2063};
2064
2065dcon::value_modifier_key make_inv_chance(token_generator& gen, error_handler& err, invention_context& context);
2066dcon::trigger_key make_inv_limit(token_generator& gen, error_handler& err, invention_context& context);
2067void read_pending_invention(dcon::invention_id id, token_generator& gen, error_handler& err, scenario_building_context& context);
2068
2071 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2072 scenario_building_context& context);
2073};
2074
2077 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2078 scenario_building_context& context);
2079};
2080
2083 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2084 scenario_building_context& context);
2085};
2086
2089 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2090 scenario_building_context& context);
2091};
2092
2095 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2096 scenario_building_context& context);
2097};
2098
2101 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2102 scenario_building_context& context);
2103};
2104
2107 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2108 scenario_building_context& context);
2109};
2110
2113 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2114 scenario_building_context& context);
2115};
2116
2119 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2120 scenario_building_context& context);
2121};
2122
2125 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2126 scenario_building_context& context);
2127};
2128
2131 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2132 scenario_building_context& context);
2133};
2134
2137 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2138 scenario_building_context& context);
2139};
2140
2143 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2144 scenario_building_context& context);
2145};
2146
2149 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2150 scenario_building_context& context);
2151};
2152
2155 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2156 scenario_building_context& context);
2157};
2158
2161 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2162 scenario_building_context& context);
2163};
2166 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2167 scenario_building_context& context);
2168};
2171 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2172 scenario_building_context& context);
2173};
2174
2177 void any_value(std::string_view chance, association_type, int32_t event, error_handler& err, int32_t line,
2178 scenario_building_context& context);
2179};
2201};
2202
2205 dcon::rebel_type_id id;
2206};
2207
2210 void any_value(std::string_view from_gov, association_type, std::string_view to_gov, error_handler& err, int32_t line,
2211 rebel_context& context);
2212};
2213
2216 void icon(association_type, int32_t value, error_handler& err, int32_t line, rebel_context& context);
2217 void break_alliance_on_win(association_type, bool value, error_handler& err, int32_t line, rebel_context& context);
2219 void area(association_type, std::string_view value, error_handler& err, int32_t line, rebel_context& context);
2220 void defection(association_type, std::string_view value, error_handler& err, int32_t line, rebel_context& context);
2221 void independence(association_type, std::string_view value, error_handler& err, int32_t line, rebel_context& context);
2222 void defect_delay(association_type, int32_t value, error_handler& err, int32_t line, rebel_context& context);
2223 void ideology(association_type, std::string_view value, error_handler& err, int32_t line, rebel_context& context);
2224 void allow_all_cultures(association_type, bool value, error_handler& err, int32_t line, rebel_context& context);
2225 void allow_all_ideologies(association_type, bool value, error_handler& err, int32_t line, rebel_context& context);
2226 void allow_all_culture_groups(association_type, bool value, error_handler& err, int32_t line, rebel_context& context);
2227 void occupation_mult(association_type, float value, error_handler& err, int32_t line, rebel_context& context);
2228 void will_rise(dcon::value_modifier_key value, error_handler& err, int32_t line, rebel_context& context);
2229 void spawn_chance(dcon::value_modifier_key value, error_handler& err, int32_t line, rebel_context& context);
2230 void movement_evaluation(dcon::value_modifier_key value, error_handler& err, int32_t line, rebel_context& context);
2231 void siege_won_trigger(dcon::trigger_key value, error_handler& err, int32_t line, rebel_context& context);
2232 void demands_enforced_trigger(dcon::trigger_key value, error_handler& err, int32_t line, rebel_context& context);
2233 void siege_won_effect(dcon::effect_key value, error_handler& err, int32_t line, rebel_context& context);
2234 void demands_enforced_effect(dcon::effect_key value, error_handler& err, int32_t line, rebel_context& context);
2235};
2236
2237dcon::value_modifier_key make_reb_will_rise(token_generator& gen, error_handler& err, rebel_context& context);
2238dcon::value_modifier_key make_reb_spawn_chance(token_generator& gen, error_handler& err, rebel_context& context);
2239dcon::value_modifier_key make_reb_movement_eval(token_generator& gen, error_handler& err, rebel_context& context);
2240dcon::trigger_key make_reb_s_won_trigger(token_generator& gen, error_handler& err, rebel_context& context);
2241dcon::trigger_key make_reb_enforced_trigger(token_generator& gen, error_handler& err, rebel_context& context);
2242dcon::effect_key make_reb_s_won_effect(token_generator& gen, error_handler& err, rebel_context& context);
2243dcon::effect_key make_reb_enforce_effect(token_generator& gen, error_handler& err, rebel_context& context);
2244void read_pending_rebel_type(dcon::rebel_type_id id, token_generator& gen, error_handler& err,
2245 scenario_building_context& context);
2246
2249 dcon::decision_id id;
2250};
2251
2252struct decision {
2253 void finish(decision_context&);
2254 void potential(dcon::trigger_key value, error_handler& err, int32_t line, decision_context& context);
2255 void allow(dcon::trigger_key value, error_handler& err, int32_t line, decision_context& context);
2256 void effect(dcon::effect_key value, error_handler& err, int32_t line, decision_context& context);
2257 void ai_will_do(dcon::value_modifier_key value, error_handler& err, int32_t line, decision_context& context);
2258 void picture(association_type, std::string_view value, error_handler& err, int32_t line, decision_context& context);
2259};
2262};
2266};
2267
2268dcon::trigger_key make_decision_trigger(token_generator& gen, error_handler& err, decision_context& context);
2269dcon::effect_key make_decision_effect(token_generator& gen, error_handler& err, decision_context& context);
2270dcon::value_modifier_key make_decision_ai_choice(token_generator& gen, error_handler& err, decision_context& context);
2271void make_decision(std::string_view name, token_generator& gen, error_handler& err, scenario_building_context& context);
2272
2275};
2276
2277void scan_province_event(token_generator& gen, error_handler& err, scenario_building_context& context);
2278void scan_country_event(token_generator& gen, error_handler& err, scenario_building_context& context);
2279
2281 bool is_triggered_only = false;
2282 int32_t id = 0;
2284};
2285
2288
2292};
2293
2295 int32_t id = 0;
2296 dcon::trigger_key trigger;
2297 dcon::value_modifier_key mean_time_to_happen;
2298 std::array<sys::event_option, sys::max_event_options> options;
2300 dcon::effect_key immediate_;
2301 bool major = false;
2302 bool fire_only_once = false;
2304 dcon::gfx_object_id picture_;
2305 dcon::text_key title_;
2306 dcon::text_key desc_;
2307 dcon::issue_id issue_group_;
2308
2309 void title(association_type, std::string_view value, error_handler& err, int32_t line, event_building_context& context);
2310 void desc(association_type, std::string_view value, error_handler& err, int32_t line, event_building_context& context);
2311 void option(sys::event_option const& value, error_handler& err, int32_t line, event_building_context& context);
2312 void immediate(dcon::effect_key value, error_handler& err, int32_t line, event_building_context& context) {
2313 if(!bool(immediate_))
2314 immediate_ = value;
2315 }
2316 void issue_group(association_type, std::string_view value, error_handler& err, int32_t line, event_building_context& context);
2317 void picture(association_type, std::string_view value, error_handler& err, int32_t line, event_building_context& context);
2319 if(!picture_) {
2320 error_handler err("");
2321 picture(association_type::eq, "", err, 0, context);
2322 }
2323 }
2324};
2325
2326dcon::trigger_key make_event_trigger(token_generator& gen, error_handler& err, event_building_context& context);
2327dcon::effect_key make_immediate_effect(token_generator& gen, error_handler& err, event_building_context& context);
2328dcon::value_modifier_key make_event_mtth(token_generator& gen, error_handler& err, event_building_context& context);
2329sys::event_option make_event_option(token_generator& gen, error_handler& err, event_building_context& context);
2330void commit_pending_events(error_handler& err, scenario_building_context& context);
2331
2334 dcon::nation_id nation_for;
2335};
2338 dcon::nation_id nation_for;
2339 dcon::nation_id nation_with;
2340};
2343 dcon::regiment_id id;
2344};
2347 dcon::ship_id id;
2348};
2351 dcon::army_id id;
2352 dcon::nation_id nation_for;
2353};
2356 dcon::navy_id id;
2357 dcon::nation_id nation_for;
2358};
2360 float prestige = 0.0f;
2361 dcon::unit_name_id name_;
2363 dcon::leader_trait_id personality_;
2364 dcon::leader_trait_id background_;
2365 bool is_general = true;
2366
2368 void name(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_context& context);
2369 void date(association_type, sys::year_month_day value, error_handler& err, int32_t line, oob_file_context& context);
2370 void type(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_context& context) {
2371 if(is_fixed_token_ci(value.data(), value.data() + value.length(), "sea"))
2372 is_general = false;
2373 else if(is_fixed_token_ci(value.data(), value.data() + value.length(), "land"))
2374 is_general = true;
2375 else
2376 err.accumulated_errors += "Leader of type neither land nor sea (" + err.file_name + " line " + std::to_string(line) + ")\n";
2377 }
2378 void personality(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_context& context) {
2379 if(auto it = context.outer_context.map_of_leader_traits.find(std::string(value));
2380 it != context.outer_context.map_of_leader_traits.end()) {
2381 personality_ = it->second;
2382 } else {
2383 err.accumulated_errors +=
2384 "Invalid leader trait " + std::string(value) + " (" + err.file_name + " line " + std::to_string(line) + ")\n";
2385 }
2386 }
2387 void background(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_context& context) {
2388 if(auto it = context.outer_context.map_of_leader_traits.find(std::string(value));
2389 it != context.outer_context.map_of_leader_traits.end()) {
2390 background_ = it->second;
2391 } else {
2392 err.accumulated_errors +=
2393 "Invalid leader trait " + std::string(value) + " (" + err.file_name + " line " + std::to_string(line) + ")\n";
2394 }
2395 }
2396};
2397struct oob_army {
2399 void name(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_army_context& context);
2400 void location(association_type, int32_t value, error_handler& err, int32_t line, oob_file_army_context& context);
2401 void leader(oob_leader const& value, error_handler& err, int32_t line, oob_file_army_context& context);
2402};
2403struct oob_navy {
2405 void name(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_navy_context& context);
2406 void location(association_type, int32_t value, error_handler& err, int32_t line, oob_file_navy_context& context);
2407 void leader(oob_leader const& value, error_handler& err, int32_t line, oob_file_navy_context& context);
2408};
2409struct oob_ship {
2411 void name(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_ship_context& context);
2412 void type(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_ship_context& context);
2413};
2414
2417 void name(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_regiment_context& context);
2418 void type(association_type, std::string_view value, error_handler& err, int32_t line, oob_file_regiment_context& context);
2419 void home(association_type, int32_t value, error_handler& err, int32_t line, oob_file_regiment_context& context);
2420};
2421
2424 void value(association_type, int32_t v, error_handler& err, int32_t line, oob_file_relation_context& context);
2425 void level(association_type, int32_t v, error_handler& err, int32_t line, oob_file_relation_context& context);
2426 void influence_value(association_type, float v, error_handler& err, int32_t line, oob_file_relation_context& context);
2428};
2429struct oob_file {
2431 void leader(oob_leader const& value, error_handler& err, int32_t line, oob_file_context& context);
2432};
2433
2434oob_leader make_army_leader(token_generator& gen, error_handler& err, oob_file_army_context& context);
2435oob_leader make_navy_leader(token_generator& gen, error_handler& err, oob_file_navy_context& context);
2436void make_oob_relationship(std::string_view tag, token_generator& gen, error_handler& err, oob_file_context& context);
2437void make_oob_army(token_generator& gen, error_handler& err, oob_file_context& context);
2438void make_oob_navy(token_generator& gen, error_handler& err, oob_file_context& context);
2439void make_oob_regiment(token_generator& gen, error_handler& err, oob_file_army_context& context);
2440void make_oob_ship(token_generator& gen, error_handler& err, oob_file_navy_context& context);
2441
2442struct production_type;
2443
2446 ankerl::unordered_dense::map<std::string, production_type> templates;
2448
2450};
2451
2454};
2457 float amount = 0.0f;
2458 dcon::pop_type_id type;
2459
2460 void poptype(association_type, std::string_view v, error_handler& err, int32_t line, production_context& context);
2461};
2462
2464 std::vector<production_employee> employees;
2466 void free_group(production_employee const& value, error_handler& err, int32_t line, production_context& context) {
2467 employees.push_back(value);
2468 }
2469};
2470
2472 dcon::trigger_key trigger;
2473 float value = 0.0f;
2474
2476};
2477
2484 int32_t workforce = 0;
2485 bool farm = false;
2486 bool mine = false;
2487 bool is_coastal = false;
2488 float value = 0.0f;
2489
2490 std::vector<production_bonus> bonuses;
2491 dcon::commodity_id output_goods_;
2493
2494 void output_goods(association_type, std::string_view v, error_handler& err, int32_t line, production_context& context) {
2495 if(auto it = context.outer_context.map_of_commodity_names.find(std::string(v));
2496 it != context.outer_context.map_of_commodity_names.end()) {
2497 output_goods_ = it->second;
2498 } else {
2499 err.accumulated_errors +=
2500 "Invalid commodity name " + std::string(v) + " (" + err.file_name + " line " + std::to_string(line) + ")\n";
2501 }
2502 }
2503 void bonus(production_bonus const& v, error_handler& err, int32_t line, production_context& context) {
2504 bonuses.push_back(v);
2505 }
2506 void type(association_type, std::string_view v, error_handler& err, int32_t line, production_context& context) {
2507 if(is_fixed_token_ci(v.data(), v.data() + v.length(), "factory"))
2509 else if(is_fixed_token_ci(v.data(), v.data() + v.length(), "rgo"))
2511 else if(is_fixed_token_ci(v.data(), v.data() + v.length(), "artisan"))
2513 else
2514 err.accumulated_errors +=
2515 "Invalid production type " + std::string(v) + " (" + err.file_name + " line " + std::to_string(line) + ")\n";
2516 }
2517 void as_template(association_type, std::string_view v, error_handler& err, int32_t line, production_context& context) {
2518 if(auto it = context.templates.find(std::string(v)); it != context.templates.end()) {
2519 *this = it->second;
2520 } else {
2521 err.accumulated_errors +=
2522 "Invalid production template " + std::string(v) + " (" + err.file_name + " line " + std::to_string(line) + ")\n";
2523 }
2524 }
2526};
2527
2528commodity_array make_prod_commodity_array(token_generator& gen, error_handler& err, production_context& context);
2529
2530dcon::trigger_key make_production_bonus_trigger(token_generator& gen, error_handler& err, production_context& context);
2531void make_production_type(std::string_view name, token_generator& gen, error_handler& err, production_context& context);
2532
2533struct alliance {
2534 dcon::nation_id first_;
2535 dcon::nation_id second_;
2536 bool invalid = false;
2537
2539 void first(association_type, std::string_view tag, error_handler& err, int32_t line, scenario_building_context& context);
2540 void second(association_type, std::string_view tag, error_handler& err, int32_t line, scenario_building_context& context);
2543};
2545 dcon::nation_id first_;
2546 dcon::nation_id second_;
2547 bool invalid = false;
2549 void first(association_type, std::string_view tag, error_handler& err, int32_t line, scenario_building_context& context);
2550 void second(association_type, std::string_view tag, error_handler& err, int32_t line, scenario_building_context& context);
2553};
2554
2557};
2558
2559void make_alliance(token_generator& gen, error_handler& err, scenario_building_context& context);
2560void make_vassal(token_generator& gen, error_handler& err, scenario_building_context& context);
2561void make_substate(token_generator& gen, error_handler& err, scenario_building_context& context);
2562
2565 dcon::national_identity_id nat_ident;
2566 dcon::nation_id holder_id;
2567 std::vector<std::pair<dcon::nation_id, dcon::decision_id>>& pending_decisions;
2568 bool in_dated_block = false;
2569};
2570
2573
2575 dcon::government_type_id government_;
2576
2577 void flag(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2578 void government(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context) {
2579 if(auto it = context.outer_context.map_of_governments.find(std::string(value));
2580 it != context.outer_context.map_of_governments.end()) {
2581 government_ = it->second;
2582 } else {
2583 err.accumulated_errors += "invalid government type " + std::string(value) + " encountered (" + err.file_name + " line " +
2584 std::to_string(line) + ")\n";
2585 }
2586 }
2587};
2590 void any_value(std::string_view value, association_type, float v, error_handler& err, int32_t line,
2591 country_history_context& context);
2592};
2595 void any_value(std::string_view tag, association_type, float v, error_handler& err, int32_t line,
2596 country_history_context& context);
2597};
2598
2603 void set_country_flag(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2604 void set_global_flag(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2605 void colonial_points(association_type, int32_t value, error_handler& err, int32_t line, country_history_context& context);
2606 void capital(association_type, int32_t value, error_handler& err, int32_t line, country_history_context& context);
2607 void any_value(std::string_view label, association_type, std::string_view value, error_handler& err, int32_t line,
2608 country_history_context& context);
2609 void primary_culture(association_type, std::string_view value, error_handler& err, int32_t line,
2610 country_history_context& context);
2611 void culture(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2612 void remove_culture(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2613 void religion(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2614 void government(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2615 void plurality(association_type, float value, error_handler& err, int32_t line, country_history_context& context);
2616 void prestige(association_type, float value, error_handler& err, int32_t line, country_history_context& context);
2617 void nationalvalue(association_type, std::string_view value, error_handler& err, int32_t line,
2618 country_history_context& context);
2619 void schools(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2620 void civilized(association_type, bool value, error_handler& err, int32_t line, country_history_context& context);
2621 void is_releasable_vassal(association_type, bool value, error_handler& err, int32_t line, country_history_context& context);
2622 void literacy(association_type, float value, error_handler& err, int32_t line, country_history_context& context);
2623 void non_state_culture_literacy(association_type, float value, error_handler& err, int32_t line,
2624 country_history_context& context);
2625 void consciousness(association_type, float value, error_handler& err, int32_t line, country_history_context& context);
2626 void nonstate_consciousness(association_type, float value, error_handler& err, int32_t line, country_history_context& context);
2627 void govt_flag(govt_flag_block const& value, error_handler& err, int32_t line, country_history_context& context);
2628 void ruling_party(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2629 void decision(association_type, std::string_view value, error_handler& err, int32_t line, country_history_context& context);
2630};
2631
2632void enter_country_file_dated_block(std::string_view label, token_generator& gen, error_handler& err,
2633 country_history_context& context);
2634
2635struct war_history_context;
2636
2638 dcon::nation_id actor_;
2639 dcon::nation_id receiver_;
2640 dcon::cb_type_id casus_belli_;
2641 dcon::nation_id secondary_;
2642 dcon::province_id state_province_id_;
2643
2644 void receiver(association_type, std::string_view tag, error_handler& err, int32_t line, war_history_context& context);
2645 void actor(association_type, std::string_view tag, error_handler& err, int32_t line, war_history_context& context);
2646 void country(association_type, std::string_view tag, error_handler& err, int32_t line, war_history_context& context);
2647 void casus_belli(association_type, std::string_view value, error_handler& err, int32_t line, war_history_context& context);
2648 void state_province_id(association_type t, int32_t value, error_handler& err, int32_t line, war_history_context& context);
2649
2651};
2652
2655
2656 std::vector<history_war_goal> wargoals;
2657 std::vector<dcon::nation_id> attackers;
2658 std::vector<dcon::nation_id> defenders;
2659 std::string name;
2660 bool great_war = false;
2661
2663};
2664
2666 void add_attacker(association_type, std::string_view tag, error_handler& err, int32_t line, war_history_context& context);
2667 void add_defender(association_type, std::string_view tag, error_handler& err, int32_t line, war_history_context& context);
2668 void rem_attacker(association_type, std::string_view tag, error_handler& err, int32_t line, war_history_context& context);
2669 void rem_defender(association_type, std::string_view tag, error_handler& err, int32_t line, war_history_context& context);
2670 void world_war(association_type, bool v, error_handler& err, int32_t line, war_history_context& context);
2671 void war_goal(history_war_goal const& value, error_handler& err, int32_t line, war_history_context& context) {
2672 context.wargoals.push_back(value);
2673 }
2674
2676};
2677
2679 void name(association_type, std::string_view name, error_handler& err, int32_t line, war_history_context& context);
2681};
2682
2683void enter_war_dated_block(std::string_view label, token_generator& gen, error_handler& err, war_history_context& context);
2684
2686
2687};
2688
2690 std::vector<std::string> names;
2691 template<typename T>
2692 void free_value(std::string_view value, error_handler& err, int32_t line, T& context) {
2693 names.push_back(std::string(value));
2694 }
2695 template<typename T>
2696 void finish(T& context) { }
2697};
2698
2699struct mod_file {
2700 std::string name_;
2701 std::string path_;
2702 std::string user_dir_;
2703 std::vector<std::string> replace_paths;
2704 std::vector<std::string> dependent_mods;
2705
2706 bool mod_selected = false;
2707
2708 void name(association_type, std::string_view value, error_handler& err, int32_t line, mod_file_context& context);
2709 void path(association_type, std::string_view value, error_handler& err, int32_t line, mod_file_context& context);
2710 void user_dir(association_type, std::string_view value, error_handler& err, int32_t line, mod_file_context& context);
2711 void replace_path(association_type, std::string_view value, error_handler& err, int32_t line, mod_file_context& context);
2712 void dependencies(dependencies_list const& value, error_handler& err, int32_t line, mod_file_context& context) {
2713 for(auto& s : value.names)
2714 dependent_mods.push_back(s);
2715 }
2716 void finish(mod_file_context& context) { }
2718};
2719
2722 ankerl::unordered_dense::map<std::string, int32_t> map_of_news_pattern_names;
2724};
2725
2727 void finish(news_context& context) { }
2728};
2730 void finish(news_context& context) { }
2731};
2733 void finish(news_context& context) { }
2734};
2736 void finish(news_context& context) { }
2737};
2739 void finish(news_context& context) { }
2740};
2742 void finish(news_context& context) { }
2743};
2745 std::string name_;
2746 void name(association_type, std::string_view value, error_handler& err, int32_t line, news_context& context) {
2747 // TODO: Add news patterns to database
2748 context.map_of_news_pattern_names.insert_or_assign(std::string(value), int32_t(line));
2749 }
2750 void finish(news_context& context) {}
2751};
2753 void finish(news_context& context) { }
2754};
2756 void finish(news_context& context) { }
2757};
2759 void finish(news_context& context) { }
2760};
2762 void finish(news_context& context) { }
2763};
2765 void finish(news_context& context) { }
2766};
2769 int32_t game_event = 0;
2774 int32_t battle_over = 0;
2776 int32_t new_party = 0;
2777 int32_t war_declared = 0;
2778 int32_t crisis_started = 0;
2779 int32_t crisis_backer = 0;
2781 int32_t crisis_resolved = 0;
2782 int32_t decision = 0;
2784 int32_t ai_afraid_of = 0;
2786 int32_t fake = 0;
2787 void finish(news_context& context) { }
2788};
2790 void finish(news_context& context) { }
2791};
2793 void finish(news_context& context) { }
2794};
2796 void finish(news_context& context) { }
2797};
2799 void any_group(std::string_view name, news_pattern_instance, error_handler& err, int32_t line, news_context& context) {
2800 if(auto it = context.map_of_news_pattern_names.find(std::string(name)); it != context.map_of_news_pattern_names.end()) {
2801 //do something
2802 } else {
2803 err.accumulated_errors += "Unknown news pattern " + std::string(name) + " in file " + err.file_name + " line " + std::to_string(line) + "\n";
2804 }
2805 }
2806 void finish(news_context& context) { }
2807};
2808
2811};
2814};
2817};
2818struct tutorial {
2820};
2823};
2824
2827};
2830};
2833};
2834
2836 void finish(building_gfx_context& context) { }
2837};
2838struct sfx_file {
2839 void finish(building_gfx_context& context) { }
2840};
2841
2842void make_leader_images(scenario_building_context& outer_context);
2843
2844struct bookmark_context;
2845
2848 std::string name_ = "fe_new_game";
2849
2851 date_ = value;
2852 }
2853 void name(association_type, std::string_view value, error_handler& err, int32_t line, bookmark_context& ) {
2854 name_ = std::string(value);
2855 }
2857};
2858
2860 std::vector<bookmark_definition> bookmark_dates;
2861};
2862
2864 void bookmark(bookmark_definition const& value, error_handler& err, int32_t line, bookmark_context& context) {
2865 context.bookmark_dates.push_back(value);
2866 }
2867 void finish(bookmark_context& context) {
2868 if(context.bookmark_dates.empty()) {
2869 context.bookmark_dates.push_back(bookmark_definition{ sys::year_month_day{ 1836, 1, 1 }, std::string("fe_new_game") });
2870 }
2871 }
2872};
2873
2875 bool rtl = false;
2877 std::string display_name;
2878 std::string script = "Latn";
2879 std::string body_font;
2880 std::string header_font;
2881 std::string map_font;
2882 std::string fallback;
2883 std::vector<uint32_t> body_features;
2884 std::vector<uint32_t> header_features;
2885 std::vector<uint32_t> map_features;
2886
2887 void body_feature(association_type, std::string_view value, error_handler& err, int32_t line, sys::state&);
2888 void header_feature(association_type, std::string_view value, error_handler& err, int32_t line, sys::state&);
2889 void map_feature(association_type, std::string_view value, error_handler& err, int32_t line, sys::state&);
2890
2891 void finish(sys::state& context) { }
2892};
2893
2894void add_locale(sys::state& state, std::string_view locale_name, char const* data_start, char const* data_end);
2895
2896} // namespace parsers
2897
2898#include "trigger_parsing.hpp"
2899#include "effect_parsing.hpp"
2900#include "cultures_parsing.hpp"
2901#include "parser_defs_generated.hpp"
2902#include "tutorial_parser_defs_generated.hpp"
2903#include "news_parser_defs_generated.hpp"
2904#include "gui_parser_defs_generated.hpp"
2905#include "trigger_parser_defs_generated.hpp"
2906#include "effect_parser_defs_generated.hpp"
std::string accumulated_errors
Definition: parsers.hpp:62
std::string file_name
Definition: parsers.hpp:61
value_type & safe_get(tag_type t)
issue_category
Definition: culture.hpp:177
tech_category
Definition: culture.hpp:106
province_building_type
Definition: constants.hpp:578
Definition: events.cpp:8
focus_type
Definition: nations.hpp:40
void read_pop_ideology(std::string_view name, token_generator &gen, error_handler &err, poptype_context &context)
void register_crime(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void m_disarming(token_generator &gen, error_handler &err, scenario_building_context &context)
bool province_button_allow(token_generator &gen, error_handler &err, building_gfx_context &context)
void m_infrastructure(token_generator &gen, error_handler &err, scenario_building_context &context)
void parse_csv_pop_history_file(sys::state &state, const char *start, const char *end, error_handler &err, scenario_building_context &context)
void make_issues_group(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void m_hard_ai(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key cb_allowed_substates(token_generator &gen, error_handler &err, individual_cb_context &context)
commodity_array stub_commodity_array(token_generator &gen, error_handler &err, poptype_context &context)
void register_technology(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void personality_traits_set(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_land_province(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_climate_definition(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void read_map_adjacency(char const *start, char const *end, error_handler &err, scenario_building_context &context)
void read_pending_rebel_type(dcon::rebel_type_id id, token_generator &gen, error_handler &err, scenario_building_context &context)
void make_oob_relationship(std::string_view tag, token_generator &gen, error_handler &err, oob_file_context &context)
dcon::effect_key cb_on_add(token_generator &gen, error_handler &err, individual_cb_context &context)
void m_no_adjacent_controlled(token_generator &gen, error_handler &err, scenario_building_context &context)
void read_pop_issue(std::string_view name, token_generator &gen, error_handler &err, poptype_context &context)
void register_trigger(token_generator &gen, error_handler &err, triggered_modifier_context &context)
dcon::trigger_key read_triggered_modifier_condition(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key make_inv_limit(token_generator &gen, error_handler &err, invention_context &context)
void m_badboy(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::effect_key cb_on_po_accepted(token_generator &gen, error_handler &err, individual_cb_context &context)
dcon::trigger_key cb_allowed_states(token_generator &gen, error_handler &err, individual_cb_context &context)
dcon::value_modifier_key make_reb_will_rise(token_generator &gen, error_handler &err, rebel_context &context)
std::string lowercase_str(std::string_view sv)
void m_total_occupation(token_generator &gen, error_handler &err, scenario_building_context &context)
oob_leader make_army_leader(token_generator &gen, error_handler &err, oob_file_army_context &context)
void m_civ_nation(token_generator &gen, error_handler &err, scenario_building_context &context)
void register_ideology(std::string_view name, token_generator &gen, error_handler &err, ideology_group_context &context)
void make_alliance(token_generator &gen, error_handler &err, scenario_building_context &context)
association_type
Definition: parsers.hpp:28
void make_goods_group(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void read_c_migration_target(token_generator &gen, error_handler &err, poptype_context &context)
void make_unit_names_list(std::string_view name, token_generator &gen, error_handler &err, country_file_context &context)
void m_base_values(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_has_siege(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::value_modifier_key ideology_condition(token_generator &gen, error_handler &err, individual_ideology_context &context)
void parse_csv_province_history_file(sys::state &state, const char *start, const char *end, error_handler &err, scenario_building_context &context)
void scan_province_event(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key make_production_bonus_trigger(token_generator &gen, error_handler &err, production_context &context)
void make_triggered_modifier(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void make_oob_ship(token_generator &gen, error_handler &err, oob_file_navy_context &context)
void m_second_power(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_non_coastal(token_generator &gen, error_handler &err, scenario_building_context &context)
void register_invention(std::string_view name, token_generator &gen, error_handler &err, tech_group_context &context)
void m_easy_ai(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key make_event_trigger(token_generator &gen, error_handler &err, event_building_context &context)
void read_pending_technology(dcon::technology_id id, token_generator &gen, error_handler &err, scenario_building_context &context)
void enter_war_dated_block(std::string_view label, token_generator &gen, error_handler &err, war_history_context &context)
void make_religion(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
bool province_button_effect(token_generator &gen, error_handler &err, building_gfx_context &context)
void make_opt_allow(token_generator &gen, error_handler &err, individual_option_context &context)
void commit_pending_events(error_handler &err, scenario_building_context &context)
oob_leader make_navy_leader(token_generator &gen, error_handler &err, oob_file_navy_context &context)
void m_easy_player(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_overseas(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key make_reb_enforced_trigger(token_generator &gen, error_handler &err, rebel_context &context)
dcon::trigger_key make_reb_s_won_trigger(token_generator &gen, error_handler &err, rebel_context &context)
dcon::trigger_key cb_can_use(token_generator &gen, error_handler &err, individual_cb_context &context)
dcon::effect_key make_reb_s_won_effect(token_generator &gen, error_handler &err, rebel_context &context)
void register_option(std::string_view name, token_generator &gen, error_handler &err, issue_context &context)
void make_event_modifier(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key make_focus_limit(token_generator &gen, error_handler &err, national_focus_context &context)
void make_oob_navy(token_generator &gen, error_handler &err, oob_file_context &context)
dcon::value_modifier_key make_poptype_pop_chance(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_issue(std::string_view name, token_generator &gen, error_handler &err, issue_group_context &context)
void make_trait(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void make_oob_regiment(token_generator &gen, error_handler &err, oob_file_army_context &context)
dcon::effect_key make_decision_effect(token_generator &gen, error_handler &err, decision_context &context)
void enter_country_file_dated_block(std::string_view label, token_generator &gen, error_handler &err, country_history_context &context)
void read_pending_reform(dcon::reform_option_id id, token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::value_modifier_key make_ai_chance(token_generator &gen, error_handler &err, tech_context &context)
void m_coastal_sea(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_good(std::string_view name, token_generator &gen, error_handler &err, good_group_context &context)
Definition: econ_parsing.cpp:6
void make_focus_group(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void read_pending_invention(dcon::invention_id id, token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::value_modifier_key make_event_mtth(token_generator &gen, error_handler &err, event_building_context &context)
void read_migration_target(token_generator &gen, error_handler &err, poptype_context &context)
void make_oob_army(token_generator &gen, error_handler &err, oob_file_context &context)
void m_peace(token_generator &gen, error_handler &err, scenario_building_context &context)
void read_pending_option(dcon::issue_option_id id, token_generator &gen, error_handler &err, scenario_building_context &context)
void make_issue_vote_modifier(std::string_view name, token_generator &gen, error_handler &err, individual_option_context &context)
dcon::value_modifier_key make_reb_movement_eval(token_generator &gen, error_handler &err, rebel_context &context)
void background_traits_set(token_generator &gen, error_handler &err, scenario_building_context &context)
void scan_country_event(token_generator &gen, error_handler &err, scenario_building_context &context)
void read_pending_crime(dcon::crime_id id, token_generator &gen, error_handler &err, scenario_building_context &context)
void m_very_easy_ai(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_party(token_generator &gen, error_handler &err, country_file_context &context)
void m_average_literacy(token_generator &gen, error_handler &err, scenario_building_context &context)
bool is_fixed_token_ci(char const *start, char const *end, char const (&t)[N])
Definition: parsers.hpp:275
dcon::trigger_key make_decision_trigger(token_generator &gen, error_handler &err, decision_context &context)
void make_vassal(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_plurality(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_leader_images(scenario_building_context &outer_context)
sys::event_option make_event_option(token_generator &gen, error_handler &err, event_building_context &context)
void make_state_definition(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void register_cb_type(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void make_ln_list(token_generator &gen, error_handler &err, culture_context &context)
dcon::effect_key make_execute_effect(token_generator &gen, error_handler &err, individual_option_context &context)
void make_decision(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void m_great_power(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_hard_player(token_generator &gen, error_handler &err, scenario_building_context &context)
void add_locale(sys::state &state, std::string_view locale_name, char const *data_start, char const *data_end)
void make_tech_folder_list(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key make_execute_trigger(token_generator &gen, error_handler &err, individual_option_context &context)
bool nation_button_allow(token_generator &gen, error_handler &err, building_gfx_context &context)
void make_culture_group(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void make_pop_province_list(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void make_terrain_modifier(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void read_school_modifier(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void make_fn_list(token_generator &gen, error_handler &err, culture_context &context)
void m_very_hard_player(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_national_value(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void m_debt_default_to(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_production_type(std::string_view name, token_generator &gen, error_handler &err, production_context &context)
void m_unciv_nation(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_occupied(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_very_easy_player(token_generator &gen, error_handler &err, scenario_building_context &context)
void read_promotion_target(std::string_view name, token_generator &gen, error_handler &err, poptype_context &context)
dcon::effect_key make_immediate_effect(token_generator &gen, error_handler &err, event_building_context &context)
void m_core(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key cb_allowed_countries(token_generator &gen, error_handler &err, individual_cb_context &context)
dcon::effect_key make_reb_enforce_effect(token_generator &gen, error_handler &err, rebel_context &context)
void m_generalised_debt_default(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_substate(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_continent_definition(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::value_modifier_key make_decision_ai_choice(token_generator &gen, error_handler &err, decision_context &context)
dcon::value_modifier_key make_reb_spawn_chance(token_generator &gen, error_handler &err, rebel_context &context)
void enter_dated_block(std::string_view name, token_generator &gen, error_handler &err, province_file_context &context)
void m_bad_debter(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key make_party_trigger(token_generator &gen, error_handler &err, party_context &context)
void make_ideology_group(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void make_unit(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void m_total_blockaded(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key cb_allowed_crisis_states(token_generator &gen, error_handler &err, individual_cb_context &context)
dcon::value_modifier_key make_inv_chance(token_generator &gen, error_handler &err, invention_context &context)
void m_nationalism(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_war_exhaustion(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_very_hard_ai(token_generator &gen, error_handler &err, scenario_building_context &context)
void make_base_units(scenario_building_context &context)
void gfx_add_obj(parsers::token_generator &gen, parsers::error_handler &err, building_gfx_context &context)
void make_focus(std::string_view name, token_generator &gen, error_handler &err, national_focus_context &context)
void m_sea_zone(token_generator &gen, error_handler &err, scenario_building_context &context)
void register_rebel_type(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
bool nation_button_effect(token_generator &gen, error_handler &err, building_gfx_context &context)
void make_government(std::string_view name, token_generator &gen, error_handler &err, scenario_building_context &context)
void m_in_bankrupcy(token_generator &gen, error_handler &err, scenario_building_context &context)
dcon::trigger_key make_crime_trigger(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_blockaded(token_generator &gen, error_handler &err, scenario_building_context &context)
void m_coastal(token_generator &gen, error_handler &err, scenario_building_context &context)
void read_map_colors(char const *start, char const *end, error_handler &err, scenario_building_context &context)
void make_culture(std::string_view name, token_generator &gen, error_handler &err, culture_group_context &context)
commodity_array make_prod_commodity_array(token_generator &gen, error_handler &err, production_context &context)
void m_war(token_generator &gen, error_handler &err, scenario_building_context &context)
commodity_group
Definition: constants.hpp:223
Definition: bmfont.cpp:118
uint uint32_t
uchar uint8_t
#define MOD_NAT_FUNCTION(X)
#define MOD_PROV_FUNCTION(X)
void second(association_type, std::string_view tag, error_handler &err, int32_t line, scenario_building_context &context)
void end_date(association_type, sys::year_month_day ymd, error_handler &err, int32_t line, scenario_building_context &context)
void first(association_type, std::string_view tag, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void start_date(association_type, sys::year_month_day ymd, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &context)
void finish(scenario_building_context &context)
void finish(scenario_building_context &context)
std::vector< bookmark_definition > bookmark_dates
void name(association_type, std::string_view value, error_handler &err, int32_t line, bookmark_context &)
void date(association_type, sys::year_month_day value, error_handler &err, int32_t line, bookmark_context &)
void bookmark(bookmark_definition const &value, error_handler &err, int32_t line, bookmark_context &context)
void finish(bookmark_context &context)
void type(association_type, std::string_view value, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &context)
economy::province_building_type stored_type
void result(std::string_view name, building_definition &&res, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &context)
std::vector< pending_button_script > province_buttons_allow
std::vector< pending_button_script > nation_buttons_allow
std::vector< pending_button_script > nation_buttons_effect
std::vector< simple_fs::file > gui_files
std::vector< pending_button_script > province_buttons_effect
ankerl::unordered_dense::map< std::string, dcon::gfx_object_id > map_of_names
ankerl::unordered_dense::map< std::string, dcon::texture_id > map_of_texture_names
building_gfx_context(sys::state &full_state, ui::definitions &ui_defs)
void spritetype(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void buttontext(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void clicksound(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void format(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void shortcut(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void buttonfont(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void months(association_type, int32_t value, error_handler &err, int32_t line, individual_cb_context &context)
void po_status_quo(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void good_relation_prestige_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void break_truce_infamy_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void po_demand_state(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void allowed_substate_regions(dcon::trigger_key value, error_handler &err, int32_t line, individual_cb_context &context)
void allowed_states(dcon::trigger_key value, error_handler &err, int32_t line, individual_cb_context &context)
void po_make_puppet(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void break_truce_prestige_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void truce_months(association_type, int32_t value, error_handler &err, int32_t line, individual_cb_context &context)
void crisis(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void po_destroy_forts(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void po_gunboat(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void po_install_communist_gov_type(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void po_remove_prestige(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void po_annex(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void on_add(dcon::effect_key value, error_handler &err, int32_t line, individual_cb_context &context)
void po_destroy_naval_bases(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void is_civil_war(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void construction_speed(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void good_relation_infamy_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void allowed_states_in_crisis(dcon::trigger_key value, error_handler &err, int32_t line, individual_cb_context &context)
void badboy_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void constructing_cb(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void po_transfer_provinces(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void all_allowed_states(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void sprite_index(association_type, int32_t value, error_handler &err, int32_t line, individual_cb_context &context)
void po_clear_union_sphere(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void po_disarmament(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void good_relation_militancy_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void po_remove_cores(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void penalty_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void tws_battle_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void po_reparations(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void always(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void allowed_countries(dcon::trigger_key value, error_handler &err, int32_t line, individual_cb_context &context)
void on_po_accepted(dcon::effect_key value, error_handler &err, int32_t line, individual_cb_context &context)
void finish(individual_cb_context &context)
void po_release_puppet(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void break_truce_militancy_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void peace_cost_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void prestige_factor(association_type, float value, error_handler &err, int32_t line, individual_cb_context &context)
void po_colony(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void is_triggered_only(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void war_name(association_type, std::string_view value, error_handler &err, int32_t line, individual_cb_context &context)
void po_add_to_sphere(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void po_uninstall_communist_gov_type(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void great_war_obligatory(association_type, bool value, error_handler &err, int32_t line, individual_cb_context &context)
void can_use(dcon::trigger_key value, error_handler &err, int32_t line, individual_cb_context &context)
void finish(scenario_building_context &)
void free_value(std::string_view text, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
scenario_building_context & outer_context
void free_value(int32_t value, error_handler &err, int32_t line, climate_building_context &context)
void finish(climate_building_context &)
void finish(scenario_building_context &)
void free_value(float v, error_handler &err, int32_t line, T &context)
void free_value(int32_t v, error_handler &err, int32_t line, T &context)
tagged_vector< float, dcon::commodity_id > data
void finish(scenario_building_context &context)
void any_value(std::string_view name, association_type, float value, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view name, association_type, float value, error_handler &err, int32_t line, scenario_building_context &context)
scenario_building_context & outer_context
void free_value(int32_t value, error_handler &err, int32_t line, continent_building_context &context)
void finish(continent_building_context &)
void finish(scenario_building_context &)
void free_value(int32_t value, error_handler &err, int32_t line, continent_building_context &context)
void finish(continent_building_context &)
scenario_building_context & outer_context
unit_names_collection unit_names
void any_group(std::string_view name, color_from_3i, error_handler &err, int32_t line, country_file_context &context)
void finish(country_file_context &)
void template_(association_type, std::string_view value, error_handler &err, int32_t line, country_file_context &context)
void color(color_from_3i cvalue, error_handler &err, int32_t line, country_file_context &context)
dcon::national_identity_id nat_ident
scenario_building_context & outer_context
std::vector< std::pair< dcon::nation_id, dcon::decision_id > > & pending_decisions
void is_releasable_vassal(association_type, bool value, error_handler &err, int32_t line, country_history_context &context)
void ruling_party(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void prestige(association_type, float value, error_handler &err, int32_t line, country_history_context &context)
void govt_flag(govt_flag_block const &value, error_handler &err, int32_t line, country_history_context &context)
void remove_culture(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void set_country_flag(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void non_state_culture_literacy(association_type, float value, error_handler &err, int32_t line, country_history_context &context)
void religion(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void literacy(association_type, float value, error_handler &err, int32_t line, country_history_context &context)
void any_value(std::string_view label, association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void civilized(association_type, bool value, error_handler &err, int32_t line, country_history_context &context)
void consciousness(association_type, float value, error_handler &err, int32_t line, country_history_context &context)
void set_global_flag(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void nationalvalue(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void finish(country_history_context &)
void plurality(association_type, float value, error_handler &err, int32_t line, country_history_context &context)
void capital(association_type, int32_t value, error_handler &err, int32_t line, country_history_context &context)
foreign_investment_block foreign_investment
void primary_culture(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void schools(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void government(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void nonstate_consciousness(association_type, float value, error_handler &err, int32_t line, country_history_context &context)
void colonial_points(association_type, int32_t value, error_handler &err, int32_t line, country_history_context &context)
void finish(scenario_building_context &)
scenario_building_context & outer_context
void finish(scenario_building_context &context)
scenario_building_context & outer_context
void leader(association_type, std::string_view name, error_handler &err, int32_t line, culture_group_context &context)
void union_tag(association_type, uint32_t v, error_handler &err, int32_t line, culture_group_context &context)
void finish(culture_group_context &context)
void is_overseas(association_type, bool v, error_handler &err, int32_t line, culture_group_context &context)
void color(color_from_3i v, error_handler &err, int32_t line, culture_context &context)
void finish(culture_context &context)
void radicalism(association_type, int32_t v, error_handler &err, int32_t line, culture_context &context)
scenario_building_context & outer_context
void finish(scenario_building_context &)
void finish(scenario_building_context &)
void ai_will_do(dcon::value_modifier_key value, error_handler &err, int32_t line, decision_context &context)
void potential(dcon::trigger_key value, error_handler &err, int32_t line, decision_context &context)
void finish(decision_context &)
void picture(association_type, std::string_view value, error_handler &err, int32_t line, decision_context &context)
void allow(dcon::trigger_key value, error_handler &err, int32_t line, decision_context &context)
void finish(scenario_building_context &)
void max_provinces(association_type, int32_t value, error_handler &err, int32_t line, scenario_building_context &context)
void free_value(std::string_view value, error_handler &err, int32_t line, T &context)
std::vector< std::string > names
void finish(scenario_building_context &)
scenario_building_context & outer_context
void finish(scenario_building_context &)
void finish(scenario_building_context &)
void finish(national_focus_context &)
void finish(country_history_context &)
void any_value(std::string_view tag, association_type, float v, error_handler &err, int32_t line, country_history_context &context)
void finish(event_building_context &context)
void option(sys::event_option const &value, error_handler &err, int32_t line, event_building_context &context)
void picture(association_type, std::string_view value, error_handler &err, int32_t line, event_building_context &context)
std::array< sys::event_option, sys::max_event_options > options
dcon::value_modifier_key mean_time_to_happen
void title(association_type, std::string_view value, error_handler &err, int32_t line, event_building_context &context)
void desc(association_type, std::string_view value, error_handler &err, int32_t line, event_building_context &context)
void immediate(dcon::effect_key value, error_handler &err, int32_t line, event_building_context &context)
void issue_group(association_type, std::string_view value, error_handler &err, int32_t line, event_building_context &context)
void finish(building_gfx_context &context)
void textspritetype(gfx_object const &obj, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void linecharttype(gfx_object const &obj, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void progressbartype(gfx_object const &obj, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void piecharttype(gfx_object const &obj, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void corneredtilespritetype(gfx_object const &obj, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void maskedshieldtype(gfx_object const &obj, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void barcharttype(gfx_object const &obj, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void spritetype(gfx_object const &obj, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void finish(building_gfx_context const &context)
void tilespritetype(gfx_object const &obj, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void clicksound(parsers::association_type, std::string_view, parsers::error_handler &err, int32_t line, building_gfx_context &context)
void finish(building_gfx_context &context)
std::optional< gfx_xy_pair > size_obj
std::string_view secondary_texture
std::optional< int32_t > size
std::string_view primary_texture
std::optional< gfx_xy_pair > bordersize
void finish(building_gfx_context &context)
void free_value(int32_t v, error_handler &err, int32_t line, building_gfx_context &context)
scenario_building_context & outer_context
scenario_building_context & outer_context
void overseas_penalty(association_type, bool b, error_handler &err, int32_t line, good_context &context)
void available_from_start(association_type, bool b, error_handler &err, int32_t line, good_context &context)
void cost(association_type, float v, error_handler &err, int32_t line, good_context &context)
void finish(good_context &context)
void color(color_from_3i v, error_handler &err, int32_t line, good_context &context)
void money(association_type, bool v, error_handler &err, int32_t line, good_context &context)
void finish(scenario_building_context &context)
void finish(good_group_context &context)
scenario_building_context & outer_context
void duration(association_type, int32_t value, error_handler &err, int32_t line, government_type_context &context)
void any_value(std::string_view text, association_type, bool value, error_handler &err, int32_t line, government_type_context &context)
void appoint_ruling_party(association_type, bool value, error_handler &err, int32_t line, government_type_context &context)
void finish(government_type_context &)
void election(association_type, bool value, error_handler &err, int32_t line, government_type_context &context)
void flagtype(association_type, std::string_view value, error_handler &err, int32_t line, government_type_context &context)
void finish(scenario_building_context &)
dcon::government_type_id government_
void flag(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void government(association_type, std::string_view value, error_handler &err, int32_t line, country_history_context &context)
void finish(country_history_context &)
void extends(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void rotation(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void maxsize(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
void orientation(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void finish(building_gfx_context &context)
void table_layout(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
void position(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
void add_position(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
void maxwidth(association_type, int32_t v, error_handler &err, int32_t line, building_gfx_context &context)
void name(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void maxheight(association_type, int32_t v, error_handler &err, int32_t line, building_gfx_context &context)
void size(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
void add_size(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
void finish(building_gfx_context &context)
void positiontype(gui_element_common const &v, error_handler &err, int32_t line, building_gfx_context &context)
void editboxtype(textbox const &v, error_handler &err, int32_t line, building_gfx_context &context)
void windowtype(window const &v, error_handler &err, int32_t line, building_gfx_context &context)
void checkboxtype(button const &v, error_handler &err, int32_t line, building_gfx_context &context)
void textboxtype(textbox const &v, error_handler &err, int32_t line, building_gfx_context &context)
void listboxtype(listbox const &v, error_handler &err, int32_t line, building_gfx_context &context)
void overlappingelementsboxtype(overlapping const &v, error_handler &err, int32_t line, building_gfx_context &context)
void shieldtype(image const &v, error_handler &err, int32_t line, building_gfx_context &context)
void finish(building_gfx_context &context)
void provincescriptbuttontype(province_script_button const &v, error_handler &err, int32_t line, building_gfx_context &context)
void scrollbartype(scrollbar const &v, error_handler &err, int32_t line, building_gfx_context &context)
void eu3dialogtype(window const &v, error_handler &err, int32_t line, building_gfx_context &context)
void icontype(image const &v, error_handler &err, int32_t line, building_gfx_context &context)
void instanttextboxtype(textbox const &v, error_handler &err, int32_t line, building_gfx_context &context)
void guibuttontype(button const &v, error_handler &err, int32_t line, building_gfx_context &context)
void nationscriptbuttontype(nation_script_button const &v, error_handler &err, int32_t line, building_gfx_context &context)
void country(association_type, std::string_view tag, error_handler &err, int32_t line, war_history_context &context)
void casus_belli(association_type, std::string_view value, error_handler &err, int32_t line, war_history_context &context)
void actor(association_type, std::string_view tag, error_handler &err, int32_t line, war_history_context &context)
void receiver(association_type, std::string_view tag, error_handler &err, int32_t line, war_history_context &context)
void state_province_id(association_type t, int32_t value, error_handler &err, int32_t line, war_history_context &context)
void finish(war_history_context &)
void finish(scenario_building_context &context)
scenario_building_context & outer_context
void finish(ideology_group_context &context)
void frame(association_type, uint32_t v, error_handler &err, int32_t line, building_gfx_context &context)
void spritetype(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void scale(association_type, float v, error_handler &err, int32_t line, building_gfx_context &context)
::culture::income_type itype
void finish(poptype_context &)
void type(association_type, std::string_view value, error_handler &err, int32_t line, poptype_context &context)
scenario_building_context & outer_context
void remove_social_reform(dcon::value_modifier_key value, error_handler &err, int32_t line, individual_ideology_context &context)
void color(color_from_3i cvalue, error_handler &err, int32_t line, individual_ideology_context &context)
void can_reduce_militancy(association_type, bool value, error_handler &err, int32_t line, individual_ideology_context &context)
void date(association_type, sys::year_month_day ymd, error_handler &err, int32_t line, individual_ideology_context &context)
void add_social_reform(dcon::value_modifier_key value, error_handler &err, int32_t line, individual_ideology_context &context)
void uncivilized(association_type, bool value, error_handler &err, int32_t line, individual_ideology_context &context)
void remove_political_reform(dcon::value_modifier_key value, error_handler &err, int32_t line, individual_ideology_context &context)
void add_military_reform(dcon::value_modifier_key value, error_handler &err, int32_t line, individual_ideology_context &context)
void civilized(association_type, bool value, error_handler &err, int32_t line, individual_ideology_context &context)
void finish(individual_ideology_context &)
void add_economic_reform(dcon::value_modifier_key value, error_handler &err, int32_t line, individual_ideology_context &context)
void add_political_reform(dcon::value_modifier_key value, error_handler &err, int32_t line, individual_ideology_context &context)
scenario_building_context & outer_context
scenario_building_context & outer_context
std::vector< int32_t > data
void free_value(int32_t v, error_handler &err, int32_t line, T &context)
void plurality(association_type, float value, error_handler &err, int32_t line, invention_context &context)
void gas_attack(association_type, bool value, error_handler &err, int32_t line, invention_context &context)
void shared_prestige(association_type, float value, error_handler &err, int32_t line, invention_context &context)
inv_fac_goods_output factory_goods_output
inv_rgo_goods_output rgo_goods_output
void activate_unit(association_type, std::string_view value, error_handler &err, int32_t line, invention_context &context)
inv_fac_goods_throughput factory_goods_throughput
void activate_building(association_type, std::string_view value, error_handler &err, int32_t line, invention_context &context)
void gas_defence(association_type, bool value, error_handler &err, int32_t line, invention_context &context)
void any_group(std::string_view label, unit_modifier_body const &value, error_handler &err, int32_t line, invention_context &context)
void rebel_org_gain(inv_rebel_org_gain const &value, error_handler &err, int32_t line, invention_context &context)
void enable_crime(association_type, std::string_view value, error_handler &err, int32_t line, invention_context &context)
void any_value(std::string_view name, association_type, int32_t value, error_handler &err, int32_t line, invention_context &context)
void colonial_points(association_type, int32_t value, error_handler &err, int32_t line, invention_context &context)
void finish(invention_context &)
void any_value(std::string_view label, association_type, float value, error_handler &err, int32_t line, invention_context &context)
void any_value(std::string_view label, association_type, float value, error_handler &err, int32_t line, invention_context &context)
void finish(invention_context &)
void faction(association_type, std::string_view v, error_handler &err, int32_t line, invention_context &context)
void finish(invention_context &)
void any_value(std::string_view label, association_type, float value, error_handler &err, int32_t line, invention_context &context)
void limit(dcon::trigger_key value, error_handler &err, int32_t line, invention_context &context)
void shared_prestige(association_type, float value, error_handler &err, int32_t line, invention_context &context)
void chance(dcon::value_modifier_key value, error_handler &err, int32_t line, invention_context &context)
scenario_building_context & outer_context
void finish(tech_group_context &)
scenario_building_context & outer_context
scenario_building_context & outer_context
issue_group_context(scenario_building_context &outer_context, ::culture::issue_category issue_cat)
::culture::issue_category issue_cat
void technology_cost(association_type, int32_t value, error_handler &err, int32_t line, individual_option_context &context)
void is_jingoism(association_type, bool value, error_handler &err, int32_t line, individual_roption_context &context)
void administrative_multiplier(association_type, float value, error_handler &err, int32_t line, individual_option_context &context)
void on_execute(on_execute_body const &value, error_handler &err, int32_t line, individual_option_context &context)
void war_exhaustion_effect(association_type, float value, error_handler &err, int32_t line, individual_option_context &context)
void is_jingoism(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void vote_modifiers(vote_modifiers_body const &value, error_handler &err, int32_t line, individual_option_context &context)
void vote_modifiers(vote_modifiers_body const &value, error_handler &err, int32_t line, individual_roption_context &context)
void finish(reform_context &)
void administrative(association_type, bool value, error_handler &err, int32_t line, issue_context &context)
void next_step_only(association_type, bool value, error_handler &err, int32_t line, issue_context &context)
void finish(issue_context &)
void finish(scenario_building_context &)
void finish(issue_group_context &)
void offset(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
void bordersize(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
void background(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void spacing(association_type, uint32_t v, error_handler &err, int32_t line, building_gfx_context &context)
void finish(sys::state &context)
std::vector< uint32_t > map_features
std::vector< uint32_t > header_features
std::vector< uint32_t > body_features
void body_feature(association_type, std::string_view value, error_handler &err, int32_t line, sys::state &)
void header_feature(association_type, std::string_view value, error_handler &err, int32_t line, sys::state &)
void map_feature(association_type, std::string_view value, error_handler &err, int32_t line, sys::state &)
void promotion_chance(dcon::value_modifier_key value, error_handler &err, int32_t line, scenario_building_context &context)
void conversion_chance(dcon::value_modifier_key value, error_handler &err, int32_t line, scenario_building_context &context)
void emigration_chance(dcon::value_modifier_key value, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void assimilation_chance(dcon::value_modifier_key value, error_handler &err, int32_t line, scenario_building_context &context)
void demotion_chance(dcon::value_modifier_key value, error_handler &err, int32_t line, scenario_building_context &context)
void migration_chance(dcon::value_modifier_key value, error_handler &err, int32_t line, scenario_building_context &context)
void colonialmigration_chance(dcon::value_modifier_key value, error_handler &err, int32_t line, scenario_building_context &context)
void finish(mod_file_context &context)
void dependencies(dependencies_list const &value, error_handler &err, int32_t line, mod_file_context &context)
std::vector< std::string > dependent_mods
void path(association_type, std::string_view value, error_handler &err, int32_t line, mod_file_context &context)
void name(association_type, std::string_view value, error_handler &err, int32_t line, mod_file_context &context)
void replace_path(association_type, std::string_view value, error_handler &err, int32_t line, mod_file_context &context)
void add_to_file_system(simple_fs::file_system &fs)
void user_dir(association_type, std::string_view value, error_handler &err, int32_t line, mod_file_context &context)
std::vector< std::string > replace_paths
void global_population_growth(association_type, float v, error_handler &err, int32_t line, T &context)
void icon(association_type, uint32_t v, error_handler &err, int32_t line, T &context)
void defence(association_type, float v, error_handler &err, int32_t line, T &context)
void immigration(association_type, float v, error_handler &err, int32_t line, T &context)
void pop_growth(association_type, float v, error_handler &err, int32_t line, T &context)
void m_rgo_size(association_type, float v, error_handler &err, int32_t line, T &context)
sys::national_modifier_definition const & peek_national_mod() const
sys::provincial_modifier_definition constructed_definition_p
void defender(association_type, float v, error_handler &err, int32_t line, T &context)
void tax_efficiency(association_type, float v, error_handler &err, int32_t line, T &context)
void attacker(association_type, float v, error_handler &err, int32_t line, T &context)
sys::provincial_modifier_definition const & peek_province_mod() const
void unit_start_experience(association_type type, float v, error_handler &err, int32_t line, T &context)
sys::national_modifier_definition constructed_definition_n
sys::national_modifier_definition force_national_mod() const
scenario_building_context & outer_context
void free_value(std::string_view text, error_handler &err, int32_t line, names_context &context)
void finish(names_context &context)
void allow(bool, error_handler &err, int32_t line, building_gfx_context &context)
scenario_building_context & outer_context
void finish(scenario_building_context &)
void has_flashpoint(association_type, bool value, error_handler &err, int32_t line, national_focus_context &context)
void flashpoint_tension(association_type, float value, error_handler &err, int32_t line, national_focus_context &context)
void railroads(association_type, float value, error_handler &err, int32_t line, national_focus_context &context)
void finish(national_focus_context &)
void ideology(association_type, std::string_view value, error_handler &err, int32_t line, national_focus_context &context)
void limit(dcon::trigger_key value, error_handler &err, int32_t line, national_focus_context &context)
void any_value(std::string_view label, association_type, float value, error_handler &err, int32_t line, national_focus_context &context)
void loyalty_value(association_type, float value, error_handler &err, int32_t line, national_focus_context &context)
void finish(scenario_building_context &context)
void any_value(std::string_view tag, association_type, std::string_view txt, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
int32_t crisis_resolved
int32_t construction_complete
int32_t war_declared
int32_t goods_price_change
int32_t game_event
void finish(news_context &context)
int32_t crisis_started
int32_t province_change_owner
int32_t province_change_controller
int32_t rebel_break_country
int32_t ai_afraid_of
int32_t peace_offer_accept
int32_t new_party
int32_t battle_over
int32_t crisis_side_joined
int32_t ai_likes_very_much
int32_t fake
int32_t research_complete
int32_t crisis_backer
void finish(news_context &context)
news_context(scenario_building_context &outer_context)
scenario_building_context & outer_context
ankerl::unordered_dense::map< std::string, int32_t > map_of_news_pattern_names
void finish(news_context &context)
void any_group(std::string_view name, news_pattern_instance, error_handler &err, int32_t line, news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void name(association_type, std::string_view value, error_handler &err, int32_t line, news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(news_context &context)
void finish(scenario_building_context &)
s_on_election_tick on_election_tick
s_on_quarterly_pulse on_quarterly_pulse
s_on_my_factories_nationalized on_my_factories_nationalized
s_on_colony_to_state on_colony_to_state
s_on_colony_to_state_free_slaves on_colony_to_state_free_slaves
s_on_lost_great_nation on_lost_great_nation
s_on_state_conquest on_state_conquest
s_on_debtor_default_second on_debtor_default_second
s_on_election_finished on_election_finished
s_on_debtor_default on_debtor_default
s_on_crisis_declare_interest on_crisis_declare_interest
s_on_new_great_nation on_new_great_nation
s_on_debtor_default_small on_debtor_default_small
s_on_election_started on_election_started
void finish(individual_roption_context &)
void finish(individual_option_context &)
void location(association_type, int32_t value, error_handler &err, int32_t line, oob_file_army_context &context)
void name(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_army_context &context)
void leader(oob_leader const &value, error_handler &err, int32_t line, oob_file_army_context &context)
void finish(oob_file_army_context &)
scenario_building_context & outer_context
scenario_building_context & outer_context
scenario_building_context & outer_context
scenario_building_context & outer_context
scenario_building_context & outer_context
scenario_building_context & outer_context
void finish(oob_file_context &)
void leader(oob_leader const &value, error_handler &err, int32_t line, oob_file_context &context)
dcon::leader_trait_id background_
void background(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_context &context)
void date(association_type, sys::year_month_day value, error_handler &err, int32_t line, oob_file_context &context)
void name(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_context &context)
void finish(oob_file_context &)
dcon::leader_trait_id personality_
void type(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_context &context)
void personality(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_context &context)
void finish(oob_file_navy_context &)
void leader(oob_leader const &value, error_handler &err, int32_t line, oob_file_navy_context &context)
void location(association_type, int32_t value, error_handler &err, int32_t line, oob_file_navy_context &context)
void name(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_navy_context &context)
void type(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_regiment_context &context)
void name(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_regiment_context &context)
void finish(oob_file_regiment_context &)
void home(association_type, int32_t value, error_handler &err, int32_t line, oob_file_regiment_context &context)
void value(association_type, int32_t v, error_handler &err, int32_t line, oob_file_relation_context &context)
void level(association_type, int32_t v, error_handler &err, int32_t line, oob_file_relation_context &context)
void truce_until(association_type, sys::year_month_day v, error_handler &err, int32_t line, oob_file_relation_context &context)
void finish(oob_file_relation_context &)
void influence_value(association_type, float v, error_handler &err, int32_t line, oob_file_relation_context &context)
void type(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_ship_context &context)
void finish(oob_file_ship_context &)
void name(association_type, std::string_view value, error_handler &err, int32_t line, oob_file_ship_context &context)
void open_factory(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void primary_culture_voting(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void pop_open_factory(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void build_railway_invest(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void destroy_factory(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void delete_factory_if_no_input(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void build_university(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void open_factory_invest(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void rich_only(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void largest_share(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void can_subsidise(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void finish(individual_roption_context &)
void population_vote(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void factory_priority(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void pop_expand_factory(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void pop_build_factory_invest(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void finish(individual_option_context &)
void expand_factory(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void can_invest_in_pop_projects(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void slavery_allowed(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void build_factory_invest(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void dhont(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void expand_factory_invest(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void build_railway(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void all_voting(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void same_as_ruling_party(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void pop_open_factory_invest(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void culture_voting(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void pop_build_factory(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void sainte_laque(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void allow_foreign_investment(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void pop_expand_factory_invest(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void build_factory(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void build_bank(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void state_vote(association_type, bool value, error_handler &err, int32_t line, individual_option_context &context)
void spacing(association_type, float v, error_handler &err, int32_t line, building_gfx_context &context)
void format(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void finish(scenario_building_context &context)
dcon::political_party_id id
scenario_building_context & outer_context
void name(association_type, std::string_view text, error_handler &err, int32_t line, party_context &context)
void any_value(std::string_view issue, association_type, std::string_view option, error_handler &err, int32_t line, party_context &context)
dcon::trigger_key trigger
void end_date(association_type, sys::year_month_day ymd, error_handler &err, int32_t line, party_context &context)
void ideology(association_type, std::string_view text, error_handler &err, int32_t line, party_context &context)
void finish(party_context &context)
void start_date(association_type, sys::year_month_day ymd, error_handler &err, int32_t line, party_context &context)
trigger::slot_contents from_slot
pending_nat_event(dcon::national_event_id id, trigger::slot_contents main_slot, trigger::slot_contents this_slot, trigger::slot_contents from_slot, token_generator const &generator_state)
trigger::slot_contents this_slot
pending_nat_event(std::string const &original_file, dcon::national_event_id id, trigger::slot_contents main_slot, trigger::slot_contents this_slot, trigger::slot_contents from_slot, token_generator const &generator_state, bool just_in_case_placeholder)
pending_nat_event(dcon::national_event_id id, trigger::slot_contents main_slot, trigger::slot_contents this_slot, trigger::slot_contents from_slot)
trigger::slot_contents main_slot
dcon::provincial_event_id id
trigger::slot_contents main_slot
trigger::slot_contents from_slot
pending_prov_event(std::string const &original_file, dcon::provincial_event_id id, trigger::slot_contents main_slot, trigger::slot_contents this_slot, trigger::slot_contents from_slot, token_generator const &generator_state, bool just_in_case_placeholder)
trigger::slot_contents this_slot
pending_prov_event(dcon::provincial_event_id id, trigger::slot_contents main_slot, trigger::slot_contents this_slot, trigger::slot_contents from_slot)
pending_prov_event(dcon::provincial_event_id id, trigger::slot_contents main_slot, trigger::slot_contents this_slot, trigger::slot_contents from_slot, token_generator const &generator_state)
void rebel_type(association_type, std::string_view value, error_handler &err, int32_t line, pop_history_province_context &context)
void religion(association_type, std::string_view value, error_handler &err, int32_t line, pop_history_province_context &context)
void finish(pop_history_province_context &)
void finish(scenario_building_context &)
void finish(poptype_context &)
void finish(poptype_context &)
void finish(pop_history_province_context &)
void any_group(std::string_view type, pop_history_definition const &def, error_handler &err, int32_t line, pop_history_province_context &context)
scenario_building_context & outer_context
void workplace_output(association_type, float value, error_handler &err, int32_t line, poptype_context &context)
void can_build(association_type, bool value, error_handler &err, int32_t line, poptype_context &context)
void strata(association_type, std::string_view value, error_handler &err, int32_t line, poptype_context &context)
void can_reduce_consciousness(association_type, bool value, error_handler &err, int32_t line, poptype_context &context)
void unemployment(association_type, bool value, error_handler &err, int32_t line, poptype_context &context)
void research_points(association_type, float value, error_handler &err, int32_t line, poptype_context &context)
void allowed_to_vote(association_type, bool value, error_handler &err, int32_t line, poptype_context &context)
void leadership(association_type, int32_t value, error_handler &err, int32_t line, poptype_context &context)
void state_capital_only(association_type, bool value, error_handler &err, int32_t line, poptype_context &context)
void luxury_needs(commodity_array const &value, error_handler &err, int32_t line, poptype_context &context)
void tax_eff(association_type, float value, error_handler &err, int32_t line, poptype_context &context)
void sprite(association_type, int32_t value, error_handler &err, int32_t line, poptype_context &context)
void can_be_recruited(association_type, bool value, error_handler &err, int32_t line, poptype_context &context)
void workplace_input(association_type, float value, error_handler &err, int32_t line, poptype_context &context)
void is_artisan(association_type, bool value, error_handler &err, int32_t line, poptype_context &context)
void life_needs(commodity_array const &value, error_handler &err, int32_t line, poptype_context &context)
void equivalent(association_type, std::string_view value, error_handler &err, int32_t line, poptype_context &context)
void research_optimum(association_type, float value, error_handler &err, int32_t line, poptype_context &context)
void finish(poptype_context &)
void everyday_needs_income(income const &value, error_handler &err, int32_t line, poptype_context &context)
void administrative_efficiency(association_type, bool value, error_handler &err, int32_t line, poptype_context &context)
void everyday_needs(commodity_array const &value, error_handler &err, int32_t line, poptype_context &context)
void is_slave(association_type, bool value, error_handler &err, int32_t line, poptype_context &context)
void luxury_needs_income(income const &value, error_handler &err, int32_t line, poptype_context &context)
void life_needs_income(income const &value, error_handler &err, int32_t line, poptype_context &context)
void color(color_from_3i cvalue, error_handler &err, int32_t line, poptype_context &context)
void finish(production_context &)
production_context(scenario_building_context &outer_context)
scenario_building_context & outer_context
ankerl::unordered_dense::map< std::string, production_type > templates
void free_group(production_employee const &value, error_handler &err, int32_t line, production_context &context)
std::vector< production_employee > employees
void finish(production_context &)
void poptype(association_type, std::string_view v, error_handler &err, int32_t line, production_context &context)
production_employee_set employees
void output_goods(association_type, std::string_view v, error_handler &err, int32_t line, production_context &context)
void as_template(association_type, std::string_view v, error_handler &err, int32_t line, production_context &context)
void finish(production_context &)
void type(association_type, std::string_view v, error_handler &err, int32_t line, production_context &context)
std::vector< production_bonus > bonuses
void bonus(production_bonus const &v, error_handler &err, int32_t line, production_context &context)
void finish(production_context &)
void finish(poptype_context &)
scenario_building_context & outer_context
void colony(association_type, uint32_t value, error_handler &err, int32_t line, province_file_context &context)
void terrain(association_type, std::string_view text, error_handler &err, int32_t line, province_file_context &context)
void state_building(pv_state_building const &value, error_handler &err, int32_t line, province_file_context &context)
void controller(association_type, uint32_t value, error_handler &err, int32_t line, province_file_context &context)
void owner(association_type, uint32_t value, error_handler &err, int32_t line, province_file_context &context)
void remove_core(association_type, uint32_t value, error_handler &err, int32_t line, province_file_context &context)
void is_slave(association_type, bool value, error_handler &err, int32_t line, province_file_context &context)
void rgo_distribution(province_rgo_ext const &value, error_handler &err, int32_t line, province_file_context &context)
void any_value(std::string_view name, association_type, uint32_t value, error_handler &err, int32_t line, province_file_context &context)
void party_loyalty(pv_party_loyalty const &value, error_handler &err, int32_t line, province_file_context &context)
void add_core(association_type, uint32_t value, error_handler &err, int32_t line, province_file_context &context)
void life_rating(association_type, uint32_t value, error_handler &err, int32_t line, province_file_context &context)
void finish(province_file_context &)
void trade_goods(association_type, std::string_view text, error_handler &err, int32_t line, province_file_context &context)
void max_employment(association_type, uint32_t value, error_handler &err, int32_t line, province_file_context &context)
void finish(province_file_context &)
void trade_good(association_type, std::string_view text, error_handler &err, int32_t line, province_file_context &context)
void finish(province_file_context &)
void entry(province_rgo_ext_desc const &value, error_handler &err, int32_t line, province_file_context &context)
void allow(bool, error_handler &err, int32_t line, building_gfx_context &context)
void finish(province_file_context &)
void ideology(association_type, std::string_view text, error_handler &err, int32_t line, province_file_context &context)
void finish(province_file_context &)
void building(association_type, std::string_view text, error_handler &err, int32_t line, province_file_context &context)
void defection(association_type, std::string_view value, error_handler &err, int32_t line, rebel_context &context)
void demands_enforced_effect(dcon::effect_key value, error_handler &err, int32_t line, rebel_context &context)
void allow_all_ideologies(association_type, bool value, error_handler &err, int32_t line, rebel_context &context)
void defect_delay(association_type, int32_t value, error_handler &err, int32_t line, rebel_context &context)
void finish(rebel_context &)
void occupation_mult(association_type, float value, error_handler &err, int32_t line, rebel_context &context)
void allow_all_culture_groups(association_type, bool value, error_handler &err, int32_t line, rebel_context &context)
void demands_enforced_trigger(dcon::trigger_key value, error_handler &err, int32_t line, rebel_context &context)
void independence(association_type, std::string_view value, error_handler &err, int32_t line, rebel_context &context)
void area(association_type, std::string_view value, error_handler &err, int32_t line, rebel_context &context)
void break_alliance_on_win(association_type, bool value, error_handler &err, int32_t line, rebel_context &context)
void siege_won_trigger(dcon::trigger_key value, error_handler &err, int32_t line, rebel_context &context)
void icon(association_type, int32_t value, error_handler &err, int32_t line, rebel_context &context)
void spawn_chance(dcon::value_modifier_key value, error_handler &err, int32_t line, rebel_context &context)
void allow_all_cultures(association_type, bool value, error_handler &err, int32_t line, rebel_context &context)
void siege_won_effect(dcon::effect_key value, error_handler &err, int32_t line, rebel_context &context)
void will_rise(dcon::value_modifier_key value, error_handler &err, int32_t line, rebel_context &context)
void movement_evaluation(dcon::value_modifier_key value, error_handler &err, int32_t line, rebel_context &context)
void ideology(association_type, std::string_view value, error_handler &err, int32_t line, rebel_context &context)
scenario_building_context & outer_context
void finish(rebel_context &)
void any_value(std::string_view from_gov, association_type, std::string_view to_gov, error_handler &err, int32_t line, rebel_context &context)
void finish(scenario_building_context &)
scenario_building_context & outer_context
void finish(scenario_building_context &)
scenario_building_context & outer_context
void pagan(association_type, bool v, error_handler &err, int32_t line, religion_context &context)
void color(color_from_3f v, error_handler &err, int32_t line, religion_context &context)
void finish(religion_context &context)
void icon(association_type, int32_t v, error_handler &err, int32_t line, religion_context &context)
void any_group(std::string_view name, religion_group, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &context)
void finish(scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void finish(scenario_building_context &)
void any_value(std::string_view chance, association_type, int32_t event, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
std::optional< simple_fs::file > ideologies_file
ankerl::unordered_dense::map< std::string, dcon::state_definition_id > map_of_state_names
tagged_vector< std::string, dcon::national_identity_id > file_names_for_idents
ankerl::unordered_dense::map< std::string, dcon::unit_type_id > map_of_unit_types
std::optional< simple_fs::file > crimes_file
ankerl::unordered_dense::map< std::string, dcon::culture_group_id > map_of_culture_group_names
ankerl::unordered_dense::map< std::string, dcon::national_variable_id > map_of_national_variables
ankerl::unordered_dense::map< std::string, dcon::national_flag_id > map_of_national_flags
ankerl::unordered_dense::map< std::string, dcon::national_focus_id > map_of_national_focuses
ankerl::unordered_dense::map< std::string, dcon::modifier_id > map_of_modifiers
ankerl::unordered_dense::map< std::string, dcon::global_flag_id > map_of_global_flags
ankerl::unordered_dense::map< std::string, dcon::religion_id > map_of_religion_names
ankerl::unordered_dense::map< std::string, pending_invention_content > map_of_inventions
std::vector< simple_fs::file > tech_and_invention_files
ankerl::unordered_dense::map< std::string, pending_roption_content > map_of_roptions
ankerl::unordered_dense::map< std::string, pending_tech_content > map_of_technologies
ankerl::unordered_dense::map< std::string, dcon::pop_type_id > map_of_poptypes
ankerl::unordered_dense::map< int32_t, pending_nat_event > map_of_national_events
ankerl::unordered_dense::map< std::string, dcon::factory_type_id > map_of_production_types
ankerl::unordered_dense::map< std::string, pending_ideology_content > map_of_ideologies
ankerl::unordered_dense::map< std::string, dcon::reform_id > map_of_reforms
std::optional< simple_fs::file > issues_file
std::vector< dcon::province_id > original_id_to_prov_id_map
tagged_vector< province_data, dcon::province_id > prov_id_to_original_id_map
ankerl::unordered_dense::map< std::string, dcon::issue_id > map_of_iissues
ankerl::unordered_dense::map< std::string, pending_crime_content > map_of_crimes
ankerl::unordered_dense::map< std::string, dcon::leader_trait_id > map_of_leader_traits
std::optional< simple_fs::file > rebel_types_file
dcon::global_flag_id get_global_flag(std::string const &name)
ankerl::unordered_dense::map< std::string, pending_option_content > map_of_ioptions
ankerl::unordered_dense::map< std::string, pending_cb_content > map_of_cb_types
std::optional< simple_fs::file > cb_types_file
ankerl::unordered_dense::map< std::string, terrain_type > map_of_terrain_types
dcon::national_flag_id get_national_flag(std::string const &name)
ankerl::unordered_dense::map< std::string, pending_rebel_type_content > map_of_rebeltypes
ankerl::unordered_dense::map< int32_t, pending_prov_event > map_of_provincial_events
ankerl::unordered_dense::map< std::string, dcon::region_id > map_of_region_names
ankerl::unordered_dense::map< std::string, std::vector< saved_stored_condition > > map_of_stored_triggers
ankerl::unordered_dense::map< std::string, int32_t > map_of_tech_folders
std::vector< pending_triggered_modifier_content > set_of_triggered_modifiers
ankerl::unordered_dense::map< std::string, dcon::leader_images_id > map_of_leader_graphics
ankerl::unordered_dense::map< uint32_t, dcon::national_identity_id > map_of_ident_names
ankerl::unordered_dense::map< std::string, dcon::culture_id > map_of_culture_names
std::optional< simple_fs::file > triggered_modifiers_file
ankerl::unordered_dense::map< std::string, dcon::commodity_id > map_of_commodity_names
ankerl::unordered_dense::map< uint32_t, dcon::province_id > map_color_to_province_id
std::vector< dcon::province_id > special_impassible
ankerl::unordered_dense::map< std::string, dcon::government_type_id > map_of_governments
ankerl::unordered_dense::map< std::string, dcon::ideology_group_id > map_of_ideology_groups
dcon::national_variable_id get_national_variable(std::string const &name)
ankerl::unordered_dense::map< std::string, dcon::factory_type_id > map_of_factory_names
void guibuttontype(button const &v, error_handler &err, int32_t line, building_gfx_context &context)
void finish(building_gfx_context &context)
void rightbutton(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void rangelimitminicon(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void lockable(association_type, bool v, error_handler &err, int32_t line, building_gfx_context &context)
void maxvalue(association_type, uint32_t v, error_handler &err, int32_t line, building_gfx_context &context)
void bordersize(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
std::string_view rightbutton_
void track(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void stepsize(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void icontype(image const &v, error_handler &err, int32_t line, building_gfx_context &context)
void horizontal(association_type, bool v, error_handler &err, int32_t line, building_gfx_context &context)
std::string_view rangelimitminicon_
std::vector< ui::element_data > children
std::string_view rangelimitmaxicon_
void leftbutton(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void slider(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void rangelimitmaxicon(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
std::string_view leftbutton_
void userangelimit(association_type, bool v, error_handler &err, int32_t line, building_gfx_context &context)
void finish(scenario_building_context &)
void free_value(int32_t value, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void finish(building_gfx_context &context)
void finish(building_gfx_context &context)
scenario_building_context & outer_context
std::vector< dcon::province_id > provinces
void free_value(int32_t value, error_handler &err, int32_t line, state_def_building_context &context)
void finish(state_def_building_context &)
void finish(scenario_building_context &)
scenario_building_context & outer_context
void any_value(std::string_view label, association_type, float value, error_handler &err, int32_t line, tech_context &context)
void free_value(std::string_view name, error_handler &err, int32_t line, tech_group_context &context)
void finish(tech_group_context &)
tech_group_context(scenario_building_context &outer_context, ::culture::tech_category category)
::culture::tech_category category
scenario_building_context & outer_context
void finish(scenario_building_context &)
void any_value(std::string_view label, association_type, float value, error_handler &err, int32_t line, tech_context &context)
void finish(invention_context &)
void any_value(std::string_view label, association_type, float value, error_handler &err, int32_t line, tech_context &context)
void finish(scenario_building_context &)
void activate_unit(association_type, std::string_view value, error_handler &err, int32_t line, tech_context &context)
void area(association_type, std::string_view value, error_handler &err, int32_t line, tech_context &context)
void ai_chance(dcon::value_modifier_key value, error_handler &err, int32_t line, tech_context &context)
void any_value(std::string_view name, association_type, int32_t value, error_handler &err, int32_t line, tech_context &context)
void year(association_type, int32_t value, error_handler &err, int32_t line, tech_context &context)
tech_fac_goods_output factory_goods_output
tech_rgo_goods_output rgo_goods_output
void plurality(association_type, float value, error_handler &err, int32_t line, tech_context &context)
void activate_building(association_type, std::string_view value, error_handler &err, int32_t line, tech_context &context)
void any_group(std::string_view label, unit_modifier_body const &value, error_handler &err, int32_t line, tech_context &context)
void colonial_points(association_type, int32_t value, error_handler &err, int32_t line, tech_context &context)
void cost(association_type, int32_t value, error_handler &err, int32_t line, tech_context &context)
void finish(scenario_building_context &)
void finish(scenario_building_context &)
terrain_modifiers_list categories
void finish(scenario_building_context &)
void finish(scenario_building_context &)
void finish(scenario_building_context &)
void fixedsize(association_type, bool v, error_handler &err, int32_t line, building_gfx_context &context)
void format(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void font(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
void bordersize(gfx_xy_pair const &pr, error_handler &err, int32_t line, building_gfx_context &context)
void texturefile(association_type, std::string_view txt, error_handler &err, int32_t line, building_gfx_context &context)
scenario_building_context & outer_context
void experience(association_type, float value, error_handler &err, int32_t line, trait_context &context)
void attack(association_type, float value, error_handler &err, int32_t line, trait_context &context)
void finish(trait_context &)
void defence(association_type, float value, error_handler &err, int32_t line, trait_context &context)
void organisation(association_type, float value, error_handler &err, int32_t line, trait_context &context)
void reconnaissance(association_type, float value, error_handler &err, int32_t line, trait_context &context)
void morale(association_type, float value, error_handler &err, int32_t line, trait_context &context)
void speed(association_type, float value, error_handler &err, int32_t line, trait_context &context)
void reliability(association_type, float value, error_handler &err, int32_t line, trait_context &context)
void finish(scenario_building_context &)
void finish(scenario_building_context &)
triggered_modifier_context(scenario_building_context &outer_context, uint32_t index, std::string_view name)
scenario_building_context & outer_context
void finish(triggered_modifier_context &)
void finish(scenario_building_context &)
void finish(scenario_building_context &context)
void finish(scenario_building_context &context)
void finish(scenario_building_context &context)
void finish(scenario_building_context &context)
void finish(scenario_building_context &context)
void finish(scenario_building_context &)
void type_text(association_type, std::string_view value, error_handler &err, int32_t line, scenario_building_context &context)
void unit_type_text(association_type, std::string_view value, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void finish(country_file_context &)
dcon::national_identity_id id
scenario_building_context & outer_context
void free_value(std::string_view text, error_handler &err, int32_t line, unit_names_context &context)
void finish(unit_names_context &)
void finish(country_history_context &)
void any_value(std::string_view value, association_type, float v, error_handler &err, int32_t line, country_history_context &context)
void first(association_type, std::string_view tag, error_handler &err, int32_t line, scenario_building_context &context)
void finish(scenario_building_context &)
void start_date(association_type, sys::year_month_day ymd, error_handler &err, int32_t line, scenario_building_context &context)
void end_date(association_type, sys::year_month_day ymd, error_handler &err, int32_t line, scenario_building_context &context)
void second(association_type, std::string_view tag, error_handler &err, int32_t line, scenario_building_context &context)
void finish(individual_option_context &)
void finish(individual_roption_context &)
void world_war(association_type, bool v, error_handler &err, int32_t line, war_history_context &context)
void rem_attacker(association_type, std::string_view tag, error_handler &err, int32_t line, war_history_context &context)
void add_defender(association_type, std::string_view tag, error_handler &err, int32_t line, war_history_context &context)
void rem_defender(association_type, std::string_view tag, error_handler &err, int32_t line, war_history_context &context)
void war_goal(history_war_goal const &value, error_handler &err, int32_t line, war_history_context &context)
void finish(war_history_context &)
void add_attacker(association_type, std::string_view tag, error_handler &err, int32_t line, war_history_context &context)
scenario_building_context & outer_context
war_history_context(scenario_building_context &outer_context)
std::vector< dcon::nation_id > defenders
std::vector< dcon::nation_id > attackers
std::vector< history_war_goal > wargoals
void name(association_type, std::string_view name, error_handler &err, int32_t line, war_history_context &context)
void finish(war_history_context &)
void positiontype(gui_element_common const &v, error_handler &err, int32_t line, building_gfx_context &context)
void windowtype(window const &v, error_handler &err, int32_t line, building_gfx_context &context)
std::vector< ui::element_data > children
void provincescriptbuttontype(province_script_button const &v, error_handler &err, int32_t line, building_gfx_context &context)
void icontype(image const &v, error_handler &err, int32_t line, building_gfx_context &context)
void guibuttontype(button const &v, error_handler &err, int32_t line, building_gfx_context &context)
void fullscreen(association_type, bool v, error_handler &err, int32_t line, building_gfx_context &context)
void eu3dialogtype(window const &v, error_handler &err, int32_t line, building_gfx_context &context)
void instanttextboxtype(textbox const &v, error_handler &err, int32_t line, building_gfx_context &context)
void nationscriptbuttontype(nation_script_button const &v, error_handler &err, int32_t line, building_gfx_context &context)
void scrollbartype(scrollbar const &v, error_handler &err, int32_t line, building_gfx_context &context)
void finish(building_gfx_context &context)
void textboxtype(textbox const &v, error_handler &err, int32_t line, building_gfx_context &context)
void editboxtype(textbox const &v, error_handler &err, int32_t line, building_gfx_context &context)
void overlappingelementsboxtype(overlapping const &v, error_handler &err, int32_t line, building_gfx_context &context)
std::vector< scripted_children > sc
void shieldtype(image const &v, error_handler &err, int32_t line, building_gfx_context &context)
void moveable(association_type, bool v, error_handler &err, int32_t line, building_gfx_context &context)
void listboxtype(listbox const &v, error_handler &err, int32_t line, building_gfx_context &context)
void checkboxtype(button const &v, error_handler &err, int32_t line, building_gfx_context &context)
float values[modifier_definition_size]
Definition: modifiers.hpp:233
dcon::national_modifier_value offsets[modifier_definition_size]
Definition: modifiers.hpp:234
static constexpr uint32_t modifier_definition_size
Definition: modifiers.hpp:231
float values[modifier_definition_size]
Definition: modifiers.hpp:221
static constexpr uint32_t modifier_definition_size
Definition: modifiers.hpp:219
dcon::provincial_modifier_value offsets[modifier_definition_size]
Definition: modifiers.hpp:222