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 auto cstate = ws.crisis_state ? trigger::to_generic(ws.crisis_state) : -1;
1358 return display_subeffects(ws, tval, layout, cstate, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1359}
1361 {
1362 auto box = text::open_layout_box(layout, indentation);
1363 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "containing_state"));
1364 text::add_space_to_layout_box(ws, layout, box);
1365 text::add_to_layout_box(ws, layout, box,
1366 primary_slot != -1 ? text::produce_simple_string(ws, ws.world.province_get_name(trigger::to_prov(primary_slot)))
1367 : text::produce_simple_string(ws, "singular_province"));
1368 text::close_layout_box(layout, box);
1369 }
1370 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1371 auto st = primary_slot != -1 ? ws.world.province_get_state_membership(trigger::to_prov(primary_slot)) : dcon::state_instance_id{};
1372 return display_subeffects(ws, tval, layout, st ? trigger::to_generic(st) : -1, this_slot, from_slot, r_hi, r_lo,
1373 indentation + indentation_amount);
1374}
1376 {
1377 auto box = text::open_layout_box(layout, indentation);
1378 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "containing_state"));
1379 text::add_space_to_layout_box(ws, layout, box);
1380 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "singular_pop"));
1381 text::close_layout_box(layout, box);
1382 }
1383 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1384 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{};
1385 return display_subeffects(ws, tval, layout, st ? trigger::to_generic(st) : -1, this_slot, from_slot, r_hi, r_lo,
1386 indentation + indentation_amount);
1387}
1389 auto tag = trigger::payload(tval[2]).tag_id;
1390 auto tag_holder = ws.world.national_identity_get_nation_from_identity_holder(tag);
1391 auto box = text::open_layout_box(layout, indentation);
1392 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)));
1393 text::close_layout_box(layout, box);
1394 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1395 return display_subeffects(ws, tval, layout, tag_holder ? trigger::to_generic(tag_holder) : -1, this_slot, from_slot, r_hi, r_lo,
1396 indentation + indentation_amount);
1397}
1399 auto p = trigger::payload(tval[2]).prov_id;
1400
1401 {
1402 auto box = text::open_layout_box(layout, indentation);
1403 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.province_get_name(p)));
1404 text::close_layout_box(layout, box);
1405 }
1406 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1407 return display_subeffects(ws, tval, layout, trigger::to_generic(p), this_slot, from_slot, r_hi, r_lo,
1408 indentation + indentation_amount);
1409}
1410
1412 auto type = (tval[0] & effect::scope_has_limit) != 0 ? trigger::payload(tval[3]).popt_id : trigger::payload(tval[2]).popt_id;
1413
1414 {
1415 auto box = text::open_layout_box(layout, indentation);
1416 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "every"));
1417 text::add_space_to_layout_box(ws, layout, box);
1418 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.pop_type_get_name(type)));
1419 text::add_space_to_layout_box(ws, layout, box);
1420 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "pop"));
1421 text::close_layout_box(layout, box);
1422 }
1423
1424 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1425
1426 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1427}
1429 auto type = (tval[0] & effect::scope_has_limit) != 0 ? trigger::payload(tval[3]).popt_id : trigger::payload(tval[2]).popt_id;
1430
1431 {
1432 auto box = text::open_layout_box(layout, indentation);
1433 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "every"));
1434 text::add_space_to_layout_box(ws, layout, box);
1435 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.pop_type_get_name(type)));
1436 text::add_space_to_layout_box(ws, layout, box);
1437 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "pop"));
1438 text::close_layout_box(layout, box);
1439 }
1440
1441 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1442
1443 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1444}
1446 auto type = (tval[0] & effect::scope_has_limit) != 0 ? trigger::payload(tval[3]).popt_id : trigger::payload(tval[2]).popt_id;
1447
1448 {
1449 auto box = text::open_layout_box(layout, indentation);
1450 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "every"));
1451 text::add_space_to_layout_box(ws, layout, box);
1452 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.pop_type_get_name(type)));
1453 text::add_space_to_layout_box(ws, layout, box);
1454 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "pop"));
1455 text::close_layout_box(layout, box);
1456 }
1457
1458 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1459
1460 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1461}
1463 auto region = trigger::payload(tval[(tval[0] & effect::scope_has_limit) != 0 ? 3 : 2]).state_id;
1464 auto box = text::open_layout_box(layout, indentation);
1465 text::add_to_layout_box(ws, layout, box, region);
1466 text::close_layout_box(layout, box);
1467 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1468 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1469}
1471 auto region = (tval[0] & effect::scope_has_limit) != 0 ? trigger::payload(tval[3]).reg_id : trigger::payload(tval[2]).reg_id;
1472 auto box = text::open_layout_box(layout, indentation);
1473 text::add_to_layout_box(ws, layout, box, ws.world.region_get_name(region));
1474 text::close_layout_box(layout, box);
1475 show_limit(ws, tval, layout, -1, this_slot, from_slot, indentation);
1476 return display_subeffects(ws, tval, layout, -1, this_slot, from_slot, r_hi, r_lo, indentation + indentation_amount);
1477}
1479 auto box = text::open_layout_box(layout, indentation);
1480 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "no_effect"));
1481 text::close_layout_box(layout, box);
1482 return 0;
1483}
1485 auto new_capital = trigger::payload(tval[1]).prov_id;
1486 auto box = text::open_layout_box(layout, indentation);
1487 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "move_capital_to"));
1488 text::add_space_to_layout_box(ws, layout, box);
1489 text::add_to_layout_box(ws, layout, box, new_capital);
1490 text::close_layout_box(layout, box);
1491 return 0;
1492}
1494 auto tag = trigger::payload(tval[1]).tag_id;
1495 {
1496 auto box = text::open_layout_box(layout, indentation);
1498 text::add_to_substitution_map(m, text::variable_type::adj, ws.world.national_identity_get_adjective(tag));
1499 text::localised_format_box(ws, layout, box, "add_x_core", m);
1500 text::close_layout_box(layout, box);
1501 }
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}
1515
1517 {
1518 auto box = text::open_layout_box(layout, indentation);
1520 add_adj_this_to_map(ws, m, trigger::to_nation(this_slot));
1521 text::localised_format_box(ws, layout, box, "add_x_core", m);
1522 text::close_layout_box(layout, box);
1523 }
1524 return 0;
1525}
1527 {
1528 auto box = text::open_layout_box(layout, indentation);
1530 add_adj_this_to_map(ws, m, trigger::to_prov(this_slot));
1531 text::localised_format_box(ws, layout, box, "add_x_core", m);
1532 text::close_layout_box(layout, box);
1533 }
1534 return 0;
1535}
1537 {
1538 auto box = text::open_layout_box(layout, indentation);
1540 add_adj_this_to_map(ws, m, trigger::to_state(this_slot));
1541 text::localised_format_box(ws, layout, box, "add_x_core", m);
1542 text::close_layout_box(layout, box);
1543 }
1544 return 0;
1545}
1547 {
1548 auto box = text::open_layout_box(layout, indentation);
1550 add_adj_this_to_map(ws, m, trigger::to_pop(this_slot));
1551 text::localised_format_box(ws, layout, box, "add_x_core", m);
1552 text::close_layout_box(layout, box);
1553 }
1554 return 0;
1555}
1557 {
1558 auto box = text::open_layout_box(layout, indentation);
1560 add_adj_from_to_map(ws, m, trigger::to_prov(from_slot));
1561 text::localised_format_box(ws, layout, box, "add_x_core", m);
1562 text::close_layout_box(layout, box);
1563 }
1564 return 0;
1565}
1567 {
1568 auto box = text::open_layout_box(layout, indentation);
1570 add_adj_from_to_map(ws, m, trigger::to_nation(from_slot));
1571 text::localised_format_box(ws, layout, box, "add_x_core", m);
1572 text::close_layout_box(layout, box);
1573 }
1574 return 0;
1575}
1577 {
1578 auto box = text::open_layout_box(layout, indentation);
1580 add_adj_from_to_map(ws, m, trigger::to_rebel(from_slot));
1581 text::localised_format_box(ws, layout, box, "add_x_core", m);
1582 text::close_layout_box(layout, box);
1583 }
1584 return 0;
1585}
1586
1588 auto prov = trigger::payload(tval[1]).prov_id;
1589 {
1590 auto box = text::open_layout_box(layout, indentation);
1591 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "add_core_to"));
1592 text::add_space_to_layout_box(ws, layout, box);
1593 text::add_to_layout_box(ws, layout, box, prov);
1594 text::close_layout_box(layout, box);
1595 }
1596 return 0;
1597}
1598
1600 {
1601 auto box = text::open_layout_box(layout, indentation);
1603 add_adj_this_to_map(ws, m, trigger::to_nation(this_slot));
1604 text::localised_format_box(ws, layout, box, "add_x_core", m);
1605 text::close_layout_box(layout, box);
1606 }
1607 return 0;
1608}
1610 {
1611 auto box = text::open_layout_box(layout, indentation);
1613 add_adj_this_to_map(ws, m, trigger::to_prov(this_slot));
1614 text::localised_format_box(ws, layout, box, "add_x_core", m);
1615 text::close_layout_box(layout, box);
1616 }
1617 return 0;
1618}
1620 {
1621 auto box = text::open_layout_box(layout, indentation);
1623 add_adj_this_to_map(ws, m, trigger::to_state(this_slot));
1624 text::localised_format_box(ws, layout, box, "add_x_core", m);
1625 text::close_layout_box(layout, box);
1626 }
1627 return 0;
1628}
1630 {
1631 auto box = text::open_layout_box(layout, indentation);
1633 add_adj_this_to_map(ws, m, trigger::to_pop(this_slot));
1634 text::localised_format_box(ws, layout, box, "add_x_core", m);
1635 text::close_layout_box(layout, box);
1636 }
1637 return 0;
1638}
1640 {
1641 auto box = text::open_layout_box(layout, indentation);
1643 add_adj_from_to_map(ws, m, trigger::to_nation(from_slot));
1644 text::localised_format_box(ws, layout, box, "add_x_core", m);
1645 text::close_layout_box(layout, box);
1646 }
1647 return 0;
1648}
1650 {
1651 auto box = text::open_layout_box(layout, indentation);
1653 add_adj_from_to_map(ws, m, trigger::to_prov(from_slot));
1654 text::localised_format_box(ws, layout, box, "add_x_core", m);
1655 text::close_layout_box(layout, box);
1656 }
1657 return 0;
1658}
1660 {
1661 auto box = text::open_layout_box(layout, indentation);
1663 add_adj_from_to_map(ws, m, trigger::to_rebel(from_slot));
1664 text::localised_format_box(ws, layout, box, "add_x_core", m);
1665 text::close_layout_box(layout, box);
1666 }
1667 return 0;
1668}
1670 auto tag = trigger::payload(tval[1]).tag_id;
1671 {
1672 auto box = text::open_layout_box(layout, indentation);
1674 text::add_to_substitution_map(m, text::variable_type::adj, ws.world.national_identity_get_adjective(tag));
1675 text::localised_format_box(ws, layout, box, "remove_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 prov = trigger::payload(tval[1]).prov_id;
1693 {
1694 auto box = text::open_layout_box(layout, indentation);
1695 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "remove_core_from"));
1696 text::add_space_to_layout_box(ws, layout, box);
1697 text::add_to_layout_box(ws, layout, box, prov);
1698 text::close_layout_box(layout, box);
1699 }
1700 return 0;
1701}
1703 {
1704 auto box = text::open_layout_box(layout, indentation);
1706 add_adj_this_to_map(ws, m, trigger::to_nation(this_slot));
1707 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1708 text::close_layout_box(layout, box);
1709 }
1710 return 0;
1711}
1713 {
1714 auto box = text::open_layout_box(layout, indentation);
1716 add_adj_this_to_map(ws, m, trigger::to_prov(this_slot));
1717 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1718 text::close_layout_box(layout, box);
1719 }
1720 return 0;
1721}
1723 {
1724 auto box = text::open_layout_box(layout, indentation);
1726 add_adj_this_to_map(ws, m, trigger::to_state(this_slot));
1727 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1728 text::close_layout_box(layout, box);
1729 }
1730 return 0;
1731}
1733 {
1734 auto box = text::open_layout_box(layout, indentation);
1736 add_adj_this_to_map(ws, m, trigger::to_pop(this_slot));
1737 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1738 text::close_layout_box(layout, box);
1739 }
1740 return 0;
1741}
1743 {
1744 auto box = text::open_layout_box(layout, indentation);
1746 add_adj_from_to_map(ws, m, trigger::to_nation(from_slot));
1747 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1748 text::close_layout_box(layout, box);
1749 }
1750 return 0;
1751}
1753 {
1754 auto box = text::open_layout_box(layout, indentation);
1756 add_adj_from_to_map(ws, m, trigger::to_prov(from_slot));
1757 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1758 text::close_layout_box(layout, box);
1759 }
1760 return 0;
1761}
1763 {
1764 auto box = text::open_layout_box(layout, indentation);
1766 add_adj_from_to_map(ws, m, trigger::to_rebel(from_slot));
1767 text::localised_format_box(ws, layout, box, "remove_x_core", m);
1768 text::close_layout_box(layout, box);
1769 }
1770 return 0;
1771}
1773 {
1774 auto box = text::open_layout_box(layout, indentation);
1776 dcon::text_key name{ dcon::text_key::value_base_t(trigger::read_int32_t_from_payload(tval + 1)) };
1778 text::localised_format_box(ws, layout, box, "change_name_to", 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_state_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 text::add_to_substitution_map(m, text::variable_type::text, ws.world.commodity_get_name(trigger::payload(tval[1]).com_id));
1799 text::localised_format_box(ws, layout, box, "change_rgo_production_to", m);
1800 text::close_layout_box(layout, box);
1801 }
1802 return 0;
1803}
1805 {
1806 auto box = text::open_layout_box(layout, indentation);
1808 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[1]).cul_id));
1809 text::localised_format_box(ws, layout, box, "make_accepted_culture", m);
1810 text::close_layout_box(layout, box);
1811 }
1812 return 0;
1813}
1815 {
1816 auto box = text::open_layout_box(layout, indentation);
1818 text::localised_format_box(ws, layout, box, "union_culture_accepted", m);
1819 text::close_layout_box(layout, box);
1820 }
1821 return 0;
1822}
1823
1825 {
1826 auto box = text::open_layout_box(layout, indentation);
1828 text::add_to_substitution_map(m, text::variable_type::text, ws.world.nation_get_primary_culture(trigger::to_nation(this_slot)).get_name());
1829 text::localised_format_box(ws, layout, box, "make_accepted_culture", m);
1830 text::close_layout_box(layout, box);
1831 }
1832 return 0;
1833}
1835 {
1836 auto box = text::open_layout_box(layout, indentation);
1838 text::add_to_substitution_map(m, text::variable_type::text, ws.world.nation_get_primary_culture(trigger::to_nation(from_slot)).get_name());
1839 text::localised_format_box(ws, layout, box, "make_accepted_culture", m);
1840 text::close_layout_box(layout, box);
1841 }
1842 return 0;
1843}
1844
1846 {
1847 auto box = text::open_layout_box(layout, indentation);
1849 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[1]).cul_id));
1850 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1851 text::close_layout_box(layout, box);
1852 }
1853 return 0;
1854}
1855dcon::nation_id convert_this(sys::state& ws, dcon::nation_id n) {
1856 return n;
1857}
1858dcon::nation_id convert_this(sys::state& ws, dcon::state_instance_id p) {
1859 return ws.world.state_instance_get_nation_from_state_ownership(p);
1860}
1861dcon::nation_id convert_this(sys::state& ws, dcon::province_id p) {
1862 return ws.world.province_get_nation_from_province_ownership(p);
1863}
1864dcon::nation_id convert_this(sys::state& ws, dcon::pop_id p) {
1865 return nations::owner_of_pop(ws, p);
1866}
1867dcon::nation_id convert_this(sys::state& ws, dcon::rebel_faction_id p) {
1868 auto fp = fatten(ws.world, p);
1869 return fp.get_defection_target().get_nation_from_identity_holder();
1870}
1871template<typename T, typename F>
1872void add_to_map(sys::state& ws, text::substitution_map& map, T v, std::string_view alt, F const& f) {
1873 if(v) {
1875 } else {
1876 if(auto k = ws.lookup_key(alt); k) {
1878 } else {
1880 }
1881 }
1882}
1884 {
1885 auto box = text::open_layout_box(layout, indentation);
1887 add_to_map(ws, m, trigger::to_nation(this_slot), "this_nation_culture",
1888 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1889 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1890 text::close_layout_box(layout, box);
1891 }
1892 return 0;
1893}
1895 {
1896 auto box = text::open_layout_box(layout, indentation);
1898 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation_culture",
1899 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1900 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1901 text::close_layout_box(layout, box);
1902 }
1903 return 0;
1904}
1906 {
1907 auto box = text::open_layout_box(layout, indentation);
1909 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation_culture",
1910 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1911 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1912 text::close_layout_box(layout, box);
1913 }
1914 return 0;
1915}
1917 {
1918 auto box = text::open_layout_box(layout, indentation);
1920 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation_culture",
1921 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1922 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1923 text::close_layout_box(layout, box);
1924 }
1925 return 0;
1926}
1928 {
1929 auto box = text::open_layout_box(layout, indentation);
1931 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation_culture",
1932 [&](auto id) { return ws.world.culture_get_name(ws.world.nation_get_primary_culture(id)); });
1933 text::localised_format_box(ws, layout, box, "primary_culture_changes_to", m);
1934 text::close_layout_box(layout, box);
1935 }
1936 return 0;
1937}
1939 {
1940 auto box = text::open_layout_box(layout, indentation);
1942 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[1]).cul_id));
1943 text::localised_format_box(ws, layout, box, "alice_remove_accepted_culture", m);
1944 text::close_layout_box(layout, box);
1945 }
1946 return 0;
1947}
1949 {
1950 auto box = text::open_layout_box(layout, indentation);
1952 text::localised_format_box(ws, layout, box, "life_rating", m);
1953 text::add_space_to_layout_box(ws, layout, box);
1954 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
1955 text::close_layout_box(layout, box);
1956 }
1957 return 0;
1958}
1960 {
1961 auto box = text::open_layout_box(layout, indentation);
1963 text::add_to_substitution_map(m, text::variable_type::text, ws.world.religion_get_name(trigger::payload(tval[1]).rel_id));
1964 text::localised_format_box(ws, layout, box, "make_national_religion", m);
1965 text::close_layout_box(layout, box);
1966 }
1967 return 0;
1968}
1970 {
1971 auto box = text::open_layout_box(layout, indentation);
1973 text::add_to_substitution_map(m, text::variable_type::text, ws.world.religion_get_name(trigger::payload(tval[1]).rel_id));
1974 text::localised_format_box(ws, layout, box, "make_province_religion", m);
1975 text::close_layout_box(layout, box);
1976 }
1977 return 0;
1978}
1980 {
1981 auto box = text::open_layout_box(layout, indentation);
1983 text::add_to_substitution_map(m, text::variable_type::text, ws.world.religion_get_name(trigger::payload(tval[1]).rel_id));
1984 text::localised_format_box(ws, layout, box, "make_pop_religion", m);
1985 text::close_layout_box(layout, box);
1986 }
1987 return 0;
1988}
1990 {
1991 auto box = text::open_layout_box(layout, indentation);
1993 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[1]).cul_id));
1994 text::localised_format_box(ws, layout, box, "make_pop_culture", m);
1995 text::close_layout_box(layout, box);
1996 }
1997 return 0;
1998}
2000 {
2001 auto box = text::open_layout_box(layout, indentation);
2003 text::localised_format_box(ws, layout, box, "make_slave_state", m);
2004 text::close_layout_box(layout, box);
2005 }
2006 return 0;
2007}
2009 {
2010 auto box = text::open_layout_box(layout, indentation);
2012 text::localised_format_box(ws, layout, box, "make_slave_pop", m);
2013 text::close_layout_box(layout, box);
2014 }
2015 return 0;
2016}
2018 {
2019 auto box = text::open_layout_box(layout, indentation);
2021 text::localised_format_box(ws, layout, box, "research_points", m);
2022 text::add_space_to_layout_box(ws, layout, box);
2023 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
2024 text::close_layout_box(layout, box);
2025 }
2026 return 0;
2027}
2029 auto box = text::open_layout_box(layout, indentation);
2031 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
2032 text::localised_format_box(ws, layout, box, "change_tech_school", m);
2033 text::close_layout_box(layout, box);
2034 if(ws.user_settings.spoilers) {
2035 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + +indentation_amount);
2036 }
2037 return 0;
2038}
2040 {
2041 auto box = text::open_layout_box(layout, indentation);
2044 ws.world.government_type_get_name(trigger::payload(tval[1]).gov_id));
2045 text::localised_format_box(ws, layout, box, "change_government_to", m);
2046 text::close_layout_box(layout, box);
2047 }
2048 return 0;
2049}
2051 {
2052 auto box = text::open_layout_box(layout, indentation);
2054 if(from_slot != -1) {
2055 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)));
2056 if(new_gov)
2057 text::add_to_substitution_map(m, text::variable_type::text, ws.world.government_type_get_name(new_gov));
2058 }
2059 text::localised_format_box(ws, layout, box, "change_government_to", m);
2060 text::close_layout_box(layout, box);
2061 }
2062 return 0;
2063}
2065 auto amount = trigger::read_float_from_payload(tval + 1);
2066 {
2067 auto box = text::open_layout_box(layout, indentation);
2068 display_value(text::fp_currency{ amount }, true, ws, layout, box);
2070 text::localised_format_box(ws, layout, box, "add_to_treasury", m);
2071 text::close_layout_box(layout, box);
2072 }
2073 return 0;
2074}
2076 auto amount = trigger::read_float_from_payload(tval + 1) / 100.0f;
2077
2078 {
2079 auto box = text::open_layout_box(layout, indentation);
2081 text::localised_format_box(ws, layout, box, "military_war_exhaustion", m);
2082 text::add_space_to_layout_box(ws, layout, box);
2083 display_value(text::fp_percentage{ amount }, false, ws, layout, box);
2084 text::close_layout_box(layout, box);
2085 }
2086 return 0;
2087}
2089 auto delta = trigger::read_float_from_payload(tval + 1);
2090 float change = delta;
2091 if(primary_slot != -1) {
2092 auto prestige_multiplier =
2093 1.0f + ws.world.nation_get_modifier_values(trigger::to_nation(primary_slot), sys::national_mod_offsets::prestige);
2094 auto new_prestige = std::max(0.0f,
2095 ws.world.nation_get_prestige(trigger::to_nation(primary_slot)) + (delta > 0 ? (delta * prestige_multiplier) : delta));
2096 change = (new_prestige - ws.world.nation_get_prestige(trigger::to_nation(primary_slot)));
2097 }
2098 {
2099 auto box = text::open_layout_box(layout, indentation);
2101 text::localised_format_box(ws, layout, box, "prestige", m);
2102 text::add_space_to_layout_box(ws, layout, box);
2103 display_value(int64_t(change), true, ws, layout, box);
2104 text::close_layout_box(layout, box);
2105 }
2106 return 0;
2107}
2109 {
2110 auto box = text::open_layout_box(layout, indentation);
2113 text::localised_format_box(ws, layout, box, "become_blank", m);
2114 text::close_layout_box(layout, box);
2115 }
2116 return 0;
2117}
2119 {
2120 auto box = text::open_layout_box(layout, indentation);
2122 if(primary_slot != -1) {
2123 auto prim_culture = ws.world.nation_get_primary_culture(trigger::to_nation(primary_slot));
2124 auto cg = ws.world.culture_get_group_from_culture_group_membership(prim_culture);
2125 auto u = ws.world.culture_group_get_identity_from_cultural_union_of(cg);
2127 } else {
2128 if(auto k = ws.lookup_key(std::string_view("cultural_union_nation")); k) {
2130 }
2131 }
2132 text::localised_format_box(ws, layout, box, "become_blank", m);
2133 text::close_layout_box(layout, box);
2134 }
2135 return 0;
2136}
2138 {
2139 auto box = text::open_layout_box(layout, indentation);
2142 text::localised_format_box(ws, layout, box, "player_control_change", m);
2143 text::close_layout_box(layout, box);
2144 }
2145 return 0;
2146}
2148 {
2149 auto box = text::open_layout_box(layout, indentation);
2151 if(primary_slot != -1) {
2152 auto prim_culture = ws.world.nation_get_primary_culture(trigger::to_nation(primary_slot));
2153 auto cg = ws.world.culture_get_group_from_culture_group_membership(prim_culture);
2154 auto u = ws.world.culture_group_get_identity_from_cultural_union_of(cg);
2156 } else {
2157 if(auto k = ws.lookup_key(std::string_view("cultural_union_nation")); k) {
2159 }
2160 }
2161 text::localised_format_box(ws, layout, box, "player_control_change", m);
2162 text::close_layout_box(layout, box);
2163 }
2164 return 0;
2165}
2167 if(ws.user_settings.spoilers) {
2168 auto box = text::open_layout_box(layout, indentation);
2171 ws.national_definitions.flag_variable_names[trigger::payload(tval[1]).natf_id]);
2172 text::localised_format_box(ws, layout, box, "set_national_flag", m);
2173 text::close_layout_box(layout, box);
2174 }
2175 return 0;
2176}
2178 if(ws.user_settings.spoilers) {
2179 auto box = text::open_layout_box(layout, indentation);
2182 ws.national_definitions.flag_variable_names[trigger::payload(tval[1]).natf_id]);
2183 text::localised_format_box(ws, layout, box, "remove_national_flag", m);
2184 text::close_layout_box(layout, box);
2185 }
2186 return 0;
2187}
2189 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2190 if(target) {
2191 auto box = text::open_layout_box(layout, indentation);
2194 text::localised_format_box(ws, layout, box, "get_access_with", m);
2195 text::close_layout_box(layout, box);
2196 }
2197 return 0;
2198}
2200 {
2201 auto box = text::open_layout_box(layout, indentation);
2203 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2204 text::localised_format_box(ws, layout, box, "get_access_with", m);
2205 text::close_layout_box(layout, box);
2206 }
2207 return 0;
2208}
2210 {
2211 auto box = text::open_layout_box(layout, indentation);
2213 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2214 text::localised_format_box(ws, layout, box, "get_access_with", m);
2215 text::close_layout_box(layout, box);
2216 }
2217 return 0;
2218}
2220 {
2221 auto box = text::open_layout_box(layout, indentation);
2223 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
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_prov(from_slot)), "from_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 auto amount = trigger::read_float_from_payload(tval + 1);
2241 {
2242 auto box = text::open_layout_box(layout, indentation);
2244 text::localised_format_box(ws, layout, box, "infamy", m);
2245 text::add_space_to_layout_box(ws, layout, box);
2246 display_value(text::fp_one_place{ amount }, false, ws, layout, box);
2247 text::close_layout_box(layout, box);
2248 }
2249 return 0;
2250}
2252 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2253 if(target) {
2254 auto box = text::open_layout_box(layout, indentation);
2257 text::localised_format_box(ws, layout, box, "change_province_owner", m);
2258 text::close_layout_box(layout, box);
2259 }
2260 return 0;
2261}
2263 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2264 if(target) {
2265 auto box = text::open_layout_box(layout, indentation);
2268 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2269 text::close_layout_box(layout, box);
2270 }
2271 return 0;
2272}
2274 {
2275 auto box = text::open_layout_box(layout, indentation);
2277 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2278 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2279 text::close_layout_box(layout, box);
2280 }
2281 return 0;
2282}
2284 {
2285 auto box = text::open_layout_box(layout, indentation);
2287 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
2288 text::localised_format_box(ws, layout, box, "change_state_owner", m);
2289 text::close_layout_box(layout, box);
2290 }
2291 return 0;
2292}
2294 {
2295 auto box = text::open_layout_box(layout, indentation);
2297 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
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_pop(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_nation(from_slot)), "from_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(from_slot)), "from_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_rebel(from_slot)), "from_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(this_slot)), "this_nation", [](auto x) { return x; });
2348 text::localised_format_box(ws, layout, box, "change_province_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_state(this_slot)), "this_nation", [](auto x) { return x; });
2358 text::localised_format_box(ws, layout, box, "change_province_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_prov(this_slot)), "this_nation", [](auto x) { return x; });
2368 text::localised_format_box(ws, layout, box, "change_province_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_pop(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_nation(from_slot)), "from_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(from_slot)), "from_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_rebel(from_slot)), "from_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 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2415 if(target) {
2416 auto box = text::open_layout_box(layout, indentation);
2419 text::localised_format_box(ws, layout, box, "annex_effect", m);
2420 text::close_layout_box(layout, box);
2421 }
2422 return 0;
2423}
2425 {
2426 auto box = text::open_layout_box(layout, indentation);
2428 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2429 text::localised_format_box(ws, layout, box, "annex_effect", m);
2430 text::close_layout_box(layout, box);
2431 }
2432 return 0;
2433}
2435 {
2436 auto box = text::open_layout_box(layout, indentation);
2438 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
2439 text::localised_format_box(ws, layout, box, "annex_effect", m);
2440 text::close_layout_box(layout, box);
2441 }
2442 return 0;
2443}
2445 {
2446 auto box = text::open_layout_box(layout, indentation);
2448 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
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_pop(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_nation(from_slot)), "from_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(from_slot)), "from_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 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2486 if(target) {
2487 auto box = text::open_layout_box(layout, indentation);
2490 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2491 text::close_layout_box(layout, box);
2492 }
2493 return 0;
2494}
2496 {
2497 auto box = text::open_layout_box(layout, indentation);
2499 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2500 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2501 text::close_layout_box(layout, box);
2502 }
2503 return 0;
2504}
2506 {
2507 auto box = text::open_layout_box(layout, indentation);
2509 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
2510 text::localised_format_box(ws, layout, box, "annexed_by_effect", m);
2511 text::close_layout_box(layout, box);
2512 }
2513 return 0;
2514}
2516 {
2517 auto box = text::open_layout_box(layout, indentation);
2519 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
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_pop(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_nation(from_slot)), "from_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(from_slot)), "from_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);
2560 text::localised_format_box(ws, layout, box, "core_return", 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(this_slot)), "this_nation", [](auto x) { return x; });
2570 text::localised_format_box(ws, layout, box, "core_return", 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_state(this_slot)), "this_nation", [](auto x) { return x; });
2580 text::localised_format_box(ws, layout, box, "core_return", m);
2581 text::close_layout_box(layout, box);
2582 }
2583 return 0;
2584}
2586 {
2587 auto box = text::open_layout_box(layout, indentation);
2589 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
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_pop(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_nation(from_slot)), "from_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(from_slot)), "from_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 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2627 if(target) {
2628 auto box = text::open_layout_box(layout, indentation);
2631 text::localised_format_box(ws, layout, box, "change_province_controller", m);
2632 text::close_layout_box(layout, box);
2633 }
2634 return 0;
2635}
2637 {
2638 auto box = text::open_layout_box(layout, indentation);
2640 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2641 text::localised_format_box(ws, layout, box, "change_province_controller", m);
2642 text::close_layout_box(layout, box);
2643 }
2644 return 0;
2645}
2647 {
2648 auto box = text::open_layout_box(layout, indentation);
2650 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2651 text::localised_format_box(ws, layout, box, "change_province_controller", m);
2652 text::close_layout_box(layout, box);
2653 }
2654 return 0;
2655}
2657 {
2658 auto box = text::open_layout_box(layout, indentation);
2660 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
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_prov(from_slot)), "from_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 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2678 if(target) {
2679 auto box = text::open_layout_box(layout, indentation);
2682 text::localised_format_box(ws, layout, box, "change_state_controller", m);
2683 text::close_layout_box(layout, box);
2684 }
2685 return 0;
2686}
2688 {
2689 auto box = text::open_layout_box(layout, indentation);
2691 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2692 text::localised_format_box(ws, layout, box, "change_state_controller", m);
2693 text::close_layout_box(layout, box);
2694 }
2695 return 0;
2696}
2698 {
2699 auto box = text::open_layout_box(layout, indentation);
2701 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2702 text::localised_format_box(ws, layout, box, "change_state_controller", m);
2703 text::close_layout_box(layout, box);
2704 }
2705 return 0;
2706}
2708 {
2709 auto box = text::open_layout_box(layout, indentation);
2711 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
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_prov(from_slot)), "from_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}
2729 auto amount = trigger::payload(tval[1]).signed_value;
2730 {
2731 auto box = text::open_layout_box(layout, indentation);
2734 text::add_space_to_layout_box(ws, layout, box);
2735 display_value(int64_t(amount), true, ws, layout, box);
2736 text::close_layout_box(layout, box);
2737 }
2738 return 0;
2739}
2741 auto amount = trigger::read_float_from_payload(tval + 1);
2742 {
2743 auto box = text::open_layout_box(layout, indentation);
2745 text::localised_format_box(ws, layout, box, "pop_savings", m);
2746 text::add_space_to_layout_box(ws, layout, box);
2747 display_value(text::fp_currency{ amount }, true, ws, layout, box);
2748 text::close_layout_box(layout, box);
2749 }
2750 return 0;
2751}
2753 auto amount = trigger::payload(tval[1]).signed_value;
2754 {
2755 auto box = text::open_layout_box(layout, indentation);
2757 text::localised_format_box(ws, layout, box, "leadership_points", m);
2758 text::add_space_to_layout_box(ws, layout, box);
2759 display_value(int64_t(amount), true, ws, layout, box);
2760 text::close_layout_box(layout, box);
2761 }
2762 return 0;
2763}
2765 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2766 if(target) {
2767 auto box = text::open_layout_box(layout, indentation);
2770 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
2771 text::close_layout_box(layout, box);
2772 }
2773 return 0;
2774}
2776 {
2777 auto box = text::open_layout_box(layout, indentation);
2779 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2780 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
2781 text::close_layout_box(layout, box);
2782 }
2783 return 0;
2784}
2786 {
2787 auto box = text::open_layout_box(layout, indentation);
2789 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2790 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
2791 text::close_layout_box(layout, box);
2792 }
2793 return 0;
2794}
2796 {
2797 auto box = text::open_layout_box(layout, indentation);
2799 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
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_prov(from_slot)), "from_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 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2817 if(target) {
2818 auto box = text::open_layout_box(layout, indentation);
2821 text::localised_format_box(ws, layout, box, "lose_access_with", m);
2822 text::close_layout_box(layout, box);
2823 }
2824 return 0;
2825}
2827 {
2828 auto box = text::open_layout_box(layout, indentation);
2830 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2831 text::localised_format_box(ws, layout, box, "lose_access_with", m);
2832 text::close_layout_box(layout, box);
2833 }
2834 return 0;
2835}
2837 {
2838 auto box = text::open_layout_box(layout, indentation);
2840 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2841 text::localised_format_box(ws, layout, box, "lose_access_with", m);
2842 text::close_layout_box(layout, box);
2843 }
2844 return 0;
2845}
2847 {
2848 auto box = text::open_layout_box(layout, indentation);
2850 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
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_prov(from_slot)), "from_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 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2868 if(target) {
2869 auto box = text::open_layout_box(layout, indentation);
2872 text::localised_format_box(ws, layout, box, "end_alliance", m);
2873 text::close_layout_box(layout, box);
2874 }
2875 return 0;
2876}
2878 {
2879 auto box = text::open_layout_box(layout, indentation);
2881 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2882 text::localised_format_box(ws, layout, box, "end_alliance", m);
2883 text::close_layout_box(layout, box);
2884 }
2885 return 0;
2886}
2888 {
2889 auto box = text::open_layout_box(layout, indentation);
2891 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2892 text::localised_format_box(ws, layout, box, "end_alliance", m);
2893 text::close_layout_box(layout, box);
2894 }
2895 return 0;
2896}
2898 {
2899 auto box = text::open_layout_box(layout, indentation);
2901 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
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_prov(from_slot)), "from_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 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
2919 if(target) {
2920 auto box = text::open_layout_box(layout, indentation);
2923 text::localised_format_box(ws, layout, box, "end_war_with", m);
2924 text::close_layout_box(layout, box);
2925 }
2926 return 0;
2927}
2929 {
2930 auto box = text::open_layout_box(layout, indentation);
2932 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
2933 text::localised_format_box(ws, layout, box, "end_war_with", m);
2934 text::close_layout_box(layout, box);
2935 }
2936 return 0;
2937}
2939 {
2940 auto box = text::open_layout_box(layout, indentation);
2942 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
2943 text::localised_format_box(ws, layout, box, "end_war_with", m);
2944 text::close_layout_box(layout, box);
2945 }
2946 return 0;
2947}
2949 {
2950 auto box = text::open_layout_box(layout, indentation);
2952 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
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_prov(from_slot)), "from_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 auto box = text::open_layout_box(layout, indentation);
2971 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
2972 text::localised_format_box(ws, layout, box, "enable_ideology", m);
2973 text::close_layout_box(layout, box);
2974 return 0;
2975}
2977 auto box = text::open_layout_box(layout, indentation);
2979 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
2980 text::localised_format_box(ws, layout, box, "change_ruling_party", m);
2981 text::close_layout_box(layout, box);
2982 return 0;
2983}
2985 auto amount = trigger::read_float_from_payload(tval + 1) / 100.0f;
2986 {
2987 auto box = text::open_layout_box(layout, indentation);
2989 text::localised_format_box(ws, layout, box, "plurality", m);
2990 text::add_space_to_layout_box(ws, layout, box);
2991 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
2992 text::close_layout_box(layout, box);
2993 }
2994 return 0;
2995}
2997 auto box = text::open_layout_box(layout, indentation);
2999 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3000 text::localised_format_box(ws, layout, box, "remove_prov_mod", m);
3001 text::close_layout_box(layout, box);
3002 if(ws.user_settings.spoilers) {
3003 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3004 }
3005 return 0;
3006}
3008 auto box = text::open_layout_box(layout, indentation);
3010 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3011 text::localised_format_box(ws, layout, box, "remove_nat_mod", m);
3012 text::close_layout_box(layout, box);
3013 if(ws.user_settings.spoilers) {
3014 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3015 }
3016 return 0;
3017}
3019 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
3020 if(target) {
3021 auto box = text::open_layout_box(layout, indentation);
3024 text::localised_format_box(ws, layout, box, "make_alliance", m);
3025 text::close_layout_box(layout, box);
3026 }
3027 return 0;
3028}
3030 {
3031 auto box = text::open_layout_box(layout, indentation);
3033 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3034 text::localised_format_box(ws, layout, box, "make_alliance", m);
3035 text::close_layout_box(layout, box);
3036 }
3037 return 0;
3038}
3040 {
3041 auto box = text::open_layout_box(layout, indentation);
3043 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
3044 text::localised_format_box(ws, layout, box, "make_alliance", m);
3045 text::close_layout_box(layout, box);
3046 }
3047 return 0;
3048}
3050 {
3051 auto box = text::open_layout_box(layout, indentation);
3053 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
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_prov(from_slot)), "from_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 auto holder = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
3071 if(!holder)
3072 return 0;
3073 auto hprovs = ws.world.nation_get_province_ownership(holder);
3074 if(hprovs.begin() == hprovs.end()) {
3075 auto box = text::open_layout_box(layout, indentation);
3078 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3079 text::close_layout_box(layout, box);
3080 } else {
3081 auto box = text::open_layout_box(layout, indentation);
3084 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3085 text::close_layout_box(layout, box);
3086 }
3087 return 0;
3088}
3090 auto holder = trigger::to_nation(this_slot);
3091 auto hprovs = ws.world.nation_get_province_ownership(holder);
3092 if(hprovs.begin() == hprovs.end()) {
3093 auto box = text::open_layout_box(layout, indentation);
3096 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3097 text::close_layout_box(layout, box);
3098 } else {
3099 auto box = text::open_layout_box(layout, indentation);
3101 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3102 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3103 text::close_layout_box(layout, box);
3104 }
3105 return 0;
3106}
3108 auto holder = ws.world.province_get_nation_from_province_ownership(trigger::to_prov(this_slot));
3109 auto hprovs = ws.world.nation_get_province_ownership(holder);
3110 if(hprovs.begin() == hprovs.end()) {
3111 auto box = text::open_layout_box(layout, indentation);
3114 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3115 text::close_layout_box(layout, box);
3116 } else {
3117 auto box = text::open_layout_box(layout, indentation);
3119 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
3120 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3121 text::close_layout_box(layout, box);
3122 }
3123 return 0;
3124}
3126 auto holder = trigger::to_nation(from_slot);
3127 auto hprovs = ws.world.nation_get_province_ownership(holder);
3128 if(hprovs.begin() == hprovs.end()) {
3129 auto box = text::open_layout_box(layout, indentation);
3132 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3133 text::close_layout_box(layout, box);
3134 } else {
3135 auto box = text::open_layout_box(layout, indentation);
3137 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
3138 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3139 text::close_layout_box(layout, box);
3140 }
3141 return 0;
3142}
3144 auto holder = ws.world.province_get_nation_from_province_ownership(trigger::to_prov(from_slot));
3145 auto hprovs = ws.world.nation_get_province_ownership(holder);
3146 if(hprovs.begin() == hprovs.end()) {
3147 auto box = text::open_layout_box(layout, indentation);
3150 text::localised_format_box(ws, layout, box, "release_as_vassal", m);
3151 text::close_layout_box(layout, box);
3152 } else {
3153 auto box = text::open_layout_box(layout, indentation);
3155 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
3156 text::localised_format_box(ws, layout, box, "becomes_independent", m);
3157 text::close_layout_box(layout, box);
3158 }
3159 return 0;
3160}
3162 auto box = text::open_layout_box(layout, indentation);
3164 add_to_map(ws, m, convert_this(ws, trigger::to_rebel(from_slot)), "from_nation", [](auto x) { return x; });
3165 text::localised_format_box(ws, layout, box, "release_as_independent", m);
3166 text::close_layout_box(layout, box);
3167 return 0;
3168}
3170 auto box = text::open_layout_box(layout, indentation);
3171 text::localised_format_box(ws, layout, box, "no_effect");
3172 text::close_layout_box(layout, box);
3173 return 0;
3174}
3176 auto box = text::open_layout_box(layout, indentation);
3178 dcon::text_key name{ dcon::text_key::value_base_t(trigger::read_int32_t_from_payload(tval + 1)) };
3180 text::localised_format_box(ws, layout, box, "change_name_to", m);
3181 text::close_layout_box(layout, box);
3182 return 0;
3183}
3185 auto box = text::open_layout_box(layout, indentation);
3187 auto canal_name = text::produce_simple_string(ws, std::string("canal_") + std::to_string(tval[1]));
3188 text::add_to_substitution_map(m, text::variable_type::name, std::string_view{ canal_name });
3189 text::localised_format_box(ws, layout, box, "enable_canal", m);
3190 text::close_layout_box(layout, box);
3191 return 0;
3192}
3194 if(ws.user_settings.spoilers) {
3195 auto box = text::open_layout_box(layout, indentation);
3198 ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1]).glob_id]);
3199 text::localised_format_box(ws, layout, box, "set_global_flag", m);
3200 text::close_layout_box(layout, box);
3201 }
3202 return 0;
3203}
3205 if(ws.user_settings.spoilers) {
3206 auto box = text::open_layout_box(layout, indentation);
3209 ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1]).glob_id]);
3210 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
3211 text::close_layout_box(layout, box);
3212 }
3213 return 0;
3214}
3216 auto box = text::open_layout_box(layout, indentation);
3218 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3219 text::localised_format_box(ws, layout, box, "change_national_value", m);
3220 text::close_layout_box(layout, box);
3221 if(ws.user_settings.spoilers) {
3222 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3223 }
3224 return 0;
3225}
3227 auto box = text::open_layout_box(layout, indentation);
3229 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3230 text::localised_format_box(ws, layout, box, "change_national_value", m);
3231 text::close_layout_box(layout, box);
3232 if(ws.user_settings.spoilers) {
3233 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3234 }
3235 return 0;
3236}
3238 {
3239 auto box = text::open_layout_box(layout, indentation);
3240 text::localised_format_box(ws, layout, box, "become_civ");
3241 text::close_layout_box(layout, box);
3242 }
3243 return 0;
3244}
3246 {
3247 auto box = text::open_layout_box(layout, indentation);
3248 text::localised_format_box(ws, layout, box, "become_unciv");
3249 text::close_layout_box(layout, box);
3250 }
3251 return 0;
3252}
3254 {
3255 auto box = text::open_layout_box(layout, indentation);
3256 text::localised_format_box(ws, layout, box, "free_slave_state");
3257 text::close_layout_box(layout, box);
3258 }
3259 return 0;
3260}
3262 {
3263 auto box = text::open_layout_box(layout, indentation);
3264 text::localised_format_box(ws, layout, box, "free_slave_pop");
3265 text::close_layout_box(layout, box);
3266 }
3267 return 0;
3268}
3270 {
3271 auto box = text::open_layout_box(layout, indentation);
3272 text::localised_format_box(ws, layout, box, "hold_election");
3273 text::close_layout_box(layout, box);
3274 }
3275 return 0;
3276}
3278 {
3279 auto opt = fatten(ws.world, trigger::payload(tval[1]).opt_id);
3280
3281 auto box = text::open_layout_box(layout, indentation);
3283 text::add_to_substitution_map(m, text::variable_type::issue, opt.get_parent_issue().get_name());
3285 text::localised_format_box(ws, layout, box, "issue_change", m);
3286 text::close_layout_box(layout, box);
3287 }
3288 return 0;
3289}
3291 {
3292 auto opt = fatten(ws.world, trigger::payload(tval[1]).opt_id);
3293
3294 auto box = text::open_layout_box(layout, indentation);
3296 text::add_to_substitution_map(m, text::variable_type::issue, opt.get_parent_issue().get_name());
3298 text::localised_format_box(ws, layout, box, "issue_change", m);
3299 text::close_layout_box(layout, box);
3300 }
3301 return 0;
3302}
3304 auto amount = trigger::read_float_from_payload(tval + 1);
3305 if(primary_slot != -1) {
3306 auto income = ws.world.nation_get_total_poor_income(trigger::to_nation(primary_slot)) +
3307 ws.world.nation_get_total_middle_income(trigger::to_nation(primary_slot)) +
3308 ws.world.nation_get_total_rich_income(trigger::to_nation(primary_slot));
3309 auto combined_amount = income * amount;
3310
3311 auto box = text::open_layout_box(layout, indentation);
3312 display_value(text::fp_currency{ combined_amount }, true, ws, layout, box);
3314 text::localised_format_box(ws, layout, box, "add_to_treasury", m);
3315 text::close_layout_box(layout, box);
3316 } else {
3317 auto box = text::open_layout_box(layout, indentation);
3318 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
3320 text::localised_format_box(ws, layout, box, "add_relative_income", m);
3321 text::close_layout_box(layout, box);
3322 }
3323 return 0;
3324}
3326 {
3327 auto box = text::open_layout_box(layout, indentation);
3328 text::localised_format_box(ws, layout, box, "make_neutral");
3329 text::close_layout_box(layout, box);
3330 }
3331 return 0;
3332}
3334 auto box = text::open_layout_box(layout, indentation);
3336 text::localised_format_box(ws, layout, box, "pop_size", m);
3337 text::add_space_to_layout_box(ws, layout, box);
3338 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 1) - 1.0f }, true, ws, layout, box);
3339 text::close_layout_box(layout, box);
3340 return 0;
3341}
3343 auto box = text::open_layout_box(layout, indentation);
3345 text::localised_format_box(ws, layout, box, "pop_size", m);
3346 text::add_space_to_layout_box(ws, layout, box);
3347 display_value(-1 * trigger::read_int32_t_from_payload(tval + 1), true, ws, layout, box);
3348
3349 text::close_layout_box(layout, box);
3350 return 0;
3351}
3353 {
3354 auto box = text::open_layout_box(layout, indentation);
3357 text::localised_format_box(ws, layout, box, "move_pop_to", m);
3358 text::close_layout_box(layout, box);
3359 }
3360 return 0;
3361}
3363 {
3364 auto box = text::open_layout_box(layout, indentation);
3366 text::add_to_substitution_map(m, text::variable_type::text, ws.world.pop_type_get_name(trigger::payload(tval[1]).popt_id));
3367 text::localised_format_box(ws, layout, box, "change_pop_type", m);
3368 text::close_layout_box(layout, box);
3369 }
3370 return 0;
3371}
3373 if(primary_slot != -1) {
3374 auto amount = trigger::read_float_from_payload(tval + 1);
3375 auto result = nations::daily_research_points(ws, trigger::to_nation(primary_slot)) * 365.0f * amount;
3376
3377 auto box = text::open_layout_box(layout, indentation);
3379 text::localised_format_box(ws, layout, box, "research_points", m);
3380 text::add_space_to_layout_box(ws, layout, box);
3381 display_value(int64_t(result), true, ws, layout, box);
3382 text::close_layout_box(layout, box);
3383 return 0;
3384 } else {
3385 auto box = text::open_layout_box(layout, indentation);
3387 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3388 text::localised_format_box(ws, layout, box, "years_of_research", m);
3389 text::close_layout_box(layout, box);
3390 return 0;
3391 }
3392}
3394 auto box = text::open_layout_box(layout, indentation);
3396 text::localised_format_box(ws, layout, box, "prestige", m);
3397 text::add_space_to_layout_box(ws, layout, box);
3398 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3399 text::close_layout_box(layout, box);
3400 return 0;
3401}
3403 auto box = text::open_layout_box(layout, indentation);
3405 text::localised_format_box(ws, layout, box, "prestige", m);
3406 text::add_space_to_layout_box(ws, layout, box);
3407 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3408 text::close_layout_box(layout, box);
3409 return 0;
3410}
3412 {
3413 auto opt = fatten(ws.world, trigger::payload(tval[1]).ropt_id);
3414
3415 auto box = text::open_layout_box(layout, indentation);
3417 text::add_to_substitution_map(m, text::variable_type::issue, opt.get_parent_reform().get_name());
3419 text::localised_format_box(ws, layout, box, "issue_change", m);
3420 text::close_layout_box(layout, box);
3421 }
3422 return 0;
3423}
3425 {
3426 auto opt = fatten(ws.world, trigger::payload(tval[1]).ropt_id);
3427
3428 auto box = text::open_layout_box(layout, indentation);
3430 text::add_to_substitution_map(m, text::variable_type::issue, opt.get_parent_reform().get_name());
3432 text::localised_format_box(ws, layout, box, "issue_change", m);
3433 text::close_layout_box(layout, box);
3434 }
3435 return 0;
3436}
3438 {
3439 auto box = text::open_layout_box(layout, indentation);
3442 text::localised_format_box(ws, layout, box, "remove_mil_reforms", m);
3443 text::close_layout_box(layout, box);
3444 }
3445 return tval[1];
3446}
3448 {
3449 auto box = text::open_layout_box(layout, indentation);
3452 text::localised_format_box(ws, layout, box, "remove_econ_reforms", m);
3453 text::close_layout_box(layout, box);
3454 }
3455 return tval[1];
3456}
3458 {
3459 auto box = text::open_layout_box(layout, indentation);
3462 ws.culture_definitions.crimes[trigger::payload(tval[1]).crm_id].name);
3463 text::localised_format_box(ws, layout, box, "add_crime", m);
3464 text::close_layout_box(layout, box);
3465 }
3466 return 0;
3467}
3469 {
3470 auto box = text::open_layout_box(layout, indentation);
3472 text::localised_format_box(ws, layout, box, "remove_crime", m);
3473 text::close_layout_box(layout, box);
3474 }
3475 return 0;
3476}
3478 {
3479 auto box = text::open_layout_box(layout, indentation);
3481 text::localised_format_box(ws, layout, box, "perform_nationalization", m);
3482 text::close_layout_box(layout, box);
3483 }
3484 return 0;
3485}
3487 {
3488 auto box = text::open_layout_box(layout, indentation);
3490 text::add_to_substitution_map(m, text::variable_type::text, ws.world.factory_type_get_name(trigger::payload(tval[1]).fac_id));
3491 text::localised_format_box(ws, layout, box, "build_factory_in_capital", m);
3492 text::close_layout_box(layout, box);
3493 }
3494 return 0;
3495}
3497 {
3498 auto box = text::open_layout_box(layout, indentation);
3500 text::add_to_substitution_map(m, text::variable_type::text, ws.world.technology_get_name(trigger::payload(tval[1]).tech_id));
3501 text::localised_format_box(ws, layout, box, "enable_technology", m);
3502 text::close_layout_box(layout, box);
3503 }
3504 return 0;
3505}
3507 {
3508 auto box = text::open_layout_box(layout, indentation);
3510 text::add_to_substitution_map(m, text::variable_type::text, ws.world.invention_get_name(trigger::payload(tval[1]).invt_id));
3511 text::localised_format_box(ws, layout, box, "enable_invention", 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::localised_format_box(ws, layout, box, "enable_great_wars", m);
3521 text::close_layout_box(layout, box);
3522 }
3523 return 0;
3524}
3526 {
3527 auto box = text::open_layout_box(layout, indentation);
3529 text::localised_format_box(ws, layout, box, "disable_great_wars", m);
3530 text::close_layout_box(layout, box);
3531 }
3532 return 0;
3533}
3535 {
3536 auto box = text::open_layout_box(layout, indentation);
3538 text::localised_format_box(ws, layout, box, "enable_world_wars", m);
3539 text::close_layout_box(layout, box);
3540 }
3541 return 0;
3542}
3544 {
3545 auto box = text::open_layout_box(layout, indentation);
3547 text::localised_format_box(ws, layout, box, "disable_world_wars", m);
3548 text::close_layout_box(layout, box);
3549 }
3550 return 0;
3551}
3553 if(auto owner = ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot)); owner) {
3554 auto owner_c = ws.world.nation_get_primary_culture(owner);
3555
3556 auto box = text::open_layout_box(layout, indentation);
3558 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(owner_c));
3559 text::localised_format_box(ws, layout, box, "assimilate_province", m);
3560 text::close_layout_box(layout, box);
3561
3562 return 0;
3563 } else {
3564 auto box = text::open_layout_box(layout, indentation);
3566 std::string t = text::produce_simple_string(ws, "owner_primary_culture");
3568 text::localised_format_box(ws, layout, box, "assimilate_province", m);
3569 text::close_layout_box(layout, box);
3570 }
3571 return 0;
3572}
3574 if(auto owner = ws.world.state_instance_get_nation_from_state_ownership(trigger::to_state(primary_slot)); owner) {
3575 auto owner_c = ws.world.nation_get_primary_culture(owner);
3576
3577 auto box = text::open_layout_box(layout, indentation);
3579 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(owner_c));
3580 text::localised_format_box(ws, layout, box, "assimilate_province", m);
3581 text::close_layout_box(layout, box);
3582
3583 return 0;
3584 } else {
3585 auto box = text::open_layout_box(layout, indentation);
3587 std::string t = text::produce_simple_string(ws, "owner_primary_culture");
3589 text::localised_format_box(ws, layout, box, "assimilate_province", m);
3590 text::close_layout_box(layout, box);
3591 }
3592 return 0;
3593}
3595 if(auto owner = nations::owner_of_pop(ws, trigger::to_pop(primary_slot)); owner) {
3596 auto owner_c = ws.world.nation_get_primary_culture(owner);
3597
3598 auto box = text::open_layout_box(layout, indentation);
3600 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(owner_c));
3601 text::localised_format_box(ws, layout, box, "assimilate_pop", m);
3602 text::close_layout_box(layout, box);
3603
3604 return 0;
3605 } else {
3606 auto box = text::open_layout_box(layout, indentation);
3608 std::string t = text::produce_simple_string(ws, "owner_primary_culture");
3610 text::localised_format_box(ws, layout, box, "assimilate_pop", m);
3611 text::close_layout_box(layout, box);
3612 }
3613 return 0;
3614}
3616 auto box = text::open_layout_box(layout, indentation);
3618 text::localised_format_box(ws, layout, box, "literacy", m);
3619 text::add_space_to_layout_box(ws, layout, box);
3620 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3621 text::close_layout_box(layout, box);
3622 return 0;
3623}
3625 auto box = text::open_layout_box(layout, indentation);
3627 text::localised_format_box(ws, layout, box, "add_crisis_interest", m);
3628 text::close_layout_box(layout, box);
3629 return 0;
3630}
3632 auto box = text::open_layout_box(layout, indentation);
3634 text::localised_format_box(ws, layout, box, "flashpoint_tension_label", m);
3635 text::add_space_to_layout_box(ws, layout, box);
3636 display_value(int64_t(trigger::read_float_from_payload(tval + 1)), true, ws, layout, box);
3637 text::close_layout_box(layout, box);
3638 return 0;
3639}
3641 auto box = text::open_layout_box(layout, indentation);
3643 text::localised_format_box(ws, layout, box, "crisis_temperature_plain", m);
3644 text::add_space_to_layout_box(ws, layout, box);
3645 display_value(int64_t(trigger::read_float_from_payload(tval + 1)), true, ws, layout, box);
3646 text::close_layout_box(layout, box);
3647 return 0;
3648}
3650 auto box = text::open_layout_box(layout, indentation);
3652 text::localised_format_box(ws, layout, box, "consciousness", m);
3653 text::add_space_to_layout_box(ws, layout, box);
3654 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
3655 text::close_layout_box(layout, box);
3656 return 0;
3657}
3659 auto box = text::open_layout_box(layout, indentation);
3661 text::localised_format_box(ws, layout, box, "militancy", m);
3662 text::add_space_to_layout_box(ws, layout, box);
3663 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
3664 text::close_layout_box(layout, box);
3665 return 0;
3666}
3668 auto box = text::open_layout_box(layout, indentation);
3670 text::localised_format_box(ws, layout, box, "rgo_size", m);
3671 text::add_space_to_layout_box(ws, layout, box);
3672 display_value(int64_t(trigger::payload(tval[1]).signed_value), false, ws, layout, box);
3673 text::close_layout_box(layout, box);
3674 return 0;
3675}
3678 auto amount = trigger::payload(tval[1]).signed_value;
3679 {
3680 auto box = text::open_layout_box(layout, indentation);
3683 text::add_space_to_layout_box(ws, layout, box);
3684 display_value(int64_t(amount), true, ws, layout, box);
3685 text::close_layout_box(layout, box);
3686 }
3687 return 0;
3688}
3691 auto amount = trigger::payload(tval[1]).signed_value;
3692 {
3693 auto box = text::open_layout_box(layout, indentation);
3696 text::add_space_to_layout_box(ws, layout, box);
3697 display_value(int64_t(amount), true, ws, layout, box);
3698 text::close_layout_box(layout, box);
3699 }
3700 return 0;
3701}
3703 {
3704 auto box = text::open_layout_box(layout, indentation);
3706 text::localised_format_box(ws, layout, box, "trigger_every_revolt", m);
3707 text::close_layout_box(layout, box);
3708 }
3709 if(trigger::payload(tval[1]).reb_id) {
3710 auto box = text::open_layout_box(layout, indentation + indentation_amount);
3712 text::add_to_substitution_map(m, text::variable_type::text, ws.world.rebel_type_get_name(trigger::payload(tval[1]).reb_id));
3713 text::localised_format_box(ws, layout, box, "of_type", m);
3714 text::close_layout_box(layout, box);
3715 }
3716 if(trigger::payload(tval[2]).cul_id) {
3717 auto box = text::open_layout_box(layout, indentation + indentation_amount);
3719 text::add_to_substitution_map(m, text::variable_type::text, ws.world.culture_get_name(trigger::payload(tval[2]).cul_id));
3720 text::localised_format_box(ws, layout, box, "where_culture_is", m);
3721 text::close_layout_box(layout, box);
3722 }
3723 if(trigger::payload(tval[3]).rel_id) {
3724 auto box = text::open_layout_box(layout, indentation + indentation_amount);
3726 text::add_to_substitution_map(m, text::variable_type::text, ws.world.religion_get_name(trigger::payload(tval[3]).rel_id));
3727 text::localised_format_box(ws, layout, box, "where_religion_is", m);
3728 text::close_layout_box(layout, box);
3729 }
3730 if(trigger::payload(tval[4]).ideo_id) {
3731 auto box = text::open_layout_box(layout, indentation + indentation_amount);
3733 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[4]).ideo_id));
3734 text::localised_format_box(ws, layout, box, "where_ideology_is", m);
3735 text::close_layout_box(layout, box);
3736 }
3737 return 0;
3738}
3740 return ef_trigger_revolt_nation(ws, tval, layout, 0, 0, 0, r_lo, r_hi, indentation);
3741}
3743 return ef_trigger_revolt_nation(ws, tval, layout, 0, 0, 0, r_lo, r_hi, indentation);
3744}
3746 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
3747 if(target) {
3748 auto box = text::open_layout_box(layout, indentation);
3751 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3752 text::add_space_to_layout_box(ws, layout, box);
3753 display_value(int64_t(trigger::payload(tval[2]).signed_value), true, ws, layout, box);
3754 text::close_layout_box(layout, box);
3755 }
3756 return 0;
3757}
3759 {
3760 auto box = text::open_layout_box(layout, indentation);
3762 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3763 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3764 text::add_space_to_layout_box(ws, layout, box);
3765 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3766 text::close_layout_box(layout, box);
3767 }
3768 return 0;
3769}
3771 {
3772 auto box = text::open_layout_box(layout, indentation);
3774 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
3775 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3776 text::add_space_to_layout_box(ws, layout, box);
3777 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3778 text::close_layout_box(layout, box);
3779 }
3780 return 0;
3781}
3783 {
3784 auto box = text::open_layout_box(layout, indentation);
3786 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
3787 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3788 text::add_space_to_layout_box(ws, layout, box);
3789 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3790 text::close_layout_box(layout, box);
3791 }
3792 return 0;
3793}
3795 {
3796 auto box = text::open_layout_box(layout, indentation);
3798 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
3799 text::localised_format_box(ws, layout, box, "diplomatic_influence_with", m);
3800 text::add_space_to_layout_box(ws, layout, box);
3801 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3802 text::close_layout_box(layout, box);
3803 }
3804 return 0;
3805}
3807 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
3808 if(target) {
3809 auto box = text::open_layout_box(layout, indentation);
3812 text::localised_format_box(ws, layout, box, "relations_with", m);
3813 text::add_space_to_layout_box(ws, layout, box);
3814 display_value(int64_t(trigger::payload(tval[2]).signed_value), true, ws, layout, box);
3815 text::close_layout_box(layout, box);
3816 }
3817 return 0;
3818}
3820 {
3821 auto box = text::open_layout_box(layout, indentation);
3823 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3824 text::localised_format_box(ws, layout, box, "relations_with", m);
3825 text::add_space_to_layout_box(ws, layout, box);
3826 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3827 text::close_layout_box(layout, box);
3828 }
3829 return 0;
3830}
3832 {
3833 auto box = text::open_layout_box(layout, indentation);
3835 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
3836 text::localised_format_box(ws, layout, box, "relations_with", m);
3837 text::add_space_to_layout_box(ws, layout, box);
3838 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3839 text::close_layout_box(layout, box);
3840 }
3841 return 0;
3842}
3844 {
3845 auto box = text::open_layout_box(layout, indentation);
3847 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
3848 text::localised_format_box(ws, layout, box, "relations_with", m);
3849 text::add_space_to_layout_box(ws, layout, box);
3850 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3851 text::close_layout_box(layout, box);
3852 }
3853 return 0;
3854}
3856 {
3857 auto box = text::open_layout_box(layout, indentation);
3859 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
3860 text::localised_format_box(ws, layout, box, "relations_with", m);
3861 text::add_space_to_layout_box(ws, layout, box);
3862 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
3863 text::close_layout_box(layout, box);
3864 }
3865 return 0;
3866}
3868 auto box = text::open_layout_box(layout, indentation);
3870 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3872 text::localised_format_box(ws, layout, box, "add_modifier_until", m);
3873 text::close_layout_box(layout, box);
3874 if(ws.user_settings.spoilers) {
3875 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3876 }
3877 return 0;
3878}
3880 auto box = text::open_layout_box(layout, indentation);
3882 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3883 text::localised_format_box(ws, layout, box, "add_modifier", m);
3884 text::close_layout_box(layout, box);
3885 if(ws.user_settings.spoilers) {
3886 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3887 }
3888 return 0;
3889}
3891 auto box = text::open_layout_box(layout, indentation);
3893 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3895 text::localised_format_box(ws, layout, box, "add_modifier_until", m);
3896 text::close_layout_box(layout, box);
3897 if(ws.user_settings.spoilers) {
3898 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3899 }
3900 return 0;
3901}
3903 auto box = text::open_layout_box(layout, indentation);
3905 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
3906 text::localised_format_box(ws, layout, box, "add_modifier", m);
3907 text::close_layout_box(layout, box);
3908 if(ws.user_settings.spoilers) {
3909 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
3910 }
3911 return 0;
3912}
3914 auto type = trigger::payload(tval[1]).cb_id;
3915 auto months = trigger::payload(tval[2]).signed_value;
3916 auto tag_target = trigger::payload(tval[3]).tag_id;
3917
3918 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
3919 if(target) {
3920 auto box = text::open_layout_box(layout, indentation);
3923 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3924 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3925 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3926 text::close_layout_box(layout, box);
3927 }
3928 return 0;
3929}
3931 auto type = trigger::payload(tval[1]).cb_id;
3932 auto months = trigger::payload(tval[2]).signed_value;
3933 if(auto holder = ws.world.province_get_nation_from_province_ownership(trigger::payload(tval[3]).prov_id); holder) {
3934 auto box = text::open_layout_box(layout, indentation);
3937 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3938 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3939 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3940 text::close_layout_box(layout, box);
3941 }
3942 return 0;
3943}
3945 auto type = trigger::payload(tval[1]).cb_id;
3946 auto months = trigger::payload(tval[2]).signed_value;
3947 {
3948 auto box = text::open_layout_box(layout, indentation);
3950 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
3951 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3952 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3953 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3954 text::close_layout_box(layout, box);
3955 }
3956 return 0;
3957}
3959 auto type = trigger::payload(tval[1]).cb_id;
3960 auto months = trigger::payload(tval[2]).signed_value;
3961 {
3962 auto box = text::open_layout_box(layout, indentation);
3964 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
3965 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3966 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3967 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3968 text::close_layout_box(layout, box);
3969 }
3970 return 0;
3971}
3973 auto type = trigger::payload(tval[1]).cb_id;
3974 auto months = trigger::payload(tval[2]).signed_value;
3975 {
3976 auto box = text::open_layout_box(layout, indentation);
3978 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
3979 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3980 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3981 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3982 text::close_layout_box(layout, box);
3983 }
3984 return 0;
3985}
3987 auto type = trigger::payload(tval[1]).cb_id;
3988 auto months = trigger::payload(tval[2]).signed_value;
3989 {
3990 auto box = text::open_layout_box(layout, indentation);
3992 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
3993 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
3994 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
3995 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
3996 text::close_layout_box(layout, box);
3997 }
3998 return 0;
3999}
4001 auto type = trigger::payload(tval[1]).cb_id;
4002 auto months = trigger::payload(tval[2]).signed_value;
4003 {
4004 auto box = text::open_layout_box(layout, indentation);
4006 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4007 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4008 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4009 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
4010 text::close_layout_box(layout, box);
4011 }
4012 return 0;
4013}
4015 auto type = trigger::payload(tval[1]).cb_id;
4016 auto months = trigger::payload(tval[2]).signed_value;
4017 {
4018 auto box = text::open_layout_box(layout, indentation);
4020 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4021 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4022 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4023 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_months" : "add_cb_no_months", m);
4024 text::close_layout_box(layout, box);
4025 }
4026 return 0;
4027}
4029 auto type = trigger::payload(tval[1]).cb_id;
4030 auto months = trigger::payload(tval[2]).signed_value;
4031 auto tag_target = trigger::payload(tval[3]).tag_id;
4032
4033 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
4034 if(target) {
4035 auto box = text::open_layout_box(layout, indentation);
4038 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4039 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4040 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4041 text::close_layout_box(layout, box);
4042 }
4043 return 0;
4044}
4046 auto type = trigger::payload(tval[1]).cb_id;
4047 auto months = trigger::payload(tval[2]).signed_value;
4048 if(auto holder = ws.world.province_get_nation_from_province_ownership(trigger::payload(tval[3]).prov_id); holder) {
4049 auto box = text::open_layout_box(layout, indentation);
4052 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4053 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4054 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4055 text::close_layout_box(layout, box);
4056 }
4057 return 0;
4058}
4060 auto type = trigger::payload(tval[1]).cb_id;
4061 auto months = trigger::payload(tval[2]).signed_value;
4062 {
4063 auto box = text::open_layout_box(layout, indentation);
4065 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4066 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4067 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4068 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4069 text::close_layout_box(layout, box);
4070 }
4071 return 0;
4072}
4074 auto type = trigger::payload(tval[1]).cb_id;
4075 auto months = trigger::payload(tval[2]).signed_value;
4076 {
4077 auto box = text::open_layout_box(layout, indentation);
4079 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4080 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4081 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4082 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4083 text::close_layout_box(layout, box);
4084 }
4085 return 0;
4086}
4088 auto type = trigger::payload(tval[1]).cb_id;
4089 auto months = trigger::payload(tval[2]).signed_value;
4090 {
4091 auto box = text::open_layout_box(layout, indentation);
4093 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4094 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4095 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4096 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4097 text::close_layout_box(layout, box);
4098 }
4099 return 0;
4100}
4102 auto type = trigger::payload(tval[1]).cb_id;
4103 auto months = trigger::payload(tval[2]).signed_value;
4104 {
4105 auto box = text::open_layout_box(layout, indentation);
4107 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4108 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4109 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4110 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4111 text::close_layout_box(layout, box);
4112 }
4113 return 0;
4114}
4116 auto type = trigger::payload(tval[1]).cb_id;
4117 auto months = trigger::payload(tval[2]).signed_value;
4118 {
4119 auto box = text::open_layout_box(layout, indentation);
4121 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4122 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4123 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4124 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4125 text::close_layout_box(layout, box);
4126 }
4127 return 0;
4128}
4130 auto type = trigger::payload(tval[1]).cb_id;
4131 auto months = trigger::payload(tval[2]).signed_value;
4132 {
4133 auto box = text::open_layout_box(layout, indentation);
4135 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4136 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4137 text::add_to_substitution_map(m, text::variable_type::date, ws.current_date + 31 * months);
4138 text::localised_format_box(ws, layout, box, months != 0 ? "add_cb_reversed_months" : "add_cb_reversed_no_months", m);
4139 text::close_layout_box(layout, box);
4140 }
4141 return 0;
4142}
4144 auto type = trigger::payload(tval[1]).cb_id;
4145 auto tag_target = trigger::payload(tval[2]).tag_id;
4146
4147 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
4148 if(target) {
4149 auto box = text::open_layout_box(layout, indentation);
4152 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4153 text::localised_format_box(ws, layout, box, "remove_cb", m);
4154 text::close_layout_box(layout, box);
4155 }
4156 return 0;
4157}
4159 auto type = trigger::payload(tval[1]).cb_id;
4160 if(auto holder = ws.world.province_get_nation_from_province_ownership(trigger::payload(tval[2]).prov_id); holder) {
4161 auto box = text::open_layout_box(layout, indentation);
4164 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4165 text::localised_format_box(ws, layout, box, "remove_cb", m);
4166 text::close_layout_box(layout, box);
4167 }
4168 return 0;
4169}
4171 auto type = trigger::payload(tval[1]).cb_id;
4172 {
4173 auto box = text::open_layout_box(layout, indentation);
4175 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4176 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4177 text::localised_format_box(ws, layout, box, "remove_cb", m);
4178 text::close_layout_box(layout, box);
4179 }
4180 return 0;
4181}
4183 auto type = trigger::payload(tval[1]).cb_id;
4184 {
4185 auto box = text::open_layout_box(layout, indentation);
4187 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4188 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4189 text::localised_format_box(ws, layout, box, "remove_cb", m);
4190 text::close_layout_box(layout, box);
4191 }
4192 return 0;
4193}
4195 auto type = trigger::payload(tval[1]).cb_id;
4196 {
4197 auto box = text::open_layout_box(layout, indentation);
4199 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4200 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4201 text::localised_format_box(ws, layout, box, "remove_cb", m);
4202 text::close_layout_box(layout, box);
4203 }
4204 return 0;
4205}
4207 auto type = trigger::payload(tval[1]).cb_id;
4208 {
4209 auto box = text::open_layout_box(layout, indentation);
4211 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4212 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4213 text::localised_format_box(ws, layout, box, "remove_cb", m);
4214 text::close_layout_box(layout, box);
4215 }
4216 return 0;
4217}
4219 auto type = trigger::payload(tval[1]).cb_id;
4220 {
4221 auto box = text::open_layout_box(layout, indentation);
4223 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4224 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4225 text::localised_format_box(ws, layout, box, "remove_cb", m);
4226 text::close_layout_box(layout, box);
4227 }
4228 return 0;
4229}
4231 auto type = trigger::payload(tval[1]).cb_id;
4232 {
4233 auto box = text::open_layout_box(layout, indentation);
4235 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4236 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4237 text::localised_format_box(ws, layout, box, "remove_cb", m);
4238 text::close_layout_box(layout, box);
4239 }
4240 return 0;
4241}
4243 auto type = trigger::payload(tval[1]).cb_id;
4244 auto tag_target = trigger::payload(tval[2]).tag_id;
4245
4246 auto target = ws.world.national_identity_get_nation_from_identity_holder(tag_target);
4247 if(target) {
4248 auto box = text::open_layout_box(layout, indentation);
4251 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4252 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4253 text::close_layout_box(layout, box);
4254 }
4255 return 0;
4256}
4258 auto type = trigger::payload(tval[1]).cb_id;
4259 if(auto holder = ws.world.province_get_nation_from_province_ownership(trigger::payload(tval[2]).prov_id); holder) {
4260 auto box = text::open_layout_box(layout, indentation);
4263 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4264 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4265 text::close_layout_box(layout, box);
4266 }
4267 return 0;
4268}
4270 auto type = trigger::payload(tval[1]).cb_id;
4271 {
4272 auto box = text::open_layout_box(layout, indentation);
4274 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4275 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4276 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4277 text::close_layout_box(layout, box);
4278 }
4279 return 0;
4280}
4282 auto type = trigger::payload(tval[1]).cb_id;
4283 {
4284 auto box = text::open_layout_box(layout, indentation);
4286 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4287 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4288 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4289 text::close_layout_box(layout, box);
4290 }
4291 return 0;
4292}
4294 auto type = trigger::payload(tval[1]).cb_id;
4295 {
4296 auto box = text::open_layout_box(layout, indentation);
4298 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4299 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4300 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4301 text::close_layout_box(layout, box);
4302 }
4303 return 0;
4304}
4306 auto type = trigger::payload(tval[1]).cb_id;
4307 {
4308 auto box = text::open_layout_box(layout, indentation);
4310 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4311 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4312 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4313 text::close_layout_box(layout, box);
4314 }
4315 return 0;
4316}
4318 auto type = trigger::payload(tval[1]).cb_id;
4319 {
4320 auto box = text::open_layout_box(layout, indentation);
4322 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4323 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4324 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4325 text::close_layout_box(layout, box);
4326 }
4327 return 0;
4328}
4330 auto type = trigger::payload(tval[1]).cb_id;
4331 {
4332 auto box = text::open_layout_box(layout, indentation);
4334 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4335 text::add_to_substitution_map(m, text::variable_type::name, ws.world.cb_type_get_name(type));
4336 text::localised_format_box(ws, layout, box, "remove_cb_reversed", m);
4337 text::close_layout_box(layout, box);
4338 }
4339 return 0;
4340}
4341
4343 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
4344 if(!target)
4345 return 0;
4346 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);
4347 return 0;
4348}
4350 {
4351 auto box = text::open_layout_box(layout, indentation);
4353 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4354 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4355 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4356 text::close_layout_box(layout, box);
4357 }
4358 return 0;
4359}
4361 {
4362 auto box = text::open_layout_box(layout, indentation);
4364 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4365 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4366 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4367 text::close_layout_box(layout, box);
4368 }
4369 return 0;
4370}
4372 {
4373 auto box = text::open_layout_box(layout, indentation);
4375 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4376 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4377 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4378 text::close_layout_box(layout, box);
4379 }
4380 return 0;
4381}
4383 {
4384 auto box = text::open_layout_box(layout, indentation);
4386 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4387 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4388 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4389 text::close_layout_box(layout, box);
4390 }
4391 return 0;
4392}
4394 {
4395 auto box = text::open_layout_box(layout, indentation);
4397 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4398 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4399 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4400 text::close_layout_box(layout, box);
4401 }
4402 return 0;
4403}
4405 {
4406 auto box = text::open_layout_box(layout, indentation);
4408 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
4409 text::add_to_substitution_map(m, text::variable_type::y, ws.current_date + int32_t(tval[1] * 30.5));
4410 text::localised_format_box(ws, layout, box, "att_truce_with", m);
4411 text::close_layout_box(layout, box);
4412 }
4413 return 0;
4414}
4416 text::add_line(ws, layout, "att_call_allies_effect");
4417 return 0;
4418}
4419
4421 auto box = text::open_layout_box(layout, indentation);
4423 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());
4424 text::localised_format_box(ws, layout, box, "change_ruling_party", m);
4425 text::close_layout_box(layout, box);
4426 return 0;
4427}
4429 auto box = text::open_layout_box(layout, indentation);
4431 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());
4432 text::localised_format_box(ws, layout, box, "change_ruling_party", m);
4433 text::close_layout_box(layout, box);
4434 return 0;
4435}
4436
4438 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
4439 if(!target)
4440 return 0;
4441 {
4442 auto box = text::open_layout_box(layout, indentation);
4445 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4446 text::close_layout_box(layout, box);
4447 }
4448 {
4449 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4451 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[5]).cb_id));
4452 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4453 text::close_layout_box(layout, box);
4454 }
4455 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[6]).prov_id); si) {
4456 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4459 text::localised_format_box(ws, layout, box, "for_text", m);
4460 text::close_layout_box(layout, box);
4461 }
4462 if(auto t = trigger::payload(tval[7]).tag_id; t) {
4463 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4466 text::localised_format_box(ws, layout, box, "for_text", m);
4467 text::close_layout_box(layout, box);
4468 }
4469 if(trigger::payload(tval[2]).cb_id) {
4470 {
4471 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4473 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[2]).cb_id));
4474 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4475 text::close_layout_box(layout, box);
4476 }
4477 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[3]).prov_id); si) {
4478 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4481 text::localised_format_box(ws, layout, box, "for_text", m);
4482 text::close_layout_box(layout, box);
4483 }
4484 if(auto t = trigger::payload(tval[4]).tag_id; t) {
4485 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4488 text::localised_format_box(ws, layout, box, "for_text", m);
4489 text::close_layout_box(layout, box);
4490 }
4491 }
4492 return 0;
4493}
4495 {
4496 auto box = text::open_layout_box(layout, indentation);
4498 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4499 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4500 text::close_layout_box(layout, box);
4501 }
4502 {
4503 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4505 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4506 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4507 text::close_layout_box(layout, box);
4508 }
4509 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4510 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4513 text::localised_format_box(ws, layout, box, "for_text", m);
4514 text::close_layout_box(layout, box);
4515 }
4516 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4517 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4520 text::localised_format_box(ws, layout, box, "for_text", m);
4521 text::close_layout_box(layout, box);
4522 }
4523 if(trigger::payload(tval[1]).cb_id) {
4524 {
4525 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4527 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4528 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4529 text::close_layout_box(layout, box);
4530 }
4531 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4532 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4535 text::localised_format_box(ws, layout, box, "for_text", m);
4536 text::close_layout_box(layout, box);
4537 }
4538 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4539 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4542 text::localised_format_box(ws, layout, box, "for_text", m);
4543 text::close_layout_box(layout, box);
4544 }
4545 }
4546 return 0;
4547}
4549 {
4550 auto box = text::open_layout_box(layout, indentation);
4552 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4553 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4554 text::close_layout_box(layout, box);
4555 }
4556 {
4557 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4559 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4560 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4561 text::close_layout_box(layout, box);
4562 }
4563 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4564 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4567 text::localised_format_box(ws, layout, box, "for_text", m);
4568 text::close_layout_box(layout, box);
4569 }
4570 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4571 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4574 text::localised_format_box(ws, layout, box, "for_text", m);
4575 text::close_layout_box(layout, box);
4576 }
4577 if(trigger::payload(tval[1]).cb_id) {
4578 {
4579 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4581 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4582 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4583 text::close_layout_box(layout, box);
4584 }
4585 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4586 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4589 text::localised_format_box(ws, layout, box, "for_text", m);
4590 text::close_layout_box(layout, box);
4591 }
4592 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4593 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4596 text::localised_format_box(ws, layout, box, "for_text", m);
4597 text::close_layout_box(layout, box);
4598 }
4599 }
4600 return 0;
4601}
4603 {
4604 auto box = text::open_layout_box(layout, indentation);
4606 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
4607 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4608 text::close_layout_box(layout, box);
4609 }
4610 {
4611 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4613 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4614 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4615 text::close_layout_box(layout, box);
4616 }
4617 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4618 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4621 text::localised_format_box(ws, layout, box, "for_text", m);
4622 text::close_layout_box(layout, box);
4623 }
4624 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4625 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4628 text::localised_format_box(ws, layout, box, "for_text", m);
4629 text::close_layout_box(layout, box);
4630 }
4631 if(trigger::payload(tval[1]).cb_id) {
4632 {
4633 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4635 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4636 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4637 text::close_layout_box(layout, box);
4638 }
4639 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4640 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4643 text::localised_format_box(ws, layout, box, "for_text", m);
4644 text::close_layout_box(layout, box);
4645 }
4646 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4647 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4650 text::localised_format_box(ws, layout, box, "for_text", m);
4651 text::close_layout_box(layout, box);
4652 }
4653 }
4654 return 0;
4655}
4657 {
4658 auto box = text::open_layout_box(layout, indentation);
4660 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
4661 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4662 text::close_layout_box(layout, box);
4663 }
4664 {
4665 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4667 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4668 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4669 text::close_layout_box(layout, box);
4670 }
4671 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4672 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4675 text::localised_format_box(ws, layout, box, "for_text", m);
4676 text::close_layout_box(layout, box);
4677 }
4678 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4679 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4682 text::localised_format_box(ws, layout, box, "for_text", m);
4683 text::close_layout_box(layout, box);
4684 }
4685 if(trigger::payload(tval[1]).cb_id) {
4686 {
4687 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4689 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4690 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4691 text::close_layout_box(layout, box);
4692 }
4693 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4694 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4697 text::localised_format_box(ws, layout, box, "for_text", m);
4698 text::close_layout_box(layout, box);
4699 }
4700 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4701 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4704 text::localised_format_box(ws, layout, box, "for_text", m);
4705 text::close_layout_box(layout, box);
4706 }
4707 }
4708 return 0;
4709}
4711 {
4712 auto box = text::open_layout_box(layout, indentation);
4714 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4715 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4716 text::close_layout_box(layout, box);
4717 }
4718 {
4719 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4721 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4722 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4723 text::close_layout_box(layout, box);
4724 }
4725 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4726 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4729 text::localised_format_box(ws, layout, box, "for_text", m);
4730 text::close_layout_box(layout, box);
4731 }
4732 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4733 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4736 text::localised_format_box(ws, layout, box, "for_text", m);
4737 text::close_layout_box(layout, box);
4738 }
4739 if(trigger::payload(tval[1]).cb_id) {
4740 {
4741 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4743 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4744 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4745 text::close_layout_box(layout, box);
4746 }
4747 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4748 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4751 text::localised_format_box(ws, layout, box, "for_text", m);
4752 text::close_layout_box(layout, box);
4753 }
4754 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4755 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4758 text::localised_format_box(ws, layout, box, "for_text", m);
4759 text::close_layout_box(layout, box);
4760 }
4761 }
4762 return 0;
4763}
4765 {
4766 auto box = text::open_layout_box(layout, indentation);
4768 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
4769 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4770 text::close_layout_box(layout, box);
4771 }
4772 {
4773 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4775 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4776 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4777 text::close_layout_box(layout, box);
4778 }
4779 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4780 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4783 text::localised_format_box(ws, layout, box, "for_text", m);
4784 text::close_layout_box(layout, box);
4785 }
4786 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4787 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4790 text::localised_format_box(ws, layout, box, "for_text", m);
4791 text::close_layout_box(layout, box);
4792 }
4793 if(trigger::payload(tval[1]).cb_id) {
4794 {
4795 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4797 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4798 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4799 text::close_layout_box(layout, box);
4800 }
4801 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4802 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4805 text::localised_format_box(ws, layout, box, "for_text", m);
4806 text::close_layout_box(layout, box);
4807 }
4808 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4809 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4812 text::localised_format_box(ws, layout, box, "for_text", m);
4813 text::close_layout_box(layout, box);
4814 }
4815 }
4816 return 0;
4817}
4819 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
4820 if(!target)
4821 return 0;
4822 {
4823 auto box = text::open_layout_box(layout, indentation);
4826 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4827 text::close_layout_box(layout, box);
4828 }
4829 {
4830 auto box = text::open_layout_box(layout, indentation);
4832 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
4833 text::close_layout_box(layout, box);
4834 }
4835 {
4836 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4838 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[5]).cb_id));
4839 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4840 text::close_layout_box(layout, box);
4841 }
4842 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[6]).prov_id); si) {
4843 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4846 text::localised_format_box(ws, layout, box, "for_text", m);
4847 text::close_layout_box(layout, box);
4848 }
4849 if(auto t = trigger::payload(tval[7]).tag_id; t) {
4850 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4853 text::localised_format_box(ws, layout, box, "for_text", m);
4854 text::close_layout_box(layout, box);
4855 }
4856 if(trigger::payload(tval[2]).cb_id) {
4857 {
4858 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4860 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[2]).cb_id));
4861 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4862 text::close_layout_box(layout, box);
4863 }
4864 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[3]).prov_id); si) {
4865 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4868 text::localised_format_box(ws, layout, box, "for_text", m);
4869 text::close_layout_box(layout, box);
4870 }
4871 if(auto t = trigger::payload(tval[4]).tag_id; t) {
4872 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4875 text::localised_format_box(ws, layout, box, "for_text", m);
4876 text::close_layout_box(layout, box);
4877 }
4878 }
4879 return 0;
4880}
4882 {
4883 auto box = text::open_layout_box(layout, indentation);
4885 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
4886 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4887 text::close_layout_box(layout, box);
4888 }
4889 {
4890 auto box = text::open_layout_box(layout, indentation);
4892 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
4893 text::close_layout_box(layout, box);
4894 }
4895 {
4896 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4898 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4899 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4900 text::close_layout_box(layout, box);
4901 }
4902 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4903 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4906 text::localised_format_box(ws, layout, box, "for_text", m);
4907 text::close_layout_box(layout, box);
4908 }
4909 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4910 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4913 text::localised_format_box(ws, layout, box, "for_text", m);
4914 text::close_layout_box(layout, box);
4915 }
4916 if(trigger::payload(tval[1]).cb_id) {
4917 {
4918 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4920 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4921 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4922 text::close_layout_box(layout, box);
4923 }
4924 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4925 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4928 text::localised_format_box(ws, layout, box, "for_text", m);
4929 text::close_layout_box(layout, box);
4930 }
4931 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4932 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4935 text::localised_format_box(ws, layout, box, "for_text", m);
4936 text::close_layout_box(layout, box);
4937 }
4938 }
4939 return 0;
4940}
4942 {
4943 auto box = text::open_layout_box(layout, indentation);
4945 add_to_map(ws, m, convert_this(ws, trigger::to_state(this_slot)), "this_nation", [](auto x) { return x; });
4946 text::localised_format_box(ws, layout, box, "declare_war_on", m);
4947 text::close_layout_box(layout, box);
4948 }
4949 {
4950 auto box = text::open_layout_box(layout, indentation);
4952 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
4953 text::close_layout_box(layout, box);
4954 }
4955 {
4956 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4958 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
4959 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
4960 text::close_layout_box(layout, box);
4961 }
4962 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
4963 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4966 text::localised_format_box(ws, layout, box, "for_text", m);
4967 text::close_layout_box(layout, box);
4968 }
4969 if(auto t = trigger::payload(tval[6]).tag_id; t) {
4970 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4973 text::localised_format_box(ws, layout, box, "for_text", m);
4974 text::close_layout_box(layout, box);
4975 }
4976 if(trigger::payload(tval[1]).cb_id) {
4977 {
4978 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4980 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
4981 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
4982 text::close_layout_box(layout, box);
4983 }
4984 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
4985 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4988 text::localised_format_box(ws, layout, box, "for_text", m);
4989 text::close_layout_box(layout, box);
4990 }
4991 if(auto t = trigger::payload(tval[3]).tag_id; t) {
4992 auto box = text::open_layout_box(layout, indentation + indentation_amount);
4995 text::localised_format_box(ws, layout, box, "for_text", m);
4996 text::close_layout_box(layout, box);
4997 }
4998 }
4999 return 0;
5000}
5002 {
5003 auto box = text::open_layout_box(layout, indentation);
5005 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
5006 text::localised_format_box(ws, layout, box, "declare_war_on", m);
5007 text::close_layout_box(layout, box);
5008 }
5009 {
5010 auto box = text::open_layout_box(layout, indentation);
5012 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
5013 text::close_layout_box(layout, box);
5014 }
5015 {
5016 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5018 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
5019 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
5020 text::close_layout_box(layout, box);
5021 }
5022 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
5023 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5026 text::localised_format_box(ws, layout, box, "for_text", m);
5027 text::close_layout_box(layout, box);
5028 }
5029 if(auto t = trigger::payload(tval[6]).tag_id; t) {
5030 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5033 text::localised_format_box(ws, layout, box, "for_text", m);
5034 text::close_layout_box(layout, box);
5035 }
5036 if(trigger::payload(tval[1]).cb_id) {
5037 {
5038 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5040 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
5041 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
5042 text::close_layout_box(layout, box);
5043 }
5044 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
5045 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5048 text::localised_format_box(ws, layout, box, "for_text", m);
5049 text::close_layout_box(layout, box);
5050 }
5051 if(auto t = trigger::payload(tval[3]).tag_id; t) {
5052 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5055 text::localised_format_box(ws, layout, box, "for_text", m);
5056 text::close_layout_box(layout, box);
5057 }
5058 }
5059 return 0;
5060}
5062 {
5063 auto box = text::open_layout_box(layout, indentation);
5065 add_to_map(ws, m, convert_this(ws, trigger::to_pop(this_slot)), "this_nation", [](auto x) { return x; });
5066 text::localised_format_box(ws, layout, box, "declare_war_on", m);
5067 text::close_layout_box(layout, box);
5068 }
5069 {
5070 auto box = text::open_layout_box(layout, indentation);
5072 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
5073 text::close_layout_box(layout, box);
5074 }
5075 {
5076 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5078 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
5079 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
5080 text::close_layout_box(layout, box);
5081 }
5082 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
5083 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5086 text::localised_format_box(ws, layout, box, "for_text", m);
5087 text::close_layout_box(layout, box);
5088 }
5089 if(auto t = trigger::payload(tval[6]).tag_id; t) {
5090 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5093 text::localised_format_box(ws, layout, box, "for_text", m);
5094 text::close_layout_box(layout, box);
5095 }
5096 if(trigger::payload(tval[1]).cb_id) {
5097 {
5098 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5100 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
5101 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
5102 text::close_layout_box(layout, box);
5103 }
5104 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
5105 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5108 text::localised_format_box(ws, layout, box, "for_text", m);
5109 text::close_layout_box(layout, box);
5110 }
5111 if(auto t = trigger::payload(tval[3]).tag_id; t) {
5112 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5115 text::localised_format_box(ws, layout, box, "for_text", m);
5116 text::close_layout_box(layout, box);
5117 }
5118 }
5119 return 0;
5120}
5122 {
5123 auto box = text::open_layout_box(layout, indentation);
5125 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
5126 text::localised_format_box(ws, layout, box, "declare_war_on", m);
5127 text::close_layout_box(layout, box);
5128 }
5129 {
5130 auto box = text::open_layout_box(layout, indentation);
5132 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
5133 text::close_layout_box(layout, box);
5134 }
5135 {
5136 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5138 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
5139 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
5140 text::close_layout_box(layout, box);
5141 }
5142 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
5143 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5146 text::localised_format_box(ws, layout, box, "for_text", m);
5147 text::close_layout_box(layout, box);
5148 }
5149 if(auto t = trigger::payload(tval[6]).tag_id; t) {
5150 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5153 text::localised_format_box(ws, layout, box, "for_text", m);
5154 text::close_layout_box(layout, box);
5155 }
5156 if(trigger::payload(tval[1]).cb_id) {
5157 {
5158 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5160 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
5161 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
5162 text::close_layout_box(layout, box);
5163 }
5164 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
5165 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5168 text::localised_format_box(ws, layout, box, "for_text", m);
5169 text::close_layout_box(layout, box);
5170 }
5171 if(auto t = trigger::payload(tval[3]).tag_id; t) {
5172 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5175 text::localised_format_box(ws, layout, box, "for_text", m);
5176 text::close_layout_box(layout, box);
5177 }
5178 }
5179 return 0;
5180}
5182 {
5183 auto box = text::open_layout_box(layout, indentation);
5185 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
5186 text::localised_format_box(ws, layout, box, "declare_war_on", m);
5187 text::close_layout_box(layout, box);
5188 }
5189 {
5190 auto box = text::open_layout_box(layout, indentation);
5192 text::localised_format_box(ws, layout, box, "attacker_no_allies", m);
5193 text::close_layout_box(layout, box);
5194 }
5195 {
5196 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5198 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[4]).cb_id));
5199 text::localised_format_box(ws, layout, box, "attacker_wg_label", m);
5200 text::close_layout_box(layout, box);
5201 }
5202 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[5]).prov_id); si) {
5203 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5206 text::localised_format_box(ws, layout, box, "for_text", m);
5207 text::close_layout_box(layout, box);
5208 }
5209 if(auto t = trigger::payload(tval[6]).tag_id; t) {
5210 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5213 text::localised_format_box(ws, layout, box, "for_text", m);
5214 text::close_layout_box(layout, box);
5215 }
5216 if(trigger::payload(tval[1]).cb_id) {
5217 {
5218 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5220 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
5221 text::localised_format_box(ws, layout, box, "defender_wg_label", m);
5222 text::close_layout_box(layout, box);
5223 }
5224 if(auto si = ws.world.province_get_state_membership(trigger::payload(tval[2]).prov_id); si) {
5225 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5228 text::localised_format_box(ws, layout, box, "for_text", m);
5229 text::close_layout_box(layout, box);
5230 }
5231 if(auto t = trigger::payload(tval[3]).tag_id; t) {
5232 auto box = text::open_layout_box(layout, indentation + indentation_amount);
5235 text::localised_format_box(ws, layout, box, "for_text", m);
5236 text::close_layout_box(layout, box);
5237 }
5238 }
5239 return 0;
5240}
5242 {
5243 auto box = text::open_layout_box(layout, indentation);
5246 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5247 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});
5248 text::localised_format_box(ws, layout, box, "event_fires", m);
5249 text::close_layout_box(layout, box);
5250 }
5251 return 0;
5252}
5254 {
5255 auto box = text::open_layout_box(layout, indentation);
5258 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5259 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});
5260 text::localised_format_box(ws, layout, box, "event_fires", m);
5261 text::close_layout_box(layout, box);
5262 }
5263 return 0;
5264}
5266 {
5267 auto box = text::open_layout_box(layout, indentation);
5270 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5271
5273 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::nation});
5274
5275 text::localised_format_box(ws, layout, box, "event_fires", m);
5276 text::close_layout_box(layout, box);
5277 }
5278 return 0;
5279}
5281 {
5282 auto box = text::open_layout_box(layout, indentation);
5285 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5287 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::nation});
5288 text::localised_format_box(ws, layout, box, "event_fires", m);
5289 text::close_layout_box(layout, box);
5290 }
5291 return 0;
5292}
5294 {
5295 auto box = text::open_layout_box(layout, indentation);
5298 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5299 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});
5300 text::localised_format_box(ws, layout, box, "event_fires", m);
5301 text::close_layout_box(layout, box);
5302 }
5303 return 0;
5304}
5306 {
5307 auto box = text::open_layout_box(layout, indentation);
5310 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5311 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});
5312 text::localised_format_box(ws, layout, box, "event_fires", m);
5313 text::close_layout_box(layout, box);
5314 }
5315 return 0;
5316}
5318 {
5319 auto box = text::open_layout_box(layout, indentation);
5322 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5324 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::state});
5325 text::localised_format_box(ws, layout, box, "event_fires", m);
5326 text::close_layout_box(layout, box);
5327 }
5328 return 0;
5329}
5331 {
5332 auto box = text::open_layout_box(layout, indentation);
5335 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5337 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::state});
5338 text::localised_format_box(ws, layout, box, "event_fires", m);
5339 text::close_layout_box(layout, box);
5340 }
5341 return 0;
5342}
5344 {
5345 auto box = text::open_layout_box(layout, indentation);
5348 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5349 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});
5350 text::localised_format_box(ws, layout, box, "event_fires", m);
5351 text::close_layout_box(layout, box);
5352 }
5353 return 0;
5354}
5356 {
5357 auto box = text::open_layout_box(layout, indentation);
5360 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5361 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});
5362 text::localised_format_box(ws, layout, box, "event_fires", m);
5363 text::close_layout_box(layout, box);
5364 }
5365 return 0;
5366}
5368 {
5369 auto box = text::open_layout_box(layout, indentation);
5372 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5374 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::province});
5375 text::localised_format_box(ws, layout, box, "event_fires", m);
5376 text::close_layout_box(layout, box);
5377 }
5378 return 0;
5379}
5381 {
5382 auto box = text::open_layout_box(layout, indentation);
5385 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5387 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::province});
5388 text::localised_format_box(ws, layout, box, "event_fires", m);
5389 text::close_layout_box(layout, box);
5390 }
5391 return 0;
5392}
5394 {
5395 auto box = text::open_layout_box(layout, indentation);
5398 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5399 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});
5400 text::localised_format_box(ws, layout, box, "event_fires", m);
5401 text::close_layout_box(layout, box);
5402 }
5403 return 0;
5404}
5406 {
5407 auto box = text::open_layout_box(layout, indentation);
5410 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5411 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});
5412 text::localised_format_box(ws, layout, box, "event_fires", m);
5413 text::close_layout_box(layout, box);
5414 }
5415 return 0;
5416}
5418 {
5419 auto box = text::open_layout_box(layout, indentation);
5422 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5424 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::pop});
5425 text::localised_format_box(ws, layout, box, "event_fires", m);
5426 text::close_layout_box(layout, box);
5427 }
5428 return 0;
5429}
5431 {
5432 auto box = text::open_layout_box(layout, indentation);
5435 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5437 this_slot, ws.current_date, trigger::payload(tval[1]).pev_id, trigger::to_prov(primary_slot), event::slot_type::pop});
5438 text::localised_format_box(ws, layout, box, "event_fires", m);
5439 text::close_layout_box(layout, box);
5440 }
5441 return 0;
5442}
5444 {
5445 auto box = text::open_layout_box(layout, indentation);
5448 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5450 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5451 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::nation});
5452 text::localised_format_box(ws, layout, box, "event_fires", m);
5453 text::close_layout_box(layout, box);
5454 }
5455 return 0;
5456}
5458 {
5459 auto box = text::open_layout_box(layout, indentation);
5462 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5464 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5465 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::nation});
5466 text::localised_format_box(ws, layout, box, "event_fires", m);
5467 text::close_layout_box(layout, box);
5468 }
5469 return 0;
5470}
5472 {
5473 auto box = text::open_layout_box(layout, indentation);
5476 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5478 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5479 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::state});
5480 text::localised_format_box(ws, layout, box, "event_fires", m);
5481 text::close_layout_box(layout, box);
5482 }
5483 return 0;
5484}
5486 {
5487 auto box = text::open_layout_box(layout, indentation);
5490 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5492 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5493 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::state});
5494 text::localised_format_box(ws, layout, box, "event_fires", m);
5495 text::close_layout_box(layout, box);
5496 }
5497 return 0;
5498}
5500 {
5501 auto box = text::open_layout_box(layout, indentation);
5504 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5506 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5507 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::province});
5508 text::localised_format_box(ws, layout, box, "event_fires", m);
5509 text::close_layout_box(layout, box);
5510 }
5511 return 0;
5512}
5514 {
5515 auto box = text::open_layout_box(layout, indentation);
5518 ws.world.national_event_get_name(trigger::payload(tval[1]).nev_id));
5520 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5521 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::province});
5522 text::localised_format_box(ws, layout, box, "event_fires", m);
5523 text::close_layout_box(layout, box);
5524 }
5525 return 0;
5526}
5528 {
5529 auto box = text::open_layout_box(layout, indentation);
5532 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5534 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5535 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::pop});
5536 text::localised_format_box(ws, layout, box, "event_fires", m);
5537 text::close_layout_box(layout, box);
5538 }
5539 return 0;
5540}
5542 {
5543 auto box = text::open_layout_box(layout, indentation);
5546 ws.world.provincial_event_get_name(trigger::payload(tval[1]).pev_id));
5548 trigger::to_generic(ws.world.province_get_nation_from_province_ownership(trigger::to_prov(primary_slot))),
5549 this_slot, ws.current_date, trigger::payload(tval[1]).nev_id, trigger::to_nation(primary_slot), event::slot_type::nation, event::slot_type::pop});
5550 text::localised_format_box(ws, layout, box, "event_fires", m);
5551 text::close_layout_box(layout, box);
5552 }
5553 return 0;
5554}
5555
5557 {
5558 auto box = text::open_layout_box(layout, indentation);
5560 text::localised_format_box(ws, layout, box, "no_effect", m);
5561 text::close_layout_box(layout, box);
5562 }
5563 return 0;
5564}
5566 {
5567 auto box = text::open_layout_box(layout, indentation);
5569 text::localised_format_box(ws, layout, box, "no_effect", m);
5570 text::close_layout_box(layout, box);
5571 }
5572 return 0;
5573}
5575 {
5576 auto box = text::open_layout_box(layout, indentation);
5578 text::localised_format_box(ws, layout, box, "no_effect", m);
5579 text::close_layout_box(layout, box);
5580 }
5581 return 0;
5582}
5584 {
5585 auto box = text::open_layout_box(layout, indentation);
5587 text::localised_format_box(ws, layout, box, "no_effect", m);
5588 text::close_layout_box(layout, box);
5589 }
5590 return 0;
5591}
5593 {
5594 auto box = text::open_layout_box(layout, indentation);
5597 ws.national_definitions.variable_names[trigger::payload(tval[1]).natv_id]);
5599 text::localised_format_box(ws, layout, box, "set_national_variable_to", m);
5600 text::close_layout_box(layout, box);
5601 }
5602 return 0;
5603}
5605 auto amount = trigger::read_float_from_payload(tval + 2);
5606 if(amount >= 0) {
5607 auto box = text::open_layout_box(layout, indentation);
5610 ws.national_definitions.variable_names[trigger::payload(tval[1]).natv_id]);
5612 text::localised_format_box(ws, layout, box, "increase_national_variable_by", m);
5613 text::close_layout_box(layout, box);
5614 } else {
5615 auto box = text::open_layout_box(layout, indentation);
5618 ws.national_definitions.variable_names[trigger::payload(tval[1]).natv_id]);
5620 text::localised_format_box(ws, layout, box, "decrease_national_variable_by", m);
5621 text::close_layout_box(layout, box);
5622 }
5623 return 0;
5624}
5626 {
5627 auto box = text::open_layout_box(layout, indentation);
5629 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5630 text::localised_format_box(ws, layout, box, "support_for_blank", m);
5631 text::add_space_to_layout_box(ws, layout, box);
5632 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5633 text::close_layout_box(layout, box);
5634 }
5635 return 0;
5636}
5638 {
5639 auto box = text::open_layout_box(layout, indentation);
5641 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5642 text::localised_format_box(ws, layout, box, "uh_support_for_blank", m);
5643 text::add_space_to_layout_box(ws, layout, box);
5644 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5645 text::close_layout_box(layout, box);
5646 }
5647 return 0;
5648}
5650 {
5651 auto box = text::open_layout_box(layout, indentation);
5653 std::string t = text::produce_simple_string(ws, "militancy");
5654 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5655 text::add_space_to_layout_box(ws, layout, box);
5656 text::add_to_layout_box(ws, layout, box, t);
5657 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5658 text::localised_format_box(ws, layout, box, "scaled_support", m);
5659 text::close_layout_box(layout, box);
5660 }
5661 return 0;
5662}
5664 {
5665 auto box = text::open_layout_box(layout, indentation);
5667 std::string t = text::produce_simple_string(ws, "militancy");
5668 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5669 text::add_space_to_layout_box(ws, layout, box);
5670 text::add_to_layout_box(ws, layout, box, t);
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, "scaled_support", m);
5673 text::close_layout_box(layout, box);
5674 }
5675 return 0;
5676}
5678 {
5679 auto box = text::open_layout_box(layout, indentation);
5680 std::string t = text::produce_simple_string(ws, "militancy");
5681 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
5682 text::add_space_to_layout_box(ws, layout, box);
5683 text::add_to_layout_box(ws, layout, box, t);
5684 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5685 text::close_layout_box(layout, box);
5686 }
5687 return 0;
5688}
5690 {
5691 auto box = text::open_layout_box(layout, indentation);
5693 std::string t = text::produce_simple_string(ws, "consciousness");
5694 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5695 text::add_space_to_layout_box(ws, layout, box);
5696 text::add_to_layout_box(ws, layout, box, t);
5697 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5698 text::localised_format_box(ws, layout, box, "scaled_support", m);
5699 text::close_layout_box(layout, box);
5700 }
5701 return 0;
5702}
5704 {
5705 auto box = text::open_layout_box(layout, indentation);
5707 std::string t = text::produce_simple_string(ws, "consciousness");
5708 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5709 text::add_space_to_layout_box(ws, layout, box);
5710 text::add_to_layout_box(ws, layout, box, t);
5711 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5712 text::localised_format_box(ws, layout, box, "scaled_support", m);
5713 text::close_layout_box(layout, box);
5714 }
5715 return 0;
5716}
5718 {
5719 auto box = text::open_layout_box(layout, indentation);
5720 std::string t = text::produce_simple_string(ws, "consciousness");
5721 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
5722 text::add_space_to_layout_box(ws, layout, box);
5723 text::add_to_layout_box(ws, layout, box, t);
5724 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5725 text::close_layout_box(layout, box);
5726 }
5727 return 0;
5728}
5730 {
5731 auto box = text::open_layout_box(layout, indentation);
5733 std::string t = text::produce_simple_string(ws, "militancy");
5734 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5735 text::add_space_to_layout_box(ws, layout, box);
5736 text::add_to_layout_box(ws, layout, box, t);
5737 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5738 text::localised_format_box(ws, layout, box, "scaled_support", m);
5739 text::close_layout_box(layout, box);
5740 }
5741 return 0;
5742}
5744 {
5745 auto box = text::open_layout_box(layout, indentation);
5747 std::string t = text::produce_simple_string(ws, "militancy");
5748 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5749 text::add_space_to_layout_box(ws, layout, box);
5750 text::add_to_layout_box(ws, layout, box, t);
5751 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5752 text::localised_format_box(ws, layout, box, "scaled_support", m);
5753 text::close_layout_box(layout, box);
5754 }
5755 return 0;
5756}
5758 {
5759 auto box = text::open_layout_box(layout, indentation);
5760 std::string t = text::produce_simple_string(ws, "militancy");
5761 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
5762 text::add_space_to_layout_box(ws, layout, box);
5763 text::add_to_layout_box(ws, layout, box, t);
5764 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5765 text::close_layout_box(layout, box);
5766 }
5767 return 0;
5768}
5770 {
5771 auto box = text::open_layout_box(layout, indentation);
5773 std::string t = text::produce_simple_string(ws, "consciousness");
5774 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5775 text::add_space_to_layout_box(ws, layout, box);
5776 text::add_to_layout_box(ws, layout, box, t);
5777 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5778 text::localised_format_box(ws, layout, box, "scaled_support", m);
5779 text::close_layout_box(layout, box);
5780 }
5781 return 0;
5782}
5784 {
5785 auto box = text::open_layout_box(layout, indentation);
5787 std::string t = text::produce_simple_string(ws, "consciousness");
5788 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5789 text::add_space_to_layout_box(ws, layout, box);
5790 text::add_to_layout_box(ws, layout, box, t);
5791 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5792 text::localised_format_box(ws, layout, box, "scaled_support", m);
5793 text::close_layout_box(layout, box);
5794 }
5795 return 0;
5796}
5798 {
5799 auto box = text::open_layout_box(layout, indentation);
5800 std::string t = text::produce_simple_string(ws, "consciousness");
5801 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
5802 text::add_space_to_layout_box(ws, layout, box);
5803 text::add_to_layout_box(ws, layout, box, t);
5804 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5805 text::close_layout_box(layout, box);
5806 }
5807 return 0;
5808}
5810 {
5811 auto box = text::open_layout_box(layout, indentation);
5813 std::string t = text::produce_simple_string(ws, "militancy");
5814 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5815 text::add_space_to_layout_box(ws, layout, box);
5816 text::add_to_layout_box(ws, layout, box, t);
5817 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5818 text::localised_format_box(ws, layout, box, "scaled_support", m);
5819 text::close_layout_box(layout, box);
5820 }
5821 return 0;
5822}
5824 {
5825 auto box = text::open_layout_box(layout, indentation);
5827 std::string t = text::produce_simple_string(ws, "militancy");
5828 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5829 text::add_space_to_layout_box(ws, layout, box);
5830 text::add_to_layout_box(ws, layout, box, t);
5831 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5832 text::localised_format_box(ws, layout, box, "scaled_support", m);
5833 text::close_layout_box(layout, box);
5834 }
5835 return 0;
5836}
5838 {
5839 auto box = text::open_layout_box(layout, indentation);
5840 std::string t = text::produce_simple_string(ws, "militancy");
5841 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
5842 text::add_space_to_layout_box(ws, layout, box);
5843 text::add_to_layout_box(ws, layout, box, t);
5844 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5845 text::close_layout_box(layout, box);
5846 }
5847 return 0;
5848}
5850 {
5851 auto box = text::open_layout_box(layout, indentation);
5853 std::string t = text::produce_simple_string(ws, "consciousness");
5854 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5855 text::add_space_to_layout_box(ws, layout, box);
5856 text::add_to_layout_box(ws, layout, box, t);
5857 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5858 text::localised_format_box(ws, layout, box, "scaled_support", m);
5859 text::close_layout_box(layout, box);
5860 }
5861 return 0;
5862}
5864 {
5865 auto box = text::open_layout_box(layout, indentation);
5867 std::string t = text::produce_simple_string(ws, "consciousness");
5868 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5869 text::add_space_to_layout_box(ws, layout, box);
5870 text::add_to_layout_box(ws, layout, box, t);
5871 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5872 text::localised_format_box(ws, layout, box, "scaled_support", m);
5873 text::close_layout_box(layout, box);
5874 }
5875 return 0;
5876}
5878 {
5879 auto box = text::open_layout_box(layout, indentation);
5880 std::string t = text::produce_simple_string(ws, "consciousness");
5881 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
5882 text::add_space_to_layout_box(ws, layout, box);
5883 text::add_to_layout_box(ws, layout, box, t);
5884 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5885 text::close_layout_box(layout, box);
5886 }
5887 return 0;
5888}
5890 {
5891 auto box = text::open_layout_box(layout, indentation);
5893 std::string t = text::produce_simple_string(ws, "militancy");
5894 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5895 text::add_space_to_layout_box(ws, layout, box);
5896 text::add_to_layout_box(ws, layout, box, t);
5897 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5898 text::localised_format_box(ws, layout, box, "scaled_support", m);
5899 text::close_layout_box(layout, box);
5900 }
5901 return 0;
5902}
5904 {
5905 auto box = text::open_layout_box(layout, indentation);
5907 std::string t = text::produce_simple_string(ws, "militancy");
5908 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, false, ws, layout, box);
5909 text::add_space_to_layout_box(ws, layout, box);
5910 text::add_to_layout_box(ws, layout, box, t);
5911 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5912 text::localised_format_box(ws, layout, box, "scaled_support", m);
5913 text::close_layout_box(layout, box);
5914 }
5915 return 0;
5916}
5918 {
5919 auto box = text::open_layout_box(layout, indentation);
5920 std::string t = text::produce_simple_string(ws, "militancy");
5921 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, false, ws, layout, box);
5922 text::add_space_to_layout_box(ws, layout, box);
5923 text::add_to_layout_box(ws, layout, box, t);
5924 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5925 text::close_layout_box(layout, box);
5926 }
5927 return 0;
5928}
5930 {
5931 auto box = text::open_layout_box(layout, indentation);
5933 std::string t = text::produce_simple_string(ws, "consciousness");
5934 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5935 text::add_space_to_layout_box(ws, layout, box);
5936 text::add_to_layout_box(ws, layout, box, t);
5937 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
5938 text::localised_format_box(ws, layout, box, "scaled_support", m);
5939 text::close_layout_box(layout, box);
5940 }
5941 return 0;
5942}
5944 {
5945 auto box = text::open_layout_box(layout, indentation);
5947 std::string t = text::produce_simple_string(ws, "consciousness");
5948 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
5949 text::add_space_to_layout_box(ws, layout, box);
5950 text::add_to_layout_box(ws, layout, box, t);
5951 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
5952 text::localised_format_box(ws, layout, box, "scaled_support", m);
5953 text::close_layout_box(layout, box);
5954 }
5955 return 0;
5956}
5958 {
5959 auto box = text::open_layout_box(layout, indentation);
5960 std::string t = text::produce_simple_string(ws, "consciousness");
5961 display_value(text::fp_one_place{ trigger::read_float_from_payload(tval + 1) }, true, ws, layout, box);
5962 text::add_space_to_layout_box(ws, layout, box);
5963 text::add_to_layout_box(ws, layout, box, t);
5964 text::localised_format_box(ws, layout, box, "scaled_unemployment");
5965 text::close_layout_box(layout, box);
5966 }
5967 return 0;
5968}
5970 {
5971 auto amount = trigger::read_float_from_payload(tval + 2);
5972 auto box = text::open_layout_box(layout, indentation);
5973 display_value(text::fp_one_place{ amount }, true, ws, layout, box);
5975 text::add_to_substitution_map(m, text::variable_type::text, ws.world.commodity_get_name(trigger::payload(tval[1]).com_id));
5976 text::localised_format_box(ws, layout, box, "stockpile_of", m);
5977 text::close_layout_box(layout, box);
5978 }
5979 return 0;
5980}
5982 {
5983 auto amount = trigger::read_float_from_payload(tval + 2);
5984 auto box = text::open_layout_box(layout, indentation);
5985 display_value(text::fp_one_place{ amount }, true, ws, layout, box);
5987 text::add_to_substitution_map(m, text::variable_type::text, ws.world.commodity_get_name(trigger::payload(tval[1]).com_id));
5988 text::localised_format_box(ws, layout, box, "stockpile_of", m);
5989 text::close_layout_box(layout, box);
5990 }
5991 return 0;
5992}
5994 {
5995 auto box = text::open_layout_box(layout, indentation);
5997 text::localised_format_box(ws, layout, box, "create_general", m);
5998 text::close_layout_box(layout, box);
5999 }
6000 return 0;
6001}
6003 {
6004 auto box = text::open_layout_box(layout, indentation);
6006 text::localised_format_box(ws, layout, box, "create_admiral", m);
6007 text::close_layout_box(layout, box);
6008 }
6009 return 0;
6010}
6012 {
6013 auto box = text::open_layout_box(layout, indentation);
6015 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6016 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6017 text::add_space_to_layout_box(ws, layout, box);
6018 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
6019 text::close_layout_box(layout, box);
6020 }
6021 return 0;
6022}
6024 {
6025 auto box = text::open_layout_box(layout, indentation);
6027 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6028 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6029 text::add_space_to_layout_box(ws, layout, box);
6030 display_value(text::fp_percentage{ trigger::read_float_from_payload(tval + 2) }, true, ws, layout, box);
6031 text::close_layout_box(layout, box);
6032 }
6033 return 0;
6034}
6036 {
6037 auto amount = trigger::read_float_from_payload(tval + 2);
6038 auto box = text::open_layout_box(layout, indentation);
6040 text::add_to_substitution_map(m, text::variable_type::text, ws.world.cb_type_get_name(trigger::payload(tval[1]).cb_id));
6041 std::string t;
6042 if(primary_slot != -1)
6044 else {
6045 t = text::produce_simple_string(ws, "this_nation");
6047 }
6048 text::localised_format_box(ws, layout, box, "add_war_goal", m);
6049 text::close_layout_box(layout, box);
6050 }
6051 return 0;
6052}
6054 auto amount = trigger::read_float_from_payload(tval + 3);
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{ -amount }, true, ws, layout, box);
6062 text::close_layout_box(layout, box);
6063 }
6064 {
6065 auto box = text::open_layout_box(layout, indentation);
6067 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[2]).opt_id));
6068 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6069 text::add_space_to_layout_box(ws, layout, box);
6070 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6071 text::close_layout_box(layout, box);
6072 }
6073 return 0;
6074}
6076 auto amount = trigger::read_float_from_payload(tval + 3);
6077 {
6078 auto box = text::open_layout_box(layout, indentation);
6080 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6081 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6082 text::add_space_to_layout_box(ws, layout, box);
6083 display_value(text::fp_percentage{ -amount }, true, ws, layout, box);
6084 text::close_layout_box(layout, box);
6085 }
6086 {
6087 auto box = text::open_layout_box(layout, indentation);
6089 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[2]).opt_id));
6090 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6091 text::add_space_to_layout_box(ws, layout, box);
6092 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6093 text::close_layout_box(layout, box);
6094 }
6095 return 0;
6096}
6098 auto amount = trigger::read_float_from_payload(tval + 3);
6099 {
6100 auto box = text::open_layout_box(layout, indentation);
6102 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6103 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6104 text::add_space_to_layout_box(ws, layout, box);
6105 display_value(text::fp_percentage{ -amount }, true, ws, layout, box);
6106 text::close_layout_box(layout, box);
6107 }
6108 {
6109 auto box = text::open_layout_box(layout, indentation);
6111 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[2]).opt_id));
6112 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6113 text::add_space_to_layout_box(ws, layout, box);
6114 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6115 text::close_layout_box(layout, box);
6116 }
6117 return 0;
6118}
6120 auto amount = trigger::read_float_from_payload(tval + 3);
6121 {
6122 auto box = text::open_layout_box(layout, indentation);
6124 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[1]).opt_id));
6125 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6126 text::add_space_to_layout_box(ws, layout, box);
6127 display_value(text::fp_percentage{ -amount }, true, ws, layout, box);
6128 text::close_layout_box(layout, box);
6129 }
6130 {
6131 auto box = text::open_layout_box(layout, indentation);
6133 text::add_to_substitution_map(m, text::variable_type::text, ws.world.issue_option_get_name(trigger::payload(tval[2]).opt_id));
6134 text::localised_format_box(ws, layout, box, "support_for_blank", m);
6135 text::add_space_to_layout_box(ws, layout, box);
6136 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6137 text::close_layout_box(layout, box);
6138 }
6139 return 0;
6140}
6142 float amount = float(trigger::payload(tval[2]).signed_value) / 100.0f;
6143 {
6144 auto box = text::open_layout_box(layout, indentation);
6146 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[1]).ideo_id));
6147 text::localised_format_box(ws, layout, box, "blank_loyalty", m);
6148 text::add_space_to_layout_box(ws, layout, box);
6149 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6150 text::close_layout_box(layout, box);
6151 }
6152 return 0;
6153}
6155 float amount = float(trigger::payload(tval[3]).signed_value) / 100.0f;
6156 {
6157 auto box = text::open_layout_box(layout, indentation);
6158 text::add_to_layout_box(ws, layout, box, trigger::payload(tval[1]).prov_id);
6159 text::close_layout_box(layout, box);
6160 }
6161 {
6162 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6164 text::add_to_substitution_map(m, text::variable_type::text, ws.world.ideology_get_name(trigger::payload(tval[2]).ideo_id));
6165 text::localised_format_box(ws, layout, box, "blank_loyalty", m);
6166 text::add_space_to_layout_box(ws, layout, box);
6167 display_value(text::fp_percentage{ amount }, true, ws, layout, box);
6168 text::close_layout_box(layout, box);
6169 }
6170 return 0;
6171}
6173 {
6174 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6176 text::localised_format_box(ws, layout, box, "railroad_in_capital_state", m);
6177 text::close_layout_box(layout, box);
6178 }
6179 return 0;
6180}
6182 {
6183 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6185 text::localised_format_box(ws, layout, box, "railroad_in_capital_state", m);
6186 text::close_layout_box(layout, box);
6187 }
6188 return 0;
6189}
6191 {
6192 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6194 text::localised_format_box(ws, layout, box, "railroad_in_capital", m);
6195 text::close_layout_box(layout, box);
6196 }
6197 return 0;
6198}
6200 {
6201 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6203 text::localised_format_box(ws, layout, box, "railroad_in_capital", m);
6204 text::close_layout_box(layout, box);
6205 }
6206 return 0;
6207}
6209 {
6210 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6212 text::localised_format_box(ws, layout, box, "fort_in_capital_state", m);
6213 text::close_layout_box(layout, box);
6214 }
6215 return 0;
6216}
6218 {
6219 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6221 text::localised_format_box(ws, layout, box, "fort_in_capital_state", m);
6222 text::close_layout_box(layout, box);
6223 }
6224 return 0;
6225}
6227 {
6228 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6230 text::localised_format_box(ws, layout, box, "fort_in_capital", m);
6231 text::close_layout_box(layout, box);
6232 }
6233 return 0;
6234}
6236 {
6237 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6239 text::localised_format_box(ws, layout, box, "fort_in_capital", m);
6240 text::close_layout_box(layout, box);
6241 }
6242 return 0;
6243}
6245 {
6246 auto box = text::open_layout_box(layout, indentation);
6248 add_to_map(ws, m, convert_this(ws, trigger::to_rebel(from_slot)), "from_nation", [](auto x) { return x; });
6249 text::localised_format_box(ws, layout, box, "relations_with", m);
6250 text::add_space_to_layout_box(ws, layout, box);
6251 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6252 text::close_layout_box(layout, box);
6253 }
6254 return 0;
6255}
6257 {
6258 auto box = text::open_layout_box(layout, indentation);
6260 text::add_to_substitution_map(m, text::variable_type::text, ws.world.technology_get_name(trigger::payload(tval[1]).tech_id));
6261 text::localised_format_box(ws, layout, box, "enable_blank", m);
6262 text::close_layout_box(layout, box);
6263 }
6264 return 0;
6265}
6267 {
6268 auto box = text::open_layout_box(layout, indentation);
6270 text::add_to_substitution_map(m, text::variable_type::text, ws.world.technology_get_name(trigger::payload(tval[1]).tech_id));
6271 text::localised_format_box(ws, layout, box, "disable_blank", m);
6272 text::close_layout_box(layout, box);
6273 }
6274 return 0;
6275}
6277 {
6278 auto box = text::open_layout_box(layout, indentation);
6280 text::add_to_substitution_map(m, text::variable_type::text, ws.world.invention_get_name(trigger::payload(tval[1]).invt_id));
6281 text::localised_format_box(ws, layout, box, "enable_blank", m);
6282 text::close_layout_box(layout, box);
6283 }
6284 return 0;
6285}
6287 {
6288 auto box = text::open_layout_box(layout, indentation);
6290 text::add_to_substitution_map(m, text::variable_type::text, ws.world.invention_get_name(trigger::payload(tval[1]).invt_id));
6291 text::localised_format_box(ws, layout, box, "disable_blank", m);
6292 text::close_layout_box(layout, box);
6293 }
6294 return 0;
6295}
6297 {
6298 auto box = text::open_layout_box(layout, indentation);
6301 ws.national_definitions.flag_variable_names[trigger::payload(tval[1]).natf_id]);
6302 text::localised_format_box(ws, layout, box, "o_set_national_flag", m);
6303 text::close_layout_box(layout, box);
6304 }
6305 return 0;
6306}
6308 auto box = text::open_layout_box(layout, indentation);
6310 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
6312 text::localised_format_box(ws, layout, box, "o_add_modifier_until", m);
6313 text::close_layout_box(layout, box);
6314 if(ws.user_settings.spoilers) {
6315 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
6316 }
6317 return 0;
6318}
6320 auto box = text::open_layout_box(layout, indentation);
6322 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
6323 text::localised_format_box(ws, layout, box, "o_add_modifier", m);
6324 text::close_layout_box(layout, box);
6325 if(ws.user_settings.spoilers) {
6326 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
6327 }
6328 return 0;
6329}
6331 auto target = ws.world.national_identity_get_nation_from_identity_holder(trigger::payload(tval[1]).tag_id);
6332 if(target) {
6333 auto box = text::open_layout_box(layout, indentation);
6336 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6337 text::add_space_to_layout_box(ws, layout, box);
6338 display_value(int64_t(trigger::payload(tval[2]).signed_value), true, ws, layout, box);
6339 text::close_layout_box(layout, box);
6340 }
6341 return 0;
6342}
6344 {
6345 auto box = text::open_layout_box(layout, indentation);
6347 add_to_map(ws, m, convert_this(ws, trigger::to_nation(this_slot)), "this_nation", [](auto x) { return x; });
6348 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6349 text::add_space_to_layout_box(ws, layout, box);
6350 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6351 text::close_layout_box(layout, box);
6352 }
6353 return 0;
6354}
6356 {
6357 auto box = text::open_layout_box(layout, indentation);
6359 add_to_map(ws, m, convert_this(ws, trigger::to_prov(this_slot)), "this_nation", [](auto x) { return x; });
6360 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6361 text::add_space_to_layout_box(ws, layout, box);
6362 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6363 text::close_layout_box(layout, box);
6364 }
6365 return 0;
6366}
6368 {
6369 auto box = text::open_layout_box(layout, indentation);
6371 add_to_map(ws, m, convert_this(ws, trigger::to_nation(from_slot)), "from_nation", [](auto x) { return x; });
6372 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6373 text::add_space_to_layout_box(ws, layout, box);
6374 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6375 text::close_layout_box(layout, box);
6376 }
6377 return 0;
6378}
6380 {
6381 auto box = text::open_layout_box(layout, indentation);
6383 add_to_map(ws, m, convert_this(ws, trigger::to_prov(from_slot)), "from_nation", [](auto x) { return x; });
6384 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6385 text::add_space_to_layout_box(ws, layout, box);
6386 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6387 text::close_layout_box(layout, box);
6388 }
6389 return 0;
6390}
6392 {
6393 auto box = text::open_layout_box(layout, indentation);
6395 add_to_map(ws, m, convert_this(ws, trigger::to_rebel(from_slot)), "from_nation", [](auto x) { return x; });
6396 text::localised_format_box(ws, layout, box, "o_relations_with", m);
6397 text::add_space_to_layout_box(ws, layout, box);
6398 display_value(int64_t(trigger::payload(tval[1]).signed_value), true, ws, layout, box);
6399 text::close_layout_box(layout, box);
6400 }
6401 return 0;
6402}
6404 auto amount = trigger::read_float_from_payload(tval + 1);
6405 {
6406 auto box = text::open_layout_box(layout, indentation);
6407 display_value(text::fp_currency{ amount }, true, ws, layout, box);
6409 text::localised_format_box(ws, layout, box, "o_add_to_treasury", m);
6410 text::close_layout_box(layout, box);
6411 }
6412 return 0;
6413}
6415 dcon::unit_name_id ename{ dcon::unit_name_id::value_base_t(trigger::read_int32_t_from_payload(tval + 1)) };
6416 auto esv = ws.to_string_view(ename);
6417 auto box = text::open_layout_box(layout, indentation);
6418 text::localised_format_box(ws, layout, box, "e_kill_leader");
6419 text::add_space_to_layout_box(ws, layout, box);
6420 text::add_to_layout_box(ws, layout, box, esv);
6421 text::close_layout_box(layout, box);
6422 return 0;
6423}
6424
6425//
6426// Banks
6427//
6429 {
6430 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6432 text::localised_format_box(ws, layout, box, "bank_in_capital_state", m);
6433 text::close_layout_box(layout, box);
6434 }
6435 return 0;
6436}
6438 {
6439 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6441 text::localised_format_box(ws, layout, box, "bank_in_capital_state", m);
6442 text::close_layout_box(layout, box);
6443 }
6444 return 0;
6445}
6447 {
6448 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6450 text::localised_format_box(ws, layout, box, "bank_in_capital", m);
6451 text::close_layout_box(layout, box);
6452 }
6453 return 0;
6454}
6456 {
6457 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6459 text::localised_format_box(ws, layout, box, "bank_in_capital", m);
6460 text::close_layout_box(layout, box);
6461 }
6462 return 0;
6463}
6464
6465//
6466// Universities
6467//
6469 {
6470 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6472 text::localised_format_box(ws, layout, box, "university_in_capital_state", m);
6473 text::close_layout_box(layout, box);
6474 }
6475 return 0;
6476}
6478 {
6479 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6481 text::localised_format_box(ws, layout, box, "university_in_capital_state", m);
6482 text::close_layout_box(layout, box);
6483 }
6484 return 0;
6485}
6487 {
6488 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6490 text::localised_format_box(ws, layout, box, "university_in_capital", m);
6491 text::close_layout_box(layout, box);
6492 }
6493 return 0;
6494}
6496 {
6497 auto box = text::open_layout_box(layout, indentation + indentation_amount);
6499 text::localised_format_box(ws, layout, box, "university_in_capital", m);
6500 text::close_layout_box(layout, box);
6501 }
6502 return 0;
6503}
6504
6507 auto amount = trigger::payload(tval[1]).signed_value;
6508 {
6509 auto box = text::open_layout_box(layout, indentation);
6512 text::add_space_to_layout_box(ws, layout, box);
6513 display_value(int64_t(amount), true, ws, layout, box);
6514 text::close_layout_box(layout, box);
6515 }
6516 return 0;
6517}
6520 auto amount = trigger::payload(tval[1]).signed_value;
6521 {
6522 auto box = text::open_layout_box(layout, indentation);
6525 text::add_space_to_layout_box(ws, layout, box);
6526 display_value(int64_t(amount), true, ws, layout, box);
6527 text::close_layout_box(layout, box);
6528 }
6529 return 0;
6530}
6531
6533 text::add_line(ws, layout, text::produce_simple_string(ws, "e_annex_null"));
6534 return 0;
6535}
6536
6538 if(ws.user_settings.spoilers) {
6539 for(uint32_t i = 0; i < 2; i++) {
6540 auto box = text::open_layout_box(layout, indentation);
6542 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6543 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6544 text::close_layout_box(layout, box);
6545 }
6546 }
6547 return 0;
6548}
6550 if(ws.user_settings.spoilers) {
6551 for(uint32_t i = 0; i < 3; i++) {
6552 auto box = text::open_layout_box(layout, indentation);
6554 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6555 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6556 text::close_layout_box(layout, box);
6557 }
6558 }
6559 return 0;
6560}
6562 if(ws.user_settings.spoilers) {
6563 for(uint32_t i = 0; i < 4; i++) {
6564 auto box = text::open_layout_box(layout, indentation);
6566 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6567 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6568 text::close_layout_box(layout, box);
6569 }
6570 }
6571 return 0;
6572}
6574 if(ws.user_settings.spoilers) {
6575 for(uint32_t i = 0; i < 5; i++) {
6576 auto box = text::open_layout_box(layout, indentation);
6578 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6579 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6580 text::close_layout_box(layout, box);
6581 }
6582 }
6583 return 0;
6584}
6586 if(ws.user_settings.spoilers) {
6587 for(uint32_t i = 0; i < 6; i++) {
6588 auto box = text::open_layout_box(layout, indentation);
6590 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6591 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6592 text::close_layout_box(layout, box);
6593 }
6594 }
6595 return 0;
6596}
6598 if(ws.user_settings.spoilers) {
6599 for(uint32_t i = 0; i < 7; i++) {
6600 auto box = text::open_layout_box(layout, indentation);
6602 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6603 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6604 text::close_layout_box(layout, box);
6605 }
6606 }
6607 return 0;
6608}
6610 if(ws.user_settings.spoilers) {
6611 for(uint32_t i = 0; i < 8; i++) {
6612 auto box = text::open_layout_box(layout, indentation);
6614 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6615 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6616 text::close_layout_box(layout, box);
6617 }
6618 }
6619 return 0;
6620}
6622 if(ws.user_settings.spoilers) {
6623 for(uint32_t i = 0; i < 9; i++) {
6624 auto box = text::open_layout_box(layout, indentation);
6626 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6627 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6628 text::close_layout_box(layout, box);
6629 }
6630 }
6631 return 0;
6632}
6634 if(ws.user_settings.spoilers) {
6635 for(uint32_t i = 0; i < 10; i++) {
6636 auto box = text::open_layout_box(layout, indentation);
6638 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6639 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6640 text::close_layout_box(layout, box);
6641 }
6642 }
6643 return 0;
6644}
6646 if(ws.user_settings.spoilers) {
6647 for(uint32_t i = 0; i < 11; i++) {
6648 auto box = text::open_layout_box(layout, indentation);
6650 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6651 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6652 text::close_layout_box(layout, box);
6653 }
6654 }
6655 return 0;
6656}
6658 if(ws.user_settings.spoilers) {
6659 for(uint32_t i = 0; i < 11; i++) {
6660 auto box = text::open_layout_box(layout, indentation);
6662 text::add_to_substitution_map(m, text::variable_type::text, ws.national_definitions.global_flag_variable_names[trigger::payload(tval[1 + i]).glob_id]);
6663 text::localised_format_box(ws, layout, box, "remove_global_flag", m);
6664 text::close_layout_box(layout, box);
6665 }
6666 }
6667 return 0;
6668}
6670 auto p = trigger::payload(tval[3]).prov_id;
6671 auto box = text::open_layout_box(layout, indentation);
6672 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, ws.world.province_get_name(p)));
6673 text::add_space_to_layout_box(ws, layout, box);
6675 dcon::text_key name{ dcon::text_key::value_base_t(trigger::read_int32_t_from_payload(tval + 1)) };
6677 text::localised_format_box(ws, layout, box, "change_name_to", m);
6678 text::close_layout_box(layout, box);
6679 return 0;
6680}
6682 auto box = text::open_layout_box(layout, indentation);
6684 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
6685 text::localised_format_box(ws, layout, box, "ett_change_pop_terrain_to", m);
6686 text::close_layout_box(layout, box);
6687 if(ws.user_settings.spoilers) {
6688 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
6689 }
6690 return 0;
6691}
6693 auto box = text::open_layout_box(layout, indentation);
6695 text::add_to_substitution_map(m, text::variable_type::text, ws.world.modifier_get_name(trigger::payload(tval[1]).mod_id));
6696 text::localised_format_box(ws, layout, box, "ett_change_province_terrain_to", m);
6697 text::close_layout_box(layout, box);
6698 if(ws.user_settings.spoilers) {
6699 modifier_description(ws, layout, trigger::payload(tval[1]).mod_id, indentation + indentation_amount);
6700 }
6701 return 0;
6702}
6704 auto box = text::open_layout_box(layout, indentation);
6705 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "masquerade_as_nation"));
6706 text::add_space_to_layout_box(ws, layout, box);
6707 text::add_to_layout_box(ws, layout, box, text::get_name(ws, trigger::to_nation(this_slot)));
6708 text::close_layout_box(layout, box);
6709 return 0;
6710}
6712 auto box = text::open_layout_box(layout, indentation);
6713 text::add_to_layout_box(ws, layout, box, text::produce_simple_string(ws, "masquerade_as_nation"));
6714 text::add_space_to_layout_box(ws, layout, box);
6715 text::add_to_layout_box(ws, layout, box, text::get_name(ws, trigger::to_nation(from_slot)));
6716 text::close_layout_box(layout, box);
6717 return 0;
6718}
6719
6721 auto ideology = trigger::payload(tval[1]).ideo_id;
6722 dcon::text_key new_name{ dcon::text_key::value_base_t(trigger::read_int32_t_from_payload(tval + 2)) };
6723
6724 if(ideology) {
6725 auto id_name = ws.world.ideology_get_name(ideology);
6726
6727 auto box = text::open_layout_box(layout, indentation);
6731 text::localised_format_box(ws, layout, box, "change_pname_to", m);
6732 text::close_layout_box(layout, box);
6733 return 0;
6734 } else {
6735 auto box = text::open_layout_box(layout, indentation);
6738 text::localised_format_box(ws, layout, box, "change_rpname_to", m);
6739 text::close_layout_box(layout, box);
6740 return 0;
6741 }
6742}
6743
6745 auto ideology = trigger::payload(tval[1]).ideo_id;
6746 dcon::issue_option_id new_opt = trigger::payload(tval[2]).opt_id;
6747 auto opt_name = ws.world.issue_option_get_name(new_opt);
6748
6749 if(ideology) {
6750 auto id_name = ws.world.ideology_get_name(ideology);
6751
6752 auto box = text::open_layout_box(layout, indentation);
6756 text::localised_format_box(ws, layout, box, "change_pposition_to", m);
6757 text::close_layout_box(layout, box);
6758 return 0;
6759 } else {
6760 auto box = text::open_layout_box(layout, indentation);
6763 text::localised_format_box(ws, layout, box, "change_rpposition_to", m);
6764 text::close_layout_box(layout, box);
6765 return 0;
6766 }
6767}
6768
6770 ef_none,
6771 ef_capital, // constexpr inline uint16_t capital = 0x0001;
6772 ef_add_core_tag, // constexpr inline uint16_t add_core_tag = 0x0002;
6773 ef_add_core_int, // constexpr inline uint16_t add_core_int = 0x0003;
6774 ef_add_core_this_nation, // constexpr inline uint16_t add_core_this_nation = 0x0004;
6775 ef_add_core_this_province, // constexpr inline uint16_t add_core_this_province = 0x0005;
6776 ef_add_core_this_state, // constexpr inline uint16_t add_core_this_state = 0x0006;
6777 ef_add_core_this_pop, // constexpr inline uint16_t add_core_this_pop = 0x0007;
6778 ef_add_core_from_province, // constexpr inline uint16_t add_core_from_province = 0x0008;
6779 ef_add_core_from_nation, // constexpr inline uint16_t add_core_from_nation = 0x0009;
6780 ef_add_core_reb, // constexpr inline uint16_t add_core_reb = 0x000A;
6781 ef_remove_core_tag, // constexpr inline uint16_t remove_core_tag = 0x000B;
6782 ef_remove_core_int, // constexpr inline uint16_t remove_core_int = 0x000C;
6783 ef_remove_core_this_nation, // constexpr inline uint16_t remove_core_this_nation = 0x000D;
6784 ef_remove_core_this_province, // constexpr inline uint16_t remove_core_this_province = 0x000E;
6785 ef_remove_core_this_state, // constexpr inline uint16_t remove_core_this_state = 0x000F;
6786 ef_remove_core_this_pop, // constexpr inline uint16_t remove_core_this_pop = 0x0010;
6787 ef_remove_core_from_province, // constexpr inline uint16_t remove_core_from_province = 0x0011;
6788 ef_remove_core_from_nation, // constexpr inline uint16_t remove_core_from_nation = 0x0012;
6789 ef_remove_core_reb, // constexpr inline uint16_t remove_core_reb = 0x0013;
6790 ef_change_region_name_state, // constexpr inline uint16_t change_region_name_state = 0x0014;
6791 ef_change_region_name_province, // constexpr inline uint16_t change_region_name_province = 0x0015;
6792 ef_trade_goods, // constexpr inline uint16_t trade_goods = 0x0016;
6793 ef_add_accepted_culture, // constexpr inline uint16_t add_accepted_culture = 0x0017;
6794 ef_add_accepted_culture_union, // constexpr inline uint16_t add_accepted_culture_union = 0x0018;
6795 ef_primary_culture, // constexpr inline uint16_t primary_culture = 0x0019;
6796 ef_primary_culture_this_nation, // constexpr inline uint16_t primary_culture_this_nation = 0x001A;
6797 ef_primary_culture_this_state, // constexpr inline uint16_t primary_culture_this_state = 0x001B;
6798 ef_primary_culture_this_province, // constexpr inline uint16_t primary_culture_this_province = 0x001C;
6799 ef_primary_culture_this_pop, // constexpr inline uint16_t primary_culture_this_pop = 0x001D;
6800 ef_primary_culture_from_nation, // constexpr inline uint16_t primary_culture_from_nation = 0x001E;
6801 ef_remove_accepted_culture, // constexpr inline uint16_t remove_accepted_culture = 0x001F;
6802 ef_life_rating, // constexpr inline uint16_t life_rating = 0x0020;
6803 ef_religion, // constexpr inline uint16_t religion = 0x0021;
6804 ef_is_slave_state_yes, // constexpr inline uint16_t is_slave_state_yes = 0x0022;
6805 ef_is_slave_pop_yes, // constexpr inline uint16_t is_slave_pop_yes = 0x0023;
6806 ef_research_points, // constexpr inline uint16_t research_points = 0x0024;
6807 ef_tech_school, // constexpr inline uint16_t tech_school = 0x0025;
6808 ef_government, // constexpr inline uint16_t government = 0x0026;
6809 ef_government_reb, // constexpr inline uint16_t government_reb = 0x0027;
6810 ef_treasury, // constexpr inline uint16_t treasury = 0x0028;
6811 ef_war_exhaustion, // constexpr inline uint16_t war_exhaustion = 0x0029;
6812 ef_prestige, // constexpr inline uint16_t prestige = 0x002A;
6813 ef_change_tag, // constexpr inline uint16_t change_tag = 0x002B;
6814 ef_change_tag_culture, // constexpr inline uint16_t change_tag_culture = 0x002C;
6815 ef_change_tag_no_core_switch, // constexpr inline uint16_t change_tag_no_core_switch = 0x002D;
6816 ef_change_tag_no_core_switch_culture, // constexpr inline uint16_t change_tag_no_core_switch_culture = 0x002E;
6817 ef_set_country_flag, // constexpr inline uint16_t set_country_flag = 0x002F;
6818 ef_clr_country_flag, // constexpr inline uint16_t clr_country_flag = 0x0030;
6819 ef_military_access, // constexpr inline uint16_t military_access = 0x0031;
6820 ef_military_access_this_nation, // constexpr inline uint16_t military_access_this_nation = 0x0032;
6821 ef_military_access_this_province, // constexpr inline uint16_t military_access_this_province = 0x0033;
6822 ef_military_access_from_nation, // constexpr inline uint16_t military_access_from_nation = 0x0034;
6823 ef_military_access_from_province, // constexpr inline uint16_t military_access_from_province = 0x0035;
6824 ef_badboy, // constexpr inline uint16_t badboy = 0x0036;
6825 ef_secede_province, // constexpr inline uint16_t secede_province = 0x0037;
6826 ef_secede_province_this_nation, // constexpr inline uint16_t secede_province_this_nation = 0x0038;
6827 ef_secede_province_this_state, // constexpr inline uint16_t secede_province_this_state = 0x0039;
6828 ef_secede_province_this_province, // constexpr inline uint16_t secede_province_this_province = 0x003A;
6829 ef_secede_province_this_pop, // constexpr inline uint16_t secede_province_this_pop = 0x003B;
6830 ef_secede_province_from_nation, // constexpr inline uint16_t secede_province_from_nation = 0x003C;
6831 ef_secede_province_from_province, // constexpr inline uint16_t secede_province_from_province = 0x003D;
6832 ef_secede_province_reb, // constexpr inline uint16_t secede_province_reb = 0x003E;
6833 ef_inherit, // constexpr inline uint16_t inherit = 0x003F;
6834 ef_inherit_this_nation, // constexpr inline uint16_t inherit_this_nation = 0x0040;
6835 ef_inherit_this_state, // constexpr inline uint16_t inherit_this_state = 0x0041;
6836 ef_inherit_this_province, // constexpr inline uint16_t inherit_this_province = 0x0042;
6837 ef_inherit_this_pop, // constexpr inline uint16_t inherit_this_pop = 0x0043;
6838 ef_inherit_from_nation, // constexpr inline uint16_t inherit_from_nation = 0x0044;
6839 ef_inherit_from_province, // constexpr inline uint16_t inherit_from_province = 0x0045;
6840 ef_annex_to, // constexpr inline uint16_t annex_to = 0x0046;
6841 ef_annex_to_this_nation, // constexpr inline uint16_t annex_to_this_nation = 0x0047;
6842 ef_annex_to_this_state, // constexpr inline uint16_t annex_to_this_state = 0x0048;
6843 ef_annex_to_this_province, // constexpr inline uint16_t annex_to_this_province = 0x0049;
6844 ef_annex_to_this_pop, // constexpr inline uint16_t annex_to_this_pop = 0x004A;
6845 ef_annex_to_from_nation, // constexpr inline uint16_t annex_to_from_nation = 0x004B;
6846 ef_annex_to_from_province, // constexpr inline uint16_t annex_to_from_province = 0x004C;
6847 ef_release, // constexpr inline uint16_t release = 0x004D;
6848 ef_release_this_nation, // constexpr inline uint16_t release_this_nation = 0x004E;
6849 ef_release_this_state, // constexpr inline uint16_t release_this_state = 0x004F;
6850 ef_release_this_province, // constexpr inline uint16_t release_this_province = 0x0050;
6851 ef_release_this_pop, // constexpr inline uint16_t release_this_pop = 0x0051;
6852 ef_release_from_nation, // constexpr inline uint16_t release_from_nation = 0x0052;
6853 ef_release_from_province, // constexpr inline uint16_t release_from_province = 0x0053;
6854 ef_change_controller, // constexpr inline uint16_t change_controller = 0x0054;
6855 ef_change_controller_this_nation, // constexpr inline uint16_t change_controller_this_nation = 0x0055;
6856 ef_change_controller_this_province, // constexpr inline uint16_t change_controller_this_province = 0x0056;
6857 ef_change_controller_from_nation, // constexpr inline uint16_t change_controller_from_nation = 0x0057;
6858 ef_change_controller_from_province, // constexpr inline uint16_t change_controller_from_province = 0x0058;
6859 ef_infrastructure, // constexpr inline uint16_t infrastructure = 0x0059;
6860 ef_money, // constexpr inline uint16_t money = 0x005A;
6861 ef_leadership, // constexpr inline uint16_t leadership = 0x005B;
6862 ef_create_vassal, // constexpr inline uint16_t create_vassal = 0x005C;
6863 ef_create_vassal_this_nation, // constexpr inline uint16_t create_vassal_this_nation = 0x005D;
6864 ef_create_vassal_this_province, // constexpr inline uint16_t create_vassal_this_province = 0x005E;
6865 ef_create_vassal_from_nation, // constexpr inline uint16_t create_vassal_from_nation = 0x005F;
6866 ef_create_vassal_from_province, // constexpr inline uint16_t create_vassal_from_province = 0x0060;
6867 ef_end_military_access, // constexpr inline uint16_t end_military_access = 0x0061;
6868 ef_end_military_access_this_nation, // constexpr inline uint16_t end_military_access_this_nation = 0x0062;
6869 ef_end_military_access_this_province, // constexpr inline uint16_t end_military_access_this_province = 0x0063;
6870 ef_end_military_access_from_nation, // constexpr inline uint16_t end_military_access_from_nation = 0x0064;
6871 ef_end_military_access_from_province, // constexpr inline uint16_t end_military_access_from_province = 0x0065;
6872 ef_leave_alliance, // constexpr inline uint16_t leave_alliance = 0x0066;
6873 ef_leave_alliance_this_nation, // constexpr inline uint16_t leave_alliance_this_nation = 0x0067;
6874 ef_leave_alliance_this_province, // constexpr inline uint16_t leave_alliance_this_province = 0x0068;
6875 ef_leave_alliance_from_nation, // constexpr inline uint16_t leave_alliance_from_nation = 0x0069;
6876 ef_leave_alliance_from_province, // constexpr inline uint16_t leave_alliance_from_province = 0x006A;
6877 ef_end_war, // constexpr inline uint16_t end_war = 0x006B;
6878 ef_end_war_this_nation, // constexpr inline uint16_t end_war_this_nation = 0x006C;
6879 ef_end_war_this_province, // constexpr inline uint16_t end_war_this_province = 0x006D;
6880 ef_end_war_from_nation, // constexpr inline uint16_t end_war_from_nation = 0x006E;
6881 ef_end_war_from_province, // constexpr inline uint16_t end_war_from_province = 0x006F;
6882 ef_enable_ideology, // constexpr inline uint16_t enable_ideology = 0x0070;
6883 ef_ruling_party_ideology, // constexpr inline uint16_t ruling_party_ideology = 0x0071;
6884 ef_plurality, // constexpr inline uint16_t plurality = 0x0072;
6885 ef_remove_province_modifier, // constexpr inline uint16_t remove_province_modifier = 0x0073;
6886 ef_remove_country_modifier, // constexpr inline uint16_t remove_country_modifier = 0x0074;
6887 ef_create_alliance, // constexpr inline uint16_t create_alliance = 0x0075;
6888 ef_create_alliance_this_nation, // constexpr inline uint16_t create_alliance_this_nation = 0x0076;
6889 ef_create_alliance_this_province, // constexpr inline uint16_t create_alliance_this_province = 0x0077;
6890 ef_create_alliance_from_nation, // constexpr inline uint16_t create_alliance_from_nation = 0x0078;
6891 ef_create_alliance_from_province, // constexpr inline uint16_t create_alliance_from_province = 0x0079;
6892 ef_release_vassal, // constexpr inline uint16_t release_vassal = 0x007A;
6893 ef_release_vassal_this_nation, // constexpr inline uint16_t release_vassal_this_nation = 0x007B;
6894 ef_release_vassal_this_province, // constexpr inline uint16_t release_vassal_this_province = 0x007C;
6895 ef_release_vassal_from_nation, // constexpr inline uint16_t release_vassal_from_nation = 0x007D;
6896 ef_release_vassal_from_province, // constexpr inline uint16_t release_vassal_from_province = 0x007E;
6897 ef_release_vassal_reb, // constexpr inline uint16_t release_vassal_reb = 0x007F;
6898 ef_release_vassal_random, // constexpr inline uint16_t release_vassal_random = 0x0080;
6899 ef_change_province_name, // constexpr inline uint16_t change_province_name = 0x0081;
6900 ef_enable_canal, // constexpr inline uint16_t enable_canal = 0x0082;
6901 ef_set_global_flag, // constexpr inline uint16_t set_global_flag = 0x0083;
6902 ef_clr_global_flag, // constexpr inline uint16_t clr_global_flag = 0x0084;
6903 ef_nationalvalue_province, // constexpr inline uint16_t nationalvalue_province = 0x0085;
6904 ef_nationalvalue_nation, // constexpr inline uint16_t nationalvalue_nation = 0x0086;
6905 ef_civilized_yes, // constexpr inline uint16_t civilized_yes = 0x0087;
6906 ef_civilized_no, // constexpr inline uint16_t civilized_no = 0x0088;
6907 ef_is_slave_state_no, // constexpr inline uint16_t is_slave_state_no = 0x0089;
6908 ef_is_slave_pop_no, // constexpr inline uint16_t is_slave_pop_no = 0x008A;
6909 ef_election, // constexpr inline uint16_t election = 0x008B;
6910 ef_social_reform, // constexpr inline uint16_t social_reform = 0x008C;
6911 ef_political_reform, // constexpr inline uint16_t political_reform = 0x008D;
6912 ef_add_tax_relative_income, // constexpr inline uint16_t add_tax_relative_income = 0x008E;
6913 ef_neutrality, // constexpr inline uint16_t neutrality = 0x008F;
6914 ef_reduce_pop, // constexpr inline uint16_t reduce_pop = 0x0090;
6915 ef_move_pop, // constexpr inline uint16_t move_pop = 0x0091;
6916 ef_pop_type, // constexpr inline uint16_t pop_type = 0x0092;
6917 ef_years_of_research, // constexpr inline uint16_t years_of_research = 0x0093;
6918 ef_prestige_factor_positive, // constexpr inline uint16_t prestige_factor_positive = 0x0094;
6919 ef_prestige_factor_negative, // constexpr inline uint16_t prestige_factor_negative = 0x0095;
6920 ef_military_reform, // constexpr inline uint16_t military_reform = 0x0096;
6921 ef_economic_reform, // constexpr inline uint16_t economic_reform = 0x0097;
6922 ef_remove_random_military_reforms, // constexpr inline uint16_t remove_random_military_reforms = 0x0098;
6923 ef_remove_random_economic_reforms, // constexpr inline uint16_t remove_random_economic_reforms = 0x0099;
6924 ef_add_crime, // constexpr inline uint16_t add_crime = 0x009A;
6925 ef_add_crime_none, // constexpr inline uint16_t add_crime_none = 0x009B;
6926 ef_nationalize, // constexpr inline uint16_t nationalize = 0x009C;
6927 ef_build_factory_in_capital_state, // constexpr inline uint16_t build_factory_in_capital_state = 0x009D;
6928 ef_activate_technology, // constexpr inline uint16_t activate_technology = 0x009E;
6929 ef_great_wars_enabled_yes, // constexpr inline uint16_t great_wars_enabled_yes = 0x009F;
6930 ef_great_wars_enabled_no, // constexpr inline uint16_t great_wars_enabled_no = 0x00A0;
6931 ef_world_wars_enabled_yes, // constexpr inline uint16_t world_wars_enabled_yes = 0x00A1;
6932 ef_world_wars_enabled_no, // constexpr inline uint16_t world_wars_enabled_no = 0x00A2;
6933 ef_assimilate_province, // constexpr inline uint16_t assimilate_province = 0x00A3;
6934 ef_assimilate_pop, // constexpr inline uint16_t assimilate_pop = 0x00A4;
6935 ef_literacy, // constexpr inline uint16_t literacy = 0x00A5;
6936 ef_add_crisis_interest, // constexpr inline uint16_t add_crisis_interest = 0x00A6;
6937 ef_flashpoint_tension, // constexpr inline uint16_t flashpoint_tension = 0x00A7;
6938 ef_add_crisis_temperature, // constexpr inline uint16_t add_crisis_temperature = 0x00A8;
6939 ef_consciousness, // constexpr inline uint16_t consciousness = 0x00A9;
6940 ef_militancy, // constexpr inline uint16_t militancy = 0x00AA;
6941 ef_rgo_size, // constexpr inline uint16_t rgo_size = 0x00AB;
6942 ef_fort, // constexpr inline uint16_t fort = 0x00AC;
6943 ef_naval_base, // constexpr inline uint16_t naval_base = 0x00AD;
6944 ef_trigger_revolt_nation, // constexpr inline uint16_t trigger_revolt_nation = 0x00AE;
6945 ef_trigger_revolt_state, // constexpr inline uint16_t trigger_revolt_state = 0x00AF;
6946 ef_trigger_revolt_province, // constexpr inline uint16_t trigger_revolt_province = 0x00B0;
6947 ef_diplomatic_influence, // constexpr inline uint16_t diplomatic_influence = 0x00B1;
6948 ef_diplomatic_influence_this_nation, // constexpr inline uint16_t diplomatic_influence_this_nation = 0x00B2;
6949 ef_diplomatic_influence_this_province, // constexpr inline uint16_t diplomatic_influence_this_province = 0x00B3;
6950 ef_diplomatic_influence_from_nation, // constexpr inline uint16_t diplomatic_influence_from_nation = 0x00B4;
6951 ef_diplomatic_influence_from_province, // constexpr inline uint16_t diplomatic_influence_from_province = 0x00B5;
6952 ef_relation, // constexpr inline uint16_t relation = 0x00B6;
6953 ef_relation_this_nation, // constexpr inline uint16_t relation_this_nation = 0x00B7;
6954 ef_relation_this_province, // constexpr inline uint16_t relation_this_province = 0x00B8;
6955 ef_relation_from_nation, // constexpr inline uint16_t relation_from_nation = 0x00B9;
6956 ef_relation_from_province, // constexpr inline uint16_t relation_from_province = 0x00BA;
6957 ef_add_province_modifier, // constexpr inline uint16_t add_province_modifier = 0x00BB;
6958 ef_add_province_modifier_no_duration, // constexpr inline uint16_t add_province_modifier_no_duration = 0x00BC;
6959 ef_add_country_modifier, // constexpr inline uint16_t add_country_modifier = 0x00BD;
6960 ef_add_country_modifier_no_duration, // constexpr inline uint16_t add_country_modifier_no_duration = 0x00BE;
6961 ef_casus_belli_tag, // constexpr inline uint16_t casus_belli_tag = 0x00BF;
6962 ef_casus_belli_int, // constexpr inline uint16_t casus_belli_int = 0x00C0;
6963 ef_casus_belli_this_nation, // constexpr inline uint16_t casus_belli_this_nation = 0x00C1;
6964 ef_casus_belli_this_state, // constexpr inline uint16_t casus_belli_this_state = 0x00C2;
6965 ef_casus_belli_this_province, // constexpr inline uint16_t casus_belli_this_province = 0x00C3;
6966 ef_casus_belli_this_pop, // constexpr inline uint16_t casus_belli_this_pop = 0x00C4;
6967 ef_casus_belli_from_nation, // constexpr inline uint16_t casus_belli_from_nation = 0x00C5;
6968 ef_casus_belli_from_province, // constexpr inline uint16_t casus_belli_from_province = 0x00C6;
6969 ef_add_casus_belli_tag, // constexpr inline uint16_t add_casus_belli_tag = 0x00C7;
6970 ef_add_casus_belli_int, // constexpr inline uint16_t add_casus_belli_int = 0x00C8;
6971 ef_add_casus_belli_this_nation, // constexpr inline uint16_t add_casus_belli_this_nation = 0x00C9;
6972 ef_add_casus_belli_this_state, // constexpr inline uint16_t add_casus_belli_this_state = 0x00CA;
6973 ef_add_casus_belli_this_province, // constexpr inline uint16_t add_casus_belli_this_province = 0x00CB;
6974 ef_add_casus_belli_this_pop, // constexpr inline uint16_t add_casus_belli_this_pop = 0x00CC;
6975 ef_add_casus_belli_from_nation, // constexpr inline uint16_t add_casus_belli_from_nation = 0x00CD;
6976 ef_add_casus_belli_from_province, // constexpr inline uint16_t add_casus_belli_from_province = 0x00CE;
6977 ef_remove_casus_belli_tag, // constexpr inline uint16_t remove_casus_belli_tag = 0x00CF;
6978 ef_remove_casus_belli_int, // constexpr inline uint16_t remove_casus_belli_int = 0x00D0;
6979 ef_remove_casus_belli_this_nation, // constexpr inline uint16_t remove_casus_belli_this_nation = 0x00D1;
6980 ef_remove_casus_belli_this_state, // constexpr inline uint16_t remove_casus_belli_this_state = 0x00D2;
6981 ef_remove_casus_belli_this_province, // constexpr inline uint16_t remove_casus_belli_this_province = 0x00D3;
6982 ef_remove_casus_belli_this_pop, // constexpr inline uint16_t remove_casus_belli_this_pop = 0x00D4;
6983 ef_remove_casus_belli_from_nation, // constexpr inline uint16_t remove_casus_belli_from_nation = 0x00D5;
6984 ef_remove_casus_belli_from_province, // constexpr inline uint16_t remove_casus_belli_from_province = 0x00D6;
6985 ef_this_remove_casus_belli_tag, // constexpr inline uint16_t this_remove_casus_belli_tag = 0x00D7;
6986 ef_this_remove_casus_belli_int, // constexpr inline uint16_t this_remove_casus_belli_int = 0x00D8;
6987 ef_this_remove_casus_belli_this_nation, // constexpr inline uint16_t this_remove_casus_belli_this_nation = 0x00D9;
6988 ef_this_remove_casus_belli_this_state, // constexpr inline uint16_t this_remove_casus_belli_this_state = 0x00DA;
6989 ef_this_remove_casus_belli_this_province, // constexpr inline uint16_t this_remove_casus_belli_this_province = 0x00DB;
6990 ef_this_remove_casus_belli_this_pop, // constexpr inline uint16_t this_remove_casus_belli_this_pop = 0x00DC;
6991 ef_this_remove_casus_belli_from_nation, // constexpr inline uint16_t this_remove_casus_belli_from_nation = 0x00DD;
6992 ef_this_remove_casus_belli_from_province, // constexpr inline uint16_t this_remove_casus_belli_from_province = 0x00DE;
6993 ef_war_tag, // constexpr inline uint16_t war_tag = 0x00DF;
6994 ef_war_this_nation, // constexpr inline uint16_t war_this_nation = 0x00E0;
6995 ef_war_this_state, // constexpr inline uint16_t war_this_state = 0x00E1;
6996 ef_war_this_province, // constexpr inline uint16_t war_this_province = 0x00E2;
6997 ef_war_this_pop, // constexpr inline uint16_t war_this_pop = 0x00E3;
6998 ef_war_from_nation, // constexpr inline uint16_t war_from_nation = 0x00E4;
6999 ef_war_from_province, // constexpr inline uint16_t war_from_province = 0x00E5;
7000 ef_war_no_ally_tag, // constexpr inline uint16_t war_no_ally_tag = 0x00E6;
7001 ef_war_no_ally_this_nation, // constexpr inline uint16_t war_no_ally_this_nation = 0x00E7;
7002 ef_war_no_ally_this_state, // constexpr inline uint16_t war_no_ally_this_state = 0x00E8;
7003 ef_war_no_ally_this_province, // constexpr inline uint16_t war_no_ally_this_province = 0x00E9;
7004 ef_war_no_ally_this_pop, // constexpr inline uint16_t war_no_ally_this_pop = 0x00EA;
7005 ef_war_no_ally_from_nation, // constexpr inline uint16_t war_no_ally_from_nation = 0x00EB;
7006 ef_war_no_ally_from_province, // constexpr inline uint16_t war_no_ally_from_province = 0x00EC;
7007 ef_country_event_this_nation, // constexpr inline uint16_t country_event_this_nation = 0x00ED;
7008 ef_country_event_immediate_this_nation, // constexpr inline uint16_t country_event_immediate_this_nation = 0x00EE;
7009 ef_province_event_this_nation, // constexpr inline uint16_t province_event_this_nation = 0x00EF;
7010 ef_province_event_immediate_this_nation, // constexpr inline uint16_t province_event_immediate_this_nation = 0x00F0;
7011 ef_sub_unit_int, // constexpr inline uint16_t sub_unit_int = 0x00F1;
7012 ef_sub_unit_this, // constexpr inline uint16_t sub_unit_this = 0x00F2;
7013 ef_sub_unit_from, // constexpr inline uint16_t sub_unit_from = 0x00F3;
7014 ef_sub_unit_current, // constexpr inline uint16_t sub_unit_current = 0x00F4;
7015 ef_set_variable, // constexpr inline uint16_t set_variable = 0x00F5;
7016 ef_change_variable, // constexpr inline uint16_t change_variable = 0x00F6;
7017 ef_ideology, // constexpr inline uint16_t ideology = 0x00F7;
7018 ef_upper_house, // constexpr inline uint16_t upper_house = 0x00F8;
7019 ef_scaled_militancy_issue, // constexpr inline uint16_t scaled_militancy_issue = 0x00F9;
7020 ef_scaled_militancy_ideology, // constexpr inline uint16_t scaled_militancy_ideology = 0x00FA;
7021 ef_scaled_militancy_unemployment, // constexpr inline uint16_t scaled_militancy_unemployment = 0x00FB;
7022 ef_scaled_consciousness_issue, // constexpr inline uint16_t scaled_consciousness_issue = 0x00FC;
7023 ef_scaled_consciousness_ideology, // constexpr inline uint16_t scaled_consciousness_ideology = 0x00FD;
7024 ef_scaled_consciousness_unemployment, // constexpr inline uint16_t scaled_consciousness_unemployment = 0x00FE;
7025 ef_define_general, // constexpr inline uint16_t define_general = 0x00FF;
7026 ef_define_admiral, // constexpr inline uint16_t define_admiral = 0x0100;
7027 ef_dominant_issue, // constexpr inline uint16_t dominant_issue = 0x0101;
7028 ef_add_war_goal, // constexpr inline uint16_t add_war_goal = 0x0102;
7029 ef_move_issue_percentage_nation, // constexpr inline uint16_t move_issue_percentage_nation = 0x0103;
7030 ef_move_issue_percentage_state, // constexpr inline uint16_t move_issue_percentage_state = 0x0104;
7031 ef_move_issue_percentage_province, // constexpr inline uint16_t move_issue_percentage_province = 0x0105;
7032 ef_move_issue_percentage_pop, // constexpr inline uint16_t move_issue_percentage_pop = 0x0106;
7033 ef_party_loyalty, // constexpr inline uint16_t party_loyalty = 0x0107;
7034 ef_party_loyalty_province, // constexpr inline uint16_t party_loyalty_province = 0x0108;
7035 ef_variable_tech_name_no, // constexpr inline uint16_t variable_tech_name_no = 0x0109;
7036 ef_variable_invention_name_yes, // constexpr inline uint16_t variable_invention_name_yes = 0x010A;
7037 ef_build_railway_in_capital_yes_whole_state_yes_limit, // constexpr inline uint16_t build_railway_in_capital_yes_whole_state_yes_limit = 0x010B;
7038ef_build_railway_in_capital_yes_whole_state_no_limit, // constexpr inline uint16_t build_railway_in_capital_yes_whole_state_no_limit = 0x010C;
7039ef_build_railway_in_capital_no_whole_state_yes_limit, // constexpr inline uint16_t build_railway_in_capital_no_whole_state_yes_limit = 0x010D;
7040ef_build_railway_in_capital_no_whole_state_no_limit, // constexpr inline uint16_t build_railway_in_capital_no_whole_state_no_limit = 0x010E;
7041ef_build_fort_in_capital_yes_whole_state_yes_limit, // constexpr inline uint16_t build_fort_in_capital_yes_whole_state_yes_limit = 0x010F;
7042ef_build_fort_in_capital_yes_whole_state_no_limit, // constexpr inline uint16_t build_fort_in_capital_yes_whole_state_no_limit = 0x0110;
7043ef_build_fort_in_capital_no_whole_state_yes_limit, // constexpr inline uint16_t build_fort_in_capital_no_whole_state_yes_limit = 0x0111;
7044ef_build_fort_in_capital_no_whole_state_no_limit, // constexpr inline uint16_t build_fort_in_capital_no_whole_state_no_limit = 0x0112;
7045ef_relation_reb, // constexpr inline uint16_t relation_reb = 0x0113;
7046ef_variable_tech_name_yes, // constexpr inline uint16_t variable_tech_name_yes = 0x0114;
7047ef_variable_good_name, // constexpr inline uint16_t variable_good_name = 0x0115;
7048ef_set_country_flag_province, // constexpr inline uint16_t set_country_flag_province = 0x0116;
7049ef_add_country_modifier_province, // constexpr inline uint16_t add_country_modifier_province = 0x0117;
7050ef_add_country_modifier_province_no_duration, // constexpr inline uint16_t add_country_modifier_province_no_duration = 0x0118;
7051ef_dominant_issue_nation, // constexpr inline uint16_t dominant_issue_nation = 0x0119;
7052ef_relation_province, // constexpr inline uint16_t relation_province = 0x011A;
7053ef_relation_province_this_nation, // constexpr inline uint16_t relation_province_this_nation = 0x011B;
7054ef_relation_province_this_province, // constexpr inline uint16_t relation_province_this_province = 0x011C;
7055ef_relation_province_from_nation, // constexpr inline uint16_t relation_province_from_nation = 0x011D;
7056ef_relation_province_from_province, // constexpr inline uint16_t relation_province_from_province = 0x011E;
7057ef_relation_province_reb, // constexpr inline uint16_t relation_province_reb = 0x011F;
7058ef_scaled_militancy_nation_issue, // constexpr inline uint16_t scaled_militancy_nation_issue = 0x0120;
7059ef_scaled_militancy_nation_ideology, // constexpr inline uint16_t scaled_militancy_nation_ideology = 0x0121;
7060ef_scaled_militancy_nation_unemployment, // constexpr inline uint16_t scaled_militancy_nation_unemployment = 0x0122;
7061ef_scaled_consciousness_nation_issue, // constexpr inline uint16_t scaled_consciousness_nation_issue = 0x0123;
7062ef_scaled_consciousness_nation_ideology, // constexpr inline uint16_t scaled_consciousness_nation_ideology = 0x0124;
7063ef_scaled_consciousness_nation_unemployment, // constexpr inline uint16_t scaled_consciousness_nation_unemployment = 0x0125;
7064ef_scaled_militancy_state_issue, // constexpr inline uint16_t scaled_militancy_state_issue = 0x0126;
7065ef_scaled_militancy_state_ideology, // constexpr inline uint16_t scaled_militancy_state_ideology = 0x0127;
7066ef_scaled_militancy_state_unemployment, // constexpr inline uint16_t scaled_militancy_state_unemployment = 0x0128;
7067ef_scaled_consciousness_state_issue, // constexpr inline uint16_t scaled_consciousness_state_issue = 0x0129;
7068ef_scaled_consciousness_state_ideology, // constexpr inline uint16_t scaled_consciousness_state_ideology = 0x012A;
7069ef_scaled_consciousness_state_unemployment, // constexpr inline uint16_t scaled_consciousness_state_unemployment = 0x012B;
7070ef_scaled_militancy_province_issue, // constexpr inline uint16_t scaled_militancy_province_issue = 0x012C;
7071ef_scaled_militancy_province_ideology, // constexpr inline uint16_t scaled_militancy_province_ideology = 0x012D;
7072ef_scaled_militancy_province_unemployment, // constexpr inline uint16_t scaled_militancy_province_unemployment = 0x012E;
7073ef_scaled_consciousness_province_issue, // constexpr inline uint16_t scaled_consciousness_province_issue = 0x012F;
7074ef_scaled_consciousness_province_ideology, // constexpr inline uint16_t scaled_consciousness_province_ideology = 0x0130;
7075ef_scaled_consciousness_province_unemployment, // constexpr inline uint16_t scaled_consciousness_province_unemployment =
7076// 0x0131;
7077ef_variable_good_name_province, // constexpr inline uint16_t variable_good_name_province = 0x0132;
7078ef_treasury_province, // constexpr inline uint16_t treasury_province = 0x0133;
7079ef_country_event_this_state, // constexpr inline uint16_t country_event_this_state = 0x0134;
7080ef_country_event_immediate_this_state, // constexpr inline uint16_t country_event_immediate_this_state = 0x0135;
7081ef_province_event_this_state, // constexpr inline uint16_t province_event_this_state = 0x0136;
7082ef_province_event_immediate_this_state, // constexpr inline uint16_t province_event_immediate_this_state = 0x0137;
7083ef_country_event_this_province, // constexpr inline uint16_t country_event_this_province = 0x0138;
7084ef_country_event_immediate_this_province, // constexpr inline uint16_t country_event_immediate_this_province = 0x0139;
7085ef_province_event_this_province, // constexpr inline uint16_t province_event_this_province = 0x013A;
7086ef_province_event_immediate_this_province, // constexpr inline uint16_t province_event_immediate_this_province = 0x013B;
7087ef_country_event_this_pop, // constexpr inline uint16_t country_event_this_pop = 0x013C;
7088ef_country_event_immediate_this_pop, // constexpr inline uint16_t country_event_immediate_this_pop = 0x013D;
7089ef_province_event_this_pop, // constexpr inline uint16_t province_event_this_pop = 0x013E;
7090ef_province_event_immediate_this_pop, // constexpr inline uint16_t province_event_immediate_this_pop = 0x013F;
7091ef_country_event_province_this_nation, // constexpr inline uint16_t country_event_province_this_nation = 0x0140;
7092ef_country_event_immediate_province_this_nation, // constexpr inline uint16_t country_event_immediate_province_this_nation =
7093// 0x0141;
7094ef_country_event_province_this_state, // constexpr inline uint16_t country_event_province_this_state = 0x0142;
7095ef_country_event_immediate_province_this_state, // constexpr inline uint16_t country_event_immediate_province_this_state =
7096// 0x0143;
7097ef_country_event_province_this_province, // constexpr inline uint16_t country_event_province_this_province = 0x0144;
7098ef_country_event_immediate_province_this_province, // constexpr inline uint16_t country_event_immediate_province_this_province
7099// = 0x0145;
7100ef_country_event_province_this_pop, // constexpr inline uint16_t country_event_province_this_pop = 0x0146;
7101ef_country_event_immediate_province_this_pop, // constexpr inline uint16_t country_event_immediate_province_this_pop = 0x0147;
7102ef_activate_invention, // constexpr inline uint16_t activate_invention = 0x0148;
7103ef_variable_invention_name_no, // constexpr inline uint16_t variable_invention_name_no = 0x0149;
7104ef_add_core_tag_state, // constexpr inline uint16_t add_core_tag_state = 0x014A;
7105ef_remove_core_tag_state, // constexpr inline uint16_t remove_core_tag_state = 0x014B;
7106ef_secede_province_state, // constexpr inline uint16_t secede_province_state = 0x014C;
7107ef_assimilate_state, // constexpr inline uint16_t assimilate_state = 0x014D;
7108ef_add_core_state_this_nation, //constexpr inline uint16_t add_core_state_this_nation = 0x014E;
7109ef_add_core_state_this_province, //constexpr inline uint16_t add_core_state_this_province = 0x014F;
7110ef_add_core_state_this_state, //constexpr inline uint16_t add_core_state_this_state = 0x0150;
7111ef_add_core_state_this_pop, //constexpr inline uint16_t add_core_state_this_pop = 0x0151;
7112ef_add_core_state_from_province, //constexpr inline uint16_t add_core_state_from_province = 0x0152;
7113ef_add_core_state_from_nation, //constexpr inline uint16_t add_core_state_from_nation = 0x0153;
7114ef_add_core_state_reb, //constexpr inline uint16_t add_core_state_reb = 0x0154;
7115ef_add_province_modifier, //constexpr inline uint16_t add_province_modifier_state = 0x0155;
7116ef_add_province_modifier_no_duration, //constexpr inline uint16_t add_province_modifier_state_no_duration = 0x0156;
7117ef_remove_core_this_nation, //constexpr inline uint16_t remove_core_state_this_nation = 0x0157;
7118ef_remove_core_this_province, //constexpr inline uint16_t remove_core_state_this_province = 0x0158;
7119ef_remove_core_this_state, //constexpr inline uint16_t remove_core_state_this_state = 0x0159;
7120ef_remove_core_this_pop, //constexpr inline uint16_t remove_core_state_this_pop = 0x015A;
7121ef_remove_core_from_province, //constexpr inline uint16_t remove_core_state_from_province = 0x015B;
7122ef_remove_core_from_nation, //constexpr inline uint16_t remove_core_state_from_nation = 0x015C;
7123ef_remove_core_reb, //constexpr inline uint16_t remove_core_state_reb = 0x015D;
7124ef_remove_province_modifier, //constexpr inline uint16_t remove_province_modifier_state = 0x015E;
7125ef_life_rating, //constexpr inline uint16_t life_rating_state = 0x015F;
7126ef_secede_province_state_this_nation, //constexpr inline uint16_t secede_province_state_this_nation = 0x0160;
7127ef_secede_province_state_this_state, //constexpr inline uint16_t secede_province_state_this_state = 0x0161;
7128ef_secede_province_state_this_province, //constexpr inline uint16_t secede_province_state_this_province = 0x0162;
7129ef_secede_province_state_this_pop, //constexpr inline uint16_t secede_province_state_this_pop = 0x0163;
7130ef_secede_province_state_from_nation, //constexpr inline uint16_t secede_province_state_from_nation = 0x0164;
7131ef_secede_province_state_from_province, //constexpr inline uint16_t secede_province_state_from_province = 0x0165;
7132ef_secede_province_state_reb, //constexpr inline uint16_t secede_province_state_reb = 0x0166;
7133ef_infrastructure, //constexpr inline uint16_t infrastructure_state = 0x0167;
7134ef_fort, //constexpr inline uint16_t fort_state = 0x0168;
7135ef_naval_base, //constexpr inline uint16_t naval_base_state = 0x0169;
7136ef_is_slave_state_yes, //constexpr inline uint16_t is_slave_province_yes = 0x016A;
7137ef_is_slave_state_no, //constexpr inline uint16_t is_slave_province_no = 0x016B;
7138ef_change_controller_state, //constexpr inline uint16_t change_controller_state = 0x016C;
7139ef_change_controller_state_this_nation, //constexpr inline uint16_t change_controller_state_this_nation = 0x016D;
7140ef_change_controller_state_this_province, //constexpr inline uint16_t change_controller_state_this_province = 0x016E;
7141ef_change_controller_state_from_nation, //constexpr inline uint16_t change_controller_state_from_nation = 0x016F;
7142ef_change_controller_state_from_province, //constexpr inline uint16_t change_controller_state_from_province = 0x0170;
7143ef_reduce_pop, //constexpr inline uint16_t reduce_pop_province = 0x0171;
7144ef_reduce_pop, //constexpr inline uint16_t reduce_pop_state = 0x0172;
7145ef_reduce_pop, //constexpr inline uint16_t reduce_pop_nation = 0x0173;
7146ef_consciousness, //constexpr inline uint16_t consciousness_province = 0x0174;
7147ef_consciousness, //constexpr inline uint16_t consciousness_state = 0x0175;
7148ef_consciousness, //constexpr inline uint16_t consciousness_nation = 0x0176;
7149ef_militancy, //constexpr inline uint16_t militancy_province = 0x0177;
7150ef_militancy, //constexpr inline uint16_t militancy_state = 0x0178;
7151ef_militancy, //constexpr inline uint16_t militancy_nation = 0x0179;
7152ef_remove_core_tag, //constexpr inline uint16_t remove_core_tag_nation = 0x017A;
7153ef_remove_core_this_nation, //constexpr inline uint16_t remove_core_nation_this_nation = 0x017B;
7154ef_remove_core_this_province, //constexpr inline uint16_t remove_core_nation_this_province = 0x017C;
7155ef_remove_core_this_state, //constexpr inline uint16_t remove_core_nation_this_state = 0x017D;
7156ef_remove_core_this_pop, //constexpr inline uint16_t remove_core_nation_this_pop = 0x017E;
7157ef_remove_core_from_province, //constexpr inline uint16_t remove_core_nation_from_province = 0x017F;
7158ef_remove_core_from_nation, //constexpr inline uint16_t remove_core_nation_from_nation = 0x0180;
7159ef_remove_core_reb, //constexpr inline uint16_t remove_core_nation_reb = 0x0181;
7160ef_set_country_flag, //constexpr inline uint16_t set_country_flag_pop = 0x0182;
7161ef_social_reform, //constexpr inline uint16_t social_reform_province = 0x0183;
7162ef_political_reform, //constexpr inline uint16_t political_reform_province = 0x0184;
7163ef_flashpoint_tension, //constexpr inline uint16_t flashpoint_tension_province = 0x0185;
7164ef_release_vassal, //constexpr inline uint16_t release_vassal_province = 0x0186;
7165ef_release_vassal_this_nation, //constexpr inline uint16_t release_vassal_province_this_nation = 0x0187;
7166ef_release_vassal_this_province, //constexpr inline uint16_t release_vassal_province_this_province = 0x0188;
7167ef_release_vassal_from_nation, //constexpr inline uint16_t release_vassal_province_from_nation = 0x0189;
7168ef_release_vassal_from_province, //constexpr inline uint16_t release_vassal_province_from_province = 0x018A;
7169ef_release_vassal_reb, //constexpr inline uint16_t release_vassal_province_reb = 0x018B;
7170ef_release_vassal_random, //constexpr inline uint16_t release_vassal_province_random = 0x018C;
7171ef_build_bank_in_capital_yes_whole_state_yes_limit, // constexpr inline uint16_t build_bank_in_capital_yes_whole_state_yes_limit = 0x018D;
7172ef_build_bank_in_capital_yes_whole_state_no_limit, // constexpr inline uint16_t build_bank_in_capital_yes_whole_state_no_limit = 0x018E;
7173ef_build_bank_in_capital_no_whole_state_yes_limit, // constexpr inline uint16_t build_bank_in_capital_no_whole_state_yes_limit = 0x018F;
7174ef_build_bank_in_capital_no_whole_state_no_limit, // constexpr inline uint16_t build_bank_in_capital_no_whole_state_no_limit = 0x0190;
7175ef_build_university_in_capital_yes_whole_state_yes_limit, // constexpr inline uint16_t build_university_in_capital_yes_whole_state_yes_limit = 0x0191;
7176ef_build_university_in_capital_yes_whole_state_no_limit, // constexpr inline uint16_t build_university_in_capital_yes_whole_state_no_limit = 0x0192;
7177ef_build_university_in_capital_no_whole_state_yes_limit, // constexpr inline uint16_t build_university_in_capital_no_whole_state_yes_limit = 0x0193;
7178ef_build_university_in_capital_no_whole_state_no_limit, // constexpr inline uint16_t build_university_in_capital_no_whole_state_no_limit = 0x0194;
7179ef_bank, //constexpr inline uint16_t bank = 0x0195;
7180ef_bank, //constexpr inline uint16_t bank_state = 0x0196;
7181ef_university, //constexpr inline uint16_t university = 0x0197;
7182ef_university, // constexpr inline uint16_t university_state = 0x0198;
7183ef_kill_leader, //constexpr inline uint16_t kill_leader = 0x0199;
7184ef_annex_to_null, //constexpr inline uint16_t annex_to_null_nation = 0x019A;
7185ef_annex_to_null, //constexpr inline uint16_t annex_to_null_province = 0x019B;
7186ef_add_truce_tag, //constexpr inline uint16_t add_truce_tag = 0x019C
7187ef_add_truce_this_nation, //constexpr inline uint16_t add_truce_this_nation = 0x019D;
7188ef_add_truce_this_state, //constexpr inline uint16_t add_truce_this_state = 0x019E;
7189ef_add_truce_this_province, //constexpr inline uint16_t add_truce_this_province = 0x019F;
7190ef_add_truce_this_pop, //constexpr inline uint16_t add_truce_this_pop = 0x01A0;
7191ef_add_truce_from_nation, //constexpr inline uint16_t add_truce_from_nation = 0x01A1;
7192ef_add_truce_from_province, //constexpr inline uint16_t add_truce_from_province = 0x01A2;
7193ef_call_allies, //constexpr inline uint16_t call_allies = 0x01A3;
7194ef_ruling_party_this, //constexpr inline uint16_t ruling_party_this = 0x01A4;
7195ef_ruling_party_from, //constexpr inline uint16_t ruling_party_from = 0x01A5;
7196ef_add_accepted_culture_this, //constexpr inline uint16_t add_accepted_culture_this = 0x01A6;
7197ef_add_accepted_culture_union, //constexpr inline uint16_t add_accepted_culture_union_this = 0x01A7;
7198ef_add_accepted_culture_from, //constexpr inline uint16_t add_accepted_culture_from = 0x01A8;
7199ef_add_accepted_culture_union, //constexpr inline uint16_t add_accepted_culture_union_from = 0x01A9;
7200ef_fop_clr_global_flag_2, //constexpr inline uint16_t fop_clr_global_flag_2 = 0x01AA;
7201ef_fop_clr_global_flag_3, //constexpr inline uint16_t fop_clr_global_flag_3 = 0x01AB;
7202ef_fop_clr_global_flag_4, //constexpr inline uint16_t fop_clr_global_flag_4 = 0x01AC;
7203ef_fop_clr_global_flag_5, //constexpr inline uint16_t fop_clr_global_flag_5 = 0x01AD;
7204ef_fop_clr_global_flag_6, //constexpr inline uint16_t fop_clr_global_flag_6 = 0x01AE;
7205ef_fop_clr_global_flag_7, //constexpr inline uint16_t fop_clr_global_flag_7 = 0x01AF;
7206ef_fop_clr_global_flag_8, //constexpr inline uint16_t fop_clr_global_flag_8 = 0x01B0;
7207ef_fop_clr_global_flag_9, //constexpr inline uint16_t fop_clr_global_flag_9 = 0x01B1;
7208ef_fop_clr_global_flag_10, //constexpr inline uint16_t fop_clr_global_flag_10 = 0x01B2;
7209ef_fop_clr_global_flag_11, //constexpr inline uint16_t fop_clr_global_flag_11 = 0x01B3;
7210ef_fop_clr_global_flag_12, //constexpr inline uint16_t fop_clr_global_flag_12 = 0x01B4;
7211ef_fop_change_province_name, //constexpr inline uint16_t fop_change_province_name = 0x01B5;
7212ef_change_terrain_province, //constexpr inline uint16_t change_terrain_province = 0x01B6;
7213ef_change_terrain_pop, //constexpr inline uint16_t change_terrain_pop = 0x01B7;
7214ef_masquerade_as_nation_this, //constexpr inline uint16_t ef_masquerade_as_nation_this = 0x01B8;
7215ef_masquerade_as_nation_from, //constexpr inline uint16_t ef_masquerade_as_nation_from = 0x01B9;
7216ef_religion_province, // 0x01BA
7217ef_religion_pop, //0x01BB
7218ef_reduce_pop_abs, //0x01BC
7219ef_set_culture_pop, // 0x01BD
7220ef_change_party_name, //EFFECT_BYTECODE_ELEMENT(0x01BE, change_party_name, 3)
7221ef_change_party_position, //EFFECT_BYTECODE_ELEMENT(0x01BF, change_party_position, 2)
7222//
7223// SCOPES
7224//
7225es_generic_scope, // constexpr inline uint16_t generic_scope = first_scope_code + 0x0000; // default grouping of effects (or
7226// hidden_tooltip)
7227es_x_neighbor_province_scope, // constexpr inline uint16_t x_neighbor_province_scope = first_scope_code + 0x0001;
7228es_x_neighbor_country_scope, // constexpr inline uint16_t x_neighbor_country_scope = first_scope_code + 0x0002;
7229es_x_country_scope, // constexpr inline uint16_t x_country_scope = first_scope_code + 0x0003;
7230es_x_country_scope_nation, // constexpr inline uint16_t x_country_scope_nation = first_scope_code + 0x0004;
7231es_x_empty_neighbor_province_scope, // constexpr inline uint16_t x_empty_neighbor_province_scope = first_scope_code + 0x0005;
7232es_x_greater_power_scope, // constexpr inline uint16_t x_greater_power_scope = first_scope_code + 0x0006;
7233es_poor_strata_scope_nation, // constexpr inline uint16_t poor_strata_scope_nation = first_scope_code + 0x0007;
7234es_poor_strata_scope_state, // constexpr inline uint16_t poor_strata_scope_state = first_scope_code + 0x0008;
7235es_poor_strata_scope_province, // constexpr inline uint16_t poor_strata_scope_province = first_scope_code + 0x0009;
7236es_middle_strata_scope_nation, // constexpr inline uint16_t middle_strata_scope_nation = first_scope_code + 0x000A;
7237es_middle_strata_scope_state, // constexpr inline uint16_t middle_strata_scope_state = first_scope_code + 0x000B;
7238es_middle_strata_scope_province, // constexpr inline uint16_t middle_strata_scope_province = first_scope_code + 0x000C;
7239es_rich_strata_scope_nation, // constexpr inline uint16_t rich_strata_scope_nation = first_scope_code + 0x000D;
7240es_rich_strata_scope_state, // constexpr inline uint16_t rich_strata_scope_state = first_scope_code + 0x000E;
7241es_rich_strata_scope_province, // constexpr inline uint16_t rich_strata_scope_province = first_scope_code + 0x000F;
7242es_x_pop_scope_nation, // constexpr inline uint16_t x_pop_scope_nation = first_scope_code + 0x0010;
7243es_x_pop_scope_state, // constexpr inline uint16_t x_pop_scope_state = first_scope_code + 0x0011;
7244es_x_pop_scope_province, // constexpr inline uint16_t x_pop_scope_province = first_scope_code + 0x0012;
7245es_x_owned_scope_nation, // constexpr inline uint16_t x_owned_scope_nation = first_scope_code + 0x0013;
7246es_x_owned_scope_state, // constexpr inline uint16_t x_owned_scope_state = first_scope_code + 0x0014;
7247es_x_core_scope, // constexpr inline uint16_t x_core_scope = first_scope_code + 0x0015;
7248es_x_state_scope, // constexpr inline uint16_t x_state_scope = first_scope_code + 0x0016;
7249es_random_list_scope, // constexpr inline uint16_t random_list_scope = first_scope_code + 0x0017;
7250es_random_scope, // constexpr inline uint16_t random_scope = first_scope_code + 0x0018;
7251es_owner_scope_state, // constexpr inline uint16_t owner_scope_state = first_scope_code + 0x0019;
7252es_owner_scope_province, // constexpr inline uint16_t owner_scope_province = first_scope_code + 0x001A;
7253es_controller_scope, // constexpr inline uint16_t controller_scope = first_scope_code + 0x001B;
7254es_location_scope, // constexpr inline uint16_t location_scope = first_scope_code + 0x001C;
7255es_country_scope_pop, // constexpr inline uint16_t country_scope_pop = first_scope_code + 0x001D;
7256es_country_scope_state, // constexpr inline uint16_t country_scope_state = first_scope_code + 0x001E;
7257es_capital_scope, // constexpr inline uint16_t capital_scope = first_scope_code + 0x001F;
7258es_this_scope_nation, // constexpr inline uint16_t this_scope_nation = first_scope_code + 0x0020;
7259es_this_scope_state, // constexpr inline uint16_t this_scope_state = first_scope_code + 0x0021;
7260es_this_scope_province, // constexpr inline uint16_t this_scope_province = first_scope_code + 0x0022;
7261es_this_scope_pop, // constexpr inline uint16_t this_scope_pop = first_scope_code + 0x0023;
7262es_from_scope_nation, // constexpr inline uint16_t from_scope_nation = first_scope_code + 0x0024;
7263es_from_scope_state, // constexpr inline uint16_t from_scope_state = first_scope_code + 0x0025;
7264es_from_scope_province, // constexpr inline uint16_t from_scope_province = first_scope_code + 0x0026;
7265es_from_scope_pop, // constexpr inline uint16_t from_scope_pop = first_scope_code + 0x0027;
7266es_sea_zone_scope, // constexpr inline uint16_t sea_zone_scope = first_scope_code + 0x0028;
7267es_cultural_union_scope, // constexpr inline uint16_t cultural_union_scope = first_scope_code + 0x0029;
7268es_overlord_scope, // constexpr inline uint16_t overlord_scope = first_scope_code + 0x002A;
7269es_sphere_owner_scope, // constexpr inline uint16_t sphere_owner_scope = first_scope_code + 0x002B;
7270es_independence_scope, // constexpr inline uint16_t independence_scope = first_scope_code + 0x002C;
7271es_flashpoint_tag_scope, // constexpr inline uint16_t flashpoint_tag_scope = first_scope_code + 0x002D;
7272es_crisis_state_scope, // constexpr inline uint16_t crisis_state_scope = first_scope_code + 0x002E;
7273es_state_scope_pop, // constexpr inline uint16_t state_scope_pop = first_scope_code + 0x002F;
7274es_state_scope_province, // constexpr inline uint16_t state_scope_province = first_scope_code + 0x0030;
7276es_capital_scope_province, // constexpr inline uint16_t capital_scope = first_scope_code + 0x0032;
7277es_x_core_scope_province, //constexpr inline uint16_t x_core_scope_province = first_scope_code + 0x0033;
7278es_tag_scope, // constexpr inline uint16_t tag_scope = first_scope_code + 0x0034;
7279es_integer_scope, // constexpr inline uint16_t integer_scope = first_scope_code + 0x0035;
7280es_pop_type_scope_nation, // constexpr inline uint16_t pop_type_scope_nation = first_scope_code + 0x0036;
7281es_pop_type_scope_state, // constexpr inline uint16_t pop_type_scope_state = first_scope_code + 0x0037;
7282es_pop_type_scope_province, // constexpr inline uint16_t pop_type_scope_province = first_scope_code + 0x0038;
7283es_region_proper_scope, // constexpr inline uint16_t region_scope = first_scope_code + 0x0039;
7284es_region_scope, // constexpr inline uint16_t region_scope = first_scope_code + 0x003A;
7285es_if_scope, // constexpr inline uint16_t if_scope = first_scope_code + 0x003B;
7286es_else_if_scope, // constexpr inline uint16_t else_if_scope = first_scope_code + 0x003C;
7287es_x_event_country_scope, // constexpr inline uint16_t x_event_country_scope = first_scope_code + 0x003D;
7288es_x_decision_country_scope, // constexpr inline uint16_t x_decision_country_scope = first_scope_code + 0x003E;
7289es_x_event_country_scope_nation,//constexpr inline uint16_t x_event_country_scope_nation = first_scope_code + 0x003F;
7290es_x_decision_country_scope_nation,//constexpr inline uint16_t x_decision_country_scope_nation = first_scope_code + 0x0040;
7291es_from_bounce_scope, // constexpr inline uint16_t from_bounce_scope = first_scope_code + 0x0041;
7292es_this_bounce_scope, // constexpr inline uint16_t this_bounce_scope = first_scope_code + 0x0042;
7293es_random_by_modifier_scope,//constexpr inline uint16_t random_by_modifier_scope = first_scope_code + 0x0043;
7296};
7297
7299 return effect_functions[*tval & effect::code_mask](ws, tval, layout, primary_slot, this_slot, from_slot, r_lo, r_hi,
7300 indentation);
7301}
7302
7303#undef EFFECT_DISPLAY_PARAMS
7304
7305} // namespace effect_tooltip
7306
7307void effect_description(sys::state& state, text::layout_base& layout, dcon::effect_key k, int32_t primary_slot, int32_t this_slot,
7308 int32_t from_slot, uint32_t r_lo, uint32_t r_hi) {
7309 if(!k)
7310 text::add_line(state, layout, "no_effect");
7311 else
7312 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);
7313}
7314
7315} // 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:72
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:254
dcon::nation_id owner_of_pop(sys::state const &state, dcon::pop_id pop_ids)
Definition: nations.cpp:69
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:1799
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:1880
void add_line(sys::state &state, layout_base &dest, dcon::text_key txt, int32_t indent)
Definition: text.cpp:1899
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:794
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:1788
void close_layout_box(columnar_layout &dest, layout_box &box)
Definition: text.cpp:1807
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 > substitution
Definition: text.hpp:793
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:5865
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:5782
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)
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
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