58#define FORMAT_VERSION RSFORMAT_CURRENT
89 int default_value,
const char *path,
92 if (value != default_value) {
93 if (
entry !=
nullptr) {
95 "%s.%s", path,
entry);
109 bool default_value,
const char *path,
112 if ((value && !default_value)
113 || (!value && default_value)) {
114 if (
entry !=
nullptr) {
116 "%s.%s", path,
entry);
143 "%s.rule_name", path);
154 const char *path,
const char *
entry)
162 if (!
preq->present) {
165 if (
preq->survives) {
177 "%s.%s%d.type", path,
entry,
i);
180 "%s.%s%d.name", path,
entry,
i);
183 "%s.%s%d.range", path,
entry,
i);
188 "%s.%s%d.survives", path,
entry,
i);
194 "%s.%s%d.present", path,
entry,
i);
200 "%s.%s%d.quiet", path,
entry,
i);
213 const char *path,
const char *
entry)
226 "%s.%s", path,
entry);
237 const char *path,
const char *
entry)
243 "%s.%s", path,
entry);
255 const char *path,
const char *
entry)
257 if (
save ==
nullptr) {
263 "%s.%s", path,
entry);
274 const char *path,
const char *
entry)
286 const char *path,
const char *
entry)
299 "%s.%s", path,
entry);
310 const char *path,
const char *
entry)
323 "%s.%s", path,
entry);
334 const char *path,
const char *
entry,
350 "%s.%s", path,
entry);
361 const char *path,
const char *
entry)
396 if (sfile ==
nullptr) {
416 "control.building_flags%d.helptxt",
i);
424 if (!
pb->ruledit_disabled) {
443 if (
strcmp(
pb->graphic_alt2,
"-")) {
449 if (
strcmp(
pb->soundtag_alt,
"-")) {
452 if (
strcmp(
pb->soundtag_alt2,
"-")) {
491 if (sfile ==
nullptr) {
520 "%s.citizens_graphic", path);
573 log_error(
"Can't handle action auto performer requirement %s",
661 "missing_unit_upkeep.%s_protected",
item);
663 "missing_unit_upkeep.%s_unit_act",
item);
678 if (sfile ==
nullptr) {
691 ?
"super_specialist_%d" :
"specialist_%d",
sect_idx++);
697 "%s.short_name", path);
713 "parameters.celebrate_size_limit");
717 "parameters.add_to_size_limit");
721 "parameters.angry_citizens");
725 "parameters.changable_tax");
729 "parameters.forced_science");
733 "parameters.forced_luxury");
737 "parameters.forced_gold");
741 "parameters.vision_reveal_tiles");
745 "parameters.pop_report_zeroes");
750 "citizen.nationality",
nullptr);
753 "citizen.ubuilder_nationality",
nullptr);
756 "citizen.convert_speed",
nullptr);
759 "citizen.conquest_convert_pct");
764 "citizen.partisans_pct");
771 "missing_unit_upkeep.food_wipe");
778 "missing_unit_upkeep.gold_wipe");
785 "missing_unit_upkeep.shield_wipe");
807 if (
peffect->rulesave.do_not_save) {
821 if (
peffect->rulesave.comment !=
nullptr) {
839 if (sfile ==
nullptr) {
860 "%s.ai_valued_as", path);
990 "Forbid \"%s\" if any one of the listed actions are legal.",
1011 log_error(
"Didn't save all %s blocking actions.",
1076 log_error(
"Didn't save all of %s.", path);
1094 if (sfile ==
nullptr) {
1116 "auto_attack",
"if_attacker");
1119 "auto_attack.attack_actions");
1124 "actions.diplchance_initial_odds")) {
1131 log_error(
"Didn't save all post success forced actions.");
1138 log_error(
"Didn't save all post success forced actions.");
1144 log_error(
"Didn't save all post success forced actions.");
1150 log_error(
"Didn't save all post success forced actions.");
1155 "actions.escape_city")) {
1156 log_error(
"Didn't save all escape city forced actions.");
1161 "actions.unit_stack_death")) {
1162 log_error(
"Didn't save all escape unit stack death forced actions.");
1168 "actions.poison_empties_food_stock",
nullptr);
1172 "actions.steal_maps_reveals_all_cities",
nullptr);
1194 "actions.quiet_actions") !=
i) {
1195 log_error(
"Didn't save all quiet actions.");
1229 "%s.ui_name", path);
1240 if (
pae->rulesave.ruledit_disabled) {
1252 if (
pae->rulesave.comment !=
nullptr) {
1269 enum gameloss_style
gs;
1278 if (sfile ==
nullptr) {
1284 "ruledit.description_file");
1290 "ruledit.std_tileset_compat");
1295 "tileset.preferred");
1299 "soundset.preferred");
1303 "musicset.preferred");
1324 "about.description");
1327 "about.description");
1333 "about.capabilities");
1339 "options",
"global_init_techs");
1341 "options",
"global_init_buildings");
1345 "options.popup_tech_help",
nullptr);
1348 "civstyle.base_pollution",
nullptr);
1361 "civstyle.gameloss_style");
1366 "civstyle.happy_cost",
nullptr);
1369 "civstyle.food_cost",
nullptr);
1374 "civstyle.paradrop_to_transport",
nullptr);
1377 "civstyle.base_bribe_cost",
nullptr);
1383 "civstyle.ransom_gold",
nullptr);
1386 "civstyle.pillage_select",
nullptr);
1389 "civstyle.tech_steal_allow_holes",
nullptr);
1392 "civstyle.tech_trade_allow_holes",
nullptr);
1395 "civstyle.tech_trade_loss_allow_holes",
nullptr);
1398 "civstyle.tech_parasite_allow_holes",
nullptr);
1401 "civstyle.tech_loss_allow_holes",
nullptr);
1404 "civstyle.upgrade_veteran_loss",
nullptr);
1407 "civstyle.autoupgrade_veteran_loss",
nullptr);
1413 "civstyle.granary_food_ini");
1417 "civstyle.granary_food_inc",
nullptr);
1423 "civstyle.min_city_center_%s",
1433 "civstyle.init_vis_radius_sq",
nullptr);
1436 "civstyle.init_city_radius_sq",
nullptr);
1444 "civstyle.gold_upkeep_style");
1447 1,
"civstyle.output_granularity",
nullptr);
1453 FALSE,
"civstyle.airlift_from_always_enabled",
nullptr);
1455 TRUE,
"civstyle.airlift_to_always_enabled",
nullptr);
1462 "wonder_visibility.small_wonders");
1467 "illness.illness_on",
nullptr);
1470 "illness.illness_base_factor",
nullptr);
1473 "illness.illness_min_size",
nullptr);
1476 "illness.illness_trade_infection",
nullptr);
1479 "illness.illness_pollution_factor",
nullptr);
1483 "incite_cost.base_incite_cost",
nullptr);
1486 "incite_cost.improvement_factor",
nullptr);
1489 "incite_cost.unit_factor",
nullptr);
1492 "incite_cost.total_factor",
nullptr);
1499 "combat_rules.tired_attack",
nullptr);
1505 "combat_rules.only_killing_makes_veteran",
nullptr);
1511 "combat_rules.only_real_fight_makes_veteran",
nullptr);
1517 "combat_rules.combat_odds_scaled_veterancy",
nullptr);
1523 "combat_rules.damage_reduces_bombard_rate",
nullptr);
1528 "combat_rules.low_firepower_badwallattacker",
nullptr);
1533 "combat_rules.low_firepower_pearl_harbor",
nullptr);
1538 "combat_rules.low_firepower_combat_bonus",
nullptr);
1543 "combat_rules.low_firepower_nonnat_bombard",
nullptr);
1549 "combat_rules.nuke_pop_loss_pct",
nullptr);
1556 "combat_rules.nuke_defender_survival_chance_pct",
nullptr);
1559 "borders.radius_sq_city",
nullptr);
1562 "borders.size_effect",
nullptr);
1569 "borders.radius_sq_city_permanent",
nullptr);
1573 "research.tech_cost_style");
1579 "research.base_tech_cost",
nullptr);
1585 "research.min_tech_cost",
nullptr);
1588 "research.tech_leakage");
1591 "research.tech_upkeep_style");
1594 "research.tech_upkeep_divider",
nullptr);
1597 "research.free_tech_method");
1601 "culture.victory_min_points",
nullptr);
1604 "culture.victory_lead_pct",
nullptr);
1610 "culture.migration_pml",
nullptr);
1616 "culture.history_interest_pml",
nullptr);
1622 "world_peace.victory_turns",
nullptr);
1626 "calendar.skip_year_0",
nullptr);
1629 "calendar.start_year",
nullptr);
1634 0,
"calendar.fragments",
nullptr);
1639 "calendar.fragment_name%d",
i);
1645 "calendar.positive_label");
1649 "calendar.negative_label");
1686 "%s.frequency", path);
1700 "%s.effects", path);
1724 0, path,
"culture");
1727 if (
pach->cons_msg !=
nullptr) {
1751 "%s.cancelling", path);
1758 0,
"trade.min_trade_route_val",
nullptr);
1761 FALSE,
"trade.reveal_trade_partner",
nullptr);
1765 "trade.goods_selection");
1807 if (access_unit !=
nullptr) {
1809 "aarea.access_unit");
1922 if (sfile ==
nullptr) {
1942 "control.government_flags%d.helptxt",
i);
1947 "during_revolution");
1970 if (
pg->ai.better !=
nullptr) {
1981 if (
title !=
nullptr) {
1983 "%s.ruler_male_title", path);
1987 if (
title !=
nullptr) {
1989 "%s.ruler_female_title", path);
2013 if (!pmul->ruledit_disabled) {
2031 save_strvec(sfile, pmul->helptext, path,
"helptext");
2066 || (default_traits !=
nullptr && traits[
tr].
min != default_traits[
tr].
min)) {
2071 || (default_traits !=
nullptr && traits[
tr].max != default_traits[
tr].max)) {
2101 if (
pnat->translation_domain ==
nullptr) {
2144 if (
pnat->server.rgb !=
nullptr) {
2149 sfile, path,
"trait_");
2151 if (!
pnat->is_playable) {
2157 "%s.barbarian_type", path);
2173 "%s.ruler_titles%d.government", path,
subsect_idx);
2175 "%s.ruler_titles%d.male_title", path,
subsect_idx);
2177 "%s.ruler_titles%d.female_title", path,
subsect_idx++);
2195 if (
pnat->init_government) {
2197 "%s.init_government", path);
2223 const char *
pref =
nullptr;
2237 if (
pref !=
nullptr) {
2280 if (sfile ==
nullptr) {
2301 "ruledit.embedded_nations");
2307 "default_traits",
"");
2313 "compatibility.allowed_govs");
2318 "compatibility.allowed_terrains");
2323 "compatibility.allowed_styles");
2329 "compatibility.default_government");
2345 if (
pnat ==
nullptr) {
2346 log_error(
"Embedded nation \"%s\" not found!",
2408 if (sfile ==
nullptr) {
2457 if (
pa->tclass !=
nullptr) {
2473 if (
strcmp(
"-",
pa->graphic_alt)) {
2476 if (
pa->bonus_message !=
nullptr) {
2491 if (
pa->cost >= 0) {
2514 if (sfile ==
nullptr) {
2556 "control.extra_flags%d.helptxt",
i);
2562 "parameters.ocean_reclaim_requirement");
2566 "parameters.land_channel_requirement");
2570 "parameters.thaw_requirement");
2574 "parameters.freeze_requirement");
2578 "parameters.lake_max_size");
2582 "parameters.min_start_native_area");
2586 "parameters.move_fragments");
2590 "parameters.igter_cost");
2594 "parameters.pythagorean_diagonal");
2598 "parameters.ocean_resources");
2620 identifier[0] =
pterr->identifier;
2621 identifier[1] =
'\0';
2631 if (
pterr->output[
o] != 0) {
2638 for (r = 0;
pterr->resources[r] !=
nullptr; r++) {
2655 "%s.resources", path);
2659 "%s.resource_freq", path);
2664 if (
pterr->road_output_incr_pct[
o] != 0) {
2666 "%s.road_%s_incr_pct", path,
2675 "cultivate_result");
2677 "%s.cultivate_time", path);
2682 "%s.plant_time", path);
2685 "%s.irrigation_food_incr", path);
2687 "%s.irrigation_time", path);
2690 "%s.mining_shield_incr", path);
2692 "%s.mining_time", path);
2695 "transform_result");
2697 "%s.transform_time", path);
2699 if (
pterr->animal !=
nullptr) {
2708 "%s.placing_time", path);
2710 "%s.pillage_time", path);
2718 "%s.extra_settings%d.extra",
2721 "%s.extra_settings%d.removal_time",
2727 "warmer_wetter_result");
2729 "warmer_drier_result");
2731 "cooler_wetter_result");
2733 "cooler_drier_result");
2755 "%s.property_%s", path,
2770 "%s.native_to", path);
2783 if (!
pres->ruledit_disabled) {
2793 if (
pres->data.resource->output[
o] != 0) {
2799 if (
pres->data.resource->id_old_save !=
'\0') {
2800 identifier[0] =
pres->data.resource->id_old_save;
2801 identifier[1] =
'\0';
2808 "extraui.ui_name_base_fortress");
2810 "extraui.ui_name_base_airbase");
2831 "%s.category", path);
2854 "%s.rmcauses", path);
2857 if (
strcmp(pextra->graphic_str,
"-")) {
2860 if (
strcmp(pextra->graphic_alt,
"-")) {
2863 if (
strcmp(pextra->activity_gfx,
"-")) {
2866 if (
strcmp(pextra->act_gfx_alt,
"-")) {
2869 if (
strcmp(pextra->act_gfx_alt2,
"-")) {
2872 if (
strcmp(pextra->rmact_gfx,
"-")) {
2875 if (
strcmp(pextra->rmact_gfx_alt,
"-")) {
2881 save_reqs_vector(sfile, &(pextra->appearance_reqs), path,
"appearance_reqs");
2882 save_reqs_vector(sfile, &(pextra->disappearance_reqs), path,
"disappearance_reqs");
2889 if (!pextra->generated) {
2894 if (pextra->build_time_factor != 1) {
2897 if (pextra->removal_time_factor != 1) {
2898 secfile_insert_int(sfile, pextra->removal_time_factor,
"%s.removal_time_factor", path);
2900 if (pextra->infracost != 0) {
2903 if (pextra->defense_bonus != 0) {
2908 "%s.unit_seen", path);
2929 "%s.native_to", path);
2932 if (pextra->no_aggr_near_city >= 0) {
2934 "%s.no_aggr_near_city", path);
2958 "%s.conflicts", path);
2970 "%s.hidden_by", path);
2982 "%s.bridged_over", path);
2985 save_strvec(sfile, pextra->helptext, path,
"helptext");
2993 if (!pextra->ruledit_disabled) {
3003 "%s.gui_type", path);
3005 if (
pbase->border_sq >= 0) {
3008 if (
pbase->vision_main_sq >= 0) {
3011 if (
pbase->vision_invis_sq >= 0) {
3014 if (
pbase->vision_subs_sq >= 0) {
3024 if (!pextra->ruledit_disabled) {
3040 "%s.move_mode", path);
3044 if (
proad->tile_incr_const[
o] != 0) {
3048 if (
proad->tile_incr[
o] != 0) {
3052 if (
proad->tile_bonus[
o] != 0) {
3058 switch (
proad->compat) {
3074 "%s.gui_type", path);
3138 "%s.veteran_names", path);
3140 "%s.veteran_power_fact", path);
3142 "%s.veteran_base_raise_chance", path);
3144 "%s.veteran_work_raise_chance", path);
3146 "%s.veteran_move_bonus", path);
3171 "%s.bonuses%d.flag", path,
i);
3173 "%s.bonuses%d.type", path,
i);
3175 "%s.bonuses%d.value", path,
i);
3179 "%s.bonuses%d.quiet", path,
i);
3199 if (sfile ==
nullptr) {
3241 "control.class_flags%d.helptxt",
i);
3261 "%s.min_speed", path);
3263 if (
puc->non_native_def_pct != 100) {
3265 "%s.non_native_def_pct", path);
3288 if (!
put->ruledit_disabled) {
3303 if (
put->obsoleted_by !=
nullptr) {
3305 "%s.obsolete_by", path);
3324 if (
strcmp(
"-",
put->sound_fight_alt)) {
3332 "%s.specialist", path);
3346 "%s.vision_layer", path);
3355 if (
put->upkeep[
o] != 0) {
3361 if (
put->converted_to !=
nullptr) {
3363 "%s.convert_to", path);
3365 if (
put->convert_time != 1) {
3372 if (
put->veteran !=
nullptr) {
3376 if (
put->paratroopers_range != 0) {
3378 "%s.paratroopers_range", path);
3380 if (
put->bombard_rate != 0) {
3382 "%s.bombard_rate", path);
3384 if (
put->city_slots != 0) {
3386 "%s.city_slots", path);
3388 if (
put->city_size != 1) {
3390 "%s.city_size", path);
3394 "%s.tp_defense", path);
3433 if (buffer !=
nullptr) {
3438 if (
ffile !=
nullptr) {
3476 fc_snprintf(filename,
sizeof(filename),
"%s/buildings.ruleset", path);
3481 fc_snprintf(filename,
sizeof(filename),
"%s/styles.ruleset", path);
3486 fc_snprintf(filename,
sizeof(filename),
"%s/cities.ruleset", path);
3491 fc_snprintf(filename,
sizeof(filename),
"%s/effects.ruleset", path);
3496 fc_snprintf(filename,
sizeof(filename),
"%s/game.ruleset", path);
3501 fc_snprintf(filename,
sizeof(filename),
"%s/governments.ruleset", path);
3506 fc_snprintf(filename,
sizeof(filename),
"%s/nations.ruleset", path);
3511 fc_snprintf(filename,
sizeof(filename),
"%s/techs.ruleset", path);
3516 fc_snprintf(filename,
sizeof(filename),
"%s/terrain.ruleset", path);
3521 fc_snprintf(filename,
sizeof(filename),
"%s/units.ruleset", path);
3526 fc_snprintf(filename,
sizeof(filename),
"%s/actions.ruleset",path);
3531 fc_snprintf(filename,
sizeof(filename),
"%s/script.lua", path);
3536 fc_snprintf(filename,
sizeof(filename),
"%s/parser.lua", path);
3541 fc_snprintf(filename,
sizeof(filename),
"%s/luadata.txt", path);
3547 log_error(
_(
"Failed to create directory %s"), path);
const struct unit_type * access_info_access_unit(void)
#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 * gov_flag_id_name_cb(enum gov_flag_id flag)
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 * gov_flag_helptxt(enum gov_flag_id id)
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
#define MAX_NUM_USER_GOVERNMENT_FLAGS
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)
bool is_super_specialist_id(Specialist_type_id sp)
Specialist_type_id specialist_index(const struct specialist *sp)
const char * specialist_rule_name(const struct specialist *sp)
#define specialist_type_iterate_end
#define specialist_type_iterate(sp)
#define DEFAULT_SPECIALIST
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 calendar_fragment_name[MAX_CALENDAR_FRAGMENTS][MAX_LEN_NAME]
char negative_year_label[MAX_LEN_NAME]
char positive_year_label[MAX_LEN_NAME]
bool tech_steal_allow_holes
int illness_trade_infection
enum gameloss_style gameloss_style
int citizen_partisans_pct
int granary_food_ini[MAX_GRANARY_INIS]
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
enum free_tech_method free_tech_method
bool steal_maps_reveals_all_cities
bool only_real_fight_makes_veteran
int citizen_convert_speed
int illness_pollution_factor
enum tech_leakage_style tech_leakage
bool reveal_trade_partner
int min_city_center_output[O_LAST]
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
char alt_dir[MAX_LEN_NAME]
char version[MAX_LEN_NAME]
char preferred_musicset[MAX_LEN_NAME]
char preferred_tileset[MAX_LEN_NAME]
char preferred_soundset[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
#define tiledef_iterate_end
#define tiledef_iterate(_p)
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)