84#define RULES_SUFFIX "ruleset"
85#define SCRIPT_SUFFIX "lua"
87#define ADVANCE_SECTION_PREFIX "advance_"
88#define TECH_CLASS_SECTION_PREFIX "techclass_"
89#define BUILDING_SECTION_PREFIX "building_"
90#define CITYSTYLE_SECTION_PREFIX "citystyle_"
91#define MUSICSTYLE_SECTION_PREFIX "musicstyle_"
92#define UEFF_SECTION_PREFIX "ueff_"
93#define EFFECT_SECTION_PREFIX "effect_"
94#define GOVERNMENT_SECTION_PREFIX "government_"
95#define NATION_SET_SECTION_PREFIX "nset"
96#define NATION_GROUP_SECTION_PREFIX "ngroup"
97#define NATION_SECTION_PREFIX "nation"
98#define STYLE_SECTION_PREFIX "style_"
99#define CLAUSE_SECTION_PREFIX "clause_"
100#define EXTRA_SECTION_PREFIX "extra_"
101#define BASE_SECTION_PREFIX "base_"
102#define ROAD_SECTION_PREFIX "road_"
103#define RESOURCE_SECTION_PREFIX "resource_"
104#define GOODS_SECTION_PREFIX "goods_"
105#define SPECIALIST_SECTION_PREFIX "specialist_"
106#define TERRAIN_SECTION_PREFIX "terrain_"
107#define UNIT_CLASS_SECTION_PREFIX "unitclass_"
108#define UNIT_SECTION_PREFIX "unit_"
109#define DISASTER_SECTION_PREFIX "disaster_"
110#define ACHIEVEMENT_SECTION_PREFIX "achievement_"
111#define ENABLER_SECTION_PREFIX "enabler_"
112#define ACTION_ENABLER_SECTION_PREFIX "actionenabler_"
113#define ACTION_SECTION_PREFIX "action_"
114#define MULTIPLIER_SECTION_PREFIX "multiplier_"
115#define COUNTER_SECTION_PREFIX "counter_"
117#define check_name(name) (check_strlen(name, MAX_LEN_NAME, NULL))
118#define check_cityname(name) (check_strlen(name, MAX_LEN_CITYNAME, NULL))
122#define MAX_SECTION_LABEL 64
123#define section_strlcpy(dst, src) \
124 (void) loud_strlcpy(dst, src, MAX_SECTION_LABEL, name_too_long)
161 const char **allowed_terrains,
218 const char *file,
const char *
function,
220 const char *format, ...)
230 if (logger !=
NULL) {
264 ae->rulesave.ruledit_disabled =
TRUE;
268 log_normal(
"Purged all action enablers for %s",
275 if (!
ae->rulesave.ruledit_disabled
278 ae->rulesave.ruledit_disabled =
TRUE;
280 log_normal(
"Purged unused action enabler for %s",
295 enum effect_type
type;
301 eft->rulesave.do_not_save =
TRUE;
343 if (
problem->num_suggested_solutions == 0) {
349 if (
problem->num_suggested_solutions == 1
383 if (
problem->num_suggested_solutions == 0) {
389 if (
problem->num_suggested_solutions == 2
393 &
problem->suggested_solutions[1].req)) {
436 "Purged redundant requirement in"
437 " %s in action enabler for %s",
440 "Purged redundant requirement in"
441 " %s in action enabler for %s",
447 while (!
ae->rulesave.ruledit_disabled
466 enum effect_type
type;
474 "Purged redundant requirement in effect of type %s",
530 log_verbose(
"Trying \"%s\": default ruleset directory.", filename);
536 fc_snprintf(filename,
sizeof(filename),
"%s_%s.%s",
538 log_verbose(
"Trying \"%s\": alternative ruleset filename syntax.",
546 _(
"Could not find a readable \"%s.%s\" ruleset file."),
590 if (secfile ==
NULL) {
611 if (buffer ==
NULL) {
644 if (secfile ==
NULL) {
664 const char *filename;
671 sec, sub, j)); j++) {
674 bool survives, present, quiet;
712 "\"%s\": trying to have an floating point entry as a requirement name in '%s.%s%d'.",
713 filename, sec, sub, j);
727 "\"%s\": error in handling requirement name for '%s.%s%d'.",
728 filename, sec, sub, j);
743 "\"%s\": invalid boolean value for survives for "
744 "'%s.%s%d'.", filename, sec, sub, j);
752 "\"%s\": invalid boolean value for present for "
753 "'%s.%s%d'.", filename, sec, sub, j);
760 "\"%s\": invalid boolean value for quiet for "
761 "'%s.%s%d'.", filename, sec, sub, j);
771 "\"%s\" [%s] has invalid or unknown req: "
794 const char *filename;
800 sec, sub, j)); j++) {
806 log_error(
"\"%s\": unknown flag name \"%s\" in '%s.%s'.",
807 filename,
flag, sec, sub);
815 log_error(
"\"%s\": unknown bonus type \"%s\" in '%s.%s'.",
816 filename,
type, sec, sub);
823 log_error(
"\"%s\": failed to get value from '%s.%s%d'.",
824 filename, sec, sub, j);
848 const char *prefix,
const char *
entry,
849 const char *filename,
850 const char *description)
862 "\"%s\" %s %s: couldn't match \"%s\".",
863 filename, (description ? description : prefix),
entry,
sval);
881 const char *filename)
902 "\"%s\": string vector %s.%s too long (%d, max %d)",
916 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
939 const char *
entry,
int *output,
940 const char *filename)
956 "\"%s\": string vector %s.%s too long (%d, max %d)",
966 for (
i = 0;
i <
nval && ok;
i++) {
972 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
978 "\"%s\" %s.%s (%d): \"%s\" is removed.",
1003 const char *prefix,
const char *
entry,
1004 int *output,
const char *filename)
1018 "\"%s\": string vector %s.%s too long (%d, max %d)",
1032 if (
NULL == pimprove) {
1034 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
1058 const char *filename,
1059 const char *description)
1069 if (*result ==
NULL) {
1071 "\"%s\" %s %s: couldn't match \"%s\".",
1072 filename, (description ? description : prefix),
entry,
sval);
1087 const char *filename,
1101 "\"%s\" %s: couldn't match \"%s\".",
1131 const char *prefix,
const char *
suffix)
1135 "%s.%s", prefix,
suffix);
1160 "\"%s\" [%s] has unknown \"%s\".",
1173 const char *filename,
1206 "\"%s\" [%s] has unknown \"%s\".",
1223 const char *filename,
const char *
item_name,
1233 if (*turns > max_turns) {
1235 "\"%s\": \"%s\": \"%s\" value %d too large (max %d)",
1257 "\"%s\" [%s]: no \"name\" specified.",
1332 "\"%s\": Too many achievement types (%d, max %d)",
1345 "\"%s\": Cannot load achievement names",
1363 "\"%s\": Too many goods types (%d, max %d)",
1367 }
else if (
nval < 1) {
1369 "\"%s\": At least one goods type needed",
1384 "\"%s\": Cannot load goods names",
1421 "\"%s\": Cannot load counters names",
1484 "\"%s\": Duplicate tech flag name '%s'",
1491 "\"%s\": Too many user tech flags!",
1515 "\"%s\": Too many tech classes (%d, max %d)",
1543 "\"%s\": No Advances?!?", filename);
1549 "\"%s\": Too many advances (%d, max %d)",
1622 "\"%s\" [%s] \"%s\": \"Never\" with non-\"Never\".",
1629 "\"%s\" [%s] \"%s\": should have \"None\" second.",
1644 if (a->tclass ==
NULL) {
1646 "\"%s\" [%s] \"%s\": Unknown tech class \"%s\".",
1658 if (research_reqs ==
NULL) {
1668 for (j = 0; j <
nval; j++) {
1676 "\"%s\" [%s] \"%s\": bad flag name \"%s\".",
1725 && (a == b->require[
AR_ONE] || a == b->require[
AR_TWO])) {
1727 b->inherited_root_req =
TRUE;
1760 "\"%s\" tech \"%s\": req1 leads to removed tech.",
1767 "\"%s\" tech \"%s\": req2 leads to removed tech.",
1814 "\"%s\": Duplicate unit flag name '%s'",
1821 "\"%s\": Too many user unit type flags!",
1841 "control.class_flags%d.name",
1845 "control.class_flags%d.helptxt",
i);
1850 "\"%s\": Duplicate unit class flag name '%s'",
1857 "\"%s\": Too many user unit class flags!",
1879 "\"%s\": No unit classes?!?", filename);
1885 "\"%s\": Too many unit classes (%d, max %d)",
1913 "\"%s\": No unit types?!?", filename);
1919 "\"%s\": Too many unit types (%d, max %d)",
1965 "%s.veteran_names", path);
1967 "%s.veteran_power_fact", path);
1969 "%s.veteran_base_raise_chance", path);
1971 "%s.veteran_work_raise_chance",
1974 "%s.veteran_move_bonus", path);
1996#define rs_sanity_veteran(_path, _entry, _i, _condition, _action) \
1998 log_error("Invalid veteran definition '%s.%s[%d]'!", \
1999 _path, _entry, _i); \
2000 log_debug("Failed check: '%s'. Update value: '%s'.", \
2001 #_condition, #_action); \
2042#undef rs_sanity_veteran
2082 "Error loading the default veteran system: %s",
2113 "%s.non_native_def_pct",
2118 for (j = 0; j <
nval; j++) {
2134 "\"%s\" unit_class \"%s\": unit_type flag \"%s\"!",
2138 "\"%s\" unit_class \"%s\": bad flag name \"%s\".",
2175 msg,
sizeof(msg))) {
2177 "Error loading the veteran system: %s",
2184 &u->obsoleted_by, filename,
2187 &u->converted_to, filename,
2192 u->convert_time = 1;
2210 "\"%s\" unit_type \"%s\": bad class \"%s\".",
2272 if (u->firepower <= 0) {
2274 "\"%s\" unit_type \"%s\":"
2276 " but must be at least 1. "
2277 " If you want no attack ability,"
2278 " set the unit's attack strength to 0.",
2295 for (j = 0; j <
nval; j++) {
2300 "\"%s\" unit_type \"%s\":"
2301 "has unknown unit class %s as cargo.",
2317 for (j = 0; j <
nval; j++) {
2322 "\"%s\" unit_type \"%s\":"
2323 "has unknown unit class %s as target.",
2339 for (j = 0; j <
nval; j++) {
2344 "\"%s\" unit_type \"%s\":"
2345 "has unknown unit class %s as embarkable.",
2361 for (j = 0; j <
nval; j++) {
2366 "\"%s\" unit_type \"%s\":"
2367 "has unknown unit class %s as disembarkable.",
2396 "\"%s\" unit_type \"%s\":"
2397 "has unknown vision layer %s.",
2406 0,
"%s.paratroopers_range",
sec_name);
2420 "\"%s\" unit_type \"%s\":"
2421 " bad tp_defense \"%s\".",
2439 for (j = 0; j <
nval; j++) {
2450 "\"%s\" unit_type \"%s\": unit_class flag!",
2454 "\"%s\" unit_type \"%s\": bad flag name \"%s\".",
2479 for (j = 0; j <
nval; j++) {
2487 "\"%s\" unit_type \"%s\": bad role name \"%s\".",
2506 "\"%s\" unit_type \"%s\": depends on removed tech \"%s\".",
2554 "\"%s\": No improvements?!?", filename);
2557 log_verbose(
"%d improvement types (including possibly unused)",
nval);
2560 "\"%s\": Too many improvements (%d, max %d)",
2582 "control.building_flags%d.name",
2586 "control.building_flags%d.helptxt",
i);
2591 "\"%s\": Duplicate building flag name '%s'",
2598 "\"%s\": Too many user building flags!",
2627 for (
i = 0;
i <
nval && ok;
i++) {
2646 "\"%s\" improvement \"%s\": couldn't match "
2647 "genus \"%s\".", filename,
2656 for (j = 0; j <
nflags; j++) {
2664 "\"%s\" improvement \"%s\": bad flag name \"%s\".",
2685 if (obs_reqs ==
NULL) {
2765 "\"%s\": Duplicate terrain flag name '%s'",
2772 "\"%s\": Too many user terrain flags!",
2791 "control.extra_flags%d.name",
2795 "control.extra_flags%d.helptxt",
i);
2800 "\"%s\": Duplicate extra flag name '%s'",
2807 "\"%s\": Too many user extra flags!",
2827 "\"%s\": ruleset doesn't have any terrains.",
2833 "\"%s\": Too many terrains (%d, max %d)",
2872 "\"%s\": Too many extra types (%d, max %d)",
2889 for (idx = 0; idx <
nval; idx++) {
2912 "\"%s\": Too many base types (%d, max %d)",
2930 for (idx = 0; idx <
nval; idx++) {
2937 if (pextra !=
NULL) {
2942 "No extra definition matching base definition \"%s\"",
2948 "Base section \"%s\" does not associate base with any extra",
2965 "\"%s\": Too many road types (%d, max %d)",
2983 for (idx = 0; idx <
nval; idx++) {
2990 if (pextra !=
NULL) {
2995 "No extra definition matching road definition \"%s\"",
3001 "Road section \"%s\" does not associate road with any extra",
3017 "\"%s\": Too many resource types (%d, max %d)",
3035 for (idx = 0; idx <
nval; idx++) {
3045 if (pextra !=
NULL) {
3050 "No extra definition matching resource definition \"%s\"",
3056 "Resource section %s does not list extra this resource belongs to.",
3089 "parameters.ocean_reclaim_requirement");
3092 "parameters.land_channel_requirement");
3095 "parameters.thaw_requirement");
3098 "parameters.freeze_requirement");
3101 "parameters.lake_max_size");
3104 "parameters.min_start_native_area");
3107 "parameters.move_fragments");
3110 "\"%s\": move_fragments must be at least 1",
3117 "parameters.igter_cost");
3120 "\"%s\": igter_cost must be at least 1",
3129 "parameters.pythagorean_diagonal");
3133 "parameters.ocean_resources");
3136 N_(
"?gui_type:Build Type A Base"),
3137 "extraui.ui_name_base_fortress");
3141 N_(
"?gui_type:Build Type B Base"),
3142 "extraui.ui_name_base_airbase");
3164 pterrain->identifier
3166 if (
'\0' == pterrain->identifier) {
3168 "\"%s\" [%s] identifier missing value.",
3175 "\"%s\" [%s] cannot use '%c' as an identifier;"
3176 " it is reserved for unknown terrain.",
3177 filename,
tsection, pterrain->identifier);
3184 "\"%s\" [%s] has the same identifier as [%s].",
3200 "\"%s\": [%s] unknown class \"%s\"",
3226 "\"%s\": [%s] Different lengths for resources "
3227 "and resource frequencies",
3231 pterrain->resources =
fc_calloc(
nval + 1,
sizeof(*pterrain->resources));
3233 sizeof(*pterrain->resource_freq));
3234 for (j = 0; j <
nval; j++) {
3236 if (pterrain->resources[j] ==
NULL) {
3240 pterrain->resource_freq[j] = j <
nval2
3246 "\"%s\": [%s] Resource frequency '%d' "
3247 "outside allowed range",
3249 pterrain->resource_freq[j]);
3256 pterrain->resource_freq[
nval] = 0;
3267 pterrain->road_output_incr_pct[
o]
3273 filename,
NULL, &ok)
3275 filename,
NULL, &ok)) {
3281 if (!
lookup_terrain(file,
"cultivate_result", filename, pterrain,
3282 &pterrain->cultivate_result,
FALSE)) {
3287 if (pterrain->cultivate_result == pterrain) {
3289 "%s: Cultivating result in terrain itself.",
3295 "%s.irrigation_food_incr",
tsection)
3304 &pterrain->plant_result,
FALSE)) {
3309 if (pterrain->plant_result == pterrain) {
3311 "%s: Planting result in terrain itself.",
3328 "%s: Missing cultivate_time",
tsection);
3332 if ((pterrain->cultivate_result !=
NULL
3333 && pterrain->cultivate_time <= 0)
3334 || (pterrain->cultivate_result ==
NULL
3335 && pterrain->cultivate_time > 0)) {
3337 "%s: cultivate_result and cultivate_time disagree "
3338 "whether cultivating is enabled",
tsection);
3346 "%s: Missing plant_time",
tsection);
3350 if ((pterrain->plant_result !=
NULL
3351 && pterrain->plant_time <= 0)
3352 || (pterrain->plant_result ==
NULL
3353 && pterrain->plant_time > 0)) {
3355 "%s: plant_result and plant_time disagree "
3356 "whether planting is enabled",
tsection);
3362 &pterrain->animal, filename,
3368 if (!
lookup_terrain(file,
"transform_result", filename, pterrain,
3369 &pterrain->transform_result,
TRUE)) {
3379 if ((pterrain->transform_result !=
NULL
3380 && pterrain->transform_time <= 0)
3381 || (pterrain->transform_result ==
NULL
3382 && pterrain->transform_time > 0)) {
3384 "%s: transform_result and transform_time disagree "
3385 "whether transforming is enabled",
tsection);
3390 pterrain->placing_time = 1;
3394 pterrain->pillage_time = 1;
3398 if (!
lookup_terrain(file,
"warmer_wetter_result", filename, pterrain,
3399 &pterrain->warmer_wetter_result,
TRUE)
3400 || !
lookup_terrain(file,
"warmer_drier_result", filename, pterrain,
3401 &pterrain->warmer_drier_result,
TRUE)
3402 || !
lookup_terrain(file,
"cooler_wetter_result", filename, pterrain,
3403 &pterrain->cooler_wetter_result,
TRUE)
3404 || !
lookup_terrain(file,
"cooler_drier_result", filename, pterrain,
3405 &pterrain->cooler_drier_result,
TRUE)) {
3412 pterrain->extra_removal_times[
extra_index(pextra)] = 0;
3416 "%s.extra_settings%d.extra",
3420 if (pextra !=
NULL) {
3424 "%s.extra_settings%d",
tsection, j);
3430 "\"%s\" [%s] has settings for unknown extra \"%s\".",
3440 for (j = 0; j <
nval; j++) {
3447 "\"%s\" [%s] has unknown flag \"%s\".",
3452 BV_SET(pterrain->flags, flag);
3469 pterrain->property[
mtp]
3477 for (j = 0; j <
nval; j++) {
3482 "\"%s\" [%s] is native to unknown unit class \"%s\".",
3502 "Missing terrain color definition: %s",
3535 "\"%s\" extra \"%s\" has no category.",
3543 "\"%s\" extra \"%s\" has invalid category \"%s\".",
3557 "\"%s\" extra \"%s\": unknown cause \"%s\".",
3562 pextra->causes |= (1 << cause);
3567 if (pextra->causes == 0) {
3583 pextra->rmcauses = 0;
3584 for (j = 0; j <
nval; j++) {
3591 "\"%s\" extra \"%s\": unknown rmcause \"%s\".",
3596 pextra->rmcauses |= (1 <<
rmcause);
3617 "%s.rmact_gfx_alt",
section));
3620 "%s.rmact_gfx_alt2",
section));
3661 pextra->build_time = 0;
3665 "%s.build_time_factor",
section);
3666 pextra->removal_time = 0;
3670 "%s.removal_time_factor",
section);
3673 if (pextra->infracost > 0) {
3680 if (pextra->defense_bonus != 0) {
3692 "\"%s\" extra \"%s\" has illegal unit_seen value \"%s\".",
3702 "%s.appearance_chance",
3706 "%s.disappearance_chance",
3710 "%s.no_aggr_near_city",
3715 for (j = 0; j <
nval; j++) {
3718 if (uclass ==
NULL) {
3720 "\"%s\" extra \"%s\" is native to unknown unit class \"%s\".",
3736 for (j = 0; j <
nval; j++) {
3744 "\"%s\" extra \"%s\": unknown flag \"%s\".",
3749 BV_SET(pextra->flags, flag);
3754 if (pextra->no_aggr_near_city >= 0) {
3767 for (j = 0; j <
nval; j++) {
3773 "\"%s\" extra \"%s\": unknown conflict extra \"%s\".",
3791 for (j = 0; j <
nval; j++) {
3797 "\"%s\" extra \"%s\" hidden by unknown extra \"%s\".",
3813 for (j = 0; j <
nval; j++) {
3819 "\"%s\" extra \"%s\" bridged over unknown extra \"%s\".",
3834 "%s.visibility_req",
section);
3839 "\"%s\" %s: unknown visibility_req %s.",
3860 if (!presource->data.resource) {
3862 "\"%s\" extra \"%s\" has \"Resource\" cause but no "
3863 "corresponding [resource_*] section",
3870 presource->data.resource->output[
o] =
3878 presource->data.resource->id_old_save =
'\0';
3882 presource->data.resource->id_old_save = identifier[0];
3885 "\"%s\" [%s] identifier missing value.",
3892 "\"%s\" [%s] cannot use '%c' as an identifier;"
3894 filename,
rsection, presource->data.resource->id_old_save);
3914 "\"%s\" resource section [%s]: extra \"%s\" does not "
3915 "have \"Resource\" in its causes",
3927 if (
pres->data.resource->id_old_save !=
'\0') {
3929 if (
pres->data.resource->id_old_save ==
pres2->data.resource->id_old_save
3932 "\"%s\" [%s] has the same identifier as [%s].",
3957 "\"%s\" extra \"%s\" has \"Base\" cause but no "
3958 "corresponding [base_*] section",
3969 "\"%s\" base \"%s\": unknown gui_type \"%s\".",
3978 "%s.vision_main_sq",
3981 "%s.vision_invis_sq",
3984 "%s.vision_subs_sq",
4018 "\"%s\" base section [%s]: extra \"%s\" does not have "
4019 "\"Base\" in its causes",
4031 const char *special;
4038 "\"%s\" extra \"%s\" has \"Road\" cause but no "
4039 "corresponding [road_*] section",
4050 "\"%s\" road \"%s\": unknown gui_type \"%s\".",
4075 "Illegal move_mode \"%s\" for road \"%s\"",
4082 proad->tile_incr_const[
o] =
4097 "Multiple roads marked as compatibility \"Road\"");
4105 "Multiple roads marked as compatibility \"Railroad\"");
4113 "Multiple roads marked as compatibility \"River\"");
4122 "Illegal compatibility special \"%s\" for road %s",
4133 for (j = 0; j <
nval; j++) {
4144 "\"%s\" road \"%s\" integrates with unknown road \"%s\".",
4160 for (j = 0; j <
nval; j++) {
4166 "\"%s\" road \"%s\": unknown flag \"%s\".",
4188 "\"%s\" road section [%s]: extra \"%s\" does not have "
4189 "\"Road\" in its causes",
4239 "\"%s\": Too many governments (%d, max %d)",
4268 "\"%s\": Too many multipliers (%d, max %d)",
4283 "\"%s\": Cannot load multiplier names",
4336 if (g->ai.better ==
NULL) {
4341 g->ai.better =
NULL;
4366 const char *male, *female;
4372 "Lack of default ruler titles for "
4373 "government \"%s\" (nb %d): %s",
4380 "Lack of default ruler titles for "
4381 "government \"%s\" (nb %d).",
4408 if (pmul->stop <= pmul->start) {
4410 "Multiplier \"%s\" stop (%d) must be greater "
4412 pmul->stop, pmul->start);
4421 if (((pmul->stop - pmul->start) % pmul->step) != 0) {
4423 "Multiplier \"%s\" step (%d) does not fit "
4424 "exactly into interval start-stop (%d to %d)",
4426 pmul->start, pmul->stop);
4435 if (pmul->def < pmul->start || pmul->def > pmul->stop) {
4437 "Multiplier \"%s\" default (%d) not within "
4439 pmul->def, pmul->start, pmul->stop);
4443 if (((pmul->def - pmul->start) % pmul->step) != 0) {
4445 "Multiplier \"%s\" default (%d) not legal "
4446 "with respect to step size %d",
4455 if (pmul->factor == 0) {
4457 "Multiplier \"%s\" scaling factor must "
4574 "No available nations in this ruleset!");
4578 "Too many nations (max %d, we have %d)!",
4589 "%s.translation_domain",
sec_name);
4595 domain =
"freeciv-nations";
4599 pl->translation_domain =
NULL;
4604 "Unsupported translation domain \"%s\" for %s",
4614 name_set(&
pl->noun_plural,
pl->translation_domain, noun_plural);
4617 for (j = 0; j <
i && ok; j++) {
4626 "Two nations defined with the same adjective \"%s\": "
4627 "in section \'%s\' and section \'%s\'",
4636 "Two nations defined with the same rule_name \"%s\": "
4637 "in section \'%s\' and section \'%s\'",
4645 "Two nations defined with the same plural name \"%s\": "
4646 "in section \'%s\' and section \'%s\'",
4696 for (
i = 0;
i <
len;
i++) {
4712 const char **allowed_terrains,
4725 for (j = 0; j <
dim; j++) {
4740 if (!(end =
strchr(p,
')'))) {
4742 "\"%s\" [%s] %s: city name \"%s\" "
4747 for (*end++ =
'\0';
'\0' != *end; end++) {
4750 "\"%s\" [%s] %s: city name \"%s\" "
4751 "contains characters after last parenthesis.",
4767 "\"%s\" [%s] %s: city name \"%s\" is too long.",
4780 if ((next =
strchr(p,
','))) {
4800 "\"%s\" [%s] %s: city \"%s\" "
4801 "has terrain hint \"%s\" not in allowed_terrains.",
4811 if (
NULL == pterrain) {
4820 if (pterrain ==
NULL) {
4837 "\"%s\" [%s] %s: city \"%s\" "
4838 "has terrain hint \"%s\" not in allowed_terrains.",
4844 }
else if (!pterrain) {
4850 "\"%s\" [%s] %s: city \"%s\" "
4851 "has unknown terrain hint \"%s\".",
4858 if (
NULL != pterrain) {
4863 p = next ? next + 1 :
NULL;
4864 }
while (
NULL != p &&
'\0' != *p);
4899 "ruledit.embedded_nations");
4931 "Default values for trait %s not sane.",
4940 "compatibility.allowed_govs");
4956 "compatibility.allowed_terrains");
4972 "compatibility.allowed_styles");
4988 "compatibility.default_government");
4996 "Tried to set unknown government type \"%s\" as default_government!",
5034 "must be defined.");
5042 "compatibility.default_nationset");
5049 "Unknown default_nationset \"%s\".",
sval);
5098 char tmp[200] =
"\0";
5109 for (j = 0; j <
dim; j++) {
5124 log_verbose(
"Nation %s: Unknown set/group \"%s\".",
5133 "Nation %s is not a member of any nation set",
5141 for (j = 0; j <
dim; j++) {
5146 "Nation %s conflicts with itself",
5157 log_verbose(
"Nation %s: conflicts_with nation \"%s\" is unknown.",
5172 bool is_male =
FALSE;
5185 "Nation %s: leader name \"%s\" is too long.",
5194 "Nation %s: leader \"%s\": %s.",
5211 "Nation %s: leader \"%s\" has unsupported "
5212 "sex variant \"%s\".",
5234 "Nation %s: Too many leaders; max is %d",
5238 }
else if (0 == j) {
5240 "Nation %s: no leaders; at least one is required.",
5249 "Nation %s: leader \"%s\" defined more than once.",
5264 if (pnation->server.traits[
tr].min < 0) {
5269 if (pnation->server.traits[
tr].max < 0) {
5274 if (pnation->server.traits[
tr].fixed < 0) {
5278 int diff = pnation->server.traits[
tr].max - pnation->server.traits[
tr].min;
5281 pnation->server.traits[
tr].fixed = diff / 2 + pnation->server.traits[
tr].min;
5284 if (pnation->server.traits[
tr].max < pnation->server.traits[
tr].min) {
5286 "%s values for trait %s not sane.",
5297 pnation->is_playable =
5306 "Nation %s, barbarian_type is invalid (\"%s\")",
5313 && pnation->is_playable) {
5317 "Nation %s marked both barbarian and playable.",
5332 const char *male, *female;
5335 "%s.ruler_titles%d.government",
5362 "Nation %s: government \"%s\" not in allowed_govs.",
5374 "Nation %s: government \"%s\" not found.",
5380 if (
NULL != male &&
NULL != female) {
5402 if (pnation->style ==
NULL) {
5408 "Nation %s: Illegal style \"%s\"",
5413 log_verbose(
"Nation %s: style \"%s\" not supported in this "
5414 "ruleset; using default.",
5423 for (j = 0; j <
dim; j++) {
5431 "Nation %s is its own civil war nation",
5443 log_verbose(
"Nation %s: civil war nation \"%s\" is unknown.",
5456 pnation->init_techs, filename)) {
5461 pnation->init_buildings, filename)) {
5466 pnation->init_units, filename)) {
5477 if (pnation->init_government ==
NULL) {
5488 "Nation %s: init_government \"%s\" not allowed.",
5508 "Nation %s: legend \"%s\" is too long.",
5515 pnation->player =
NULL;
5566 "Nation set \"%s\" has no playable nations. "
5573 "No land barbarian nation defined in set \"%s\". "
5580 "No sea barbarian nation defined in set \"%s\". "
5612 "No available nation styles in this ruleset!");
5737 const char *filename)
5753 "\"%s\": %s: bad unit type flag list.",
5780 const char *filename)
5794 "\"%s\": %s: bad action list",
5816 const char *filename)
5822 "missing_unit_upkeep.%s_protected",
item);
5824 "missing_unit_upkeep.%s_unit_act",
item);
5854 "\"%s\": Too many specialists (%d, max %d).",
5882 "\"%s\": No graphic tag for specialist at %s.",
5910 "\"%s\": must give a min_size of 0 for at least one "
5911 "specialist type.", filename);
5922 "parameters.celebrate_size_limit");
5927 "parameters.angry_citizens");
5940 "\"%s\": Forced taxes do not add up in ruleset!",
5950 "parameters.vision_reveal_tiles");
5958 "citizen.nationality");
5961 "citizen.ubuilder_nationality");
5964 "citizen.convert_speed");
5992 "missing_unit_upkeep.food_wipe");
6011 "missing_unit_upkeep.gold_wipe");
6030 "missing_unit_upkeep.shield_wipe");
6047 const char *filename;
6071 "\"%s\" [%s] missing effect type.",
6079 "\"%s\" [%s] lists unknown effect type \"%s\".",
6086 "\"%s\" [%s] type \"%s\" is not an user effect.",
6095 "\"%s\" [%s] missing ai_valued_as.",
6103 "\"%s\" [%s] lists unknown ai_valued_as \"%s\".",
6110 "\"%s\" [%s] ai_valued_as \"%s\" is an user effect.",
6119 "\"%s\" [%s] Duplicate \"%s\" entry.",
6134 enum effect_type
eff;
6141 const char *comment;
6147 "\"%s\" [%s] missing effect type.",
6160 "\"%s\" [%s] lists unknown effect type \"%s\".",
6176 "\"%s\" [%s] has unknown multiplier \"%s\".",
6200 if (comment !=
NULL) {
6218 int def,
int min,
int max,
6219 const char *path, ...)
6222 int def,
int min,
int max,
6223 const char *path, ...)
6239 "\"%s\" should be in the interval [%d, %d] "
6240 "but is %d; using the minimal value.",
6247 "\"%s\" should be in the interval [%d, %d] "
6248 "but is %d; using the maximal value.",
6365 const char *filename,
6388 "\"%s\": %s: bad action list",
6394 for (j = 0; j <
asize; j++) {
6413 "\"%s\": %s: bad action list",
6419 for (j = 0; j <
asize; j++) {
6436 const char *filename,
6473 const char *filename,
6493 for (j = 0; j <
asize; j++) {
6510 const char *filename;
6649 "options.popup_tech_help");
6654 "civstyle.base_pollution");
6659 for (j = 0; j <
nval; j++) {
6660 enum gameloss_style style;
6669 "\"%s\": bad value \"%s\" for gameloss_style.",
6686 "civstyle.happy_cost");
6692 "civstyle.food_cost");
6708 "civstyle.base_bribe_cost");
6714 "civstyle.ransom_gold");
6717 "civstyle.pillage_select");
6721 "civstyle.tech_steal_allow_holes");
6724 "civstyle.tech_trade_allow_holes");
6727 "civstyle.tech_trade_loss_allow_holes");
6730 "civstyle.tech_parasite_allow_holes");
6733 "civstyle.tech_loss_allow_holes");
6740 "civstyle.upgrade_veteran_loss");
6746 "civstyle.autoupgrade_veteran_loss");
6753 "research.base_tech_cost");
6760 "research.min_tech_cost");
6763 "civstyle.granary_food_ini");
6768 "Too many granary_food_ini entries (%d, max %d)",
6772 log_error(
"No values for granary_food_ini. Using default "
6787 log_error(
"Bad value for granary_food_ini[%i]. Using %i.",
6802 "civstyle.granary_food_inc");
6810 "civstyle.min_city_center_%s",
6823 "civstyle.init_vis_radius_sq");
6830 "civstyle.init_city_radius_sq");
6833 "civstyle.gold_upkeep_style");
6838 "Unknown gold upkeep style \"%s\"",
6849 "Cannot have homeless_gold_upkeep while gold_upkeep_style \"City\".");
6854 "civstyle.output_granularity");
6868 "wonder_visibility.small_wonders");
6874 "Unknown wonder visibility type \"%s\"",
6883 "illness.illness_on");
6889 "illness.illness_base_factor");
6895 "illness.illness_min_size");
6901 "illness.illness_trade_infection");
6907 "illness.illness_pollution_factor");
6915 "incite_cost.base_incite_cost");
6921 "incite_cost.improvement_factor");
6927 "incite_cost.unit_factor");
6933 "incite_cost.total_factor");
6943 "combat_rules.tired_attack");
6947 "combat_rules.only_killing_makes_veteran");
6951 "combat_rules.only_real_fight_makes_veteran");
6955 "combat_rules.combat_odds_scaled_veterancy");
6959 "combat_rules.damage_reduces_bombard_rate");
6963 "combat_rules.low_firepower_badwallattacker");
6968 "combat_rules.low_firepower_pearl_harbour");
6975 "combat_rules.low_firepower_pearl_harbor");
6979 "combat_rules.low_firepower_combat_bonus");
6982 "combat_rules.low_firepower_nonnat_bombard");
6988 "combat_rules.nuke_pop_loss_pct");
6994 "combat_rules.nuke_defender_survival_chance_pct");
7002 "borders.radius_sq_city");
7008 "borders.size_effect");
7015 "borders.radius_sq_city_permanent");
7019 "research.tech_cost_style");
7024 "Unknown tech cost style \"%s\"",
7030 "research.tech_leakage");
7035 "Unknown tech leakage \"%s\"",
7041 log_error(
"Only tech_leakage \"%s\" supported with "
7042 "tech_cost_style \"%s\". ",
7045 log_error(
"Switching to tech_leakage \"%s\".",
7054 "research.base_tech_cost");
7057 "research.tech_upkeep_style");
7063 "Unknown tech upkeep style \"%s\"",
7075 "research.tech_upkeep_divider");
7080 "No free_tech_method given");
7086 "Bad value %s for free_tech_method.",
sval);
7098 "culture.victory_min_points");
7101 "culture.victory_lead_pct");
7104 "culture.migration_pml");
7107 "culture.history_interest_pml");
7112 "world_peace.victory_turns");
7117 "calendar.skip_year_0");
7120 "calendar.start_year");
7126 "Too many calendar fragments. Max is %d",
7134 "calendar.positive_label"));
7138 "calendar.negative_label"));
7182 "No background player color defined! (%s)",
7208 "\"%s\": Too many disaster types (%d, max %d)",
7227 "\"%s\": Cannot load disaster names",
7254 "\"%s\" disaster \"%s\": unknown effect \"%s\".",
7278 const char *
typename;
7286 "Achievement has unknown type \"%s\".",
7287 typename !=
NULL ?
typename :
"(NULL)");
7303 "Achievement %s has no first msg!",
sec_name);
7313 if (!
pach->unique) {
7315 "Achievement %s has no msg for consecutive gainers!",
7333 "trade.settings%d.type",
7339 "\"%s\" unknown trade route type \"%s\".",
7348 "trade.settings%d.pct",
i);
7350 "trade.settings%d.cancelling",
i);
7354 "\"%s\" unknown trade route cancelling type \"%s\".",
7365 "\"%s\" unknown trade route bonus type \"%s\".",
7381 "trade.reveal_trade_partner");
7385 "trade.goods_selection");
7391 "\"%s\" goods selection method \"%s\" unknown.",
7427 for (j = 0; j <
nval; j++) {
7454 for (
i = 0;
i < num;
i++) {
7464 "\"%s\" unknown clause type \"%s\".",
7474 "\"%s\" duplicate clause type \"%s\" definition.",
7526 "\"%s\" unknown counter type \"%s\".",
7534 "\"%s\": Cannot load counter names",
7546 "\"%s\": No checkpoint value",
7602 "auto_attack",
"if_attacker",
7610 "auto_attack.attack_actions",
7614 "\"%s\": %s: failed load %s.",
7615 filename,
"auto_attack",
"attack_actions");
7634 "actions.diplchance_initial_odds")) {
7647 "actions.poison_empties_food_stock");
7654 "actions.steal_maps_reveals_all_cities");
7695 "actions.quiet_actions");
7700 "\"%s\": actions.quiet_actions: bad action list",
7705 for (j = 0; j <
asize; j++) {
7749 "civstyle.paradrop_to_transport")
7816 "actions.escape_city", filename)) {
7832 "actions.unit_stack_death", filename)) {
7839 if (sec !=
nullptr) {
7850 "\"%s\" [%s] missing action to configure.",
7859 "\"%s\" [%s] lists unknown action type \"%s\".",
7867 "\"%s\" [%s] duplicate configuration for action \"%s\".",
7893 if (sec !=
nullptr) {
7901 const char *comment;
7909 "\"%s\" [%s] missing action to enable.",
7918 "\"%s\" [%s] lists unknown action type \"%s\".",
7927 if (actor_reqs ==
NULL) {
7935 if (target_reqs ==
NULL) {
7943 if (comment !=
nullptr) {
7997 packet.
flags = c->flags;
8073 packet.
fuel = u->fuel;
8074 packet.
flags = u->flags;
8075 packet.
roles = u->roles;
8085 packet.
cargo = u->cargo;
8089 packet.
vlayer = u->vlayer;
8091 if (u->veteran ==
NULL) {
8110 packet.
worker = u->adv.worker;
8225 if (a->tclass ==
NULL) {
8228 packet.
tclass = a->tclass->idx;
8270 packet.
flags = a->flags;
8271 packet.
cost = a->cost;
8337 packet.
genus = b->genus;
8345 packet.
reqs = b->reqs;
8349 packet.
upkeep = b->upkeep;
8351 packet.
flags = b->flags;
8398 packet.
tclass = pterrain->tclass;
8411 packet.
output[
o] = pterrain->output[
o];
8457 packet.
flags = pterrain->flags;
8480 packet.
output[
o] = presource->data.resource->output[
o];
8553 packet.
reqs = e->reqs;
8554 packet.
rmreqs = e->rmreqs;
8573 packet.
eus = e->eus;
8578 packet.
flags = e->flags;
8661 packet.
reqs = g->reqs;
8664 packet.
to_pct = g->to_pct;
8668 packet.
flags = g->flags;
8691 packet.
reqs = d->reqs;
8715 packet.
type = a->type;
8716 packet.
unique = a->unique;
8717 packet.
value = a->value;
8900 if (
n->translation_domain ==
NULL) {
8961 if (
n->init_buildings[
i] !=
B_LAST) {
9027 packet.
start = pmul->start;
9028 packet.
stop = pmul->stop;
9029 packet.
step = pmul->step;
9030 packet.
def = pmul->def;
9031 packet.
offset = pmul->offset;
9032 packet.
factor = pmul->factor;
9039 packet.
reqs = pmul->reqs;
9107 for (
i = 0;
i <
misc_p.veteran_levels;
i++) {
9128 misc_p.global_init_techs_count =
i;
9135 misc_p.global_init_buildings[
i] =
9141 misc_p.global_init_buildings_count =
i;
9244 log_normal(
_(
"Cannot load any ruleset. Freeciv-web ruleset is available from "
9245 "https://github.com/freeciv/freeciv-web"));
9309 server.playable_nations = 0;
9478 "-- This file is for lua-functionality for parsing luadata.txt\n-- of this ruleset.");
9524 "Could not load game.ruleset:\n%s",
int achievement_index(const struct achievement *pach)
int achievement_number(const struct achievement *pach)
#define achievements_iterate_end
#define achievements_iterate(_ach_)
struct action_auto_perf * action_auto_perf_slot_number(const int num)
void actions_rs_pre_san_gen(void)
const char * action_min_range_ruleset_var_name(int act)
const char * action_blocked_by_ruleset_var_name(const struct action *act)
bool action_is_in_use(struct action *paction)
const char * action_post_success_forced_ruleset_var_name(const struct action *act)
struct action * action_by_rule_name(const char *name)
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)
void action_enabler_add(struct action_enabler *enabler)
const char * action_ui_name_default(int act)
struct action_enabler * action_enabler_new(void)
bool action_enabler_possible_actor(const struct action_enabler *ae)
bool action_id_is_internal(action_id act)
struct action_enabler_list * action_enablers_for_action(action_id action)
const char * action_ui_name_ruleset_var_name(int act)
#define action_by_result_iterate(_paction_, _result_)
#define action_auto_perf_iterate_end
#define action_enablers_iterate_end
#define ACTION_AUTO_MOVED_ADJ
#define ACTION_AUTO_POST_BRIBE_UNIT
#define action_id_get_sub_target_kind(act_id)
#define ACTION_AUTO_UPKEEP_GOLD
#define enabler_get_action_id(_enabler_)
static struct action * action_by_number(action_id act_id)
#define ACTION_AUTO_ESCAPE_STACK
#define action_has_result(_act_, _res_)
#define ACTION_AUTO_ESCAPE_CITY
#define action_enabler_list_iterate_end
#define ACTION_DISTANCE_UNLIMITED
#define action_by_result_iterate_end
#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_AUTO_POST_ATTACK2
#define action_enabler_list_iterate(action_enabler_list, aenabler)
#define action_iterate(_act_)
#define action_auto_perf_iterate(_act_perf_)
#define ACTION_AUTO_UPKEEP_FOOD
#define ACTION_AUTO_POST_ATTACK
#define ACTION_AUTO_POST_COLLECT_RANSOM
int actres_min_range_default(enum action_result result)
int actres_max_range_default(enum action_result result)
enum action_target_kind actres_target_kind_default(enum action_result result)
void adv_units_ruleset_init(void)
#define CALL_FUNC_EACH_AI(_func,...)
Base_type_id base_number(const struct base_type *pbase)
void base_type_init(struct extra_type *pextra, int idx)
bool territory_claiming_base(const struct base_type *pbase)
#define BV_ISSET(bv, bit)
void city_styles_alloc(int num)
void city_production_caravan_shields_init(void)
const char * city_style_rule_name(const int style)
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
static struct fc_sockaddr_list * list
void conn_list_compression_thaw(const struct conn_list *pconn_list)
void conn_list_compression_freeze(const struct conn_list *pconn_list)
struct counter * counter_by_id(int id)
void attach_city_counter(struct counter *counter)
#define city_counters_iterate_end
#define city_counters_iterate(pcount)
struct clause_info * clause_info_get(enum clause_type type)
const char * disaster_rule_name(struct disaster_type *pdis)
Disaster_type_id disaster_number(const struct disaster_type *pdis)
Disaster_type_id disaster_index(const struct disaster_type *pdis)
#define disaster_type_iterate(_p)
#define disaster_type_iterate_end
void send_ruleset_cache(struct conn_list *dest)
struct effect * effect_new(enum effect_type type, int value, struct multiplier *pmul)
void user_effect_ai_valued_set(enum effect_type tgt, enum effect_type valued_as)
struct effect_list * get_effects(enum effect_type effect_type)
enum effect_type user_effect_ai_valued_as(enum effect_type real)
void effect_req_append(struct effect *peffect, struct requirement req)
bool is_user_effect(enum effect_type eff)
#define effect_list_iterate_end
#define effect_list_iterate(effect_list, peffect)
#define MAX_NUM_USER_BUILDING_FLAGS
#define MAX_DISASTER_TYPES
#define MAX_NUM_BUILDING_LIST
#define EC_NATURAL_DEFENSIVE
#define EC_NOT_AGGRESSIVE
#define MAX_CALENDAR_FRAGMENTS
#define MAX_NUM_TECH_CLASSES
#define MAX_NUM_MULTIPLIERS
#define MAX_NUM_UNIT_LIST
#define MAX_ACHIEVEMENT_TYPES
#define MAX_NUM_TECH_LIST
const struct ft_color ftc_warning
void game_ruleset_init(void)
void game_ruleset_free(void)
#define RS_DEFAULT_RANSOM_GOLD
#define RS_DEFAULT_GRANARY_FOOD_INI
#define RS_DEFAULT_NUKE_DEFENDER_SURVIVAL_CHANCE_PCT
#define RS_MIN_BORDER_RADIUS_SQ_CITY_PERMANENT
#define RS_MAX_TECH_UPKEEP_DIVIDER
#define RS_MIN_ILLNESS_POLLUTION_PCT
#define RS_DEFAULT_NUKE_POP_LOSS_PCT
#define RS_MAX_BORDER_RADIUS_SQ_CITY
#define RS_DEFAULT_BASE_POLLUTION
#define RS_MIN_ILLNESS_TRADE_INFECTION_PCT
#define RS_MAX_ILLNESS_BASE_FACTOR
#define RS_DEFAULT_INCITE_TOTAL_FCT
#define RS_DEFAULT_ILLNESS_BASE_FACTOR
#define RS_DEFAULT_NEG_YEAR_LABEL
#define RS_MIN_NUKE_POP_LOSS_PCT
#define RS_MIN_INCITE_IMPROVEMENT_FCT
#define RS_MIN_BASE_BRIBE_COST
#define RS_MAX_NUKE_POP_LOSS_PCT
#define RS_DEFAULT_INCITE_IMPROVEMENT_FCT
#define RS_MAX_INCITE_IMPROVEMENT_FCT
#define RS_MIN_RANSOM_GOLD
#define RS_ACTION_NO_MAX_DISTANCE
#define RS_DEFAULT_BASE_BRIBE_COST
#define RS_MAX_INCITE_BASE_COST
#define RS_DEFAULT_TECH_UPKEEP_DIVIDER
#define RS_DEFAULT_HAPPY_COST
#define RS_MIN_UPGRADE_VETERAN_LOSS
#define RS_MIN_ILLNESS_MIN_SIZE
#define RS_DEFAULT_POISON_EMPTIES_FOOD_STOCK
#define RS_DEFAULT_GRANARY_FOOD_INC
#define RS_DEFAULT_ILLNESS_ON
#define RS_MAX_HAPPY_COST
#define GAME_DEFAULT_CELEBRATESIZE
#define RS_MIN_ILLNESS_BASE_FACTOR
#define RS_DEFAULT_STEAL_MAP_REVEALS_CITIES
#define RS_MIN_TECH_UPKEEP_DIVIDER
#define RS_MAX_RANSOM_GOLD
#define RS_MIN_HAPPY_COST
#define RS_MIN_BORDER_RADIUS_SQ_CITY
#define GAME_DEFAULT_RULESETDIR
#define RS_MIN_NUKE_DEFENDER_SURVIVAL_CHANCE_PCT
#define RS_MAX_BORDER_RADIUS_SQ_CITY_PERMANENT
#define RS_DEFAULT_UPGRADE_VETERAN_LOSS
#define RS_MAX_NUKE_DEFENDER_SURVIVAL_CHANCE_PCT
#define RS_MAX_INCITE_UNIT_FCT
#define RS_MIN_VIS_RADIUS_SQ
#define RS_DEFAULT_CALENDAR_SKIP_0
#define RS_MAX_ILLNESS_MIN_SIZE
#define RS_DEFAULT_CITY_RADIUS_SQ
#define GAME_DEFAULT_START_YEAR
#define RS_MAX_BORDER_SIZE_EFFECT
#define RS_DEFAULT_BORDER_SIZE_EFFECT
#define RS_MAX_BASE_BRIBE_COST
#define RS_MIN_INCITE_BASE_COST
#define RS_DEFAULT_PILLAGE_SELECT
#define RS_MIN_CITY_RADIUS_SQ
#define RS_MIN_CITY_CENTER_OUTPUT
#define RS_MAX_GRANARY_FOOD_INC
#define RS_MAX_CITY_CENTER_OUTPUT
#define RS_MAX_CITY_RADIUS_SQ
#define RS_DEFAULT_POS_YEAR_LABEL
#define RS_MIN_INCITE_UNIT_FCT
#define RS_MIN_BORDER_SIZE_EFFECT
#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_MAX_ILLNESS_POLLUTION_PCT
#define RS_DEFAULT_ILLNESS_TRADE_INFECTION_PCT
#define RS_DEFAULT_FOOD_COST
#define RS_DEFAULT_INCITE_UNIT_FCT
#define RS_MAX_INCITE_TOTAL_FCT
#define RS_DEFAULT_INCITE_BASE_COST
#define GAME_DEFAULT_ANGRYCITIZEN
#define RS_DEFAULT_CITY_CENTER_OUTPUT
#define RS_MIN_INCITE_TOTAL_FCT
#define RS_DEFAULT_ILLNESS_POLLUTION_PCT
#define RS_MAX_UPGRADE_VETERAN_LOSS
static void set_ruleset_compat_mode(bool active)
#define RS_MAX_VIS_RADIUS_SQ
#define RS_MIN_GRANARY_FOOD_INC
#define RS_MAX_ILLNESS_TRADE_INFECTION_PCT
#define RS_DEFAULT_ILLNESS_MIN_SIZE
#define RS_DEFAULT_BORDER_RADIUS_SQ_CITY
const struct nation_type * ruler_title_nation(const struct ruler_title *pruler_title)
struct ruler_title * government_ruler_title_new(struct government *pgovern, const struct nation_type *pnation, const char *ruler_male_title, const char *ruler_female_title)
const char * ruler_title_female_untranslated_name(const struct ruler_title *pruler_title)
Government_type_id government_count(void)
const char * ruler_title_male_untranslated_name(const struct ruler_title *pruler_title)
void governments_alloc(int num)
Government_type_id government_number(const struct government *pgovern)
const struct ruler_title_hash * government_ruler_titles(const struct government *pgovern)
Government_type_id government_index(const struct government *pgovern)
const char * government_rule_name(const struct government *pgovern)
struct government * government_by_rule_name(const char *name)
#define governments_iterate(NAME_pgov)
#define ruler_titles_iterate(ARG_hash, NAME_rule_title)
#define ruler_titles_iterate_end
#define governments_iterate_end
struct impr_type * improvement_by_number(const Impr_type_id id)
Impr_type_id improvement_number(const struct impr_type *pimprove)
const char * improvement_rule_name(const struct impr_type *pimprove)
void improvement_feature_cache_init(void)
struct impr_type * improvement_by_rule_name(const char *name)
void set_user_impr_flag_name(enum impr_flag_id id, const char *name, const char *helptxt)
const char * impr_flag_helptxt(enum impr_flag_id id)
#define improvement_iterate_end
#define improvement_iterate(_p)
void vdo_log(const char *file, const char *function, int line, bool print_from_where, enum log_level level, char *buf, int buflen, const char *message, va_list args)
#define fc_assert_ret(condition)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_do_output_for_level(level)
#define log_debug(message,...)
#define log_normal(message,...)
#define log_error(message,...)
struct terrain_misc terrain_control
#define fc_calloc(n, esz)
int utype_unknown_move_cost(const struct unit_type *utype)
void init_move_fragments(void)
const char * multiplier_rule_name(const struct multiplier *pmul)
Multiplier_type_id multiplier_number(const struct multiplier *pmul)
struct multiplier * multiplier_by_rule_name(const char *name)
Multiplier_type_id multiplier_index(const struct multiplier *pmul)
#define multipliers_iterate(_mul_)
#define multipliers_iterate_end
static void name_set(struct name_translation *ptrans, const char *domain, const char *vernacular_name)
static const char * rule_name_get(const struct name_translation *ptrans)
static const char * untranslated_name(const struct name_translation *ptrans)
static void names_set(struct name_translation *ptrans, const char *domain, const char *vernacular_name, const char *rule_name)
void nation_group_set_match(struct nation_group *pgroup, int match)
const char * nation_group_untranslated_name(const struct nation_group *pgroup)
struct nation_group * nation_group_by_rule_name(const char *name)
const char * nation_rule_name(const struct nation_type *pnation)
Nation_type_id nation_count(void)
Nation_type_id nation_number(const struct nation_type *pnation)
struct nation_group * nation_group_new(const char *name)
bool nation_leader_is_male(const struct nation_leader *pleader)
struct nation_set * nation_set_new(const char *set_name, const char *set_rule_name, const char *set_description)
struct nation_type * nation_by_number(const Nation_type_id nation)
struct nation_city * nation_city_new(struct nation_type *pnation, const char *name)
const struct nation_leader_list * nation_leaders(const struct nation_type *pnation)
const char * nation_set_untranslated_name(const struct nation_set *pset)
bool is_nation_playable(const struct nation_type *nation)
int nation_set_number(const struct nation_set *pset)
void nation_city_set_terrain_preference(struct nation_city *pncity, const struct terrain *pterrain, enum nation_city_preference prefer)
void nation_city_set_river_preference(struct nation_city *pncity, enum nation_city_preference prefer)
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)
int nation_set_count(void)
struct nation_set * nation_set_by_number(int id)
struct nation_type * nation_by_rule_name(const char *name)
struct nation_set * nation_set_by_rule_name(const char *name)
Nation_type_id nation_index(const struct nation_type *pnation)
const char * nation_leader_name(const struct nation_leader *pleader)
int nation_group_count(void)
const char * nation_set_rule_name(const struct nation_set *pset)
struct nation_leader * nation_leader_new(struct nation_type *pnation, const char *name, bool is_male)
void nation_group_set_hidden(struct nation_group *pgroup, bool hidden)
void nations_alloc(int num)
enum barbarian_type nation_barbarian_type(const struct nation_type *nation)
int nation_group_number(const struct nation_group *pgroup)
#define nation_leader_list_iterate(leaderlist, pleader)
#define nation_sets_iterate_end
#define nation_set_list_iterate_end
#define nation_group_list_iterate(grouplist, pgroup)
#define nation_sets_iterate(NAME_pset)
#define nations_iterate_end
#define nations_iterate(NAME_pnation)
#define nation_leader_list_iterate_end
#define nation_group_list_iterate_end
#define nation_set_list_iterate(setlist, pset)
#define nation_groups_iterate(NAME_pgroup)
#define nation_groups_iterate_end
void notify_conn(struct conn_list *dest, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
#define web_lsend_packet(packetname,...)
#define PACKET_STRVEC_INSERT(dest, src)
void lsend_packet_ruleset_summary(struct conn_list *dest, const struct packet_ruleset_summary *packet)
void lsend_packet_ruleset_building(struct conn_list *dest, const struct packet_ruleset_building *packet)
void lsend_packet_ruleset_unit_class_flag(struct conn_list *dest, const struct packet_ruleset_unit_class_flag *packet)
void lsend_packet_ruleset_achievement(struct conn_list *dest, const struct packet_ruleset_achievement *packet)
void lsend_packet_ruleset_nation_sets(struct conn_list *dest, const struct packet_ruleset_nation_sets *packet)
void lsend_packet_ruleset_multiplier(struct conn_list *dest, const struct packet_ruleset_multiplier *packet)
void lsend_packet_ruleset_city(struct conn_list *dest, const struct packet_ruleset_city *packet)
void lsend_packet_ruleset_unit(struct conn_list *dest, const struct packet_ruleset_unit *packet)
void lsend_packet_ruleset_clause(struct conn_list *dest, const struct packet_ruleset_clause *packet)
void lsend_packet_ruleset_unit_flag(struct conn_list *dest, const struct packet_ruleset_unit_flag *packet)
void lsend_packet_ruleset_action(struct conn_list *dest, const struct packet_ruleset_action *packet)
void lsend_packet_ruleset_extra(struct conn_list *dest, const struct packet_ruleset_extra *packet)
void lsend_packet_ruleset_nation_groups(struct conn_list *dest, const struct packet_ruleset_nation_groups *packet)
void lsend_packet_ruleset_terrain_control(struct conn_list *dest, const struct packet_ruleset_terrain_control *packet)
void lsend_packet_ruleset_government_ruler_title(struct conn_list *dest, const struct packet_ruleset_government_ruler_title *packet)
void lsend_packet_ruleset_music(struct conn_list *dest, const struct packet_ruleset_music *packet)
void lsend_packet_ruleset_control(struct conn_list *dest, const struct packet_ruleset_control *packet)
void lsend_packet_team_name_info(struct conn_list *dest, const struct packet_team_name_info *packet)
void lsend_packet_ruleset_terrain_flag(struct conn_list *dest, const struct packet_ruleset_terrain_flag *packet)
void lsend_packet_ruleset_unit_class(struct conn_list *dest, const struct packet_ruleset_unit_class *packet)
void lsend_packet_ruleset_disaster(struct conn_list *dest, const struct packet_ruleset_disaster *packet)
void lsend_packet_ruleset_description_part(struct conn_list *dest, const struct packet_ruleset_description_part *packet)
void lsend_packet_ruleset_government(struct conn_list *dest, const struct packet_ruleset_government *packet)
void lsend_packet_ruleset_unit_bonus(struct conn_list *dest, const struct packet_ruleset_unit_bonus *packet)
void lsend_packet_ruleset_base(struct conn_list *dest, const struct packet_ruleset_base *packet)
void lsend_packet_ruleset_resource(struct conn_list *dest, const struct packet_ruleset_resource *packet)
void lsend_packet_ruleset_specialist(struct conn_list *dest, const struct packet_ruleset_specialist *packet)
void lsend_packet_ruleset_tech(struct conn_list *dest, const struct packet_ruleset_tech *packet)
void lsend_packet_ruleset_trade(struct conn_list *dest, const struct packet_ruleset_trade *packet)
void lsend_packet_ruleset_action_enabler(struct conn_list *dest, const struct packet_ruleset_action_enabler *packet)
void lsend_packet_ruleset_style(struct conn_list *dest, const struct packet_ruleset_style *packet)
void lsend_packet_ruleset_tech_flag(struct conn_list *dest, const struct packet_ruleset_tech_flag *packet)
void lsend_packet_ruleset_tech_class(struct conn_list *dest, const struct packet_ruleset_tech_class *packet)
void lsend_packet_ruleset_goods(struct conn_list *dest, const struct packet_ruleset_goods *packet)
void lsend_packet_ruleset_game(struct conn_list *dest, const struct packet_ruleset_game *packet)
void lsend_packet_ruleset_nation(struct conn_list *dest, const struct packet_ruleset_nation *packet)
void lsend_packet_ruleset_counter(struct conn_list *dest, const struct packet_ruleset_counter *packet)
void lsend_packet_rulesets_ready(struct conn_list *dest)
void lsend_packet_ruleset_impr_flag(struct conn_list *dest, const struct packet_ruleset_impr_flag *packet)
void lsend_packet_ruleset_extra_flag(struct conn_list *dest, const struct packet_ruleset_extra_flag *packet)
void lsend_packet_ruleset_road(struct conn_list *dest, const struct packet_ruleset_road *packet)
void lsend_packet_ruleset_terrain(struct conn_list *dest, const struct packet_ruleset_terrain *packet)
void lsend_packet_ruleset_action_auto(struct conn_list *dest, const struct packet_ruleset_action_auto *packet)
struct city_list * cities
void send_nation_availability(struct conn_list *dest, bool nationset_change)
void playercolor_free(void)
void playercolor_init(void)
int playercolor_count(void)
void playercolor_add(struct rgbcolor *prgbcolor)
void count_playable_nations(void)
struct section_file * secfile_load(const char *filename, bool allow_duplicates)
const char * secfile_error(void)
const char * section_name(const struct section *psection)
void secfile_destroy(struct section_file *secfile)
bool entry_bool_get(const struct entry *pentry, bool *value)
void secfile_check_unused(const struct section_file *secfile)
bool secfile_lookup_int(const struct section_file *secfile, int *ival, const char *path,...)
struct section_list * secfile_sections_by_name_prefix(const struct section_file *secfile, const char *prefix)
const char ** secfile_lookup_str_vec(const struct section_file *secfile, size_t *dim, const char *path,...)
const char * entry_name(const struct entry *pentry)
struct entry * secfile_entry_lookup(const struct section_file *secfile, const char *path,...)
bool entry_str_get(const struct entry *pentry, const char **value)
const char * secfile_lookup_str(const struct section_file *secfile, const char *path,...)
int * secfile_lookup_int_vec(const struct section_file *secfile, size_t *dim, const char *path,...)
bool secfile_lookup_bool_default(const struct section_file *secfile, bool def, const char *path,...)
int secfile_lookup_int_default(const struct section_file *secfile, int def, const char *path,...)
bool entry_int_get(const struct entry *pentry, int *value)
const char * secfile_name(const struct section_file *secfile)
struct entry * secfile_entry_by_path(const struct section_file *secfile, const char *path)
const char * secfile_lookup_str_default(const struct section_file *secfile, const char *def, const char *path,...)
int secfile_lookup_int_def_min_max(const struct section_file *secfile, int defval, int minval, int maxval, const char *path,...)
enum entry_type entry_type_get(const struct entry *pentry)
#define secfile_lookup_enum_vec(secfile, dim, specenum_type, path,...)
#define secfile_lookup_enum_default(secfile, defval, specenum_type, path,...)
#define section_list_iterate(seclist, psection)
#define section_list_iterate_end
req_vec_num_in_item req_vec_vector_number(const void *parent_item, const struct requirement_vector *vec)
struct requirement_vector * req_vec_by_number(const void *parent_item, req_vec_num_in_item number)
bool req_vec_change_apply(const struct req_vec_change *modification, requirement_vector_by_number getter, const void *parent_item)
bool are_requirements_equal(const struct requirement *req1, const struct requirement *req2)
struct requirement req_from_str(const char *type, const char *range, bool survives, bool present, bool quiet, const char *value)
struct requirement req_from_values(int type, int range, bool survives, bool present, bool quiet, int value)
void req_vec_problem_free(struct req_vec_problem *issue)
struct req_vec_problem * req_vec_get_first_missing_univ(const struct requirement_vector *vec, requirement_vector_number get_num, const void *parent_item)
struct req_vec_problem * req_vec_get_first_redundant_req(const struct requirement_vector *vec, requirement_vector_number get_num, const void *parent_item)
bool req_vec_is_impossible_to_fulfill(const struct requirement_vector *reqs)
#define requirement_vector_iterate_end
#define requirement_vector_iterate(req_vec, preq)
bool rgbcolor_load(struct section_file *file, struct rgbcolor **prgbcolor, char *path,...)
Road_type_id road_number(const struct road_type *proad)
void road_integrators_cache_init(void)
void road_type_init(struct extra_type *pextra, int idx)
bool load_action_ui_name_3_3(struct section_file *file, int act, const char *entry_name, struct rscompat_info *compat)
void rscompat_civil_war_effects_3_3(struct section_file *game_rs)
const char * rscompat_effect_name_3_3(const char *old_name)
bool rscompat_names(struct rscompat_info *info)
void rscompat_postprocess(struct rscompat_info *info)
const char * rscompat_utype_flag_name_3_3(const char *old_name)
int rscompat_check_capabilities(struct section_file *file, const char *filename, const struct rscompat_info *info)
void rscompat_enablers_add_obligatory_hard_reqs(void)
const char * blocked_by_old_name_3_3(const char *new_name)
const char * rscompat_universal_name_3_3(const char *old_name)
void rscompat_init_info(struct rscompat_info *info)
bool rscompat_check_cap_and_version(struct section_file *file, const char *filename, const struct rscompat_info *info)
#define ENABLER_SECTION_PREFIX
#define check_cityname(name)
static int ruleset_purge_redundant_reqs_enablers(void)
static void ruleset_load_traits(struct trait_limits *out, struct section_file *file, const char *secname, const char *field_prefix)
static bool load_rulesetdir(const char *rsdir, bool compat_mode, rs_conversion_logger logger, bool act, bool buffer_script, bool load_luadata)
#define STYLE_SECTION_PREFIX
static bool lookup_terrain(struct section_file *file, const char *entry, const char *filename, struct terrain *pthis, struct terrain **result, bool null_acceptable)
static bool load_ruleset_veteran(struct section_file *file, const char *path, struct veteran_system **vsystem, char *err, size_t err_len)
static bool load_terrain_names(struct section_file *file, struct rscompat_info *compat)
static bool load_style_names(struct section_file *file, struct rscompat_info *compat)
int ruleset_purge_unused_entities(void)
#define MUSICSTYLE_SECTION_PREFIX
static char * road_sections
static bool load_ruleset_governments(struct section_file *file, struct rscompat_info *compat)
#define MULTIPLIER_SECTION_PREFIX
static struct requirement_vector reqs_list
static void send_ruleset_techs(struct conn_list *dest)
#define section_strlcpy(dst, src)
static bool load_action_range(struct section_file *file, action_id act)
static void send_ruleset_units(struct conn_list *dest)
static void send_ruleset_governments(struct conn_list *dest)
static bool load_action_names(struct section_file *file, struct rscompat_info *compat)
static struct extra_type * lookup_resource(const char *filename, const char *name, const char *jsection)
static struct section_file * openload_luadata_file(const char *rsdir)
static bool load_ruleset_techs(struct section_file *file, struct rscompat_info *compat)
static bool purge_unused_req_vec(const struct requirement_vector *reqs, const char *msg)
void rulesets_deinit(void)
static void send_ruleset_resources(struct conn_list *dest)
static bool load_ruleset_buildings(struct section_file *file, struct rscompat_info *compat)
static char * terrain_sections
static bool lookup_building_list(struct section_file *file, const char *prefix, const char *entry, int *output, const char *filename)
static void nullcheck_secfile_destroy(struct section_file *file)
static void send_ruleset_clauses(struct conn_list *dest)
static void send_ruleset_game(struct conn_list *dest)
#define NATION_SECTION_PREFIX
static bool load_ruleset_effects(struct section_file *file, struct rscompat_info *compat)
static bool lookup_cbonus_list(struct combat_bonus_list *list, struct section_file *file, const char *sec, const char *sub)
static void send_ruleset_nations(struct conn_list *dest)
static void send_ruleset_roads(struct conn_list *dest)
static int ruleset_purge_unused_enablers(void)
#define UEFF_SECTION_PREFIX
static bool is_on_allowed_list(const char *name, const char **list, size_t len)
static void send_ruleset_tech_classes(struct conn_list *dest)
static void send_ruleset_action_enablers(struct conn_list *dest)
static void send_ruleset_control(struct conn_list *dest)
bool load_rulesets(const char *restore, const char *alt, bool compat_mode, rs_conversion_logger logger, bool act, bool buffer_script, bool load_luadata)
#define GOODS_SECTION_PREFIX
void ruleset_error_real(rs_conversion_logger logger, const char *file, const char *function, int line, enum log_level level, const char *format,...)
#define TERRAIN_SECTION_PREFIX
static struct section_file * openload_ruleset_file(const char *whichset, const char *rsdir)
static void send_ruleset_musics(struct conn_list *dest)
int ruleset_purge_redundant_reqs(void)
static int secfile_lookup_int_default_min_max(struct section_file *file, int def, int min, int max, const char *path,...) fc__attribute((__format__(__printf__
static char * base_sections
#define DISASTER_SECTION_PREFIX
static void send_ruleset_goods(struct conn_list *dest)
static const char name_too_long[]
bool reload_rulesets_settings(void)
static struct strvec * lookup_strvec(struct section_file *file, const char *prefix, const char *suffix)
#define CITYSTYLE_SECTION_PREFIX
static bool lookup_tech(struct section_file *file, struct advance **result, const char *prefix, const char *entry, const char *filename, const char *description)
static bool load_game_names(struct section_file *file, struct rscompat_info *compat)
static void send_ruleset_counters(struct conn_list *dest)
static void send_ruleset_specialists(struct conn_list *dest)
#define ADVANCE_SECTION_PREFIX
#define EFFECT_SECTION_PREFIX
static void send_ruleset_action_auto_performers(struct conn_list *dest)
static bool load_government_names(struct section_file *file, struct rscompat_info *compat)
static bool load_action_blocked_by_list(struct section_file *file, const char *filename, struct action *paction, struct rscompat_info *compat)
static void send_ruleset_team_names(struct conn_list *dest)
static void send_ruleset_cities(struct conn_list *dest)
static bool purge_redundant_req_vec(const struct requirement_vector *reqs, const char *msg)
static char * lookup_string(struct section_file *file, const char *prefix, const char *suffix)
static const char * check_leader_names(struct nation_type *pnation)
#define ACTION_ENABLER_SECTION_PREFIX
#define BASE_SECTION_PREFIX
static int ruleset_purge_redundant_reqs_effects(void)
static enum fc_tristate openload_script_file(const char *whichset, const char *rsdir, char **buffer, bool optional)
char * get_parser_buffer(void)
#define ACTION_SECTION_PREFIX
static bool load_building_names(struct section_file *file, struct rscompat_info *compat)
#define EXTRA_SECTION_PREFIX
void send_rulesets(struct conn_list *dest)
#define CLAUSE_SECTION_PREFIX
static bool lookup_unit_list(struct section_file *file, const char *prefix, const char *entry, struct unit_type **output, const char *filename)
static char * resource_sections
#define UNIT_SECTION_PREFIX
#define ACHIEVEMENT_SECTION_PREFIX
static bool load_ruleset_cities(struct section_file *file, struct rscompat_info *compat)
static bool load_ruleset_styles(struct section_file *file, struct rscompat_info *compat)
static struct government * lookup_government(struct section_file *file, const char *entry, const char *filename, struct government *fallback)
static bool load_ruleset_units(struct section_file *file, struct rscompat_info *compat)
static bool lookup_time(const struct section_file *secfile, int *turns, const char *sec_name, const char *property_name, const char *filename, const char *item_name, bool *ok)
static void send_ruleset_styles(struct conn_list *dest)
#define NATION_GROUP_SECTION_PREFIX
static char * extra_sections
struct requirement_vector * lookup_req_list(struct section_file *file, struct rscompat_info *compat, const char *sec, const char *sub, const char *rfor)
static void send_ruleset_disasters(struct conn_list *dest)
static bool purge_duplicate_req_vec(const struct requirement_vector *reqs, const char *msg)
static bool lookup_tech_list(struct section_file *file, const char *prefix, const char *entry, int *output, const char *filename)
#define MAX_SECTION_LABEL
#define BUILDING_SECTION_PREFIX
static bool load_ruleset_game(struct section_file *file, bool act, struct rscompat_info *compat)
static bool load_nation_names(struct section_file *file, struct rscompat_info *compat)
static void send_ruleset_achievements(struct conn_list *dest)
static void send_ruleset_bases(struct conn_list *dest)
static bool load_ruleset_terrain(struct section_file *file, struct rscompat_info *compat)
static int ruleset_purge_unused_effects(void)
static bool load_action_actor_consuming_always(struct section_file *file, action_id act)
static bool load_action_post_success_force(struct section_file *file, const char *filename, int performer_slot, struct action *paction)
static bool load_tech_names(struct section_file *file, struct rscompat_info *compat)
#define SPECIALIST_SECTION_PREFIX
#define COUNTER_SECTION_PREFIX
static bool load_action_kind(struct section_file *file, action_id act)
static void send_ruleset_multipliers(struct conn_list *dest)
char * get_script_buffer(void)
static void send_ruleset_actions(struct conn_list *dest)
static bool load_city_name_list(struct section_file *file, struct nation_type *pnation, const char *secfile_str1, const char *secfile_str2, const char **allowed_terrains, size_t atcount)
static bool load_action_auto_uflag_block(struct section_file *file, struct action_auto_perf *auto_perf, const char *uflags_path, const char *filename)
static bool load_ruleset_nations(struct section_file *file, struct rscompat_info *compat)
static bool load_action_auto_actions(struct section_file *file, struct action_auto_perf *auto_perf, const char *actions_path, const char *filename)
static void send_ruleset_unit_classes(struct conn_list *dest)
#define TECH_CLASS_SECTION_PREFIX
#define RESOURCE_SECTION_PREFIX
static bool lookup_unit_type(struct section_file *file, const char *prefix, const char *entry, const struct unit_type **result, const char *filename, const char *description)
static void send_ruleset_extras(struct conn_list *dest)
#define rs_sanity_veteran(_path, _entry, _i, _condition, _action)
static void send_ruleset_terrain(struct conn_list *dest)
#define GOVERNMENT_SECTION_PREFIX
static bool load_unit_names(struct section_file *file, struct rscompat_info *compat)
static void send_ruleset_trade_routes(struct conn_list *dest)
static bool load_ruleset_actions(struct section_file *file, struct section_file *gamefile, struct rscompat_info *compat)
static void notify_ruleset_fallback(const char *msg)
static bool lookup_bv_actions(struct section_file *file, const char *filename, bv_actions *target, const char *path)
static void send_ruleset_buildings(struct conn_list *dest)
#define UNIT_CLASS_SECTION_PREFIX
static bool ruleset_load_names(struct name_translation *pname, const char *domain, struct section_file *file, const char *sec_name)
#define ROAD_SECTION_PREFIX
static const char * valid_ruleset_filename(const char *subdir, const char *name, const char *extension, bool optional)
static bool load_action_range_max(struct section_file *file, action_id act)
static bool load_muuk_as_action_auto(struct section_file *file, struct action_auto_perf *auto_perf, const char *item, const char *filename)
#define NATION_SET_SECTION_PREFIX
#define RS_DEFAULT_CONVERT_SPEED
#define RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE
#define RS_DEFAULT_WORLD_PEACE_TURNS
#define RS_DEFAULT_TECH_TRADE_LOSS_HOLES
#define RS_DEFAULT_TECH_COST_STYLE
#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
void(* rs_conversion_logger)(const char *msg)
#define RS_DEFAULT_SMALL_WONDER_VISIBILITY
#define ruleset_error(logger, level, format,...)
#define RS_DEFAULT_ONLY_KILLING_VETERAN
#define RS_DEFAULT_TECH_LOSS_HOLES
#define RS_DEFAULT_HISTORY_INTEREST_PML
#define RS_DEFAULT_TECH_UPKEEP_STYLE
#define RS_DEFAULT_GOODS_SELECTION
#define RS_DEFAULT_PYTHAGOREAN_DIAGONAL
#define RS_DEFAULT_TECH_STEAL_HOLES
#define RS_MIN_MIN_TECH_COST
#define GAME_DEFAULT_ACH_UNIQUE
#define RS_MAX_BASE_TECH_COST
#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 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_MAX_MIN_TECH_COST
#define RS_DEFAULT_MIN_TECH_COST
#define GAME_DEFAULT_VISION_REVEAL_TILES
#define RS_DEFAULT_CULTURE_VIC_LEAD
#define RS_DEFAULT_TECH_LEAKAGE
#define GAME_DEFAULT_DISASTER_FREQ
#define RS_MIN_BASE_TECH_COST
static struct compatibility compat[]
bool script_server_init(void)
bool script_server_load_file(const char *filename, char **buf)
void script_server_free(void)
bool script_server_do_file(struct connection *caller, const char *filename)
struct setting_list * level[OLEVELS_NUM]
bool settings_ruleset(struct section_file *file, const char *section, bool act, bool compat)
sex_t sex_by_name(const char *name)
bool check_strlen(const char *str, size_t len, const char *errmsg)
const char * fileinfoname(const struct strvec *dirs, const char *filename)
void remove_leading_trailing_spaces(char *s)
const struct strvec * get_data_dirs(void)
struct specialist * specialist_by_number(const Specialist_type_id id)
const char * specialist_rule_name(const struct specialist *sp)
#define specialist_type_iterate_end
#define specialist_type_iterate(sp)
#define DEFAULT_SPECIALIST
const char * aifill(int amount)
void update_nations_with_startpos(void)
void strvec_store(struct strvec *psv, const char *const *vec, size_t size)
struct strvec * strvec_new(void)
bool actor_consuming_always
char ui_name[MAX_LEN_NAME]
bv_action_sub_results sub_results
enum action_actor_kind actor_kind
enum action_target_kind target_kind
struct advance * require[AR_SIZE]
enum base_gui_type gui_type
struct civ_game::@32::@36::@42 ruledit
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
char rulesetdir[MAX_LEN_NAME]
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 civ_game::@32::@36::@37 deprecated
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
enum unit_type_flag_id flag
enum combat_bonus_type type
char graphic_str[MAX_LEN_NAME]
char graphic_alt2[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement_vector obsolete_by
char soundtag_alt[MAX_LEN_NAME]
char soundtag_alt2[MAX_LEN_NAME]
struct requirement_vector reqs
struct name_translation name
char soundtag[MAX_LEN_NAME]
enum barbarian_type barb_type
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
Government_type_id government_during_revolution_id
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
Government_type_id default_government_id
int min_city_center_output[O_LAST]
char rule_name[MAX_LEN_NAME]
enum achievement_type type
action_id alternatives[MAX_NUM_ACTIONS]
struct requirement_vector reqs
enum action_auto_perf_cause cause
struct requirement_vector actor_reqs
struct requirement_vector target_reqs
enum action_sub_target_kind sub_tgt_kind
enum action_actor_kind act_kind
bool actor_consuming_always
bv_action_sub_results sub_results
char ui_name[MAX_LEN_NAME]
enum action_target_kind tgt_kind
enum action_result result
enum base_gui_type gui_type
struct requirement_vector reqs
struct requirement_vector obs_reqs
char soundtag_alt[MAX_LEN_NAME]
char soundtag[MAX_LEN_NAME]
char soundtag_alt2[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char graphic_alt2[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement_vector giver_reqs
struct requirement_vector receiver_reqs
struct requirement_vector either_reqs
char preferred_soundset[MAX_LEN_NAME]
char version[MAX_LEN_NAME]
char preferred_tileset[MAX_LEN_NAME]
char alt_dir[MAX_LEN_NAME]
int num_achievement_types
char preferred_musicset[MAX_LEN_NAME]
enum counter_behaviour behaviour
char rule_name[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
struct requirement_vector reqs
bv_disaster_effects effects
struct requirement_vector reqs
char rule_name[MAX_LEN_NAME]
char helptxt[MAX_LEN_PACKET]
struct requirement_vector reqs
char rule_name[MAX_LEN_NAME]
char music_combat[MAX_LEN_NAME]
struct requirement_vector reqs
char music_peaceful[MAX_LEN_NAME]
int init_techs[MAX_NUM_TECH_LIST]
char leader_name[MAX_NUM_LEADERS][MAX_LEN_NAME]
char noun_plural[MAX_LEN_NAME]
char adjective[MAX_LEN_NAME]
Impr_type_id init_buildings[MAX_NUM_BUILDING_LIST]
Unit_type_id init_units[MAX_NUM_UNIT_LIST]
bool leader_is_male[MAX_NUM_LEADERS]
char translation_domain[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
Government_type_id init_government_id
int groups[MAX_NUM_NATION_GROUPS]
enum barbarian_type barbarian_type
int sets[MAX_NUM_NATION_SETS]
char graphic_alt[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
int tile_incr_const[O_LAST]
enum road_gui_type gui_type
enum road_move_mode move_mode
struct requirement_vector first_reqs
char rule_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement_vector reqs
char short_name[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
char plural_name[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char text[MAX_LEN_CONTENT]
char rule_name[MAX_LEN_NAME]
char helptxt[MAX_LEN_PACKET]
char graphic_str[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement_vector research_reqs
char helptxt[MAX_LEN_PACKET]
int extra_removal_times[MAX_EXTRA_TYPES]
Terrain_type_id transform_result
int resource_freq[MAX_EXTRA_TYPES]
Resource_type_id resources[MAX_EXTRA_TYPES]
char graphic_str[MAX_LEN_NAME]
bv_unit_classes native_to
Terrain_type_id cultivate_result
Terrain_type_id plant_result
int road_output_incr_pct[O_LAST]
char graphic_alt[MAX_LEN_NAME]
char graphic_alt2[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
enum trade_route_illegal_cancelling cancelling
enum trade_route_bonus_type bonus_type
char helptxt[MAX_LEN_PACKET]
char rule_name[MAX_LEN_NAME]
bv_unit_class_flags flags
char helptxt[MAX_LEN_PACKET]
char graphic_alt[MAX_LEN_NAME]
enum transp_def_type tp_defense
char rule_name[MAX_LEN_NAME]
int power_fact[MAX_VET_LEVELS]
char graphic_alt2[MAX_LEN_NAME]
char graphic_str[MAX_LEN_NAME]
char sound_fight_alt[MAX_LEN_NAME]
bv_unit_classes disembarks
char sound_move_alt[MAX_LEN_NAME]
struct requirement_vector build_reqs
int base_raise_chance[MAX_VET_LEVELS]
int work_raise_chance[MAX_VET_LEVELS]
char sound_fight[MAX_LEN_NAME]
char veteran_name[MAX_VET_LEVELS][MAX_LEN_NAME]
char sound_move[MAX_LEN_NAME]
int move_bonus[MAX_VET_LEVELS]
enum road_gui_type gui_type
struct requirement_vector first_reqs
enum road_move_mode move_mode
int tile_incr_const[O_LAST]
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
struct veteran_level * definitions
struct nation_style * style_by_rule_name(const char *name)
struct nation_style * style_by_number(int id)
void styles_alloc(int count)
struct music_style * music_style_by_number(int id)
int style_number(const struct nation_style *pstyle)
void music_styles_alloc(int count)
int style_index(const struct nation_style *pstyle)
#define music_styles_iterate(_p)
#define music_styles_iterate_end
#define styles_iterate(_p)
#define styles_iterate_end
int fc_snprintf(char *str, size_t n, const char *format,...)
size_t fc_strlcpy(char *dest, const char *src, size_t n)
int fc_strcasecmp(const char *str0, const char *str1)
size_t fc_strlcat(char *dest, const char *src, size_t n)
int fc_vsnprintf(char *str, size_t n, const char *format, va_list ap)
#define sz_strlcpy(dest, src)
#define RETURN_VALUE_AFTER_EXIT(_val_)
struct team_slot * team_slot_by_number(int team_id)
const char * team_slot_defined_name(const struct team_slot *tslot)
int team_slot_index(const struct team_slot *tslot)
int team_slot_count(void)
void team_slot_set_defined_name(struct team_slot *tslot, const char *team_name)
#define team_slots_iterate_end
#define team_slots_iterate(_tslot)
struct advance * advance_by_number(const Tech_type_id atype)
const char * tech_flag_id_name_cb(enum tech_flag_id flag)
void set_user_tech_flag_name(enum tech_flag_id id, const char *name, const char *helptxt)
struct advance * valid_advance(struct advance *padvance)
void techs_precalc_data(void)
const char * advance_rule_name(const struct advance *padvance)
const char * tech_flag_helptxt(enum tech_flag_id id)
struct advance * advance_by_rule_name(const char *name)
struct tech_class * tech_class_by_rule_name(const char *name)
Tech_type_id advance_number(const struct advance *padvance)
#define tech_class_index(_ptclass_)
#define tech_class_iterate_end
#define MAX_NUM_USER_TECH_FLAGS
#define advance_iterate_all_end
#define advance_iterate_all(_p)
static Tech_type_id advance_count(void)
#define advance_iterate(_p)
#define tech_class_iterate(_p)
#define advance_iterate_end
struct terrain * terrain_by_rule_name(const char *name)
Terrain_type_id terrain_count(void)
const char * terrain_flag_id_name_cb(enum terrain_flag_id flag)
Terrain_type_id terrain_index(const struct terrain *pterrain)
struct terrain * terrain_by_number(const Terrain_type_id type)
const char * terrain_flag_helptxt(enum terrain_flag_id id)
struct resource_type * resource_type_init(struct extra_type *pextra)
void set_user_terrain_flag_name(enum terrain_flag_id id, const char *name, const char *helptxt)
Terrain_type_id terrain_number(const struct terrain *pterrain)
#define RESOURCE_FREQUENCY_MAXIMUM
#define terrain_type_iterate(_p)
#define TERRAIN_UNKNOWN_IDENTIFIER
#define terrain_type_iterate_end
#define RESOURCE_NONE_IDENTIFIER
#define RESOURCE_NULL_IDENTIFIER
#define RESOURCE_FREQUENCY_MINIMUM
#define MAX_NUM_USER_TER_FLAGS
#define terrain_resources_iterate_end
#define terrain_resources_iterate(pterrain, _res, _freq)
#define RESOURCE_FREQUENCY_DEFAULT
Goods_type_id goods_number(const struct goods_type *pgood)
enum trade_route_illegal_cancelling trade_route_cancelling_type_by_name(const char *name)
struct trade_route_settings * trade_route_settings_by_type(enum trade_route_type type)
const char * goods_rule_name(struct goods_type *pgood)
Goods_type_id goods_index(const struct goods_type *pgood)
enum trade_route_type trade_route_type_by_name(const char *name)
#define goods_type_iterate_end
#define goods_type_iterate(_p)
#define TRAIT_DEFAULT_VALUE
void set_unit_class_caches(struct unit_class *pclass)
const char * unit_class_flag_helptxt(enum unit_class_flag_id id)
struct unit_type * unit_type_by_rule_name(const char *name)
bool utype_has_role(const struct unit_type *punittype, int role)
void unit_type_action_cache_init(void)
void set_unit_type_caches(struct unit_type *ptype)
void role_unit_precalcs(void)
void veteran_system_definition(struct veteran_system *vsystem, int level, const char *vlist_name, int vlist_power, int vlist_move, int vlist_raise, int vlist_wraise)
Unit_type_id utype_count(void)
int utype_veteran_levels(const struct unit_type *punittype)
const char * utype_rule_name(const struct unit_type *punittype)
const struct veteran_level * utype_veteran_level(const struct unit_type *punittype, int level)
const char * uclass_rule_name(const struct unit_class *pclass)
Unit_type_id utype_number(const struct unit_type *punittype)
struct unit_class * unit_class_by_rule_name(const char *s)
const char * unit_type_flag_helptxt(enum unit_type_flag_id id)
Unit_type_id utype_index(const struct unit_type *punittype)
void set_user_unit_class_flag_name(enum unit_class_flag_id id, const char *name, const char *helptxt)
struct veteran_system * veteran_system_new(int count)
Unit_Class_id uclass_number(const struct unit_class *pclass)
bool utype_can_do_action(const struct unit_type *putype, const action_id act_id)
void set_user_unit_type_flag_name(enum unit_type_flag_id id, const char *name, const char *helptxt)
static bool uclass_has_flag(const struct unit_class *punitclass, enum unit_class_flag_id flag)
#define combat_bonus_list_iterate_end
#define combat_bonus_list_iterate(bonuslist, pbonus)
#define unit_tech_reqs_iterate_end
#define unit_class_iterate(_p)
#define unit_tech_reqs_iterate(_utype_, _p)
#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_type_iterate(_p)
#define uclass_index(_c_)
#define unit_class_iterate_end
#define unit_type_iterate_end
#define MAX_NUM_USER_UCLASS_FLAGS