68 "Invalid culture " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
77 "Invalid religion " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
86 "Invalid ideology " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
92 type_ = it->second.id;
95 "Invalid rebel type " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
120 "Invalid modifier " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
134 "Invalid modifier " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
146 type_ = it->second.id;
149 "Invalid cb type " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
161 type_ = it->second.id;
164 "Invalid cb type " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
175 type_ = it->second.id;
178 "Invalid cb type " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
189 type_ = it->second.id;
192 "Invalid cb type " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
211 }
else if(value.length() == 3) {
225 if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"test_end_war")) {
227 }
else if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"call_allies_cb")) {
232 err.
accumulated_errors +=
"Invalid cb type " + std::string(value) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
253 dcon::national_event_id
id_;
259 dcon::provincial_event_id
id_;
310 err.
accumulated_errors +=
"Invalid issue option " + std::string(v) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
343 err.
accumulated_errors +=
"Invalid issue option " + std::string(v) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
364 err.
accumulated_errors +=
"Invalid issue option " + std::string(v) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
377 err.
accumulated_errors +=
"Invalid leader trait " + std::string(v) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
384 err.
accumulated_errors +=
"Invalid leader trait " + std::string(v) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
397 err.
accumulated_errors +=
"Invalid leader trait " + std::string(v) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
404 err.
accumulated_errors +=
"Invalid leader trait " + std::string(v) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
423 dcon::issue_option_id
to_;
426 from_ = it->second.id;
428 err.
accumulated_errors +=
"Invalid issue option " + std::string(v) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
435 err.
accumulated_errors +=
"Invalid issue option " + std::string(v) +
" (" + err.
file_name +
" line " + std::to_string(line) +
")\n";
455 err.
accumulated_errors +=
"party_loyalty given an invalid province id (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
536 "capital effect given an invalid province id (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
541 if(
is_integer(value.data(), value.data() + value.length())) {
544 auto ivalue =
parse_int(value, line, err);
549 "add_core = int effect given an invalid province id (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
564 std::to_string(line) +
")\n";
574 std::to_string(line) +
")\n";
588 std::to_string(line) +
")\n";
591 }
else if(value.length() == 3) {
598 "add_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
603 "add_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
612 std::to_string(line) +
")\n";
622 std::to_string(line) +
")\n";
636 std::to_string(line) +
")\n";
639 }
else if(value.length() == 3) {
642 context.
compiled_effect.push_back(uint16_t(effect::add_core_tag_state));
646 "add_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
651 "add_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
663 if(
is_integer(value.data(), value.data() + value.length())) {
666 auto ivalue =
parse_int(value, line, err);
671 std::to_string(line) +
")\n";
676 std::to_string(line) +
")\n";
686 std::to_string(line) +
")\n";
696 std::to_string(line) +
")\n";
710 std::to_string(line) +
")\n";
713 }
else if(value.length() == 3) {
720 "remove_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
725 "remove_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
734 std::to_string(line) +
")\n";
744 std::to_string(line) +
")\n";
758 std::to_string(line) +
")\n";
761 }
else if(value.length() == 3) {
764 context.
compiled_effect.push_back(uint16_t(effect::remove_core_tag_state));
768 "remove_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
773 "remove_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
782 std::to_string(line) +
")\n";
792 std::to_string(line) +
")\n";
806 std::to_string(line) +
")\n";
809 }
else if(value.length() == 3) {
812 context.
compiled_effect.push_back(uint16_t(effect::remove_core_tag_nation));
816 "remove_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
821 "remove_core effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
845 err.
accumulated_errors +=
"trade_goods effect supplied with invalid commodity name " + std::string(value) +
" (" +
846 err.
file_name +
", line " + std::to_string(line) +
")\n";
855 }
else if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"this_union")) {
857 }
else if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"from_union")) {
865 context.
compiled_effect.push_back(uint16_t(effect::add_accepted_culture));
868 err.
accumulated_errors +=
"add_accepted_culture effect supplied with invalid culture name " + std::string(value) +
" (" +
869 err.
file_name +
", line " + std::to_string(line) +
")\n";
874 std::to_string(line) +
")\n";
886 ", line " + std::to_string(line) +
")\n";
900 ", line " + std::to_string(line) +
")\n";
909 err.
accumulated_errors +=
"primary_culture effect supplied with invalid culture name " + std::string(value) +
" (" +
910 err.
file_name +
", line " + std::to_string(line) +
")\n";
924 context.
compiled_effect.push_back(uint16_t(effect::remove_accepted_culture));
927 err.
accumulated_errors +=
"remove_accepted_culture effect supplied with invalid culture name " + std::string(value) +
928 " (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
933 std::to_string(line) +
")\n";
944 err.
accumulated_errors +=
"remove_accepted_culture effect supplied with invalid culture name " + std::string(value) +
945 " (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
959 context.
compiled_effect.push_back(uint16_t(effect::life_rating_state));
974 err.
accumulated_errors +=
"religion effect supplied with invalid religion name " + std::string(value) +
" (" +
975 err.
file_name +
", line " + std::to_string(line) +
")\n";
982 context.
compiled_effect.push_back(uint16_t(effect::religion_province));
985 err.
accumulated_errors +=
"religion effect supplied with invalid religion name " + std::string(value) +
" (" +
986 err.
file_name +
", line " + std::to_string(line) +
")\n";
996 err.
accumulated_errors +=
"religion effect supplied with invalid religion name " + std::string(value) +
" (" +
997 err.
file_name +
", line " + std::to_string(line) +
")\n";
1047 err.
accumulated_errors +=
"tech_school effect supplied with invalid modifier name " + std::string(value) +
" (" +
1048 err.
file_name +
", line " + std::to_string(line) +
")\n";
1065 std::to_string(line) +
")\n";
1073 err.
accumulated_errors +=
"government effect supplied with invalid government name " + std::string(value) +
" (" +
1074 err.
file_name +
", line " + std::to_string(line) +
")\n";
1088 context.
compiled_effect.push_back(uint16_t(effect::treasury_province));
1131 }
else if(value.length() == 3) {
1138 "change_tag effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1143 "change_tag effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1158 }
else if(value.length() == 3) {
1161 context.
compiled_effect.push_back(uint16_t(effect::change_tag_no_core_switch));
1165 std::to_string(line) +
")\n";
1170 "change_tag_no_core_switch effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1176 std::to_string(line) +
")\n";
1183 context.
compiled_effect.push_back(uint16_t(effect::set_country_flag));
1186 context.
compiled_effect.push_back(uint16_t(effect::set_country_flag_province));
1189 context.
compiled_effect.push_back(uint16_t(effect::set_country_flag_pop));
1200 context.
compiled_effect.push_back(uint16_t(effect::clr_country_flag));
1220 ", line " + std::to_string(line) +
")\n";
1230 ", line " + std::to_string(line) +
")\n";
1233 }
else if(value.length() == 3) {
1240 "military_access effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1245 "military_access effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1290 }
else if(
is_reb(value)) {
1297 }
else if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"---")) {
1300 }
else if(value.length() == 3) {
1307 err.
accumulated_warnings +=
"secede_province effect given an invalid tag '" + std::string(value) +
"' will assume null (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1310 }
else if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"null")) {
1314 err.
accumulated_errors +=
"secede_province effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1340 }
else if(
is_reb(value)) {
1347 }
else if(value.length() == 3) {
1350 context.
compiled_effect.push_back(uint16_t(effect::secede_province_state));
1353 err.
accumulated_errors +=
"secede_province effect given an invalid tag '" + std::string(value) +
"' (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1357 err.
accumulated_errors +=
"secede_province effect given an invalid value '" + std::string(value) +
"' (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1378 std::to_string(line) +
")\n";
1388 std::to_string(line) +
")\n";
1391 }
else if(value.length() == 3) {
1398 "inherit effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1403 "inherit effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1426 std::to_string(line) +
")\n";
1436 std::to_string(line) +
")\n";
1439 }
else if(value.length() == 3) {
1446 "annex_to effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1449 }
else if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"null")) {
1454 "annex_to effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1463 std::to_string(line) +
")\n";
1485 std::to_string(line) +
")\n";
1495 std::to_string(line) +
")\n";
1498 }
else if(value.length() == 3) {
1505 "release effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1510 "release effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1530 ", line " + std::to_string(line) +
")\n";
1540 ", line " + std::to_string(line) +
")\n";
1543 }
else if(value.length() == 3) {
1546 context.
compiled_effect.push_back(uint16_t(effect::change_controller));
1550 "change_controller effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1555 "change_controller effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1566 ", line " + std::to_string(line) +
")\n";
1576 ", line " + std::to_string(line) +
")\n";
1579 }
else if(value.length() == 3) {
1582 context.
compiled_effect.push_back(uint16_t(effect::change_controller_state));
1586 "change_controller effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1591 "change_controller effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1605 context.
compiled_effect.push_back(uint16_t(effect::infrastructure_state));
1631 context.
compiled_effect.push_back(uint16_t(effect::naval_base_state));
1657 context.
compiled_effect.push_back(uint16_t(effect::university_state));
1668 context.
compiled_effect.push_back(uint16_t(effect::add_province_modifier_no_duration));
1670 }
else if(value == -1) {
1671 context.
compiled_effect.push_back(uint16_t(effect::remove_province_modifier));
1675 "province_selector effect with invalid value " + std::to_string(value) +
" (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1686 context.
compiled_effect.push_back(uint16_t(effect::add_province_modifier_no_duration));
1688 }
else if(value == -1) {
1689 context.
compiled_effect.push_back(uint16_t(effect::remove_province_modifier));
1693 "province_immigrator effect with invalid value " + std::to_string(value) +
" (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1706 context.
compiled_effect.push_back(uint16_t(effect::treasury_province));
1737 std::to_string(line) +
")\n";
1747 std::to_string(line) +
")\n";
1750 }
else if(value.length() == 3) {
1757 "create_vassal effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1762 "create_vassal effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1782 ", line " + std::to_string(line) +
")\n";
1792 ", line " + std::to_string(line) +
")\n";
1795 }
else if(value.length() == 3) {
1798 context.
compiled_effect.push_back(uint16_t(effect::end_military_access));
1802 "end_military_access effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1807 "end_military_access effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1813 std::to_string(line) +
")\n";
1827 std::to_string(line) +
")\n";
1837 std::to_string(line) +
")\n";
1840 }
else if(value.length() == 3) {
1847 "leave_alliance effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1852 "leave_alliance effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1858 std::to_string(line) +
")\n";
1871 std::to_string(line) +
")\n";
1881 std::to_string(line) +
")\n";
1884 }
else if(value.length() == 3) {
1891 "end_war effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1896 "end_war effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1913 err.
accumulated_errors +=
"enable_ideology effect supplied with invalid ideology name " + std::string(value) +
" (" +
1914 err.
file_name +
", line " + std::to_string(line) +
")\n";
1922 context.
compiled_effect.push_back(uint16_t(effect::ruling_party_this));
1924 context.
compiled_effect.push_back(uint16_t(effect::ruling_party_from));
1927 context.
compiled_effect.push_back(uint16_t(effect::ruling_party_ideology));
1930 err.
accumulated_errors +=
"ruling_party_ideology effect supplied with invalid ideology name " + std::string(value) +
1931 " (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1936 std::to_string(line) +
")\n";
1955 context.
compiled_effect.push_back(uint16_t(effect::remove_province_modifier));
1958 err.
accumulated_errors +=
"remove_province_modifier effect supplied with invalid modifier name " + std::string(value) +
1959 " (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1965 context.
compiled_effect.push_back(uint16_t(effect::remove_province_modifier_state));
1968 err.
accumulated_errors +=
"remove_province_modifier effect supplied with invalid modifier name " + std::string(value) +
1969 " (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1974 std::to_string(line) +
")\n";
1983 context.
compiled_effect.push_back(uint16_t(effect::remove_country_modifier));
1986 err.
accumulated_errors +=
"remove_country_modifier effect supplied with invalid modifier name " + std::string(value) +
1987 " (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
1992 std::to_string(line) +
")\n";
2006 ", line " + std::to_string(line) +
")\n";
2016 ", line " + std::to_string(line) +
")\n";
2019 }
else if(value.length() == 3) {
2026 "create_alliance effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2031 "create_alliance effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2050 std::to_string(line) +
")\n";
2060 std::to_string(line) +
")\n";
2063 }
else if(
is_reb(value)) {
2068 std::to_string(line) +
")\n";
2071 }
else if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"random")) {
2073 }
else if(value.length() == 3) {
2079 err.
accumulated_errors +=
"release_vassal effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2083 err.
accumulated_errors +=
"release_vassal effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2094 std::to_string(line) +
")\n";
2104 std::to_string(line) +
")\n";
2107 }
else if(
is_reb(value)) {
2112 std::to_string(line) +
")\n";
2115 }
else if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"random")) {
2117 }
else if(value.length() == 3) {
2120 context.
compiled_effect.push_back(uint16_t(effect::release_vassal_province));
2123 err.
accumulated_errors +=
"release_vassal effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2127 err.
accumulated_errors +=
"release_vassal effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2152 context.
compiled_effect.push_back(uint16_t(effect::nationalvalue_nation));
2155 context.
compiled_effect.push_back(uint16_t(effect::nationalvalue_province));
2163 err.
accumulated_errors +=
"nationalvalue effect supplied with invalid modifier name " + std::string(value) +
" (" +
2164 err.
file_name +
", line " + std::to_string(line) +
")\n";
2197 context.
compiled_effect.push_back(uint16_t(effect::social_reform_province));
2205 err.
accumulated_errors +=
"social_reform effect supplied with invalid issue option name " + std::string(value) +
" (" +
2206 err.
file_name +
", line " + std::to_string(line) +
")\n";
2215 context.
compiled_effect.push_back(uint16_t(effect::political_reform));
2218 context.
compiled_effect.push_back(uint16_t(effect::political_reform_province));
2222 std::to_string(line) +
")\n";
2226 err.
accumulated_errors +=
"political_reform effect supplied with invalid issue option name " + std::string(value) +
" (" +
2227 err.
file_name +
", line " + std::to_string(line) +
")\n";
2234 context.
compiled_effect.push_back(uint16_t(effect::add_tax_relative_income));
2238 std::to_string(line) +
")\n";
2255 "reduce_pop effect with a negative value (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2257 value = std::max(0.0f, value);
2262 context.
compiled_effect.push_back(uint16_t(effect::reduce_pop_nation));
2265 context.
compiled_effect.push_back(uint16_t(effect::reduce_pop_province));
2268 context.
compiled_effect.push_back(uint16_t(effect::reduce_pop_state));
2293 "move_pop effect given an invalid province id (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2315 ", line " + std::to_string(line) +
")\n";
2321 context.
compiled_effect.push_back(uint16_t(effect::years_of_research));
2332 context.
compiled_effect.push_back(uint16_t(effect::prestige_factor_positive));
2334 context.
compiled_effect.push_back(uint16_t(effect::prestige_factor_negative));
2355 err.
accumulated_errors +=
"military_reform effect supplied with invalid issue option name " + std::string(value) +
" (" +
2356 err.
file_name +
", line " + std::to_string(line) +
")\n";
2373 err.
accumulated_errors +=
"economic_reform effect supplied with invalid issue option name " + std::string(value) +
" (" +
2374 err.
file_name +
", line " + std::to_string(line) +
")\n";
2381 context.
compiled_effect.push_back(uint16_t(effect::remove_random_military_reforms));
2385 ", line " + std::to_string(line) +
")\n";
2392 context.
compiled_effect.push_back(uint16_t(effect::remove_random_economic_reforms));
2396 ", line " + std::to_string(line) +
")\n";
2410 }
else if(
is_fixed_token_ci(value.data(), value.data() + value.length(),
"none")) {
2413 err.
accumulated_errors +=
"add_crime effect supplied with invalid modifier name " + std::string(value) +
" (" +
2414 err.
file_name +
", line " + std::to_string(line) +
")\n";
2433 context.
compiled_effect.push_back(uint16_t(effect::build_factory_in_capital_state));
2437 ", line " + std::to_string(line) +
")\n";
2441 err.
accumulated_errors +=
"build_factory_in_capital_state effect supplied with invalid factory name " + std::string(value) +
2442 " (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2451 context.
compiled_effect.push_back(uint16_t(effect::activate_technology));
2455 std::to_string(line) +
")\n";
2461 context.
compiled_effect.push_back(uint16_t(effect::activate_invention));
2465 std::to_string(line) +
")\n";
2469 err.
accumulated_errors +=
"activate_technology effect supplied with invalid technology/invention name " +
2470 std::string(value) +
" (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2516 std::to_string(line) +
")\n";
2522 context.
compiled_effect.push_back(uint16_t(effect::flashpoint_tension));
2525 context.
compiled_effect.push_back(uint16_t(effect::flashpoint_tension_province));
2529 std::to_string(line) +
")\n";
2535 context.
compiled_effect.push_back(uint16_t(effect::add_crisis_temperature));
2543 context.
compiled_effect.push_back(uint16_t(effect::consciousness_province));
2546 context.
compiled_effect.push_back(uint16_t(effect::consciousness_state));
2549 context.
compiled_effect.push_back(uint16_t(effect::consciousness_nation));
2562 context.
compiled_effect.push_back(uint16_t(effect::militancy_province));
2568 context.
compiled_effect.push_back(uint16_t(effect::militancy_nation));
2591 context.
compiled_effect.push_back(uint16_t(effect::add_province_modifier_no_duration));
2594 err.
accumulated_errors +=
"add_province_modifier effect supplied with invalid modifier name " + std::string(value) +
2595 " (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2601 context.
compiled_effect.push_back(uint16_t(effect::add_province_modifier_state_no_duration));
2604 err.
accumulated_errors +=
"add_province_modifier effect supplied with invalid modifier name " + std::string(value) +
2605 " (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2610 std::to_string(line) +
")\n";
2619 context.
compiled_effect.push_back(uint16_t(effect::add_country_modifier_no_duration));
2622 err.
accumulated_errors +=
"add_country_modifier effect supplied with invalid modifier name " + std::string(value) +
" (" +
2623 err.
file_name +
", line " + std::to_string(line) +
")\n";
2628 std::to_string(line) +
")\n";
2635 "trigger_revolt must have a valid rebel type (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2658 std::to_string(line) +
")\n";
2669 context.
compiled_effect.push_back(effect::diplomatic_influence_from_nation);
2677 context.
compiled_effect.push_back(effect::diplomatic_influence_from_province);
2680 ", line " + std::to_string(line) +
")\n";
2684 }
else if(
is_this(value.who)) {
2692 context.
compiled_effect.push_back(effect::diplomatic_influence_this_nation);
2700 context.
compiled_effect.push_back(effect::diplomatic_influence_this_province);
2703 ", line " + std::to_string(line) +
")\n";
2707 }
else if(value.who.length() == 3) {
2719 context.
compiled_effect.push_back(uint16_t(effect::diplomatic_influence));
2724 "diplomatic_influence effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2729 "diplomatic_influence effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2742 std::to_string(line) +
")\n";
2746 }
else if(
is_this(value.who)) {
2753 std::to_string(line) +
")\n";
2757 }
else if(
is_reb(value.who)) {
2762 std::to_string(line) +
")\n";
2766 }
else if(value.who.length() == 3) {
2774 "relation effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2779 "relation effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2785 context.
compiled_effect.push_back(effect::relation_province_from_nation);
2787 context.
compiled_effect.push_back(effect::relation_province_from_province);
2790 std::to_string(line) +
")\n";
2794 }
else if(
is_this(value.who)) {
2796 context.
compiled_effect.push_back(effect::relation_province_this_nation);
2798 context.
compiled_effect.push_back(effect::relation_province_this_province);
2801 std::to_string(line) +
")\n";
2805 }
else if(
is_reb(value.who)) {
2810 std::to_string(line) +
")\n";
2814 }
else if(value.who.length() == 3) {
2817 context.
compiled_effect.push_back(uint16_t(effect::relation_province));
2822 "relation effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2827 "relation effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2839 if(value.duration <= 0) {
2840 context.
compiled_effect.push_back(effect::add_province_modifier_no_duration);
2848 if(value.duration <= 0) {
2849 context.
compiled_effect.push_back(effect::add_province_modifier_state_no_duration);
2852 context.
compiled_effect.push_back(effect::add_province_modifier_state);
2864 if(value.duration <= 0) {
2865 context.
compiled_effect.push_back(effect::add_country_modifier_province_no_duration);
2868 context.
compiled_effect.push_back(effect::add_country_modifier_province);
2873 if(value.duration <= 0) {
2874 context.
compiled_effect.push_back(effect::add_country_modifier_no_duration);
2883 std::to_string(line) +
")\n";
2900 std::to_string(line) +
")\n";
2905 }
else if(
is_this(value.target)) {
2916 std::to_string(line) +
")\n";
2921 }
else if(
is_integer(value.target.data(), value.target.data() + value.target.length())) {
2922 auto ivalue =
parse_int(value.target, line, err);
2930 "casus_belli effect given an invalid province id (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2933 }
else if(value.target.length() == 3) {
2943 "casus_belli effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2948 "casus_belli effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2960 context.
compiled_effect.push_back(effect::add_casus_belli_from_nation);
2962 context.
compiled_effect.push_back(effect::add_casus_belli_from_province);
2965 std::to_string(line) +
")\n";
2970 }
else if(
is_this(value.target)) {
2972 context.
compiled_effect.push_back(effect::add_casus_belli_this_nation);
2974 context.
compiled_effect.push_back(effect::add_casus_belli_this_province);
2976 context.
compiled_effect.push_back(effect::add_casus_belli_this_state);
2981 std::to_string(line) +
")\n";
2986 }
else if(
is_integer(value.target.data(), value.target.data() + value.target.length())) {
2987 auto ivalue =
parse_int(value.target, line, err);
2995 "add_casus_belli effect given an invalid province id (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
2998 }
else if(value.target.length() == 3) {
3002 context.
compiled_effect.push_back(uint16_t(effect::add_casus_belli_tag));
3008 "add_casus_belli effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3013 "add_casus_belli effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3021 std::to_string(line) +
")\n";
3026 context.
compiled_effect.push_back(effect::remove_casus_belli_from_nation);
3028 context.
compiled_effect.push_back(effect::remove_casus_belli_from_province);
3031 ", line " + std::to_string(line) +
")\n";
3035 }
else if(
is_this(value.target)) {
3037 context.
compiled_effect.push_back(effect::remove_casus_belli_this_nation);
3039 context.
compiled_effect.push_back(effect::remove_casus_belli_this_province);
3041 context.
compiled_effect.push_back(effect::remove_casus_belli_this_state);
3043 context.
compiled_effect.push_back(effect::remove_casus_belli_this_pop);
3046 ", line " + std::to_string(line) +
")\n";
3050 }
else if(
is_integer(value.target.data(), value.target.data() + value.target.length())) {
3051 auto ivalue =
parse_int(value.target, line, err);
3058 "remove_casus_belli effect given an invalid province id (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3061 }
else if(value.target.length() == 3) {
3065 context.
compiled_effect.push_back(uint16_t(effect::remove_casus_belli_tag));
3070 "remove_casus_belli effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3075 "remove_casus_belli effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3083 std::to_string(line) +
")\n";
3088 context.
compiled_effect.push_back(effect::this_remove_casus_belli_from_nation);
3090 context.
compiled_effect.push_back(effect::this_remove_casus_belli_from_province);
3093 ", line " + std::to_string(line) +
")\n";
3097 }
else if(
is_this(value.target)) {
3099 context.
compiled_effect.push_back(effect::this_remove_casus_belli_this_nation);
3101 context.
compiled_effect.push_back(effect::this_remove_casus_belli_this_province);
3103 context.
compiled_effect.push_back(effect::this_remove_casus_belli_this_state);
3105 context.
compiled_effect.push_back(effect::this_remove_casus_belli_this_pop);
3108 ", line " + std::to_string(line) +
")\n";
3112 }
else if(
is_integer(value.target.data(), value.target.data() + value.target.length())) {
3113 auto ivalue =
parse_int(value.target, line, err);
3115 context.
compiled_effect.push_back(effect::this_remove_casus_belli_int);
3120 std::to_string(line) +
")\n";
3123 }
else if(value.target.length() == 3) {
3127 context.
compiled_effect.push_back(uint16_t(effect::this_remove_casus_belli_tag));
3132 "this_remove_casus_belli effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3137 "this_remove_casus_belli effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3147 if(value.attacker_goal.special_end_wargoal) {
3158 }
else if(
is_this(value.target)) {
3172 }
else if(value.target.length() == 3) {
3180 "war = effect (used to create a truce) given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3185 "war = effect (used to create a truce) given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3190 }
else if(value.attacker_goal.special_call_ally_wargoal) {
3196 context.
compiled_effect.push_back(value.call_ally ? effect::war_from_nation : effect::war_no_ally_from_nation);
3198 context.
compiled_effect.push_back(value.call_ally ? effect::war_from_province : effect::war_no_ally_from_province);
3204 }
else if(
is_this(value.target)) {
3206 context.
compiled_effect.push_back(value.call_ally ? effect::war_this_nation : effect::war_no_ally_this_nation);
3208 context.
compiled_effect.push_back(value.call_ally ? effect::war_this_province : effect::war_no_ally_this_province);
3210 context.
compiled_effect.push_back(value.call_ally ? effect::war_this_state : effect::war_no_ally_this_state);
3212 context.
compiled_effect.push_back(value.call_ally ? effect::war_this_pop : effect::war_no_ally_this_pop);
3218 }
else if(value.target.length() == 3) {
3222 context.
compiled_effect.push_back(uint16_t(value.call_ally ? effect::war_tag : effect::war_no_ally_tag));
3226 "war = effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3229 }
else if(value.target.length() == 0) {
3233 "war = effect given an invalid tag (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3245 if(value.days <= 0) {
3247 context.
compiled_effect.push_back(uint16_t(effect::country_event_immediate_this_nation));
3249 context.
compiled_effect.push_back(uint16_t(effect::country_event_immediate_this_province));
3251 context.
compiled_effect.push_back(uint16_t(effect::country_event_immediate_this_state));
3253 context.
compiled_effect.push_back(uint16_t(effect::country_event_immediate_this_pop));
3262 context.
compiled_effect.push_back(uint16_t(effect::country_event_this_nation));
3264 context.
compiled_effect.push_back(uint16_t(effect::country_event_this_province));
3266 context.
compiled_effect.push_back(uint16_t(effect::country_event_this_state));
3268 context.
compiled_effect.push_back(uint16_t(effect::country_event_this_pop));
3278 if(value.days <= 0) {
3280 context.
compiled_effect.push_back(uint16_t(effect::country_event_immediate_province_this_nation));
3282 context.
compiled_effect.push_back(uint16_t(effect::country_event_immediate_province_this_province));
3284 context.
compiled_effect.push_back(uint16_t(effect::country_event_immediate_province_this_state));
3286 context.
compiled_effect.push_back(uint16_t(effect::country_event_immediate_province_this_pop));
3295 context.
compiled_effect.push_back(uint16_t(effect::country_event_province_this_nation));
3297 context.
compiled_effect.push_back(uint16_t(effect::country_event_province_this_province));
3299 context.
compiled_effect.push_back(uint16_t(effect::country_event_province_this_state));
3301 context.
compiled_effect.push_back(uint16_t(effect::country_event_province_this_pop));
3318 if(value.days <= 0) {
3320 context.
compiled_effect.push_back(uint16_t(effect::province_event_immediate_this_nation));
3322 context.
compiled_effect.push_back(uint16_t(effect::province_event_immediate_this_province));
3324 context.
compiled_effect.push_back(uint16_t(effect::province_event_immediate_this_state));
3326 context.
compiled_effect.push_back(uint16_t(effect::province_event_immediate_this_pop));
3329 std::to_string(line) +
")\n";
3335 context.
compiled_effect.push_back(uint16_t(effect::province_event_this_nation));
3337 context.
compiled_effect.push_back(uint16_t(effect::province_event_this_province));
3339 context.
compiled_effect.push_back(uint16_t(effect::province_event_this_state));
3341 context.
compiled_effect.push_back(uint16_t(effect::province_event_this_pop));
3344 std::to_string(line) +
")\n";
3366 }
else if(
is_from(value.value)) {
3374 }
else if(
is_fixed_token_ci(value.value.data(), value.value.data() + value.value.length(),
"current")) {
3383 auto ivalue =
parse_int(value.value, line, err);
3391 "sub_unit effect given an invalid province id (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3453 context.
compiled_effect.push_back(uint16_t(effect::change_terrain_pop));
3455 context.
compiled_effect.push_back(uint16_t(effect::change_terrain_province));
3462 err.
accumulated_errors +=
"chenge_terrain effect supplied with an invalid terrain \"" + std::string(value) +
"\" (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3468 context.
compiled_effect.push_back(uint16_t(effect::masquerade_as_nation_this));
3470 context.
compiled_effect.push_back(uint16_t(effect::masquerade_as_nation_from));
3476 err.
accumulated_errors +=
"masquerade_as_nation effect not used in a nation scope (" + err.
file_name +
", line " + std::to_string(line) +
")\n";
3516 if(
bool(value.ideology_)) {
3520 }
else if(
bool(value.issue_)) {
3525 context.
compiled_effect.push_back(effect::scaled_militancy_unemployment);
3529 if(
bool(value.ideology_)) {
3530 context.
compiled_effect.push_back(effect::scaled_militancy_nation_ideology);
3533 }
else if(
bool(value.issue_)) {
3534 context.
compiled_effect.push_back(effect::scaled_militancy_nation_issue);
3538 context.
compiled_effect.push_back(effect::scaled_militancy_nation_unemployment);
3542 if(
bool(value.ideology_)) {
3543 context.
compiled_effect.push_back(effect::scaled_militancy_state_ideology);
3546 }
else if(
bool(value.issue_)) {
3547 context.
compiled_effect.push_back(effect::scaled_militancy_state_issue);
3551 context.
compiled_effect.push_back(effect::scaled_militancy_state_unemployment);
3555 if(
bool(value.ideology_)) {
3556 context.
compiled_effect.push_back(effect::scaled_militancy_province_ideology);
3559 }
else if(
bool(value.issue_)) {
3560 context.
compiled_effect.push_back(effect::scaled_militancy_province_issue);
3564 context.
compiled_effect.push_back(effect::scaled_militancy_province_unemployment);
3575 if(
bool(value.ideology_)) {
3576 context.
compiled_effect.push_back(effect::scaled_consciousness_ideology);
3579 }
else if(
bool(value.issue_)) {
3580 context.
compiled_effect.push_back(effect::scaled_consciousness_issue);
3584 context.
compiled_effect.push_back(effect::scaled_consciousness_unemployment);
3588 if(
bool(value.ideology_)) {
3589 context.
compiled_effect.push_back(effect::scaled_consciousness_nation_ideology);
3592 }
else if(
bool(value.issue_)) {
3593 context.
compiled_effect.push_back(effect::scaled_consciousness_nation_issue);
3597 context.
compiled_effect.push_back(effect::scaled_consciousness_nation_unemployment);
3601 if(
bool(value.ideology_)) {
3602 context.
compiled_effect.push_back(effect::scaled_consciousness_state_ideology);
3605 }
else if(
bool(value.issue_)) {
3606 context.
compiled_effect.push_back(effect::scaled_consciousness_state_issue);
3610 context.
compiled_effect.push_back(effect::scaled_consciousness_state_unemployment);
3614 if(
bool(value.ideology_)) {
3615 context.
compiled_effect.push_back(effect::scaled_consciousness_province_ideology);
3618 }
else if(
bool(value.issue_)) {
3619 context.
compiled_effect.push_back(effect::scaled_consciousness_province_issue);
3623 context.
compiled_effect.push_back(effect::scaled_consciousness_province_unemployment);
3628 std::to_string(line) +
")\n";
3647 context.
compiled_effect.push_back(effect::move_issue_percentage_nation);
3649 context.
compiled_effect.push_back(effect::move_issue_percentage_state);
3651 context.
compiled_effect.push_back(effect::move_issue_percentage_province);
3656 std::to_string(line) +
")\n";
3664 if(
bool(value.province_id_)) {
3682 std::to_string(line) +
")\n";
3692 std::to_string(line) +
")\n";
3694 }
else if(!value.opt_) {
3696 std::to_string(line) +
")\n";
3706 std::to_string(line) +
")\n";
3709 if(value.in_whole_capital_state && value.limit_to_world_greatest_level)
3711 else if(value.in_whole_capital_state && !value.limit_to_world_greatest_level)
3713 else if(!value.in_whole_capital_state && value.limit_to_world_greatest_level)
3722 std::to_string(line) +
")\n";
3725 if(value.in_whole_capital_state && value.limit_to_world_greatest_level)
3727 uint16_t(effect::build_bank_in_capital_yes_whole_state_yes_limit |
effect::no_payload));
3728 else if(value.in_whole_capital_state && !value.limit_to_world_greatest_level)
3730 else if(!value.in_whole_capital_state && value.limit_to_world_greatest_level)
3739 std::to_string(line) +
")\n";
3742 if(value.in_whole_capital_state && value.limit_to_world_greatest_level)
3744 uint16_t(effect::build_university_in_capital_yes_whole_state_yes_limit |
effect::no_payload));
3745 else if(value.in_whole_capital_state && !value.limit_to_world_greatest_level)
3747 else if(!value.in_whole_capital_state && value.limit_to_world_greatest_level)
3756 std::to_string(line) +
")\n";
3759 if(value.in_whole_capital_state && value.limit_to_world_greatest_level)
3761 else if(value.in_whole_capital_state && !value.limit_to_world_greatest_level)
3763 else if(!value.in_whole_capital_state && value.limit_to_world_greatest_level)
3778void ef_random_by_modifier(token_generator& gen, error_handler& err, effect_building_context& context);
3789dcon::value_modifier_key
make_option_ai_chance(token_generator& gen, error_handler& err, effect_building_context& context);
3791dcon::trigger_key
ef_limit(token_generator& gen, error_handler& err, effect_building_context& context);
3793void ef_scope_if(token_generator& gen, error_handler& err, effect_building_context& context);
3794void ef_scope_else_if(token_generator& gen, error_handler& err, effect_building_context& context);
std::string accumulated_errors
std::string accumulated_warnings
dcon::modifier_id get_province_immigrator_modifier(sys::state &state)
dcon::modifier_id get_province_selector_modifier(sys::state &state)
constexpr uint16_t owner_scope_province
constexpr uint16_t no_payload
constexpr uint16_t scope_has_limit
uint32_t tag_to_int(char first, char second, char third)
void ef_scope_random_owned(token_generator &gen, error_handler &err, effect_building_context &context)
bool is_integer(char const *start, char const *end)
void ef_scope_any_defined_country(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_location(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_all_core(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_hidden_tooltip(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_sphere_owner(token_generator &gen, error_handler &err, effect_building_context &context)
bool is_this(std::string_view value)
bool is_reb(std::string_view value)
void ef_scope_random_state(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_owner(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_cultural_union(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_any_greater_power(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_random_list(token_generator &gen, error_handler &err, effect_building_context &context)
int32_t simplify_effect(uint16_t *source)
void ef_scope_else_if(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_middle_strata(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_any_state(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_random_empty_neighbor_province(token_generator &gen, error_handler &err, effect_building_context &context)
bool is_from(std::string_view value)
void ef_crisis_state_scope(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_controller(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_else(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_random_country(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_overlord(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_any_neighbor_province(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_capital_scope(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_state_scope(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_rich_strata(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_any_owned(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_any_substate(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_random_by_modifier(token_generator &gen, error_handler &err, effect_building_context &context)
bool is_fixed_token_ci(char const *start, char const *end, char const (&t)[N])
void ef_scope_any_existing_country_except_scoped(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_independence(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_from(token_generator &gen, error_handler &err, effect_building_context &context)
int32_t parse_int(std::string_view content, int32_t line, error_handler &err)
dcon::trigger_key ef_limit(token_generator &gen, error_handler &err, effect_building_context &context)
dcon::effect_key make_effect(token_generator &gen, error_handler &err, effect_building_context &context)
int32_t add_to_random_list(std::string_view label, token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_random_neighbor_province(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_poor_strata(token_generator &gen, error_handler &err, effect_building_context &context)
dcon::value_modifier_key read_chance_modifier(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_any_country(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_flashpoint_tag_scope(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_variable(std::string_view label, token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_random(token_generator &gen, error_handler &err, effect_building_context &context)
dcon::value_modifier_key make_option_ai_chance(token_generator &gen, error_handler &err, effect_building_context &context)
std::string slot_contents_to_string(trigger::slot_contents v)
void ef_scope_random_neighbor_country(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_country(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_sea_zone(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_any_neighbor_country(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_if(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_random_pop(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_this(token_generator &gen, error_handler &err, effect_building_context &context)
void ef_scope_any_pop(token_generator &gen, error_handler &err, effect_building_context &context)
dcon::text_key find_or_add_key(sys::state &state, std::string_view key, bool as_unicode)
void finish(effect_building_context &)
void type(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void name(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
void finish(effect_building_context &)
void name(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void casus_belli(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
dcon::cb_type_id casus_belli_
void finish(effect_building_context &)
bool limit_to_world_greatest_level
bool in_whole_capital_state
bool limit_to_world_greatest_level
bool in_whole_capital_state
void finish(effect_building_context &)
bool in_whole_capital_state
void finish(effect_building_context &)
bool limit_to_world_greatest_level
bool in_whole_capital_state
void finish(effect_building_context &)
bool limit_to_world_greatest_level
void type(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
dcon::ideology_id ideology_
void ideology(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void name(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
dcon::issue_option_id opt_
void position(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
dcon::ideology_id ideology_
void ideology(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
void which(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
dcon::national_variable_id which_
dcon::national_event_id id_
void id(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
dcon::leader_trait_id personality_
void personality(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
dcon::leader_trait_id background_
void finish(effect_building_context &)
void background(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
dcon::leader_trait_id personality_
void personality(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void background(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
dcon::leader_trait_id background_
void finish(effect_building_context &)
void finish(effect_building_context &)
void finish(effect_building_context &)
void value(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
dcon::issue_option_id value_
void value(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
void finish(effect_building_context &)
dcon::issue_option_id from_
dcon::issue_option_id to_
void to(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void from(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void ideology(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
dcon::ideology_id ideology_
void finish(effect_building_context &)
void province_id(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
dcon::province_id province_id_
void id(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
dcon::provincial_event_id id_
void finish(effect_building_context &)
void finish(effect_building_context &)
void any_group(std::string_view label, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
void finish(effect_building_context &)
void type(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
dcon::ideology_id ideology_
void ideology(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void issue(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
dcon::issue_option_id issue_
void finish(effect_building_context &)
void ideology(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
dcon::ideology_id ideology_
void issue(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
dcon::issue_option_id issue_
dcon::value_modifier_key chance_modifier
void finish(effect_building_context &)
void finish(effect_building_context &)
dcon::national_variable_id which_
void which(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
void type(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void type(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
dcon::culture_id culture_
void type(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void ideology(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
dcon::rebel_type_id type_
dcon::religion_id religion_
dcon::ideology_id ideology_
void culture(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
void religion(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void ideology(association_type t, std::string_view v, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
dcon::ideology_id ideology_
void finish(effect_building_context &)
dcon::national_identity_id country_
void finish(effect_building_context &)
bool target_country_is_this
void state_province_id(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
dcon::cb_type_id casus_belli_
void country(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
dcon::province_id state_province_id_
void casus_belli(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
bool target_country_is_from
bool special_call_ally_wargoal
void scaled_consciousness(ef_scaled_consciousness const &value, error_handler &err, int32_t line, effect_building_context &context)
void remove_random_military_reforms(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void province_immigrator(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void activate_technology(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void remove_accepted_culture(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void military_access(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void change_party_name(ef_change_party_name const &value, error_handler &err, int32_t line, effect_building_context &context)
void change_party_position(ef_change_party_position const &value, error_handler &err, int32_t line, effect_building_context &context)
void define_general(ef_define_general const &value, error_handler &err, int32_t line, effect_building_context &context)
void add_country_modifier(ef_add_country_modifier const &value, error_handler &err, int32_t line, effect_building_context &context)
void build_university_in_capital(ef_build_university_in_capital const &value, error_handler &err, int32_t line, effect_building_context &context)
void government(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void annex_to(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void naval_base(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void limit(dcon::trigger_key lim, error_handler &err, int32_t line, effect_building_context &context)
void set_culture(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void pop_type(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void decrement_variable(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void capital(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void clr_global_flag(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void military_reform(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void set_variable(ef_set_variable const &value, error_handler &err, int32_t line, effect_building_context &context)
void build_factory_in_capital_state(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void release_vassal(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void finish(effect_building_context &)
void add_country_modifier(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void end_war(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void party_loyalty(ef_party_loyalty const &value, error_handler &err, int32_t line, effect_building_context &context)
void set_global_flag(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void primary_culture(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void remove_province_modifier(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void create_vassal(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void leave_alliance(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void world_wars_enabled(association_type t, bool value, error_handler &err, int32_t line, effect_building_context &context)
void enable_ideology(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void nationalvalue(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void create_alliance(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void clr_country_flag(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void trigger_revolt(ef_trigger_revolt const &value, error_handler &err, int32_t line, effect_building_context &context)
void nationalize(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void economic_reform(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void relation(ef_relation const &value, error_handler &err, int32_t line, effect_building_context &context)
void consciousness(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void add_casus_belli(ef_add_casus_belli const &value, error_handler &err, int32_t line, effect_building_context &context)
void change_controller(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void set_variable_to_zero(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void add_accepted_culture(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void literacy(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void add_tax_relative_income(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void any_value(std::string_view label, association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void neutrality(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void prestige(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void flashpoint_tension(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void university(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void ruling_party_ideology(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void leadership(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void election(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void province_selector(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void sub_unit(ef_sub_unit const &value, error_handler &err, int32_t line, effect_building_context &context)
void remove_random_economic_reforms(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void religion(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void badboy(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void change_tag(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void war_exhaustion(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void add_crime(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void change_tag_no_core_switch(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void add_crisis_temperature(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void ideology(ef_ideology const &value, error_handler &err, int32_t line, effect_building_context &context)
void diplo_points(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void province_event(ef_province_event const &value, error_handler &err, int32_t line, effect_building_context &context)
void masquerade_as_nation(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void political_reform(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void dominant_issue(ef_dominant_issue const &value, error_handler &err, int32_t line, effect_building_context &context)
void remove_casus_belli(ef_remove_casus_belli const &value, error_handler &err, int32_t line, effect_building_context &context)
void upper_house(ef_upper_house const &value, error_handler &err, int32_t line, effect_building_context &context)
void remove_core(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void bank(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void move_issue_percentage(ef_move_issue_percentage const &value, error_handler &err, int32_t line, effect_building_context &context)
void prestige_factor(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void change_province_name(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void money(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void country_event(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void plurality(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void trade_goods(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void social_reform(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void assimilate(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void infrastructure(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void casus_belli(ef_casus_belli const &value, error_handler &err, int32_t line, effect_building_context &context)
void add_war_goal(ef_add_war_goal const &value, error_handler &err, int32_t line, effect_building_context &context)
void change_variable(ef_change_variable const &value, error_handler &err, int32_t line, effect_building_context &context)
void release(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void reduce_pop(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void define_admiral(ef_define_admiral const &value, error_handler &err, int32_t line, effect_building_context &context)
void end_military_access(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void add_province_modifier(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void rgo_size(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void years_of_research(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void remove_country_modifier(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void set_country_flag(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void enable_canal(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void war(ef_war const &value, error_handler &err, int32_t line, effect_building_context &context)
void research_points(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void add_province_modifier(ef_add_province_modifier const &value, error_handler &err, int32_t line, effect_building_context &context)
void inherit(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void reduce_pop_abs(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void fort(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void province_event(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void kill_leader(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void country_event(ef_country_event const &value, error_handler &err, int32_t line, effect_building_context &context)
void great_wars_enabled(association_type t, bool value, error_handler &err, int32_t line, effect_building_context &context)
void scaled_militancy(ef_scaled_militancy const &value, error_handler &err, int32_t line, effect_building_context &context)
void move_pop(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void tech_school(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void diplomatic_influence(ef_diplomatic_influence const &value, error_handler &err, int32_t line, effect_building_context &context)
void life_rating(association_type t, int32_t value, error_handler &err, int32_t line, effect_building_context &context)
void treasury(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
void secede_province(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void civilized(association_type t, bool value, error_handler &err, int32_t line, effect_building_context &context)
void increment_variable(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void build_railway_in_capital(ef_build_railway_in_capital const &value, error_handler &err, int32_t line, effect_building_context &context)
void change_region_name(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void this_remove_casus_belli(ef_this_remove_casus_belli const &value, error_handler &err, int32_t line, effect_building_context &context)
void add_crisis_interest(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void build_fort_in_capital(ef_build_fort_in_capital const &value, error_handler &err, int32_t line, effect_building_context &context)
void change_terrain(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void build_bank_in_capital(ef_build_bank_in_capital const &value, error_handler &err, int32_t line, effect_building_context &context)
void add_core(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
void is_slave(association_type t, bool value, error_handler &err, int32_t line, effect_building_context &context)
void militancy(association_type t, float value, error_handler &err, int32_t line, effect_building_context &context)
trigger::slot_contents this_slot
scenario_building_context & outer_context
void add_int32_t_to_payload(int32_t i)
std::vector< uint16_t > compiled_effect
trigger::slot_contents from_slot
effect_building_context(scenario_building_context &outer_context, trigger::slot_contents main_slot, trigger::slot_contents this_slot, trigger::slot_contents from_slot)
trigger::slot_contents main_slot
void add_float_to_payload(float f)
dcon::value_modifier_key ai_chance
void name(association_type t, std::string_view value, error_handler &err, int32_t line, effect_building_context &context)
ankerl::unordered_dense::map< std::string, dcon::unit_type_id > map_of_unit_types
ankerl::unordered_dense::map< std::string, dcon::modifier_id > map_of_modifiers
ankerl::unordered_dense::map< std::string, dcon::religion_id > map_of_religion_names
ankerl::unordered_dense::map< std::string, pending_invention_content > map_of_inventions
ankerl::unordered_dense::map< std::string, pending_roption_content > map_of_roptions
ankerl::unordered_dense::map< std::string, pending_tech_content > map_of_technologies
ankerl::unordered_dense::map< std::string, dcon::pop_type_id > map_of_poptypes
ankerl::unordered_dense::map< std::string, pending_ideology_content > map_of_ideologies
std::vector< dcon::province_id > original_id_to_prov_id_map
ankerl::unordered_dense::map< std::string, pending_crime_content > map_of_crimes
ankerl::unordered_dense::map< std::string, dcon::leader_trait_id > map_of_leader_traits
dcon::global_flag_id get_global_flag(std::string const &name)
ankerl::unordered_dense::map< std::string, pending_option_content > map_of_ioptions
ankerl::unordered_dense::map< std::string, pending_cb_content > map_of_cb_types
ankerl::unordered_dense::map< std::string, terrain_type > map_of_terrain_types
dcon::national_flag_id get_national_flag(std::string const &name)
ankerl::unordered_dense::map< std::string, pending_rebel_type_content > map_of_rebeltypes
ankerl::unordered_dense::map< uint32_t, dcon::national_identity_id > map_of_ident_names
ankerl::unordered_dense::map< std::string, dcon::culture_id > map_of_culture_names
ankerl::unordered_dense::map< std::string, dcon::commodity_id > map_of_commodity_names
ankerl::unordered_dense::map< std::string, dcon::government_type_id > map_of_governments
dcon::national_variable_id get_national_variable(std::string const &name)
ankerl::unordered_dense::map< std::string, dcon::factory_type_id > map_of_factory_names
Holds important data about the game world, state, and other data regarding windowing,...