55#define FORMAT_VERSION RSFORMAT_3_2
86 int default_value,
const char *path,
89 if (value != default_value) {
92 "%s.%s", path,
entry);
106 bool default_value,
const char *path,
109 if ((value && !default_value)
110 || (!value && default_value)) {
113 "%s.%s", path,
entry);
140 "%s.rule_name", path);
151 const char *path,
const char *
entry)
159 if (!
preq->present) {
162 if (
preq->survives) {
174 "%s.%s%d.type", path,
entry,
i);
177 "%s.%s%d.name", path,
entry,
i);
180 "%s.%s%d.range", path,
entry,
i);
185 "%s.%s%d.survives", path,
entry,
i);
191 "%s.%s%d.present", path,
entry,
i);
197 "%s.%s%d.quiet", path,
entry,
i);
210 const char *path,
const char *
entry)
223 "%s.%s", path,
entry);
234 const char *path,
const char *
entry)
240 "%s.%s", path,
entry);
252 const char *path,
const char *
entry)
260 "%s.%s", path,
entry);
271 const char *path,
const char *
entry)
283 const char *path,
const char *
entry)
296 "%s.%s", path,
entry);
307 const char *path,
const char *
entry)
320 "%s.%s", path,
entry);
331 const char *path,
const char *
entry,
347 "%s.%s", path,
entry);
358 const char *path,
const char *
entry)
413 "control.building_flags%d.helptxt",
i);
421 if (!
pb->ruledit_disabled) {
440 if (
strcmp(
pb->graphic_alt2,
"-")) {
446 if (
strcmp(
pb->soundtag_alt,
"-")) {
449 if (
strcmp(
pb->soundtag_alt2,
"-")) {
517 "%s.citizens_graphic", path);
570 log_error(
"Can't handle action auto performer requirement %s",
658 "missing_unit_upkeep.%s_protected",
item);
660 "missing_unit_upkeep.%s_unit_act",
item);
692 "%s.short_name", path);
708 "parameters.celebrate_size_limit");
712 "parameters.add_to_size_limit");
716 "parameters.angry_citizens");
720 "parameters.changable_tax");
724 "parameters.forced_science");
728 "parameters.forced_luxury");
732 "parameters.forced_gold");
736 "parameters.vision_reveal_tiles");
740 "parameters.pop_report_zeroes");
745 "citizen.nationality",
NULL);
748 "citizen.ubuilder_nationality",
NULL);
751 "citizen.convert_speed",
NULL);
754 "citizen.conquest_convert_pct");
759 "citizen.partisans_pct");
766 "missing_unit_upkeep.food_wipe");
773 "missing_unit_upkeep.gold_wipe");
780 "missing_unit_upkeep.shield_wipe");
802 if (
peffect->rulesave.do_not_save) {
855 "%s.ai_valued_as", path);
876 if (ui_name ==
NULL) {
1007 "Forbid \"%s\" if any one of the listed actions are legal.",
1028 log_error(
"Didn't save all %s blocking actions.",
1093 log_error(
"Didn't save all of %s.", path);
1111 if (sfile ==
NULL) {
1133 "auto_attack",
"if_attacker");
1136 "auto_attack.attack_actions");
1141 "actions.diplchance_initial_odds")) {
1148 log_error(
"Didn't save all post success forced actions.");
1154 log_error(
"Didn't save all post success forced actions.");
1160 log_error(
"Didn't save all post success forced actions.");
1165 "actions.escape_city")) {
1166 log_error(
"Didn't save all escape city forced actions.");
1171 "actions.unit_stack_death")) {
1172 log_error(
"Didn't save all escape unit stack death forced actions.");
1178 "actions.poison_empties_food_stock",
NULL);
1182 "actions.steal_maps_reveals_all_cities",
NULL);
1208 "actions.quiet_actions") !=
i) {
1209 log_error(
"Didn't save all quiet actions.");
1219 if (
pae->ruledit_disabled) {
1244 enum gameloss_style
gs;
1253 if (sfile ==
NULL) {
1259 "ruledit.description_file");
1264 "tileset.preferred");
1268 "soundset.preferred");
1272 "musicset.preferred");
1293 "about.description");
1296 "about.description");
1302 "about.capabilities");
1308 "options",
"global_init_techs");
1310 "options",
"global_init_buildings");
1314 "options.popup_tech_help",
NULL);
1317 "civstyle.base_pollution",
NULL);
1330 "civstyle.gameloss_style");
1335 "civstyle.happy_cost",
NULL);
1338 "civstyle.food_cost",
NULL);
1341 "civstyle.civil_war_enabled",
NULL);
1344 "civstyle.civil_war_bonus_celebrating",
NULL);
1347 "civstyle.civil_war_bonus_unhappy",
NULL);
1352 "civstyle.paradrop_to_transport",
NULL);
1355 "civstyle.base_bribe_cost",
NULL);
1361 "civstyle.ransom_gold",
NULL);
1364 "civstyle.pillage_select",
NULL);
1367 "civstyle.tech_steal_allow_holes",
NULL);
1370 "civstyle.tech_trade_allow_holes",
NULL);
1373 "civstyle.tech_trade_loss_allow_holes",
NULL);
1376 "civstyle.tech_parasite_allow_holes",
NULL);
1379 "civstyle.tech_loss_allow_holes",
NULL);
1382 "civstyle.upgrade_veteran_loss",
NULL);
1385 "civstyle.autoupgrade_veteran_loss",
NULL);
1391 "civstyle.granary_food_ini");
1395 "civstyle.granary_food_inc",
NULL);
1401 "civstyle.min_city_center_%s",
1411 "civstyle.init_vis_radius_sq",
NULL);
1414 "civstyle.init_city_radius_sq",
NULL);
1422 "civstyle.gold_upkeep_style");
1428 "civstyle.homeless_gold_upkeep",
NULL);
1430 1,
"civstyle.output_granularity",
NULL);
1436 FALSE,
"civstyle.airlift_from_always_enabled",
NULL);
1438 TRUE,
"civstyle.airlift_to_always_enabled",
NULL);
1445 "wonder_visibility.small_wonders");
1450 "illness.illness_on",
NULL);
1453 "illness.illness_base_factor",
NULL);
1456 "illness.illness_min_size",
NULL);
1459 "illness.illness_trade_infection",
NULL);
1462 "illness.illness_pollution_factor",
NULL);
1466 "incite_cost.base_incite_cost",
NULL);
1469 "incite_cost.improvement_factor",
NULL);
1472 "incite_cost.unit_factor",
NULL);
1475 "incite_cost.total_factor",
NULL);
1482 "combat_rules.tired_attack",
NULL);
1488 "combat_rules.only_killing_makes_veteran",
NULL);
1494 "combat_rules.only_real_fight_makes_veteran",
NULL);
1500 "combat_rules.combat_odds_scaled_veterancy",
NULL);
1506 "combat_rules.damage_reduces_bombard_rate",
NULL);
1511 "combat_rules.low_firepower_badwallattacker",
NULL);
1516 "combat_rules.low_firepower_pearl_harbour",
NULL);
1521 "combat_rules.low_firepower_combat_bonus",
NULL);
1526 "combat_rules.low_firepower_nonnat_bombard",
NULL);
1532 "combat_rules.nuke_pop_loss_pct",
NULL);
1539 "combat_rules.nuke_defender_survival_chance_pct",
NULL);
1542 "borders.radius_sq_city",
NULL);
1545 "borders.size_effect",
NULL);
1552 "borders.radius_sq_city_permanent",
NULL);
1556 "research.tech_cost_style");
1562 "research.base_tech_cost",
NULL);
1568 "research.min_tech_cost",
NULL);
1571 "research.tech_leakage");
1574 "research.tech_upkeep_style");
1577 "research.tech_upkeep_divider",
NULL);
1580 "research.free_tech_method");
1584 "culture.victory_min_points",
NULL);
1587 "culture.victory_lead_pct",
NULL);
1593 "culture.migration_pml",
NULL);
1599 "culture.history_interest_pml",
NULL);
1603 "calendar.skip_year_0",
NULL);
1606 "calendar.start_year",
NULL);
1611 0,
"calendar.fragments",
NULL);
1616 "calendar.fragment_name%d",
i);
1622 "calendar.positive_label");
1626 "calendar.negative_label");
1663 "%s.frequency", path);
1677 "%s.effects", path);
1701 0, path,
"culture");
1728 "%s.cancelling", path);
1735 0,
"trade.min_trade_route_val",
NULL);
1738 FALSE,
"trade.reveal_trade_partner",
NULL);
1742 "trade.goods_selection");
1885 if (sfile ==
NULL) {
1890 "during_revolution");
1910 if (
pg->ai.better !=
NULL) {
1923 "%s.ruler_male_title", path);
1929 "%s.ruler_female_title", path);
1941 if (!pmul->ruledit_disabled) {
1959 save_strvec(sfile, pmul->helptext, path,
"helptext");
1994 || (default_traits !=
NULL && traits[
tr].
min != default_traits[
tr].
min)) {
1999 || (default_traits !=
NULL && traits[
tr].max != default_traits[
tr].max)) {
2029 if (
pnat->translation_domain ==
NULL) {
2077 sfile, path,
"trait_");
2079 if (!
pnat->is_playable) {
2085 "%s.barbarian_type", path);
2101 "%s.ruler_titles%d.government", path,
subsect_idx);
2103 "%s.ruler_titles%d.male_title", path,
subsect_idx);
2105 "%s.ruler_titles%d.female_title", path,
subsect_idx++);
2123 if (
pnat->init_government) {
2125 "%s.init_government", path);
2208 if (sfile ==
NULL) {
2229 "ruledit.embedded_nations");
2235 "default_traits",
"");
2241 "compatibility.allowed_govs");
2246 "compatibility.allowed_terrains");
2251 "compatibility.allowed_styles");
2257 "compatibility.default_government");
2274 log_error(
"Embedded nation \"%s\" not found!",
2336 if (sfile ==
NULL) {
2385 if (
pa->tclass !=
NULL) {
2401 if (
strcmp(
"-",
pa->graphic_alt)) {
2404 if (
pa->bonus_message !=
NULL) {
2419 if (
pa->cost >= 0) {
2442 if (sfile ==
NULL) {
2484 "control.extra_flags%d.helptxt",
i);
2490 "parameters.ocean_reclaim_requirement");
2494 "parameters.land_channel_requirement");
2498 "parameters.thaw_requirement");
2502 "parameters.freeze_requirement");
2506 "parameters.lake_max_size");
2510 "parameters.min_start_native_area");
2514 "parameters.move_fragments");
2518 "parameters.igter_cost");
2522 "parameters.pythagorean_diagonal");
2526 "parameters.ocean_resources");
2548 identifier[0] =
pterr->identifier;
2549 identifier[1] =
'\0';
2559 if (
pterr->output[
o] != 0) {
2566 for (r = 0;
pterr->resources[r] !=
NULL; r++) {
2583 "%s.resources", path);
2587 "%s.resource_freq", path);
2592 if (
pterr->road_output_incr_pct[
o] != 0) {
2594 "%s.road_%s_incr_pct", path,
2603 "cultivate_result");
2605 "%s.cultivate_time", path);
2610 "%s.plant_time", path);
2613 "%s.irrigation_food_incr", path);
2615 "%s.irrigation_time", path);
2618 "%s.mining_shield_incr", path);
2620 "%s.mining_time", path);
2623 "transform_result");
2625 "%s.transform_time", path);
2636 "%s.placing_time", path);
2638 "%s.pillage_time", path);
2646 "%s.extra_settings%d.extra",
2649 "%s.extra_settings%d.removal_time",
2655 "warmer_wetter_result");
2657 "warmer_drier_result");
2659 "cooler_wetter_result");
2661 "cooler_drier_result");
2683 "%s.property_%s", path,
2698 "%s.native_to", path);
2711 if (!
pres->ruledit_disabled) {
2721 if (
pres->data.resource->output[
o] != 0) {
2727 if (
pres->data.resource->id_old_save !=
'\0') {
2728 identifier[0] =
pres->data.resource->id_old_save;
2729 identifier[1] =
'\0';
2736 "extraui.ui_name_base_fortress");
2738 "extraui.ui_name_base_airbase");
2759 "%s.category", path);
2782 "%s.rmcauses", path);
2785 if (
strcmp(pextra->graphic_str,
"-")) {
2788 if (
strcmp(pextra->graphic_alt,
"-")) {
2791 if (
strcmp(pextra->activity_gfx,
"-")) {
2794 if (
strcmp(pextra->act_gfx_alt,
"-")) {
2797 if (
strcmp(pextra->act_gfx_alt2,
"-")) {
2800 if (
strcmp(pextra->rmact_gfx,
"-")) {
2803 if (
strcmp(pextra->rmact_gfx_alt,
"-")) {
2809 save_reqs_vector(sfile, &(pextra->appearance_reqs), path,
"appearance_reqs");
2810 save_reqs_vector(sfile, &(pextra->disappearance_reqs), path,
"disappearance_reqs");
2817 if (!pextra->generated) {
2822 if (pextra->build_time_factor != 1) {
2825 if (pextra->removal_time_factor != 1) {
2826 secfile_insert_int(sfile, pextra->removal_time_factor,
"%s.removal_time_factor", path);
2828 if (pextra->infracost != 0) {
2831 if (pextra->defense_bonus != 0) {
2836 "%s.unit_seen", path);
2857 "%s.native_to", path);
2860 if (pextra->no_aggr_near_city >= 0) {
2862 "%s.no_aggr_near_city", path);
2886 "%s.conflicts", path);
2898 "%s.hidden_by", path);
2910 "%s.bridged_over", path);
2913 save_strvec(sfile, pextra->helptext, path,
"helptext");
2921 if (!pextra->ruledit_disabled) {
2931 "%s.gui_type", path);
2933 if (
pbase->border_sq >= 0) {
2936 if (
pbase->vision_main_sq >= 0) {
2939 if (
pbase->vision_invis_sq >= 0) {
2942 if (
pbase->vision_subs_sq >= 0) {
2952 if (!pextra->ruledit_disabled) {
2968 "%s.move_mode", path);
2972 if (
proad->tile_incr_const[
o] != 0) {
2976 if (
proad->tile_incr[
o] != 0) {
2980 if (
proad->tile_bonus[
o] != 0) {
2986 switch (
proad->compat) {
3002 "%s.gui_type", path);
3043 "%s.veteran_names", path);
3045 "%s.veteran_power_fact", path);
3047 "%s.veteran_base_raise_chance", path);
3049 "%s.veteran_work_raise_chance", path);
3051 "%s.veteran_move_bonus", path);
3076 "%s.bonuses%d.flag", path,
i);
3078 "%s.bonuses%d.type", path,
i);
3080 "%s.bonuses%d.value", path,
i);
3084 "%s.bonuses%d.quiet", path,
i);
3104 if (sfile ==
NULL) {
3146 "control.class_flags%d.helptxt",
i);
3166 "%s.min_speed", path);
3168 if (
puc->non_native_def_pct != 100) {
3170 "%s.non_native_def_pct", path);
3193 if (!
put->ruledit_disabled) {
3208 if (
put->obsoleted_by !=
NULL) {
3210 "%s.obsolete_by", path);
3229 if (
strcmp(
"-",
put->sound_fight_alt)) {
3247 "%s.vision_layer", path);
3256 if (
put->upkeep[
o] != 0) {
3262 if (
put->converted_to !=
NULL) {
3264 "%s.convert_to", path);
3266 if (
put->convert_time != 1) {
3277 if (
put->paratroopers_range != 0) {
3279 "%s.paratroopers_range", path);
3281 if (
put->bombard_rate != 0) {
3283 "%s.bombard_rate", path);
3285 if (
put->city_slots != 0) {
3287 "%s.city_slots", path);
3289 if (
put->city_size != 1) {
3291 "%s.city_size", path);
3295 "%s.tp_defense", path);
3334 if (buffer !=
NULL) {
3377 fc_snprintf(filename,
sizeof(filename),
"%s/buildings.ruleset", path);
3382 fc_snprintf(filename,
sizeof(filename),
"%s/styles.ruleset", path);
3387 fc_snprintf(filename,
sizeof(filename),
"%s/cities.ruleset", path);
3392 fc_snprintf(filename,
sizeof(filename),
"%s/effects.ruleset", path);
3397 fc_snprintf(filename,
sizeof(filename),
"%s/game.ruleset", path);
3402 fc_snprintf(filename,
sizeof(filename),
"%s/governments.ruleset", path);
3407 fc_snprintf(filename,
sizeof(filename),
"%s/nations.ruleset", path);
3412 fc_snprintf(filename,
sizeof(filename),
"%s/techs.ruleset", path);
3417 fc_snprintf(filename,
sizeof(filename),
"%s/terrain.ruleset", path);
3422 fc_snprintf(filename,
sizeof(filename),
"%s/units.ruleset", path);
3427 fc_snprintf(filename,
sizeof(filename),
"%s/actions.ruleset",path);
3432 fc_snprintf(filename,
sizeof(filename),
"%s/script.lua", path);
3437 fc_snprintf(filename,
sizeof(filename),
"%s/parser.lua", path);
3442 fc_snprintf(filename,
sizeof(filename),
"%s/luadata.txt", path);
3448 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)
const char * action_ui_name_ruleset_var_name(int act)
#define action_enablers_iterate_end
#define enabler_get_action(_enabler_)
#define ACTION_AUTO_MOVED_ADJ
#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_AUTO_POST_BRIBE
#define action_iterate_end
#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_CIVIL_WAR_UNHAPPY
#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_CIVIL_WAR_CELEB
#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)
const char * entry_name(const struct entry *pentry)
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)
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)
static bool save_action_ui_name(struct section_file *sfile, int act, const char *entry_name)
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_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
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)
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 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
struct civ_game::@31::@35::@40 ruledit
char * ruleset_description
const char ** allowed_styles
struct civ_game::@31::@35 server
size_t embedded_nations_count
char * ruleset_capabilities
struct civ_game::@30 rgame
struct veteran_system * veteran
struct packet_calendar_info calendar
struct government * default_government
struct government * government_during_revolution
struct civ_map::@42::@44 server
struct requirement_vector receiver_reqs
struct requirement_vector giver_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
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 low_firepower_pearl_harbour
int citizen_convert_speed
int illness_pollution_factor
enum tech_leakage_style tech_leakage
bool reveal_trade_partner
bool airlift_from_always_enabled
int civil_war_bonus_unhappy
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 civil_war_bonus_celebrating
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)