56#define FORMAT_VERSION RSFORMAT_CURRENT
87 int default_value,
const char *path,
90 if (value != default_value) {
91 if (
entry !=
nullptr) {
93 "%s.%s", path,
entry);
107 bool default_value,
const char *path,
110 if ((value && !default_value)
111 || (!value && default_value)) {
112 if (
entry !=
nullptr) {
114 "%s.%s", path,
entry);
141 "%s.rule_name", path);
152 const char *path,
const char *
entry)
160 if (!
preq->present) {
163 if (
preq->survives) {
175 "%s.%s%d.type", path,
entry,
i);
178 "%s.%s%d.name", path,
entry,
i);
181 "%s.%s%d.range", path,
entry,
i);
186 "%s.%s%d.survives", path,
entry,
i);
192 "%s.%s%d.present", path,
entry,
i);
198 "%s.%s%d.quiet", path,
entry,
i);
211 const char *path,
const char *
entry)
224 "%s.%s", path,
entry);
235 const char *path,
const char *
entry)
241 "%s.%s", path,
entry);
253 const char *path,
const char *
entry)
255 if (
save ==
nullptr) {
261 "%s.%s", path,
entry);
272 const char *path,
const char *
entry)
284 const char *path,
const char *
entry)
297 "%s.%s", path,
entry);
308 const char *path,
const char *
entry)
321 "%s.%s", path,
entry);
332 const char *path,
const char *
entry,
348 "%s.%s", path,
entry);
359 const char *path,
const char *
entry)
394 if (sfile ==
nullptr) {
414 "control.building_flags%d.helptxt",
i);
422 if (!
pb->ruledit_disabled) {
441 if (
strcmp(
pb->graphic_alt2,
"-")) {
447 if (
strcmp(
pb->soundtag_alt,
"-")) {
450 if (
strcmp(
pb->soundtag_alt2,
"-")) {
489 if (sfile ==
nullptr) {
518 "%s.citizens_graphic", path);
571 log_error(
"Can't handle action auto performer requirement %s",
659 "missing_unit_upkeep.%s_protected",
item);
661 "missing_unit_upkeep.%s_unit_act",
item);
676 if (sfile ==
nullptr) {
693 "%s.short_name", path);
709 "parameters.celebrate_size_limit");
713 "parameters.add_to_size_limit");
717 "parameters.angry_citizens");
721 "parameters.changable_tax");
725 "parameters.forced_science");
729 "parameters.forced_luxury");
733 "parameters.forced_gold");
737 "parameters.vision_reveal_tiles");
741 "parameters.pop_report_zeroes");
746 "citizen.nationality",
nullptr);
749 "citizen.ubuilder_nationality",
nullptr);
752 "citizen.convert_speed",
nullptr);
755 "citizen.conquest_convert_pct");
760 "citizen.partisans_pct");
767 "missing_unit_upkeep.food_wipe");
774 "missing_unit_upkeep.gold_wipe");
781 "missing_unit_upkeep.shield_wipe");
803 if (
peffect->rulesave.do_not_save) {
817 if (
peffect->rulesave.comment !=
nullptr) {
835 if (sfile ==
nullptr) {
856 "%s.ai_valued_as", path);
986 "Forbid \"%s\" if any one of the listed actions are legal.",
1007 log_error(
"Didn't save all %s blocking actions.",
1072 log_error(
"Didn't save all of %s.", path);
1090 if (sfile ==
nullptr) {
1112 "auto_attack",
"if_attacker");
1115 "auto_attack.attack_actions");
1120 "actions.diplchance_initial_odds")) {
1127 log_error(
"Didn't save all post success forced actions.");
1134 log_error(
"Didn't save all post success forced actions.");
1140 log_error(
"Didn't save all post success forced actions.");
1146 log_error(
"Didn't save all post success forced actions.");
1151 "actions.escape_city")) {
1152 log_error(
"Didn't save all escape city forced actions.");
1157 "actions.unit_stack_death")) {
1158 log_error(
"Didn't save all escape unit stack death forced actions.");
1164 "actions.poison_empties_food_stock",
nullptr);
1168 "actions.steal_maps_reveals_all_cities",
nullptr);
1190 "actions.quiet_actions") !=
i) {
1191 log_error(
"Didn't save all quiet actions.");
1225 "%s.ui_name", path);
1236 if (
pae->rulesave.ruledit_disabled) {
1248 if (
pae->rulesave.comment !=
nullptr) {
1265 enum gameloss_style
gs;
1274 if (sfile ==
nullptr) {
1280 "ruledit.description_file");
1286 "ruledit.std_tileset_compat");
1291 "tileset.preferred");
1295 "soundset.preferred");
1299 "musicset.preferred");
1320 "about.description");
1323 "about.description");
1329 "about.capabilities");
1335 "options",
"global_init_techs");
1337 "options",
"global_init_buildings");
1341 "options.popup_tech_help",
nullptr);
1344 "civstyle.base_pollution",
nullptr);
1357 "civstyle.gameloss_style");
1362 "civstyle.happy_cost",
nullptr);
1365 "civstyle.food_cost",
nullptr);
1370 "civstyle.paradrop_to_transport",
nullptr);
1373 "civstyle.base_bribe_cost",
nullptr);
1379 "civstyle.ransom_gold",
nullptr);
1382 "civstyle.pillage_select",
nullptr);
1385 "civstyle.tech_steal_allow_holes",
nullptr);
1388 "civstyle.tech_trade_allow_holes",
nullptr);
1391 "civstyle.tech_trade_loss_allow_holes",
nullptr);
1394 "civstyle.tech_parasite_allow_holes",
nullptr);
1397 "civstyle.tech_loss_allow_holes",
nullptr);
1400 "civstyle.upgrade_veteran_loss",
nullptr);
1403 "civstyle.autoupgrade_veteran_loss",
nullptr);
1409 "civstyle.granary_food_ini");
1413 "civstyle.granary_food_inc",
nullptr);
1419 "civstyle.min_city_center_%s",
1429 "civstyle.init_vis_radius_sq",
nullptr);
1432 "civstyle.init_city_radius_sq",
nullptr);
1440 "civstyle.gold_upkeep_style");
1446 "civstyle.homeless_gold_upkeep",
nullptr);
1448 1,
"civstyle.output_granularity",
nullptr);
1454 FALSE,
"civstyle.airlift_from_always_enabled",
nullptr);
1456 TRUE,
"civstyle.airlift_to_always_enabled",
nullptr);
1463 "wonder_visibility.small_wonders");
1468 "illness.illness_on",
nullptr);
1471 "illness.illness_base_factor",
nullptr);
1474 "illness.illness_min_size",
nullptr);
1477 "illness.illness_trade_infection",
nullptr);
1480 "illness.illness_pollution_factor",
nullptr);
1484 "incite_cost.base_incite_cost",
nullptr);
1487 "incite_cost.improvement_factor",
nullptr);
1490 "incite_cost.unit_factor",
nullptr);
1493 "incite_cost.total_factor",
nullptr);
1500 "combat_rules.tired_attack",
nullptr);
1506 "combat_rules.only_killing_makes_veteran",
nullptr);
1512 "combat_rules.only_real_fight_makes_veteran",
nullptr);
1518 "combat_rules.combat_odds_scaled_veterancy",
nullptr);
1524 "combat_rules.damage_reduces_bombard_rate",
nullptr);
1529 "combat_rules.low_firepower_badwallattacker",
nullptr);
1534 "combat_rules.low_firepower_pearl_harbor",
nullptr);
1539 "combat_rules.low_firepower_combat_bonus",
nullptr);
1544 "combat_rules.low_firepower_nonnat_bombard",
nullptr);
1550 "combat_rules.nuke_pop_loss_pct",
nullptr);
1557 "combat_rules.nuke_defender_survival_chance_pct",
nullptr);
1560 "borders.radius_sq_city",
nullptr);
1563 "borders.size_effect",
nullptr);
1570 "borders.radius_sq_city_permanent",
nullptr);
1574 "research.tech_cost_style");
1580 "research.base_tech_cost",
nullptr);
1586 "research.min_tech_cost",
nullptr);
1589 "research.tech_leakage");
1592 "research.tech_upkeep_style");
1595 "research.tech_upkeep_divider",
nullptr);
1598 "research.free_tech_method");
1602 "culture.victory_min_points",
nullptr);
1605 "culture.victory_lead_pct",
nullptr);
1611 "culture.migration_pml",
nullptr);
1617 "culture.history_interest_pml",
nullptr);
1623 "world_peace.victory_turns",
nullptr);
1627 "calendar.skip_year_0",
nullptr);
1630 "calendar.start_year",
nullptr);
1635 0,
"calendar.fragments",
nullptr);
1640 "calendar.fragment_name%d",
i);
1646 "calendar.positive_label");
1650 "calendar.negative_label");
1687 "%s.frequency", path);
1701 "%s.effects", path);
1725 0, path,
"culture");
1728 if (
pach->cons_msg !=
nullptr) {
1752 "%s.cancelling", path);
1759 0,
"trade.min_trade_route_val",
nullptr);
1762 FALSE,
"trade.reveal_trade_partner",
nullptr);
1766 "trade.goods_selection");
1912 if (sfile ==
nullptr) {
1917 "during_revolution");
1937 if (
pg->ai.better !=
nullptr) {
1948 if (
title !=
nullptr) {
1950 "%s.ruler_male_title", path);
1954 if (
title !=
nullptr) {
1956 "%s.ruler_female_title", path);
1968 if (!pmul->ruledit_disabled) {
1986 save_strvec(sfile, pmul->helptext, path,
"helptext");
2021 || (default_traits !=
nullptr && traits[
tr].
min != default_traits[
tr].
min)) {
2026 || (default_traits !=
nullptr && traits[
tr].max != default_traits[
tr].max)) {
2056 if (
pnat->translation_domain ==
nullptr) {
2099 if (
pnat->server.rgb !=
nullptr) {
2104 sfile, path,
"trait_");
2106 if (!
pnat->is_playable) {
2112 "%s.barbarian_type", path);
2128 "%s.ruler_titles%d.government", path,
subsect_idx);
2130 "%s.ruler_titles%d.male_title", path,
subsect_idx);
2132 "%s.ruler_titles%d.female_title", path,
subsect_idx++);
2150 if (
pnat->init_government) {
2152 "%s.init_government", path);
2178 const char *
pref =
nullptr;
2192 if (
pref !=
nullptr) {
2235 if (sfile ==
nullptr) {
2256 "ruledit.embedded_nations");
2262 "default_traits",
"");
2268 "compatibility.allowed_govs");
2273 "compatibility.allowed_terrains");
2278 "compatibility.allowed_styles");
2284 "compatibility.default_government");
2300 if (
pnat ==
nullptr) {
2301 log_error(
"Embedded nation \"%s\" not found!",
2363 if (sfile ==
nullptr) {
2412 if (
pa->tclass !=
nullptr) {
2428 if (
strcmp(
"-",
pa->graphic_alt)) {
2431 if (
pa->bonus_message !=
nullptr) {
2446 if (
pa->cost >= 0) {
2469 if (sfile ==
nullptr) {
2511 "control.extra_flags%d.helptxt",
i);
2517 "parameters.ocean_reclaim_requirement");
2521 "parameters.land_channel_requirement");
2525 "parameters.thaw_requirement");
2529 "parameters.freeze_requirement");
2533 "parameters.lake_max_size");
2537 "parameters.min_start_native_area");
2541 "parameters.move_fragments");
2545 "parameters.igter_cost");
2549 "parameters.pythagorean_diagonal");
2553 "parameters.ocean_resources");
2575 identifier[0] =
pterr->identifier;
2576 identifier[1] =
'\0';
2586 if (
pterr->output[
o] != 0) {
2593 for (r = 0;
pterr->resources[r] !=
nullptr; r++) {
2610 "%s.resources", path);
2614 "%s.resource_freq", path);
2619 if (
pterr->road_output_incr_pct[
o] != 0) {
2621 "%s.road_%s_incr_pct", path,
2630 "cultivate_result");
2632 "%s.cultivate_time", path);
2637 "%s.plant_time", path);
2640 "%s.irrigation_food_incr", path);
2642 "%s.irrigation_time", path);
2645 "%s.mining_shield_incr", path);
2647 "%s.mining_time", path);
2650 "transform_result");
2652 "%s.transform_time", path);
2654 if (
pterr->animal !=
nullptr) {
2663 "%s.placing_time", path);
2665 "%s.pillage_time", path);
2673 "%s.extra_settings%d.extra",
2676 "%s.extra_settings%d.removal_time",
2682 "warmer_wetter_result");
2684 "warmer_drier_result");
2686 "cooler_wetter_result");
2688 "cooler_drier_result");
2710 "%s.property_%s", path,
2725 "%s.native_to", path);
2738 if (!
pres->ruledit_disabled) {
2748 if (
pres->data.resource->output[
o] != 0) {
2754 if (
pres->data.resource->id_old_save !=
'\0') {
2755 identifier[0] =
pres->data.resource->id_old_save;
2756 identifier[1] =
'\0';
2763 "extraui.ui_name_base_fortress");
2765 "extraui.ui_name_base_airbase");
2786 "%s.category", path);
2809 "%s.rmcauses", path);
2812 if (
strcmp(pextra->graphic_str,
"-")) {
2815 if (
strcmp(pextra->graphic_alt,
"-")) {
2818 if (
strcmp(pextra->activity_gfx,
"-")) {
2821 if (
strcmp(pextra->act_gfx_alt,
"-")) {
2824 if (
strcmp(pextra->act_gfx_alt2,
"-")) {
2827 if (
strcmp(pextra->rmact_gfx,
"-")) {
2830 if (
strcmp(pextra->rmact_gfx_alt,
"-")) {
2836 save_reqs_vector(sfile, &(pextra->appearance_reqs), path,
"appearance_reqs");
2837 save_reqs_vector(sfile, &(pextra->disappearance_reqs), path,
"disappearance_reqs");
2844 if (!pextra->generated) {
2849 if (pextra->build_time_factor != 1) {
2852 if (pextra->removal_time_factor != 1) {
2853 secfile_insert_int(sfile, pextra->removal_time_factor,
"%s.removal_time_factor", path);
2855 if (pextra->infracost != 0) {
2858 if (pextra->defense_bonus != 0) {
2863 "%s.unit_seen", path);
2884 "%s.native_to", path);
2887 if (pextra->no_aggr_near_city >= 0) {
2889 "%s.no_aggr_near_city", path);
2913 "%s.conflicts", path);
2925 "%s.hidden_by", path);
2937 "%s.bridged_over", path);
2940 save_strvec(sfile, pextra->helptext, path,
"helptext");
2948 if (!pextra->ruledit_disabled) {
2958 "%s.gui_type", path);
2960 if (
pbase->border_sq >= 0) {
2963 if (
pbase->vision_main_sq >= 0) {
2966 if (
pbase->vision_invis_sq >= 0) {
2969 if (
pbase->vision_subs_sq >= 0) {
2979 if (!pextra->ruledit_disabled) {
2995 "%s.move_mode", path);
2999 if (
proad->tile_incr_const[
o] != 0) {
3003 if (
proad->tile_incr[
o] != 0) {
3007 if (
proad->tile_bonus[
o] != 0) {
3013 switch (
proad->compat) {
3029 "%s.gui_type", path);
3070 "%s.veteran_names", path);
3072 "%s.veteran_power_fact", path);
3074 "%s.veteran_base_raise_chance", path);
3076 "%s.veteran_work_raise_chance", path);
3078 "%s.veteran_move_bonus", path);
3103 "%s.bonuses%d.flag", path,
i);
3105 "%s.bonuses%d.type", path,
i);
3107 "%s.bonuses%d.value", path,
i);
3111 "%s.bonuses%d.quiet", path,
i);
3131 if (sfile ==
nullptr) {
3173 "control.class_flags%d.helptxt",
i);
3193 "%s.min_speed", path);
3195 if (
puc->non_native_def_pct != 100) {
3197 "%s.non_native_def_pct", path);
3220 if (!
put->ruledit_disabled) {
3235 if (
put->obsoleted_by !=
nullptr) {
3237 "%s.obsolete_by", path);
3256 if (
strcmp(
"-",
put->sound_fight_alt)) {
3274 "%s.vision_layer", path);
3283 if (
put->upkeep[
o] != 0) {
3289 if (
put->converted_to !=
nullptr) {
3291 "%s.convert_to", path);
3293 if (
put->convert_time != 1) {
3300 if (
put->veteran !=
nullptr) {
3304 if (
put->paratroopers_range != 0) {
3306 "%s.paratroopers_range", path);
3308 if (
put->bombard_rate != 0) {
3310 "%s.bombard_rate", path);
3312 if (
put->city_slots != 0) {
3314 "%s.city_slots", path);
3316 if (
put->city_size != 1) {
3318 "%s.city_size", path);
3322 "%s.tp_defense", path);
3361 if (buffer !=
nullptr) {
3366 if (
ffile !=
nullptr) {
3404 fc_snprintf(filename,
sizeof(filename),
"%s/buildings.ruleset", path);
3409 fc_snprintf(filename,
sizeof(filename),
"%s/styles.ruleset", path);
3414 fc_snprintf(filename,
sizeof(filename),
"%s/cities.ruleset", path);
3419 fc_snprintf(filename,
sizeof(filename),
"%s/effects.ruleset", path);
3424 fc_snprintf(filename,
sizeof(filename),
"%s/game.ruleset", path);
3429 fc_snprintf(filename,
sizeof(filename),
"%s/governments.ruleset", path);
3434 fc_snprintf(filename,
sizeof(filename),
"%s/nations.ruleset", path);
3439 fc_snprintf(filename,
sizeof(filename),
"%s/techs.ruleset", path);
3444 fc_snprintf(filename,
sizeof(filename),
"%s/terrain.ruleset", path);
3449 fc_snprintf(filename,
sizeof(filename),
"%s/units.ruleset", path);
3454 fc_snprintf(filename,
sizeof(filename),
"%s/actions.ruleset",path);
3459 fc_snprintf(filename,
sizeof(filename),
"%s/script.lua", path);
3464 fc_snprintf(filename,
sizeof(filename),
"%s/parser.lua", path);
3469 fc_snprintf(filename,
sizeof(filename),
"%s/luadata.txt", path);
3475 log_error(
_(
"Failed to create directory %s"), path);
#define achievements_iterate_end
#define achievements_iterate(_ach_)
const char * action_min_range_ruleset_var_name(int act)
const char * action_blocked_by_ruleset_var_name(const struct action *act)
void action_array_end(action_id *act_array, int size)
bool action_is_in_use(struct action *paction)
const char * action_post_success_forced_ruleset_var_name(const struct action *act)
const char * action_rule_name(const struct action *action)
const char * action_actor_consuming_always_ruleset_var_name(action_id act)
const char * action_max_range_ruleset_var_name(int act)
const char * action_target_kind_ruleset_var_name(int act)
const char * action_ui_name_default(int act)
const struct action_auto_perf * action_auto_perf_by_number(const int num)
bool action_id_is_internal(action_id act)
#define action_enablers_iterate_end
#define enabler_get_action(_enabler_)
#define ACTION_AUTO_MOVED_ADJ
#define ACTION_AUTO_POST_BRIBE_UNIT
#define ACTION_AUTO_UPKEEP_GOLD
static struct action * action_by_number(action_id act_id)
#define ACTION_AUTO_ESCAPE_STACK
#define ACTION_AUTO_ESCAPE_CITY
#define ACTION_DISTANCE_UNLIMITED
#define ACTION_AUTO_POST_WIPE_UNITS
#define ACTION_AUTO_UPKEEP_SHIELD
#define action_iterate_end
#define ACTION_AUTO_POST_BRIBE_STACK
#define action_enablers_iterate(_enabler_)
#define action_iterate(_act_)
#define ACTION_AUTO_UPKEEP_FOOD
#define ACTION_AUTO_POST_ATTACK
int actres_min_range_default(enum action_result result)
int actres_max_range_default(enum action_result result)
void astr_free(struct astring *astr)
#define BV_ISSET(bv, bit)
const char * get_output_identifier(Output_type_id output)
static const struct city struct citystyle * city_styles
#define output_type_iterate(output)
#define output_type_iterate_end
#define counters_re_iterate_end
#define counters_re_iterate(pcount)
struct clause_info * clause_info_get(enum clause_type type)
#define disaster_type_iterate(_p)
#define disaster_type_iterate_end
bool iterate_effect_cache(iec_cb cb, void *data)
enum effect_type user_effect_ai_valued_as(enum effect_type real)
#define EFT_USER_EFFECT_LAST
#define MAX_NUM_USER_BUILDING_FLAGS
#define MAX_NUM_NATION_SETS
#define MAX_NUM_BUILDING_LIST
#define MAX_CALENDAR_FRAGMENTS
#define MAX_NUM_NATION_GROUPS
#define MAX_NUM_UNIT_LIST
#define MAX_NUM_TECH_LIST
const char * skip_intl_qualifier_prefix(const char *str)
#define RS_DEFAULT_RANSOM_GOLD
#define RS_DEFAULT_NUKE_DEFENDER_SURVIVAL_CHANCE_PCT
#define RS_DEFAULT_NUKE_POP_LOSS_PCT
#define RS_DEFAULT_BASE_POLLUTION
#define RS_DEFAULT_INCITE_TOTAL_FCT
#define RS_DEFAULT_ILLNESS_BASE_FACTOR
#define RS_DEFAULT_NEG_YEAR_LABEL
#define RS_DEFAULT_INCITE_IMPROVEMENT_FCT
#define RS_ACTION_NO_MAX_DISTANCE
#define RS_DEFAULT_BASE_BRIBE_COST
#define RS_DEFAULT_TECH_UPKEEP_DIVIDER
#define RS_DEFAULT_HAPPY_COST
#define RS_DEFAULT_POISON_EMPTIES_FOOD_STOCK
#define RS_DEFAULT_GRANARY_FOOD_INC
#define RS_DEFAULT_ILLNESS_ON
#define GAME_DEFAULT_CELEBRATESIZE
#define RS_DEFAULT_STEAL_MAP_REVEALS_CITIES
#define RS_DEFAULT_UPGRADE_VETERAN_LOSS
#define RS_DEFAULT_CALENDAR_SKIP_0
#define RS_DEFAULT_CITY_RADIUS_SQ
#define GAME_DEFAULT_START_YEAR
#define RS_DEFAULT_BORDER_SIZE_EFFECT
#define RS_DEFAULT_PILLAGE_SELECT
#define RS_DEFAULT_POS_YEAR_LABEL
#define RS_DEFAULT_VIS_RADIUS_SQ
#define RS_DEFAULT_BORDER_RADIUS_SQ_CITY_PERMANENT
#define RS_DEFAULT_TIRED_ATTACK
#define RS_DEFAULT_ACTION_ACTOR_CONSUMING_ALWAYS
#define RS_DEFAULT_ILLNESS_TRADE_INFECTION_PCT
#define RS_DEFAULT_FOOD_COST
#define RS_DEFAULT_INCITE_UNIT_FCT
#define RS_DEFAULT_INCITE_BASE_COST
#define GAME_DEFAULT_ANGRYCITIZEN
#define RS_DEFAULT_CITY_CENTER_OUTPUT
#define RS_DEFAULT_ILLNESS_POLLUTION_PCT
#define RS_DEFAULT_ILLNESS_MIN_SIZE
#define RS_DEFAULT_BORDER_RADIUS_SQ_CITY
const char * ruler_title_female_untranslated_name(const struct ruler_title *pruler_title)
const char * ruler_title_male_untranslated_name(const struct ruler_title *pruler_title)
const char * government_rule_name(const struct government *pgovern)
#define governments_iterate(NAME_pgov)
#define governments_re_active_iterate(_p)
#define governments_re_active_iterate_end
#define governments_iterate_end
struct impr_type * improvement_by_number(const Impr_type_id id)
const char * impr_flag_id_name_cb(enum impr_flag_id flag)
const char * improvement_rule_name(const struct impr_type *pimprove)
bool improvement_has_flag(const struct impr_type *pimprove, enum impr_flag_id flag)
const char * impr_flag_helptxt(enum impr_flag_id id)
#define improvement_re_active_iterate_end
#define improvement_re_active_iterate(_p)
#define fc_assert(condition)
#define log_error(message,...)
struct terrain_misc terrain_control
#define multipliers_iterate(_mul_)
#define multipliers_iterate_end
static const char * rule_name_get(const struct name_translation *ptrans)
static const char * untranslated_name(const struct name_translation *ptrans)
const char * nation_city_name(const struct nation_city *pncity)
const char * nation_rule_name(const struct nation_type *pnation)
bool nation_leader_is_male(const struct nation_leader *pleader)
enum nation_city_preference nation_city_terrain_preference(const struct nation_city *pncity, const struct terrain *pterrain)
const char * nation_group_rule_name(const struct nation_group *pgroup)
const char * nation_set_untranslated_name(const struct nation_set *pset)
bool nation_is_in_group(const struct nation_type *pnation, const struct nation_group *pgroup)
bool nation_is_in_set(const struct nation_type *pnation, const struct nation_set *pset)
const char * nation_set_description(const struct nation_set *pset)
enum nation_city_preference nation_city_river_preference(const struct nation_city *pncity)
struct nation_type * nation_by_rule_name(const char *name)
const char * nation_leader_name(const struct nation_leader *pleader)
const char * nation_set_rule_name(const struct nation_set *pset)
#define nation_leader_list_iterate(leaderlist, pleader)
#define nation_list_iterate(nationlist, pnation)
#define nation_sets_iterate_end
#define nation_sets_iterate(NAME_pset)
#define nations_iterate_end
#define nation_city_list_iterate(citylist, pncity)
#define nation_list_iterate_end
#define nation_city_list_iterate_end
#define nations_iterate(NAME_pnation)
#define nation_leader_list_iterate_end
#define nation_groups_iterate(NAME_pgroup)
#define nation_groups_iterate_end
struct section_file * secfile_new(bool allow_duplicates)
bool entry_str_set_gt_marking(struct entry *pentry, bool gt_marking)
bool secfile_save(const struct section_file *secfile, const char *filename, int compression_level, enum fz_method compression_method)
struct section * secfile_insert_include(struct section_file *secfile, const char *filename)
struct entry * secfile_insert_filereference(struct section_file *secfile, const char *filename, const char *path,...)
#define secfile_insert_int(secfile, value, path,...)
#define secfile_insert_enum_vec(secfile, enumerators, dim, specenum_type, path,...)
#define secfile_insert_enum(secfile, enumerator, specenum_type, path,...)
#define secfile_insert_int_vec(secfile, values, dim, path,...)
#define secfile_insert_str_vec(secfile, strings, dim, path,...)
#define secfile_insert_str(secfile, string, path,...)
#define secfile_insert_bool(secfile, value, path,...)
#define secfile_insert_enum_vec_comment(secfile, enumerators, dim, specenum_type, comment, path,...)
#define secfile_insert_enum_data(secfile, value, bitwise, name_fn, data, path,...)
const char * req_to_fstring(const struct requirement *req, struct astring *astr)
const char * universal_rule_name(const struct universal *psource)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
void rgbcolor_save(struct section_file *file, const struct rgbcolor *prgbcolor, char *path,...)
#define rgbcolor_list_iterate_end
#define rgbcolor_list_iterate(rgbcolorlist, prgbcolor)
bool road_has_flag(const struct road_type *proad, enum road_flag_id flag)
char * get_parser_buffer(void)
char * get_script_buffer(void)
#define RS_DEFAULT_CONVERT_SPEED
#define RS_DEFAULT_UBUILD_NAT
#define RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE
#define RS_DEFAULT_WORLD_PEACE_TURNS
#define RS_DEFAULT_TECH_TRADE_LOSS_HOLES
#define RS_DEFAULT_EXTRA_APPEARANCE
#define RS_DEFAULT_TECH_PARASITE_HOLES
#define GAME_DEFAULT_ACH_VALUE
#define RS_DEFAULT_TECH_TRADE_HOLES
#define RS_DEFAULT_CULTURE_VIC_POINTS
#define RS_DEFAULT_CULTURE_MIGRATION_PML
#define RS_DEFAULT_SMALL_WONDER_VISIBILITY
#define RS_DEFAULT_ONLY_KILLING_VETERAN
#define RS_DEFAULT_TECH_LOSS_HOLES
#define RS_DEFAULT_HISTORY_INTEREST_PML
#define RS_DEFAULT_GOODS_SELECTION
#define RS_DEFAULT_PYTHAGOREAN_DIAGONAL
#define RS_DEFAULT_TECH_STEAL_HOLES
#define GAME_DEFAULT_ACH_UNIQUE
#define RS_DEFAULT_COMBAT_ODDS_SCALED_VETERANCY
#define RS_DEFAULT_MUUK_FOOD_WIPE
#define RS_DEFAULT_MUUK_GOLD_WIPE
#define RS_DEFAULT_BASE_TECH_COST
#define RULESET_CAPABILITIES
#define RS_DEFAULT_NATIONALITY
#define GAME_DEFAULT_CHANGABLE_TAX
#define RS_DEFAULT_MUUK_SHIELD_WIPE
#define RS_DEFAULT_GOLD_UPKEEP_STYLE
#define GAME_DEFAULT_ADDTOSIZE
#define RS_DEFAULT_ONLY_REAL_FIGHT_VETERAN
#define RS_DEFAULT_EXTRA_DISAPPEARANCE
#define RS_DEFAULT_MIN_TECH_COST
#define GAME_DEFAULT_VISION_REVEAL_TILES
#define RS_DEFAULT_CULTURE_VIC_LEAD
#define GAME_DEFAULT_DISASTER_FREQ
static bool save_reqs_vector(struct section_file *sfile, const struct requirement_vector *reqs, const char *path, const char *entry)
static bool save_tech_list(struct section_file *sfile, int *input, const char *path, const char *entry)
static bool save_name_translation(struct section_file *sfile, struct name_translation *name, const char *path)
static bool save_terrain_ref(struct section_file *sfile, const struct terrain *save, const struct terrain *pthis, const char *path, const char *entry)
static bool save_unit_list(struct section_file *sfile, struct unit_type **input, const char *path, const char *entry)
static bool save_nations_ruleset(const char *filename, const char *name, struct rule_data *data)
static bool save_action_kind(struct section_file *sfile, action_id act)
static bool save_action_actor_consuming_always(struct section_file *sfile, action_id act)
static bool save_action_max_range(struct section_file *sfile, action_id act)
static bool save_traits(struct trait_limits *traits, struct trait_limits *default_traits, struct section_file *sfile, const char *secname, const char *field_prefix)
bool save_ruleset(const char *path, const char *name, struct rule_data *data)
static bool save_cities_ruleset(const char *filename, const char *name)
static bool save_techs_ruleset(const char *filename, const char *name)
static bool save_uclass_vec(struct section_file *sfile, bv_unit_classes *bits, const char *path, const char *entry, bool unreachable_only)
static bool save_action_post_success_force(struct section_file *sfile, int performer_slot, struct action *paction)
static bool save_ruleset_file(struct section_file *sfile, const char *filename)
static bool save_veteran_system(struct section_file *sfile, const char *path, struct veteran_system *vsystem)
static bool save_bv_actions(struct section_file *sfile, bv_actions content, const char *path)
static bool save_default_bool(struct section_file *sfile, bool value, bool default_value, const char *path, const char *entry)
static bool effect_save(struct effect *peffect, void *data)
static bool save_game_ruleset(const char *filename, const char *name)
static bool save_buildings_ruleset(const char *filename, const char *name)
static bool save_action_auto_uflag_block(struct section_file *sfile, const int aap, const char *uflags_path, bool(*unexpected_req)(const struct requirement *preq))
static bool unexpected_non_otype(const struct requirement *req)
static bool save_building_list(struct section_file *sfile, int *input, const char *path, const char *entry)
static bool save_luadata(const char *filename)
static bool save_governments_ruleset(const char *filename, const char *name)
static bool save_action_blocked_by(struct section_file *sfile, struct action *paction)
static bool save_strvec(struct section_file *sfile, struct strvec *to_save, const char *path, const char *entry)
static bool save_actions_ruleset(const char *filename, const char *name)
static bool save_units_ruleset(const char *filename, const char *name)
static bool save_terrain_ruleset(const char *filename, const char *name)
static bool save_muuk_action_auto(struct section_file *sfile, const int aap, const char *item)
static bool save_action_range(struct section_file *sfile, action_id act)
static bool save_gov_ref(struct section_file *sfile, const struct government *gov, const char *path, const char *entry)
static bool save_styles_ruleset(const char *filename, const char *name)
static struct section_file * create_ruleset_file(const char *rsname, const char *rstype)
static bool save_combat_bonuses(struct section_file *sfile, struct unit_type *put, char *path)
static bool save_effects_ruleset(const char *filename, const char *name)
static bool save_default_int(struct section_file *sfile, int value, int default_value, const char *path, const char *entry)
static bool save_nation(struct section_file *sfile, struct nation_type *pnat, int sect_idx)
static bool save_script_lua(const char *filename, const char *name, const char *buffer)
static bool save_action_auto_actions(struct section_file *sfile, const int aap, const char *actions_path)
static bool save_tech_ref(struct section_file *sfile, const struct advance *padv, const char *path, const char *entry)
bool setting_ruleset_locked(const struct setting *pset)
int setting_int_get(struct setting *pset)
enum sset_type setting_type(const struct setting *pset)
const char * setting_enum_secfile_str(secfile_data_t data, int val)
enum setting_default_level setting_get_setdef(const struct setting *pset)
const char * setting_name(const struct setting *pset)
int setting_bitwise_get(struct setting *pset)
char * setting_str_get(struct setting *pset)
bool setting_bool_get(struct setting *pset)
const char * setting_bitwise_secfile_str(secfile_data_t data, int bit)
int read_enum_value(const struct setting *pset)
#define settings_iterate(_level, _pset)
#define settings_iterate_end
const char * sex_rule_name(sex_t kind)
bool make_dir(const char *pathname, int mode)
struct specialist * specialist_by_number(const Specialist_type_id id)
#define specialist_type_iterate_end
#define specialist_type_iterate(sp)
const char * strvec_get(const struct strvec *psv, size_t svindex)
size_t strvec_size(const struct strvec *psv)
bool actor_consuming_always
char ui_name[MAX_LEN_NAME]
enum action_target_kind target_kind
struct civ_game::@32::@36::@42 ruledit
struct rgbcolor_list * plr_colors
const char ** allowed_govs
struct rgbcolor * plr_bg_color
struct packet_ruleset_control control
int global_init_techs[MAX_NUM_TECH_LIST]
struct packet_game_info info
int autoupgrade_veteran_loss
int incite_improvement_factor
struct section_file * luadata
int global_init_buildings[MAX_NUM_BUILDING_LIST]
struct trait_limits default_traits[TRAIT_COUNT]
const char ** allowed_terrains
char * ruleset_description
const char ** allowed_styles
struct civ_game::@31 rgame
size_t embedded_nations_count
char * ruleset_capabilities
struct civ_game::@32::@36 server
struct veteran_system * veteran
struct packet_calendar_info calendar
struct government * default_government
struct government * government_during_revolution
struct civ_map::@44::@46 server
struct requirement_vector receiver_reqs
struct requirement_vector giver_reqs
struct requirement_vector either_reqs
struct section_file * sfile
char positive_year_label[MAX_LEN_NAME]
char negative_year_label[MAX_LEN_NAME]
char calendar_fragment_name[MAX_CALENDAR_FRAGMENTS][MAX_LEN_NAME]
bool tech_steal_allow_holes
int illness_trade_infection
enum gameloss_style gameloss_style
int citizen_partisans_pct
enum goods_selection_method goods_selection
enum gold_upkeep_style gold_upkeep_style
int low_firepower_pearl_harbor
bool damage_reduces_bombard_rate
int nuke_defender_survival_chance_pct
enum tech_upkeep_style tech_upkeep_style
bool tech_trade_loss_allow_holes
int granary_food_ini[MAX_GRANARY_INIS]
enum free_tech_method free_tech_method
bool steal_maps_reveals_all_cities
bool homeless_gold_upkeep
bool only_real_fight_makes_veteran
int citizen_convert_speed
int illness_pollution_factor
enum tech_leakage_style tech_leakage
bool reveal_trade_partner
bool airlift_from_always_enabled
bool only_killing_makes_veteran
bool poison_empties_food_stock
bool tech_loss_allow_holes
bv_actions diplchance_initial_odds
bool tech_trade_allow_holes
int low_firepower_nonnat_bombard
bool tech_parasite_allow_holes
int low_firepower_combat_bonus
int culture_migration_pml
int border_city_permanent_radius_sq
int low_firepower_badwallattacker
bool airlift_to_always_enabled
enum wonder_visib_type small_wonder_visibility
enum tech_cost_style tech_cost_style
bool combat_odds_scaled_veterancy
bool unit_builders_nationality
int border_city_radius_sq
int min_city_center_output[O_LAST]
char preferred_soundset[MAX_LEN_NAME]
char version[MAX_LEN_NAME]
char preferred_tileset[MAX_LEN_NAME]
char alt_dir[MAX_LEN_NAME]
char preferred_musicset[MAX_LEN_NAME]
struct requirement_vector reqs
char graphic_alt[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
struct name_translation name
struct name_translation abbreviation
enum trade_route_bonus_type bonus_type
enum trade_route_illegal_cancelling cancelling
const char * style_rule_name(const struct nation_style *pstyle)
#define music_styles_iterate(_p)
#define music_styles_iterate_end
#define styles_re_active_iterate_end
#define styles_re_active_iterate(_p)
int fc_snprintf(char *str, size_t n, const char *format,...)
int fc_strcasecmp(const char *str0, const char *str1)
FILE * fc_fopen(const char *filename, const char *opentype)
struct team_slot * team_slot_by_number(int team_id)
const char * team_slot_rule_name(const struct team_slot *tslot)
struct advance * advance_by_number(const Tech_type_id atype)
const char * tech_flag_id_name_cb(enum tech_flag_id flag)
const char * tech_class_rule_name(const struct tech_class *ptclass)
bool advance_has_flag(Tech_type_id tech, enum tech_flag_id flag)
const char * advance_rule_name(const struct advance *padvance)
Tech_type_id advance_index(const struct advance *padvance)
const char * tech_flag_helptxt(enum tech_flag_id id)
#define advance_re_active_iterate(_p)
#define tech_class_iterate_end
#define MAX_NUM_USER_TECH_FLAGS
#define advance_re_active_iterate_end
#define tech_class_iterate(_p)
const char * terrain_flag_id_name_cb(enum terrain_flag_id flag)
const char * terrain_rule_name(const struct terrain *pterrain)
const char * terrain_flag_helptxt(enum terrain_flag_id id)
#define terrain_type_iterate(_p)
#define terrain_type_iterate_end
#define terrain_has_flag(terr, flag)
#define MAX_NUM_USER_TER_FLAGS
#define terrain_resources_iterate_end
#define terrain_resources_iterate(pterrain, _res, _freq)
#define RESOURCE_FREQUENCY_DEFAULT
bool goods_has_flag(const struct goods_type *pgood, enum goods_flag_id flag)
const char * trade_route_type_name(enum trade_route_type type)
struct trade_route_settings * trade_route_settings_by_type(enum trade_route_type type)
const char * trade_route_cancelling_type_name(enum trade_route_illegal_cancelling type)
#define goods_type_re_active_iterate_end
#define goods_type_re_active_iterate(_p)
#define TRAIT_DEFAULT_VALUE
const char * unit_class_flag_helptxt(enum unit_class_flag_id id)
bool utype_has_role(const struct unit_type *punittype, int role)
const char * utype_rule_name(const struct unit_type *punittype)
const char * uclass_rule_name(const struct unit_class *pclass)
const char * unit_class_flag_id_name_cb(enum unit_class_flag_id flag)
const char * unit_type_flag_id_name_cb(enum unit_type_flag_id flag)
const char * unit_type_flag_helptxt(enum unit_type_flag_id id)
static bool uclass_has_flag(const struct unit_class *punitclass, enum unit_class_flag_id flag)
#define unit_type_re_active_iterate(_p)
#define combat_bonus_list_iterate_end
#define combat_bonus_list_iterate(bonuslist, pbonus)
#define unit_class_iterate(_p)
#define unit_class_re_active_iterate_end
#define MAX_NUM_USER_UNIT_FLAGS
static bool utype_has_flag(const struct unit_type *punittype, int flag)
#define UTYF_LAST_USER_FLAG
#define unit_class_re_active_iterate(_p)
#define uclass_index(_c_)
#define unit_class_iterate_end
#define MAX_NUM_USER_UCLASS_FLAGS
#define unit_type_re_active_iterate_end
const char * freeciv_datafile_version(void)