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 ACTION_ENABLER_SECTION_PREFIX "actionenabler_"
112#define MULTIPLIER_SECTION_PREFIX "multiplier_"
113#define COUNTER_SECTION_PREFIX "counter_"
115#define check_name(name) (check_strlen(name, MAX_LEN_NAME, NULL))
116#define check_cityname(name) (check_strlen(name, MAX_LEN_CITYNAME, NULL))
120#define MAX_SECTION_LABEL 64
121#define section_strlcpy(dst, src) \
122 (void) loud_strlcpy(dst, src, MAX_SECTION_LABEL, name_too_long)
159 const char **allowed_terrains,
216 const char *file,
const char *
function,
218 const char *format, ...)
228 if (logger !=
NULL) {
262 ae->ruledit_disabled =
TRUE;
266 log_normal(
"Purged all action enablers for %s",
273 if (!
ae->ruledit_disabled
276 ae->ruledit_disabled =
TRUE;
278 log_normal(
"Purged unused action enabler for %s",
293 enum effect_type
type;
299 eft->rulesave.do_not_save =
TRUE;
341 if (
problem->num_suggested_solutions == 0) {
347 if (
problem->num_suggested_solutions == 1
381 if (
problem->num_suggested_solutions == 0) {
387 if (
problem->num_suggested_solutions == 2
391 &
problem->suggested_solutions[1].req)) {
434 "Purged redundant requirement in"
435 " %s in action enabler for %s",
438 "Purged redundant requirement in"
439 " %s in action enabler for %s",
445 while (!
ae->ruledit_disabled
464 enum effect_type
type;
472 "Purged redundant requirement in effect of type %s",
528 log_verbose(
"Trying \"%s\": default ruleset directory.", filename);
534 fc_snprintf(filename,
sizeof(filename),
"%s_%s.%s",
536 log_verbose(
"Trying \"%s\": alternative ruleset filename syntax.",
544 _(
"Could not find a readable \"%s.%s\" ruleset file."),
588 if (secfile ==
NULL) {
609 if (buffer ==
NULL) {
642 if (secfile ==
NULL) {
662 const char *filename;
669 sec, sub, j)); j++) {
672 bool survives, present, quiet;
710 "\"%s\": trying to have an floating point entry as a requirement name in '%s.%s%d'.",
711 filename, sec, sub, j);
725 "\"%s\": error in handling requirement name for '%s.%s%d'.",
726 filename, sec, sub, j);
736 if (
compat->compat_mode) {
745 "\"%s\": invalid boolean value for survives for "
746 "'%s.%s%d'.", filename, sec, sub, j);
754 "\"%s\": invalid boolean value for present for "
755 "'%s.%s%d'.", filename, sec, sub, j);
762 "\"%s\": invalid boolean value for quiet for "
763 "'%s.%s%d'.", filename, sec, sub, j);
766 if (
compat->compat_mode) {
773 "\"%s\" [%s] has invalid or unknown req: "
785 "Too many (%d) requirements for %s. Max is %d",
804 const char *filename;
810 sec, sub, j)); j++) {
816 log_error(
"\"%s\": unknown flag name \"%s\" in '%s.%s'.",
817 filename,
flag, sec, sub);
825 log_error(
"\"%s\": unknown bonus type \"%s\" in '%s.%s'.",
826 filename,
type, sec, sub);
833 log_error(
"\"%s\": failed to get value from '%s.%s%d'.",
834 filename, sec, sub, j);
858 const char *prefix,
const char *
entry,
859 const char *filename,
860 const char *description)
872 "\"%s\" %s %s: couldn't match \"%s\".",
873 filename, (description ? description : prefix),
entry,
sval);
889 const char *prefix,
const char *
entry,
891 const char *filename,
892 const char *description)
905 "\"%s\" %s %s: couldn't match \"%s\".",
906 filename, (description ? description : prefix),
entry,
sval);
924 const char *filename)
945 "\"%s\": string vector %s.%s too long (%d, max %d)",
959 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
982 const char *
entry,
int *output,
983 const char *filename)
999 "\"%s\": string vector %s.%s too long (%d, max %d)",
1009 for (
i = 0;
i <
nval && ok;
i++) {
1015 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
1021 "\"%s\" %s.%s (%d): \"%s\" is removed.",
1046 const char *prefix,
const char *
entry,
1047 int *output,
const char *filename)
1061 "\"%s\": string vector %s.%s too long (%d, max %d)",
1075 if (
NULL == pimprove) {
1077 "\"%s\" %s.%s (%d): couldn't match \"%s\".",
1101 const char *filename,
1102 const char *description)
1112 if (*result ==
NULL) {
1114 "\"%s\" %s %s: couldn't match \"%s\".",
1115 filename, (description ? description : prefix),
entry,
sval);
1130 const char *filename,
1144 "\"%s\" %s: couldn't match \"%s\".",
1174 const char *prefix,
const char *
suffix)
1178 "%s.%s", prefix,
suffix);
1203 "\"%s\" [%s] has unknown \"%s\".",
1216 const char *filename,
1249 "\"%s\" [%s] has unknown \"%s\".",
1266 const char *filename,
const char *
item_name,
1276 if (*turns > max_turns) {
1278 "\"%s\": \"%s\": \"%s\" value %d too large (max %d)",
1300 "\"%s\" [%s]: no \"name\" specified.",
1375 "\"%s\": Too many achievement types (%d, max %d)",
1388 "\"%s\": Cannot load achievement names",
1406 "\"%s\": Too many goods types (%d, max %d)",
1410 }
else if (
nval < 1) {
1412 "\"%s\": At least one goods type needed",
1427 "\"%s\": Cannot load goods names",
1464 "\"%s\": Cannot load counters names",
1527 "\"%s\": Duplicate tech flag name '%s'",
1534 "\"%s\": Too many user tech flags!",
1558 "\"%s\": Too many tech classes (%d, max %d)",
1586 "\"%s\": No Advances?!?", filename);
1592 "\"%s\": Too many advances (%d, max %d)",
1665 "\"%s\" [%s] \"%s\": \"Never\" with non-\"Never\".",
1672 "\"%s\" [%s] \"%s\": should have \"None\" second.",
1687 if (a->tclass ==
NULL) {
1689 "\"%s\" [%s] \"%s\": Unknown tech class \"%s\".",
1701 if (research_reqs ==
NULL) {
1711 for (j = 0; j <
nval; j++) {
1719 "\"%s\" [%s] \"%s\": bad flag name \"%s\".",
1768 && (a == b->require[
AR_ONE] || a == b->require[
AR_TWO])) {
1770 b->inherited_root_req =
TRUE;
1803 "\"%s\" tech \"%s\": req1 leads to removed tech.",
1810 "\"%s\" tech \"%s\": req2 leads to removed tech.",
1857 "\"%s\": Duplicate unit flag name '%s'",
1864 "\"%s\": Too many user unit type flags!",
1884 "control.class_flags%d.name",
1888 "control.class_flags%d.helptxt",
i);
1893 "\"%s\": Duplicate unit class flag name '%s'",
1900 "\"%s\": Too many user unit class flags!",
1922 "\"%s\": No unit classes?!?", filename);
1928 "\"%s\": Too many unit classes (%d, max %d)",
1956 "\"%s\": No unit types?!?", filename);
1962 "\"%s\": Too many unit types (%d, max %d)",
2008 "%s.veteran_names", path);
2010 "%s.veteran_power_fact", path);
2012 "%s.veteran_base_raise_chance", path);
2014 "%s.veteran_work_raise_chance",
2017 "%s.veteran_move_bonus", path);
2039#define rs_sanity_veteran(_path, _entry, _i, _condition, _action) \
2041 log_error("Invalid veteran definition '%s.%s[%d]'!", \
2042 _path, _entry, _i); \
2043 log_debug("Failed check: '%s'. Update value: '%s'.", \
2044 #_condition, #_action); \
2085#undef rs_sanity_veteran
2125 "Error loading the default veteran system: %s",
2156 "%s.non_native_def_pct",
2161 for (j = 0; j <
nval; j++) {
2172 "\"%s\" unit_class \"%s\": unit_type flag \"%s\"!",
2176 "\"%s\" unit_class \"%s\": bad flag name \"%s\".",
2206 "tech_req", filename,
2238 char tmp[200] =
"\0";
2287 msg,
sizeof(msg))) {
2289 "Error loading the veteran system: %s",
2296 &u->obsoleted_by, filename,
2299 &u->converted_to, filename,
2304 u->convert_time = 1;
2322 "\"%s\" unit_type \"%s\": bad class \"%s\".",
2384 if (u->firepower <= 0) {
2386 "\"%s\" unit_type \"%s\":"
2388 " but must be at least 1. "
2389 " If you want no attack ability,"
2390 " set the unit's attack strength to 0.",
2407 for (j = 0; j <
nval; j++) {
2412 "\"%s\" unit_type \"%s\":"
2413 "has unknown unit class %s as cargo.",
2429 for (j = 0; j <
nval; j++) {
2434 "\"%s\" unit_type \"%s\":"
2435 "has unknown unit class %s as target.",
2451 for (j = 0; j <
nval; j++) {
2456 "\"%s\" unit_type \"%s\":"
2457 "has unknown unit class %s as embarkable.",
2473 for (j = 0; j <
nval; j++) {
2478 "\"%s\" unit_type \"%s\":"
2479 "has unknown unit class %s as disembarkable.",
2508 "\"%s\" unit_type \"%s\":"
2509 "has unknown vision layer %s.",
2518 0,
"%s.paratroopers_range",
sec_name);
2532 "\"%s\" unit_type \"%s\":"
2533 " bad tp_defense \"%s\".",
2551 for (j = 0; j <
nval; j++) {
2562 "\"%s\" unit_type \"%s\": unit_class flag!",
2566 "\"%s\" unit_type \"%s\": bad flag name \"%s\".",
2591 for (j = 0; j <
nval; j++) {
2599 "\"%s\" unit_type \"%s\": bad role name \"%s\".",
2618 "\"%s\" unit_type \"%s\": depends on removed tech \"%s\".",
2666 "\"%s\": No improvements?!?", filename);
2669 log_verbose(
"%d improvement types (including possibly unused)",
nval);
2672 "\"%s\": Too many improvements (%d, max %d)",
2694 "control.building_flags%d.name",
2698 "control.building_flags%d.helptxt",
i);
2703 "\"%s\": Duplicate building flag name '%s'",
2710 "\"%s\": Too many user building flags!",
2739 for (
i = 0;
i <
nval && ok;
i++) {
2758 "\"%s\" improvement \"%s\": couldn't match "
2759 "genus \"%s\".", filename,
2768 for (j = 0; j <
nflags; j++) {
2776 "\"%s\" improvement \"%s\": bad flag name \"%s\".",
2790 if (
compat->compat_mode) {
2801 if (obs_reqs ==
NULL) {
2881 "\"%s\": Duplicate terrain flag name '%s'",
2888 "\"%s\": Too many user terrain flags!",
2907 "control.extra_flags%d.name",
2911 "control.extra_flags%d.helptxt",
i);
2916 "\"%s\": Duplicate extra flag name '%s'",
2923 "\"%s\": Too many user extra flags!",
2947 "\"%s\": ruleset doesn't have any terrains.",
2953 "\"%s\": Too many terrains (%d, max %d)",
2992 "\"%s\": Too many extra types (%d, max %d)",
3009 for (idx = 0; idx <
nval; idx++) {
3032 "\"%s\": Too many base types (%d, max %d)",
3050 for (idx = 0; idx <
nval; idx++) {
3057 if (pextra !=
NULL) {
3062 "No extra definition matching base definition \"%s\"",
3068 "Base section \"%s\" does not associate base with any extra",
3085 "\"%s\": Too many road types (%d, max %d)",
3103 for (idx = 0; idx <
nval; idx++) {
3110 if (pextra !=
NULL) {
3115 "No extra definition matching road definition \"%s\"",
3121 "Road section \"%s\" does not associate road with any extra",
3137 "\"%s\": Too many resource types (%d, max %d)",
3155 for (idx = 0; idx <
nval; idx++) {
3165 if (pextra !=
NULL) {
3170 "No extra definition matching resource definition \"%s\"",
3176 "Resource section %s does not list extra this resource belongs to.",
3209 "parameters.ocean_reclaim_requirement");
3212 "parameters.land_channel_requirement");
3215 "parameters.thaw_requirement");
3218 "parameters.freeze_requirement");
3221 "parameters.lake_max_size");
3224 "parameters.min_start_native_area");
3227 "parameters.move_fragments");
3230 "\"%s\": move_fragments must be at least 1",
3237 "parameters.igter_cost");
3240 "\"%s\": igter_cost must be at least 1",
3249 "parameters.pythagorean_diagonal");
3253 "parameters.ocean_resources");
3256 N_(
"?gui_type:Build Type A Base"),
3257 "extraui.ui_name_base_fortress");
3261 N_(
"?gui_type:Build Type B Base"),
3262 "extraui.ui_name_base_airbase");
3284 pterrain->identifier
3286 if (
'\0' == pterrain->identifier) {
3288 "\"%s\" [%s] identifier missing value.",
3295 "\"%s\" [%s] cannot use '%c' as an identifier;"
3296 " it is reserved for unknown terrain.",
3297 filename,
tsection, pterrain->identifier);
3304 "\"%s\" [%s] has the same identifier as [%s].",
3320 "\"%s\": [%s] unknown class \"%s\"",
3346 "\"%s\": [%s] Different lengths for resources "
3347 "and resource frequencies",
3351 pterrain->resources =
fc_calloc(
nval + 1,
sizeof(*pterrain->resources));
3353 sizeof(*pterrain->resource_freq));
3354 for (j = 0; j <
nval; j++) {
3356 if (pterrain->resources[j] ==
NULL) {
3360 pterrain->resource_freq[j] = j <
nval2
3366 "\"%s\": [%s] Resource frequency '%d' "
3367 "outside allowed range",
3369 pterrain->resource_freq[j]);
3376 pterrain->resource_freq[
nval] = 0;
3387 pterrain->road_output_incr_pct[
o]
3393 filename,
NULL, &ok)
3395 filename,
NULL, &ok)) {
3401 if (!
lookup_terrain(file,
"cultivate_result", filename, pterrain,
3402 &pterrain->cultivate_result,
FALSE)) {
3407 if (pterrain->cultivate_result == pterrain) {
3409 "%s: Cultivating result in terrain itself.",
3415 "%s.irrigation_food_incr",
tsection)
3424 &pterrain->plant_result,
FALSE)) {
3429 if (pterrain->plant_result == pterrain) {
3431 "%s: Planting result in terrain itself.",
3448 "%s: Missing cultivate_time",
tsection);
3452 if ((pterrain->cultivate_result !=
NULL
3453 && pterrain->cultivate_time <= 0)
3454 || (pterrain->cultivate_result ==
NULL
3455 && pterrain->cultivate_time > 0)) {
3457 "%s: cultivate_result and cultivate_time disagree "
3458 "whether cultivating is enabled",
tsection);
3466 "%s: Missing plant_time",
tsection);
3470 if ((pterrain->plant_result !=
NULL
3471 && pterrain->plant_time <= 0)
3472 || (pterrain->plant_result ==
NULL
3473 && pterrain->plant_time > 0)) {
3475 "%s: plant_result and plant_time disagree "
3476 "whether planting is enabled",
tsection);
3482 &pterrain->animal, filename,
3488 if (!
lookup_terrain(file,
"transform_result", filename, pterrain,
3489 &pterrain->transform_result,
TRUE)) {
3499 if ((pterrain->transform_result !=
NULL
3500 && pterrain->transform_time <= 0)
3501 || (pterrain->transform_result ==
NULL
3502 && pterrain->transform_time > 0)) {
3504 "%s: transform_result and transform_time disagree "
3505 "whether transforming is enabled",
tsection);
3510 pterrain->placing_time = 1;
3514 pterrain->pillage_time = 1;
3518 if (!
lookup_terrain(file,
"warmer_wetter_result", filename, pterrain,
3519 &pterrain->warmer_wetter_result,
TRUE)
3520 || !
lookup_terrain(file,
"warmer_drier_result", filename, pterrain,
3521 &pterrain->warmer_drier_result,
TRUE)
3522 || !
lookup_terrain(file,
"cooler_wetter_result", filename, pterrain,
3523 &pterrain->cooler_wetter_result,
TRUE)
3524 || !
lookup_terrain(file,
"cooler_drier_result", filename, pterrain,
3525 &pterrain->cooler_drier_result,
TRUE)) {
3532 pterrain->extra_removal_times[
extra_index(pextra)] = 0;
3543 "%s.extra_settings%d.extra",
3547 if (pextra !=
NULL) {
3551 "%s.extra_settings%d",
tsection, j);
3557 "\"%s\" [%s] has settings for unknown extra \"%s\".",
3567 for (j = 0; j <
nval; j++) {
3574 "\"%s\" [%s] has unknown flag \"%s\".",
3579 BV_SET(pterrain->flags, flag);
3596 pterrain->property[
mtp]
3604 for (j = 0; j <
nval; j++) {
3609 "\"%s\" [%s] is native to unknown unit class \"%s\".",
3629 "Missing terrain color definition: %s",
3662 "\"%s\" extra \"%s\" has no category.",
3670 "\"%s\" extra \"%s\" has invalid category \"%s\".",
3684 "\"%s\" extra \"%s\": unknown cause \"%s\".",
3689 pextra->causes |= (1 << cause);
3694 if (pextra->causes == 0) {
3710 pextra->removal_time = 0;
3713 pextra->removal_time_factor
3722 pextra->rmcauses = 0;
3723 for (j = 0; j <
nval; j++) {
3734 "\"%s\" extra \"%s\": unknown rmcause \"%s\".",
3739 pextra->rmcauses |= (1 <<
rmcause);
3760 "%s.rmact_gfx_alt",
section));
3763 "%s.rmact_gfx_alt2",
section));
3804 pextra->build_time = 0;
3808 "%s.build_time_factor",
section);
3815 if (pextra->infracost > 0) {
3822 if (pextra->defense_bonus != 0) {
3834 "\"%s\" extra \"%s\" has illegal unit_seen value \"%s\".",
3844 "%s.appearance_chance",
3848 "%s.disappearance_chance",
3852 "%s.no_aggr_near_city",
3857 for (j = 0; j <
nval; j++) {
3860 if (uclass ==
NULL) {
3862 "\"%s\" extra \"%s\" is native to unknown unit class \"%s\".",
3877 for (j = 0; j <
nval; j++) {
3883 if (pextra->no_aggr_near_city >= 0) {
3885 "\"%s\" extra \"%s\" has both no_aggr_near_city set and old style "
3886 "NoAggressive flag",
3892 pextra->no_aggr_near_city = 3;
3899 "\"%s\" extra \"%s\": unknown flag \"%s\".",
3904 BV_SET(pextra->flags, flag);
3910 if (pextra->no_aggr_near_city >= 0) {
3923 for (j = 0; j <
nval; j++) {
3929 "\"%s\" extra \"%s\": unknown conflict extra \"%s\".",
3947 for (j = 0; j <
nval; j++) {
3953 "\"%s\" extra \"%s\" hidden by unknown extra \"%s\".",
3969 for (j = 0; j <
nval; j++) {
3975 "\"%s\" extra \"%s\" bridged over unknown extra \"%s\".",
3990 "%s.visibility_req",
section);
3995 "\"%s\" %s: unknown visibility_req %s.",
4020 if (!presource->data.resource) {
4022 "\"%s\" extra \"%s\" has \"Resource\" cause but no "
4023 "corresponding [resource_*] section",
4030 presource->data.resource->output[
o] =
4038 presource->data.resource->id_old_save =
'\0';
4042 presource->data.resource->id_old_save = identifier[0];
4045 "\"%s\" [%s] identifier missing value.",
4052 "\"%s\" [%s] cannot use '%c' as an identifier;"
4054 filename,
rsection, presource->data.resource->id_old_save);
4074 "\"%s\" resource section [%s]: extra \"%s\" does not "
4075 "have \"Resource\" in its causes",
4087 if (
pres->data.resource->id_old_save !=
'\0') {
4089 if (
pres->data.resource->id_old_save ==
pres2->data.resource->id_old_save
4092 "\"%s\" [%s] has the same identifier as [%s].",
4117 "\"%s\" extra \"%s\" has \"Base\" cause but no "
4118 "corresponding [base_*] section",
4129 "\"%s\" base \"%s\": unknown gui_type \"%s\".",
4138 "%s.vision_main_sq",
4141 "%s.vision_invis_sq",
4144 "%s.vision_subs_sq",
4178 "\"%s\" base section [%s]: extra \"%s\" does not have "
4179 "\"Base\" in its causes",
4191 const char *special;
4198 "\"%s\" extra \"%s\" has \"Road\" cause but no "
4199 "corresponding [road_*] section",
4210 "\"%s\" road \"%s\": unknown gui_type \"%s\".",
4235 "Illegal move_mode \"%s\" for road \"%s\"",
4242 proad->tile_incr_const[
o] =
4257 "Multiple roads marked as compatibility \"Road\"");
4265 "Multiple roads marked as compatibility \"Railroad\"");
4273 "Multiple roads marked as compatibility \"River\"");
4282 "Illegal compatibility special \"%s\" for road %s",
4293 for (j = 0; j <
nval; j++) {
4304 "\"%s\" road \"%s\" integrates with unknown road \"%s\".",
4320 for (j = 0; j <
nval; j++) {
4326 "\"%s\" road \"%s\": unknown flag \"%s\".",
4348 "\"%s\" road section [%s]: extra \"%s\" does not have "
4349 "\"Road\" in its causes",
4399 "\"%s\": Too many governments (%d, max %d)",
4428 "\"%s\": Too many multipliers (%d, max %d)",
4443 "\"%s\": Cannot load multiplier names",
4496 if (g->ai.better ==
NULL) {
4501 g->ai.better =
NULL;
4526 const char *male, *female;
4532 "Lack of default ruler titles for "
4533 "government \"%s\" (nb %d): %s",
4540 "Lack of default ruler titles for "
4541 "government \"%s\" (nb %d).",
4568 if (pmul->stop <= pmul->start) {
4570 "Multiplier \"%s\" stop (%d) must be greater "
4572 pmul->stop, pmul->start);
4581 if (((pmul->stop - pmul->start) % pmul->step) != 0) {
4583 "Multiplier \"%s\" step (%d) does not fit "
4584 "exactly into interval start-stop (%d to %d)",
4586 pmul->start, pmul->stop);
4595 if (pmul->def < pmul->start || pmul->def > pmul->stop) {
4597 "Multiplier \"%s\" default (%d) not within "
4599 pmul->def, pmul->start, pmul->stop);
4603 if (((pmul->def - pmul->start) % pmul->step) != 0) {
4605 "Multiplier \"%s\" default (%d) not legal "
4606 "with respect to step size %d",
4615 if (pmul->factor == 0) {
4617 "Multiplier \"%s\" scaling factor must "
4734 "No available nations in this ruleset!");
4738 "Too many nations (max %d, we have %d)!",
4749 "%s.translation_domain",
sec_name);
4755 domain =
"freeciv-nations";
4759 pl->translation_domain =
NULL;
4764 "Unsupported translation domain \"%s\" for %s",
4774 name_set(&
pl->noun_plural,
pl->translation_domain, noun_plural);
4777 for (j = 0; j <
i && ok; j++) {
4786 "Two nations defined with the same adjective \"%s\": "
4787 "in section \'%s\' and section \'%s\'",
4796 "Two nations defined with the same rule_name \"%s\": "
4797 "in section \'%s\' and section \'%s\'",
4805 "Two nations defined with the same plural name \"%s\": "
4806 "in section \'%s\' and section \'%s\'",
4856 for (
i = 0;
i <
len;
i++) {
4872 const char **allowed_terrains,
4885 for (j = 0; j <
dim; j++) {
4900 if (!(end =
strchr(p,
')'))) {
4902 "\"%s\" [%s] %s: city name \"%s\" "
4907 for (*end++ =
'\0';
'\0' != *end; end++) {
4910 "\"%s\" [%s] %s: city name \"%s\" "
4911 "contains characters after last parenthesis.",
4927 "\"%s\" [%s] %s: city name \"%s\" is too long.",
4940 if ((next =
strchr(p,
','))) {
4960 "\"%s\" [%s] %s: city \"%s\" "
4961 "has terrain hint \"%s\" not in allowed_terrains.",
4971 if (
NULL == pterrain) {
4980 if (pterrain ==
NULL) {
4997 "\"%s\" [%s] %s: city \"%s\" "
4998 "has terrain hint \"%s\" not in allowed_terrains.",
5004 }
else if (!pterrain) {
5010 "\"%s\" [%s] %s: city \"%s\" "
5011 "has unknown terrain hint \"%s\".",
5018 if (
NULL != pterrain) {
5023 p = next ? next + 1 :
NULL;
5024 }
while (
NULL != p &&
'\0' != *p);
5059 "ruledit.embedded_nations");
5091 "Default values for trait %s not sane.",
5100 "compatibility.allowed_govs");
5116 "compatibility.allowed_terrains");
5132 "compatibility.allowed_styles");
5148 "compatibility.default_government");
5156 "Tried to set unknown government type \"%s\" as default_government!",
5194 "must be defined.");
5202 "compatibility.default_nationset");
5209 "Unknown default_nationset \"%s\".",
sval);
5258 char tmp[200] =
"\0";
5269 for (j = 0; j <
dim; j++) {
5284 log_verbose(
"Nation %s: Unknown set/group \"%s\".",
5293 "Nation %s is not a member of any nation set",
5301 for (j = 0; j <
dim; j++) {
5306 "Nation %s conflicts with itself",
5317 log_verbose(
"Nation %s: conflicts_with nation \"%s\" is unknown.",
5332 bool is_male =
FALSE;
5345 "Nation %s: leader name \"%s\" is too long.",
5354 "Nation %s: leader \"%s\": %s.",
5371 "Nation %s: leader \"%s\" has unsupported "
5372 "sex variant \"%s\".",
5394 "Nation %s: Too many leaders; max is %d",
5398 }
else if (0 == j) {
5400 "Nation %s: no leaders; at least one is required.",
5409 "Nation %s: leader \"%s\" defined more than once.",
5424 if (pnation->server.traits[
tr].min < 0) {
5429 if (pnation->server.traits[
tr].max < 0) {
5434 if (pnation->server.traits[
tr].fixed < 0) {
5438 int diff = pnation->server.traits[
tr].max - pnation->server.traits[
tr].min;
5441 pnation->server.traits[
tr].fixed = diff / 2 + pnation->server.traits[
tr].min;
5444 if (pnation->server.traits[
tr].max < pnation->server.traits[
tr].min) {
5446 "%s values for trait %s not sane.",
5457 pnation->is_playable =
5466 "Nation %s, barbarian_type is invalid (\"%s\")",
5473 && pnation->is_playable) {
5477 "Nation %s marked both barbarian and playable.",
5492 const char *male, *female;
5495 "%s.ruler_titles%d.government",
5522 "Nation %s: government \"%s\" not in allowed_govs.",
5534 "Nation %s: government \"%s\" not found.",
5540 if (
NULL != male &&
NULL != female) {
5562 if (pnation->style ==
NULL) {
5568 "Nation %s: Illegal style \"%s\"",
5573 log_verbose(
"Nation %s: style \"%s\" not supported in this "
5574 "ruleset; using default.",
5583 for (j = 0; j <
dim; j++) {
5591 "Nation %s is its own civil war nation",
5603 log_verbose(
"Nation %s: civil war nation \"%s\" is unknown.",
5616 pnation->init_techs, filename)) {
5621 pnation->init_buildings, filename)) {
5626 pnation->init_units, filename)) {
5637 if (pnation->init_government ==
NULL) {
5648 "Nation %s: init_government \"%s\" not allowed.",
5668 "Nation %s: legend \"%s\" is too long.",
5675 pnation->player =
NULL;
5726 "Nation set \"%s\" has no playable nations. "
5733 "No land barbarian nation defined in set \"%s\". "
5740 "No sea barbarian nation defined in set \"%s\". "
5772 "No available nation styles in this ruleset!");
5897 const char *filename)
5913 "\"%s\": %s: bad unit type flag list.",
5940 const char *filename)
5954 "\"%s\": %s: bad action list",
5976 const char *filename)
5982 "missing_unit_upkeep.%s_protected",
item);
5984 "missing_unit_upkeep.%s_unit_act",
item);
6014 "\"%s\": Too many specialists (%d, max %d).",
6042 "\"%s\": No graphic tag for specialist at %s.",
6070 "\"%s\": must give a min_size of 0 for at least one "
6071 "specialist type.", filename);
6082 "parameters.celebrate_size_limit");
6087 "parameters.angry_citizens");
6100 "\"%s\": Forced taxes do not add up in ruleset!",
6112 "parameters.vision_reveal_tiles");
6120 "citizen.nationality");
6128 "citizen.ubuilder_nationality");
6131 "citizen.convert_speed");
6159 "missing_unit_upkeep.food_wipe");
6178 "missing_unit_upkeep.gold_wipe");
6197 "missing_unit_upkeep.shield_wipe");
6214 const char *filename;
6238 "\"%s\" [%s] missing effect type.",
6246 "\"%s\" [%s] lists unknown effect type \"%s\".",
6253 "\"%s\" [%s] type \"%s\" is not an user effect.",
6262 "\"%s\" [%s] missing ai_valued_as.",
6270 "\"%s\" [%s] lists unknown ai_valued_as \"%s\".",
6277 "\"%s\" [%s] ai_valued_as \"%s\" is an user effect.",
6286 "\"%s\" [%s] Duplicate \"%s\" entry.",
6301 enum effect_type
eff;
6308 const char *comment;
6314 "\"%s\" [%s] missing effect type.",
6323 "\"%s\" [%s] lists unknown effect type \"%s\".",
6339 "\"%s\" [%s] has unknown multiplier \"%s\".",
6363 if (comment !=
NULL) {
6381 int def,
int min,
int max,
6382 const char *path, ...)
6385 int def,
int min,
int max,
6386 const char *path, ...)
6402 "\"%s\" should be in the interval [%d, %d] "
6403 "but is %d; using the minimal value.",
6410 "\"%s\" should be in the interval [%d, %d] "
6411 "but is %d; using the maximal value.",
6550 const char *filename,
6572 "\"%s\": %s: bad action list",
6578 for (j = 0; j <
asize; j++) {
6594 const char *filename,
6631 const char *filename,
6651 for (j = 0; j <
asize; j++) {
6668 const char *filename;
6693 " Use correct spelling tileset.preferred instead");
6708 " Use correct spelling soundset.preferred instead");
6723 " Use correct spelling musicset.preferred instead");
6820 "options.popup_tech_help");
6825 "civstyle.base_pollution");
6830 for (j = 0; j <
nval; j++) {
6831 enum gameloss_style style;
6840 "\"%s\": bad value \"%s\" for gameloss_style.",
6857 "civstyle.happy_cost");
6863 "civstyle.food_cost");
6869 "civstyle.civil_war_bonus_celebrating");
6873 "civstyle.civil_war_bonus_unhappy");
6880 "civstyle.base_bribe_cost");
6886 "civstyle.ransom_gold");
6889 "civstyle.pillage_select");
6893 "civstyle.tech_steal_allow_holes");
6896 "civstyle.tech_trade_allow_holes");
6899 "civstyle.tech_trade_loss_allow_holes");
6902 "civstyle.tech_parasite_allow_holes");
6905 "civstyle.tech_loss_allow_holes");
6912 "civstyle.upgrade_veteran_loss");
6918 "civstyle.autoupgrade_veteran_loss");
6925 "research.base_tech_cost");
6934 "research.min_tech_cost");
6941 "research.min_tech_cost");
6945 "civstyle.granary_food_ini");
6950 "Too many granary_food_ini entries (%d, max %d)",
6954 log_error(
"No values for granary_food_ini. Using default "
6969 log_error(
"Bad value for granary_food_ini[%i]. Using %i.",
6984 "civstyle.granary_food_inc");
6992 "civstyle.min_city_center_%s",
7005 "civstyle.init_vis_radius_sq");
7012 "civstyle.init_city_radius_sq");
7015 "civstyle.gold_upkeep_style");
7020 "Unknown gold upkeep style \"%s\"",
7031 "Cannot have homeless_gold_upkeep while gold_upkeep_style \"City\".");
7036 "civstyle.output_granularity");
7050 "wonder_visibility.small_wonders");
7056 "Unknown wonder visibility type \"%s\"",
7065 "illness.illness_on");
7071 "illness.illness_base_factor");
7077 "illness.illness_min_size");
7083 "illness.illness_trade_infection");
7089 "illness.illness_pollution_factor");
7097 "incite_cost.base_incite_cost");
7103 "incite_cost.improvement_factor");
7109 "incite_cost.unit_factor");
7115 "incite_cost.total_factor");
7124 "combat_rules.tired_attack");
7128 "combat_rules.only_killing_makes_veteran");
7132 "combat_rules.only_real_fight_makes_veteran");
7136 "combat_rules.combat_odds_scaled_veterancy");
7140 "combat_rules.damage_reduces_bombard_rate");
7144 "combat_rules.low_firepower_badwallattacker");
7147 "combat_rules.low_firepower_pearl_harbour");
7150 "combat_rules.low_firepower_combat_bonus");
7153 "combat_rules.low_firepower_nonnat_bombard");
7159 "combat_rules.nuke_pop_loss_pct");
7165 "combat_rules.nuke_defender_survival_chance_pct");
7173 "borders.radius_sq_city");
7179 "borders.size_effect");
7186 "borders.radius_sq_city_permanent");
7190 "research.tech_cost_style");
7195 "Unknown tech cost style \"%s\"",
7201 "research.tech_leakage");
7206 "Unknown tech leakage \"%s\"",
7212 log_error(
"Only tech_leakage \"%s\" supported with "
7213 "tech_cost_style \"%s\". ",
7216 log_error(
"Switching to tech_leakage \"%s\".",
7225 "research.base_tech_cost");
7228 "research.tech_upkeep_style");
7234 "Unknown tech upkeep style \"%s\"",
7246 "research.tech_upkeep_divider");
7251 "No free_tech_method given");
7257 "Bad value %s for free_tech_method.",
sval);
7269 "culture.victory_min_points");
7272 "culture.victory_lead_pct");
7275 "culture.migration_pml");
7278 "culture.history_interest_pml");
7283 "calendar.skip_year_0");
7286 "calendar.start_year");
7292 "Too many calendar fragments. Max is %d",
7300 "calendar.positive_label"));
7304 "calendar.negative_label"));
7348 "No background player color defined! (%s)",
7374 "\"%s\": Too many disaster types (%d, max %d)",
7393 "\"%s\": Cannot load disaster names",
7420 "\"%s\" disaster \"%s\": unknown effect \"%s\".",
7444 const char *
typename;
7452 "Achievement has unknown type \"%s\".",
7453 typename !=
NULL ?
typename :
"(NULL)");
7469 "Achievement %s has no first msg!",
sec_name);
7479 if (!
pach->unique) {
7481 "Achievement %s has no msg for consecutive gainers!",
7499 "trade.settings%d.type",
7505 "\"%s\" unknown trade route type \"%s\".",
7514 "trade.settings%d.pct",
i);
7516 "trade.settings%d.cancelling",
i);
7520 "\"%s\" unknown trade route cancelling type \"%s\".",
7531 "\"%s\" unknown trade route bonus type \"%s\".",
7553 "trade.reveal_trade_partner");
7557 "trade.goods_selection");
7563 "\"%s\" goods selection method \"%s\" unknown.",
7595 for (j = 0; j <
nval; j++) {
7622 for (
i = 0;
i < num;
i++) {
7632 "\"%s\" unknown clause type \"%s\".",
7642 "\"%s\" duplicate clause type \"%s\" definition.",
7687 "\"%s\" unknown counter type \"%s\".",
7695 "\"%s\": Cannot load counter names",
7707 "\"%s\": No checkpoint value",
7763 "auto_attack",
"if_attacker",
7771 "auto_attack.attack_actions",
7775 "\"%s\": %s: failed load %s.",
7776 filename,
"auto_attack",
"attack_actions");
7795 "actions.diplchance_initial_odds")) {
7808 "actions.poison_empties_food_stock");
7815 "actions.steal_maps_reveals_all_cities");
7854 "actions.quiet_actions");
7859 "\"%s\": actions.quiet_actions: bad action list",
7864 for (j = 0; j <
asize; j++) {
7908 "civstyle.paradrop_to_transport")
7970 "actions.escape_city", filename)) {
7986 "actions.unit_stack_death", filename)) {
8013 "\"%s\" [%s] missing action to enable.",
8022 "\"%s\" [%s] lists unknown action type \"%s\".",
8031 if (actor_reqs ==
NULL) {
8039 if (target_reqs ==
NULL) {
8098 packet.
flags = c->flags;
8177 packet.
fuel = u->fuel;
8178 packet.
flags = u->flags;
8179 packet.
roles = u->roles;
8189 packet.
cargo = u->cargo;
8193 packet.
vlayer = u->vlayer;
8195 if (u->veteran ==
NULL) {
8214 packet.
worker = u->adv.worker;
8327 if (a->tclass ==
NULL) {
8330 packet.
tclass = a->tclass->idx;
8374 packet.
flags = a->flags;
8375 packet.
cost = a->cost;
8440 packet.
genus = b->genus;
8457 packet.
upkeep = b->upkeep;
8459 packet.
flags = b->flags;
8506 packet.
tclass = pterrain->tclass;
8519 packet.
output[
o] = pterrain->output[
o];
8565 packet.
flags = pterrain->flags;
8588 packet.
output[
o] = presource->data.resource->output[
o];
8695 packet.
eus = e->eus;
8700 packet.
flags = e->flags;
8795 packet.
to_pct = g->to_pct;
8797 packet.
flags = g->flags;
8849 packet.
type = a->type;
8850 packet.
unique = a->unique;
8851 packet.
value = a->value;
9050 if (
n->translation_domain ==
NULL) {
9111 if (
n->init_buildings[
i] !=
B_LAST) {
9186 packet.
start = pmul->start;
9187 packet.
stop = pmul->stop;
9188 packet.
step = pmul->step;
9189 packet.
def = pmul->def;
9190 packet.
offset = pmul->offset;
9191 packet.
factor = pmul->factor;
9277 for (
i = 0;
i <
misc_p.veteran_levels;
i++) {
9298 misc_p.global_init_techs_count =
i;
9305 misc_p.global_init_buildings[
i] =
9311 misc_p.global_init_buildings_count =
i;
9414 log_normal(
_(
"Cannot load any ruleset. Freeciv-web ruleset is available from "
9415 "https://github.com/freeciv/freeciv-web"));
9479 server.playable_nations = 0;
9667 "-- This file is for lua-functionality for parsing luadata.txt\n-- of this ruleset.");
9713 "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)
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)
#define log_deprecation(message,...)
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_COMPUTE(str, strvec)
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,...)
struct entry * section_entry_by_name(const struct section *psection, const char *name)
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
#define secfile_entry_ignore_by_path(_sfile_, _path_)
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)
const char * rscompat_req_range_3_2(struct rscompat_info *compat, const char *type, const char *old_range)
int add_user_extra_flags_3_2(int start)
const char * rscompat_action_ui_name_3_2(struct rscompat_info *compat, int act_id)
bool rscompat_terrain_extra_rmtime_3_2(struct section_file *file, const char *tsection, struct terrain *pterrain)
bool rscompat_names(struct rscompat_info *info)
void rscompat_postprocess(struct rscompat_info *info)
int rscompat_check_capabilities(struct section_file *file, const char *filename, const struct rscompat_info *info)
void rscompat_extra_adjust_3_2(struct extra_type *pextra)
void rscompat_enablers_add_obligatory_hard_reqs(void)
const char * rscompat_action_rule_name_3_2(struct rscompat_info *compat, const char *orig)
void rscompat_req_adjust_3_2(const struct rscompat_info *compat, const char **ptype, const char **pname, bool *ppresent, const char *sec_name)
enum impr_genus_id rscompat_genus_3_2(struct rscompat_info *compat, const bv_impr_flags flags, enum impr_genus_id old_genus)
void rscompat_action_enabler_adjust_3_2(struct rscompat_info *compat, struct action_enabler *enabler, const char *orig_name)
const char * rscompat_extra_rmcause_3_2(struct extra_type *pextra, 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 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 bool load_action_ui_name(struct section_file *file, int act, const char *entry_name, const char *compat_name)
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)
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)
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 lookup_building(struct section_file *file, const char *prefix, const char *entry, struct impr_type **result, const char *filename, const char *description)
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 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)
#define NATION_SET_SECTION_PREFIX
#define RS_DEFAULT_CONVERT_SPEED
#define RS_DEFAULT_UBUILD_NAT
#define RS_DEFAULT_DAMAGE_REDUCES_BOMBARD_RATE
#define RS_DEFAULT_TECH_TRADE_LOSS_HOLES
#define RS_DEFAULT_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
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 reqs[MAX_NUM_REQS]
enum action_auto_perf_cause cause
struct requirement actor_reqs[MAX_NUM_REQS]
struct requirement target_reqs[MAX_NUM_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
char helptext[MAX_LEN_PACKET]
struct requirement obs_reqs[MAX_NUM_REQS]
char soundtag_alt[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
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 receiver_reqs[MAX_NUM_REQS]
struct requirement giver_reqs[MAX_NUM_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 helptext[MAX_LEN_PACKET]
char rule_name[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
bv_disaster_effects effects
char helptext[MAX_LEN_PACKET]
char rule_name[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
char helptxt[MAX_LEN_PACKET]
struct requirement reqs[MAX_NUM_REQS]
char rule_name[MAX_LEN_NAME]
char helptext[MAX_LEN_PACKET]
char music_combat[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_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 first_reqs[MAX_NUM_REQS]
char rule_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
struct requirement reqs[MAX_NUM_REQS]
char helptext[MAX_LEN_PACKET]
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]
struct requirement research_reqs[MAX_NUM_REQS]
char graphic_str[MAX_LEN_NAME]
char rule_name[MAX_LEN_NAME]
char graphic_alt[MAX_LEN_NAME]
char helptext[MAX_LEN_PACKET]
char helptxt[MAX_LEN_PACKET]
int extra_removal_times[MAX_EXTRA_TYPES]
Terrain_type_id transform_result
int resource_freq[MAX_EXTRA_TYPES]
char helptext[MAX_LEN_PACKET]
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 helptext[MAX_LEN_PACKET]
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 build_reqs[MAX_NUM_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]
char helptext[MAX_LEN_PACKET]
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