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 MULTIPLIER_SECTION_PREFIX "multiplier_"
114#define COUNTER_SECTION_PREFIX "counter_"
116#define check_name(name) (check_strlen(name, MAX_LEN_NAME, NULL))
117#define check_cityname(name) (check_strlen(name, MAX_LEN_CITYNAME, NULL))
121#define MAX_SECTION_LABEL 64
122#define section_strlcpy(dst, src) \
123 (void) loud_strlcpy(dst, src, MAX_SECTION_LABEL, name_too_long)
160 const char **allowed_terrains,
217 const char *file,
const char *
function,
219 const char *format, ...)
229 if (logger !=
NULL) {
263 ae->ruledit_disabled =
TRUE;
267 log_normal(
"Purged all action enablers for %s",
274 if (!
ae->ruledit_disabled
277 ae->ruledit_disabled =
TRUE;
279 log_normal(
"Purged unused action enabler for %s",
294 enum effect_type
type;
300 eft->rulesave.do_not_save =
TRUE;
342 if (
problem->num_suggested_solutions == 0) {
348 if (
problem->num_suggested_solutions == 1
382 if (
problem->num_suggested_solutions == 0) {
388 if (
problem->num_suggested_solutions == 2
392 &
problem->suggested_solutions[1].req)) {
435 "Purged redundant requirement in"
436 " %s in action enabler for %s",
439 "Purged redundant requirement in"
440 " %s in action enabler for %s",
446 while (!
ae->ruledit_disabled
465 enum effect_type
type;
473 "Purged redundant requirement in effect of type %s",
529 log_verbose(
"Trying \"%s\": default ruleset directory.", filename);
535 fc_snprintf(filename,
sizeof(filename),
"%s_%s.%s",
537 log_verbose(
"Trying \"%s\": alternative ruleset filename syntax.",
545 _(
"Could not find a readable \"%s.%s\" ruleset file."),
589 if (secfile ==
NULL) {
610 if (buffer ==
NULL) {
643 if (secfile ==
NULL) {
663 const char *filename;
670 sec, sub, j)); j++) {
673 bool survives, present, quiet;
711 "\"%s\": trying to have an floating point entry as a requirement name in '%s.%s%d'.",
712 filename, sec, sub, j);
726 "\"%s\": error in handling requirement name for '%s.%s%d'.",
727 filename, sec, sub, j);
742 "\"%s\": invalid boolean value for survives for "
743 "'%s.%s%d'.", filename, sec, sub, j);
751 "\"%s\": invalid boolean value for present for "
752 "'%s.%s%d'.", filename, sec, sub, j);
759 "\"%s\": invalid boolean value for quiet for "
760 "'%s.%s%d'.", filename, sec, sub, j);
766 "\"%s\" [%s] has invalid or unknown req: "
789 const char *filename;
795 sec, sub, j)); j++) {
801 log_error(
"\"%s\": unknown flag name \"%s\" in '%s.%s'.",
802 filename,
flag, sec, sub);
810 log_error(
"\"%s\": unknown bonus type \"%s\" in '%s.%s'.",
811 filename,
type, sec, sub);
818 log_error(
"\"%s\": failed to get value from '%s.%s%d'.",
819 filename, sec, sub, j);
843 const char *prefix,
const char *
entry,
844 const char *filename,
845 const char *description)
857 "\"%s\" %s %s: couldn't match \"%s\".",
858 filename, (description ? description : prefix),
entry,
sval);
876 const char *filename)
897 "\"%s\": string vector %s.%s too long (%d, max %d)",
911 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
934 const char *
entry,
int *output,
935 const char *filename)
951 "\"%s\": string vector %s.%s too long (%d, max %d)",
961 for (
i = 0;
i <
nval && ok;
i++) {
967 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
973 "\"%s\" %s.%s (%d): \"%s\" is removed.",
998 const char *prefix,
const char *
entry,
999 int *output,
const char *filename)
1013 "\"%s\": string vector %s.%s too long (%d, max %d)",
1027 if (
NULL == pimprove) {
1029 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
1053 const char *filename,
1054 const char *description)
1064 if (*result ==
NULL) {
1066 "\"%s\" %s %s: couldn't match \"%s\".",
1067 filename, (description ? description : prefix),
entry,
sval);
1082 const char *filename,
1096 "\"%s\" %s: couldn't match \"%s\".",
1126 const char *prefix,
const char *
suffix)
1130 "%s.%s", prefix,
suffix);
1155 "\"%s\" [%s] has unknown \"%s\".",
1168 const char *filename,
1201 "\"%s\" [%s] has unknown \"%s\".",
1218 const char *filename,
const char *
item_name,
1228 if (*turns > max_turns) {
1230 "\"%s\": \"%s\": \"%s\" value %d too large (max %d)",
1252 "\"%s\" [%s]: no \"name\" specified.",
1327 "\"%s\": Too many achievement types (%d, max %d)",
1340 "\"%s\": Cannot load achievement names",
1358 "\"%s\": Too many goods types (%d, max %d)",
1362 }
else if (
nval < 1) {
1364 "\"%s\": At least one goods type needed",
1379 "\"%s\": Cannot load goods names",
1416 "\"%s\": Cannot load counters names",
1479 "\"%s\": Duplicate tech flag name '%s'",
1486 "\"%s\": Too many user tech flags!",
1510 "\"%s\": Too many tech classes (%d, max %d)",
1538 "\"%s\": No Advances?!?", filename);
1544 "\"%s\": Too many advances (%d, max %d)",
1617 "\"%s\" [%s] \"%s\": \"Never\" with non-\"Never\".",
1624 "\"%s\" [%s] \"%s\": should have \"None\" second.",
1639 if (a->tclass ==
NULL) {
1641 "\"%s\" [%s] \"%s\": Unknown tech class \"%s\".",
1653 if (research_reqs ==
NULL) {
1663 for (j = 0; j <
nval; j++) {
1671 "\"%s\" [%s] \"%s\": bad flag name \"%s\".",
1720 && (a == b->require[
AR_ONE] || a == b->require[
AR_TWO])) {
1722 b->inherited_root_req =
TRUE;
1755 "\"%s\" tech \"%s\": req1 leads to removed tech.",
1762 "\"%s\" tech \"%s\": req2 leads to removed tech.",
1809 "\"%s\": Duplicate unit flag name '%s'",
1816 "\"%s\": Too many user unit type flags!",
1836 "control.class_flags%d.name",
1840 "control.class_flags%d.helptxt",
i);
1845 "\"%s\": Duplicate unit class flag name '%s'",
1852 "\"%s\": Too many user unit class flags!",
1874 "\"%s\": No unit classes?!?", filename);
1880 "\"%s\": Too many unit classes (%d, max %d)",
1908 "\"%s\": No unit types?!?", filename);
1914 "\"%s\": Too many unit types (%d, max %d)",
1960 "%s.veteran_names", path);
1962 "%s.veteran_power_fact", path);
1964 "%s.veteran_base_raise_chance", path);
1966 "%s.veteran_work_raise_chance",
1969 "%s.veteran_move_bonus", path);
1991#define rs_sanity_veteran(_path, _entry, _i, _condition, _action) \
1993 log_error("Invalid veteran definition '%s.%s[%d]'!", \
1994 _path, _entry, _i); \
1995 log_debug("Failed check: '%s'. Update value: '%s'.", \
1996 #_condition, #_action); \
2037#undef rs_sanity_veteran
2077 "Error loading the default veteran system: %s",
2108 "%s.non_native_def_pct",
2113 for (j = 0; j <
nval; j++) {
2129 "\"%s\" unit_class \"%s\": unit_type flag \"%s\"!",
2133 "\"%s\" unit_class \"%s\": bad flag name \"%s\".",
2170 msg,
sizeof(msg))) {
2172 "Error loading the veteran system: %s",
2179 &u->obsoleted_by, filename,
2182 &u->converted_to, filename,
2187 u->convert_time = 1;
2205 "\"%s\" unit_type \"%s\": bad class \"%s\".",
2267 if (u->firepower <= 0) {
2269 "\"%s\" unit_type \"%s\":"
2271 " but must be at least 1. "
2272 " If you want no attack ability,"
2273 " set the unit's attack strength to 0.",
2288 if (u->transport_capacity > 0) {
2291 "\"%s\" unit type \"%s\" "
2292 "has transport_cap %d, but no cargo unit classes.",
2300 "\"%s\" unit type \"%s\" "
2301 "has cargo defined, but transport_cap is 0.",
2309 for (j = 0; j <
nval; j++) {
2314 "\"%s\" unit_type \"%s\":"
2315 "has unknown unit class %s as cargo.",
2331 for (j = 0; j <
nval; j++) {
2336 "\"%s\" unit_type \"%s\":"
2337 "has unknown unit class %s as target.",
2353 for (j = 0; j <
nval; j++) {
2358 "\"%s\" unit_type \"%s\":"
2359 "has unknown unit class %s as embarkable.",
2375 for (j = 0; j <
nval; j++) {
2380 "\"%s\" unit_type \"%s\":"
2381 "has unknown unit class %s as disembarkable.",
2410 "\"%s\" unit_type \"%s\":"
2411 "has unknown vision layer %s.",
2420 0,
"%s.paratroopers_range",
sec_name);
2434 "\"%s\" unit_type \"%s\":"
2435 " bad tp_defense \"%s\".",
2453 for (j = 0; j <
nval; j++) {
2464 "\"%s\" unit_type \"%s\": unit_class flag!",
2468 "\"%s\" unit_type \"%s\": bad flag name \"%s\".",
2493 for (j = 0; j <
nval; j++) {
2501 "\"%s\" unit_type \"%s\": bad role name \"%s\".",
2520 "\"%s\" unit_type \"%s\": depends on removed tech \"%s\".",
2568 "\"%s\": No improvements?!?", filename);
2571 log_verbose(
"%d improvement types (including possibly unused)",
nval);
2574 "\"%s\": Too many improvements (%d, max %d)",
2596 "control.building_flags%d.name",
2600 "control.building_flags%d.helptxt",
i);
2605 "\"%s\": Duplicate building flag name '%s'",
2612 "\"%s\": Too many user building flags!",
2641 for (
i = 0;
i <
nval && ok;
i++) {
2660 "\"%s\" improvement \"%s\": couldn't match "
2661 "genus \"%s\".", filename,
2670 for (j = 0; j <
nflags; j++) {
2678 "\"%s\" improvement \"%s\": bad flag name \"%s\".",
2699 if (obs_reqs ==
NULL) {
2779 "\"%s\": Duplicate terrain flag name '%s'",
2786 "\"%s\": Too many user terrain flags!",
2805 "control.extra_flags%d.name",
2809 "control.extra_flags%d.helptxt",
i);
2814 "\"%s\": Duplicate extra flag name '%s'",
2821 "\"%s\": Too many user extra flags!",
2841 "\"%s\": ruleset doesn't have any terrains.",
2847 "\"%s\": Too many terrains (%d, max %d)",
2886 "\"%s\": Too many extra types (%d, max %d)",
2903 for (idx = 0; idx <
nval; idx++) {
2926 "\"%s\": Too many base types (%d, max %d)",
2944 for (idx = 0; idx <
nval; idx++) {
2951 if (pextra !=
NULL) {
2956 "No extra definition matching base definition \"%s\"",
2962 "Base section \"%s\" does not associate base with any extra",
2979 "\"%s\": Too many road types (%d, max %d)",
2997 for (idx = 0; idx <
nval; idx++) {
3004 if (pextra !=
NULL) {
3009 "No extra definition matching road definition \"%s\"",
3015 "Road section \"%s\" does not associate road with any extra",
3031 "\"%s\": Too many resource types (%d, max %d)",
3049 for (idx = 0; idx <
nval; idx++) {
3059 if (pextra !=
NULL) {
3064 "No extra definition matching resource definition \"%s\"",
3070 "Resource section %s does not list extra this resource belongs to.",
3103 "parameters.ocean_reclaim_requirement");
3106 "parameters.land_channel_requirement");
3109 "parameters.thaw_requirement");
3112 "parameters.freeze_requirement");
3115 "parameters.lake_max_size");
3118 "parameters.min_start_native_area");
3121 "parameters.move_fragments");
3124 "\"%s\": move_fragments must be at least 1",
3131 "parameters.igter_cost");
3134 "\"%s\": igter_cost must be at least 1",
3143 "parameters.pythagorean_diagonal");
3147 "parameters.ocean_resources");
3150 N_(
"?gui_type:Build Type A Base"),
3151 "extraui.ui_name_base_fortress");
3155 N_(
"?gui_type:Build Type B Base"),
3156 "extraui.ui_name_base_airbase");
3178 pterrain->identifier
3180 if (
'\0' == pterrain->identifier) {
3182 "\"%s\" [%s] identifier missing value.",
3189 "\"%s\" [%s] cannot use '%c' as an identifier;"
3190 " it is reserved for unknown terrain.",
3191 filename,
tsection, pterrain->identifier);
3198 "\"%s\" [%s] has the same identifier as [%s].",
3214 "\"%s\": [%s] unknown class \"%s\"",
3240 "\"%s\": [%s] Different lengths for resources "
3241 "and resource frequencies",
3245 pterrain->resources =
fc_calloc(
nval + 1,
sizeof(*pterrain->resources));
3247 sizeof(*pterrain->resource_freq));
3248 for (j = 0; j <
nval; j++) {
3250 if (pterrain->resources[j] ==
NULL) {
3254 pterrain->resource_freq[j] = j <
nval2
3260 "\"%s\": [%s] Resource frequency '%d' "
3261 "outside allowed range",
3263 pterrain->resource_freq[j]);
3270 pterrain->resource_freq[
nval] = 0;
3281 pterrain->road_output_incr_pct[
o]
3287 filename,
NULL, &ok)
3289 filename,
NULL, &ok)) {
3295 if (!
lookup_terrain(file,
"cultivate_result", filename, pterrain,
3296 &pterrain->cultivate_result,
FALSE)) {
3301 if (pterrain->cultivate_result == pterrain) {
3303 "%s: Cultivating result in terrain itself.",
3309 "%s.irrigation_food_incr",
tsection)
3318 &pterrain->plant_result,
FALSE)) {
3323 if (pterrain->plant_result == pterrain) {
3325 "%s: Planting result in terrain itself.",
3342 "%s: Missing cultivate_time",
tsection);
3346 if ((pterrain->cultivate_result !=
NULL
3347 && pterrain->cultivate_time <= 0)
3348 || (pterrain->cultivate_result ==
NULL
3349 && pterrain->cultivate_time > 0)) {
3351 "%s: cultivate_result and cultivate_time disagree "
3352 "whether cultivating is enabled",
tsection);
3360 "%s: Missing plant_time",
tsection);
3364 if ((pterrain->plant_result !=
NULL
3365 && pterrain->plant_time <= 0)
3366 || (pterrain->plant_result ==
NULL
3367 && pterrain->plant_time > 0)) {
3369 "%s: plant_result and plant_time disagree "
3370 "whether planting is enabled",
tsection);
3376 &pterrain->animal, filename,
3382 if (!
lookup_terrain(file,
"transform_result", filename, pterrain,
3383 &pterrain->transform_result,
TRUE)) {
3393 if ((pterrain->transform_result !=
NULL
3394 && pterrain->transform_time <= 0)
3395 || (pterrain->transform_result ==
NULL
3396 && pterrain->transform_time > 0)) {
3398 "%s: transform_result and transform_time disagree "
3399 "whether transforming is enabled",
tsection);
3404 pterrain->placing_time = 1;
3408 pterrain->pillage_time = 1;
3412 if (!
lookup_terrain(file,
"warmer_wetter_result", filename, pterrain,
3413 &pterrain->warmer_wetter_result,
TRUE)
3414 || !
lookup_terrain(file,
"warmer_drier_result", filename, pterrain,
3415 &pterrain->warmer_drier_result,
TRUE)
3416 || !
lookup_terrain(file,
"cooler_wetter_result", filename, pterrain,
3417 &pterrain->cooler_wetter_result,
TRUE)
3418 || !
lookup_terrain(file,
"cooler_drier_result", filename, pterrain,
3419 &pterrain->cooler_drier_result,
TRUE)) {
3426 pterrain->extra_removal_times[
extra_index(pextra)] = 0;
3430 "%s.extra_settings%d.extra",
3434 if (pextra !=
NULL) {
3438 "%s.extra_settings%d",
tsection, j);
3444 "\"%s\" [%s] has settings for unknown extra \"%s\".",
3454 for (j = 0; j <
nval; j++) {
3461 "\"%s\" [%s] has unknown flag \"%s\".",
3466 BV_SET(pterrain->flags, flag);
3483 pterrain->property[
mtp]
3491 for (j = 0; j <
nval; j++) {
3496 "\"%s\" [%s] is native to unknown unit class \"%s\".",
3516 "Missing terrain color definition: %s",
3549 "\"%s\" extra \"%s\" has no category.",
3557 "\"%s\" extra \"%s\" has invalid category \"%s\".",
3571 "\"%s\" extra \"%s\": unknown cause \"%s\".",
3576 pextra->causes |= (1 << cause);
3581 if (pextra->causes == 0) {
3597 pextra->rmcauses = 0;
3598 for (j = 0; j <
nval; j++) {
3605 "\"%s\" extra \"%s\": unknown rmcause \"%s\".",
3610 pextra->rmcauses |= (1 <<
rmcause);
3631 "%s.rmact_gfx_alt",
section));
3634 "%s.rmact_gfx_alt2",
section));
3675 pextra->build_time = 0;
3679 "%s.build_time_factor",
section);
3680 pextra->removal_time = 0;
3684 "%s.removal_time_factor",
section);
3687 if (pextra->infracost > 0) {
3694 if (pextra->defense_bonus != 0) {
3706 "\"%s\" extra \"%s\" has illegal unit_seen value \"%s\".",
3716 "%s.appearance_chance",
3720 "%s.disappearance_chance",
3724 "%s.no_aggr_near_city",
3729 for (j = 0; j <
nval; j++) {
3732 if (uclass ==
NULL) {
3734 "\"%s\" extra \"%s\" is native to unknown unit class \"%s\".",
3750 for (j = 0; j <
nval; j++) {
3758 "\"%s\" extra \"%s\": unknown flag \"%s\".",
3763 BV_SET(pextra->flags, flag);
3768 if (pextra->no_aggr_near_city >= 0) {
3781 for (j = 0; j <
nval; j++) {
3787 "\"%s\" extra \"%s\": unknown conflict extra \"%s\".",
3805 for (j = 0; j <
nval; j++) {
3811 "\"%s\" extra \"%s\" hidden by unknown extra \"%s\".",
3827 for (j = 0; j <
nval; j++) {
3833 "\"%s\" extra \"%s\" bridged over unknown extra \"%s\".",
3848 "%s.visibility_req",
section);
3853 "\"%s\" %s: unknown visibility_req %s.",
3874 if (!presource->data.resource) {
3876 "\"%s\" extra \"%s\" has \"Resource\" cause but no "
3877 "corresponding [resource_*] section",
3884 presource->data.resource->output[
o] =
3892 presource->data.resource->id_old_save =
'\0';
3896 presource->data.resource->id_old_save = identifier[0];
3899 "\"%s\" [%s] identifier missing value.",
3906 "\"%s\" [%s] cannot use '%c' as an identifier;"
3908 filename,
rsection, presource->data.resource->id_old_save);
3928 "\"%s\" resource section [%s]: extra \"%s\" does not "
3929 "have \"Resource\" in its causes",
3941 if (
pres->data.resource->id_old_save !=
'\0') {
3943 if (
pres->data.resource->id_old_save ==
pres2->data.resource->id_old_save
3946 "\"%s\" [%s] has the same identifier as [%s].",
3971 "\"%s\" extra \"%s\" has \"Base\" cause but no "
3972 "corresponding [base_*] section",
3983 "\"%s\" base \"%s\": unknown gui_type \"%s\".",
3992 "%s.vision_main_sq",
3995 "%s.vision_invis_sq",
3998 "%s.vision_subs_sq",
4032 "\"%s\" base section [%s]: extra \"%s\" does not have "
4033 "\"Base\" in its causes",
4045 const char *special;
4052 "\"%s\" extra \"%s\" has \"Road\" cause but no "
4053 "corresponding [road_*] section",
4064 "\"%s\" road \"%s\": unknown gui_type \"%s\".",
4089 "Illegal move_mode \"%s\" for road \"%s\"",
4096 proad->tile_incr_const[
o] =
4111 "Multiple roads marked as compatibility \"Road\"");
4119 "Multiple roads marked as compatibility \"Railroad\"");
4127 "Multiple roads marked as compatibility \"River\"");
4136 "Illegal compatibility special \"%s\" for road %s",
4147 for (j = 0; j <
nval; j++) {
4158 "\"%s\" road \"%s\" integrates with unknown road \"%s\".",
4174 for (j = 0; j <
nval; j++) {
4180 "\"%s\" road \"%s\": unknown flag \"%s\".",
4202 "\"%s\" road section [%s]: extra \"%s\" does not have "
4203 "\"Road\" in its causes",
4253 "\"%s\": Too many governments (%d, max %d)",
4282 "\"%s\": Too many multipliers (%d, max %d)",
4297 "\"%s\": Cannot load multiplier names",
4350 if (g->ai.better ==
NULL) {
4355 g->ai.better =
NULL;
4378 const char *male, *female;
4384 "Lack of default ruler titles for "
4385 "government \"%s\" (nb %d): %s",
4392 "Lack of default ruler titles for "
4393 "government \"%s\" (nb %d).",
4420 if (pmul->stop <= pmul->start) {
4422 "Multiplier \"%s\" stop (%d) must be greater "
4424 pmul->stop, pmul->start);
4433 if (((pmul->stop - pmul->start) % pmul->step) != 0) {
4435 "Multiplier \"%s\" step (%d) does not fit "
4436 "exactly into interval start-stop (%d to %d)",
4438 pmul->start, pmul->stop);
4447 if (pmul->def < pmul->start || pmul->def > pmul->stop) {
4449 "Multiplier \"%s\" default (%d) not within "
4451 pmul->def, pmul->start, pmul->stop);
4455 if (((pmul->def - pmul->start) % pmul->step) != 0) {
4457 "Multiplier \"%s\" default (%d) not legal "
4458 "with respect to step size %d",
4467 if (pmul->factor == 0) {
4469 "Multiplier \"%s\" scaling factor must "
4586 "No available nations in this ruleset!");
4590 "Too many nations (max %d, we have %d)!",
4601 "%s.translation_domain",
sec_name);
4607 domain =
"freeciv-nations";
4611 pl->translation_domain =
NULL;
4616 "Unsupported translation domain \"%s\" for %s",
4626 name_set(&
pl->noun_plural,
pl->translation_domain, noun_plural);
4629 for (j = 0; j <
i && ok; j++) {
4638 "Two nations defined with the same adjective \"%s\": "
4639 "in section \'%s\' and section \'%s\'",
4648 "Two nations defined with the same rule_name \"%s\": "
4649 "in section \'%s\' and section \'%s\'",
4657 "Two nations defined with the same plural name \"%s\": "
4658 "in section \'%s\' and section \'%s\'",
4708 for (
i = 0;
i <
len;
i++) {
4724 const char **allowed_terrains,
4737 for (j = 0; j <
dim; j++) {
4752 if (!(end =
strchr(p,
')'))) {
4754 "\"%s\" [%s] %s: city name \"%s\" "
4759 for (*end++ =
'\0';
'\0' != *end; end++) {
4762 "\"%s\" [%s] %s: city name \"%s\" "
4763 "contains characters after last parenthesis.",
4779 "\"%s\" [%s] %s: city name \"%s\" is too long.",
4792 if ((next =
strchr(p,
','))) {
4812 "\"%s\" [%s] %s: city \"%s\" "
4813 "has terrain hint \"%s\" not in allowed_terrains.",
4823 if (
NULL == pterrain) {
4832 if (pterrain ==
NULL) {
4849 "\"%s\" [%s] %s: city \"%s\" "
4850 "has terrain hint \"%s\" not in allowed_terrains.",
4856 }
else if (!pterrain) {
4862 "\"%s\" [%s] %s: city \"%s\" "
4863 "has unknown terrain hint \"%s\".",
4870 if (
NULL != pterrain) {
4875 p = next ? next + 1 :
NULL;
4876 }
while (
NULL != p &&
'\0' != *p);
4911 "ruledit.embedded_nations");
4943 "Default values for trait %s not sane.",
4952 "compatibility.allowed_govs");
4968 "compatibility.allowed_terrains");
4984 "compatibility.allowed_styles");
5000 "compatibility.default_government");
5008 "Tried to set unknown government type \"%s\" as default_government!",
5046 "must be defined.");
5054 "compatibility.default_nationset");
5061 "Unknown default_nationset \"%s\".",
sval);
5110 char tmp[200] =
"\0";
5121 for (j = 0; j <
dim; j++) {
5136 log_verbose(
"Nation %s: Unknown set/group \"%s\".",
5145 "Nation %s is not a member of any nation set",
5153 for (j = 0; j <
dim; j++) {
5158 "Nation %s conflicts with itself",
5169 log_verbose(
"Nation %s: conflicts_with nation \"%s\" is unknown.",
5184 bool is_male =
FALSE;
5197 "Nation %s: leader name \"%s\" is too long.",
5206 "Nation %s: leader \"%s\": %s.",
5223 "Nation %s: leader \"%s\" has unsupported "
5224 "sex variant \"%s\".",
5246 "Nation %s: Too many leaders; max is %d",
5250 }
else if (0 == j) {
5252 "Nation %s: no leaders; at least one is required.",
5261 "Nation %s: leader \"%s\" defined more than once.",
5276 if (pnation->server.traits[
tr].min < 0) {
5281 if (pnation->server.traits[
tr].max < 0) {
5286 if (pnation->server.traits[
tr].fixed < 0) {
5290 int diff = pnation->server.traits[
tr].max - pnation->server.traits[
tr].min;
5293 pnation->server.traits[
tr].fixed = diff / 2 + pnation->server.traits[
tr].min;
5296 if (pnation->server.traits[
tr].max < pnation->server.traits[
tr].min) {
5298 "%s values for trait %s not sane.",
5309 pnation->is_playable =
5318 "Nation %s, barbarian_type is invalid (\"%s\")",
5325 && pnation->is_playable) {
5329 "Nation %s marked both barbarian and playable.",
5344 const char *male, *female;
5347 "%s.ruler_titles%d.government",
5374 "Nation %s: government \"%s\" not in allowed_govs.",
5386 "Nation %s: government \"%s\" not found.",
5392 if (
NULL != male &&
NULL != female) {
5414 if (pnation->style ==
NULL) {
5420 "Nation %s: Illegal style \"%s\"",
5425 log_verbose(
"Nation %s: style \"%s\" not supported in this "
5426 "ruleset; using default.",
5435 for (j = 0; j <
dim; j++) {
5443 "Nation %s is its own civil war nation",
5455 log_verbose(
"Nation %s: civil war nation \"%s\" is unknown.",
5468 pnation->init_techs, filename)) {
5473 pnation->init_buildings, filename)) {
5478 pnation->init_units, filename)) {
5489 if (pnation->init_government ==
NULL) {
5500 "Nation %s: init_government \"%s\" not allowed.",
5520 "Nation %s: legend \"%s\" is too long.",
5527 pnation->player =
NULL;
5578 "Nation set \"%s\" has no playable nations. "
5585 "No land barbarian nation defined in set \"%s\". "
5592 "No sea barbarian nation defined in set \"%s\". "
5624 "No available nation styles in this ruleset!");
5749 const char *filename)
5765 "\"%s\": %s: bad unit type flag list.",
5792 const char *filename)
5806 "\"%s\": %s: bad action list",
5828 const char *filename)
5834 "missing_unit_upkeep.%s_protected",
item);
5836 "missing_unit_upkeep.%s_unit_act",
item);
5866 "\"%s\": Too many specialists (%d, max %d).",
5894 "\"%s\": No graphic tag for specialist at %s.",
5922 "\"%s\": must give a min_size of 0 for at least one "
5923 "specialist type.", filename);
5934 "parameters.celebrate_size_limit");
5939 "parameters.angry_citizens");
5952 "\"%s\": Forced taxes do not add up in ruleset!",
5962 "parameters.vision_reveal_tiles");
5970 "citizen.nationality");
5973 "citizen.ubuilder_nationality");
5976 "citizen.convert_speed");
6004 "missing_unit_upkeep.food_wipe");
6023 "missing_unit_upkeep.gold_wipe");
6042 "missing_unit_upkeep.shield_wipe");
6059 const char *filename;
6083 "\"%s\" [%s] missing effect type.",
6091 "\"%s\" [%s] lists unknown effect type \"%s\".",
6098 "\"%s\" [%s] type \"%s\" is not an user effect.",
6107 "\"%s\" [%s] missing ai_valued_as.",
6115 "\"%s\" [%s] lists unknown ai_valued_as \"%s\".",
6122 "\"%s\" [%s] ai_valued_as \"%s\" is an user effect.",
6131 "\"%s\" [%s] Duplicate \"%s\" entry.",
6146 enum effect_type
eff;
6153 const char *comment;
6159 "\"%s\" [%s] missing effect type.",
6168 "\"%s\" [%s] lists unknown effect type \"%s\".",
6184 "\"%s\" [%s] has unknown multiplier \"%s\".",
6208 if (comment !=
NULL) {
6226 int def,
int min,
int max,
6227 const char *path, ...)
6230 int def,
int min,
int max,
6231 const char *path, ...)
6247 "\"%s\" should be in the interval [%d, %d] "
6248 "but is %d; using the minimal value.",
6255 "\"%s\" should be in the interval [%d, %d] "
6256 "but is %d; using the maximal value.",
6394 const char *filename,
6416 "\"%s\": %s: bad action list",
6422 for (j = 0; j <
asize; j++) {
6438 const char *filename,
6475 const char *filename,
6495 for (j = 0; j <
asize; j++) {
6512 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");
6698 "civstyle.civil_war_bonus_celebrating");
6702 "civstyle.civil_war_bonus_unhappy");
6709 "civstyle.base_bribe_cost");
6715 "civstyle.ransom_gold");
6718 "civstyle.pillage_select");
6722 "civstyle.tech_steal_allow_holes");
6725 "civstyle.tech_trade_allow_holes");
6728 "civstyle.tech_trade_loss_allow_holes");
6731 "civstyle.tech_parasite_allow_holes");
6734 "civstyle.tech_loss_allow_holes");
6741 "civstyle.upgrade_veteran_loss");
6747 "civstyle.autoupgrade_veteran_loss");
6754 "research.base_tech_cost");
6761 "research.min_tech_cost");
6764 "civstyle.granary_food_ini");
6769 "Too many granary_food_ini entries (%d, max %d)",
6773 log_error(
"No values for granary_food_ini. Using default "
6788 log_error(
"Bad value for granary_food_ini[%i]. Using %i.",
6803 "civstyle.granary_food_inc");
6811 "civstyle.min_city_center_%s",
6824 "civstyle.init_vis_radius_sq");
6831 "civstyle.init_city_radius_sq");
6834 "civstyle.gold_upkeep_style");
6839 "Unknown gold upkeep style \"%s\"",
6850 "Cannot have homeless_gold_upkeep while gold_upkeep_style \"City\".");
6855 "civstyle.output_granularity");
6869 "wonder_visibility.small_wonders");
6875 "Unknown wonder visibility typpe \"%s\"",
6884 "illness.illness_on");
6890 "illness.illness_base_factor");
6896 "illness.illness_min_size");
6902 "illness.illness_trade_infection");
6908 "illness.illness_pollution_factor");
6916 "incite_cost.base_incite_cost");
6922 "incite_cost.improvement_factor");
6928 "incite_cost.unit_factor");
6934 "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");
6966 "combat_rules.low_firepower_pearl_harbour");
6969 "combat_rules.low_firepower_combat_bonus");
6972 "combat_rules.low_firepower_nonnat_bombard");
6978 "combat_rules.nuke_pop_loss_pct");
6984 "combat_rules.nuke_defender_survival_chance_pct");
6992 "borders.radius_sq_city");
6998 "borders.size_effect");
7005 "borders.radius_sq_city_permanent");
7009 "research.tech_cost_style");
7014 "Unknown tech cost style \"%s\"",
7020 "research.tech_leakage");
7025 "Unknown tech leakage \"%s\"",
7031 log_error(
"Only tech_leakage \"%s\" supported with "
7032 "tech_cost_style \"%s\". ",
7035 log_error(
"Switching to tech_leakage \"%s\".",
7044 "research.base_tech_cost");
7047 "research.tech_upkeep_style");
7053 "Unknown tech upkeep style \"%s\"",
7065 "research.tech_upkeep_divider");
7070 "No free_tech_method given");
7076 "Bad value %s for free_tech_method.",
sval);
7088 "culture.victory_min_points");
7091 "culture.victory_lead_pct");
7094 "culture.migration_pml");
7097 "culture.history_interest_pml");
7102 "world_peace.victory_turns");
7107 "calendar.skip_year_0");
7110 "calendar.start_year");
7116 "Too many calendar fragments. Max is %d",
7124 "calendar.positive_label"));
7128 "calendar.negative_label"));
7172 "No background player color defined! (%s)",
7198 "\"%s\": Too many disaster types (%d, max %d)",
7217 "\"%s\": Cannot load disaster names",
7244 "\"%s\" disaster \"%s\": unknown effect \"%s\".",
7268 const char *
typename;
7276 "Achievement has unknown type \"%s\".",
7277 typename !=
NULL ?
typename :
"(NULL)");
7293 "Achievement %s has no first msg!",
sec_name);
7303 if (!
pach->unique) {
7305 "Achievement %s has no msg for consecutive gainers!",
7323 "trade.settings%d.type",
7329 "\"%s\" unknown trade route type \"%s\".",
7338 "trade.settings%d.pct",
i);
7340 "trade.settings%d.cancelling",
i);
7344 "\"%s\" unknown trade route cancelling type \"%s\".",
7355 "\"%s\" unknown trade route bonus type \"%s\".",
7371 "trade.reveal_trade_partner");
7375 "trade.goods_selection");
7381 "\"%s\" goods selection method \"%s\" unknown.",
7417 for (j = 0; j <
nval; j++) {
7444 for (
i = 0;
i < num;
i++) {
7454 "\"%s\" unknown clause type \"%s\".",
7464 "\"%s\" dublicate clause type \"%s\" definition.",
7516 "\"%s\" unknown counter type \"%s\".",
7524 "\"%s\": Cannot load counter names",
7536 "\"%s\": No checkpoint value",
7592 "auto_attack",
"if_attacker",
7600 "auto_attack.attack_actions",
7604 "\"%s\": %s: failed load %s.",
7605 filename,
"auto_attack",
"attack_actions");
7624 "actions.diplchance_initial_odds")) {
7637 "actions.poison_empties_food_stock");
7644 "actions.steal_maps_reveals_all_cities");
7682 "actions.quiet_actions");
7687 "\"%s\": actions.quiet_actions: bad action list",
7692 for (j = 0; j <
asize; j++) {
7736 "civstyle.paradrop_to_transport")
7798 "actions.escape_city", filename)) {
7814 "actions.unit_stack_death", filename)) {
7828 if (sec !=
nullptr) {
7843 "\"%s\" [%s] missing action to enable.",
7852 "\"%s\" [%s] lists unknown action type \"%s\".",
7861 if (actor_reqs ==
NULL) {
7869 if (target_reqs ==
NULL) {
7926 packet.
flags = c->flags;
8002 packet.
fuel = u->fuel;
8003 packet.
flags = u->flags;
8004 packet.
roles = u->roles;
8014 packet.
cargo = u->cargo;
8018 packet.
vlayer = u->vlayer;
8020 if (u->veteran ==
NULL) {
8039 packet.
worker = u->adv.worker;
8154 if (a->tclass ==
NULL) {
8157 packet.
tclass = a->tclass->idx;
8199 packet.
flags = a->flags;
8200 packet.
cost = a->cost;
8266 packet.
genus = b->genus;
8274 packet.
reqs = b->reqs;
8278 packet.
upkeep = b->upkeep;
8280 packet.
flags = b->flags;
8327 packet.
tclass = pterrain->tclass;
8340 packet.
output[
o] = pterrain->output[
o];
8386 packet.
flags = pterrain->flags;
8409 packet.
output[
o] = presource->data.resource->output[
o];
8482 packet.
reqs = e->reqs;
8483 packet.
rmreqs = e->rmreqs;
8502 packet.
eus = e->eus;
8507 packet.
flags = e->flags;
8590 packet.
reqs = g->reqs;
8593 packet.
to_pct = g->to_pct;
8596 packet.
flags = g->flags;
8619 packet.
reqs = d->reqs;
8643 packet.
type = a->type;
8644 packet.
unique = a->unique;
8645 packet.
value = a->value;
8827 if (
n->translation_domain ==
NULL) {
8888 if (
n->init_buildings[
i] !=
B_LAST) {
8954 packet.
start = pmul->start;
8955 packet.
stop = pmul->stop;
8956 packet.
step = pmul->step;
8957 packet.
def = pmul->def;
8958 packet.
offset = pmul->offset;
8959 packet.
factor = pmul->factor;
8966 packet.
reqs = pmul->reqs;
9034 for (
i = 0;
i <
misc_p.veteran_levels;
i++) {
9055 misc_p.global_init_techs_count =
i;
9062 misc_p.global_init_buildings[
i] =
9068 misc_p.global_init_buildings_count =
i;
9171 log_normal(
_(
"Cannot load any ruleset. Freeciv-web ruleset is available from "
9172 "https://github.com/freeciv/freeciv-web"));
9236 server.playable_nations = 0;
9405 "-- This file is for lua-functionality for parsing luadata.txt\n-- of this ruleset.");
9451 "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_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_AUTO_POST_BRIBE
#define action_iterate_end
#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_CIVIL_WAR_UNHAPPY
#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_DEFAULT_CIVIL_WAR_CELEB
#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 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)
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 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)
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 bool load_action_blocked_by_list(struct section_file *file, const char *filename, struct action *paction)
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)
static bool load_action_ui_name(struct section_file *file, int act, const char *entry_name)
#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
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
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 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
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
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