Project Alice
Loading...
Searching...
No Matches
gui_effect_tooltips.cpp
Go to the documentation of this file.
2#include "dcon_generated.hpp"
3#include "gui_event.hpp"
6#include "prng.hpp"
8#include "effects.hpp"
9#include "system_state.hpp"
10#include "text.hpp"
11#include "triggers.hpp"
12
13namespace ui {
14
15namespace effect_tooltip {
16
17inline constexpr int32_t indentation_amount = 15;
18
19#define EFFECT_DISPLAY_PARAMS \
20 sys::state &ws, uint16_t const *tval, text::layout_base &layout, int32_t primary_slot, int32_t this_slot, int32_t from_slot, \
21 uint32_t r_lo, uint32_t r_hi, int32_t indentation
22
24
25
27 static std::string this_nation = text::produce_simple_string(ws, "this_nation");
28 if(n)
30 else
31 text::add_to_substitution_map(map, text::variable_type::adj, std::string_view{ this_nation });
32}
33void add_adj_this_to_map(sys::state& ws, text::substitution_map& map, dcon::province_id p) {
34 static std::string this_nation = text::produce_simple_string(ws, "this_nation");
35 if(auto n = ws.world.province_get_nation_from_province_ownership(p); n)
37 else
38 text::add_to_substitution_map(map, text::variable_type::adj, std::string_view{ this_nation });
39}
40void add_adj_this_to_map(sys::state& ws, text::substitution_map& map, dcon::state_instance_id p) {
41 static std::string this_nation = text::produce_simple_string(ws, "this_nation");
42 if(auto n = ws.world.state_instance_get_nation_from_state_ownership(p); n)
44 else
45 text::add_to_substitution_map(map, text::variable_type::adj, std::string_view{ this_nation });
46}
48 static std::string this_nation = text::produce_simple_string(ws, "this_nation");
49 if(auto n = nations::owner_of_pop(ws, p); n)
51 else
52 text::add_to_substitution_map(map, text::variable_type::adj, std::string_view{ this_nation });
53}
54void add_adj_from_to_map(sys::state& ws, text::substitution_map& map, dcon::rebel_faction_id p) {
55 static std::string this_nation = text::produce_simple_string(ws, "from_nation");
56 auto fp = fatten(ws.world, p);
57 if(auto n = fp.get_defection_target().get_nation_from_identity_holder(); n)
59 else
60 text::add_to_substitution_map(map, text::variable_type::adj, std::string_view{ this_nation });
61}
63 static std::string this_nation = text::produce_simple_string(ws, "from_nation");
64 if(n)
66 else
67 text::add_to_substitution_map(map, text::variable_type::adj, std::string_view{ this_nation });
68}
69void add_adj_from_to_map(sys::state& ws, text::substitution_map& map, dcon::province_id p) {
70 static std::string this_nation = text::produce_simple_string(ws, "from_nation");
71 if(auto n = ws.world.province_get_nation_from_province_ownership(p); n)
73 else
74 text::add_to_substitution_map(map, text::variable_type::adj, std::string_view{ this_nation });
75}
76
78
79 auto const source_size = 1 + effect::get_effect_scope_payload_size(tval);
80 auto sub_units_start = tval + 2 + effect::effect_scope_data_payload(tval[0]);
81
82 uint32_t i = 0;
83 while(sub_units_start < tval + source_size) {
84 i += internal_make_effect_description(ws, sub_units_start, layout, primary_slot, this_slot, from_slot, r_hi, r_lo + i,
85 indentation);
86 sub_units_start += 1 + effect::get_generic_effect_payload_size(sub_units_start);
87 }
88 return i;
89}
90
91void display_value(int64_t value, bool positive_is_green, sys::state& ws, text::layout_base& layout, text::layout_box& box) {
92
93 if(value >= 0)
94 text::add_to_layout_box(ws, layout, box, "+", positive_is_green ? text::text_color::green : text::text_color::red,
95 std::monostate{});
96
97 if(positive_is_green)
98 text::add_to_layout_box(ws, layout, box, value, value >= 0 ? text::text_color::green : text::text_color::red);
99 else
100 text::add_to_layout_box(ws, layout, box, value, value >= 0 ? text::text_color::red : text::text_color::green);
101
102 text::add_space_to_layout_box(ws, layout, box);
103}
104void display_value(text::fp_currency value, bool positive_is_green, sys::state& ws, text::layout_base& layout,
105 text::layout_box& box) {
106
107 if(value.value >= 0)
108 text::add_to_layout_box(ws, layout, box, "+", positive_is_green ? text::text_color::green : text::text_color::red,
109 std::monostate{});
110
111 if(positive_is_green)
112 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::green : text::text_color::red);
113 else
114 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::red : text::text_color::green);
115
116 text::add_space_to_layout_box(ws, layout, box);
117}
118void display_value(text::fp_percentage value, bool positive_is_green, sys::state& ws, text::layout_base& layout,
119 text::layout_box& box) {
120
121 if(value.value >= 0)
122 text::add_to_layout_box(ws, layout, box, "+", positive_is_green ? text::text_color::green : text::text_color::red,
123 std::monostate{});
124
125 if(positive_is_green)
126 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::green : text::text_color::red);
127 else
128 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::red : text::text_color::green);
129
130 text::add_space_to_layout_box(ws, layout, box);
131}
132void display_value(text::fp_one_place value, bool positive_is_green, sys::state& ws, text::layout_base& layout,
133 text::layout_box& box) {
134
135 if(value.value >= 0)
136 text::add_to_layout_box(ws, layout, box, "+", positive_is_green ? text::text_color::green : text::text_color::red,
137 std::monostate{});
138
139 if(positive_is_green)
140 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::green : text::text_color::red);
141 else
142 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::red : text::text_color::green);
143
144 text::add_space_to_layout_box(ws, layout, box);
145}
146void display_value(text::fp_two_places value, bool positive_is_green, sys::state& ws, text::layout_base& layout,
147 text::layout_box& box) {
148
149 if(value.value >= 0)
150 text::add_to_layout_box(ws, layout, box, "+", positive_is_green ? text::text_color::green : text::text_color::red,
151 std::monostate{});
152
153 if(positive_is_green)
154 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::green : text::text_color::red);
155 else
156 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::red : text::text_color::green);
157
158 text::add_space_to_layout_box(ws, layout, box);
159}
160void display_value(text::fp_three_places value, bool positive_is_green, sys::state& ws, text::layout_base& layout,
161 text::layout_box& box) {
162
163 if(value.value >= 0)
164 text::add_to_layout_box(ws, layout, box, "+", positive_is_green ? text::text_color::green : text::text_color::red,
165 std::monostate{});
166
167 if(positive_is_green)
168 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::green : text::text_color::red);
169 else
170 text::add_to_layout_box(ws, layout, box, value, value.value >= 0 ? text::text_color::red : text::text_color::green);
171
172 text::add_space_to_layout_box(ws, layout, box);
173}
174
176 text::add_to_layout_box(ws, layout, box,
177 this_slot != -1 ? text::produce_simple_string(ws, text::get_name(ws, trigger::to_nation(this_slot)))
178 : text::produce_simple_string(ws, "this_nation"));
179}
180void tag_type_this_state_effect(int32_t this_slot, sys::state& ws, text::layout_base& layout, text::layout_box& box) {
181 text::add_to_layout_box(ws, layout, box,
182 this_slot != -1
184 text::get_name(ws, ws.world.state_instance_get_nation_from_state_ownership(trigger::to_state(this_slot))))
185 : text::produce_simple_string(ws, "this_nation"));
186}
188 text::add_to_layout_box(ws, layout, box,
189 this_slot != -1
191 text::get_name(ws, ws.world.province_get_nation_from_province_ownership(trigger::to_prov(this_slot))))
192 : text::produce_simple_string(ws, "this_nation"));
193}
194void tag_type_this_pop_effect(int32_t this_slot, sys::state& ws, text::layout_base& layout, text::layout_box& box) {
195 text::add_to_layout_box(ws, layout, box,
196 this_slot != -1
198 : text::produce_simple_string(ws, "this_nation"));
199}
201 text::add_to_layout_box(ws, layout, box,
202 this_slot != -1 ? text::produce_simple_string(ws, text::get_name(ws, trigger::to_nation(this_slot)))
203 : text::produce_simple_string(ws, "from_nation"));
204}
206 text::add_to_layout_box(ws, layout, box,
207 this_slot != -1
209 text::get_name(ws, ws.world.province_get_nation_from_province_ownership(trigger::to_prov(this_slot))))
210 : text::produce_simple_string(ws, "from_nation"));
211}
212
214 return display_subeffects(ws, tval, layout, primary_slot, this_slot, from_slot, r_lo, r_hi, indentation);
215}
216
217inline auto random_or_every(uint16_t tval) {
218 return (tval & effect::is_random_scope) != 0 ? "random" : "every";
219}
220
221void show_limit(sys::state& ws, uint16_t const* tval, text::layout_base& layout, int32_t primary_slot, int32_t this_slot, int32_t from_slot,
222 int32_t indentation) {
223 if((tval[0] & effect::scope_has_limit) != 0) {
224 auto limit = trigger::payload(tval[2]).tr_id;
225 auto box = text::open_layout_box(layout, indentation + indentation_amount);
226 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "where"));
227 text::close_layout_box(layout, box);
228 trigger_tooltip::make_trigger_description(ws, layout, ws.trigger_data.data() + ws.trigger_data_indices[limit.index() + 1], primary_slot,
229 this_slot, from_slot, indentation + 2 * indentation_amount, primary_slot != -1);
230 }
231}
232
233void show_full_random_tooltip(sys::state& ws, uint16_t tval, std::string_view loc_key, text::layout_base& layout, text::substitution val, int32_t indentation) {
234 auto box = text::open_layout_box(layout, indentation);
236 text::add_space_to_layout_box(ws, layout, box);
237 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, loc_key));
238 text::add_space_to_layout_box(ws, layout, box);
239 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "("));
240 text::add_to_layout_box(ws, layout, box, val);
241 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ")"));
242 text::close_layout_box(layout, box);
243}
244void show_short_any_random_tooltip(sys::state& ws, uint16_t tval, std::string_view loc_key, text::layout_base& layout, int32_t indentation) {
245 auto box = text::open_layout_box(layout, indentation);
247 text::add_space_to_layout_box(ws, layout, box);
248 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, loc_key));
249 text::close_layout_box(layout, box);
250}
251
253 auto box = text::open_layout_box(layout, indentation);
254 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "et_if"));
255 text::close_layout_box(layout, box);
256 show_limit(ws, tval, layout, primary_slot, this_slot, from_slot, indentation);
257 return display_subeffects(ws, tval, layout, primary_slot, this_slot, from_slot, r_lo, r_hi, indentation + 1);
258}
260 auto box = text::open_layout_box(layout, indentation);
261 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "et_else_if"));
262 text::close_layout_box(layout, box);
263 show_limit(ws, tval, layout, primary_slot, this_slot, from_slot, indentation);
264 return display_subeffects(ws, tval, layout, primary_slot, this_slot, from_slot, r_lo, r_hi, indentation + 1);
265}
266
268 if((tval[0] & effect::is_random_scope) != 0) {
269 if(primary_slot != -1) {
270 auto neighbor_range = ws.world.province_get_province_adjacency(trigger::to_prov(primary_slot));
271
272 std::vector<dcon::province_id> rlist;
273
274 if((tval[0] & effect::scope_has_limit) != 0) {
275 auto limit = trigger::payload(tval[2]).tr_id;
276 for(auto p : neighbor_range) {
277 auto other = p.get_connected_provinces(p.get_connected_provinces(0) == trigger::to_prov(primary_slot) ? 1 : 0);
278 if(other.get_nation_from_province_ownership() && trigger::evaluate(ws, limit, trigger::to_generic(other.id), this_slot, from_slot)) {
279 rlist.push_back(other.id);
280 }
281 }
282 } else {
283 for(auto p : neighbor_range) {
284 auto other = p.get_connected_provinces(p.get_connected_provinces(0) == trigger::to_prov(primary_slot) ? 1 : 0);
285 if(other.get_nation_from_province_ownership()) {
286 rlist.push_back(other.id);
287 }
288 }
289 }
290
291 if(rlist.size() != 0) {
292 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
293 show_full_random_tooltip(ws, tval[0], "neighboring_province", layout, rlist[r], indentation);
294 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
295 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1, indentation + indentation_amount);
296 }
297 return 0;
298 }
299 }
300
301 auto box = text::open_layout_box(layout, indentation);
302 show_short_any_random_tooltip(ws, tval[0], "neighboring_province", layout, indentation);
303 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
304 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
305 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
306 indentation + indentation_amount);
307}
309 if((tval[0] & effect::is_random_scope) != 0) {
310 if(primary_slot != -1) {
311 auto neighbor_range = effect::country_get_province_adjacency(ws, trigger::to_nation(primary_slot));
312
313 std::vector<dcon::province_id> rlist;
314
315 // Apply trigger limit
316 if((tval[0] & effect::scope_has_limit) != 0) {
317 auto limit = trigger::payload(tval[2]).tr_id;
318 for(auto other : neighbor_range) {
319 if(dcon::fatten(ws.world, other).get_nation_from_province_ownership() && trigger::evaluate(ws, limit, trigger::to_generic(other), this_slot, from_slot)) {
320 rlist.push_back(other);
321 }
322 }
323 } else {
324 for(auto other : neighbor_range) {
325 if(dcon::fatten(ws.world, other).get_nation_from_province_ownership()) {
326 rlist.push_back(other);
327 }
328 }
329 }
330
331 if(rlist.size() != 0) {
332 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
333
334 show_full_random_tooltip(ws, tval[0], "neighboring_province", layout, rlist[r], indentation);
335 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
336 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1, indentation + indentation_amount);
337 }
338 return 0;
339 }
340 }
341
342 show_short_any_random_tooltip(ws, tval[0], "neighboring_province", layout, indentation);
343 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
344 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
345 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
346 indentation + indentation_amount);
347}
349 if((tval[0] & effect::is_random_scope) != 0) {
350 if(primary_slot != -1) {
351 auto neighbor_range = effect::country_get_province_adjacency(ws, trigger::to_nation(primary_slot));
352
353 std::vector<dcon::province_id> rlist;
354
355 // Apply trigger limit
356 if((tval[0] & effect::scope_has_limit) != 0) {
357 auto limit = trigger::payload(tval[2]).tr_id;
358 for(auto other : neighbor_range) {
359 if(!dcon::fatten(ws.world, other).get_nation_from_province_ownership() && trigger::evaluate(ws, limit, trigger::to_generic(other), this_slot, from_slot)) {
360 rlist.push_back(other);
361 }
362 }
363 } else {
364 for(auto other : neighbor_range) {
365 if(!dcon::fatten(ws.world, other).get_nation_from_province_ownership()) {
366 rlist.push_back(other);
367 }
368 }
369 }
370
371 if(rlist.size() != 0) {
372 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
373
374 show_full_random_tooltip(ws, tval[0], "empty_neighboring_province", layout, rlist[r], indentation);
375 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
376 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1, indentation + indentation_amount);
377 }
378 return 0;
379 }
380 }
381
382 show_short_any_random_tooltip(ws, tval[0], "empty_neighboring_province", layout, indentation);
383 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
384 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
385 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
386 indentation + indentation_amount);
387}
389 if((tval[0] & effect::is_random_scope) != 0) {
390 if(primary_slot != -1) {
391 auto neighbor_range = ws.world.nation_get_nation_adjacency(trigger::to_nation(primary_slot));
392 std::vector<dcon::nation_id> rlist;
393
394 if((tval[0] & effect::scope_has_limit) != 0) {
395 auto limit = trigger::payload(tval[2]).tr_id;
396 for(auto p : neighbor_range) {
397 auto other = p.get_connected_nations(0) == trigger::to_nation(primary_slot) ? p.get_connected_nations(1)
398 : p.get_connected_nations(0);
399 if(trigger::evaluate(ws, limit, trigger::to_generic(other.id), this_slot, from_slot)) {
400 rlist.push_back(other.id);
401 }
402 }
403 } else {
404 for(auto p : neighbor_range) {
405 auto other = p.get_connected_nations(0) == trigger::to_nation(primary_slot) ? p.get_connected_nations(1)
406 : p.get_connected_nations(0);
407 rlist.push_back(other.id);
408 }
409 }
410
411 if(rlist.size() != 0) {
412 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
413
414 show_full_random_tooltip(ws, tval[0], "neighboring_nation", layout, rlist[r], indentation);
415 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
416 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1, indentation + indentation_amount);
417 }
418 return 0;
419 }
420 }
421
422 show_short_any_random_tooltip(ws, tval[0], "neighboring_nation", layout, indentation);
423 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
424 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
425 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
426 indentation + indentation_amount);
427}
429 if((tval[0] & effect::is_random_scope) != 0) {
430 std::vector<dcon::nation_id> rlist;
431 if((tval[0] & effect::scope_has_limit) != 0) {
432 auto limit = trigger::payload(tval[2]).tr_id;
433 for(auto n : ws.world.in_nation) {
434 if(n.get_owned_province_count() != 0 && trigger::evaluate(ws, limit, trigger::to_generic(n.id), this_slot, from_slot))
435 rlist.push_back(n.id);
436 }
437 } else {
438 for(auto n : ws.world.in_nation) {
439 if(n.get_owned_province_count() != 0)
440 rlist.push_back(n.id);
441 }
442 }
443 if(rlist.size() != 0) {
444 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
445 show_full_random_tooltip(ws, tval[0], "nation", layout, rlist[r], indentation);
446 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
447 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1, indentation + indentation_amount);
448 }
449 return 0;
450 }
451 show_short_any_random_tooltip(ws, tval[0], "nation", layout, indentation);
452 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
453 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
454 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
455 indentation + indentation_amount);
456}
458 if((tval[0] & effect::is_random_scope) != 0) {
459 std::vector<dcon::nation_id> rlist;
460 if((tval[0] & effect::scope_has_limit) != 0) {
461 auto limit = trigger::payload(tval[2]).tr_id;
462 for(auto n : ws.world.in_nation) {
463 if(n != trigger::to_nation(primary_slot) && trigger::evaluate(ws, limit, trigger::to_generic(n.id), this_slot, from_slot))
464 rlist.push_back(n.id);
465 }
466 } else {
467 for(auto n : ws.world.in_nation) {
468 if(n != trigger::to_nation(primary_slot))
469 rlist.push_back(n.id);
470 }
471 }
472 if(rlist.size() != 0) {
473 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
474 show_full_random_tooltip(ws, tval[0], "nation", layout, rlist[r], indentation);
475 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
476 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1,
477 indentation + indentation_amount);
478 }
479 return 0;
480 }
481 auto box = text::open_layout_box(layout, indentation);
482 show_short_any_random_tooltip(ws, tval[0], "nation", layout, indentation);
483 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
484 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
485 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
486 indentation + indentation_amount);
487}
489 if((tval[0] & effect::is_random_scope) != 0) {
490 std::vector<dcon::nation_id> rlist;
491 if((tval[0] & effect::scope_has_limit) != 0) {
492 auto limit = trigger::payload(tval[2]).tr_id;
493 for(auto n : ws.world.in_nation) {
494 if(n != trigger::to_nation(primary_slot) && n.get_owned_province_count() != 0 && trigger::evaluate(ws, limit, trigger::to_generic(n.id), this_slot, from_slot))
495 rlist.push_back(n.id);
496 }
497 } else {
498 for(auto n : ws.world.in_nation) {
499 if(n != trigger::to_nation(primary_slot) && n.get_owned_province_count() != 0)
500 rlist.push_back(n.id);
501 }
502 }
503 if(rlist.size() != 0) {
504 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
505 show_full_random_tooltip(ws, tval[0], "nation", layout, rlist[r], indentation);
506 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
507 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1,
508 indentation + indentation_amount);
509 }
510 return 0;
511 }
512 show_short_any_random_tooltip(ws, tval[0], "nation", layout, indentation);
513 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
514 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
515 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
516 indentation + indentation_amount);
517}
519 //NOTE: The entire point is to bounce FROM, so the repeated primary_slot on from_slot is intentional
520 auto box = text::open_layout_box(layout, indentation);
521 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "becomes_from"));
522 text::close_layout_box(layout, box);
523 show_limit(ws, tval, layout, primary_slot, this_slot, primary_slot, indentation);
524 return display_subeffects(ws, tval, layout, primary_slot, this_slot, primary_slot, r_lo, r_hi + 1, indentation + indentation_amount);
525}
527 //See es_from_bounce_scope, similarly here, but for THIS
528 auto box = text::open_layout_box(layout, indentation);
529 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "becomes_this"));
530 text::close_layout_box(layout, box);
531 show_limit(ws, tval, layout, primary_slot, primary_slot, from_slot, indentation);
532 return display_subeffects(ws, tval, layout, primary_slot, primary_slot, from_slot, r_lo, r_hi + 1, indentation + indentation_amount);
533}
534
536 return es_x_country_scope_nation(ws, tval, layout, trigger::to_generic(dcon::nation_id{}), this_slot, from_slot, r_lo, r_hi, indentation);
537}
539 return es_x_event_country_scope_nation(ws, tval, layout, trigger::to_generic(dcon::nation_id{}), this_slot, from_slot, r_hi, r_lo, indentation);
540}
542 return es_x_decision_country_scope_nation(ws, tval, layout, trigger::to_generic(dcon::nation_id{}), this_slot, from_slot, r_hi, r_lo, indentation);
543}
545 if((tval[0] & effect::is_random_scope) != 0) {
546 if(primary_slot != -1) {
547 auto neighbor_range = ws.world.province_get_province_adjacency(trigger::to_prov(primary_slot));
548 std::vector<dcon::province_id> rlist;
549
550 if((tval[0] & effect::scope_has_limit) != 0) {
551 auto limit = trigger::payload(tval[2]).tr_id;
552 for(auto p : neighbor_range) {
553 auto other = p.get_connected_provinces(p.get_connected_provinces(0) == trigger::to_prov(primary_slot) ? 1 : 0);
554 if(!other.get_nation_from_province_ownership() &&
555 trigger::evaluate(ws, limit, trigger::to_generic(other.id), this_slot, from_slot)) {
556 rlist.push_back(other.id);
557 }
558 }
559 } else {
560 for(auto p : neighbor_range) {
561 auto other = p.get_connected_provinces(p.get_connected_provinces(0) == trigger::to_prov(primary_slot) ? 1 : 0);
562 if(!other.get_nation_from_province_ownership()) {
563 rlist.push_back(other.id);
564 }
565 }
566 }
567
568 if(rlist.size() != 0) {
569 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
570
571 show_full_random_tooltip(ws, tval[0], "empty_neighboring_province", layout, rlist[r], indentation);
572 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
573 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1,
574 indentation + indentation_amount);
575 }
576 return 0;
577 }
578 }
579
580 show_short_any_random_tooltip(ws, tval[0], "empty_neighboring_province", layout, indentation);
581 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
582 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
583 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
584 indentation + indentation_amount);
585}
587 if((tval[0] & effect::is_random_scope) != 0) {
588 std::vector<dcon::nation_id> rlist;
589 if((tval[0] & effect::scope_has_limit) != 0) {
590 auto limit = trigger::payload(tval[2]).tr_id;
591 for(auto& n : ws.great_nations) {
592 if(trigger::evaluate(ws, limit, trigger::to_generic(n.nation), this_slot, from_slot)) {
593 rlist.push_back(n.nation);
594 }
595 }
596 } else {
597 for(auto& n : ws.great_nations) {
598 rlist.push_back(n.nation);
599 }
600 }
601
602 if(rlist.size() != 0) {
603 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
604
605 show_full_random_tooltip(ws, tval[0], "great_power", layout, rlist[r], indentation);
606 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
607 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1,
608 indentation + indentation_amount);
609 }
610 return 0;
611 }
612
613 show_short_any_random_tooltip(ws, tval[0], "great_power", layout, indentation);
614 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
615 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
616 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
617 indentation + indentation_amount);
618}
620 show_short_any_random_tooltip(ws, tval[0], "poor_strata_pop", layout, indentation);
621 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
622
623 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
624 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
625 indentation + indentation_amount);
626}
628 show_short_any_random_tooltip(ws, tval[0], "poor_strata_pop", layout, indentation);
629 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
630 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
631 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
632 indentation + indentation_amount);
633}
635 show_short_any_random_tooltip(ws, tval[0], "poor_strata_pop", layout, indentation);
636 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
637 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
638 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
639 indentation + indentation_amount);
640}
642 show_short_any_random_tooltip(ws, tval[0], "middle_strata_pop", layout, indentation);
643 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
644 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
645 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
646 indentation + indentation_amount);
647}
649 show_short_any_random_tooltip(ws, tval[0], "middle_strata_pop", layout, indentation);
650 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
651 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
652 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
653 indentation + indentation_amount);
654}
656 show_short_any_random_tooltip(ws, tval[0], "middle_strata_pop", layout, indentation);
657 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
658 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
659 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
660 indentation + indentation_amount);
661}
663 auto box = text::open_layout_box(layout, indentation);
665 text::add_space_to_layout_box(ws, layout, box);
666 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "rich_strata_pop"));
667 text::close_layout_box(layout, box);
668 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
669 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
670 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
671 indentation + indentation_amount);
672}
674 show_short_any_random_tooltip(ws, tval[0], "rich_strata_pop", layout, indentation);
675 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
676 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
677 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
678 indentation + indentation_amount);
679}
681 show_short_any_random_tooltip(ws, tval[0], "rich_strata_pop", layout, indentation);
682 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
683 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
684 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
685 indentation + indentation_amount);
686}
688 show_short_any_random_tooltip(ws, tval[0], "pop", layout, indentation);
689 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
690 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
691 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
692 indentation + indentation_amount);
693}
695 show_short_any_random_tooltip(ws, tval[0], "pop", layout, indentation);
696 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
697 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
698 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
699 indentation + indentation_amount);
700}
702 show_short_any_random_tooltip(ws, tval[0], "pop", layout, indentation);
703 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
704 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
705 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
706 indentation + indentation_amount);
707}
709 if((tval[0] & effect::is_random_scope) != 0) {
710 if(primary_slot != -1) {
711 std::vector<dcon::province_id> rlist;
712
713 if((tval[0] & effect::scope_has_limit) != 0) {
714 auto limit = trigger::payload(tval[2]).tr_id;
715 for(auto p : ws.world.nation_get_province_ownership(trigger::to_nation(primary_slot))) {
716 if(trigger::evaluate(ws, limit, trigger::to_generic(p.get_province().id), this_slot, from_slot)) {
717 rlist.push_back(p.get_province().id);
718 }
719 }
720 } else {
721 for(auto p : ws.world.nation_get_province_ownership(trigger::to_nation(primary_slot))) {
722 rlist.push_back(p.get_province().id);
723 }
724 }
725
726 if(rlist.size() != 0) {
727 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
728 show_full_random_tooltip(ws, tval[0], "owned_province", layout, rlist[r], indentation);
729 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
730 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1,
731 indentation + indentation_amount);
732 }
733 return 0;
734 }
735 }
736
737 auto box = text::open_layout_box(layout, indentation);
739 text::add_space_to_layout_box(ws, layout, box);
740 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "owned_province"));
741 text::add_space_to_layout_box(ws, layout, box);
742 if(primary_slot != -1)
743 text::add_to_layout_box(ws, layout, box, trigger::to_nation(primary_slot));
744 else
745 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "singular_nation"));
746 text::close_layout_box(layout, box);
747 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
748 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
749 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
750 indentation + indentation_amount);
751}
753 if((tval[0] & effect::is_random_scope) != 0) {
754 if(primary_slot != -1) {
755 std::vector<dcon::province_id> rlist;
756
757 if((tval[0] & effect::scope_has_limit) != 0) {
758 auto limit = trigger::payload(tval[2]).tr_id;
759 auto d = ws.world.state_instance_get_definition(trigger::to_state(primary_slot));
760 auto o = ws.world.state_instance_get_nation_from_state_ownership(trigger::to_state(primary_slot));
761 for(auto p : ws.world.state_definition_get_abstract_state_membership(d)) {
762 if(p.get_province().get_nation_from_province_ownership() == o) {
763 if(trigger::evaluate(ws, limit, trigger::to_generic(p.get_province().id), this_slot, from_slot)) {
764 rlist.push_back(p.get_province().id);
765 }
766 }
767 }
768 } else {
769 auto d = ws.world.state_instance_get_definition(trigger::to_state(primary_slot));
770 auto o = ws.world.state_instance_get_nation_from_state_ownership(trigger::to_state(primary_slot));
771 for(auto p : ws.world.state_definition_get_abstract_state_membership(d)) {
772 if(p.get_province().get_nation_from_province_ownership() == o) {
773 rlist.push_back(p.get_province().id);
774 }
775 }
776 }
777
778 if(rlist.size() != 0) {
779 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
780
781 show_full_random_tooltip(ws, tval[0], "owned_province", layout, rlist[r], indentation);
782 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
783 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1,
784 indentation + indentation_amount);
785 }
786 return 0;
787 }
788 }
789
790 {
791 auto box = text::open_layout_box(layout, indentation);
793 text::add_space_to_layout_box(ws, layout, box);
794 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "owned_province"));
795 text::add_space_to_layout_box(ws, layout, box);
796 if(primary_slot != -1)
797 text::add_to_layout_box(ws, layout, box, trigger::to_state(primary_slot));
798 else
799 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "singular_state"));
800 text::close_layout_box(layout, box);
801 }
802 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
803
804 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo,
805 r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0),
806 indentation + indentation_amount);
807}
809 if((tval[0] & effect::is_random_scope) != 0) {
810 if(primary_slot != -1) {
811 auto tag = ws.world.nation_get_identity_from_identity_holder(trigger::to_nation(primary_slot));
812 auto cores_range = ws.world.national_identity_get_core(tag);
813
814 std::vector<dcon::province_id> rlist;
815
816 if((tval[0] & effect::scope_has_limit) != 0) {
817 auto limit = trigger::payload(tval[2]).tr_id;
818 for(auto p : cores_range) {
819 if(trigger::evaluate(ws, limit, trigger::to_generic(p.get_province().id), this_slot, from_slot))
820 rlist.push_back(p.get_province().id);
821 }
822 } else {
823 for(auto p : cores_range) {
824 rlist.push_back(p.get_province().id);
825 }
826 }
827
828 if(rlist.size() != 0) {
829 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
830
831 show_full_random_tooltip(ws, tval[0], "core_of", layout, rlist[r], indentation);
832 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
833 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1,
834 indentation + indentation_amount);
835 }
836 return 0;
837 }
838 }
839
840 {
841 auto box = text::open_layout_box(layout, indentation);
843 text::add_space_to_layout_box(ws, layout, box);
844 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "core_of"));
845 text::add_space_to_layout_box(ws, layout, box);
846 if(primary_slot != -1)
847 text::add_to_layout_box(ws, layout, box, trigger::to_nation(primary_slot));
848 else
849 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "singular_nation"));
850 text::close_layout_box(layout, box);
851 }
852 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
853
854 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo, r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0), indentation + indentation_amount);
855}
857 if((tval[0] & effect::is_random_scope) != 0) {
858 if(primary_slot != -1) {
859 auto prov = trigger::to_prov(primary_slot);
860 auto cores_range = ws.world.province_get_core(prov);
861
862 std::vector<dcon::nation_id> rlist;
863
864 if((tval[0] & effect::scope_has_limit) != 0) {
865 auto limit = trigger::payload(tval[2]).tr_id;
866 for(auto p : cores_range) {
867 auto h = p.get_identity().get_nation_from_identity_holder();
868 if(h && trigger::evaluate(ws, limit, trigger::to_generic(h.id), this_slot, from_slot))
869 rlist.push_back(h.id);
870 }
871 } else {
872 for(auto p : cores_range) {
873 auto h = p.get_identity().get_nation_from_identity_holder();
874 if(h)
875 rlist.push_back(h.id);
876 }
877 }
878
879 if(rlist.size() != 0) {
880 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
881
882 show_full_random_tooltip(ws, tval[0], "core_in", layout, rlist[r], indentation);
883 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
884 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1,
885 indentation + indentation_amount);
886 }
887 return 0;
888 }
889 }
890
891 {
892 auto box = text::open_layout_box(layout, indentation);
894 text::add_space_to_layout_box(ws, layout, box);
895 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "core_in"));
896 text::add_space_to_layout_box(ws, layout, box);
897 if(primary_slot != -1)
898 text::add_to_layout_box(ws, layout, box, trigger::to_prov(primary_slot));
899 else
900 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "singular_province"));
901 text::close_layout_box(layout, box);
902 }
903 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
904
905 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo, r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0), indentation + indentation_amount);
906}
908 if((tval[0] & effect::is_random_scope) != 0) {
909 std::vector<dcon::nation_id> rlist;
910
911 if((tval[0] & effect::scope_has_limit) != 0) {
912 auto limit = trigger::payload(tval[2]).tr_id;
913 for(auto si : ws.world.nation_get_overlord_as_ruler(trigger::to_nation(primary_slot))) {
914 if(si.get_subject().get_is_substate() && trigger::evaluate(ws, limit, trigger::to_generic(si.get_subject().id), this_slot, from_slot))
915 rlist.push_back(si.get_subject().id);
916 }
917 } else {
918 for(auto si : ws.world.nation_get_overlord_as_ruler(trigger::to_nation(primary_slot))) {
919 if(si.get_subject().get_is_substate())
920 rlist.push_back(si.get_subject().id);
921 }
922 }
923 if(rlist.size() != 0) {
924 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
925
926 show_full_random_tooltip(ws, tval[0], "substate_of", layout, rlist[r], indentation);
927 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
928 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1, indentation + indentation_amount);
929 }
930 return 0;
931 }
932
933 {
934 auto box = text::open_layout_box(layout, indentation);
936 text::add_space_to_layout_box(ws, layout, box);
937 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "substate_of"));
938 text::add_space_to_layout_box(ws, layout, box);
939 if(primary_slot != -1)
940 text::add_to_layout_box(ws, layout, box, trigger::to_nation(primary_slot));
941 else
942 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "singular_nation"));
943 text::close_layout_box(layout, box);
944 }
945 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
946
947 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo, r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0), indentation + indentation_amount);
948
949}
951 if((tval[0] & effect::is_random_scope) != 0) {
952 if(primary_slot != -1) {
953 std::vector<dcon::state_instance_id> rlist;
954
955 if((tval[0] & effect::scope_has_limit) != 0) {
956 auto limit = trigger::payload(tval[2]).tr_id;
957 for(auto si : ws.world.nation_get_state_ownership(trigger::to_nation(primary_slot))) {
958 if(trigger::evaluate(ws, limit, trigger::to_generic(si.get_state().id), this_slot, from_slot))
959 rlist.push_back(si.get_state().id);
960 }
961 } else {
962 for(auto si : ws.world.nation_get_state_ownership(trigger::to_nation(primary_slot))) {
963 rlist.push_back(si.get_state().id);
964 }
965 }
966
967 if(rlist.size() != 0) {
968 auto r = rng::get_random(ws, r_hi, r_lo) % rlist.size();
969
970 show_full_random_tooltip(ws, tval[0], "state_of", layout, rlist[r], indentation);
971 show_limit(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, indentation);
972 return 1 + display_subeffects(ws, tval, layout, trigger::to_generic(rlist[r]), this_slot, from_slot, r_hi, r_lo + 1,
973 indentation + indentation_amount);
974 }
975 return 0;
976 }
977 }
978
979 {
980 auto box = text::open_layout_box(layout, indentation);
982 text::add_space_to_layout_box(ws, layout, box);
983 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "state_of"));
984 text::add_space_to_layout_box(ws, layout, box);
985 if(primary_slot != -1)
986 text::add_to_layout_box(ws, layout, box, trigger::to_nation(primary_slot));
987 else
988 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "singular_nation"));
989 text::close_layout_box(layout, box);
990 }
991 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
992
993 return ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0) + display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_lo, r_hi + ((tval[0] & effect::is_random_scope) != 0 ? 1 : 0), indentation + indentation_amount);
994}
996
997 auto const source_size = 1 + effect::get_effect_scope_payload_size(tval);
998 auto chances_total = tval[2];
999
1000 auto sub_units_start = tval + 3; // [code] + [payload size] + [chances total] + [first sub effect chance]
1001
1002 auto r = int32_t(rng::get_random(ws, r_hi, r_lo) % chances_total);
1003 uint32_t rval = 0;
1004 bool found_res = false;
1005
1006 while(sub_units_start < tval + source_size) {
1007 auto box = text::open_layout_box(layout, indentation);
1008 text::add_to_layout_box(ws, layout, box, text::fp_percentage{ float(*sub_units_start) / float(chances_total) });
1009 text::add_space_to_layout_box(ws, layout, box);
1010 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "chance_of"));
1011 text::close_layout_box(layout, box);
1012
1013 r -= *sub_units_start;
1014 auto tresult = 1 + internal_make_effect_description(ws, sub_units_start + 1, layout, primary_slot, this_slot, from_slot, r_hi, r_lo + 1,
1015 indentation + indentation_amount);
1016 if(r < 0 && !found_res) {
1017 found_res = true;
1018 rval = tresult;
1019 }
1020 sub_units_start += 2 + effect::get_generic_effect_payload_size(sub_units_start + 1); // each member preceded by uint16_t
1021 }
1022 return rval;
1023}
1025 auto chance = tval[2];
1026 auto box = text::open_layout_box(layout, indentation);
1027 text::add_to_layout_box(ws, layout, box, text::fp_percentage{ float(chance) / 100.f });
1028 text::add_space_to_layout_box(ws, layout, box);
1029 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "chance_of"));
1030 text::close_layout_box(layout, box);
1031 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1032 return 1 + display_subeffects(ws, tval, layout, primary_slot, this_slot, from_slot, r_hi, r_lo + 1, indentation + indentation_amount);
1033}
1035 auto mod_k = dcon::value_modifier_key{ dcon::value_modifier_key::value_base_t(tval[2]) };
1036 if(primary_slot != -1) {
1037 auto chance = trigger::evaluate_multiplicative_modifier(ws, mod_k, primary_slot, this_slot, from_slot);
1038 assert(chance >= 0.f);
1039 auto box = text::open_layout_box(layout, indentation);
1040 text::add_to_layout_box(ws, layout, box, text::fp_percentage{ float(chance) / 100.f });
1041 text::add_space_to_layout_box(ws, layout, box);
1042 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "chance_of"));
1043 text::close_layout_box(layout, box);
1044 }
1045 ui::multiplicative_value_modifier_description(ws, layout, mod_k, primary_slot, this_slot, from_slot);
1046 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1047 return 1 + display_subeffects(ws, tval, layout, primary_slot, this_slot, from_slot, r_hi, r_lo + 1, indentation + indentation_amount);
1048}
1050 {
1051 auto box = text::open_layout_box(layout, indentation);
1052 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "owner_of"));
1053 text::add_space_to_layout_box(ws, layout, box);
1054 text::add_to_layout_box(ws, layout, box,
1055 primary_slot != -1 ? text::get_dynamic_state_name(ws, trigger::to_state(primary_slot))
1056 : text::produce_simple_string(ws, "singular_state"));
1057 text::close_layout_box(layout, box);
1058 }
1059 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1060 return display_subeffects(ws, tval, layout,
1061 primary_slot != -1
1062 ? trigger::to_generic(ws.world.state_instance_get_nation_from_state_ownership(trigger::to_state(primary_slot)))
1063 : -1,
1064 this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1065}
1067 auto box = text::open_layout_box(layout, indentation);
1068 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "owner_of"));
1069 text::add_space_to_layout_box(ws, layout, box);
1070 text::add_to_layout_box(ws, layout, box, primary_slot != -1 ? text::produce_simple_string(ws, ws.world.province_get_name(trigger::to_prov(primary_slot))) : text::produce_simple_string(ws, "singular_province"));
1071 text::close_layout_box(layout, box);
1072 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1073 return display_subeffects(ws, tval, layout,
1074 primary_slot != -1
1075 ? trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot)))
1076 : -1,
1077 this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1078}
1080 {
1081 auto box = text::open_layout_box(layout, indentation);
1082 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "controller_of"));
1083 text::add_space_to_layout_box(ws, layout, box);
1084 text::add_to_layout_box(ws, layout, box,
1085 primary_slot != -1 ? text::produce_simple_string(ws, ws.world.province_get_name(trigger::to_prov(primary_slot)))
1086 : text::produce_simple_string(ws, "singular_province"));
1087 text::close_layout_box(layout, box);
1088 }
1089 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1090 return display_subeffects(ws, tval, layout,
1091 primary_slot != -1 ? trigger::to_generic(ws.world.province_get_nation_from_province_control(trigger::to_prov(primary_slot)))
1092 : -1,
1093 this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1094}
1096 {
1097 auto box = text::open_layout_box(layout, indentation);
1098 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "location_of_pop"));
1099 text::close_layout_box(layout, box);
1100 }
1101 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1102 return display_subeffects(ws, tval, layout,
1103 primary_slot != -1 ? trigger::to_generic(ws.world.pop_get_province_from_pop_location(trigger::to_pop(primary_slot))) : -1,
1104 this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1105}
1107 auto box = text::open_layout_box(layout, indentation);
1108 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "nation_of_pop"));
1109 text::close_layout_box(layout, box);
1110 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1111 return display_subeffects(ws, tval, layout,
1112 primary_slot != -1 ? trigger::to_generic(nations::owner_of_pop(ws, trigger::to_pop(primary_slot))) : -1, this_slot,
1113 from_slot, r_hi, r_lo, indentation + indentation_amount);
1114}
1116 auto box = text::open_layout_box(layout, indentation);
1117 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "owner_of"));
1118 text::add_space_to_layout_box(ws, layout, box);
1119 text::add_to_layout_box(ws, layout, box,
1120 primary_slot != -1 ? text::get_dynamic_state_name(ws, trigger::to_state(primary_slot))
1121 : text::produce_simple_string(ws, "singular_state"));
1122 text::close_layout_box(layout, box);
1123 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1124 return display_subeffects(ws, tval, layout,
1125 primary_slot != -1
1126 ? trigger::to_generic(ws.world.state_instance_get_nation_from_state_ownership(trigger::to_state(primary_slot)))
1127 : -1,
1128 this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1129}
1131 {
1132 auto box = text::open_layout_box(layout, indentation);
1133 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "capital_of"));
1134 text::add_space_to_layout_box(ws, layout, box);
1135 text::add_to_layout_box(ws, layout, box,
1136 primary_slot != -1 ? text::produce_simple_string(ws, text::get_name(ws, trigger::to_nation(primary_slot)))
1137 : text::produce_simple_string(ws, "singular_nation"));
1138 text::close_layout_box(layout, box);
1139 }
1140 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1141 return display_subeffects(ws, tval, layout,
1142 primary_slot != -1 ? trigger::to_generic(ws.world.nation_get_capital(trigger::to_nation(primary_slot))) : -1, this_slot,
1143 from_slot, r_hi, r_lo, indentation + indentation_amount);
1144}
1146 {
1147 auto box = text::open_layout_box(layout, indentation);
1148 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "capital_of"));
1149 text::add_space_to_layout_box(ws, layout, box);
1150 text::add_to_layout_box(ws, layout, box,
1151 primary_slot != -1 ? text::produce_simple_string(ws, text::get_name(ws, ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))))
1152 : text::produce_simple_string(ws, "singular_nation"));
1153 text::close_layout_box(layout, box);
1154 }
1155 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1156 return display_subeffects(ws, tval, layout,
1157 primary_slot != -1 ? trigger::to_generic(ws.world.nation_get_capital(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot)))) : -1, this_slot,
1158 from_slot, r_hi, r_lo, indentation + indentation_amount);
1159}
1161 {
1162 auto box = text::open_layout_box(layout, indentation);
1163 text::add_to_layout_box(ws, layout, box,
1164 this_slot != -1 ? text::produce_simple_string(ws, text::get_name(ws, trigger::to_nation(this_slot)))
1165 : text::produce_simple_string(ws, "this_nation"));
1166 text::close_layout_box(layout, box);
1167 }
1168 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1169 return display_subeffects(ws, tval, layout, this_slot, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1170}
1172 {
1173 auto box = text::open_layout_box(layout, indentation);
1174 text::add_to_layout_box(ws, layout, box,
1175 this_slot != -1 ? text::get_dynamic_state_name(ws, trigger::to_state(this_slot))
1176 : text::produce_simple_string(ws, "this_state"));
1177 text::close_layout_box(layout, box);
1178 }
1179 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1180 return display_subeffects(ws, tval, layout, this_slot, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1181}
1183 {
1184 auto box = text::open_layout_box(layout, indentation);
1185 text::add_to_layout_box(ws, layout, box,
1186 this_slot != -1 ? text::produce_simple_string(ws, ws.world.province_get_name(trigger::to_prov(this_slot)))
1187 : text::produce_simple_string(ws, "this_province"));
1188 text::close_layout_box(layout, box);
1189 }
1190 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1191 return display_subeffects(ws, tval, layout, this_slot, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1192}
1194 {
1195 auto box = text::open_layout_box(layout, indentation);
1196 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "this_pop"));
1197 text::close_layout_box(layout, box);
1198 }
1199 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1200 return display_subeffects(ws, tval, layout, this_slot, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1201}
1203 {
1204 auto box = text::open_layout_box(layout, indentation);
1205 text::add_to_layout_box(ws, layout, box,
1206 from_slot != -1 ? text::produce_simple_string(ws, text::get_name(ws, trigger::to_nation(from_slot)))
1207 : text::produce_simple_string(ws, "from_nation"));
1208 text::close_layout_box(layout, box);
1209 }
1210 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1211 return display_subeffects(ws, tval, layout, from_slot, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1212}
1214 {
1215 auto box = text::open_layout_box(layout, indentation);
1216 text::add_to_layout_box(ws, layout, box,
1217 from_slot != -1 ? text::get_dynamic_state_name(ws, trigger::to_state(from_slot))
1218 : text::produce_simple_string(ws, "from_state"));
1219 text::close_layout_box(layout, box);
1220 }
1221 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1222 return display_subeffects(ws, tval, layout, from_slot, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1223}
1225 {
1226 auto box = text::open_layout_box(layout, indentation);
1227 text::add_to_layout_box(ws, layout, box,
1228 from_slot != -1 ? text::produce_simple_string(ws, ws.world.province_get_name(trigger::to_prov(from_slot)))
1229 : text::produce_simple_string(ws, "from_province"));
1230 text::close_layout_box(layout, box);
1231 }
1232 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1233 return display_subeffects(ws, tval, layout, from_slot, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1234}
1236 {
1237 auto box = text::open_layout_box(layout, indentation);
1238 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "from_pop"));
1239 text::close_layout_box(layout, box);
1240 }
1241 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1242 return display_subeffects(ws, tval, layout, from_slot, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1243}
1245 {
1246 auto box = text::open_layout_box(layout, indentation);
1247 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "adjacent_sea"));
1248 text::close_layout_box(layout, box);
1249 }
1250 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1251
1252 auto sea_zone = primary_slot != -1 ? [&ws](int32_t p_slot) {
1253 auto pid = fatten(ws.world, trigger::to_prov(p_slot));
1254 for(auto adj : pid.get_province_adjacency()) {
1255 if(adj.get_connected_provinces(0).id.index() >= ws.province_definitions.first_sea_province.index()) {
1256 return adj.get_connected_provinces(0).id;
1257 } else if(adj.get_connected_provinces(1).id.index() >= ws.province_definitions.first_sea_province.index()) {
1258 return adj.get_connected_provinces(1).id;
1259 }
1260 }
1261 return dcon::province_id{};
1262 }(primary_slot)
1263 : dcon::province_id{};
1264
1265 return display_subeffects(ws, tval, layout, sea_zone ? trigger::to_generic(sea_zone) : -1, this_slot, from_slot, r_hi, r_lo,
1266 indentation + indentation_amount);
1267}
1269 auto prim_culture =
1270 primary_slot != -1 ? ws.world.nation_get_primary_culture(trigger::to_nation(primary_slot)) : dcon::culture_id{};
1271 auto cg = ws.world.culture_get_group_from_culture_group_membership(prim_culture);
1272
1273 {
1274 auto box = text::open_layout_box(layout, indentation);
1275 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "cultural_union_of"));
1276 text::add_space_to_layout_box(ws, layout, box);
1277 text::add_to_layout_box(ws, layout, box,
1278 cg ? text::produce_simple_string(ws, ws.world.culture_group_get_name(cg))
1279 : text::produce_simple_string(ws, "singular_nation"));
1280 text::close_layout_box(layout, box);
1281 }
1282 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1283
1284 auto union_tag = ws.world.culture_group_get_identity_from_cultural_union_of(cg);
1285 auto group_holder = ws.world.national_identity_get_nation_from_identity_holder(union_tag);
1286
1287 return display_subeffects(ws, tval, layout, trigger::to_generic(group_holder), this_slot, from_slot, r_hi, r_lo,
1288 indentation + indentation_amount);
1289}
1291 {
1292 auto box = text::open_layout_box(layout, indentation);
1293 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "overlord_of"));
1294 text::add_space_to_layout_box(ws, layout, box);
1295 text::add_to_layout_box(ws, layout, box,
1296 primary_slot != -1 ? text::produce_simple_string(ws, text::get_name(ws, trigger::to_nation(primary_slot)))
1297 : text::produce_simple_string(ws, "singular_nation"));
1298 text::close_layout_box(layout, box);
1299 }
1300 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1301
1302 auto olr = ws.world.nation_get_overlord_as_subject(trigger::to_nation(primary_slot));
1303 return display_subeffects(ws, tval, layout, trigger::to_generic(ws.world.overlord_get_ruler(olr)), this_slot, from_slot, r_hi,
1304 r_lo, indentation + indentation_amount);
1305}
1307 {
1308 auto box = text::open_layout_box(layout, indentation);
1309 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "sphere_leader_of"));
1310 text::add_space_to_layout_box(ws, layout, box);
1311 text::add_to_layout_box(ws, layout, box,
1312 primary_slot != -1 ? text::produce_simple_string(ws, text::get_name(ws, trigger::to_nation(primary_slot)))
1313 : text::produce_simple_string(ws, "singular_nation"));
1314 text::close_layout_box(layout, box);
1315 }
1316 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1317
1318 return display_subeffects(ws, tval, layout,
1319 primary_slot != -1 ? trigger::to_generic(ws.world.nation_get_in_sphere_of((trigger::to_nation(primary_slot)))) : -1,
1320 this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1321}
1323 auto rtag =
1324 from_slot != -1 ? ws.world.rebel_faction_get_defection_target(trigger::to_rebel(from_slot)) : dcon::national_identity_id{};
1325 auto r_holder = ws.world.national_identity_get_nation_from_identity_holder(rtag);
1326
1327 {
1328 auto box = text::open_layout_box(layout, indentation);
1329 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "reb_independence_nation"));
1330 text::close_layout_box(layout, box);
1331 }
1332 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1333
1334 return display_subeffects(ws, tval, layout, r_holder ? trigger::to_generic(r_holder) : -1, this_slot, from_slot, r_hi, r_lo,
1335 indentation + indentation_amount);
1336}
1338 auto ctag = ws.world.state_instance_get_flashpoint_tag(trigger::to_state(primary_slot));
1339 auto fp_nation = ws.world.national_identity_get_nation_from_identity_holder(ctag);
1340
1341 {
1342 auto box = text::open_layout_box(layout, indentation);
1343 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "flashpoint_nation"));
1344 text::close_layout_box(layout, box);
1345 }
1346 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1347 return display_subeffects(ws, tval, layout, fp_nation ? trigger::to_generic(fp_nation) : -1, this_slot, from_slot, r_hi, r_lo,
1348 indentation + indentation_amount);
1349}
1351 {
1352 auto box = text::open_layout_box(layout, indentation);
1353 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "crisis_state"));
1354 text::close_layout_box(layout, box);
1355 }
1356 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1357 if(ws.crisis_attacker_wargoals.size() > 0) {
1358 auto first_wg = ws.crisis_attacker_wargoals.at(0);
1359 auto target_nation = first_wg.target_nation;
1360 auto target_state_def = first_wg.state;
1361
1362 for(auto st : ws.world.in_state_instance) {
1363 if(st.get_nation_from_state_ownership() == target_nation && st.get_definition() == target_state_def) {
1364 auto cstate = first_wg.state ? trigger::to_generic(st) : -1;
1365 return display_subeffects(ws, tval, layout, cstate, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1366 }
1367 }
1368 }
1369 return 0;
1370}
1372 {
1373 auto box = text::open_layout_box(layout, indentation);
1374 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "containing_state"));
1375 text::add_space_to_layout_box(ws, layout, box);
1376 text::add_to_layout_box(ws, layout, box,
1377 primary_slot != -1 ? text::produce_simple_string(ws, ws.world.province_get_name(trigger::to_prov(primary_slot)))
1378 : text::produce_simple_string(ws, "singular_province"));
1379 text::close_layout_box(layout, box);
1380 }
1381 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1382 auto st = primary_slot != -1 ? ws.world.province_get_state_membership(trigger::to_prov(primary_slot)) : dcon::state_instance_id{};
1383 return display_subeffects(ws, tval, layout, st ? trigger::to_generic(st) : -1, this_slot, from_slot, r_hi, r_lo,
1384 indentation + indentation_amount);
1385}
1387 {
1388 auto box = text::open_layout_box(layout, indentation);
1389 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "containing_state"));
1390 text::add_space_to_layout_box(ws, layout, box);
1391 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "singular_pop"));
1392 text::close_layout_box(layout, box);
1393 }
1394 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1395 auto st = primary_slot != -1 ? ws.world.province_get_state_membership(ws.world.pop_get_province_from_pop_location(trigger::to_pop(primary_slot))) : dcon::state_instance_id{};
1396 return display_subeffects(ws, tval, layout, st ? trigger::to_generic(st) : -1, this_slot, from_slot, r_hi, r_lo,
1397 indentation + indentation_amount);
1398}
1400 auto tag = trigger::payload(tval[2]).tag_id;
1401 auto tag_holder = ws.world.national_identity_get_nation_from_identity_holder(tag);
1402 auto box = text::open_layout_box(layout, indentation);
1403 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, tag_holder ? text::get_name(ws, tag_holder) : ws.world.national_identity_get_name(tag)));
1404 text::close_layout_box(layout, box);
1405 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1406 return display_subeffects(ws, tval, layout, tag_holder ? trigger::to_generic(tag_holder) : -1, this_slot, from_slot, r_hi, r_lo,
1407 indentation + indentation_amount);
1408}
1410 auto p = trigger::payload(tval[2]).prov_id;
1411
1412 {
1413 auto box = text::open_layout_box(layout, indentation);
1414 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.province_get_name(p)));
1415 text::close_layout_box(layout, box);
1416 }
1417 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1418 return display_subeffects(ws, tval, layout, trigger::to_generic(p), this_slot, from_slot, r_hi, r_lo,
1419 indentation + indentation_amount);
1420}
1421
1423 auto type = (tval[0] & effect::scope_has_limit) != 0 ? trigger::payload(tval[3]).popt_id : trigger::payload(tval[2]).popt_id;
1424
1425 {
1426 auto box = text::open_layout_box(layout, indentation);
1427 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "every"));
1428 text::add_space_to_layout_box(ws, layout, box);
1429 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.pop_type_get_name(type)));
1430 text::add_space_to_layout_box(ws, layout, box);
1431 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "pop"));
1432 text::close_layout_box(layout, box);
1433 }
1434
1435 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1436
1437 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1438}
1440 auto type = (tval[0] & effect::scope_has_limit) != 0 ? trigger::payload(tval[3]).popt_id : trigger::payload(tval[2]).popt_id;
1441
1442 {
1443 auto box = text::open_layout_box(layout, indentation);
1444 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "every"));
1445 text::add_space_to_layout_box(ws, layout, box);
1446 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.pop_type_get_name(type)));
1447 text::add_space_to_layout_box(ws, layout, box);
1448 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "pop"));
1449 text::close_layout_box(layout, box);
1450 }
1451
1452 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1453
1454 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1455}
1457 auto type = (tval[0] & effect::scope_has_limit) != 0 ? trigger::payload(tval[3]).popt_id : trigger::payload(tval[2]).popt_id;
1458
1459 {
1460 auto box = text::open_layout_box(layout, indentation);
1461 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "every"));
1462 text::add_space_to_layout_box(ws, layout, box);
1463 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.pop_type_get_name(type)));
1464 text::add_space_to_layout_box(ws, layout, box);
1465 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "pop"));
1466 text::close_layout_box(layout, box);
1467 }
1468
1469 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1470
1471 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1472}
1474 auto region = trigger::payload(tval[(tval[0] & effect::scope_has_limit) != 0 ? 3 : 2]).state_id;
1475 auto box = text::open_layout_box(layout, indentation);
1476 text::add_to_layout_box(ws, layout, box, region);
1477 text::close_layout_box(layout, box);
1478 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1479 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1480}
1482 auto region = (tval[0] & effect::scope_has_limit) != 0 ? trigger::payload(tval[3]).reg_id : trigger::payload(tval[2]).reg_id;
1483 auto box = text::open_layout_box(layout, indentation);
1484 text::add_to_layout_box(ws, layout, box, ws.world.region_get_name(region));
1485 text::close_layout_box(layout, box);
1486 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1487 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1488}
1490 auto box = text::open_layout_box(layout, indentation);
1491 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "no_effect"));
1492 text::close_layout_box(layout, box);
1493 return 0;
1494}
1496 auto new_capital = trigger::payload(tval[1]).prov_id;
1497 auto box = text::open_layout_box(layout, indentation);
1498 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "move_capital_to"));
1499 text::add_space_to_layout_box(ws, layout, box);
1500 text::add_to_layout_box(ws, layout, box, new_capital);
1501 text::close_layout_box(layout, box);
1502 return 0;
1503}
1505 auto tag = trigger::payload(tval[1]).tag_id;
1506 {
1507 auto box = text::open_layout_box(layout, indentation);
1509 text::add_to_substitution_map(m, text::variable_type::adj, ws.world.national_identity_get_adjective(tag));
1510 text::localised_format_box(ws, layout, box, "add_x_core", m);
1511 text::close_layout_box(layout, box);
1512 }
1513 return 0;
1514}
1516 auto tag = trigger::payload(tval[1]).tag_id;
1517 {
1518 auto box = text::open_layout_box(layout, indentation);
1520 text::add_to_substitution_map(m, text::variable_type::adj, ws.world.national_identity_get_adjective(tag));
1521 text::localised_format_box(ws, layout, box, "add_x_core", m);
1522 text::close_layout_box(layout, box);
1523 }
1524 return 0;
1525}
1526
1528 {
1529 auto box = text::open_layout_box(layout, indentation);
1531 add_adj_this_to_map(ws, m, trigger::to_nation(this_slot));
1532 text::localised_format_box(ws, layout, box, "add_x_core", m);
1533 text::close_layout_box(layout, box);
1534 }
1535 return 0;
1536}
1538 {
1539 auto box = text::open_layout_box(layout, indentation);
1541 add_adj_this_to_map(ws, m, trigger::to_prov(this_slot));
1542 text::localised_format_box(ws, layout, box, "add_x_core", m);
1543 text::close_layout_box(layout, box);
1544 }
1545 return 0;
1546}
1548 {
1549 auto box = text::open_layout_box(layout, indentation);
1551 add_adj_this_to_map(ws, m, trigger::to_state(this_slot));
1552 text::localised_format_box(ws, layout, box, "add_x_core", m);
1553 text::close_layout_box(layout, box);
1554 }
1555 return 0;
1556}
1558 {
1559 auto box = text::open_layout_box(layout, indentation);
1561 add_adj_this_to_map(ws, m, trigger::to_pop(this_slot));
1562 text::localised_format_box(ws, layout, box, "add_x_core", m);
1563 text::close_layout_box(layout, box);
1564 }
1565 return 0;
1566}
1568 {
1569 auto box = text::open_layout_box(layout, indentation);
1571 add_adj_from_to_map(ws, m, trigger::to_prov(from_slot));
1572 text::localised_format_box(ws, layout, box, "add_x_core", m);
1573 text::close_layout_box(layout, box);
1574 }
1575 return 0;
1576}
1578 {
1579 auto box = text::open_layout_box(layout, indentation);
1581 add_adj_from_to_map(ws, m, trigger::to_nation(from_slot));
1582 text::localised_format_box(ws, layout, box, "add_x_core", m);
1583 text::close_layout_box(layout, box);
1584 }
1585 return 0;
1586}
1588 {
1589 auto box = text::open_layout_box(layout, indentation);
1591 add_adj_from_to_map(ws, m, trigger::to_rebel(from_slot));
1592 text::localised_format_box(ws, layout, box, "add_x_core", m);
1593 text::close_layout_box(layout, box);
1594 }
1595 return 0;
1596}
1597
1599 auto prov = trigger::payload(tval[1]).prov_id;
1600 {
1601 auto box = text::open_layout_box(layout, indentation);
1602 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "add_core_to"));
1603 text::add_space_to_layout_box(ws, layout, box);
1604 text::add_to_layout_box(ws, layout, box, prov);
1605 text::close_layout_box(layout, box);
1606 }
1607 return 0;
1608}
1609
1611 {
1612 auto box = text::open_layout_box(layout, indentation);
1614 add_adj_this_to_map(ws, m, trigger::to_nation(this_slot));
1615 text::localised_format_box(ws, layout, box, "add_x_core", m);
1616 text::close_layout_box(layout, box);
1617 }
1618 return 0;
1619}
1621 {
1622 auto box = text::open_layout_box(layout, indentation);
1624 add_adj_this_to_map(ws, m, trigger::to_prov(this_slot));
1625 text::localised_format_box(ws, layout, box, "add_x_core", m);
1626 text::close_layout_box(layout, box);
1627 }
1628 return 0;
1629}
1631 {
1632 auto box = text::open_layout_box(layout, indentation);
1634 add_adj_this_to_map(ws, m, trigger::to_state(this_slot));
1635 text::localised_format_box(ws, layout, box, "add_x_core", m);
1636 text::close_layout_box(layout, box);
1637 }
1638 return 0;
1639}
1641 {
1642 auto box = text::open_layout_box(layout, indentation);
1644 add_adj_this_to_map(ws, m, trigger::to_pop(this_slot));
1645 text::localised_format_box(ws, layout, box, "add_x_core", m);
1646 text::close_layout_box(layout, box);
1647 }
1648 return 0;
1649}
1651 {
1652 auto box = text::open_layout_box(layout, indentation);
1654 add_adj_from_to_map(ws, m, trigger::to_nation(from_slot));
1655 text::localised_format_box(ws, layout, box, "add_x_core", m);
1656 text::close_layout_box(layout, box);
1657 }
1658 return 0;
1659}
1661 {
1662 auto box = text::open_layout_box(layout, indentation);
1664 add_adj_from_to_map(ws, m, trigger::to_prov(from_slot));
1665 text::localised_format_box(ws, layout, box, "add_x_core", m);
1666 text::close_layout_box(layout, box);
1667 }
1668 return 0;
1669}
1671 {
1672 auto box = text::open_layout_box(layout, indentation);
1674 add_adj_from_to_map(ws, m, trigger::to_rebel(from_slot));
1675 text::localised_format_box(ws, layout, box, "add_x_core", m);
1676 text::close_layout_box(layout, box);
1677 }
1678 return 0;
1679}
1681 auto tag = trigger::payload(tval[1]).tag_id;
1682 {
1683 auto box = text::open_layout_box(layout, indentation);
1685 text::add_to_substitution_map(m, text::variable_type::adj, ws.world.national_identity_get_adjective(tag));
1686 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1687 text::close_layout_box(layout, box);
1688 }
1689 return 0;
1690}
1692 auto tag = trigger::payload(tval[1]).tag_id;
1693 {
1694 auto box = text::open_layout_box(layout, indentation);
1696 text::add_to_substitution_map(m, text::variable_type::adj, ws.world.national_identity_get_adjective(tag));
1697 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1698 text::close_layout_box(layout, box);
1699 }
1700 return 0;
1701}
1703 auto prov = trigger::payload(tval[1]).prov_id;
1704 {
1705 auto box = text::open_layout_box(layout, indentation);
1706 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "remove_core_from"));
1707 text::add_space_to_layout_box(ws, layout, box);
1708 text::add_to_layout_box(ws, layout, box, prov);
1709 text::close_layout_box(layout, box);
1710 }
1711 return 0;
1712}
1714 {
1715 auto box = text::open_layout_box(layout, indentation);
1717 add_adj_this_to_map(ws, m, trigger::to_nation(this_slot));
1718 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1719 text::close_layout_box(layout, box);
1720 }
1721 return 0;
1722}
1724 {
1725 auto box = text::open_layout_box(layout, indentation);
1727 add_adj_this_to_map(ws, m, trigger::to_prov(this_slot));
1728 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1729 text::close_layout_box(layout, box);
1730 }
1731 return 0;
1732}
1734 {
1735 auto box = text::open_layout_box(layout, indentation);
1737 add_adj_this_to_map(ws, m, trigger::to_state(this_slot));
1738 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1739 text::close_layout_box(layout, box);
1740 }
1741 return 0;
1742}
1744 {
1745 auto box = text::open_layout_box(layout, indentation);
1747 add_adj_this_to_map(ws, m, trigger::to_pop(this_slot));
1748 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1749 text::close_layout_box(layout, box);
1750 }
1751 return 0;
1752}
1754 {
1755 auto box = text::open_layout_box(layout, indentation);
1757 add_adj_from_to_map(ws, m, trigger::to_nation(from_slot));
1758 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1759 text::close_layout_box(layout, box);
1760 }
1761 return 0;
1762}
1764 {
1765 auto box = text::open_layout_box(layout, indentation);
1767 add_adj_from_to_map(ws, m, trigger::to_prov(from_slot));
1768 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1769 text::close_layout_box(layout, box);
1770 }
1771 return 0;
1772}
1774 {
1775 auto box = text::open_layout_box(layout, indentation);
1777 add_adj_from_to_map(ws, m, trigger::to_rebel(from_slot));
1778 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1779 text::close_layout_box(layout, box);
1780 }
1781 return 0;
1782}
1784 {
1785 auto box = text::open_layout_box(layout, indentation);
1787 dcon::text_key name{ dcon::text_key::value_base_t(trigger::read_int32_t_from_payload(tval + 1)) };
1789 text::localised_format_box(ws, layout, box, "change_name_to", m);
1790 text::close_layout_box(layout, box);
1791 }
1792 return 0;
1793}
1795 {
1796 auto box = text::open_layout_box(layout, indentation);
1798 dcon::text_key name{ dcon::text_key::value_base_t(trigger::read_int32_t_from_payload(tval + 1)) };
1800 text::localised_format_box(ws, layout, box, "change_state_name_to", m);
1801 text::close_layout_box(layout, box);
1802 }
1803 return 0;
1804}
1806 {
1807 auto box = text::open_layout_box(layout, indentation);
1808
1809 auto cid = trigger::payload(tval[1]).com_id;
1810 std::string padding = cid.index() < 10 ? "0" : "";
1811 std::string description = "@$" + padding + std::to_string(cid.index());
1812 text::add_unparsed_text_to_layout_box(ws, layout, box, description);
1813
1815 text::add_to_substitution_map(m, text::variable_type::text, ws.world.commodity_get_name(trigger::payload(tval[1]).com_id));
1816 text::localised_format_box(ws, layout, box, "change_rgo_production_to", m);
1817 text::close_layout_box(layout, box);
1818 }
1819 return 0;
1820}
1822 {
1823 auto box = text::open_layout_box(layout, indentation);
1825 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[1]).cul_id));
1826 text::localised_format_box(ws, layout, box, "make_accepted_culture", m);
1827 text::close_layout_box(layout, box);
1828 }
1829 return 0;
1830}
1832 {
1833 auto box = text::open_layout_box(layout, indentation);
1835 text::localised_format_box(ws, layout, box, "union_culture_accepted", m);
1836 text::close_layout_box(layout, box);
1837 }
1838 return 0;
1839}
1840
1842 {
1843 auto box = text::open_layout_box(layout, indentation);
1845 text::add_to_substitution_map(m, text::variable_type::text, ws.world.nation_get_primary_culture(trigger::to_nation(this_slot)).get_name());
1846 text::localised_format_box(ws, layout, box, "make_accepted_culture", m);
1847 text::close_layout_box(layout, box);
1848 }
1849 return 0;
1850}
1852 {
1853 auto box = text::open_layout_box(layout, indentation);
1855 text::add_to_substitution_map(m, text::variable_type::text, ws.world.nation_get_primary_culture(trigger::to_nation(from_slot)).get_name());
1856 text::localised_format_box(ws, layout, box, "make_accepted_culture", m);
1857 text::close_layout_box(layout, box);
1858 }
1859 return 0;
1860}
1861
1863 {
1864 auto box = text::open_layout_box(layout, indentation);
1866 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[1]).cul_id));
1867 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1868 text::close_layout_box(layout, box);
1869 }
1870 return 0;
1871}
1872dcon::nation_id convert_this(sys::state& ws, dcon::nation_id n) {
1873 return n;
1874}
1875dcon::nation_id convert_this(sys::state& ws, dcon::state_instance_id p) {
1876 return ws.world.state_instance_get_nation_from_state_ownership(p);
1877}
1878dcon::nation_id convert_this(sys::state& ws, dcon::province_id p) {
1879 return ws.world.province_get_nation_from_province_ownership(p);
1880}
1881dcon::nation_id convert_this(sys::state& ws, dcon::pop_id p) {
1882 return nations::owner_of_pop(ws, p);
1883}
1884dcon::nation_id convert_this(sys::state& ws, dcon::rebel_faction_id p) {
1885 auto fp = fatten(ws.world, p);
1886 return fp.get_defection_target().get_nation_from_identity_holder();
1887}
1888template<typename T, typename F>
1889void add_to_map(sys::state& ws, text::substitution_map& map, T v, std::string_view alt, F const& f) {
1890 if(v) {
1892 } else {
1893 if(auto k = ws.lookup_key(alt); k) {
1895 } else {
1897 }
1898 }
1899}
1901 {
1902 auto box = text::open_layout_box(layout, indentation);
1904 add_to_map(ws, m, trigger::to_nation(this_slot), "this_nation_culture",
1905 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1906 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1907 text::close_layout_box(layout, box);
1908 }
1909 return 0;
1910}
1912 {
1913 auto box = text::open_layout_box(layout, indentation);
1915 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation_culture",
1916 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1917 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1918 text::close_layout_box(layout, box);
1919 }
1920 return 0;
1921}
1923 {
1924 auto box = text::open_layout_box(layout, indentation);
1926 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation_culture",
1927 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1928 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1929 text::close_layout_box(layout, box);
1930 }
1931 return 0;
1932}
1934 {
1935 auto box = text::open_layout_box(layout, indentation);
1937 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation_culture",
1938 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1939 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1940 text::close_layout_box(layout, box);
1941 }
1942 return 0;
1943}
1945 {
1946 auto box = text::open_layout_box(layout, indentation);
1948 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation_culture",
1949 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1950 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1951 text::close_layout_box(layout, box);
1952 }
1953 return 0;
1954}
1956 {
1957 auto box = text::open_layout_box(layout, indentation);
1959 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[1]).cul_id));
1960 text::localised_format_box(ws, layout, box, "alice_remove_accepted_culture", m);
1961 text::close_layout_box(layout, box);
1962 }
1963 return 0;
1964}
1966 {
1967 auto box = text::open_layout_box(layout, indentation);
1969 text::localised_format_box(ws, layout, box, "life_rating", m);
1970 text::add_space_to_layout_box(ws, layout, box);
1971 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
1972 text::close_layout_box(layout, box);
1973 }
1974 return 0;
1975}
1977 {
1978 auto box = text::open_layout_box(layout, indentation);
1980 text::add_to_substitution_map(m, text::variable_type::text, ws.world.religion_get_name(trigger::payload(tval[1]).rel_id));
1981 text::localised_format_box(ws, layout, box, "make_national_religion", m);
1982 text::close_layout_box(layout, box);
1983 }
1984 return 0;
1985}
1987 {
1988 auto box = text::open_layout_box(layout, indentation);
1990 text::add_to_substitution_map(m, text::variable_type::text, ws.world.religion_get_name(trigger::payload(tval[1]).rel_id));
1991 text::localised_format_box(ws, layout, box, "make_province_religion", m);
1992 text::close_layout_box(layout, box);
1993 }
1994 return 0;
1995}
1997 {
1998 auto box = text::open_layout_box(layout, indentation);
2000 text::add_to_substitution_map(m, text::variable_type::text, ws.world.religion_get_name(trigger::payload(tval[1]).rel_id));
2001 text::localised_format_box(ws, layout, box, "make_pop_religion", m);
2002 text::close_layout_box(layout, box);
2003 }
2004 return 0;
2005}
2007 {
2008 auto box = text::open_layout_box(layout, indentation);
2010 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[1]).cul_id));
2011 text::localised_format_box(ws, layout, box, "make_pop_culture", m);
2012 text::close_layout_box(layout, box);
2013 }
2014 return 0;
2015}
2017 {
2018 auto box = text::open_layout_box(layout, indentation);
2020 text::localised_format_box(ws, layout, box, "make_slave_state", m);
2021 text::close_layout_box(layout, box);
2022 }
2023 return 0;
2024}
2026 {
2027 auto box = text::open_layout_box(layout, indentation);
2029 text::localised_format_box(ws, layout, box, "make_slave_pop", m);
2030 text::close_layout_box(layout, box);
2031 }
2032 return 0;
2033}
2035 {
2036 auto box = text::open_layout_box(layout, indentation);
2038 text::localised_format_box(ws, layout, box, "research_points", m);
2039 text::add_space_to_layout_box(ws, layout, box);
2040 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
2041 text::close_layout_box(layout, box);
2042 }
2043 return 0;
2044}
2046 auto box = text::open_layout_box(layout, indentation);
2048 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
2049 text::localised_format_box(ws, layout, box, "change_tech_school", m);
2050 text::close_layout_box(layout, box);
2051 if(ws.user_settings.spoilers) {
2052 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + +indentation_amount);
2053 }
2054 return 0;
2055}
2057 {
2058 auto box = text::open_layout_box(layout, indentation);
2061 ws.world.government_type_get_name(trigger::payload(tval[1]).gov_id));
2062 text::localised_format_box(ws, layout, box, "change_government_to", m);
2063 text::close_layout_box(layout, box);
2064 }
2065 return 0;
2066}
2068 {
2069 auto box = text::open_layout_box(layout, indentation);
2071 if(from_slot != -1) {
2072 auto new_gov = ws.world.rebel_faction_get_type(trigger::to_rebel(from_slot)).get_government_change(ws.world.nation_get_government_type(trigger::to_nation(primary_slot)));
2073 if(new_gov)
2074 text::add_to_substitution_map(m, text::variable_type::text, ws.world.government_type_get_name(new_gov));
2075 }
2076 text::localised_format_box(ws, layout, box, "change_government_to", m);
2077 text::close_layout_box(layout, box);
2078 }
2079 return 0;
2080}
2082 auto amount = trigger::read_float_from_payload(tval + 1);
2083 {
2084 auto box = text::open_layout_box(layout, indentation);
2085 display_value(text::fp_currency{ amount }, true, ws, layout, box);
2087 text::localised_format_box(ws, layout, box, "add_to_treasury", m);
2088 text::close_layout_box(layout, box);
2089 }
2090 return 0;
2091}
2093 auto amount = trigger::read_float_from_payload(tval + 1) / 100.0f;
2094
2095 {
2096 auto box = text::open_layout_box(layout, indentation);
2098 text::localised_format_box(ws, layout, box, "military_war_exhaustion", m);
2099 text::add_space_to_layout_box(ws, layout, box);
2100 display_value(text::fp_percentage{ amount }, false, ws, layout, box);
2101 text::close_layout_box(layout, box);
2102 }
2103 return 0;
2104}
2106 auto amount = trigger::read_float_from_payload(tval + 1) / 100.0f;
2107
2108 {
2109 auto box = text::open_layout_box(layout, indentation);
2111 text::localised_format_box(ws, layout, box, "tb_diplomacy_diplopoints", m);
2112 text::add_space_to_layout_box(ws, layout, box);
2113 display_value(text::fp_one_place{ amount }, true, ws, layout, box);
2114 text::close_layout_box(layout, box);
2115 }
2116 return 0;
2117}
2119 auto delta = trigger::read_float_from_payload(tval + 1);
2120 float change = delta;
2121 if(primary_slot != -1) {
2122 auto prestige_multiplier =
2123 1.0f + ws.world.nation_get_modifier_values(trigger::to_nation(primary_slot), sys::national_mod_offsets::prestige);
2124 auto new_prestige = std::max(0.0f,
2125 ws.world.nation_get_prestige(trigger::to_nation(primary_slot)) + (delta > 0 ? (delta * prestige_multiplier) : delta));
2126 change = (new_prestige - ws.world.nation_get_prestige(trigger::to_nation(primary_slot)));
2127 }
2128 {
2129 auto box = text::open_layout_box(layout, indentation);
2131 text::localised_format_box(ws, layout, box, "prestige", m);
2132 text::add_space_to_layout_box(ws, layout, box);
2133 display_value(int64_t(change), true, ws, layout, box);
2134 text::close_layout_box(layout, box);
2135 }
2136 return 0;
2137}
2139 {
2140 auto box = text::open_layout_box(layout, indentation);
2143 text::localised_format_box(ws, layout, box, "become_blank", m);
2144 text::close_layout_box(layout, box);
2145 }
2146 return 0;
2147}
2149 {
2150 auto box = text::open_layout_box(layout, indentation);
2152 if(primary_slot != -1) {
2153 auto prim_culture = ws.world.nation_get_primary_culture(trigger::to_nation(primary_slot));
2154 auto cg = ws.world.culture_get_group_from_culture_group_membership(prim_culture);
2155 auto u = ws.world.culture_group_get_identity_from_cultural_union_of(cg);
2157 } else {
2158 if(auto k = ws.lookup_key(std::string_view("cultural_union_nation")); k) {
2160 }
2161 }
2162 text::localised_format_box(ws, layout, box, "become_blank", m);
2163 text::close_layout_box(layout, box);
2164 }
2165 return 0;
2166}
2168 {
2169 auto box = text::open_layout_box(layout, indentation);
2172 text::localised_format_box(ws, layout, box, "player_control_change", m);
2173 text::close_layout_box(layout, box);
2174 }
2175 return 0;
2176}
2178 {
2179 auto box = text::open_layout_box(layout, indentation);
2181 if(primary_slot != -1) {
2182 auto prim_culture = ws.world.nation_get_primary_culture(trigger::to_nation(primary_slot));
2183 auto cg = ws.world.culture_get_group_from_culture_group_membership(prim_culture);
2184 auto u = ws.world.culture_group_get_identity_from_cultural_union_of(cg);
2186 } else {
2187 if(auto k = ws.lookup_key(std::string_view("cultural_union_nation")); k) {
2189 }
2190 }
2191 text::localised_format_box(ws, layout, box, "player_control_change", m);
2192 text::close_layout_box(layout, box);
2193 }
2194 return 0;
2195}
2197 if(ws.user_settings.spoilers) {
2198 auto box = text::open_layout_box(layout, indentation);
2201 ws.national_definitions.flag_variable_names[trigger::payload(tval[1]).natf_id]);
2202 text::localised_format_box(ws, layout, box, "set_national_flag", m);
2203 text::close_layout_box(layout, box);
2204 }
2205 return 0;
2206}
2208 if(ws.user_settings.spoilers) {
2209 auto box = text::open_layout_box(layout, indentation);
2212 ws.national_definitions.flag_variable_names[trigger::payload(tval[1]).natf_id]);
2213 text::localised_format_box(ws, layout, box, "remove_national_flag", m);
2214 text::close_layout_box(layout, box);
2215 }
2216 return 0;
2217}
2219 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2220 if(target) {
2221 auto box = text::open_layout_box(layout, indentation);
2224 text::localised_format_box(ws, layout, box, "get_access_with", m);
2225 text::close_layout_box(layout, box);
2226 }
2227 return 0;
2228}
2230 {
2231 auto box = text::open_layout_box(layout, indentation);
2233 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2234 text::localised_format_box(ws, layout, box, "get_access_with", m);
2235 text::close_layout_box(layout, box);
2236 }
2237 return 0;
2238}
2240 {
2241 auto box = text::open_layout_box(layout, indentation);
2243 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2244 text::localised_format_box(ws, layout, box, "get_access_with", m);
2245 text::close_layout_box(layout, box);
2246 }
2247 return 0;
2248}
2250 {
2251 auto box = text::open_layout_box(layout, indentation);
2253 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2254 text::localised_format_box(ws, layout, box, "get_access_with", m);
2255 text::close_layout_box(layout, box);
2256 }
2257 return 0;
2258}
2260 {
2261 auto box = text::open_layout_box(layout, indentation);
2263 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2264 text::localised_format_box(ws, layout, box, "get_access_with", m);
2265 text::close_layout_box(layout, box);
2266 }
2267 return 0;
2268}
2270 auto amount = trigger::read_float_from_payload(tval + 1);
2271 {
2272 auto box = text::open_layout_box(layout, indentation);
2274 text::localised_format_box(ws, layout, box, "infamy", m);
2275 text::add_space_to_layout_box(ws, layout, box);
2276 display_value(text::fp_one_place{ amount }, false, ws, layout, box);
2277 text::close_layout_box(layout, box);
2278 }
2279 return 0;
2280}
2282 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2283 if(target) {
2284 auto box = text::open_layout_box(layout, indentation);
2287 text::localised_format_box(ws, layout, box, "change_province_owner", m);
2288 text::close_layout_box(layout, box);
2289 }
2290 return 0;
2291}
2293 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2294 if(target) {
2295 auto box = text::open_layout_box(layout, indentation);
2298 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2299 text::close_layout_box(layout, box);
2300 }
2301 return 0;
2302}
2304 {
2305 auto box = text::open_layout_box(layout, indentation);
2307 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2308 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2309 text::close_layout_box(layout, box);
2310 }
2311 return 0;
2312}
2314 {
2315 auto box = text::open_layout_box(layout, indentation);
2317 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
2318 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2319 text::close_layout_box(layout, box);
2320 }
2321 return 0;
2322}
2324 {
2325 auto box = text::open_layout_box(layout, indentation);
2327 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2328 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2329 text::close_layout_box(layout, box);
2330 }
2331 return 0;
2332}
2334 {
2335 auto box = text::open_layout_box(layout, indentation);
2337 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
2338 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2339 text::close_layout_box(layout, box);
2340 }
2341 return 0;
2342}
2344 {
2345 auto box = text::open_layout_box(layout, indentation);
2347 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2348 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2349 text::close_layout_box(layout, box);
2350 }
2351 return 0;
2352}
2354 {
2355 auto box = text::open_layout_box(layout, indentation);
2357 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2358 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2359 text::close_layout_box(layout, box);
2360 }
2361 return 0;
2362}
2364 {
2365 auto box = text::open_layout_box(layout, indentation);
2367 add_to_map(ws, m, convert_this(ws, trigger::to_rebel(from_slot)), "from_nation", [](auto x) { return x; });
2368 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2369 text::close_layout_box(layout, box);
2370 }
2371 return 0;
2372}
2374 {
2375 auto box = text::open_layout_box(layout, indentation);
2377 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2378 text::localised_format_box(ws, layout, box, "change_province_owner", m);
2379 text::close_layout_box(layout, box);
2380 }
2381 return 0;
2382}
2384 {
2385 auto box = text::open_layout_box(layout, indentation);
2387 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
2388 text::localised_format_box(ws, layout, box, "change_province_owner", m);
2389 text::close_layout_box(layout, box);
2390 }
2391 return 0;
2392}
2394 {
2395 auto box = text::open_layout_box(layout, indentation);
2397 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2398 text::localised_format_box(ws, layout, box, "change_province_owner", m);
2399 text::close_layout_box(layout, box);
2400 }
2401 return 0;
2402}
2404 {
2405 auto box = text::open_layout_box(layout, indentation);
2407 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
2408 text::localised_format_box(ws, layout, box, "change_province_owner", m);
2409 text::close_layout_box(layout, box);
2410 }
2411 return 0;
2412}
2414 {
2415 auto box = text::open_layout_box(layout, indentation);
2417 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2418 text::localised_format_box(ws, layout, box, "change_province_owner", m);
2419 text::close_layout_box(layout, box);
2420 }
2421 return 0;
2422}
2424 {
2425 auto box = text::open_layout_box(layout, indentation);
2427 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2428 text::localised_format_box(ws, layout, box, "change_province_owner", m);
2429 text::close_layout_box(layout, box);
2430 }
2431 return 0;
2432}
2434 {
2435 auto box = text::open_layout_box(layout, indentation);
2437 add_to_map(ws, m, convert_this(ws, trigger::to_rebel(from_slot)), "from_nation", [](auto x) { return x; });
2438 text::localised_format_box(ws, layout, box, "change_province_owner", m);
2439 text::close_layout_box(layout, box);
2440 }
2441 return 0;
2442}
2444 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2445 if(target) {
2446 auto box = text::open_layout_box(layout, indentation);
2449 text::localised_format_box(ws, layout, box, "annex_effect", m);
2450 text::close_layout_box(layout, box);
2451 }
2452 return 0;
2453}
2455 {
2456 auto box = text::open_layout_box(layout, indentation);
2458 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2459 text::localised_format_box(ws, layout, box, "annex_effect", m);
2460 text::close_layout_box(layout, box);
2461 }
2462 return 0;
2463}
2465 {
2466 auto box = text::open_layout_box(layout, indentation);
2468 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
2469 text::localised_format_box(ws, layout, box, "annex_effect", m);
2470 text::close_layout_box(layout, box);
2471 }
2472 return 0;
2473}
2475 {
2476 auto box = text::open_layout_box(layout, indentation);
2478 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2479 text::localised_format_box(ws, layout, box, "annex_effect", m);
2480 text::close_layout_box(layout, box);
2481 }
2482 return 0;
2483}
2485 {
2486 auto box = text::open_layout_box(layout, indentation);
2488 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
2489 text::localised_format_box(ws, layout, box, "annex_effect", m);
2490 text::close_layout_box(layout, box);
2491 }
2492 return 0;
2493}
2495 {
2496 auto box = text::open_layout_box(layout, indentation);
2498 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2499 text::localised_format_box(ws, layout, box, "annex_effect", m);
2500 text::close_layout_box(layout, box);
2501 }
2502 return 0;
2503}
2505 {
2506 auto box = text::open_layout_box(layout, indentation);
2508 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2509 text::localised_format_box(ws, layout, box, "annex_effect", m);
2510 text::close_layout_box(layout, box);
2511 }
2512 return 0;
2513}
2515 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2516 if(target) {
2517 auto box = text::open_layout_box(layout, indentation);
2520 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2521 text::close_layout_box(layout, box);
2522 }
2523 return 0;
2524}
2526 {
2527 auto box = text::open_layout_box(layout, indentation);
2529 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2530 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2531 text::close_layout_box(layout, box);
2532 }
2533 return 0;
2534}
2536 {
2537 auto box = text::open_layout_box(layout, indentation);
2539 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
2540 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2541 text::close_layout_box(layout, box);
2542 }
2543 return 0;
2544}
2546 {
2547 auto box = text::open_layout_box(layout, indentation);
2549 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2550 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2551 text::close_layout_box(layout, box);
2552 }
2553 return 0;
2554}
2556 {
2557 auto box = text::open_layout_box(layout, indentation);
2559 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
2560 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2561 text::close_layout_box(layout, box);
2562 }
2563 return 0;
2564}
2566 {
2567 auto box = text::open_layout_box(layout, indentation);
2569 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2570 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2571 text::close_layout_box(layout, box);
2572 }
2573 return 0;
2574}
2576 {
2577 auto box = text::open_layout_box(layout, indentation);
2579 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2580 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2581 text::close_layout_box(layout, box);
2582 }
2583 return 0;
2584}
2586 {
2587 auto box = text::open_layout_box(layout, indentation);
2590 text::localised_format_box(ws, layout, box, "core_return", m);
2591 text::close_layout_box(layout, box);
2592 }
2593 return 0;
2594}
2596 {
2597 auto box = text::open_layout_box(layout, indentation);
2599 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2600 text::localised_format_box(ws, layout, box, "core_return", m);
2601 text::close_layout_box(layout, box);
2602 }
2603 return 0;
2604}
2606 {
2607 auto box = text::open_layout_box(layout, indentation);
2609 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
2610 text::localised_format_box(ws, layout, box, "core_return", m);
2611 text::close_layout_box(layout, box);
2612 }
2613 return 0;
2614}
2616 {
2617 auto box = text::open_layout_box(layout, indentation);
2619 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2620 text::localised_format_box(ws, layout, box, "core_return", m);
2621 text::close_layout_box(layout, box);
2622 }
2623 return 0;
2624}
2626 {
2627 auto box = text::open_layout_box(layout, indentation);
2629 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
2630 text::localised_format_box(ws, layout, box, "core_return", m);
2631 text::close_layout_box(layout, box);
2632 }
2633 return 0;
2634}
2636 {
2637 auto box = text::open_layout_box(layout, indentation);
2639 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2640 text::localised_format_box(ws, layout, box, "core_return", m);
2641 text::close_layout_box(layout, box);
2642 }
2643 return 0;
2644}
2646 {
2647 auto box = text::open_layout_box(layout, indentation);
2649 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2650 text::localised_format_box(ws, layout, box, "core_return", m);
2651 text::close_layout_box(layout, box);
2652 }
2653 return 0;
2654}
2656 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2657 if(target) {
2658 auto box = text::open_layout_box(layout, indentation);
2661 text::localised_format_box(ws, layout, box, "change_province_controller", m);
2662 text::close_layout_box(layout, box);
2663 }
2664 return 0;
2665}
2667 {
2668 auto box = text::open_layout_box(layout, indentation);
2670 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2671 text::localised_format_box(ws, layout, box, "change_province_controller", m);
2672 text::close_layout_box(layout, box);
2673 }
2674 return 0;
2675}
2677 {
2678 auto box = text::open_layout_box(layout, indentation);
2680 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2681 text::localised_format_box(ws, layout, box, "change_province_controller", m);
2682 text::close_layout_box(layout, box);
2683 }
2684 return 0;
2685}
2687 {
2688 auto box = text::open_layout_box(layout, indentation);
2690 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2691 text::localised_format_box(ws, layout, box, "change_province_controller", m);
2692 text::close_layout_box(layout, box);
2693 }
2694 return 0;
2695}
2697 {
2698 auto box = text::open_layout_box(layout, indentation);
2700 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2701 text::localised_format_box(ws, layout, box, "change_province_controller", m);
2702 text::close_layout_box(layout, box);
2703 }
2704 return 0;
2705}
2707 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2708 if(target) {
2709 auto box = text::open_layout_box(layout, indentation);
2712 text::localised_format_box(ws, layout, box, "change_state_controller", m);
2713 text::close_layout_box(layout, box);
2714 }
2715 return 0;
2716}
2718 {
2719 auto box = text::open_layout_box(layout, indentation);
2721 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2722 text::localised_format_box(ws, layout, box, "change_state_controller", m);
2723 text::close_layout_box(layout, box);
2724 }
2725 return 0;
2726}
2728 {
2729 auto box = text::open_layout_box(layout, indentation);
2731 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2732 text::localised_format_box(ws, layout, box, "change_state_controller", m);
2733 text::close_layout_box(layout, box);
2734 }
2735 return 0;
2736}
2738 {
2739 auto box = text::open_layout_box(layout, indentation);
2741 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2742 text::localised_format_box(ws, layout, box, "change_state_controller", m);
2743 text::close_layout_box(layout, box);
2744 }
2745 return 0;
2746}
2748 {
2749 auto box = text::open_layout_box(layout, indentation);
2751 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2752 text::localised_format_box(ws, layout, box, "change_state_controller", m);
2753 text::close_layout_box(layout, box);
2754 }
2755 return 0;
2756}
2759 auto amount = trigger::payload(tval[1]).signed_value;
2760 {
2761 auto box = text::open_layout_box(layout, indentation);
2764 text::add_space_to_layout_box(ws, layout, box);
2765 display_value(int64_t(amount), true, ws, layout, box);
2766 text::close_layout_box(layout, box);
2767 }
2768 return 0;
2769}
2771 auto amount = trigger::read_float_from_payload(tval + 1);
2772 {
2773 auto box = text::open_layout_box(layout, indentation);
2775 text::localised_format_box(ws, layout, box, "pop_savings", m);
2776 text::add_space_to_layout_box(ws, layout, box);
2777 display_value(text::fp_currency{ amount }, true, ws, layout, box);
2778 text::close_layout_box(layout, box);
2779 }
2780 return 0;
2781}
2783 auto amount = trigger::payload(tval[1]).signed_value;
2784 {
2785 auto box = text::open_layout_box(layout, indentation);
2787 text::localised_format_box(ws, layout, box, "leadership_points", m);
2788 text::add_space_to_layout_box(ws, layout, box);
2789 display_value(int64_t(amount), true, ws, layout, box);
2790 text::close_layout_box(layout, box);
2791 }
2792 return 0;
2793}
2795 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2796 if(target) {
2797 auto box = text::open_layout_box(layout, indentation);
2800 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
2801 text::close_layout_box(layout, box);
2802 }
2803 return 0;
2804}
2806 {
2807 auto box = text::open_layout_box(layout, indentation);
2809 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2810 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
2811 text::close_layout_box(layout, box);
2812 }
2813 return 0;
2814}
2816 {
2817 auto box = text::open_layout_box(layout, indentation);
2819 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2820 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
2821 text::close_layout_box(layout, box);
2822 }
2823 return 0;
2824}
2826 {
2827 auto box = text::open_layout_box(layout, indentation);
2829 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2830 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
2831 text::close_layout_box(layout, box);
2832 }
2833 return 0;
2834}
2836 {
2837 auto box = text::open_layout_box(layout, indentation);
2839 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2840 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
2841 text::close_layout_box(layout, box);
2842 }
2843 return 0;
2844}
2846 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2847 if(target) {
2848 auto box = text::open_layout_box(layout, indentation);
2851 text::localised_format_box(ws, layout, box, "lose_access_with", m);
2852 text::close_layout_box(layout, box);
2853 }
2854 return 0;
2855}
2857 {
2858 auto box = text::open_layout_box(layout, indentation);
2860 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2861 text::localised_format_box(ws, layout, box, "lose_access_with", m);
2862 text::close_layout_box(layout, box);
2863 }
2864 return 0;
2865}
2867 {
2868 auto box = text::open_layout_box(layout, indentation);
2870 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2871 text::localised_format_box(ws, layout, box, "lose_access_with", m);
2872 text::close_layout_box(layout, box);
2873 }
2874 return 0;
2875}
2877 {
2878 auto box = text::open_layout_box(layout, indentation);
2880 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2881 text::localised_format_box(ws, layout, box, "lose_access_with", m);
2882 text::close_layout_box(layout, box);
2883 }
2884 return 0;
2885}
2887 {
2888 auto box = text::open_layout_box(layout, indentation);
2890 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2891 text::localised_format_box(ws, layout, box, "lose_access_with", m);
2892 text::close_layout_box(layout, box);
2893 }
2894 return 0;
2895}
2897 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2898 if(target) {
2899 auto box = text::open_layout_box(layout, indentation);
2902 text::localised_format_box(ws, layout, box, "end_alliance", m);
2903 text::close_layout_box(layout, box);
2904 }
2905 return 0;
2906}
2908 {
2909 auto box = text::open_layout_box(layout, indentation);
2911 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2912 text::localised_format_box(ws, layout, box, "end_alliance", m);
2913 text::close_layout_box(layout, box);
2914 }
2915 return 0;
2916}
2918 {
2919 auto box = text::open_layout_box(layout, indentation);
2921 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2922 text::localised_format_box(ws, layout, box, "end_alliance", m);
2923 text::close_layout_box(layout, box);
2924 }
2925 return 0;
2926}
2928 {
2929 auto box = text::open_layout_box(layout, indentation);
2931 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2932 text::localised_format_box(ws, layout, box, "end_alliance", m);
2933 text::close_layout_box(layout, box);
2934 }
2935 return 0;
2936}
2938 {
2939 auto box = text::open_layout_box(layout, indentation);
2941 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2942 text::localised_format_box(ws, layout, box, "end_alliance", m);
2943 text::close_layout_box(layout, box);
2944 }
2945 return 0;
2946}
2948 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2949 if(target) {
2950 auto box = text::open_layout_box(layout, indentation);
2953 text::localised_format_box(ws, layout, box, "end_war_with", m);
2954 text::close_layout_box(layout, box);
2955 }
2956 return 0;
2957}
2959 {
2960 auto box = text::open_layout_box(layout, indentation);
2962 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2963 text::localised_format_box(ws, layout, box, "end_war_with", m);
2964 text::close_layout_box(layout, box);
2965 }
2966 return 0;
2967}
2969 {
2970 auto box = text::open_layout_box(layout, indentation);
2972 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2973 text::localised_format_box(ws, layout, box, "end_war_with", m);
2974 text::close_layout_box(layout, box);
2975 }
2976 return 0;
2977}
2979 {
2980 auto box = text::open_layout_box(layout, indentation);
2982 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
2983 text::localised_format_box(ws, layout, box, "end_war_with", m);
2984 text::close_layout_box(layout, box);
2985 }
2986 return 0;
2987}
2989 {
2990 auto box = text::open_layout_box(layout, indentation);
2992 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
2993 text::localised_format_box(ws, layout, box, "end_war_with", m);
2994 text::close_layout_box(layout, box);
2995 }
2996 return 0;
2997}
2999 auto box = text::open_layout_box(layout, indentation);
3001 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
3002 text::localised_format_box(ws, layout, box, "enable_ideology", m);
3003 text::close_layout_box(layout, box);
3004 return 0;
3005}
3007 auto box = text::open_layout_box(layout, indentation);
3009 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
3010 text::localised_format_box(ws, layout, box, "change_ruling_party", m);
3011 text::close_layout_box(layout, box);
3012 return 0;
3013}
3015 auto amount = trigger::read_float_from_payload(tval + 1) / 100.0f;
3016 {
3017 auto box = text::open_layout_box(layout, indentation);
3019 text::localised_format_box(ws, layout, box, "plurality", m);
3020 text::add_space_to_layout_box(ws, layout, box);
3021 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
3022 text::close_layout_box(layout, box);
3023 }
3024 return 0;
3025}
3027 auto box = text::open_layout_box(layout, indentation);
3029 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3030 text::localised_format_box(ws, layout, box, "remove_prov_mod", m);
3031 text::close_layout_box(layout, box);
3032 if(ws.user_settings.spoilers) {
3033 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3034 }
3035 return 0;
3036}
3038 auto box = text::open_layout_box(layout, indentation);
3040 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3041 text::localised_format_box(ws, layout, box, "remove_nat_mod", m);
3042 text::close_layout_box(layout, box);
3043 if(ws.user_settings.spoilers) {
3044 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3045 }
3046 return 0;
3047}
3049 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
3050 if(target) {
3051 auto box = text::open_layout_box(layout, indentation);
3054 text::localised_format_box(ws, layout, box, "make_alliance", m);
3055 text::close_layout_box(layout, box);
3056 }
3057 return 0;
3058}
3060 {
3061 auto box = text::open_layout_box(layout, indentation);
3063 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3064 text::localised_format_box(ws, layout, box, "make_alliance", m);
3065 text::close_layout_box(layout, box);
3066 }
3067 return 0;
3068}
3070 {
3071 auto box = text::open_layout_box(layout, indentation);
3073 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
3074 text::localised_format_box(ws, layout, box, "make_alliance", m);
3075 text::close_layout_box(layout, box);
3076 }
3077 return 0;
3078}
3080 {
3081 auto box = text::open_layout_box(layout, indentation);
3083 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
3084 text::localised_format_box(ws, layout, box, "make_alliance", m);
3085 text::close_layout_box(layout, box);
3086 }
3087 return 0;
3088}
3090 {
3091 auto box = text::open_layout_box(layout, indentation);
3093 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
3094 text::localised_format_box(ws, layout, box, "make_alliance", m);
3095 text::close_layout_box(layout, box);
3096 }
3097 return 0;
3098}
3100 auto holder = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
3101 if(!holder)
3102 return 0;
3103 auto hprovs = ws.world.nation_get_province_ownership(holder);
3104 if(hprovs.begin() == hprovs.end()) {
3105 auto box = text::open_layout_box(layout, indentation);
3108 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3109 text::close_layout_box(layout, box);
3110 } else {
3111 auto box = text::open_layout_box(layout, indentation);
3114 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3115 text::close_layout_box(layout, box);
3116 }
3117 return 0;
3118}
3120 auto holder = trigger::to_nation(this_slot);
3121 auto hprovs = ws.world.nation_get_province_ownership(holder);
3122 if(hprovs.begin() == hprovs.end()) {
3123 auto box = text::open_layout_box(layout, indentation);
3126 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3127 text::close_layout_box(layout, box);
3128 } else {
3129 auto box = text::open_layout_box(layout, indentation);
3131 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3132 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3133 text::close_layout_box(layout, box);
3134 }
3135 return 0;
3136}
3138 auto holder = ws.world.province_get_nation_from_province_ownership(trigger::to_prov(this_slot));
3139 auto hprovs = ws.world.nation_get_province_ownership(holder);
3140 if(hprovs.begin() == hprovs.end()) {
3141 auto box = text::open_layout_box(layout, indentation);
3144 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3145 text::close_layout_box(layout, box);
3146 } else {
3147 auto box = text::open_layout_box(layout, indentation);
3149 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
3150 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3151 text::close_layout_box(layout, box);
3152 }
3153 return 0;
3154}
3156 auto holder = trigger::to_nation(from_slot);
3157 auto hprovs = ws.world.nation_get_province_ownership(holder);
3158 if(hprovs.begin() == hprovs.end()) {
3159 auto box = text::open_layout_box(layout, indentation);
3162 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3163 text::close_layout_box(layout, box);
3164 } else {
3165 auto box = text::open_layout_box(layout, indentation);
3167 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
3168 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3169 text::close_layout_box(layout, box);
3170 }
3171 return 0;
3172}
3174 auto holder = ws.world.province_get_nation_from_province_ownership(trigger::to_prov(from_slot));
3175 auto hprovs = ws.world.nation_get_province_ownership(holder);
3176 if(hprovs.begin() == hprovs.end()) {
3177 auto box = text::open_layout_box(layout, indentation);
3180 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3181 text::close_layout_box(layout, box);
3182 } else {
3183 auto box = text::open_layout_box(layout, indentation);
3185 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
3186 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3187 text::close_layout_box(layout, box);
3188 }
3189 return 0;
3190}
3192 auto box = text::open_layout_box(layout, indentation);
3194 add_to_map(ws, m, convert_this(ws, trigger::to_rebel(from_slot)), "from_nation", [](auto x) { return x; });
3195 text::localised_format_box(ws, layout, box, "release_as_independent", m);
3196 text::close_layout_box(layout, box);
3197 return 0;
3198}
3200 auto box = text::open_layout_box(layout, indentation);
3201 text::localised_format_box(ws, layout, box, "no_effect");
3202 text::close_layout_box(layout, box);
3203 return 0;
3204}
3206 auto box = text::open_layout_box(layout, indentation);
3208 dcon::text_key name{ dcon::text_key::value_base_t(trigger::read_int32_t_from_payload(tval + 1)) };
3210 text::localised_format_box(ws, layout, box, "change_name_to", m);
3211 text::close_layout_box(layout, box);
3212 return 0;
3213}
3215 auto box = text::open_layout_box(layout, indentation);
3217 auto canal_name = text::produce_simple_string(ws, std::string("canal_") + std::to_string(tval[1]));
3218 text::add_to_substitution_map(m, text::variable_type::name, std::string_view{ canal_name });
3219 text::localised_format_box(ws, layout, box, "enable_canal", m);
3220 text::close_layout_box(layout, box);
3221 return 0;
3222}
3224 if(ws.user_settings.spoilers) {
3225 auto box = text::open_layout_box(layout, indentation);
3228 ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1]).glob_id]);
3229 text::localised_format_box(ws, layout, box, "set_global_flag", m);
3230 text::close_layout_box(layout, box);
3231 }
3232 return 0;
3233}
3235 if(ws.user_settings.spoilers) {
3236 auto box = text::open_layout_box(layout, indentation);
3239 ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1]).glob_id]);
3240 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
3241 text::close_layout_box(layout, box);
3242 }
3243 return 0;
3244}
3246 auto box = text::open_layout_box(layout, indentation);
3248 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3249 text::localised_format_box(ws, layout, box, "change_national_value", m);
3250 text::close_layout_box(layout, box);
3251 if(ws.user_settings.spoilers) {
3252 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3253 }
3254 return 0;
3255}
3257 auto box = text::open_layout_box(layout, indentation);
3259 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3260 text::localised_format_box(ws, layout, box, "change_national_value", m);
3261 text::close_layout_box(layout, box);
3262 if(ws.user_settings.spoilers) {
3263 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3264 }
3265 return 0;
3266}
3268 {
3269 auto box = text::open_layout_box(layout, indentation);
3270 text::localised_format_box(ws, layout, box, "become_civ");
3271 text::close_layout_box(layout, box);
3272 }
3273 return 0;
3274}
3276 {
3277 auto box = text::open_layout_box(layout, indentation);
3278 text::localised_format_box(ws, layout, box, "become_unciv");
3279 text::close_layout_box(layout, box);
3280 }
3281 return 0;
3282}
3284 {
3285 auto box = text::open_layout_box(layout, indentation);
3286 text::localised_format_box(ws, layout, box, "free_slave_state");
3287 text::close_layout_box(layout, box);
3288 }
3289 return 0;
3290}
3292 {
3293 auto box = text::open_layout_box(layout, indentation);
3294 text::localised_format_box(ws, layout, box, "free_slave_pop");
3295 text::close_layout_box(layout, box);
3296 }
3297 return 0;
3298}
3300 {
3301 auto box = text::open_layout_box(layout, indentation);
3302 text::localised_format_box(ws, layout, box, "hold_election");
3303 text::close_layout_box(layout, box);
3304 }
3305 return 0;
3306}
3308 {
3309 auto opt = fatten(ws.world, trigger::payload(tval[1]).opt_id);
3310
3311 auto box = text::open_layout_box(layout, indentation);
3313 text::add_to_substitution_map(m, text::variable_type::issue, opt.get_parent_issue().get_name());
3315 text::localised_format_box(ws, layout, box, "issue_change", m);
3316 text::close_layout_box(layout, box);
3317 }
3318 return 0;
3319}
3321 {
3322 auto opt = fatten(ws.world, trigger::payload(tval[1]).opt_id);
3323
3324 auto box = text::open_layout_box(layout, indentation);
3326 text::add_to_substitution_map(m, text::variable_type::issue, opt.get_parent_issue().get_name());
3328 text::localised_format_box(ws, layout, box, "issue_change", m);
3329 text::close_layout_box(layout, box);
3330 }
3331 return 0;
3332}
3334 auto amount = trigger::read_float_from_payload(tval + 1);
3335 if(primary_slot != -1) {
3336 auto income = ws.world.nation_get_total_poor_income(trigger::to_nation(primary_slot)) +
3337 ws.world.nation_get_total_middle_income(trigger::to_nation(primary_slot)) +
3338 ws.world.nation_get_total_rich_income(trigger::to_nation(primary_slot));
3339 auto combined_amount = income * amount;
3340
3341 auto box = text::open_layout_box(layout, indentation);
3342 display_value(text::fp_currency{ combined_amount }, true, ws, layout, box);
3344 text::localised_format_box(ws, layout, box, "add_to_treasury", m);
3345 text::close_layout_box(layout, box);
3346 } else {
3347 auto box = text::open_layout_box(layout, indentation);
3348 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
3350 text::localised_format_box(ws, layout, box, "add_relative_income", m);
3351 text::close_layout_box(layout, box);
3352 }
3353 return 0;
3354}
3356 {
3357 auto box = text::open_layout_box(layout, indentation);
3358 text::localised_format_box(ws, layout, box, "make_neutral");
3359 text::close_layout_box(layout, box);
3360 }
3361 return 0;
3362}
3364 auto box = text::open_layout_box(layout, indentation);
3366 text::localised_format_box(ws, layout, box, "pop_size", m);
3367 text::add_space_to_layout_box(ws, layout, box);
3368 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 1) - 1.0f }, true, ws, layout, box);
3369 text::close_layout_box(layout, box);
3370 return 0;
3371}
3373 auto box = text::open_layout_box(layout, indentation);
3375 text::localised_format_box(ws, layout, box, "pop_size", m);
3376 text::add_space_to_layout_box(ws, layout, box);
3377 display_value(-1 * trigger::read_int32_t_from_payload(tval + 1), true, ws, layout, box);
3378
3379 text::close_layout_box(layout, box);
3380 return 0;
3381}
3383 {
3384 auto box = text::open_layout_box(layout, indentation);
3387 text::localised_format_box(ws, layout, box, "move_pop_to", m);
3388 text::close_layout_box(layout, box);
3389 }
3390 return 0;
3391}
3393 {
3394 auto box = text::open_layout_box(layout, indentation);
3396 text::add_to_substitution_map(m, text::variable_type::text, ws.world.pop_type_get_name(trigger::payload(tval[1]).popt_id));
3397 text::localised_format_box(ws, layout, box, "change_pop_type", m);
3398 text::close_layout_box(layout, box);
3399 }
3400 return 0;
3401}
3403 if(primary_slot != -1) {
3404 auto amount = trigger::read_float_from_payload(tval + 1);
3405 auto result = nations::daily_research_points(ws, trigger::to_nation(primary_slot)) * 365.0f * amount;
3406
3407 auto box = text::open_layout_box(layout, indentation);
3409 text::localised_format_box(ws, layout, box, "research_points", m);
3410 text::add_space_to_layout_box(ws, layout, box);
3411 display_value(int64_t(result), true, ws, layout, box);
3412 text::close_layout_box(layout, box);
3413 return 0;
3414 } else {
3415 auto box = text::open_layout_box(layout, indentation);
3417 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3418 text::localised_format_box(ws, layout, box, "years_of_research", m);
3419 text::close_layout_box(layout, box);
3420 return 0;
3421 }
3422}
3424 auto box = text::open_layout_box(layout, indentation);
3426 text::localised_format_box(ws, layout, box, "prestige", m);
3427 text::add_space_to_layout_box(ws, layout, box);
3428 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3429 text::close_layout_box(layout, box);
3430 return 0;
3431}
3433 auto box = text::open_layout_box(layout, indentation);
3435 text::localised_format_box(ws, layout, box, "prestige", m);
3436 text::add_space_to_layout_box(ws, layout, box);
3437 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3438 text::close_layout_box(layout, box);
3439 return 0;
3440}
3442 {
3443 auto opt = fatten(ws.world, trigger::payload(tval[1]).ropt_id);
3444
3445 auto box = text::open_layout_box(layout, indentation);
3447 text::add_to_substitution_map(m, text::variable_type::issue, opt.get_parent_reform().get_name());
3449 text::localised_format_box(ws, layout, box, "issue_change", m);
3450 text::close_layout_box(layout, box);
3451 }
3452 return 0;
3453}
3455 {
3456 auto opt = fatten(ws.world, trigger::payload(tval[1]).ropt_id);
3457
3458 auto box = text::open_layout_box(layout, indentation);
3460 text::add_to_substitution_map(m, text::variable_type::issue, opt.get_parent_reform().get_name());
3462 text::localised_format_box(ws, layout, box, "issue_change", m);
3463 text::close_layout_box(layout, box);
3464 }
3465 return 0;
3466}
3468 {
3469 auto box = text::open_layout_box(layout, indentation);
3472 text::localised_format_box(ws, layout, box, "remove_mil_reforms", m);
3473 text::close_layout_box(layout, box);
3474 }
3475 return tval[1];
3476}
3478 {
3479 auto box = text::open_layout_box(layout, indentation);
3482 text::localised_format_box(ws, layout, box, "remove_econ_reforms", m);
3483 text::close_layout_box(layout, box);
3484 }
3485 return tval[1];
3486}
3488 {
3489 auto box = text::open_layout_box(layout, indentation);
3492 ws.culture_definitions.crimes[trigger::payload(tval[1]).crm_id].name);
3493 text::localised_format_box(ws, layout, box, "add_crime", m);
3494 text::close_layout_box(layout, box);
3495 }
3496 return 0;
3497}
3499 {
3500 auto box = text::open_layout_box(layout, indentation);
3502 text::localised_format_box(ws, layout, box, "remove_crime", m);
3503 text::close_layout_box(layout, box);
3504 }
3505 return 0;
3506}
3508 {
3509 auto box = text::open_layout_box(layout, indentation);
3511 text::localised_format_box(ws, layout, box, "perform_nationalization", m);
3512 text::close_layout_box(layout, box);
3513 }
3514 return 0;
3515}
3517 {
3518 auto box = text::open_layout_box(layout, indentation);
3520 text::add_to_substitution_map(m, text::variable_type::text, ws.world.factory_type_get_name(trigger::payload(tval[1]).fac_id));
3521 text::localised_format_box(ws, layout, box, "build_factory_in_capital", m);
3522 text::close_layout_box(layout, box);
3523 }
3524 return 0;
3525}
3527 {
3528 auto box = text::open_layout_box(layout, indentation);
3530 text::add_to_substitution_map(m, text::variable_type::text, ws.world.technology_get_name(trigger::payload(tval[1]).tech_id));
3531 text::localised_format_box(ws, layout, box, "enable_technology", m);
3532 text::close_layout_box(layout, box);
3533 }
3534 return 0;
3535}
3537 {
3538 auto box = text::open_layout_box(layout, indentation);
3540 text::add_to_substitution_map(m, text::variable_type::text, ws.world.invention_get_name(trigger::payload(tval[1]).invt_id));
3541 text::localised_format_box(ws, layout, box, "enable_invention", m);
3542 text::close_layout_box(layout, box);
3543 }
3544 return 0;
3545}
3547 {
3548 auto box = text::open_layout_box(layout, indentation);
3550 text::localised_format_box(ws, layout, box, "enable_great_wars", m);
3551 text::close_layout_box(layout, box);
3552 }
3553 return 0;
3554}
3556 {
3557 auto box = text::open_layout_box(layout, indentation);
3559 text::localised_format_box(ws, layout, box, "disable_great_wars", m);
3560 text::close_layout_box(layout, box);
3561 }
3562 return 0;
3563}
3565 {
3566 auto box = text::open_layout_box(layout, indentation);
3568 text::localised_format_box(ws, layout, box, "enable_world_wars", m);
3569 text::close_layout_box(layout, box);
3570 }
3571 return 0;
3572}
3574 {
3575 auto box = text::open_layout_box(layout, indentation);
3577 text::localised_format_box(ws, layout, box, "disable_world_wars", m);
3578 text::close_layout_box(layout, box);
3579 }
3580 return 0;
3581}
3583 if(auto owner = ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot)); owner) {
3584 auto owner_c = ws.world.nation_get_primary_culture(owner);
3585
3586 auto box = text::open_layout_box(layout, indentation);
3588 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(owner_c));
3589 text::localised_format_box(ws, layout, box, "assimilate_province", m);
3590 text::close_layout_box(layout, box);
3591
3592 return 0;
3593 } else {
3594 auto box = text::open_layout_box(layout, indentation);
3596 std::string t = text::produce_simple_string(ws, "owner_primary_culture");
3598 text::localised_format_box(ws, layout, box, "assimilate_province", m);
3599 text::close_layout_box(layout, box);
3600 }
3601 return 0;
3602}
3604 if(auto owner = ws.world.state_instance_get_nation_from_state_ownership(trigger::to_state(primary_slot)); owner) {
3605 auto owner_c = ws.world.nation_get_primary_culture(owner);
3606
3607 auto box = text::open_layout_box(layout, indentation);
3609 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(owner_c));
3610 text::localised_format_box(ws, layout, box, "assimilate_province", m);
3611 text::close_layout_box(layout, box);
3612
3613 return 0;
3614 } else {
3615 auto box = text::open_layout_box(layout, indentation);
3617 std::string t = text::produce_simple_string(ws, "owner_primary_culture");
3619 text::localised_format_box(ws, layout, box, "assimilate_province", m);
3620 text::close_layout_box(layout, box);
3621 }
3622 return 0;
3623}
3625 if(auto owner = nations::owner_of_pop(ws, trigger::to_pop(primary_slot)); owner) {
3626 auto owner_c = ws.world.nation_get_primary_culture(owner);
3627
3628 auto box = text::open_layout_box(layout, indentation);
3630 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(owner_c));
3631 text::localised_format_box(ws, layout, box, "assimilate_pop", m);
3632 text::close_layout_box(layout, box);
3633
3634 return 0;
3635 } else {
3636 auto box = text::open_layout_box(layout, indentation);
3638 std::string t = text::produce_simple_string(ws, "owner_primary_culture");
3640 text::localised_format_box(ws, layout, box, "assimilate_pop", m);
3641 text::close_layout_box(layout, box);
3642 }
3643 return 0;
3644}
3646 auto box = text::open_layout_box(layout, indentation);
3648 text::localised_format_box(ws, layout, box, "literacy", m);
3649 text::add_space_to_layout_box(ws, layout, box);
3650 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3651 text::close_layout_box(layout, box);
3652 return 0;
3653}
3655 auto box = text::open_layout_box(layout, indentation);
3657 text::localised_format_box(ws, layout, box, "add_crisis_interest", m);
3658 text::close_layout_box(layout, box);
3659 return 0;
3660}
3662 auto box = text::open_layout_box(layout, indentation);
3664 text::localised_format_box(ws, layout, box, "flashpoint_tension_label", m);
3665 text::add_space_to_layout_box(ws, layout, box);
3666 display_value(int64_t(trigger::read_float_from_payload(tval + 1)), true, ws, layout, box);
3667 text::close_layout_box(layout, box);
3668 return 0;
3669}
3671 auto box = text::open_layout_box(layout, indentation);
3673 text::localised_format_box(ws, layout, box, "crisis_temperature_plain", m);
3674 text::add_space_to_layout_box(ws, layout, box);
3675 display_value(int64_t(trigger::read_float_from_payload(tval + 1)), true, ws, layout, box);
3676 text::close_layout_box(layout, box);
3677 return 0;
3678}
3680 auto box = text::open_layout_box(layout, indentation);
3682 text::localised_format_box(ws, layout, box, "consciousness", m);
3683 text::add_space_to_layout_box(ws, layout, box);
3684 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3685 text::close_layout_box(layout, box);
3686 return 0;
3687}
3689 auto box = text::open_layout_box(layout, indentation);
3691 text::localised_format_box(ws, layout, box, "militancy", m);
3692 text::add_space_to_layout_box(ws, layout, box);
3693 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
3694 text::close_layout_box(layout, box);
3695 return 0;
3696}
3698 auto box = text::open_layout_box(layout, indentation);
3700 text::localised_format_box(ws, layout, box, "rgo_size", m);
3701 text::add_space_to_layout_box(ws, layout, box);
3702 display_value(int64_t(trigger::payload(tval[1]).signed_value), false, ws, layout, box);
3703 text::close_layout_box(layout, box);
3704 return 0;
3705}
3708 auto amount = trigger::payload(tval[1]).signed_value;
3709 {
3710 auto box = text::open_layout_box(layout, indentation);
3713 text::add_space_to_layout_box(ws, layout, box);
3714 display_value(int64_t(amount), true, ws, layout, box);
3715 text::close_layout_box(layout, box);
3716 }
3717 return 0;
3718}
3721 auto amount = trigger::payload(tval[1]).signed_value;
3722 {
3723 auto box = text::open_layout_box(layout, indentation);
3726 text::add_space_to_layout_box(ws, layout, box);
3727 display_value(int64_t(amount), true, ws, layout, box);
3728 text::close_layout_box(layout, box);
3729 }
3730 return 0;
3731}
3733 {
3734 auto box = text::open_layout_box(layout, indentation);
3736 text::localised_format_box(ws, layout, box, "trigger_every_revolt", m);
3737 text::close_layout_box(layout, box);
3738 }
3739 if(trigger::payload(tval[1]).reb_id) {
3740 auto box = text::open_layout_box(layout, indentation + indentation_amount);
3742 text::add_to_substitution_map(m, text::variable_type::text, ws.world.rebel_type_get_name(trigger::payload(tval[1]).reb_id));
3743 text::localised_format_box(ws, layout, box, "of_type", m);
3744 text::close_layout_box(layout, box);
3745 }
3746 if(trigger::payload(tval[2]).cul_id) {
3747 auto box = text::open_layout_box(layout, indentation + indentation_amount);
3749 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[2]).cul_id));
3750 text::localised_format_box(ws, layout, box, "where_culture_is", m);
3751 text::close_layout_box(layout, box);
3752 }
3753 if(trigger::payload(tval[3]).rel_id) {
3754 auto box = text::open_layout_box(layout, indentation + indentation_amount);
3756 text::add_to_substitution_map(m, text::variable_type::text, ws.world.religion_get_name(trigger::payload(tval[3]).rel_id));
3757 text::localised_format_box(ws, layout, box, "where_religion_is", m);
3758 text::close_layout_box(layout, box);
3759 }
3760 if(trigger::payload(tval[4]).ideo_id) {
3761 auto box = text::open_layout_box(layout, indentation + indentation_amount);
3763 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[4]).ideo_id));
3764 text::localised_format_box(ws, layout, box, "where_ideology_is", m);
3765 text::close_layout_box(layout, box);
3766 }
3767 return 0;
3768}
3770 return ef_trigger_revolt_nation(ws, tval, layout, 0, 0, 0, r_lo, r_hi, indentation);
3771}
3773 return ef_trigger_revolt_nation(ws, tval, layout, 0, 0, 0, r_lo, r_hi, indentation);
3774}
3776 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
3777 if(target) {
3778 auto box = text::open_layout_box(layout, indentation);
3781 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3782 text::add_space_to_layout_box(ws, layout, box);
3783 display_value(int64_t(trigger::payload(tval[2]).signed_value), true, ws, layout, box);
3784 text::close_layout_box(layout, box);
3785 }
3786 return 0;
3787}
3789 {
3790 auto box = text::open_layout_box(layout, indentation);
3792 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3793 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3794 text::add_space_to_layout_box(ws, layout, box);
3795 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3796 text::close_layout_box(layout, box);
3797 }
3798 return 0;
3799}
3801 {
3802 auto box = text::open_layout_box(layout, indentation);
3804 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
3805 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3806 text::add_space_to_layout_box(ws, layout, box);
3807 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3808 text::close_layout_box(layout, box);
3809 }
3810 return 0;
3811}
3813 {
3814 auto box = text::open_layout_box(layout, indentation);
3816 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
3817 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3818 text::add_space_to_layout_box(ws, layout, box);
3819 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3820 text::close_layout_box(layout, box);
3821 }
3822 return 0;
3823}
3825 {
3826 auto box = text::open_layout_box(layout, indentation);
3828 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
3829 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3830 text::add_space_to_layout_box(ws, layout, box);
3831 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3832 text::close_layout_box(layout, box);
3833 }
3834 return 0;
3835}
3837 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
3838 if(target) {
3839 auto box = text::open_layout_box(layout, indentation);
3842 text::localised_format_box(ws, layout, box, "relations_with", m);
3843 text::add_space_to_layout_box(ws, layout, box);
3844 display_value(int64_t(trigger::payload(tval[2]).signed_value), true, ws, layout, box);
3845 text::close_layout_box(layout, box);
3846 }
3847 return 0;
3848}
3850 {
3851 auto box = text::open_layout_box(layout, indentation);
3853 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3854 text::localised_format_box(ws, layout, box, "relations_with", m);
3855 text::add_space_to_layout_box(ws, layout, box);
3856 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3857 text::close_layout_box(layout, box);
3858 }
3859 return 0;
3860}
3862 {
3863 auto box = text::open_layout_box(layout, indentation);
3865 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
3866 text::localised_format_box(ws, layout, box, "relations_with", m);
3867 text::add_space_to_layout_box(ws, layout, box);
3868 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3869 text::close_layout_box(layout, box);
3870 }
3871 return 0;
3872}
3874 {
3875 auto box = text::open_layout_box(layout, indentation);
3877 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
3878 text::localised_format_box(ws, layout, box, "relations_with", m);
3879 text::add_space_to_layout_box(ws, layout, box);
3880 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3881 text::close_layout_box(layout, box);
3882 }
3883 return 0;
3884}
3886 {
3887 auto box = text::open_layout_box(layout, indentation);
3889 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
3890 text::localised_format_box(ws, layout, box, "relations_with", m);
3891 text::add_space_to_layout_box(ws, layout, box);
3892 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3893 text::close_layout_box(layout, box);
3894 }
3895 return 0;
3896}
3898 auto box = text::open_layout_box(layout, indentation);
3900 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3902 text::localised_format_box(ws, layout, box, "add_modifier_until", m);
3903 text::close_layout_box(layout, box);
3904 if(ws.user_settings.spoilers) {
3905 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3906 }
3907 return 0;
3908}
3910 auto box = text::open_layout_box(layout, indentation);
3912 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3913 text::localised_format_box(ws, layout, box, "add_modifier", m);
3914 text::close_layout_box(layout, box);
3915 if(ws.user_settings.spoilers) {
3916 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3917 }
3918 return 0;
3919}
3921 auto box = text::open_layout_box(layout, indentation);
3923 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3925 text::localised_format_box(ws, layout, box, "add_modifier_until", m);
3926 text::close_layout_box(layout, box);
3927 if(ws.user_settings.spoilers) {
3928 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3929 }
3930 return 0;
3931}
3933 auto box = text::open_layout_box(layout, indentation);
3935 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3936 text::localised_format_box(ws, layout, box, "add_modifier", m);
3937 text::close_layout_box(layout, box);
3938 if(ws.user_settings.spoilers) {
3939 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3940 }
3941 return 0;
3942}
3944 auto type = trigger::payload(tval[1]).cb_id;
3945 auto months = trigger::payload(tval[2]).signed_value;
3946 auto tag_target = trigger::payload(tval[3]).tag_id;
3947
3948 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
3949 if(target) {
3950 auto box = text::open_layout_box(layout, indentation);
3953 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3954 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3955 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3956 text::close_layout_box(layout, box);
3957 }
3958 return 0;
3959}
3961 auto type = trigger::payload(tval[1]).cb_id;
3962 auto months = trigger::payload(tval[2]).signed_value;
3963 if(auto holder = ws.world.province_get_nation_from_province_ownership(trigger::payload(tval[3]).prov_id); holder) {
3964 auto box = text::open_layout_box(layout, indentation);
3967 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3968 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3969 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3970 text::close_layout_box(layout, box);
3971 }
3972 return 0;
3973}
3975 auto type = trigger::payload(tval[1]).cb_id;
3976 auto months = trigger::payload(tval[2]).signed_value;
3977 {
3978 auto box = text::open_layout_box(layout, indentation);
3980 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3981 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3982 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3983 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3984 text::close_layout_box(layout, box);
3985 }
3986 return 0;
3987}
3989 auto type = trigger::payload(tval[1]).cb_id;
3990 auto months = trigger::payload(tval[2]).signed_value;
3991 {
3992 auto box = text::open_layout_box(layout, indentation);
3994 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
3995 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3996 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3997 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3998 text::close_layout_box(layout, box);
3999 }
4000 return 0;
4001}
4003 auto type = trigger::payload(tval[1]).cb_id;
4004 auto months = trigger::payload(tval[2]).signed_value;
4005 {
4006 auto box = text::open_layout_box(layout, indentation);
4008 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4009 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4010 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4011 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
4012 text::close_layout_box(layout, box);
4013 }
4014 return 0;
4015}
4017 auto type = trigger::payload(tval[1]).cb_id;
4018 auto months = trigger::payload(tval[2]).signed_value;
4019 {
4020 auto box = text::open_layout_box(layout, indentation);
4022 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4023 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4024 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4025 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
4026 text::close_layout_box(layout, box);
4027 }
4028 return 0;
4029}
4031 auto type = trigger::payload(tval[1]).cb_id;
4032 auto months = trigger::payload(tval[2]).signed_value;
4033 {
4034 auto box = text::open_layout_box(layout, indentation);
4036 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4037 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4038 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4039 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
4040 text::close_layout_box(layout, box);
4041 }
4042 return 0;
4043}
4045 auto type = trigger::payload(tval[1]).cb_id;
4046 auto months = trigger::payload(tval[2]).signed_value;
4047 {
4048 auto box = text::open_layout_box(layout, indentation);
4050 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4051 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4052 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4053 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
4054 text::close_layout_box(layout, box);
4055 }
4056 return 0;
4057}
4059 auto type = trigger::payload(tval[1]).cb_id;
4060 auto months = trigger::payload(tval[2]).signed_value;
4061 auto tag_target = trigger::payload(tval[3]).tag_id;
4062
4063 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
4064 if(target) {
4065 auto box = text::open_layout_box(layout, indentation);
4068 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4069 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4070 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4071 text::close_layout_box(layout, box);
4072 }
4073 return 0;
4074}
4076 auto type = trigger::payload(tval[1]).cb_id;
4077 auto months = trigger::payload(tval[2]).signed_value;
4078 if(auto holder = ws.world.province_get_nation_from_province_ownership(trigger::payload(tval[3]).prov_id); holder) {
4079 auto box = text::open_layout_box(layout, indentation);
4082 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4083 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4084 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4085 text::close_layout_box(layout, box);
4086 }
4087 return 0;
4088}
4090 auto type = trigger::payload(tval[1]).cb_id;
4091 auto months = trigger::payload(tval[2]).signed_value;
4092 {
4093 auto box = text::open_layout_box(layout, indentation);
4095 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4096 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4097 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4098 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4099 text::close_layout_box(layout, box);
4100 }
4101 return 0;
4102}
4104 auto type = trigger::payload(tval[1]).cb_id;
4105 auto months = trigger::payload(tval[2]).signed_value;
4106 {
4107 auto box = text::open_layout_box(layout, indentation);
4109 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4110 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4111 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4112 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4113 text::close_layout_box(layout, box);
4114 }
4115 return 0;
4116}
4118 auto type = trigger::payload(tval[1]).cb_id;
4119 auto months = trigger::payload(tval[2]).signed_value;
4120 {
4121 auto box = text::open_layout_box(layout, indentation);
4123 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4124 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4125 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4126 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4127 text::close_layout_box(layout, box);
4128 }
4129 return 0;
4130}
4132 auto type = trigger::payload(tval[1]).cb_id;
4133 auto months = trigger::payload(tval[2]).signed_value;
4134 {
4135 auto box = text::open_layout_box(layout, indentation);
4137 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4138 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4139 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4140 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4141 text::close_layout_box(layout, box);
4142 }
4143 return 0;
4144}
4146 auto type = trigger::payload(tval[1]).cb_id;
4147 auto months = trigger::payload(tval[2]).signed_value;
4148 {
4149 auto box = text::open_layout_box(layout, indentation);
4151 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4152 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4153 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4154 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4155 text::close_layout_box(layout, box);
4156 }
4157 return 0;
4158}
4160 auto type = trigger::payload(tval[1]).cb_id;
4161 auto months = trigger::payload(tval[2]).signed_value;
4162 {
4163 auto box = text::open_layout_box(layout, indentation);
4165 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4166 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4167 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4168 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4169 text::close_layout_box(layout, box);
4170 }
4171 return 0;
4172}
4174 auto type = trigger::payload(tval[1]).cb_id;
4175 auto tag_target = trigger::payload(tval[2]).tag_id;
4176
4177 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
4178 if(target) {
4179 auto box = text::open_layout_box(layout, indentation);
4182 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4183 text::localised_format_box(ws, layout, box, "remove_cb", m);
4184 text::close_layout_box(layout, box);
4185 }
4186 return 0;
4187}
4189 auto type = trigger::payload(tval[1]).cb_id;
4190 if(auto holder = ws.world.province_get_nation_from_province_ownership(trigger::payload(tval[2]).prov_id); holder) {
4191 auto box = text::open_layout_box(layout, indentation);
4194 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4195 text::localised_format_box(ws, layout, box, "remove_cb", m);
4196 text::close_layout_box(layout, box);
4197 }
4198 return 0;
4199}
4201 auto type = trigger::payload(tval[1]).cb_id;
4202 {
4203 auto box = text::open_layout_box(layout, indentation);
4205 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4206 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4207 text::localised_format_box(ws, layout, box, "remove_cb", m);
4208 text::close_layout_box(layout, box);
4209 }
4210 return 0;
4211}
4213 auto type = trigger::payload(tval[1]).cb_id;
4214 {
4215 auto box = text::open_layout_box(layout, indentation);
4217 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4218 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4219 text::localised_format_box(ws, layout, box, "remove_cb", m);
4220 text::close_layout_box(layout, box);
4221 }
4222 return 0;
4223}
4225 auto type = trigger::payload(tval[1]).cb_id;
4226 {
4227 auto box = text::open_layout_box(layout, indentation);
4229 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4230 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4231 text::localised_format_box(ws, layout, box, "remove_cb", m);
4232 text::close_layout_box(layout, box);
4233 }
4234 return 0;
4235}
4237 auto type = trigger::payload(tval[1]).cb_id;
4238 {
4239 auto box = text::open_layout_box(layout, indentation);
4241 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4242 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4243 text::localised_format_box(ws, layout, box, "remove_cb", m);
4244 text::close_layout_box(layout, box);
4245 }
4246 return 0;
4247}
4249 auto type = trigger::payload(tval[1]).cb_id;
4250 {
4251 auto box = text::open_layout_box(layout, indentation);
4253 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4254 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4255 text::localised_format_box(ws, layout, box, "remove_cb", m);
4256 text::close_layout_box(layout, box);
4257 }
4258 return 0;
4259}
4261 auto type = trigger::payload(tval[1]).cb_id;
4262 {
4263 auto box = text::open_layout_box(layout, indentation);
4265 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4266 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4267 text::localised_format_box(ws, layout, box, "remove_cb", m);
4268 text::close_layout_box(layout, box);
4269 }
4270 return 0;
4271}
4273 auto type = trigger::payload(tval[1]).cb_id;
4274 auto tag_target = trigger::payload(tval[2]).tag_id;
4275
4276 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
4277 if(target) {
4278 auto box = text::open_layout_box(layout, indentation);
4281 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4282 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4283 text::close_layout_box(layout, box);
4284 }
4285 return 0;
4286}
4288 auto type = trigger::payload(tval[1]).cb_id;
4289 if(auto holder = ws.world.province_get_nation_from_province_ownership(trigger::payload(tval[2]).prov_id); holder) {
4290 auto box = text::open_layout_box(layout, indentation);
4293 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4294 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4295 text::close_layout_box(layout, box);
4296 }
4297 return 0;
4298}
4300 auto type = trigger::payload(tval[1]).cb_id;
4301 {
4302 auto box = text::open_layout_box(layout, indentation);
4304 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4305 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4306 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4307 text::close_layout_box(layout, box);
4308 }
4309 return 0;
4310}
4312 auto type = trigger::payload(tval[1]).cb_id;
4313 {
4314 auto box = text::open_layout_box(layout, indentation);
4316 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4317 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4318 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4319 text::close_layout_box(layout, box);
4320 }
4321 return 0;
4322}
4324 auto type = trigger::payload(tval[1]).cb_id;
4325 {
4326 auto box = text::open_layout_box(layout, indentation);
4328 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4329 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4330 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4331 text::close_layout_box(layout, box);
4332 }
4333 return 0;
4334}
4336 auto type = trigger::payload(tval[1]).cb_id;
4337 {
4338 auto box = text::open_layout_box(layout, indentation);
4340 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4341 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4342 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4343 text::close_layout_box(layout, box);
4344 }
4345 return 0;
4346}
4348 auto type = trigger::payload(tval[1]).cb_id;
4349 {
4350 auto box = text::open_layout_box(layout, indentation);
4352 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4353 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4354 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4355 text::close_layout_box(layout, box);
4356 }
4357 return 0;
4358}
4360 auto type = trigger::payload(tval[1]).cb_id;
4361 {
4362 auto box = text::open_layout_box(layout, indentation);
4364 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4365 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4366 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4367 text::close_layout_box(layout, box);
4368 }
4369 return 0;
4370}
4371
4373 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
4374 if(!target)
4375 return 0;
4376 text::add_line(ws, layout, "att_truce_with", text::variable_type::text, target, text::variable_type::y, ws.current_date + int32_t(tval[2] * 30.5), indentation);
4377 return 0;
4378}
4380 {
4381 auto box = text::open_layout_box(layout, indentation);
4383 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4384 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4385 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4386 text::close_layout_box(layout, box);
4387 }
4388 return 0;
4389}
4391 {
4392 auto box = text::open_layout_box(layout, indentation);
4394 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4395 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4396 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4397 text::close_layout_box(layout, box);
4398 }
4399 return 0;
4400}
4402 {
4403 auto box = text::open_layout_box(layout, indentation);
4405 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4406 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4407 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4408 text::close_layout_box(layout, box);
4409 }
4410 return 0;
4411}
4413 {
4414 auto box = text::open_layout_box(layout, indentation);
4416 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4417 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4418 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4419 text::close_layout_box(layout, box);
4420 }
4421 return 0;
4422}
4424 {
4425 auto box = text::open_layout_box(layout, indentation);
4427 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4428 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4429 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4430 text::close_layout_box(layout, box);
4431 }
4432 return 0;
4433}
4435 {
4436 auto box = text::open_layout_box(layout, indentation);
4438 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4439 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4440 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4441 text::close_layout_box(layout, box);
4442 }
4443 return 0;
4444}
4446 text::add_line(ws, layout, "att_call_allies_effect");
4447 return 0;
4448}
4449
4451 auto box = text::open_layout_box(layout, indentation);
4453 text::add_to_substitution_map(m, text::variable_type::text, ws.world.nation_get_ruling_party(trigger::to_nation(this_slot)).get_ideology().get_name());
4454 text::localised_format_box(ws, layout, box, "change_ruling_party", m);
4455 text::close_layout_box(layout, box);
4456 return 0;
4457}
4459 auto box = text::open_layout_box(layout, indentation);
4461 text::add_to_substitution_map(m, text::variable_type::text, ws.world.nation_get_ruling_party(trigger::to_nation(from_slot)).get_ideology().get_name());
4462 text::localised_format_box(ws, layout, box, "change_ruling_party", m);
4463 text::close_layout_box(layout, box);
4464 return 0;
4465}
4466
4468 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
4469 if(!target)
4470 return 0;
4471 {
4472 auto box = text::open_layout_box(layout, indentation);
4475 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4476 text::close_layout_box(layout, box);
4477 }
4478 {
4479 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4481 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[5]).cb_id));
4482 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4483 text::close_layout_box(layout, box);
4484 }
4485 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[6]).prov_id); si) {
4486 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4489 text::localised_format_box(ws, layout, box, "for_text", m);
4490 text::close_layout_box(layout, box);
4491 }
4492 if(auto t = trigger::payload(tval[7]).tag_id; t) {
4493 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4496 text::localised_format_box(ws, layout, box, "for_text", m);
4497 text::close_layout_box(layout, box);
4498 }
4499 if(trigger::payload(tval[2]).cb_id) {
4500 {
4501 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4503 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[2]).cb_id));
4504 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4505 text::close_layout_box(layout, box);
4506 }
4507 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[3]).prov_id); si) {
4508 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4511 text::localised_format_box(ws, layout, box, "for_text", m);
4512 text::close_layout_box(layout, box);
4513 }
4514 if(auto t = trigger::payload(tval[4]).tag_id; t) {
4515 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4518 text::localised_format_box(ws, layout, box, "for_text", m);
4519 text::close_layout_box(layout, box);
4520 }
4521 }
4522 return 0;
4523}
4525 {
4526 auto box = text::open_layout_box(layout, indentation);
4528 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4529 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4530 text::close_layout_box(layout, box);
4531 }
4532 {
4533 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4535 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4536 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4537 text::close_layout_box(layout, box);
4538 }
4539 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4540 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4543 text::localised_format_box(ws, layout, box, "for_text", m);
4544 text::close_layout_box(layout, box);
4545 }
4546 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4547 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4550 text::localised_format_box(ws, layout, box, "for_text", m);
4551 text::close_layout_box(layout, box);
4552 }
4553 if(trigger::payload(tval[1]).cb_id) {
4554 {
4555 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4557 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4558 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4559 text::close_layout_box(layout, box);
4560 }
4561 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4562 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4565 text::localised_format_box(ws, layout, box, "for_text", m);
4566 text::close_layout_box(layout, box);
4567 }
4568 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4569 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4572 text::localised_format_box(ws, layout, box, "for_text", m);
4573 text::close_layout_box(layout, box);
4574 }
4575 }
4576 return 0;
4577}
4579 {
4580 auto box = text::open_layout_box(layout, indentation);
4582 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4583 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4584 text::close_layout_box(layout, box);
4585 }
4586 {
4587 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4589 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4590 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4591 text::close_layout_box(layout, box);
4592 }
4593 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4594 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4597 text::localised_format_box(ws, layout, box, "for_text", m);
4598 text::close_layout_box(layout, box);
4599 }
4600 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4601 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4604 text::localised_format_box(ws, layout, box, "for_text", m);
4605 text::close_layout_box(layout, box);
4606 }
4607 if(trigger::payload(tval[1]).cb_id) {
4608 {
4609 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4611 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4612 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4613 text::close_layout_box(layout, box);
4614 }
4615 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4616 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4619 text::localised_format_box(ws, layout, box, "for_text", m);
4620 text::close_layout_box(layout, box);
4621 }
4622 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4623 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4626 text::localised_format_box(ws, layout, box, "for_text", m);
4627 text::close_layout_box(layout, box);
4628 }
4629 }
4630 return 0;
4631}
4633 {
4634 auto box = text::open_layout_box(layout, indentation);
4636 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4637 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4638 text::close_layout_box(layout, box);
4639 }
4640 {
4641 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4643 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4644 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4645 text::close_layout_box(layout, box);
4646 }
4647 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4648 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4651 text::localised_format_box(ws, layout, box, "for_text", m);
4652 text::close_layout_box(layout, box);
4653 }
4654 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4655 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4658 text::localised_format_box(ws, layout, box, "for_text", m);
4659 text::close_layout_box(layout, box);
4660 }
4661 if(trigger::payload(tval[1]).cb_id) {
4662 {
4663 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4665 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4666 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4667 text::close_layout_box(layout, box);
4668 }
4669 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4670 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4673 text::localised_format_box(ws, layout, box, "for_text", m);
4674 text::close_layout_box(layout, box);
4675 }
4676 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4677 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4680 text::localised_format_box(ws, layout, box, "for_text", m);
4681 text::close_layout_box(layout, box);
4682 }
4683 }
4684 return 0;
4685}
4687 {
4688 auto box = text::open_layout_box(layout, indentation);
4690 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4691 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4692 text::close_layout_box(layout, box);
4693 }
4694 {
4695 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4697 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4698 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4699 text::close_layout_box(layout, box);
4700 }
4701 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4702 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4705 text::localised_format_box(ws, layout, box, "for_text", m);
4706 text::close_layout_box(layout, box);
4707 }
4708 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4709 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4712 text::localised_format_box(ws, layout, box, "for_text", m);
4713 text::close_layout_box(layout, box);
4714 }
4715 if(trigger::payload(tval[1]).cb_id) {
4716 {
4717 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4719 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4720 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4721 text::close_layout_box(layout, box);
4722 }
4723 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4724 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4727 text::localised_format_box(ws, layout, box, "for_text", m);
4728 text::close_layout_box(layout, box);
4729 }
4730 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4731 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4734 text::localised_format_box(ws, layout, box, "for_text", m);
4735 text::close_layout_box(layout, box);
4736 }
4737 }
4738 return 0;
4739}
4741 {
4742 auto box = text::open_layout_box(layout, indentation);
4744 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4745 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4746 text::close_layout_box(layout, box);
4747 }
4748 {
4749 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4751 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4752 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4753 text::close_layout_box(layout, box);
4754 }
4755 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4756 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4759 text::localised_format_box(ws, layout, box, "for_text", m);
4760 text::close_layout_box(layout, box);
4761 }
4762 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4763 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4766 text::localised_format_box(ws, layout, box, "for_text", m);
4767 text::close_layout_box(layout, box);
4768 }
4769 if(trigger::payload(tval[1]).cb_id) {
4770 {
4771 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4773 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4774 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4775 text::close_layout_box(layout, box);
4776 }
4777 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4778 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4781 text::localised_format_box(ws, layout, box, "for_text", m);
4782 text::close_layout_box(layout, box);
4783 }
4784 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4785 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4788 text::localised_format_box(ws, layout, box, "for_text", m);
4789 text::close_layout_box(layout, box);
4790 }
4791 }
4792 return 0;
4793}
4795 {
4796 auto box = text::open_layout_box(layout, indentation);
4798 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4799 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4800 text::close_layout_box(layout, box);
4801 }
4802 {
4803 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4805 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4806 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4807 text::close_layout_box(layout, box);
4808 }
4809 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4810 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4813 text::localised_format_box(ws, layout, box, "for_text", m);
4814 text::close_layout_box(layout, box);
4815 }
4816 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4817 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4820 text::localised_format_box(ws, layout, box, "for_text", m);
4821 text::close_layout_box(layout, box);
4822 }
4823 if(trigger::payload(tval[1]).cb_id) {
4824 {
4825 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4827 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4828 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4829 text::close_layout_box(layout, box);
4830 }
4831 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4832 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4835 text::localised_format_box(ws, layout, box, "for_text", m);
4836 text::close_layout_box(layout, box);
4837 }
4838 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4839 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4842 text::localised_format_box(ws, layout, box, "for_text", m);
4843 text::close_layout_box(layout, box);
4844 }
4845 }
4846 return 0;
4847}
4849 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
4850 if(!target)
4851 return 0;
4852 {
4853 auto box = text::open_layout_box(layout, indentation);
4856 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4857 text::close_layout_box(layout, box);
4858 }
4859 {
4860 auto box = text::open_layout_box(layout, indentation);
4862 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
4863 text::close_layout_box(layout, box);
4864 }
4865 {
4866 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4868 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[5]).cb_id));
4869 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4870 text::close_layout_box(layout, box);
4871 }
4872 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[6]).prov_id); si) {
4873 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4876 text::localised_format_box(ws, layout, box, "for_text", m);
4877 text::close_layout_box(layout, box);
4878 }
4879 if(auto t = trigger::payload(tval[7]).tag_id; t) {
4880 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4883 text::localised_format_box(ws, layout, box, "for_text", m);
4884 text::close_layout_box(layout, box);
4885 }
4886 if(trigger::payload(tval[2]).cb_id) {
4887 {
4888 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4890 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[2]).cb_id));
4891 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4892 text::close_layout_box(layout, box);
4893 }
4894 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[3]).prov_id); si) {
4895 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4898 text::localised_format_box(ws, layout, box, "for_text", m);
4899 text::close_layout_box(layout, box);
4900 }
4901 if(auto t = trigger::payload(tval[4]).tag_id; t) {
4902 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4905 text::localised_format_box(ws, layout, box, "for_text", m);
4906 text::close_layout_box(layout, box);
4907 }
4908 }
4909 return 0;
4910}
4912 {
4913 auto box = text::open_layout_box(layout, indentation);
4915 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4916 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4917 text::close_layout_box(layout, box);
4918 }
4919 {
4920 auto box = text::open_layout_box(layout, indentation);
4922 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
4923 text::close_layout_box(layout, box);
4924 }
4925 {
4926 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4928 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4929 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4930 text::close_layout_box(layout, box);
4931 }
4932 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4933 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4936 text::localised_format_box(ws, layout, box, "for_text", m);
4937 text::close_layout_box(layout, box);
4938 }
4939 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4940 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4943 text::localised_format_box(ws, layout, box, "for_text", m);
4944 text::close_layout_box(layout, box);
4945 }
4946 if(trigger::payload(tval[1]).cb_id) {
4947 {
4948 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4950 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4951 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4952 text::close_layout_box(layout, box);
4953 }
4954 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4955 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4958 text::localised_format_box(ws, layout, box, "for_text", m);
4959 text::close_layout_box(layout, box);
4960 }
4961 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4962 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4965 text::localised_format_box(ws, layout, box, "for_text", m);
4966 text::close_layout_box(layout, box);
4967 }
4968 }
4969 return 0;
4970}
4972 {
4973 auto box = text::open_layout_box(layout, indentation);
4975 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4976 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4977 text::close_layout_box(layout, box);
4978 }
4979 {
4980 auto box = text::open_layout_box(layout, indentation);
4982 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
4983 text::close_layout_box(layout, box);
4984 }
4985 {
4986 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4988 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4989 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4990 text::close_layout_box(layout, box);
4991 }
4992 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4993 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4996 text::localised_format_box(ws, layout, box, "for_text", m);
4997 text::close_layout_box(layout, box);
4998 }
4999 if(auto t = trigger::payload(tval[6]).tag_id; t) {
5000 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5003 text::localised_format_box(ws, layout, box, "for_text", m);
5004 text::close_layout_box(layout, box);
5005 }
5006 if(trigger::payload(tval[1]).cb_id) {
5007 {
5008 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5010 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
5011 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
5012 text::close_layout_box(layout, box);
5013 }
5014 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
5015 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5018 text::localised_format_box(ws, layout, box, "for_text", m);
5019 text::close_layout_box(layout, box);
5020 }
5021 if(auto t = trigger::payload(tval[3]).tag_id; t) {
5022 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5025 text::localised_format_box(ws, layout, box, "for_text", m);
5026 text::close_layout_box(layout, box);
5027 }
5028 }
5029 return 0;
5030}
5032 {
5033 auto box = text::open_layout_box(layout, indentation);
5035 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
5036 text::localised_format_box(ws, layout, box, "declare_war_on", m);
5037 text::close_layout_box(layout, box);
5038 }
5039 {
5040 auto box = text::open_layout_box(layout, indentation);
5042 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
5043 text::close_layout_box(layout, box);
5044 }
5045 {
5046 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5048 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
5049 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
5050 text::close_layout_box(layout, box);
5051 }
5052 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
5053 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5056 text::localised_format_box(ws, layout, box, "for_text", m);
5057 text::close_layout_box(layout, box);
5058 }
5059 if(auto t = trigger::payload(tval[6]).tag_id; t) {
5060 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5063 text::localised_format_box(ws, layout, box, "for_text", m);
5064 text::close_layout_box(layout, box);
5065 }
5066 if(trigger::payload(tval[1]).cb_id) {
5067 {
5068 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5070 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
5071 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
5072 text::close_layout_box(layout, box);
5073 }
5074 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
5075 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5078 text::localised_format_box(ws, layout, box, "for_text", m);
5079 text::close_layout_box(layout, box);
5080 }
5081 if(auto t = trigger::payload(tval[3]).tag_id; t) {
5082 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5085 text::localised_format_box(ws, layout, box, "for_text", m);
5086 text::close_layout_box(layout, box);
5087 }
5088 }
5089 return 0;
5090}
5092 {
5093 auto box = text::open_layout_box(layout, indentation);
5095 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
5096 text::localised_format_box(ws, layout, box, "declare_war_on", m);
5097 text::close_layout_box(layout, box);
5098 }
5099 {
5100 auto box = text::open_layout_box(layout, indentation);
5102 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
5103 text::close_layout_box(layout, box);
5104 }
5105 {
5106 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5108 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
5109 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
5110 text::close_layout_box(layout, box);
5111 }
5112 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
5113 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5116 text::localised_format_box(ws, layout, box, "for_text", m);
5117 text::close_layout_box(layout, box);
5118 }
5119 if(auto t = trigger::payload(tval[6]).tag_id; t) {
5120 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5123 text::localised_format_box(ws, layout, box, "for_text", m);
5124 text::close_layout_box(layout, box);
5125 }
5126 if(trigger::payload(tval[1]).cb_id) {
5127 {
5128 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5130 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
5131 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
5132 text::close_layout_box(layout, box);
5133 }
5134 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
5135 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5138 text::localised_format_box(ws, layout, box, "for_text", m);
5139 text::close_layout_box(layout, box);
5140 }
5141 if(auto t = trigger::payload(tval[3]).tag_id; t) {
5142 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5145 text::localised_format_box(ws, layout, box, "for_text", m);
5146 text::close_layout_box(layout, box);
5147 }
5148 }
5149 return 0;
5150}
5152 {
5153 auto box = text::open_layout_box(layout, indentation);
5155 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
5156 text::localised_format_box(ws, layout, box, "declare_war_on", m);
5157 text::close_layout_box(layout, box);
5158 }
5159 {
5160 auto box = text::open_layout_box(layout, indentation);
5162 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
5163 text::close_layout_box(layout, box);
5164 }
5165 {
5166 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5168 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
5169 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
5170 text::close_layout_box(layout, box);
5171 }
5172 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
5173 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5176 text::localised_format_box(ws, layout, box, "for_text", m);
5177 text::close_layout_box(layout, box);
5178 }
5179 if(auto t = trigger::payload(tval[6]).tag_id; t) {
5180 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5183 text::localised_format_box(ws, layout, box, "for_text", m);
5184 text::close_layout_box(layout, box);
5185 }
5186 if(trigger::payload(tval[1]).cb_id) {
5187 {
5188 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5190 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
5191 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
5192 text::close_layout_box(layout, box);
5193 }
5194 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
5195 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5198 text::localised_format_box(ws, layout, box, "for_text", m);
5199 text::close_layout_box(layout, box);
5200 }
5201 if(auto t = trigger::payload(tval[3]).tag_id; t) {
5202 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5205 text::localised_format_box(ws, layout, box, "for_text", m);
5206 text::close_layout_box(layout, box);
5207 }
5208 }
5209 return 0;
5210}
5212 {
5213 auto box = text::open_layout_box(layout, indentation);
5215 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
5216 text::localised_format_box(ws, layout, box, "declare_war_on", m);
5217 text::close_layout_box(layout, box);
5218 }
5219 {
5220 auto box = text::open_layout_box(layout, indentation);
5222 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
5223 text::close_layout_box(layout, box);
5224 }
5225 {
5226 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5228 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
5229 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
5230 text::close_layout_box(layout, box);
5231 }
5232 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
5233 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5236 text::localised_format_box(ws, layout, box, "for_text", m);
5237 text::close_layout_box(layout, box);
5238 }
5239 if(auto t = trigger::payload(tval[6]).tag_id; t) {
5240 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5243 text::localised_format_box(ws, layout, box, "for_text", m);
5244 text::close_layout_box(layout, box);
5245 }
5246 if(trigger::payload(tval[1]).cb_id) {
5247 {
5248 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5250 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
5251 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
5252 text::close_layout_box(layout, box);
5253 }
5254 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
5255 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5258 text::localised_format_box(ws, layout, box, "for_text", m);
5259 text::close_layout_box(layout, box);
5260 }
5261 if(auto t = trigger::payload(tval[3]).tag_id; t) {
5262 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5265 text::localised_format_box(ws, layout, box, "for_text", m);
5266 text::close_layout_box(layout, box);
5267 }
5268 }
5269 return 0;
5270}
5272 {
5273 auto box = text::open_layout_box(layout, indentation);
5276 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5277 populate_event_submap(ws, m, event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::nation});
5278 text::localised_format_box(ws, layout, box, "event_fires", m);
5279 text::close_layout_box(layout, box);
5280 }
5281 return 0;
5282}
5284 {
5285 auto box = text::open_layout_box(layout, indentation);
5288 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5289 populate_event_submap(ws, m, event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::nation});
5290 text::localised_format_box(ws, layout, box, "event_fires", m);
5291 text::close_layout_box(layout, box);
5292 }
5293 return 0;
5294}
5296 {
5297 auto box = text::open_layout_box(layout, indentation);
5300 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5301
5303 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::nation});
5304
5305 text::localised_format_box(ws, layout, box, "event_fires", m);
5306 text::close_layout_box(layout, box);
5307 }
5308 return 0;
5309}
5311 {
5312 auto box = text::open_layout_box(layout, indentation);
5315 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5317 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::nation});
5318 text::localised_format_box(ws, layout, box, "event_fires", m);
5319 text::close_layout_box(layout, box);
5320 }
5321 return 0;
5322}
5324 {
5325 auto box = text::open_layout_box(layout, indentation);
5328 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5329 populate_event_submap(ws, m, event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::state});
5330 text::localised_format_box(ws, layout, box, "event_fires", m);
5331 text::close_layout_box(layout, box);
5332 }
5333 return 0;
5334}
5336 {
5337 auto box = text::open_layout_box(layout, indentation);
5340 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5341 populate_event_submap(ws, m, event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::state});
5342 text::localised_format_box(ws, layout, box, "event_fires", m);
5343 text::close_layout_box(layout, box);
5344 }
5345 return 0;
5346}
5348 {
5349 auto box = text::open_layout_box(layout, indentation);
5352 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5354 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::state});
5355 text::localised_format_box(ws, layout, box, "event_fires", m);
5356 text::close_layout_box(layout, box);
5357 }
5358 return 0;
5359}
5361 {
5362 auto box = text::open_layout_box(layout, indentation);
5365 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5367 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::state});
5368 text::localised_format_box(ws, layout, box, "event_fires", m);
5369 text::close_layout_box(layout, box);
5370 }
5371 return 0;
5372}
5374 {
5375 auto box = text::open_layout_box(layout, indentation);
5378 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5379 populate_event_submap(ws, m, event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::province});
5380 text::localised_format_box(ws, layout, box, "event_fires", m);
5381 text::close_layout_box(layout, box);
5382 }
5383 return 0;
5384}
5386 {
5387 auto box = text::open_layout_box(layout, indentation);
5390 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5391 populate_event_submap(ws, m, event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::province});
5392 text::localised_format_box(ws, layout, box, "event_fires", m);
5393 text::close_layout_box(layout, box);
5394 }
5395 return 0;
5396}
5398 {
5399 auto box = text::open_layout_box(layout, indentation);
5402 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5404 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::province});
5405 text::localised_format_box(ws, layout, box, "event_fires", m);
5406 text::close_layout_box(layout, box);
5407 }
5408 return 0;
5409}
5411 {
5412 auto box = text::open_layout_box(layout, indentation);
5415 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5417 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::province});
5418 text::localised_format_box(ws, layout, box, "event_fires", m);
5419 text::close_layout_box(layout, box);
5420 }
5421 return 0;
5422}
5424 {
5425 auto box = text::open_layout_box(layout, indentation);
5428 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5429 populate_event_submap(ws, m, event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::pop});
5430 text::localised_format_box(ws, layout, box, "event_fires", m);
5431 text::close_layout_box(layout, box);
5432 }
5433 return 0;
5434}
5436 {
5437 auto box = text::open_layout_box(layout, indentation);
5440 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5441 populate_event_submap(ws, m, event::pending_human_n_event {r_lo, r_hi + 1, primary_slot, this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::pop});
5442 text::localised_format_box(ws, layout, box, "event_fires", m);
5443 text::close_layout_box(layout, box);
5444 }
5445 return 0;
5446}
5448 {
5449 auto box = text::open_layout_box(layout, indentation);
5452 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5454 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::pop});
5455 text::localised_format_box(ws, layout, box, "event_fires", m);
5456 text::close_layout_box(layout, box);
5457 }
5458 return 0;
5459}
5461 {
5462 auto box = text::open_layout_box(layout, indentation);
5465 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5467 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::pop});
5468 text::localised_format_box(ws, layout, box, "event_fires", m);
5469 text::close_layout_box(layout, box);
5470 }
5471 return 0;
5472}
5474 {
5475 auto box = text::open_layout_box(layout, indentation);
5478 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5480 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5481 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::nation});
5482 text::localised_format_box(ws, layout, box, "event_fires", m);
5483 text::close_layout_box(layout, box);
5484 }
5485 return 0;
5486}
5488 {
5489 auto box = text::open_layout_box(layout, indentation);
5492 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5494 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5495 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::nation});
5496 text::localised_format_box(ws, layout, box, "event_fires", m);
5497 text::close_layout_box(layout, box);
5498 }
5499 return 0;
5500}
5502 {
5503 auto box = text::open_layout_box(layout, indentation);
5506 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5508 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5509 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::state});
5510 text::localised_format_box(ws, layout, box, "event_fires", m);
5511 text::close_layout_box(layout, box);
5512 }
5513 return 0;
5514}
5516 {
5517 auto box = text::open_layout_box(layout, indentation);
5520 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5522 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5523 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::state});
5524 text::localised_format_box(ws, layout, box, "event_fires", m);
5525 text::close_layout_box(layout, box);
5526 }
5527 return 0;
5528}
5530 {
5531 auto box = text::open_layout_box(layout, indentation);
5534 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5536 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5537 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::province});
5538 text::localised_format_box(ws, layout, box, "event_fires", m);
5539 text::close_layout_box(layout, box);
5540 }
5541 return 0;
5542}
5544 {
5545 auto box = text::open_layout_box(layout, indentation);
5548 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5550 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5551 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::province});
5552 text::localised_format_box(ws, layout, box, "event_fires", m);
5553 text::close_layout_box(layout, box);
5554 }
5555 return 0;
5556}
5558 {
5559 auto box = text::open_layout_box(layout, indentation);
5562 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5564 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5565 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::pop});
5566 text::localised_format_box(ws, layout, box, "event_fires", m);
5567 text::close_layout_box(layout, box);
5568 }
5569 return 0;
5570}
5572 {
5573 auto box = text::open_layout_box(layout, indentation);
5576 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5578 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5579 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::pop});
5580 text::localised_format_box(ws, layout, box, "event_fires", m);
5581 text::close_layout_box(layout, box);
5582 }
5583 return 0;
5584}
5585
5587 {
5588 auto box = text::open_layout_box(layout, indentation);
5590 text::localised_format_box(ws, layout, box, "no_effect", m);
5591 text::close_layout_box(layout, box);
5592 }
5593 return 0;
5594}
5596 {
5597 auto box = text::open_layout_box(layout, indentation);
5599 text::localised_format_box(ws, layout, box, "no_effect", m);
5600 text::close_layout_box(layout, box);
5601 }
5602 return 0;
5603}
5605 {
5606 auto box = text::open_layout_box(layout, indentation);
5608 text::localised_format_box(ws, layout, box, "no_effect", m);
5609 text::close_layout_box(layout, box);
5610 }
5611 return 0;
5612}
5614 {
5615 auto box = text::open_layout_box(layout, indentation);
5617 text::localised_format_box(ws, layout, box, "no_effect", m);
5618 text::close_layout_box(layout, box);
5619 }
5620 return 0;
5621}
5623 {
5624 auto box = text::open_layout_box(layout, indentation);
5627 ws.national_definitions.variable_names[trigger::payload(tval[1]).natv_id]);
5629 text::localised_format_box(ws, layout, box, "set_national_variable_to", m);
5630 text::close_layout_box(layout, box);
5631 }
5632 return 0;
5633}
5635 auto amount = trigger::read_float_from_payload(tval + 2);
5636 if(amount >= 0) {
5637 auto box = text::open_layout_box(layout, indentation);
5640 ws.national_definitions.variable_names[trigger::payload(tval[1]).natv_id]);
5642 text::localised_format_box(ws, layout, box, "increase_national_variable_by", m);
5643 text::close_layout_box(layout, box);
5644 } else {
5645 auto box = text::open_layout_box(layout, indentation);
5648 ws.national_definitions.variable_names[trigger::payload(tval[1]).natv_id]);
5650 text::localised_format_box(ws, layout, box, "decrease_national_variable_by", m);
5651 text::close_layout_box(layout, box);
5652 }
5653 return 0;
5654}
5656 {
5657 auto box = text::open_layout_box(layout, indentation);
5659 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5660 text::localised_format_box(ws, layout, box, "support_for_blank", m);
5661 text::add_space_to_layout_box(ws, layout, box);
5662 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5663 text::close_layout_box(layout, box);
5664 }
5665 return 0;
5666}
5668 {
5669 auto box = text::open_layout_box(layout, indentation);
5671 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5672 text::localised_format_box(ws, layout, box, "uh_support_for_blank", m);
5673 text::add_space_to_layout_box(ws, layout, box);
5674 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5675 text::close_layout_box(layout, box);
5676 }
5677 return 0;
5678}
5680 {
5681 auto box = text::open_layout_box(layout, indentation);
5683 std::string t = text::produce_simple_string(ws, "militancy");
5684 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5685 text::add_space_to_layout_box(ws, layout, box);
5686 text::add_to_layout_box(ws, layout, box, t);
5687 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5688 text::localised_format_box(ws, layout, box, "scaled_support", m);
5689 text::close_layout_box(layout, box);
5690 }
5691 return 0;
5692}
5694 {
5695 auto box = text::open_layout_box(layout, indentation);
5697 std::string t = text::produce_simple_string(ws, "militancy");
5698 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5699 text::add_space_to_layout_box(ws, layout, box);
5700 text::add_to_layout_box(ws, layout, box, t);
5701 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5702 text::localised_format_box(ws, layout, box, "scaled_support", m);
5703 text::close_layout_box(layout, box);
5704 }
5705 return 0;
5706}
5708 {
5709 auto box = text::open_layout_box(layout, indentation);
5710 std::string t = text::produce_simple_string(ws, "militancy");
5711 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
5712 text::add_space_to_layout_box(ws, layout, box);
5713 text::add_to_layout_box(ws, layout, box, t);
5714 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5715 text::close_layout_box(layout, box);
5716 }
5717 return 0;
5718}
5720 {
5721 auto box = text::open_layout_box(layout, indentation);
5723 std::string t = text::produce_simple_string(ws, "consciousness");
5724 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5725 text::add_space_to_layout_box(ws, layout, box);
5726 text::add_to_layout_box(ws, layout, box, t);
5727 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5728 text::localised_format_box(ws, layout, box, "scaled_support", m);
5729 text::close_layout_box(layout, box);
5730 }
5731 return 0;
5732}
5734 {
5735 auto box = text::open_layout_box(layout, indentation);
5737 std::string t = text::produce_simple_string(ws, "consciousness");
5738 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5739 text::add_space_to_layout_box(ws, layout, box);
5740 text::add_to_layout_box(ws, layout, box, t);
5741 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5742 text::localised_format_box(ws, layout, box, "scaled_support", m);
5743 text::close_layout_box(layout, box);
5744 }
5745 return 0;
5746}
5748 {
5749 auto box = text::open_layout_box(layout, indentation);
5750 std::string t = text::produce_simple_string(ws, "consciousness");
5751 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
5752 text::add_space_to_layout_box(ws, layout, box);
5753 text::add_to_layout_box(ws, layout, box, t);
5754 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5755 text::close_layout_box(layout, box);
5756 }
5757 return 0;
5758}
5760 {
5761 auto box = text::open_layout_box(layout, indentation);
5763 std::string t = text::produce_simple_string(ws, "militancy");
5764 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5765 text::add_space_to_layout_box(ws, layout, box);
5766 text::add_to_layout_box(ws, layout, box, t);
5767 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5768 text::localised_format_box(ws, layout, box, "scaled_support", m);
5769 text::close_layout_box(layout, box);
5770 }
5771 return 0;
5772}
5774 {
5775 auto box = text::open_layout_box(layout, indentation);
5777 std::string t = text::produce_simple_string(ws, "militancy");
5778 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5779 text::add_space_to_layout_box(ws, layout, box);
5780 text::add_to_layout_box(ws, layout, box, t);
5781 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5782 text::localised_format_box(ws, layout, box, "scaled_support", m);
5783 text::close_layout_box(layout, box);
5784 }
5785 return 0;
5786}
5788 {
5789 auto box = text::open_layout_box(layout, indentation);
5790 std::string t = text::produce_simple_string(ws, "militancy");
5791 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
5792 text::add_space_to_layout_box(ws, layout, box);
5793 text::add_to_layout_box(ws, layout, box, t);
5794 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5795 text::close_layout_box(layout, box);
5796 }
5797 return 0;
5798}
5800 {
5801 auto box = text::open_layout_box(layout, indentation);
5803 std::string t = text::produce_simple_string(ws, "consciousness");
5804 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5805 text::add_space_to_layout_box(ws, layout, box);
5806 text::add_to_layout_box(ws, layout, box, t);
5807 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5808 text::localised_format_box(ws, layout, box, "scaled_support", m);
5809 text::close_layout_box(layout, box);
5810 }
5811 return 0;
5812}
5814 {
5815 auto box = text::open_layout_box(layout, indentation);
5817 std::string t = text::produce_simple_string(ws, "consciousness");
5818 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5819 text::add_space_to_layout_box(ws, layout, box);
5820 text::add_to_layout_box(ws, layout, box, t);
5821 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5822 text::localised_format_box(ws, layout, box, "scaled_support", m);
5823 text::close_layout_box(layout, box);
5824 }
5825 return 0;
5826}
5828 {
5829 auto box = text::open_layout_box(layout, indentation);
5830 std::string t = text::produce_simple_string(ws, "consciousness");
5831 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
5832 text::add_space_to_layout_box(ws, layout, box);
5833 text::add_to_layout_box(ws, layout, box, t);
5834 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5835 text::close_layout_box(layout, box);
5836 }
5837 return 0;
5838}
5840 {
5841 auto box = text::open_layout_box(layout, indentation);
5843 std::string t = text::produce_simple_string(ws, "militancy");
5844 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5845 text::add_space_to_layout_box(ws, layout, box);
5846 text::add_to_layout_box(ws, layout, box, t);
5847 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5848 text::localised_format_box(ws, layout, box, "scaled_support", m);
5849 text::close_layout_box(layout, box);
5850 }
5851 return 0;
5852}
5854 {
5855 auto box = text::open_layout_box(layout, indentation);
5857 std::string t = text::produce_simple_string(ws, "militancy");
5858 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5859 text::add_space_to_layout_box(ws, layout, box);
5860 text::add_to_layout_box(ws, layout, box, t);
5861 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5862 text::localised_format_box(ws, layout, box, "scaled_support", m);
5863 text::close_layout_box(layout, box);
5864 }
5865 return 0;
5866}
5868 {
5869 auto box = text::open_layout_box(layout, indentation);
5870 std::string t = text::produce_simple_string(ws, "militancy");
5871 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
5872 text::add_space_to_layout_box(ws, layout, box);
5873 text::add_to_layout_box(ws, layout, box, t);
5874 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5875 text::close_layout_box(layout, box);
5876 }
5877 return 0;
5878}
5880 {
5881 auto box = text::open_layout_box(layout, indentation);
5883 std::string t = text::produce_simple_string(ws, "consciousness");
5884 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5885 text::add_space_to_layout_box(ws, layout, box);
5886 text::add_to_layout_box(ws, layout, box, t);
5887 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5888 text::localised_format_box(ws, layout, box, "scaled_support", m);
5889 text::close_layout_box(layout, box);
5890 }
5891 return 0;
5892}
5894 {
5895 auto box = text::open_layout_box(layout, indentation);
5897 std::string t = text::produce_simple_string(ws, "consciousness");
5898 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5899 text::add_space_to_layout_box(ws, layout, box);
5900 text::add_to_layout_box(ws, layout, box, t);
5901 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5902 text::localised_format_box(ws, layout, box, "scaled_support", m);
5903 text::close_layout_box(layout, box);
5904 }
5905 return 0;
5906}
5908 {
5909 auto box = text::open_layout_box(layout, indentation);
5910 std::string t = text::produce_simple_string(ws, "consciousness");
5911 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
5912 text::add_space_to_layout_box(ws, layout, box);
5913 text::add_to_layout_box(ws, layout, box, t);
5914 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5915 text::close_layout_box(layout, box);
5916 }
5917 return 0;
5918}
5920 {
5921 auto box = text::open_layout_box(layout, indentation);
5923 std::string t = text::produce_simple_string(ws, "militancy");
5924 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5925 text::add_space_to_layout_box(ws, layout, box);
5926 text::add_to_layout_box(ws, layout, box, t);
5927 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5928 text::localised_format_box(ws, layout, box, "scaled_support", m);
5929 text::close_layout_box(layout, box);
5930 }
5931 return 0;
5932}
5934 {
5935 auto box = text::open_layout_box(layout, indentation);
5937 std::string t = text::produce_simple_string(ws, "militancy");
5938 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5939 text::add_space_to_layout_box(ws, layout, box);
5940 text::add_to_layout_box(ws, layout, box, t);
5941 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5942 text::localised_format_box(ws, layout, box, "scaled_support", m);
5943 text::close_layout_box(layout, box);
5944 }
5945 return 0;
5946}
5948 {
5949 auto box = text::open_layout_box(layout, indentation);
5950 std::string t = text::produce_simple_string(ws, "militancy");
5951 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
5952 text::add_space_to_layout_box(ws, layout, box);
5953 text::add_to_layout_box(ws, layout, box, t);
5954 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5955 text::close_layout_box(layout, box);
5956 }
5957 return 0;
5958}
5960 {
5961 auto box = text::open_layout_box(layout, indentation);
5963 std::string t = text::produce_simple_string(ws, "consciousness");
5964 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5965 text::add_space_to_layout_box(ws, layout, box);
5966 text::add_to_layout_box(ws, layout, box, t);
5967 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5968 text::localised_format_box(ws, layout, box, "scaled_support", m);
5969 text::close_layout_box(layout, box);
5970 }
5971 return 0;
5972}
5974 {
5975 auto box = text::open_layout_box(layout, indentation);
5977 std::string t = text::produce_simple_string(ws, "consciousness");
5978 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5979 text::add_space_to_layout_box(ws, layout, box);
5980 text::add_to_layout_box(ws, layout, box, t);
5981 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5982 text::localised_format_box(ws, layout, box, "scaled_support", m);
5983 text::close_layout_box(layout, box);
5984 }
5985 return 0;
5986}
5988 {
5989 auto box = text::open_layout_box(layout, indentation);
5990 std::string t = text::produce_simple_string(ws, "consciousness");
5991 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
5992 text::add_space_to_layout_box(ws, layout, box);
5993 text::add_to_layout_box(ws, layout, box, t);
5994 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5995 text::close_layout_box(layout, box);
5996 }
5997 return 0;
5998}
6000 {
6001 auto amount = trigger::read_float_from_payload(tval + 2);
6002 auto box = text::open_layout_box(layout, indentation);
6003
6004 display_value(text::fp_one_place{ amount }, true, ws, layout, box);
6005
6006 auto cid = trigger::payload(tval[1]).com_id;
6007 std::string padding = cid.index() < 10 ? "0" : "";
6008 std::string description = "@$" + padding + std::to_string(cid.index());
6009 text::add_unparsed_text_to_layout_box(ws, layout, box, description);
6010
6012 text::add_to_substitution_map(m, text::variable_type::text, ws.world.commodity_get_name(trigger::payload(tval[1]).com_id));
6013 text::localised_format_box(ws, layout, box, "stockpile_of", m);
6014 text::close_layout_box(layout, box);
6015 }
6016 return 0;
6017}
6019 {
6020 auto amount = trigger::read_float_from_payload(tval + 2);
6021 auto box = text::open_layout_box(layout, indentation);
6022 display_value(text::fp_one_place{ amount }, true, ws, layout, box);
6023
6024 auto cid = trigger::payload(tval[1]).com_id;
6025 std::string padding = cid.index() < 10 ? "0" : "";
6026 std::string description = "@$" + padding + std::to_string(cid.index());
6027 text::add_unparsed_text_to_layout_box(ws, layout, box, description);
6028
6030 text::add_to_substitution_map(m, text::variable_type::text, ws.world.commodity_get_name(trigger::payload(tval[1]).com_id));
6031 text::localised_format_box(ws, layout, box, "stockpile_of", m);
6032 text::close_layout_box(layout, box);
6033 }
6034 return 0;
6035}
6037 {
6038 auto box = text::open_layout_box(layout, indentation);
6040 text::localised_format_box(ws, layout, box, "create_general", m);
6041 text::close_layout_box(layout, box);
6042 }
6043 return 0;
6044}
6046 {
6047 auto box = text::open_layout_box(layout, indentation);
6049 text::localised_format_box(ws, layout, box, "create_admiral", m);
6050 text::close_layout_box(layout, box);
6051 }
6052 return 0;
6053}
6055 {
6056 auto box = text::open_layout_box(layout, indentation);
6058 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6059 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6060 text::add_space_to_layout_box(ws, layout, box);
6061 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
6062 text::close_layout_box(layout, box);
6063 }
6064 return 0;
6065}
6067 {
6068 auto box = text::open_layout_box(layout, indentation);
6070 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6071 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6072 text::add_space_to_layout_box(ws, layout, box);
6073 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
6074 text::close_layout_box(layout, box);
6075 }
6076 return 0;
6077}
6079 {
6080 auto amount = trigger::read_float_from_payload(tval + 2);
6081 auto box = text::open_layout_box(layout, indentation);
6083 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
6084 std::string t;
6085 if(primary_slot != -1)
6087 else {
6088 t = text::produce_simple_string(ws, "this_nation");
6090 }
6091 text::localised_format_box(ws, layout, box, "add_war_goal", m);
6092 text::close_layout_box(layout, box);
6093 }
6094 return 0;
6095}
6097 auto amount = trigger::read_float_from_payload(tval + 3);
6098 {
6099 auto box = text::open_layout_box(layout, indentation);
6101 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6102 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6103 text::add_space_to_layout_box(ws, layout, box);
6104 display_value(text::fp_percentage{ -amount }, true, ws, layout, box);
6105 text::close_layout_box(layout, box);
6106 }
6107 {
6108 auto box = text::open_layout_box(layout, indentation);
6110 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[2]).opt_id));
6111 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6112 text::add_space_to_layout_box(ws, layout, box);
6113 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6114 text::close_layout_box(layout, box);
6115 }
6116 return 0;
6117}
6119 auto amount = trigger::read_float_from_payload(tval + 3);
6120 {
6121 auto box = text::open_layout_box(layout, indentation);
6123 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6124 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6125 text::add_space_to_layout_box(ws, layout, box);
6126 display_value(text::fp_percentage{ -amount }, true, ws, layout, box);
6127 text::close_layout_box(layout, box);
6128 }
6129 {
6130 auto box = text::open_layout_box(layout, indentation);
6132 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[2]).opt_id));
6133 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6134 text::add_space_to_layout_box(ws, layout, box);
6135 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6136 text::close_layout_box(layout, box);
6137 }
6138 return 0;
6139}
6141 auto amount = trigger::read_float_from_payload(tval + 3);
6142 {
6143 auto box = text::open_layout_box(layout, indentation);
6145 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6146 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6147 text::add_space_to_layout_box(ws, layout, box);
6148 display_value(text::fp_percentage{ -amount }, true, ws, layout, box);
6149 text::close_layout_box(layout, box);
6150 }
6151 {
6152 auto box = text::open_layout_box(layout, indentation);
6154 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[2]).opt_id));
6155 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6156 text::add_space_to_layout_box(ws, layout, box);
6157 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6158 text::close_layout_box(layout, box);
6159 }
6160 return 0;
6161}
6163 auto amount = trigger::read_float_from_payload(tval + 3);
6164 {
6165 auto box = text::open_layout_box(layout, indentation);
6167 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6168 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6169 text::add_space_to_layout_box(ws, layout, box);
6170 display_value(text::fp_percentage{ -amount }, true, ws, layout, box);
6171 text::close_layout_box(layout, box);
6172 }
6173 {
6174 auto box = text::open_layout_box(layout, indentation);
6176 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[2]).opt_id));
6177 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6178 text::add_space_to_layout_box(ws, layout, box);
6179 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6180 text::close_layout_box(layout, box);
6181 }
6182 return 0;
6183}
6185 float amount = float(trigger::payload(tval[2]).signed_value) / 100.0f;
6186 {
6187 auto box = text::open_layout_box(layout, indentation);
6189 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
6190 text::localised_format_box(ws, layout, box, "blank_loyalty", m);
6191 text::add_space_to_layout_box(ws, layout, box);
6192 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6193 text::close_layout_box(layout, box);
6194 }
6195 return 0;
6196}
6198 float amount = float(trigger::payload(tval[3]).signed_value) / 100.0f;
6199 {
6200 auto box = text::open_layout_box(layout, indentation);
6201 text::add_to_layout_box(ws, layout, box, trigger::payload(tval[1]).prov_id);
6202 text::close_layout_box(layout, box);
6203 }
6204 {
6205 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6207 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[2]).ideo_id));
6208 text::localised_format_box(ws, layout, box, "blank_loyalty", m);
6209 text::add_space_to_layout_box(ws, layout, box);
6210 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6211 text::close_layout_box(layout, box);
6212 }
6213 return 0;
6214}
6216 {
6217 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6219 text::localised_format_box(ws, layout, box, "railroad_in_capital_state", m);
6220 text::close_layout_box(layout, box);
6221 }
6222 return 0;
6223}
6225 {
6226 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6228 text::localised_format_box(ws, layout, box, "railroad_in_capital_state", m);
6229 text::close_layout_box(layout, box);
6230 }
6231 return 0;
6232}
6234 {
6235 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6237 text::localised_format_box(ws, layout, box, "railroad_in_capital", m);
6238 text::close_layout_box(layout, box);
6239 }
6240 return 0;
6241}
6243 {
6244 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6246 text::localised_format_box(ws, layout, box, "railroad_in_capital", m);
6247 text::close_layout_box(layout, box);
6248 }
6249 return 0;
6250}
6252 {
6253 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6255 text::localised_format_box(ws, layout, box, "fort_in_capital_state", m);
6256 text::close_layout_box(layout, box);
6257 }
6258 return 0;
6259}
6261 {
6262 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6264 text::localised_format_box(ws, layout, box, "fort_in_capital_state", m);
6265 text::close_layout_box(layout, box);
6266 }
6267 return 0;
6268}
6270 {
6271 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6273 text::localised_format_box(ws, layout, box, "fort_in_capital", m);
6274 text::close_layout_box(layout, box);
6275 }
6276 return 0;
6277}
6279 {
6280 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6282 text::localised_format_box(ws, layout, box, "fort_in_capital", m);
6283 text::close_layout_box(layout, box);
6284 }
6285 return 0;
6286}
6288 {
6289 auto box = text::open_layout_box(layout, indentation);
6291 add_to_map(ws, m, convert_this(ws, trigger::to_rebel(from_slot)), "from_nation", [](auto x) { return x; });
6292 text::localised_format_box(ws, layout, box, "relations_with", m);
6293 text::add_space_to_layout_box(ws, layout, box);
6294 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6295 text::close_layout_box(layout, box);
6296 }
6297 return 0;
6298}
6300 {
6301 auto box = text::open_layout_box(layout, indentation);
6303 text::add_to_substitution_map(m, text::variable_type::text, ws.world.technology_get_name(trigger::payload(tval[1]).tech_id));
6304 text::localised_format_box(ws, layout, box, "enable_blank", m);
6305 text::close_layout_box(layout, box);
6306 }
6307 return 0;
6308}
6310 {
6311 auto box = text::open_layout_box(layout, indentation);
6313 text::add_to_substitution_map(m, text::variable_type::text, ws.world.technology_get_name(trigger::payload(tval[1]).tech_id));
6314 text::localised_format_box(ws, layout, box, "disable_blank", m);
6315 text::close_layout_box(layout, box);
6316 }
6317 return 0;
6318}
6320 {
6321 auto box = text::open_layout_box(layout, indentation);
6323 text::add_to_substitution_map(m, text::variable_type::text, ws.world.invention_get_name(trigger::payload(tval[1]).invt_id));
6324 text::localised_format_box(ws, layout, box, "enable_blank", m);
6325 text::close_layout_box(layout, box);
6326 }
6327 return 0;
6328}
6330 {
6331 auto box = text::open_layout_box(layout, indentation);
6333 text::add_to_substitution_map(m, text::variable_type::text, ws.world.invention_get_name(trigger::payload(tval[1]).invt_id));
6334 text::localised_format_box(ws, layout, box, "disable_blank", m);
6335 text::close_layout_box(layout, box);
6336 }
6337 return 0;
6338}
6340 {
6341 auto box = text::open_layout_box(layout, indentation);
6344 ws.national_definitions.flag_variable_names[trigger::payload(tval[1]).natf_id]);
6345 text::localised_format_box(ws, layout, box, "o_set_national_flag", m);
6346 text::close_layout_box(layout, box);
6347 }
6348 return 0;
6349}
6351 auto box = text::open_layout_box(layout, indentation);
6353 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
6355 text::localised_format_box(ws, layout, box, "o_add_modifier_until", m);
6356 text::close_layout_box(layout, box);
6357 if(ws.user_settings.spoilers) {
6358 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
6359 }
6360 return 0;
6361}
6363 auto box = text::open_layout_box(layout, indentation);
6365 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
6366 text::localised_format_box(ws, layout, box, "o_add_modifier", m);
6367 text::close_layout_box(layout, box);
6368 if(ws.user_settings.spoilers) {
6369 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
6370 }
6371 return 0;
6372}
6374 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
6375 if(target) {
6376 auto box = text::open_layout_box(layout, indentation);
6379 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6380 text::add_space_to_layout_box(ws, layout, box);
6381 display_value(int64_t(trigger::payload(tval[2]).signed_value), true, ws, layout, box);
6382 text::close_layout_box(layout, box);
6383 }
6384 return 0;
6385}
6387 {
6388 auto box = text::open_layout_box(layout, indentation);
6390 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
6391 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6392 text::add_space_to_layout_box(ws, layout, box);
6393 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6394 text::close_layout_box(layout, box);
6395 }
6396 return 0;
6397}
6399 {
6400 auto box = text::open_layout_box(layout, indentation);
6402 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
6403 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6404 text::add_space_to_layout_box(ws, layout, box);
6405 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6406 text::close_layout_box(layout, box);
6407 }
6408 return 0;
6409}
6411 {
6412 auto box = text::open_layout_box(layout, indentation);
6414 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
6415 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6416 text::add_space_to_layout_box(ws, layout, box);
6417 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6418 text::close_layout_box(layout, box);
6419 }
6420 return 0;
6421}
6423 {
6424 auto box = text::open_layout_box(layout, indentation);
6426 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
6427 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6428 text::add_space_to_layout_box(ws, layout, box);
6429 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6430 text::close_layout_box(layout, box);
6431 }
6432 return 0;
6433}
6435 {
6436 auto box = text::open_layout_box(layout, indentation);
6438 add_to_map(ws, m, convert_this(ws, trigger::to_rebel(from_slot)), "from_nation", [](auto x) { return x; });
6439 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6440 text::add_space_to_layout_box(ws, layout, box);
6441 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6442 text::close_layout_box(layout, box);
6443 }
6444 return 0;
6445}
6447 auto amount = trigger::read_float_from_payload(tval + 1);
6448 {
6449 auto box = text::open_layout_box(layout, indentation);
6450 display_value(text::fp_currency{ amount }, true, ws, layout, box);
6452 text::localised_format_box(ws, layout, box, "o_add_to_treasury", m);
6453 text::close_layout_box(layout, box);
6454 }
6455 return 0;
6456}
6458 dcon::unit_name_id ename{ dcon::unit_name_id::value_base_t(trigger::read_int32_t_from_payload(tval + 1)) };
6459 auto esv = ws.to_string_view(ename);
6460 auto box = text::open_layout_box(layout, indentation);
6461 text::localised_format_box(ws, layout, box, "e_kill_leader");
6462 text::add_space_to_layout_box(ws, layout, box);
6463 text::add_to_layout_box(ws, layout, box, esv);
6464 text::close_layout_box(layout, box);
6465 return 0;
6466}
6467
6468//
6469// Banks
6470//
6472 {
6473 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6475 text::localised_format_box(ws, layout, box, "bank_in_capital_state", m);
6476 text::close_layout_box(layout, box);
6477 }
6478 return 0;
6479}
6481 {
6482 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6484 text::localised_format_box(ws, layout, box, "bank_in_capital_state", m);
6485 text::close_layout_box(layout, box);
6486 }
6487 return 0;
6488}
6490 {
6491 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6493 text::localised_format_box(ws, layout, box, "bank_in_capital", m);
6494 text::close_layout_box(layout, box);
6495 }
6496 return 0;
6497}
6499 {
6500 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6502 text::localised_format_box(ws, layout, box, "bank_in_capital", m);
6503 text::close_layout_box(layout, box);
6504 }
6505 return 0;
6506}
6507
6508//
6509// Universities
6510//
6512 {
6513 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6515 text::localised_format_box(ws, layout, box, "university_in_capital_state", m);
6516 text::close_layout_box(layout, box);
6517 }
6518 return 0;
6519}
6521 {
6522 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6524 text::localised_format_box(ws, layout, box, "university_in_capital_state", m);
6525 text::close_layout_box(layout, box);
6526 }
6527 return 0;
6528}
6530 {
6531 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6533 text::localised_format_box(ws, layout, box, "university_in_capital", m);
6534 text::close_layout_box(layout, box);
6535 }
6536 return 0;
6537}
6539 {
6540 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6542 text::localised_format_box(ws, layout, box, "university_in_capital", m);
6543 text::close_layout_box(layout, box);
6544 }
6545 return 0;
6546}
6547
6550 auto amount = trigger::payload(tval[1]).signed_value;
6551 {
6552 auto box = text::open_layout_box(layout, indentation);
6555 text::add_space_to_layout_box(ws, layout, box);
6556 display_value(int64_t(amount), true, ws, layout, box);
6557 text::close_layout_box(layout, box);
6558 }
6559 return 0;
6560}
6563 auto amount = trigger::payload(tval[1]).signed_value;
6564 {
6565 auto box = text::open_layout_box(layout, indentation);
6568 text::add_space_to_layout_box(ws, layout, box);
6569 display_value(int64_t(amount), true, ws, layout, box);
6570 text::close_layout_box(layout, box);
6571 }
6572 return 0;
6573}
6574
6576 text::add_line(ws, layout, text::produce_simple_string(ws, "e_annex_null"));
6577 return 0;
6578}
6579
6581 if(ws.user_settings.spoilers) {
6582 for(uint32_t i = 0; i < 2; i++) {
6583 auto box = text::open_layout_box(layout, indentation);
6585 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6586 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6587 text::close_layout_box(layout, box);
6588 }
6589 }
6590 return 0;
6591}
6593 if(ws.user_settings.spoilers) {
6594 for(uint32_t i = 0; i < 3; i++) {
6595 auto box = text::open_layout_box(layout, indentation);
6597 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6598 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6599 text::close_layout_box(layout, box);
6600 }
6601 }
6602 return 0;
6603}
6605 if(ws.user_settings.spoilers) {
6606 for(uint32_t i = 0; i < 4; i++) {
6607 auto box = text::open_layout_box(layout, indentation);
6609 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6610 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6611 text::close_layout_box(layout, box);
6612 }
6613 }
6614 return 0;
6615}
6617 if(ws.user_settings.spoilers) {
6618 for(uint32_t i = 0; i < 5; i++) {
6619 auto box = text::open_layout_box(layout, indentation);
6621 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6622 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6623 text::close_layout_box(layout, box);
6624 }
6625 }
6626 return 0;
6627}
6629 if(ws.user_settings.spoilers) {
6630 for(uint32_t i = 0; i < 6; i++) {
6631 auto box = text::open_layout_box(layout, indentation);
6633 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6634 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6635 text::close_layout_box(layout, box);
6636 }
6637 }
6638 return 0;
6639}
6641 if(ws.user_settings.spoilers) {
6642 for(uint32_t i = 0; i < 7; i++) {
6643 auto box = text::open_layout_box(layout, indentation);
6645 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6646 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6647 text::close_layout_box(layout, box);
6648 }
6649 }
6650 return 0;
6651}
6653 if(ws.user_settings.spoilers) {
6654 for(uint32_t i = 0; i < 8; i++) {
6655 auto box = text::open_layout_box(layout, indentation);
6657 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6658 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6659 text::close_layout_box(layout, box);
6660 }
6661 }
6662 return 0;
6663}
6665 if(ws.user_settings.spoilers) {
6666 for(uint32_t i = 0; i < 9; i++) {
6667 auto box = text::open_layout_box(layout, indentation);
6669 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6670 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6671 text::close_layout_box(layout, box);
6672 }
6673 }
6674 return 0;
6675}
6677 if(ws.user_settings.spoilers) {
6678 for(uint32_t i = 0; i < 10; i++) {
6679 auto box = text::open_layout_box(layout, indentation);
6681 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6682 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6683 text::close_layout_box(layout, box);
6684 }
6685 }
6686 return 0;
6687}
6689 if(ws.user_settings.spoilers) {
6690 for(uint32_t i = 0; i < 11; i++) {
6691 auto box = text::open_layout_box(layout, indentation);
6693 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6694 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6695 text::close_layout_box(layout, box);
6696 }
6697 }
6698 return 0;
6699}
6701 if(ws.user_settings.spoilers) {
6702 for(uint32_t i = 0; i < 11; i++) {
6703 auto box = text::open_layout_box(layout, indentation);
6705 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6706 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6707 text::close_layout_box(layout, box);
6708 }
6709 }
6710 return 0;
6711}
6713 auto p = trigger::payload(tval[3]).prov_id;
6714 auto box = text::open_layout_box(layout, indentation);
6715 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.province_get_name(p)));
6716 text::add_space_to_layout_box(ws, layout, box);
6718 dcon::text_key name{ dcon::text_key::value_base_t(trigger::read_int32_t_from_payload(tval + 1)) };
6720 text::localised_format_box(ws, layout, box, "change_name_to", m);
6721 text::close_layout_box(layout, box);
6722 return 0;
6723}
6725 auto box = text::open_layout_box(layout, indentation);
6727 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
6728 text::localised_format_box(ws, layout, box, "ett_change_pop_terrain_to", m);
6729 text::close_layout_box(layout, box);
6730 if(ws.user_settings.spoilers) {
6731 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
6732 }
6733 return 0;
6734}
6736 auto box = text::open_layout_box(layout, indentation);
6738 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
6739 text::localised_format_box(ws, layout, box, "ett_change_province_terrain_to", m);
6740 text::close_layout_box(layout, box);
6741 if(ws.user_settings.spoilers) {
6742 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
6743 }
6744 return 0;
6745}
6747 auto box = text::open_layout_box(layout, indentation);
6748 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "masquerade_as_nation"));
6749 text::add_space_to_layout_box(ws, layout, box);
6750 text::add_to_layout_box(ws, layout, box, text::get_name(ws, trigger::to_nation(this_slot)));
6751 text::close_layout_box(layout, box);
6752 return 0;
6753}
6755 auto box = text::open_layout_box(layout, indentation);
6756 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "masquerade_as_nation"));
6757 text::add_space_to_layout_box(ws, layout, box);
6758 text::add_to_layout_box(ws, layout, box, text::get_name(ws, trigger::to_nation(from_slot)));
6759 text::close_layout_box(layout, box);
6760 return 0;
6761}
6762
6764 auto ideology = trigger::payload(tval[1]).ideo_id;
6765 dcon::text_key new_name{ dcon::text_key::value_base_t(trigger::read_int32_t_from_payload(tval + 2)) };
6766
6767 if(ideology) {
6768 auto id_name = ws.world.ideology_get_name(ideology);
6769
6770 auto box = text::open_layout_box(layout, indentation);
6774 text::localised_format_box(ws, layout, box, "change_pname_to", m);
6775 text::close_layout_box(layout, box);
6776 return 0;
6777 } else {
6778 auto box = text::open_layout_box(layout, indentation);
6781 text::localised_format_box(ws, layout, box, "change_rpname_to", m);
6782 text::close_layout_box(layout, box);
6783 return 0;
6784 }
6785}
6786
6788 auto ideology = trigger::payload(tval[1]).ideo_id;
6789 dcon::issue_option_id new_opt = trigger::payload(tval[2]).opt_id;
6790 auto opt_name = ws.world.issue_option_get_name(new_opt);
6791
6792 if(ideology) {
6793 auto id_name = ws.world.ideology_get_name(ideology);
6794
6795 auto box = text::open_layout_box(layout, indentation);
6799 text::localised_format_box(ws, layout, box, "change_pposition_to", m);
6800 text::close_layout_box(layout, box);
6801 return 0;
6802 } else {
6803 auto box = text::open_layout_box(layout, indentation);
6806 text::localised_format_box(ws, layout, box, "change_rpposition_to", m);
6807 text::close_layout_box(layout, box);
6808 return 0;
6809 }
6810}
6811
6813 ef_none,
6814 ef_capital, // constexpr inline uint16_t capital = 0x0001;
6815 ef_add_core_tag, // constexpr inline uint16_t add_core_tag = 0x0002;
6816 ef_add_core_int, // constexpr inline uint16_t add_core_int = 0x0003;
6817 ef_add_core_this_nation, // constexpr inline uint16_t add_core_this_nation = 0x0004;
6818 ef_add_core_this_province, // constexpr inline uint16_t add_core_this_province = 0x0005;
6819 ef_add_core_this_state, // constexpr inline uint16_t add_core_this_state = 0x0006;
6820 ef_add_core_this_pop, // constexpr inline uint16_t add_core_this_pop = 0x0007;
6821 ef_add_core_from_province, // constexpr inline uint16_t add_core_from_province = 0x0008;
6822 ef_add_core_from_nation, // constexpr inline uint16_t add_core_from_nation = 0x0009;
6823 ef_add_core_reb, // constexpr inline uint16_t add_core_reb = 0x000A;
6824 ef_remove_core_tag, // constexpr inline uint16_t remove_core_tag = 0x000B;
6825 ef_remove_core_int, // constexpr inline uint16_t remove_core_int = 0x000C;
6826 ef_remove_core_this_nation, // constexpr inline uint16_t remove_core_this_nation = 0x000D;
6827 ef_remove_core_this_province, // constexpr inline uint16_t remove_core_this_province = 0x000E;
6828 ef_remove_core_this_state, // constexpr inline uint16_t remove_core_this_state = 0x000F;
6829 ef_remove_core_this_pop, // constexpr inline uint16_t remove_core_this_pop = 0x0010;
6830 ef_remove_core_from_province, // constexpr inline uint16_t remove_core_from_province = 0x0011;
6831 ef_remove_core_from_nation, // constexpr inline uint16_t remove_core_from_nation = 0x0012;
6832 ef_remove_core_reb, // constexpr inline uint16_t remove_core_reb = 0x0013;
6833 ef_change_region_name_state, // constexpr inline uint16_t change_region_name_state = 0x0014;
6834 ef_change_region_name_province, // constexpr inline uint16_t change_region_name_province = 0x0015;
6835 ef_trade_goods, // constexpr inline uint16_t trade_goods = 0x0016;
6836 ef_add_accepted_culture, // constexpr inline uint16_t add_accepted_culture = 0x0017;
6837 ef_add_accepted_culture_union, // constexpr inline uint16_t add_accepted_culture_union = 0x0018;
6838 ef_primary_culture, // constexpr inline uint16_t primary_culture = 0x0019;
6839 ef_primary_culture_this_nation, // constexpr inline uint16_t primary_culture_this_nation = 0x001A;
6840 ef_primary_culture_this_state, // constexpr inline uint16_t primary_culture_this_state = 0x001B;
6841 ef_primary_culture_this_province, // constexpr inline uint16_t primary_culture_this_province = 0x001C;
6842 ef_primary_culture_this_pop, // constexpr inline uint16_t primary_culture_this_pop = 0x001D;
6843 ef_primary_culture_from_nation, // constexpr inline uint16_t primary_culture_from_nation = 0x001E;
6844 ef_remove_accepted_culture, // constexpr inline uint16_t remove_accepted_culture = 0x001F;
6845 ef_life_rating, // constexpr inline uint16_t life_rating = 0x0020;
6846 ef_religion, // constexpr inline uint16_t religion = 0x0021;
6847 ef_is_slave_state_yes, // constexpr inline uint16_t is_slave_state_yes = 0x0022;
6848 ef_is_slave_pop_yes, // constexpr inline uint16_t is_slave_pop_yes = 0x0023;
6849 ef_research_points, // constexpr inline uint16_t research_points = 0x0024;
6850 ef_tech_school, // constexpr inline uint16_t tech_school = 0x0025;
6851 ef_government, // constexpr inline uint16_t government = 0x0026;
6852 ef_government_reb, // constexpr inline uint16_t government_reb = 0x0027;
6853 ef_treasury, // constexpr inline uint16_t treasury = 0x0028;
6854 ef_war_exhaustion, // constexpr inline uint16_t war_exhaustion = 0x0029;
6855 ef_prestige, // constexpr inline uint16_t prestige = 0x002A;
6856 ef_change_tag, // constexpr inline uint16_t change_tag = 0x002B;
6857 ef_change_tag_culture, // constexpr inline uint16_t change_tag_culture = 0x002C;
6858 ef_change_tag_no_core_switch, // constexpr inline uint16_t change_tag_no_core_switch = 0x002D;
6859 ef_change_tag_no_core_switch_culture, // constexpr inline uint16_t change_tag_no_core_switch_culture = 0x002E;
6860 ef_set_country_flag, // constexpr inline uint16_t set_country_flag = 0x002F;
6861 ef_clr_country_flag, // constexpr inline uint16_t clr_country_flag = 0x0030;
6862 ef_military_access, // constexpr inline uint16_t military_access = 0x0031;
6863 ef_military_access_this_nation, // constexpr inline uint16_t military_access_this_nation = 0x0032;
6864 ef_military_access_this_province, // constexpr inline uint16_t military_access_this_province = 0x0033;
6865 ef_military_access_from_nation, // constexpr inline uint16_t military_access_from_nation = 0x0034;
6866 ef_military_access_from_province, // constexpr inline uint16_t military_access_from_province = 0x0035;
6867 ef_badboy, // constexpr inline uint16_t badboy = 0x0036;
6868 ef_secede_province, // constexpr inline uint16_t secede_province = 0x0037;
6869 ef_secede_province_this_nation, // constexpr inline uint16_t secede_province_this_nation = 0x0038;
6870 ef_secede_province_this_state, // constexpr inline uint16_t secede_province_this_state = 0x0039;
6871 ef_secede_province_this_province, // constexpr inline uint16_t secede_province_this_province = 0x003A;
6872 ef_secede_province_this_pop, // constexpr inline uint16_t secede_province_this_pop = 0x003B;
6873 ef_secede_province_from_nation, // constexpr inline uint16_t secede_province_from_nation = 0x003C;
6874 ef_secede_province_from_province, // constexpr inline uint16_t secede_province_from_province = 0x003D;
6875 ef_secede_province_reb, // constexpr inline uint16_t secede_province_reb = 0x003E;
6876 ef_inherit, // constexpr inline uint16_t inherit = 0x003F;
6877 ef_inherit_this_nation, // constexpr inline uint16_t inherit_this_nation = 0x0040;
6878 ef_inherit_this_state, // constexpr inline uint16_t inherit_this_state = 0x0041;
6879 ef_inherit_this_province, // constexpr inline uint16_t inherit_this_province = 0x0042;
6880 ef_inherit_this_pop, // constexpr inline uint16_t inherit_this_pop = 0x0043;
6881 ef_inherit_from_nation, // constexpr inline uint16_t inherit_from_nation = 0x0044;
6882 ef_inherit_from_province, // constexpr inline uint16_t inherit_from_province = 0x0045;
6883 ef_annex_to, // constexpr inline uint16_t annex_to = 0x0046;
6884 ef_annex_to_this_nation, // constexpr inline uint16_t annex_to_this_nation = 0x0047;
6885 ef_annex_to_this_state, // constexpr inline uint16_t annex_to_this_state = 0x0048;
6886 ef_annex_to_this_province, // constexpr inline uint16_t annex_to_this_province = 0x0049;
6887 ef_annex_to_this_pop, // constexpr inline uint16_t annex_to_this_pop = 0x004A;
6888 ef_annex_to_from_nation, // constexpr inline uint16_t annex_to_from_nation = 0x004B;
6889 ef_annex_to_from_province, // constexpr inline uint16_t annex_to_from_province = 0x004C;
6890 ef_release, // constexpr inline uint16_t release = 0x004D;
6891 ef_release_this_nation, // constexpr inline uint16_t release_this_nation = 0x004E;
6892 ef_release_this_state, // constexpr inline uint16_t release_this_state = 0x004F;
6893 ef_release_this_province, // constexpr inline uint16_t release_this_province = 0x0050;
6894 ef_release_this_pop, // constexpr inline uint16_t release_this_pop = 0x0051;
6895 ef_release_from_nation, // constexpr inline uint16_t release_from_nation = 0x0052;
6896 ef_release_from_province, // constexpr inline uint16_t release_from_province = 0x0053;
6897 ef_change_controller, // constexpr inline uint16_t change_controller = 0x0054;
6898 ef_change_controller_this_nation, // constexpr inline uint16_t change_controller_this_nation = 0x0055;
6899 ef_change_controller_this_province, // constexpr inline uint16_t change_controller_this_province = 0x0056;
6900 ef_change_controller_from_nation, // constexpr inline uint16_t change_controller_from_nation = 0x0057;
6901 ef_change_controller_from_province, // constexpr inline uint16_t change_controller_from_province = 0x0058;
6902 ef_infrastructure, // constexpr inline uint16_t infrastructure = 0x0059;
6903 ef_money, // constexpr inline uint16_t money = 0x005A;
6904 ef_leadership, // constexpr inline uint16_t leadership = 0x005B;
6905 ef_create_vassal, // constexpr inline uint16_t create_vassal = 0x005C;
6906 ef_create_vassal_this_nation, // constexpr inline uint16_t create_vassal_this_nation = 0x005D;
6907 ef_create_vassal_this_province, // constexpr inline uint16_t create_vassal_this_province = 0x005E;
6908 ef_create_vassal_from_nation, // constexpr inline uint16_t create_vassal_from_nation = 0x005F;
6909 ef_create_vassal_from_province, // constexpr inline uint16_t create_vassal_from_province = 0x0060;
6910 ef_end_military_access, // constexpr inline uint16_t end_military_access = 0x0061;
6911 ef_end_military_access_this_nation, // constexpr inline uint16_t end_military_access_this_nation = 0x0062;
6912 ef_end_military_access_this_province, // constexpr inline uint16_t end_military_access_this_province = 0x0063;
6913 ef_end_military_access_from_nation, // constexpr inline uint16_t end_military_access_from_nation = 0x0064;
6914 ef_end_military_access_from_province, // constexpr inline uint16_t end_military_access_from_province = 0x0065;
6915 ef_leave_alliance, // constexpr inline uint16_t leave_alliance = 0x0066;
6916 ef_leave_alliance_this_nation, // constexpr inline uint16_t leave_alliance_this_nation = 0x0067;
6917 ef_leave_alliance_this_province, // constexpr inline uint16_t leave_alliance_this_province = 0x0068;
6918 ef_leave_alliance_from_nation, // constexpr inline uint16_t leave_alliance_from_nation = 0x0069;
6919 ef_leave_alliance_from_province, // constexpr inline uint16_t leave_alliance_from_province = 0x006A;
6920 ef_end_war, // constexpr inline uint16_t end_war = 0x006B;
6921 ef_end_war_this_nation, // constexpr inline uint16_t end_war_this_nation = 0x006C;
6922 ef_end_war_this_province, // constexpr inline uint16_t end_war_this_province = 0x006D;
6923 ef_end_war_from_nation, // constexpr inline uint16_t end_war_from_nation = 0x006E;
6924 ef_end_war_from_province, // constexpr inline uint16_t end_war_from_province = 0x006F;
6925 ef_enable_ideology, // constexpr inline uint16_t enable_ideology = 0x0070;
6926 ef_ruling_party_ideology, // constexpr inline uint16_t ruling_party_ideology = 0x0071;
6927 ef_plurality, // constexpr inline uint16_t plurality = 0x0072;
6928 ef_remove_province_modifier, // constexpr inline uint16_t remove_province_modifier = 0x0073;
6929 ef_remove_country_modifier, // constexpr inline uint16_t remove_country_modifier = 0x0074;
6930 ef_create_alliance, // constexpr inline uint16_t create_alliance = 0x0075;
6931 ef_create_alliance_this_nation, // constexpr inline uint16_t create_alliance_this_nation = 0x0076;
6932 ef_create_alliance_this_province, // constexpr inline uint16_t create_alliance_this_province = 0x0077;
6933 ef_create_alliance_from_nation, // constexpr inline uint16_t create_alliance_from_nation = 0x0078;
6934 ef_create_alliance_from_province, // constexpr inline uint16_t create_alliance_from_province = 0x0079;
6935 ef_release_vassal, // constexpr inline uint16_t release_vassal = 0x007A;
6936 ef_release_vassal_this_nation, // constexpr inline uint16_t release_vassal_this_nation = 0x007B;
6937 ef_release_vassal_this_province, // constexpr inline uint16_t release_vassal_this_province = 0x007C;
6938 ef_release_vassal_from_nation, // constexpr inline uint16_t release_vassal_from_nation = 0x007D;
6939 ef_release_vassal_from_province, // constexpr inline uint16_t release_vassal_from_province = 0x007E;
6940 ef_release_vassal_reb, // constexpr inline uint16_t release_vassal_reb = 0x007F;
6941 ef_release_vassal_random, // constexpr inline uint16_t release_vassal_random = 0x0080;
6942 ef_change_province_name, // constexpr inline uint16_t change_province_name = 0x0081;
6943 ef_enable_canal, // constexpr inline uint16_t enable_canal = 0x0082;
6944 ef_set_global_flag, // constexpr inline uint16_t set_global_flag = 0x0083;
6945 ef_clr_global_flag, // constexpr inline uint16_t clr_global_flag = 0x0084;
6946 ef_nationalvalue_province, // constexpr inline uint16_t nationalvalue_province = 0x0085;
6947 ef_nationalvalue_nation, // constexpr inline uint16_t nationalvalue_nation = 0x0086;
6948 ef_civilized_yes, // constexpr inline uint16_t civilized_yes = 0x0087;
6949 ef_civilized_no, // constexpr inline uint16_t civilized_no = 0x0088;
6950 ef_is_slave_state_no, // constexpr inline uint16_t is_slave_state_no = 0x0089;
6951 ef_is_slave_pop_no, // constexpr inline uint16_t is_slave_pop_no = 0x008A;
6952 ef_election, // constexpr inline uint16_t election = 0x008B;
6953 ef_social_reform, // constexpr inline uint16_t social_reform = 0x008C;
6954 ef_political_reform, // constexpr inline uint16_t political_reform = 0x008D;
6955 ef_add_tax_relative_income, // constexpr inline uint16_t add_tax_relative_income = 0x008E;
6956 ef_neutrality, // constexpr inline uint16_t neutrality = 0x008F;
6957 ef_reduce_pop, // constexpr inline uint16_t reduce_pop = 0x0090;
6958 ef_move_pop, // constexpr inline uint16_t move_pop = 0x0091;
6959 ef_pop_type, // constexpr inline uint16_t pop_type = 0x0092;
6960 ef_years_of_research, // constexpr inline uint16_t years_of_research = 0x0093;
6961 ef_prestige_factor_positive, // constexpr inline uint16_t prestige_factor_positive = 0x0094;
6962 ef_prestige_factor_negative, // constexpr inline uint16_t prestige_factor_negative = 0x0095;
6963 ef_military_reform, // constexpr inline uint16_t military_reform = 0x0096;
6964 ef_economic_reform, // constexpr inline uint16_t economic_reform = 0x0097;
6965 ef_remove_random_military_reforms, // constexpr inline uint16_t remove_random_military_reforms = 0x0098;
6966 ef_remove_random_economic_reforms, // constexpr inline uint16_t remove_random_economic_reforms = 0x0099;
6967 ef_add_crime, // constexpr inline uint16_t add_crime = 0x009A;
6968 ef_add_crime_none, // constexpr inline uint16_t add_crime_none = 0x009B;
6969 ef_nationalize, // constexpr inline uint16_t nationalize = 0x009C;
6970 ef_build_factory_in_capital_state, // constexpr inline uint16_t build_factory_in_capital_state = 0x009D;
6971 ef_activate_technology, // constexpr inline uint16_t activate_technology = 0x009E;
6972 ef_great_wars_enabled_yes, // constexpr inline uint16_t great_wars_enabled_yes = 0x009F;
6973 ef_great_wars_enabled_no, // constexpr inline uint16_t great_wars_enabled_no = 0x00A0;
6974 ef_world_wars_enabled_yes, // constexpr inline uint16_t world_wars_enabled_yes = 0x00A1;
6975 ef_world_wars_enabled_no, // constexpr inline uint16_t world_wars_enabled_no = 0x00A2;
6976 ef_assimilate_province, // constexpr inline uint16_t assimilate_province = 0x00A3;
6977 ef_assimilate_pop, // constexpr inline uint16_t assimilate_pop = 0x00A4;
6978 ef_literacy, // constexpr inline uint16_t literacy = 0x00A5;
6979 ef_add_crisis_interest, // constexpr inline uint16_t add_crisis_interest = 0x00A6;
6980 ef_flashpoint_tension, // constexpr inline uint16_t flashpoint_tension = 0x00A7;
6981 ef_add_crisis_temperature, // constexpr inline uint16_t add_crisis_temperature = 0x00A8;
6982 ef_consciousness, // constexpr inline uint16_t consciousness = 0x00A9;
6983 ef_militancy, // constexpr inline uint16_t militancy = 0x00AA;
6984 ef_rgo_size, // constexpr inline uint16_t rgo_size = 0x00AB;
6985 ef_fort, // constexpr inline uint16_t fort = 0x00AC;
6986 ef_naval_base, // constexpr inline uint16_t naval_base = 0x00AD;
6987 ef_trigger_revolt_nation, // constexpr inline uint16_t trigger_revolt_nation = 0x00AE;
6988 ef_trigger_revolt_state, // constexpr inline uint16_t trigger_revolt_state = 0x00AF;
6989 ef_trigger_revolt_province, // constexpr inline uint16_t trigger_revolt_province = 0x00B0;
6990 ef_diplomatic_influence, // constexpr inline uint16_t diplomatic_influence = 0x00B1;
6991 ef_diplomatic_influence_this_nation, // constexpr inline uint16_t diplomatic_influence_this_nation = 0x00B2;
6992 ef_diplomatic_influence_this_province, // constexpr inline uint16_t diplomatic_influence_this_province = 0x00B3;
6993 ef_diplomatic_influence_from_nation, // constexpr inline uint16_t diplomatic_influence_from_nation = 0x00B4;
6994 ef_diplomatic_influence_from_province, // constexpr inline uint16_t diplomatic_influence_from_province = 0x00B5;
6995 ef_relation, // constexpr inline uint16_t relation = 0x00B6;
6996 ef_relation_this_nation, // constexpr inline uint16_t relation_this_nation = 0x00B7;
6997 ef_relation_this_province, // constexpr inline uint16_t relation_this_province = 0x00B8;
6998 ef_relation_from_nation, // constexpr inline uint16_t relation_from_nation = 0x00B9;
6999 ef_relation_from_province, // constexpr inline uint16_t relation_from_province = 0x00BA;
7000 ef_add_province_modifier, // constexpr inline uint16_t add_province_modifier = 0x00BB;
7001 ef_add_province_modifier_no_duration, // constexpr inline uint16_t add_province_modifier_no_duration = 0x00BC;
7002 ef_add_country_modifier, // constexpr inline uint16_t add_country_modifier = 0x00BD;
7003 ef_add_country_modifier_no_duration, // constexpr inline uint16_t add_country_modifier_no_duration = 0x00BE;
7004 ef_casus_belli_tag, // constexpr inline uint16_t casus_belli_tag = 0x00BF;
7005 ef_casus_belli_int, // constexpr inline uint16_t casus_belli_int = 0x00C0;
7006 ef_casus_belli_this_nation, // constexpr inline uint16_t casus_belli_this_nation = 0x00C1;
7007 ef_casus_belli_this_state, // constexpr inline uint16_t casus_belli_this_state = 0x00C2;
7008 ef_casus_belli_this_province, // constexpr inline uint16_t casus_belli_this_province = 0x00C3;
7009 ef_casus_belli_this_pop, // constexpr inline uint16_t casus_belli_this_pop = 0x00C4;
7010 ef_casus_belli_from_nation, // constexpr inline uint16_t casus_belli_from_nation = 0x00C5;
7011 ef_casus_belli_from_province, // constexpr inline uint16_t casus_belli_from_province = 0x00C6;
7012 ef_add_casus_belli_tag, // constexpr inline uint16_t add_casus_belli_tag = 0x00C7;
7013 ef_add_casus_belli_int, // constexpr inline uint16_t add_casus_belli_int = 0x00C8;
7014 ef_add_casus_belli_this_nation, // constexpr inline uint16_t add_casus_belli_this_nation = 0x00C9;
7015 ef_add_casus_belli_this_state, // constexpr inline uint16_t add_casus_belli_this_state = 0x00CA;
7016 ef_add_casus_belli_this_province, // constexpr inline uint16_t add_casus_belli_this_province = 0x00CB;
7017 ef_add_casus_belli_this_pop, // constexpr inline uint16_t add_casus_belli_this_pop = 0x00CC;
7018 ef_add_casus_belli_from_nation, // constexpr inline uint16_t add_casus_belli_from_nation = 0x00CD;
7019 ef_add_casus_belli_from_province, // constexpr inline uint16_t add_casus_belli_from_province = 0x00CE;
7020 ef_remove_casus_belli_tag, // constexpr inline uint16_t remove_casus_belli_tag = 0x00CF;
7021 ef_remove_casus_belli_int, // constexpr inline uint16_t remove_casus_belli_int = 0x00D0;
7022 ef_remove_casus_belli_this_nation, // constexpr inline uint16_t remove_casus_belli_this_nation = 0x00D1;
7023 ef_remove_casus_belli_this_state, // constexpr inline uint16_t remove_casus_belli_this_state = 0x00D2;
7024 ef_remove_casus_belli_this_province, // constexpr inline uint16_t remove_casus_belli_this_province = 0x00D3;
7025 ef_remove_casus_belli_this_pop, // constexpr inline uint16_t remove_casus_belli_this_pop = 0x00D4;
7026 ef_remove_casus_belli_from_nation, // constexpr inline uint16_t remove_casus_belli_from_nation = 0x00D5;
7027 ef_remove_casus_belli_from_province, // constexpr inline uint16_t remove_casus_belli_from_province = 0x00D6;
7028 ef_this_remove_casus_belli_tag, // constexpr inline uint16_t this_remove_casus_belli_tag = 0x00D7;
7029 ef_this_remove_casus_belli_int, // constexpr inline uint16_t this_remove_casus_belli_int = 0x00D8;
7030 ef_this_remove_casus_belli_this_nation, // constexpr inline uint16_t this_remove_casus_belli_this_nation = 0x00D9;
7031 ef_this_remove_casus_belli_this_state, // constexpr inline uint16_t this_remove_casus_belli_this_state = 0x00DA;
7032 ef_this_remove_casus_belli_this_province, // constexpr inline uint16_t this_remove_casus_belli_this_province = 0x00DB;
7033 ef_this_remove_casus_belli_this_pop, // constexpr inline uint16_t this_remove_casus_belli_this_pop = 0x00DC;
7034 ef_this_remove_casus_belli_from_nation, // constexpr inline uint16_t this_remove_casus_belli_from_nation = 0x00DD;
7035 ef_this_remove_casus_belli_from_province, // constexpr inline uint16_t this_remove_casus_belli_from_province = 0x00DE;
7036 ef_war_tag, // constexpr inline uint16_t war_tag = 0x00DF;
7037 ef_war_this_nation, // constexpr inline uint16_t war_this_nation = 0x00E0;
7038 ef_war_this_state, // constexpr inline uint16_t war_this_state = 0x00E1;
7039 ef_war_this_province, // constexpr inline uint16_t war_this_province = 0x00E2;
7040 ef_war_this_pop, // constexpr inline uint16_t war_this_pop = 0x00E3;
7041 ef_war_from_nation, // constexpr inline uint16_t war_from_nation = 0x00E4;
7042 ef_war_from_province, // constexpr inline uint16_t war_from_province = 0x00E5;
7043 ef_war_no_ally_tag, // constexpr inline uint16_t war_no_ally_tag = 0x00E6;
7044 ef_war_no_ally_this_nation, // constexpr inline uint16_t war_no_ally_this_nation = 0x00E7;
7045 ef_war_no_ally_this_state, // constexpr inline uint16_t war_no_ally_this_state = 0x00E8;
7046 ef_war_no_ally_this_province, // constexpr inline uint16_t war_no_ally_this_province = 0x00E9;
7047 ef_war_no_ally_this_pop, // constexpr inline uint16_t war_no_ally_this_pop = 0x00EA;
7048 ef_war_no_ally_from_nation, // constexpr inline uint16_t war_no_ally_from_nation = 0x00EB;
7049 ef_war_no_ally_from_province, // constexpr inline uint16_t war_no_ally_from_province = 0x00EC;
7050 ef_country_event_this_nation, // constexpr inline uint16_t country_event_this_nation = 0x00ED;
7051 ef_country_event_immediate_this_nation, // constexpr inline uint16_t country_event_immediate_this_nation = 0x00EE;
7052 ef_province_event_this_nation, // constexpr inline uint16_t province_event_this_nation = 0x00EF;
7053 ef_province_event_immediate_this_nation, // constexpr inline uint16_t province_event_immediate_this_nation = 0x00F0;
7054 ef_sub_unit_int, // constexpr inline uint16_t sub_unit_int = 0x00F1;
7055 ef_sub_unit_this, // constexpr inline uint16_t sub_unit_this = 0x00F2;
7056 ef_sub_unit_from, // constexpr inline uint16_t sub_unit_from = 0x00F3;
7057 ef_sub_unit_current, // constexpr inline uint16_t sub_unit_current = 0x00F4;
7058 ef_set_variable, // constexpr inline uint16_t set_variable = 0x00F5;
7059 ef_change_variable, // constexpr inline uint16_t change_variable = 0x00F6;
7060 ef_ideology, // constexpr inline uint16_t ideology = 0x00F7;
7061 ef_upper_house, // constexpr inline uint16_t upper_house = 0x00F8;
7062 ef_scaled_militancy_issue, // constexpr inline uint16_t scaled_militancy_issue = 0x00F9;
7063 ef_scaled_militancy_ideology, // constexpr inline uint16_t scaled_militancy_ideology = 0x00FA;
7064 ef_scaled_militancy_unemployment, // constexpr inline uint16_t scaled_militancy_unemployment = 0x00FB;
7065 ef_scaled_consciousness_issue, // constexpr inline uint16_t scaled_consciousness_issue = 0x00FC;
7066 ef_scaled_consciousness_ideology, // constexpr inline uint16_t scaled_consciousness_ideology = 0x00FD;
7067 ef_scaled_consciousness_unemployment, // constexpr inline uint16_t scaled_consciousness_unemployment = 0x00FE;
7068 ef_define_general, // constexpr inline uint16_t define_general = 0x00FF;
7069 ef_define_admiral, // constexpr inline uint16_t define_admiral = 0x0100;
7070 ef_dominant_issue, // constexpr inline uint16_t dominant_issue = 0x0101;
7071 ef_add_war_goal, // constexpr inline uint16_t add_war_goal = 0x0102;
7072 ef_move_issue_percentage_nation, // constexpr inline uint16_t move_issue_percentage_nation = 0x0103;
7073 ef_move_issue_percentage_state, // constexpr inline uint16_t move_issue_percentage_state = 0x0104;
7074 ef_move_issue_percentage_province, // constexpr inline uint16_t move_issue_percentage_province = 0x0105;
7075 ef_move_issue_percentage_pop, // constexpr inline uint16_t move_issue_percentage_pop = 0x0106;
7076 ef_party_loyalty, // constexpr inline uint16_t party_loyalty = 0x0107;
7077 ef_party_loyalty_province, // constexpr inline uint16_t party_loyalty_province = 0x0108;
7078 ef_variable_tech_name_no, // constexpr inline uint16_t variable_tech_name_no = 0x0109;
7079 ef_variable_invention_name_yes, // constexpr inline uint16_t variable_invention_name_yes = 0x010A;
7080 ef_build_railway_in_capital_yes_whole_state_yes_limit, // constexpr inline uint16_t build_railway_in_capital_yes_whole_state_yes_limit = 0x010B;
7081ef_build_railway_in_capital_yes_whole_state_no_limit, // constexpr inline uint16_t build_railway_in_capital_yes_whole_state_no_limit = 0x010C;
7082ef_build_railway_in_capital_no_whole_state_yes_limit, // constexpr inline uint16_t build_railway_in_capital_no_whole_state_yes_limit = 0x010D;
7083ef_build_railway_in_capital_no_whole_state_no_limit, // constexpr inline uint16_t build_railway_in_capital_no_whole_state_no_limit = 0x010E;
7084ef_build_fort_in_capital_yes_whole_state_yes_limit, // constexpr inline uint16_t build_fort_in_capital_yes_whole_state_yes_limit = 0x010F;
7085ef_build_fort_in_capital_yes_whole_state_no_limit, // constexpr inline uint16_t build_fort_in_capital_yes_whole_state_no_limit = 0x0110;
7086ef_build_fort_in_capital_no_whole_state_yes_limit, // constexpr inline uint16_t build_fort_in_capital_no_whole_state_yes_limit = 0x0111;
7087ef_build_fort_in_capital_no_whole_state_no_limit, // constexpr inline uint16_t build_fort_in_capital_no_whole_state_no_limit = 0x0112;
7088ef_relation_reb, // constexpr inline uint16_t relation_reb = 0x0113;
7089ef_variable_tech_name_yes, // constexpr inline uint16_t variable_tech_name_yes = 0x0114;
7090ef_variable_good_name, // constexpr inline uint16_t variable_good_name = 0x0115;
7091ef_set_country_flag_province, // constexpr inline uint16_t set_country_flag_province = 0x0116;
7092ef_add_country_modifier_province, // constexpr inline uint16_t add_country_modifier_province = 0x0117;
7093ef_add_country_modifier_province_no_duration, // constexpr inline uint16_t add_country_modifier_province_no_duration = 0x0118;
7094ef_dominant_issue_nation, // constexpr inline uint16_t dominant_issue_nation = 0x0119;
7095ef_relation_province, // constexpr inline uint16_t relation_province = 0x011A;
7096ef_relation_province_this_nation, // constexpr inline uint16_t relation_province_this_nation = 0x011B;
7097ef_relation_province_this_province, // constexpr inline uint16_t relation_province_this_province = 0x011C;
7098ef_relation_province_from_nation, // constexpr inline uint16_t relation_province_from_nation = 0x011D;
7099ef_relation_province_from_province, // constexpr inline uint16_t relation_province_from_province = 0x011E;
7100ef_relation_province_reb, // constexpr inline uint16_t relation_province_reb = 0x011F;
7101ef_scaled_militancy_nation_issue, // constexpr inline uint16_t scaled_militancy_nation_issue = 0x0120;
7102ef_scaled_militancy_nation_ideology, // constexpr inline uint16_t scaled_militancy_nation_ideology = 0x0121;
7103ef_scaled_militancy_nation_unemployment, // constexpr inline uint16_t scaled_militancy_nation_unemployment = 0x0122;
7104ef_scaled_consciousness_nation_issue, // constexpr inline uint16_t scaled_consciousness_nation_issue = 0x0123;
7105ef_scaled_consciousness_nation_ideology, // constexpr inline uint16_t scaled_consciousness_nation_ideology = 0x0124;
7106ef_scaled_consciousness_nation_unemployment, // constexpr inline uint16_t scaled_consciousness_nation_unemployment = 0x0125;
7107ef_scaled_militancy_state_issue, // constexpr inline uint16_t scaled_militancy_state_issue = 0x0126;
7108ef_scaled_militancy_state_ideology, // constexpr inline uint16_t scaled_militancy_state_ideology = 0x0127;
7109ef_scaled_militancy_state_unemployment, // constexpr inline uint16_t scaled_militancy_state_unemployment = 0x0128;
7110ef_scaled_consciousness_state_issue, // constexpr inline uint16_t scaled_consciousness_state_issue = 0x0129;
7111ef_scaled_consciousness_state_ideology, // constexpr inline uint16_t scaled_consciousness_state_ideology = 0x012A;
7112ef_scaled_consciousness_state_unemployment, // constexpr inline uint16_t scaled_consciousness_state_unemployment = 0x012B;
7113ef_scaled_militancy_province_issue, // constexpr inline uint16_t scaled_militancy_province_issue = 0x012C;
7114ef_scaled_militancy_province_ideology, // constexpr inline uint16_t scaled_militancy_province_ideology = 0x012D;
7115ef_scaled_militancy_province_unemployment, // constexpr inline uint16_t scaled_militancy_province_unemployment = 0x012E;
7116ef_scaled_consciousness_province_issue, // constexpr inline uint16_t scaled_consciousness_province_issue = 0x012F;
7117ef_scaled_consciousness_province_ideology, // constexpr inline uint16_t scaled_consciousness_province_ideology = 0x0130;
7118ef_scaled_consciousness_province_unemployment, // constexpr inline uint16_t scaled_consciousness_province_unemployment =
7119// 0x0131;
7120ef_variable_good_name_province, // constexpr inline uint16_t variable_good_name_province = 0x0132;
7121ef_treasury_province, // constexpr inline uint16_t treasury_province = 0x0133;
7122ef_country_event_this_state, // constexpr inline uint16_t country_event_this_state = 0x0134;
7123ef_country_event_immediate_this_state, // constexpr inline uint16_t country_event_immediate_this_state = 0x0135;
7124ef_province_event_this_state, // constexpr inline uint16_t province_event_this_state = 0x0136;
7125ef_province_event_immediate_this_state, // constexpr inline uint16_t province_event_immediate_this_state = 0x0137;
7126ef_country_event_this_province, // constexpr inline uint16_t country_event_this_province = 0x0138;
7127ef_country_event_immediate_this_province, // constexpr inline uint16_t country_event_immediate_this_province = 0x0139;
7128ef_province_event_this_province, // constexpr inline uint16_t province_event_this_province = 0x013A;
7129ef_province_event_immediate_this_province, // constexpr inline uint16_t province_event_immediate_this_province = 0x013B;
7130ef_country_event_this_pop, // constexpr inline uint16_t country_event_this_pop = 0x013C;
7131ef_country_event_immediate_this_pop, // constexpr inline uint16_t country_event_immediate_this_pop = 0x013D;
7132ef_province_event_this_pop, // constexpr inline uint16_t province_event_this_pop = 0x013E;
7133ef_province_event_immediate_this_pop, // constexpr inline uint16_t province_event_immediate_this_pop = 0x013F;
7134ef_country_event_province_this_nation, // constexpr inline uint16_t country_event_province_this_nation = 0x0140;
7135ef_country_event_immediate_province_this_nation, // constexpr inline uint16_t country_event_immediate_province_this_nation =
7136// 0x0141;
7137ef_country_event_province_this_state, // constexpr inline uint16_t country_event_province_this_state = 0x0142;
7138ef_country_event_immediate_province_this_state, // constexpr inline uint16_t country_event_immediate_province_this_state =
7139// 0x0143;
7140ef_country_event_province_this_province, // constexpr inline uint16_t country_event_province_this_province = 0x0144;
7141ef_country_event_immediate_province_this_province, // constexpr inline uint16_t country_event_immediate_province_this_province
7142// = 0x0145;
7143ef_country_event_province_this_pop, // constexpr inline uint16_t country_event_province_this_pop = 0x0146;
7144ef_country_event_immediate_province_this_pop, // constexpr inline uint16_t country_event_immediate_province_this_pop = 0x0147;
7145ef_activate_invention, // constexpr inline uint16_t activate_invention = 0x0148;
7146ef_variable_invention_name_no, // constexpr inline uint16_t variable_invention_name_no = 0x0149;
7147ef_add_core_tag_state, // constexpr inline uint16_t add_core_tag_state = 0x014A;
7148ef_remove_core_tag_state, // constexpr inline uint16_t remove_core_tag_state = 0x014B;
7149ef_secede_province_state, // constexpr inline uint16_t secede_province_state = 0x014C;
7150ef_assimilate_state, // constexpr inline uint16_t assimilate_state = 0x014D;
7151ef_add_core_state_this_nation, //constexpr inline uint16_t add_core_state_this_nation = 0x014E;
7152ef_add_core_state_this_province, //constexpr inline uint16_t add_core_state_this_province = 0x014F;
7153ef_add_core_state_this_state, //constexpr inline uint16_t add_core_state_this_state = 0x0150;
7154ef_add_core_state_this_pop, //constexpr inline uint16_t add_core_state_this_pop = 0x0151;
7155ef_add_core_state_from_province, //constexpr inline uint16_t add_core_state_from_province = 0x0152;
7156ef_add_core_state_from_nation, //constexpr inline uint16_t add_core_state_from_nation = 0x0153;
7157ef_add_core_state_reb, //constexpr inline uint16_t add_core_state_reb = 0x0154;
7158ef_add_province_modifier, //constexpr inline uint16_t add_province_modifier_state = 0x0155;
7159ef_add_province_modifier_no_duration, //constexpr inline uint16_t add_province_modifier_state_no_duration = 0x0156;
7160ef_remove_core_this_nation, //constexpr inline uint16_t remove_core_state_this_nation = 0x0157;
7161ef_remove_core_this_province, //constexpr inline uint16_t remove_core_state_this_province = 0x0158;
7162ef_remove_core_this_state, //constexpr inline uint16_t remove_core_state_this_state = 0x0159;
7163ef_remove_core_this_pop, //constexpr inline uint16_t remove_core_state_this_pop = 0x015A;
7164ef_remove_core_from_province, //constexpr inline uint16_t remove_core_state_from_province = 0x015B;
7165ef_remove_core_from_nation, //constexpr inline uint16_t remove_core_state_from_nation = 0x015C;
7166ef_remove_core_reb, //constexpr inline uint16_t remove_core_state_reb = 0x015D;
7167ef_remove_province_modifier, //constexpr inline uint16_t remove_province_modifier_state = 0x015E;
7168ef_life_rating, //constexpr inline uint16_t life_rating_state = 0x015F;
7169ef_secede_province_state_this_nation, //constexpr inline uint16_t secede_province_state_this_nation = 0x0160;
7170ef_secede_province_state_this_state, //constexpr inline uint16_t secede_province_state_this_state = 0x0161;
7171ef_secede_province_state_this_province, //constexpr inline uint16_t secede_province_state_this_province = 0x0162;
7172ef_secede_province_state_this_pop, //constexpr inline uint16_t secede_province_state_this_pop = 0x0163;
7173ef_secede_province_state_from_nation, //constexpr inline uint16_t secede_province_state_from_nation = 0x0164;
7174ef_secede_province_state_from_province, //constexpr inline uint16_t secede_province_state_from_province = 0x0165;
7175ef_secede_province_state_reb, //constexpr inline uint16_t secede_province_state_reb = 0x0166;
7176ef_infrastructure, //constexpr inline uint16_t infrastructure_state = 0x0167;
7177ef_fort, //constexpr inline uint16_t fort_state = 0x0168;
7178ef_naval_base, //constexpr inline uint16_t naval_base_state = 0x0169;
7179ef_is_slave_state_yes, //constexpr inline uint16_t is_slave_province_yes = 0x016A;
7180ef_is_slave_state_no, //constexpr inline uint16_t is_slave_province_no = 0x016B;
7181ef_change_controller_state, //constexpr inline uint16_t change_controller_state = 0x016C;
7182ef_change_controller_state_this_nation, //constexpr inline uint16_t change_controller_state_this_nation = 0x016D;
7183ef_change_controller_state_this_province, //constexpr inline uint16_t change_controller_state_this_province = 0x016E;
7184ef_change_controller_state_from_nation, //constexpr inline uint16_t change_controller_state_from_nation = 0x016F;
7185ef_change_controller_state_from_province, //constexpr inline uint16_t change_controller_state_from_province = 0x0170;
7186ef_reduce_pop, //constexpr inline uint16_t reduce_pop_province = 0x0171;
7187ef_reduce_pop, //constexpr inline uint16_t reduce_pop_state = 0x0172;
7188ef_reduce_pop, //constexpr inline uint16_t reduce_pop_nation = 0x0173;
7189ef_consciousness, //constexpr inline uint16_t consciousness_province = 0x0174;
7190ef_consciousness, //constexpr inline uint16_t consciousness_state = 0x0175;
7191ef_consciousness, //constexpr inline uint16_t consciousness_nation = 0x0176;
7192ef_militancy, //constexpr inline uint16_t militancy_province = 0x0177;
7193ef_militancy, //constexpr inline uint16_t militancy_state = 0x0178;
7194ef_militancy, //constexpr inline uint16_t militancy_nation = 0x0179;
7195ef_remove_core_tag, //constexpr inline uint16_t remove_core_tag_nation = 0x017A;
7196ef_remove_core_this_nation, //constexpr inline uint16_t remove_core_nation_this_nation = 0x017B;
7197ef_remove_core_this_province, //constexpr inline uint16_t remove_core_nation_this_province = 0x017C;
7198ef_remove_core_this_state, //constexpr inline uint16_t remove_core_nation_this_state = 0x017D;
7199ef_remove_core_this_pop, //constexpr inline uint16_t remove_core_nation_this_pop = 0x017E;
7200ef_remove_core_from_province, //constexpr inline uint16_t remove_core_nation_from_province = 0x017F;
7201ef_remove_core_from_nation, //constexpr inline uint16_t remove_core_nation_from_nation = 0x0180;
7202ef_remove_core_reb, //constexpr inline uint16_t remove_core_nation_reb = 0x0181;
7203ef_set_country_flag, //constexpr inline uint16_t set_country_flag_pop = 0x0182;
7204ef_social_reform, //constexpr inline uint16_t social_reform_province = 0x0183;
7205ef_political_reform, //constexpr inline uint16_t political_reform_province = 0x0184;
7206ef_flashpoint_tension, //constexpr inline uint16_t flashpoint_tension_province = 0x0185;
7207ef_release_vassal, //constexpr inline uint16_t release_vassal_province = 0x0186;
7208ef_release_vassal_this_nation, //constexpr inline uint16_t release_vassal_province_this_nation = 0x0187;
7209ef_release_vassal_this_province, //constexpr inline uint16_t release_vassal_province_this_province = 0x0188;
7210ef_release_vassal_from_nation, //constexpr inline uint16_t release_vassal_province_from_nation = 0x0189;
7211ef_release_vassal_from_province, //constexpr inline uint16_t release_vassal_province_from_province = 0x018A;
7212ef_release_vassal_reb, //constexpr inline uint16_t release_vassal_province_reb = 0x018B;
7213ef_release_vassal_random, //constexpr inline uint16_t release_vassal_province_random = 0x018C;
7214ef_build_bank_in_capital_yes_whole_state_yes_limit, // constexpr inline uint16_t build_bank_in_capital_yes_whole_state_yes_limit = 0x018D;
7215ef_build_bank_in_capital_yes_whole_state_no_limit, // constexpr inline uint16_t build_bank_in_capital_yes_whole_state_no_limit = 0x018E;
7216ef_build_bank_in_capital_no_whole_state_yes_limit, // constexpr inline uint16_t build_bank_in_capital_no_whole_state_yes_limit = 0x018F;
7217ef_build_bank_in_capital_no_whole_state_no_limit, // constexpr inline uint16_t build_bank_in_capital_no_whole_state_no_limit = 0x0190;
7218ef_build_university_in_capital_yes_whole_state_yes_limit, // constexpr inline uint16_t build_university_in_capital_yes_whole_state_yes_limit = 0x0191;
7219ef_build_university_in_capital_yes_whole_state_no_limit, // constexpr inline uint16_t build_university_in_capital_yes_whole_state_no_limit = 0x0192;
7220ef_build_university_in_capital_no_whole_state_yes_limit, // constexpr inline uint16_t build_university_in_capital_no_whole_state_yes_limit = 0x0193;
7221ef_build_university_in_capital_no_whole_state_no_limit, // constexpr inline uint16_t build_university_in_capital_no_whole_state_no_limit = 0x0194;
7222ef_bank, //constexpr inline uint16_t bank = 0x0195;
7223ef_bank, //constexpr inline uint16_t bank_state = 0x0196;
7224ef_university, //constexpr inline uint16_t university = 0x0197;
7225ef_university, // constexpr inline uint16_t university_state = 0x0198;
7226ef_kill_leader, //constexpr inline uint16_t kill_leader = 0x0199;
7227ef_annex_to_null, //constexpr inline uint16_t annex_to_null_nation = 0x019A;
7228ef_annex_to_null, //constexpr inline uint16_t annex_to_null_province = 0x019B;
7229ef_add_truce_tag, //constexpr inline uint16_t add_truce_tag = 0x019C
7230ef_add_truce_this_nation, //constexpr inline uint16_t add_truce_this_nation = 0x019D;
7231ef_add_truce_this_state, //constexpr inline uint16_t add_truce_this_state = 0x019E;
7232ef_add_truce_this_province, //constexpr inline uint16_t add_truce_this_province = 0x019F;
7233ef_add_truce_this_pop, //constexpr inline uint16_t add_truce_this_pop = 0x01A0;
7234ef_add_truce_from_nation, //constexpr inline uint16_t add_truce_from_nation = 0x01A1;
7235ef_add_truce_from_province, //constexpr inline uint16_t add_truce_from_province = 0x01A2;
7236ef_call_allies, //constexpr inline uint16_t call_allies = 0x01A3;
7237ef_ruling_party_this, //constexpr inline uint16_t ruling_party_this = 0x01A4;
7238ef_ruling_party_from, //constexpr inline uint16_t ruling_party_from = 0x01A5;
7239ef_add_accepted_culture_this, //constexpr inline uint16_t add_accepted_culture_this = 0x01A6;
7240ef_add_accepted_culture_union, //constexpr inline uint16_t add_accepted_culture_union_this = 0x01A7;
7241ef_add_accepted_culture_from, //constexpr inline uint16_t add_accepted_culture_from = 0x01A8;
7242ef_add_accepted_culture_union, //constexpr inline uint16_t add_accepted_culture_union_from = 0x01A9;
7243ef_fop_clr_global_flag_2, //constexpr inline uint16_t fop_clr_global_flag_2 = 0x01AA;
7244ef_fop_clr_global_flag_3, //constexpr inline uint16_t fop_clr_global_flag_3 = 0x01AB;
7245ef_fop_clr_global_flag_4, //constexpr inline uint16_t fop_clr_global_flag_4 = 0x01AC;
7246ef_fop_clr_global_flag_5, //constexpr inline uint16_t fop_clr_global_flag_5 = 0x01AD;
7247ef_fop_clr_global_flag_6, //constexpr inline uint16_t fop_clr_global_flag_6 = 0x01AE;
7248ef_fop_clr_global_flag_7, //constexpr inline uint16_t fop_clr_global_flag_7 = 0x01AF;
7249ef_fop_clr_global_flag_8, //constexpr inline uint16_t fop_clr_global_flag_8 = 0x01B0;
7250ef_fop_clr_global_flag_9, //constexpr inline uint16_t fop_clr_global_flag_9 = 0x01B1;
7251ef_fop_clr_global_flag_10, //constexpr inline uint16_t fop_clr_global_flag_10 = 0x01B2;
7252ef_fop_clr_global_flag_11, //constexpr inline uint16_t fop_clr_global_flag_11 = 0x01B3;
7253ef_fop_clr_global_flag_12, //constexpr inline uint16_t fop_clr_global_flag_12 = 0x01B4;
7254ef_fop_change_province_name, //constexpr inline uint16_t fop_change_province_name = 0x01B5;
7255ef_change_terrain_province, //constexpr inline uint16_t change_terrain_province = 0x01B6;
7256ef_change_terrain_pop, //constexpr inline uint16_t change_terrain_pop = 0x01B7;
7257ef_masquerade_as_nation_this, //constexpr inline uint16_t ef_masquerade_as_nation_this = 0x01B8;
7258ef_masquerade_as_nation_from, //constexpr inline uint16_t ef_masquerade_as_nation_from = 0x01B9;
7259ef_religion_province, // 0x01BA
7260ef_religion_pop, //0x01BB
7261ef_reduce_pop_abs, //0x01BC
7262ef_set_culture_pop, // 0x01BD
7263ef_change_party_name, //EFFECT_BYTECODE_ELEMENT(0x01BE, change_party_name, 3)
7264ef_change_party_position, //EFFECT_BYTECODE_ELEMENT(0x01BF, change_party_position, 2)
7265ef_diplo_points, //EFFECT_BYTECODE_ELEMENT(0x01C0, diplo_points, 2)
7266//
7267// SCOPES
7268//
7269es_generic_scope, // constexpr inline uint16_t generic_scope = first_scope_code + 0x0000; // default grouping of effects (or
7270// hidden_tooltip)
7271es_x_neighbor_province_scope, // constexpr inline uint16_t x_neighbor_province_scope = first_scope_code + 0x0001;
7272es_x_neighbor_country_scope, // constexpr inline uint16_t x_neighbor_country_scope = first_scope_code + 0x0002;
7273es_x_country_scope, // constexpr inline uint16_t x_country_scope = first_scope_code + 0x0003;
7274es_x_country_scope_nation, // constexpr inline uint16_t x_country_scope_nation = first_scope_code + 0x0004;
7275es_x_empty_neighbor_province_scope, // constexpr inline uint16_t x_empty_neighbor_province_scope = first_scope_code + 0x0005;
7276es_x_greater_power_scope, // constexpr inline uint16_t x_greater_power_scope = first_scope_code + 0x0006;
7277es_poor_strata_scope_nation, // constexpr inline uint16_t poor_strata_scope_nation = first_scope_code + 0x0007;
7278es_poor_strata_scope_state, // constexpr inline uint16_t poor_strata_scope_state = first_scope_code + 0x0008;
7279es_poor_strata_scope_province, // constexpr inline uint16_t poor_strata_scope_province = first_scope_code + 0x0009;
7280es_middle_strata_scope_nation, // constexpr inline uint16_t middle_strata_scope_nation = first_scope_code + 0x000A;
7281es_middle_strata_scope_state, // constexpr inline uint16_t middle_strata_scope_state = first_scope_code + 0x000B;
7282es_middle_strata_scope_province, // constexpr inline uint16_t middle_strata_scope_province = first_scope_code + 0x000C;
7283es_rich_strata_scope_nation, // constexpr inline uint16_t rich_strata_scope_nation = first_scope_code + 0x000D;
7284es_rich_strata_scope_state, // constexpr inline uint16_t rich_strata_scope_state = first_scope_code + 0x000E;
7285es_rich_strata_scope_province, // constexpr inline uint16_t rich_strata_scope_province = first_scope_code + 0x000F;
7286es_x_pop_scope_nation, // constexpr inline uint16_t x_pop_scope_nation = first_scope_code + 0x0010;
7287es_x_pop_scope_state, // constexpr inline uint16_t x_pop_scope_state = first_scope_code + 0x0011;
7288es_x_pop_scope_province, // constexpr inline uint16_t x_pop_scope_province = first_scope_code + 0x0012;
7289es_x_owned_scope_nation, // constexpr inline uint16_t x_owned_scope_nation = first_scope_code + 0x0013;
7290es_x_owned_scope_state, // constexpr inline uint16_t x_owned_scope_state = first_scope_code + 0x0014;
7291es_x_core_scope, // constexpr inline uint16_t x_core_scope = first_scope_code + 0x0015;
7292es_x_state_scope, // constexpr inline uint16_t x_state_scope = first_scope_code + 0x0016;
7293es_random_list_scope, // constexpr inline uint16_t random_list_scope = first_scope_code + 0x0017;
7294es_random_scope, // constexpr inline uint16_t random_scope = first_scope_code + 0x0018;
7295es_owner_scope_state, // constexpr inline uint16_t owner_scope_state = first_scope_code + 0x0019;
7296es_owner_scope_province, // constexpr inline uint16_t owner_scope_province = first_scope_code + 0x001A;
7297es_controller_scope, // constexpr inline uint16_t controller_scope = first_scope_code + 0x001B;
7298es_location_scope, // constexpr inline uint16_t location_scope = first_scope_code + 0x001C;
7299es_country_scope_pop, // constexpr inline uint16_t country_scope_pop = first_scope_code + 0x001D;
7300es_country_scope_state, // constexpr inline uint16_t country_scope_state = first_scope_code + 0x001E;
7301es_capital_scope, // constexpr inline uint16_t capital_scope = first_scope_code + 0x001F;
7302es_this_scope_nation, // constexpr inline uint16_t this_scope_nation = first_scope_code + 0x0020;
7303es_this_scope_state, // constexpr inline uint16_t this_scope_state = first_scope_code + 0x0021;
7304es_this_scope_province, // constexpr inline uint16_t this_scope_province = first_scope_code + 0x0022;
7305es_this_scope_pop, // constexpr inline uint16_t this_scope_pop = first_scope_code + 0x0023;
7306es_from_scope_nation, // constexpr inline uint16_t from_scope_nation = first_scope_code + 0x0024;
7307es_from_scope_state, // constexpr inline uint16_t from_scope_state = first_scope_code + 0x0025;
7308es_from_scope_province, // constexpr inline uint16_t from_scope_province = first_scope_code + 0x0026;
7309es_from_scope_pop, // constexpr inline uint16_t from_scope_pop = first_scope_code + 0x0027;
7310es_sea_zone_scope, // constexpr inline uint16_t sea_zone_scope = first_scope_code + 0x0028;
7311es_cultural_union_scope, // constexpr inline uint16_t cultural_union_scope = first_scope_code + 0x0029;
7312es_overlord_scope, // constexpr inline uint16_t overlord_scope = first_scope_code + 0x002A;
7313es_sphere_owner_scope, // constexpr inline uint16_t sphere_owner_scope = first_scope_code + 0x002B;
7314es_independence_scope, // constexpr inline uint16_t independence_scope = first_scope_code + 0x002C;
7315es_flashpoint_tag_scope, // constexpr inline uint16_t flashpoint_tag_scope = first_scope_code + 0x002D;
7316es_crisis_state_scope, // constexpr inline uint16_t crisis_state_scope = first_scope_code + 0x002E;
7317es_state_scope_pop, // constexpr inline uint16_t state_scope_pop = first_scope_code + 0x002F;
7318es_state_scope_province, // constexpr inline uint16_t state_scope_province = first_scope_code + 0x0030;
7320es_capital_scope_province, // constexpr inline uint16_t capital_scope = first_scope_code + 0x0032;
7321es_x_core_scope_province, //constexpr inline uint16_t x_core_scope_province = first_scope_code + 0x0033;
7322es_tag_scope, // constexpr inline uint16_t tag_scope = first_scope_code + 0x0034;
7323es_integer_scope, // constexpr inline uint16_t integer_scope = first_scope_code + 0x0035;
7324es_pop_type_scope_nation, // constexpr inline uint16_t pop_type_scope_nation = first_scope_code + 0x0036;
7325es_pop_type_scope_state, // constexpr inline uint16_t pop_type_scope_state = first_scope_code + 0x0037;
7326es_pop_type_scope_province, // constexpr inline uint16_t pop_type_scope_province = first_scope_code + 0x0038;
7327es_region_proper_scope, // constexpr inline uint16_t region_scope = first_scope_code + 0x0039;
7328es_region_scope, // constexpr inline uint16_t region_scope = first_scope_code + 0x003A;
7329es_if_scope, // constexpr inline uint16_t if_scope = first_scope_code + 0x003B;
7330es_else_if_scope, // constexpr inline uint16_t else_if_scope = first_scope_code + 0x003C;
7331es_x_event_country_scope, // constexpr inline uint16_t x_event_country_scope = first_scope_code + 0x003D;
7332es_x_decision_country_scope, // constexpr inline uint16_t x_decision_country_scope = first_scope_code + 0x003E;
7333es_x_event_country_scope_nation,//constexpr inline uint16_t x_event_country_scope_nation = first_scope_code + 0x003F;
7334es_x_decision_country_scope_nation,//constexpr inline uint16_t x_decision_country_scope_nation = first_scope_code + 0x0040;
7335es_from_bounce_scope, // constexpr inline uint16_t from_bounce_scope = first_scope_code + 0x0041;
7336es_this_bounce_scope, // constexpr inline uint16_t this_bounce_scope = first_scope_code + 0x0042;
7337es_random_by_modifier_scope,//constexpr inline uint16_t random_by_modifier_scope = first_scope_code + 0x0043;
7340};
7341
7343 return effect_functions[*tval & effect::code_mask](ws, tval, layout, primary_slot, this_slot, from_slot, r_lo, r_hi,
7344 indentation);
7345}
7346
7347#undef EFFECT_DISPLAY_PARAMS
7348
7349} // namespace effect_tooltip
7350
7351void effect_description(sys::state& state, text::layout_base& layout, dcon::effect_key k, int32_t primary_slot, int32_t this_slot,
7352 int32_t from_slot, uint32_t r_lo, uint32_t r_hi) {
7353 if(!k)
7354 text::add_line(state, layout, "no_effect");
7355 else
7356 effect_tooltip::internal_make_effect_description(state, state.effect_data.data() + state.effect_data_indices[k.index() + 1], layout, primary_slot, this_slot, from_slot, r_lo, r_hi, 0);
7357}
7358
7359} // namespace ui
#define assert(condition)
Definition: debug.h:74
#define EFFECT_DISPLAY_PARAMS
pop_satisfaction_wrapper_fat fatten(data_container const &c, pop_satisfaction_wrapper_id id) noexcept
std::string_view province_building_type_get_level_text(economy::province_building_type v)
Definition: economy.hpp:73
constexpr uint16_t is_random_scope
int32_t get_effect_scope_payload_size(uint16_t const *data)
int32_t effect_scope_data_payload(uint16_t code)
constexpr uint16_t code_mask
int32_t get_generic_effect_payload_size(uint16_t const *data)
constexpr uint16_t scope_has_limit
std::vector< dcon::province_id > country_get_province_adjacency(sys::state &state, dcon::nation_id nat_id)
Definition: effects.cpp:119
float daily_research_points(sys::state &state, dcon::nation_id n)
Definition: nations.cpp:741
dcon::nation_id owner_of_pop(sys::state const &state, dcon::pop_id pop_ids)
Definition: nations.cpp:87
uint64_t get_random(sys::state const &state, uint32_t value_in)
Definition: prng.cpp:8
void add_to_layout_box(sys::state &state, layout_base &dest, layout_box &box, embedded_flag ico)
Definition: text.cpp:1165
layout_box open_layout_box(layout_base &dest, int32_t indent)
Definition: text.cpp:1823
void add_unparsed_text_to_layout_box(sys::state &state, layout_base &dest, layout_box &box, std::string_view sv, substitution_map const &mp)
Definition: text.cpp:1612
void localised_format_box(sys::state &state, layout_base &dest, layout_box &box, std::string_view key, text::substitution_map const &sub)
Definition: text.cpp:1904
void add_line(sys::state &state, layout_base &dest, dcon::text_key txt, int32_t indent)
Definition: text.cpp:1923
void add_to_substitution_map(substitution_map &mp, variable_type key, substitution value)
Definition: text.cpp:1068
dcon::text_key get_adjective(sys::state &state, dcon::nation_id id)
Definition: text.cpp:890
std::string get_dynamic_state_name(sys::state &state, dcon::state_instance_id state_id)
Definition: text.cpp:837
ankerl::unordered_dense::map< uint32_t, substitution > substitution_map
Definition: text.hpp:797
std::string produce_simple_string(sys::state const &state, dcon::text_key id)
Definition: text.cpp:617
dcon::text_key get_name(sys::state &state, dcon::nation_id id)
Definition: text.cpp:880
void add_space_to_layout_box(sys::state &state, layout_base &dest, layout_box &box)
Definition: text.cpp:1812
void close_layout_box(columnar_layout &dest, layout_box &box)
Definition: text.cpp:1831
std::variant< std::string_view, dcon::text_key, dcon::province_id, dcon::state_instance_id, dcon::nation_id, dcon::national_identity_id, int64_t, fp_one_place, sys::date, std::monostate, fp_two_places, fp_three_places, fp_four_places, fp_currency, pretty_integer, fp_percentage, fp_percentage_one_place, int_percentage, int_wholenum, dcon::state_definition_id, embedded_icon, embedded_flag, embedded_unit_icon, embedded_commodity_icon > substitution
Definition: text.hpp:796
int32_t to_generic(dcon::province_id v)
Definition: triggers.hpp:12
dcon::state_instance_id to_state(int32_t v)
Definition: triggers.hpp:136
dcon::pop_id to_pop(int32_t v)
Definition: triggers.hpp:120
dcon::province_id to_prov(int32_t v)
Definition: triggers.hpp:88
int32_t read_int32_t_from_payload(uint16_t const *data)
Definition: triggers.cpp:133
bool evaluate(sys::state &state, dcon::trigger_key key, int32_t primary, int32_t this_slot, int32_t from_slot)
Definition: triggers.cpp:5895
dcon::rebel_faction_id to_rebel(int32_t v)
Definition: triggers.hpp:152
float read_float_from_payload(uint16_t const *data)
Definition: triggers.cpp:119
dcon::nation_id to_nation(int32_t v)
Definition: triggers.hpp:104
float evaluate_multiplicative_modifier(sys::state &state, dcon::value_modifier_key modifier, int32_t primary, int32_t this_slot, int32_t from_slot)
Definition: triggers.cpp:5812
uint32_t ef_build_fort_in_capital_yes_whole_state_no_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_pop_type(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_university_in_capital_yes_whole_state_no_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_naval_base(EFFECT_DISPLAY_PARAMS)
uint32_t ef_civilized_no(EFFECT_DISPLAY_PARAMS)
void tag_type_from_province_effect(int32_t this_slot, sys::state &ws, text::layout_base &layout, text::layout_box &box)
uint32_t ef_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t ef_clr_country_flag(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_empty_neighbor_province_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_leave_alliance_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_variable_tech_name_yes(EFFECT_DISPLAY_PARAMS)
uint32_t internal_make_effect_description(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_random_economic_reforms(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_alliance_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_annex_to_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_core_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_university_in_capital_no_whole_state_yes_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_this_remove_casus_belli_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_tag(EFFECT_DISPLAY_PARAMS)
uint32_t ef_leave_alliance_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_state_reb(EFFECT_DISPLAY_PARAMS)
uint32_t ef_literacy(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_casus_belli_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_accepted_culture_from(EFFECT_DISPLAY_PARAMS)
uint32_t ef_militancy(EFFECT_DISPLAY_PARAMS)
uint32_t ef_treasury(EFFECT_DISPLAY_PARAMS)
uint32_t es_sea_zone_scope(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_neighbor_province_scope(EFFECT_DISPLAY_PARAMS)
void add_adj_from_to_map(sys::state &ws, text::substitution_map &map, dcon::rebel_faction_id p)
uint32_t ef_change_controller_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_leave_alliance_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_war_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_dominant_issue(EFFECT_DISPLAY_PARAMS)
uint32_t ef_trigger_revolt_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_inherit_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_middle_strata_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_vassal_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_pop_type_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_immediate_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_country_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_accepted_culture_union(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_truce_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_annex_to_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_truce_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_region_name_state(EFFECT_DISPLAY_PARAMS)
uint32_t es_sphere_owner_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_activate_invention(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_unemployment(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_vassal(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_tag(EFFECT_DISPLAY_PARAMS)
uint32_t ef_government(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_state_issue(EFFECT_DISPLAY_PARAMS)
uint32_t es_overlord_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_from_province(EFFECT_DISPLAY_PARAMS)
void tag_type_this_province_effect(int32_t this_slot, sys::state &ws, text::layout_base &layout, text::layout_box &box)
uint32_t ef_casus_belli_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_university_in_capital_yes_whole_state_yes_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_variable_tech_name_no(EFFECT_DISPLAY_PARAMS)
uint32_t ef_nationalvalue_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_accepted_culture(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_war_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_none(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_this_remove_casus_belli_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_state_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_immediate_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_reduce_pop_abs(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_3(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_masquerade_as_nation_from(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_party_loyalty(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_military_access_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_state_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_research_points(EFFECT_DISPLAY_PARAMS)
uint32_t ef_province_event_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_variable_invention_name_yes(EFFECT_DISPLAY_PARAMS)
uint32_t ef_annex_to_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_immediate_province_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_immediate_province_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_10(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_neighbor_province_scope_nation(EFFECT_DISPLAY_PARAMS)
auto random_or_every(uint16_t tval)
uint32_t ef_war_no_ally_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_diplomatic_influence_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_nation_issue(EFFECT_DISPLAY_PARAMS)
uint32_t ef_military_access(EFFECT_DISPLAY_PARAMS)
uint32_t ef_military_access_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_bank_in_capital_no_whole_state_no_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_casus_belli_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_alliance_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_diplomatic_influence_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_flashpoint_tag_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_capital(EFFECT_DISPLAY_PARAMS)
uint32_t es_this_bounce_scope(EFFECT_DISPLAY_PARAMS)
uint32_t es_state_scope_pop(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_empty_neighbor_province_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_province_unemployment(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_truce_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_vassal_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_ruling_party_this(EFFECT_DISPLAY_PARAMS)
void add_adj_this_to_map(sys::state &ws, text::substitution_map &map, dcon::nation_id n)
uint32_t ef_country_event_immediate_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_immediate_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_annex_to_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_state_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_infrastructure(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_immediate_province_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_casus_belli_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_party_name(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_state_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_from_scope_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_treasury_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_primary_culture_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_int(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_substate_scope(EFFECT_DISPLAY_PARAMS)
uint32_t es_from_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t es_pop_type_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_tag_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_enable_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t es_from_bounce_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_controller(EFFECT_DISPLAY_PARAMS)
uint32_t ef_inherit_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_decision_country_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_casus_belli_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_province_event_immediate_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_bank_in_capital_no_whole_state_yes_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_casus_belli_int(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_reb(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_12(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_province_issue(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_set_country_flag_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_province_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_province_event_immediate_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_state_issue(EFFECT_DISPLAY_PARAMS)
uint32_t es_integer_scope(EFFECT_DISPLAY_PARAMS)
void show_short_any_random_tooltip(sys::state &ws, uint16_t tval, std::string_view loc_key, text::layout_base &layout, int32_t indentation)
uint32_t ef_diplomatic_influence(EFFECT_DISPLAY_PARAMS)
uint32_t es_owner_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_issue(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_bank_in_capital_yes_whole_state_yes_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_casus_belli_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_university(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_6(EFFECT_DISPLAY_PARAMS)
uint32_t es_poor_strata_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_country_modifier_province_no_duration(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_no_ally_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_tag_culture(EFFECT_DISPLAY_PARAMS)
uint32_t ef_years_of_research(EFFECT_DISPLAY_PARAMS)
uint32_t ef_trigger_revolt_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_is_slave_pop_yes(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_inherit_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_vassal_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_this_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_move_issue_percentage_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_this_remove_casus_belli_tag(EFFECT_DISPLAY_PARAMS)
void show_limit(sys::state &ws, uint16_t const *tval, text::layout_base &layout, int32_t primary_slot, int32_t this_slot, int32_t from_slot, int32_t indentation)
uint32_t ef_scaled_militancy_nation_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t es_else_if_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_world_wars_enabled_yes(EFFECT_DISPLAY_PARAMS)
uint32_t ef_this_remove_casus_belli_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_no_ally_tag(EFFECT_DISPLAY_PARAMS)
uint32_t ef_trade_goods(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_controller_state_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_move_issue_percentage_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_sub_unit_current(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_tag_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_state_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_11(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_controller_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_railway_in_capital_yes_whole_state_yes_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_clr_global_flag(EFFECT_DISPLAY_PARAMS)
uint32_t ef_civilized_yes(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_random_military_reforms(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_2(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_province_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_province_event_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_is_slave_pop_no(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_factory_in_capital_state(EFFECT_DISPLAY_PARAMS)
uint32_t es_from_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_move_issue_percentage_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_neutrality(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_crisis_temperature(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_casus_belli_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t es_capital_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_religion_pop(EFFECT_DISPLAY_PARAMS)
uint32_t es_country_scope_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_religion_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_nationalvalue_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_location_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_state_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_province_event_immediate_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_sub_unit_this(EFFECT_DISPLAY_PARAMS)
uint32_t es_owner_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_casus_belli_tag(EFFECT_DISPLAY_PARAMS)
uint32_t es_this_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_state_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_country_modifier(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t ef_province_event_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_assimilate_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_railway_in_capital_no_whole_state_no_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_call_allies(EFFECT_DISPLAY_PARAMS)
uint32_t es_random_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_country_modifier_no_duration(EFFECT_DISPLAY_PARAMS)
uint32_t ef_economic_reform(EFFECT_DISPLAY_PARAMS)
uint32_t ef_military_access_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_primary_culture(EFFECT_DISPLAY_PARAMS)
uint32_t ef_define_admiral(EFFECT_DISPLAY_PARAMS)
uint32_t ef_social_reform(EFFECT_DISPLAY_PARAMS)
uint32_t ef_badboy(EFFECT_DISPLAY_PARAMS)
uint32_t es_crisis_state_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_upper_house(EFFECT_DISPLAY_PARAMS)
void tag_type_from_nation_effect(int32_t this_slot, sys::state &ws, text::layout_base &layout, text::layout_box &box)
uint32_t ef_money(EFFECT_DISPLAY_PARAMS)
uint32_t ef_military_access_this_province(EFFECT_DISPLAY_PARAMS)
void tag_type_this_pop_effect(int32_t this_slot, sys::state &ws, text::layout_base &layout, text::layout_box &box)
constexpr uint32_t(* effect_functions[])(EFFECT_DISPLAY_PARAMS)
uint32_t ef_election(EFFECT_DISPLAY_PARAMS)
uint32_t ef_set_culture_pop(EFFECT_DISPLAY_PARAMS)
uint32_t es_rich_strata_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_crime_none(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_military_access_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_great_wars_enabled_yes(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_truce_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_region_proper_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_inherit_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_7(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_vassal_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_controller_state_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_province_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_nationalize(EFFECT_DISPLAY_PARAMS)
uint32_t ef_set_global_flag(EFFECT_DISPLAY_PARAMS)
uint32_t ef_casus_belli_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_state_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_diplomatic_influence_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_this_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_truce_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_activate_technology(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_int(EFFECT_DISPLAY_PARAMS)
uint32_t ef_variable_invention_name_no(EFFECT_DISPLAY_PARAMS)
uint32_t ef_life_rating(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_truce_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_war_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_inherit_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_railway_in_capital_yes_whole_state_no_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_variable(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_reb(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_state_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_dominant_issue_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_variable_good_name_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_province_reb(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_no_ally_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_controller_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_sub_unit_from(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_province_modifier(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_tag_no_core_switch(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_state_unemployment(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_casus_belli_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_university_in_capital_no_whole_state_no_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_tax_relative_income(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_crime(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_sub_unit_int(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_nation_unemployment(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_vassal_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_owned_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_country_modifier_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_enable_canal(EFFECT_DISPLAY_PARAMS)
uint32_t ef_tech_school(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_casus_belli_int(EFFECT_DISPLAY_PARAMS)
uint32_t ef_is_slave_state_no(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_5(EFFECT_DISPLAY_PARAMS)
uint32_t ef_inherit(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_event_country_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_inherit_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_rgo_size(EFFECT_DISPLAY_PARAMS)
uint32_t ef_religion(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_fort_in_capital_yes_whole_state_yes_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_alliance_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_4(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_casus_belli_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_state_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_primary_culture_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_party_position(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_unemployment(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_casus_belli_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_tag(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_casus_belli_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_region_name_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_military_reform(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_alliance(EFFECT_DISPLAY_PARAMS)
uint32_t ef_masquerade_as_nation_this(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_province_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_casus_belli_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_bank(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_crisis_interest(EFFECT_DISPLAY_PARAMS)
uint32_t ef_set_country_flag(EFFECT_DISPLAY_PARAMS)
void tag_type_this_state_effect(int32_t this_slot, sys::state &ws, text::layout_base &layout, text::layout_box &box)
uint32_t ef_define_general(EFFECT_DISPLAY_PARAMS)
uint32_t ef_casus_belli_int(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_province_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_casus_belli_tag(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_issue(EFFECT_DISPLAY_PARAMS)
uint32_t ef_assimilate_pop(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_pop_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_controller_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_assimilate_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_controller_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_set_variable(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_alliance_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_terrain_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_province_name(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_province_modifier(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fort(EFFECT_DISPLAY_PARAMS)
uint32_t es_this_scope_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_move_issue_percentage_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_reduce_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_diplo_points(EFFECT_DISPLAY_PARAMS)
constexpr int32_t indentation_amount
uint32_t ef_war_exhaustion(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_greater_power_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_is_slave_state_yes(EFFECT_DISPLAY_PARAMS)
uint32_t ef_primary_culture_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_country_modifier(EFFECT_DISPLAY_PARAMS)
void show_full_random_tooltip(sys::state &ws, uint16_t tval, std::string_view loc_key, text::layout_base &layout, text::substitution val, int32_t indentation)
uint32_t ef_scaled_consciousness_state_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_tag_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_state_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_state_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_province_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_no_ally_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_leadership(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_pop_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_random_list_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_bank_in_capital_yes_whole_state_no_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_trigger_revolt_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_this_remove_casus_belli_int(EFFECT_DISPLAY_PARAMS)
uint32_t ef_annex_to_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_vassal_reb(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_military_access_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_this_remove_casus_belli_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_kill_leader(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_fort_in_capital_no_whole_state_no_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_state_reb(EFFECT_DISPLAY_PARAMS)
uint32_t es_independence_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_vassal_random(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_casus_belli_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_primary_culture_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_prestige_factor_positive(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_state_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_state_this_nation(EFFECT_DISPLAY_PARAMS)
void display_value(int64_t value, bool positive_is_green, sys::state &ws, text::layout_base &layout, text::layout_box &box)
uint32_t ef_party_loyalty_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_state_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_9(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_nation_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t es_random_by_modifier_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_diplomatic_influence_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_move_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_tag_no_core_switch_culture(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_province_unemployment(EFFECT_DISPLAY_PARAMS)
uint32_t ef_annex_to_null(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_fort_in_capital_no_whole_state_yes_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_tag(EFFECT_DISPLAY_PARAMS)
uint32_t es_middle_strata_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_prestige(EFFECT_DISPLAY_PARAMS)
uint32_t ef_annex_to(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_nation_issue(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_no_ally_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_core_scope_province(EFFECT_DISPLAY_PARAMS)
void tag_type_this_nation_effect(int32_t this_slot, sys::state &ws, text::layout_base &layout, text::layout_box &box)
uint32_t es_poor_strata_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t es_generic_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_military_access_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_province_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_accepted_culture_this(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_state_unemployment(EFFECT_DISPLAY_PARAMS)
uint32_t ef_leave_alliance(EFFECT_DISPLAY_PARAMS)
dcon::nation_id convert_this(sys::state &ws, dcon::nation_id n)
void add_to_map(sys::state &ws, text::substitution_map &map, T v, std::string_view alt, F const &f)
uint32_t ef_add_core_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_accepted_culture(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_province_issue(EFFECT_DISPLAY_PARAMS)
uint32_t es_rich_strata_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t es_if_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_province_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t ef_this_remove_casus_belli_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t es_from_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_country_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_vassal_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_truce_tag(EFFECT_DISPLAY_PARAMS)
uint32_t ef_world_wars_enabled_no(EFFECT_DISPLAY_PARAMS)
uint32_t ef_consciousness(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation_province_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_military_access(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_controller_state_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_prestige_factor_negative(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_vassal(EFFECT_DISPLAY_PARAMS)
uint32_t ef_flashpoint_tension(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_pop_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_military_access_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_province_event_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_war_goal(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_militancy_province_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t ef_casus_belli_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_casus_belli_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t display_subeffects(EFFECT_DISPLAY_PARAMS)
uint32_t es_pop_type_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_vassal_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_province_modifier_no_duration(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_no_ally_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_change_province_name(EFFECT_DISPLAY_PARAMS)
uint32_t ef_leave_alliance_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_casus_belli_from_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_decision_country_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_plurality(EFFECT_DISPLAY_PARAMS)
uint32_t ef_relation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_annex_to_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_terrain_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_primary_culture_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_war(EFFECT_DISPLAY_PARAMS)
uint32_t ef_remove_core_reb(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_owned_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_neighbor_country_scope(EFFECT_DISPLAY_PARAMS)
uint32_t es_cultural_union_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_controller_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_create_vassal_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_political_reform(EFFECT_DISPLAY_PARAMS)
uint32_t ef_end_war_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t es_region_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_province_event_immediate_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_change_controller_state_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_this_remove_casus_belli_this_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_middle_strata_scope_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_fop_clr_global_flag_8(EFFECT_DISPLAY_PARAMS)
uint32_t es_rich_strata_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_from_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_ruling_party_ideology(EFFECT_DISPLAY_PARAMS)
uint32_t ef_country_event_immediate_province_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_core_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_scaled_consciousness_nation_unemployment(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_event_country_scope(EFFECT_DISPLAY_PARAMS)
uint32_t ef_great_wars_enabled_no(EFFECT_DISPLAY_PARAMS)
uint32_t es_poor_strata_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t es_capital_scope_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_release_this_province(EFFECT_DISPLAY_PARAMS)
uint32_t ef_ruling_party_from(EFFECT_DISPLAY_PARAMS)
uint32_t ef_add_casus_belli_this_state(EFFECT_DISPLAY_PARAMS)
uint32_t ef_casus_belli_tag(EFFECT_DISPLAY_PARAMS)
uint32_t ef_government_reb(EFFECT_DISPLAY_PARAMS)
uint32_t es_x_country_scope_nation(EFFECT_DISPLAY_PARAMS)
uint32_t ef_build_railway_in_capital_no_whole_state_yes_limit(EFFECT_DISPLAY_PARAMS)
uint32_t ef_variable_good_name(EFFECT_DISPLAY_PARAMS)
uint32_t ef_war_this_pop(EFFECT_DISPLAY_PARAMS)
uint32_t ef_secede_province_reb(EFFECT_DISPLAY_PARAMS)
void make_trigger_description(sys::state &ws, text::layout_base &layout, uint16_t const *tval, int32_t primary_slot, int32_t this_slot, int32_t from_slot, int32_t indentation, bool show_condition)
void modifier_description(sys::state &state, text::layout_base &layout, dcon::modifier_id mid, int32_t indentation=0)
void multiplicative_value_modifier_description(sys::state &state, text::layout_base &layout, dcon::value_modifier_key modifier, int32_t primary, int32_t this_slot, int32_t from_slot)
void effect_description(sys::state &state, text::layout_base &layout, dcon::effect_key k, int32_t primary_slot, int32_t this_slot, int32_t from_slot, uint32_t r_lo, uint32_t r_hi)
void populate_event_submap(sys::state &state, text::substitution_map &sub, std::variant< event::pending_human_n_event, event::pending_human_f_n_event, event::pending_human_p_event, event::pending_human_f_p_event > const &phe) noexcept
Definition: gui_event.cpp:12
uint uint32_t
Holds important data about the game world, state, and other data regarding windowing,...
dcon::data_container world
std::vector< int32_t > trigger_data_indices
dcon::text_key lookup_key(std::string_view text) const
std::vector< uint16_t > trigger_data
dcon::national_identity_id tag_id
dcon::culture_id cul_id
dcon::national_flag_id natf_id
dcon::national_variable_id natv_id
dcon::invention_id invt_id
dcon::cb_type_id cb_id
dcon::national_event_id nev_id
dcon::provincial_event_id pev_id
dcon::province_id prov_id
dcon::ideology_id ideo_id
dcon::religion_id rel_id
dcon::government_type_id gov_id
dcon::technology_id tech_id
dcon::global_flag_id glob_id
dcon::trigger_key tr_id
dcon::crime_id crm_id
dcon::reform_option_id ropt_id
dcon::factory_type_id fac_id
dcon::state_definition_id state_id
dcon::pop_type_id popt_id
dcon::issue_option_id opt_id
dcon::commodity_id com_id
dcon::rebel_type_id reb_id
dcon::region_id reg_id
dcon::modifier_id mod_id