68 size_t reject_msg_len);
71 size_t reject_msg_len);
75 size_t reject_msg_len);
78 size_t reject_msg_len);
82 size_t reject_msg_len);
85typedef const char *(*help_callback_func_t) (
const struct setting *pset);
86typedef const struct sset_val_name * (*val_name_func_t) (
int value);
183 struct setting_list *
level[OLEVELS_NUM];
187 const char *
name,
const char *path);
195 const struct setting *
const *pset2);
197#define settings_snprintf(_buf, _buf_len, format, ...) \
198 if (_buf != NULL) { \
199 fc_snprintf(_buf, _buf_len, format, ## __VA_ARGS__); \
215#define NAME_CASE(_val, _support, _pretty) \
218 static const struct sset_val_name name = { _support, _pretty }; \
227 switch (caravanbonus) {
229 NAME_CASE(CBS_CLASSIC,
"CLASSIC",
N_(
"Classic Freeciv"));
230 NAME_CASE(CBS_LOGARITHMIC,
"LOGARITHMIC",
N_(
"Log^2 N style"));
255 switch (1 << topology_bit) {
256 NAME_CASE(TF_WRAPX,
"WRAPX",
N_(
"Wrap East-West"));
257 NAME_CASE(TF_WRAPY,
"WRAPY",
N_(
"Wrap North-South"));
269 switch (revenue_style) {
271 NAME_CASE(TRS_CLASSIC,
"CLASSIC",
N_(
"Classic Freeciv"));
272 NAME_CASE(TRS_SIMPLE,
"SIMPLE",
N_(
"Proportional to tile trade"));
301 N_(
"Generator's choice"));
303 N_(
"One player per continent"));
305 N_(
"Two or three players per continent"));
307 N_(
"All players on a single continent"));
309 N_(
"Depending on size of continents"));
319 switch (team_placement) {
320 NAME_CASE(TEAM_PLACEMENT_DISABLED,
"DISABLED",
322 NAME_CASE(TEAM_PLACEMENT_CLOSEST,
"CLOSEST",
323 N_(
"As close as possible"));
324 NAME_CASE(TEAM_PLACEMENT_CONTINENT,
"CONTINENT",
325 N_(
"On the same continent"));
326 NAME_CASE(TEAM_PLACEMENT_HORIZONTAL,
"HORIZONTAL",
327 N_(
"Horizontal placement"));
328 NAME_CASE(TEAM_PLACEMENT_VERTICAL,
"VERTICAL",
329 N_(
"Vertical placement"));
339 switch (persistent_ready) {
340 NAME_CASE(PERSISTENTR_DISABLED,
"DISABLED",
342 NAME_CASE(PERSISTENTR_CONNECTED,
"CONNECTED",
343 N_(
"As long as connected"));
354 switch (condition_bit) {
368 switch (autosaves_bit) {
388 N_(
"See everything inside borders"));
390 N_(
"Borders expand to unknown, revealing tiles"));
400 switch (trait_dist) {
427 switch (happyborders) {
443 N_(
"Only allowed between human players"));
472 switch (barbarians) {
487 switch (revolentype) {
502 NAME_CASE(REVEAL_MAP_START,
"START",
N_(
"Reveal map at game start"));
503 NAME_CASE(REVEAL_MAP_DEAD,
"DEAD",
N_(
"Unfog map for dead players"));
514 NAME_CASE(AIRLIFTING_ALLIED_SRC,
"FROM_ALLIES",
515 N_(
"Allows units to be airlifted from allied cities"));
516 NAME_CASE(AIRLIFTING_ALLIED_DEST,
"TO_ALLIES",
517 N_(
"Allows units to be airlifted to allied cities"));
518 NAME_CASE(AIRLIFTING_UNLIMITED_SRC,
"SRC_UNLIMITED",
519 N_(
"Unlimited units from source city"));
520 NAME_CASE(AIRLIFTING_UNLIMITED_DEST,
"DEST_UNLIMITED",
521 N_(
"Unlimited units to destination city"));
532 NAME_CASE(PMT_CONCURRENT,
"ALL",
N_(
"All players move concurrently"));
534 "PLAYER",
N_(
"All players alternate movement"));
535 NAME_CASE(PMT_TEAMS_ALTERNATE,
"TEAM",
N_(
"Team alternate movement"));
559 switch (compresstype) {
561#ifdef FREECIV_HAVE_LIBZ
562 NAME_CASE(FZ_ZLIB,
"LIBZ",
N_(
"Using zlib (gzip format)"));
564#ifdef FREECIV_HAVE_LIBBZ2
565 NAME_CASE(FZ_BZIP2,
"BZIP2",
N_(
"Using bzip2 (deprecated)"));
567#ifdef FREECIV_HAVE_LIBLZMA
570#ifdef FREECIV_HAVE_LIBZSTD
600 static char pmhelp[512];
604 _(
"This setting controls whether players may make "
605 "moves at the same time during a turn. Change "
606 "in setting takes effect next turn. Currently, at least "
607 "to the end of this turn, mode is \"%s\"."),
619 static char hutshelp[512];
624 "Currently this setting is being overridden by an "
625 "old scenario or savegame, which has set the absolute "
626 "number of huts to %d. Explicitly set this setting "
627 "again to make it take effect instead."),
659 log_normal(
_(
"Warning: aifill not met: %s."), msg);
661 _(
"Warning: aifill not met: %s."), msg);
672 if (pplayer->nation != NULL) {
691 _(
"Warning: not enough nations in this nation set "
692 "for all current players."));
721 if (
is_human(pplayer) && !pplayer->is_connected) {
814 char *reject_msg,
size_t reject_msg_len)
822 _(
"Invalid save name definition: '%s' "
823 "(resolves to '%s')."), value, buf);
835 char *reject_msg,
size_t reject_msg_len)
841 _(
"You cannot disable the map generator."));
848 _(
"You cannot require a map generator "
849 "when a map is loaded."));
861 char *reject_msg,
size_t reject_msg_len)
865 _(
"Invalid score name definition: '%s'."), value);
880 size_t reject_msg_len)
888 _(
"Demography string validation failed at character: "
889 "'%c'. Try \"/help demography\"."), value[error]);
898 char *reject_msg,
size_t reject_msg_len)
906 }
else if (!(value & (1 <<
AS_TIMER))
924 size_t reject_msg_len)
926 int len = strlen(value), i;
927 bool havecharacter_state =
FALSE;
937 for (i = 0; i <
len; i++) {
939 if (strchr(
"HhAadbOo", value[i])) {
940 havecharacter_state =
TRUE;
946 if (havecharacter_state && strchr(
"1234", value[i])) {
947 havecharacter_state =
FALSE;
953 _(
"Allowed take string validation failed at "
954 "character: '%c'. Try \"/help allowtake\"."),
970 size_t reject_msg_len)
972 int len = strlen(value), i;
974 bool firstnative =
FALSE;
981 for (i = 0; i <
len; i++) {
982 if (strchr(
"cwxksfdDaA", value[i])) {
988 _(
"Starting units string validation failed at "
989 "character '%c'. Try \"/help startunits\"."),
999 &&
BV_ISSET(pterrain->native_to, first_role)) {
1008 _(
"The first starting unit must be native to at "
1009 "least one \"Starter\" terrain. "
1010 "Try \"/help startunits\"."));
1022 char *reject_msg,
size_t reject_msg_len)
1027 _(
"Cannot set endturn earlier than current turn."));
1037 char *reject_msg,
size_t reject_msg_len)
1041 _(
"Number of players (%d) is higher than requested "
1051 _(
"Requested value (%d) is greater than number of "
1052 "available start positions (%d). Keeping old value."),
1066 size_t reject_msg_len)
1068 if (strlen(value) == 0) {
1075 _(
"Unknown nation set \"%s\". See '%slist nationsets' "
1076 "for possible values."), value, caller ?
"/" :
"");
1085 char *reject_msg,
size_t reject_msg_len)
1089 && value < 30 && value != 0) {
1091 _(
"You are not allowed to set timeout values less "
1092 "than 30 seconds."));
1100 _(
"For autogames ('timeout' = -1) 'unitwaittime' "
1101 "should be deactivated (= 0)."));
1110 _(
"'timeout' can not be lower than 3/2 of the "
1111 "'unitwaittime' setting (= %d). Please change "
1123 char *reject_msg,
size_t reject_msg_len)
1127 && value < 30 && value != 0) {
1129 _(
"You are not allowed to set timeout values less "
1130 "than 30 seconds."));
1141 char *reject_msg,
size_t reject_msg_len)
1146 _(
"For autogames ('timeout' = -1) 'unitwaittime' "
1147 "should be deactivated (= 0)."));
1154 _(
"'unitwaittime' has to be lower than 2/3 of the "
1155 "'timeout' setting (= %d). Please change 'timeout' "
1167 char *reject_msg,
size_t reject_msg_len)
1174 _(
"For an isometric or hexagonal map the ysize must be "
1186 char *reject_msg,
size_t reject_msg_len)
1192 _(
"The map size (%d * %d = %d) must be larger than "
1198 _(
"The map size (%d * %d = %d) must be lower than "
1211 char *reject_msg,
size_t reject_msg_len)
1217 _(
"The map size (%d * %d = %d) must be larger than "
1223 _(
"The map size (%d * %d = %d) must be lower than "
1228 && value % 2 != 0) {
1232 _(
"For an isometric or hexagonal map the ysize must be "
1244 char *reject_msg,
size_t reject_msg_len)
1247 && ((value & (TF_ISO)) != 0 || (value & (TF_HEX)) != 0)
1252 _(
"For an isometric or hexagonal map the ysize must be "
1260 if ((value & (TF_WRAPY)) != 0
1264 || (value & (TF_ISO)) != 0
1265 || (value & (TF_HEX)) != 0) {
1268 _(
"Freeciv-web doesn't support this topology."));
1282 size_t reject_msg_len)
1284#ifdef FREECIV_HAVE_LIBBZ2
1285 if (value == FZ_BZIP2) {
1286 log_warn(
_(
"Bzip2 is deprecated as compresstype. Consider "
1298 char *reject_msg,
size_t reject_msg_len)
1309 _(
"No nations in the currently loaded ruleset have "
1310 "associated colors."));
1316#define GEN_BOOL(name, value, sclass, scateg, slevel, al_read, al_write, \
1317 short_help, extra_help, func_validate, func_action, \
1319 {name, sclass, al_read, al_write, short_help, extra_help, NULL, SST_BOOL, \
1322 .boolean = {&value, _default, func_validate, bool_name, \
1323 FALSE} INIT_BRACE_END , func_action, FALSE, TRUE},
1325#define GEN_INT(name, value, sclass, scateg, slevel, al_read, al_write, \
1326 short_help, extra_help, func_help, \
1327 func_validate, func_action, \
1328 _min, _max, _default) \
1329 {name, sclass, al_read, al_write, short_help, extra_help, func_help, \
1330 SST_INT, scateg, slevel, \
1332 .integer = {(int *) &value, _default, _min, _max, func_validate, \
1333 0} INIT_BRACE_END, \
1334 func_action, FALSE, TRUE},
1336#define GEN_STRING(name, value, sclass, scateg, slevel, al_read, al_write, \
1337 short_help, extra_help, func_validate, func_action, \
1339 {name, sclass, al_read, al_write, short_help, extra_help, NULL, \
1340 SST_STRING, scateg, slevel, \
1342 .string = {value, _default, sizeof(value), func_validate, ""} \
1344 func_action, FALSE, TRUE},
1346#define GEN_STRING_NRS(name, value, sclass, scateg, slevel, al_read, al_write, \
1347 short_help, extra_help, func_validate, func_action, \
1349 {name, sclass, al_read, al_write, short_help, extra_help, NULL, \
1350 SST_STRING, scateg, slevel, \
1352 .string = {value, _default, sizeof(value), func_validate, ""} \
1354 func_action, FALSE, FALSE},
1356#define GEN_ENUM(name, value, sclass, scateg, slevel, al_read, al_write, \
1357 short_help, extra_help, func_help, func_validate, \
1358 func_action, func_name, _default) \
1359 { name, sclass, al_read, al_write, short_help, extra_help, func_help, \
1360 SST_ENUM, scateg, slevel, \
1362 .enumerator = { &value, sizeof(value), _default, \
1364 (val_name_func_t) func_name, 0 } INIT_BRACE_END, \
1365 func_action, FALSE, TRUE},
1367#define GEN_BITWISE(name, value, sclass, scateg, slevel, al_read, al_write, \
1368 short_help, extra_help, func_validate, func_action, \
1369 func_name, _default) \
1370 { name, sclass, al_read, al_write, short_help, extra_help, NULL, \
1371 SST_BITWISE, scateg, slevel, \
1373 .bitwise = { (unsigned *) (void *) &value, _default, func_validate, \
1374 func_name, 0 } INIT_BRACE_END, \
1375 func_action, FALSE, TRUE},
1384 SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1385 N_(
"Map size definition"),
1391 N_(
"Chooses the method used to define the map size. Other options "
1392 "specify the parameters for each method.\n"
1393 "- \"Number of tiles\" (FULLSIZE): Map area (option 'size').\n"
1394 "- \"Tiles per player\" (PLAYER): Number of (land) tiles per "
1395 "player (option 'tilesperplayer').\n"
1396 "- \"Width and height\" (XYSIZE): Map width and height in "
1397 "tiles (options 'xsize' and 'ysize')."), NULL,
1401 SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1402 N_(
"Map area (in thousands of tiles)"),
1408 N_(
"This value is used to determine the map area.\n"
1409 " size = 4 is a normal map of 4,000 tiles (default)\n"
1410 " size = 20 is a huge map of 20,000 tiles\n"
1411 "For this option to take effect, the \"Map size definition\" "
1412 "option ('mapsize') must be set to \"Number of tiles\" "
1413 "(FULLSIZE)."), NULL, NULL, NULL,
1417 SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1418 N_(
"Number of (land) tiles per player"),
1424 N_(
"This value is used to determine the map dimensions. It "
1425 "calculates the map size at game start based on the number "
1426 "of players and the value of the setting 'landmass'.\n"
1427 "For this option to take effect, the \"Map size definition\" "
1428 "option ('mapsize') must be set to \"Tiles per player\" "
1434 SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1435 N_(
"Map width in tiles"),
1441 N_(
"Defines the map width.\n"
1442 "For this option to take effect, the \"Map size definition\" "
1443 "option ('mapsize') must be set to \"Width and height\" "
1448 SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1449 N_(
"Map height in tiles"),
1455 N_(
"Defines the map height.\n"
1456 "For this option to take effect, the \"Map size definition\" "
1457 "option ('mapsize') must be set to \"Width and height\" "
1463 SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1467 N_(
"Freeciv-web maps are always two-dimensional. They may wrap "
1468 "at the east-west directions to form a flat map or a "
1472 N_(
"Freeciv maps are always two-dimensional. They may wrap at "
1473 "the north-south and east-west directions to form a flat "
1474 "map, a cylinder, or a torus (donut). Individual tiles may "
1475 "be rectangular or hexagonal, with either an overhead "
1476 "(\"classic\") or isometric alignment.\n"
1477 "To play with a particular topology, clients will need a "
1478 "matching tileset.\n"
1479 "Overhead rectangular: Isometric rectangular:\n"
1480 " _________ /\\/\\/\\/\\/\\\n"
1481 " |_|_|_|_|_| /\\/\\/\\/\\/\\/\n"
1482 " |_|_|_|_|_| \\/\\/\\/\\/\\/\\\n"
1483 " |_|_|_|_|_| /\\/\\/\\/\\/\\/\n"
1484 " \\/\\/\\/\\/\\/\n"
1486 " /\\/\\/\\/\\/\\/\\ _ _ _ _ _\n"
1487 " | | | | | | | / \\_/ \\_/ \\_/ \\_/ \\\n"
1488 " \\/\\/\\/\\/\\/\\/\\"
1489 " \\_/ \\_/ \\_/ \\_/ \\_/\n"
1490 " | | | | | | | / \\_/ \\_/ \\_/ \\_/ \\\n"
1491 " \\/\\/\\/\\/\\/\\/"
1492 " \\_/ \\_/ \\_/ \\_/ \\_/\n"),
1497 SSET_MAP_GEN, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1498 N_(
"Method used to generate map"),
1504 N_(
"Specifies the algorithm used to generate the map. If the "
1505 "default value of the 'startpos' option is used, then the "
1506 "chosen generator chooses an appropriate 'startpos' setting; "
1507 "otherwise, the generated map tries to accommodate the "
1508 "chosen 'startpos' setting.\n"
1509 "- \"Scenario map\" (SCENARIO): indicates a pre-generated map. "
1510 "By default, if the scenario does not specify start positions, "
1511 "they will be allocated depending on the size of continents.\n"
1512 "- \"Fully random height\" (RANDOM): generates maps with a "
1513 "number of equally spaced, relatively small islands. By default, "
1514 "start positions are allocated depending on continent size.\n"
1515 "- \"Pseudo-fractal height\" (FRACTAL): generates Earthlike "
1516 "worlds with one or more large continents and a scattering of "
1517 "smaller islands. By default, players are all placed on a "
1518 "single continent.\n"
1519 "- \"Island-based\" (ISLAND): generates 'fair' maps with a "
1520 "number of similarly-sized and -shaped islands, each with "
1521 "approximately the same ratios of terrain types. By default, "
1522 "each player gets their own island.\n"
1523 "- \"Fair islands\" (FAIR): generates the exact copy of the "
1524 "same island for every player or every team.\n"
1525 "- \"Fracture map\" (FRACTURE): generates maps from a fracture "
1526 "pattern. Tends to place hills and mountains along the edges "
1527 "of the continents.\n"
1528 "If the requested generator is incompatible with other server "
1529 "settings, the server may fall back to another generator."),
1533 SSET_MAP_GEN, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1534 N_(
"Method used to choose start positions"),
1540 N_(
"The method used to choose where each player's initial units "
1541 "start on the map. (For scenarios which include pre-set "
1542 "start positions, this setting is ignored.)\n"
1543 "- \"Generator's choice\" (DEFAULT): the start position "
1544 "placement will depend on the map generator chosen. See the "
1545 "'generator' setting.\n"
1546 "- \"One player per continent\" (SINGLE): one player is "
1547 "placed on each of a set of continents of approximately "
1548 "equivalent value (if possible).\n"
1549 "- \"Two or three players per continent\" (2or3): similar "
1550 "to SINGLE except that two players will be placed on each "
1551 "continent, with three on the 'best' continent if there is an "
1552 "odd number of players.\n"
1553 "- \"All players on a single continent\" (ALL): all players "
1554 "will start on the 'best' available continent.\n"
1555 "- \"Depending on size of continents\" (VARIABLE): players "
1556 "will be placed on the 'best' available continents such that, "
1557 "as far as possible, the number of players on each continent "
1558 "is proportional to its value.\n"
1559 "If the server cannot satisfy the requested setting due to "
1560 "there being too many players for continents, it may fall "
1561 "back to one of the others. (However, map generators try to "
1562 "create the right number of continents for the choice of this "
1563 "'startpos' setting and the number of players, so this is "
1564 "unlikely to occur.)"),
1568 SSET_MAP_GEN, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1569 N_(
"Method used for placement of team mates"),
1575 N_(
"After start positions have been generated thanks to the "
1576 "'startpos' setting, this setting controls how the start "
1577 "positions will be assigned to the different players of the "
1579 "- \"Disabled\" (DISABLED): the start positions will be "
1580 "randomly assigned to players, regardless of teams.\n"
1581 "- \"As close as possible\" (CLOSEST): players will be "
1582 "placed as close as possible, regardless of continents.\n"
1583 "- \"On the same continent\" (CONTINENT): if possible, place "
1584 "all players of the same team onto the same "
1585 "island/continent.\n"
1586 "- \"Horizontal placement\" (HORIZONTAL): players of the same "
1587 "team will be placed horizontally.\n"
1588 "- \"Vertical placement\" (VERTICAL): players of the same "
1589 "team will be placed vertically."),
1593 SSET_MAP_GEN, SSET_GEOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
1594 N_(
"Presence of 1x1 islands"),
1595 N_(
"This setting controls whether the map generator is allowed "
1596 "to make islands of one only tile size."), NULL, NULL,
1601 ALLOW_NONE, ALLOW_BASIC,
1602 N_(
"Whether the poles are separate continents"),
1603 N_(
"If this setting is disabled, the continents may attach to "
1607 SSET_MAP_GEN, SSET_GEOLOGY, SSET_SITUATIONAL, ALLOW_NONE, ALLOW_BASIC,
1608 N_(
"How much the land at the poles is flattened"),
1610 N_(
"Controls how much the height of the poles is flattened "
1611 "during map generation, preventing a diversity of land "
1612 "terrain there. 0 is no flattening, 100 is maximum "
1613 "flattening. Only affects the 'RANDOM' and 'FRACTAL' "
1614 "map generators."), NULL,
1620 ALLOW_NONE, ALLOW_BASIC,
1621 N_(
"Whether there's just one pole generated"),
1622 N_(
"If this setting is enabled, only one side of the map will have "
1623 "a pole. This setting has no effect if the map wraps both "
1627 SSET_MAP_GEN, SSET_GEOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
1628 N_(
"All the map is temperate"),
1629 N_(
"If this setting is enabled, the temperature will be "
1630 "equivalent everywhere on the map. As a result, the "
1631 "poles won't be generated."),
1636 ALLOW_NONE, ALLOW_BASIC,
1637 N_(
"Average temperature of the planet"),
1638 N_(
"Small values will give a cold map, while larger values will "
1639 "give a hotter map.\n"
1641 "100 means a very dry and hot planet with no polar arctic "
1642 "zones, only tropical and dry zones.\n"
1643 " 70 means a hot planet with little polar ice.\n"
1644 " 50 means a temperate planet with normal polar, cold, "
1645 "temperate, and tropical zones; a desert zone overlaps "
1646 "tropical and temperate zones.\n"
1647 " 30 means a cold planet with small tropical zones.\n"
1648 " 0 means a very cold planet with large polar zones and no "
1655 ALLOW_NONE, ALLOW_BASIC,
1656 N_(
"Percentage of the map that is land"),
1657 N_(
"This setting gives the approximate percentage of the map "
1658 "that will be made into land."), NULL, NULL, NULL,
1663 ALLOW_NONE, ALLOW_BASIC,
1664 N_(
"Amount of hills/mountains"),
1665 N_(
"Small values give flat maps, while higher values give a "
1666 "steeper map with more hills and mountains."),
1672 ALLOW_NONE, ALLOW_BASIC,
1673 N_(
"Amount of water on landmasses"),
1674 N_(
"Small values mean lots of dry, desert-like land; "
1675 "higher values give a wetter map with more swamps, "
1676 "jungles, and rivers."), NULL, NULL, NULL,
1680 SSET_RULES, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1681 N_(
"Global warming"),
1682 N_(
"If turned off, global warming will not occur "
1683 "as a result of pollution. This setting does not "
1684 "affect pollution."), NULL, NULL,
1688 SSET_RULES, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1689 N_(
"Global warming percent"),
1690 N_(
"This is a multiplier for the rate of accumulation of global "
1691 "warming."), NULL, NULL, NULL,
1697 SSET_RULES, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1698 N_(
"Nuclear winter"),
1699 N_(
"If turned off, nuclear winter will not occur "
1700 "as a result of nuclear war."), NULL, NULL,
1704 SSET_RULES, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1705 N_(
"Nuclear winter percent"),
1706 N_(
"This is a multiplier for the rate of accumulation of nuclear "
1707 "winter."), NULL, NULL, NULL,
1715 ALLOW_NONE, ALLOW_BASIC,
1717 ALLOW_HACK, ALLOW_HACK,
1719 N_(
"Map generation random seed"),
1720 N_(
"The same seed will always produce the same map; "
1721 "for zero (the default) a seed will be generated randomly, "
1722 "based on gameseed. If also gameseed is zero, "
1723 "the map will be completely random."),
1735 ALLOW_NONE, ALLOW_BASIC,
1737 ALLOW_HACK, ALLOW_HACK,
1739 N_(
"Game random seed"),
1740 N_(
"For zero (the default) a seed will be chosen based "
1741 "on system entropy or, failing that, the current time."),
1746 SSET_MAP_ADD, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1747 N_(
"Amount of \"special\" resource tiles"),
1748 N_(
"Special resources improve the basic terrain type they "
1749 "are on. The server variable's scale is parts per "
1750 "thousand."), NULL, NULL, NULL,
1754 SSET_MAP_ADD, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1755 N_(
"Amount of huts (bonus extras)"),
1756 N_(
"Huts are tile extras that usually may be investigated by "
1758 "The server variable's scale is huts per thousand tiles."),
1763 SSET_MAP_ADD, SSET_GEOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1764 N_(
"Amount of animals"),
1765 N_(
"Number of animals initially created on terrains "
1766 "defined for them in the ruleset (if the ruleset supports it). "
1767 "The server variable's scale is animals per "
1768 "thousand tiles."), NULL, NULL, NULL,
1776 ALLOW_NONE, ALLOW_BASIC,
1777 N_(
"Minimum number of players"),
1778 N_(
"There must be at least this many players (connected "
1779 "human players) before the game can start."),
1785 N_(
"Maximum number of players"),
1786 N_(
"The maximal number of human and AI players who can be in "
1787 "the game. When this number of players are connected in "
1788 "the pregame state, any new players who try to connect "
1789 "will be rejected.\n"
1790 "When playing a scenario which defines player start positions, "
1791 "this setting cannot be set to greater than the number of "
1792 "defined start positions."),
1797 SSET_PLAYERS, SSET_INTERNAL, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1798 N_(
"Limited number of AI players"),
1799 N_(
"If set to a positive value, then AI players will be "
1800 "automatically created or removed to keep the total "
1801 "number of players at this amount. As more players join, "
1802 "these AI players will be replaced. When set to zero, "
1803 "all AI players will be removed."),
1808 SSET_META, SSET_NETWORK, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
1809 N_(
"When the Readiness of a player gets autotoggled off"),
1810 N_(
"In pre-game, usually when new players join or old ones leave, "
1811 "those who have already accepted game to start by toggling \"Ready\" "
1812 "get that autotoggled off in the changed situation. This setting "
1813 "can be used to make readiness more persistent."),
1818 ALLOW_NONE, ALLOW_BASIC,
1819 N_(
"Set of nations to choose from"),
1821 N_(
"Controls the set of nations allowed in the game. The "
1822 "choices are defined by the ruleset.\n"
1823 "Only nations in the set selected here will be allowed in "
1824 "any circumstances, including new players and civil war; "
1825 "small sets may thus limit the number of players in a game.\n"
1826 "If this is left blank, the ruleset's default nation set is "
1828 "See '/list nationsets' for possible choices for the "
1829 "currently loaded ruleset."),
1833 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
1834 ALLOW_NONE, ALLOW_BASIC,
1835 N_(
"Event cache for this number of turns"),
1836 N_(
"Event messages are saved for this number of turns. A value of "
1837 "0 deactivates the event cache."),
1842 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
1843 ALLOW_NONE, ALLOW_BASIC,
1844 N_(
"Size of the event cache"),
1845 N_(
"This defines the maximal number of events in the event cache."),
1850 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
1851 ALLOW_NONE, ALLOW_BASIC,
1852 N_(
"Save chat messages in the event cache"),
1853 N_(
"If turned on, chat messages will be saved in the event "
1857 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
1858 ALLOW_NONE, ALLOW_BASIC,
1859 N_(
"Print turn and time for each cached event"),
1861 N_(
"If turned on, all cached events will be marked by the turn "
1862 "and time of the event like '(T2 - 15:29:52)'."),
1870 ALLOW_NONE, ALLOW_BASIC,
1871 N_(
"List of players' initial units"),
1872 N_(
"This should be a string of characters, each of which "
1873 "specifies a unit role. The first character must be native to "
1874 "at least one \"Starter\" terrain. The characters and their "
1876 " c = City founder (eg., Settlers)\n"
1877 " w = Terrain worker (eg., Engineers)\n"
1878 " x = Explorer (eg., Explorer)\n"
1879 " k = Gameloss (eg., King)\n"
1880 " s = Diplomat (eg., Diplomat)\n"
1881 " f = Ferryboat (eg., Trireme)\n"
1882 " d = Ok defense unit (eg., Warriors)\n"
1883 " D = Good defense unit (eg., Phalanx)\n"
1884 " a = Fast attack unit (eg., Horsemen)\n"
1885 " A = Strong attack unit (eg., Catapult)\n"),
1890 ALLOW_NONE, ALLOW_BASIC,
1891 N_(
"Whether player starts with a city"),
1892 N_(
"If this is set, game will start with player's first "
1893 "city already founded to starting location."),
1898 ALLOW_NONE, ALLOW_BASIC,
1899 N_(
"Area where initial units are located"),
1900 N_(
"This is the radius within "
1901 "which the initial units are dispersed."),
1907 ALLOW_NONE, ALLOW_BASIC,
1908 N_(
"Starting gold per player"),
1909 N_(
"At the beginning of the game, each player is given this "
1910 "much gold."), NULL, NULL, NULL,
1915 ALLOW_NONE, ALLOW_BASIC,
1916 N_(
"Starting infrapoints per player"),
1917 N_(
"At the beginning of the game, each player is given this "
1918 "many infrapoints."), NULL, NULL, NULL,
1923 ALLOW_NONE, ALLOW_BASIC,
1924 N_(
"Number of initial techs per player"),
1927 N_(
"At the beginning of the game, each player is given this "
1928 "many technologies. The technologies chosen are random for "
1929 "each player. Depending on the value of tech_cost_style in "
1930 "the ruleset, a big value for 'techlevel' can make the next "
1931 "techs really expensive."), NULL, NULL, NULL,
1936 ALLOW_NONE, ALLOW_BASIC,
1937 N_(
"Technology cost multiplier percentage"),
1938 N_(
"This affects how quickly players can research new "
1939 "technology. All tech costs are multiplied by this amount "
1940 "(as a percentage). The base tech costs are determined by "
1941 "the ruleset or other game settings."),
1946 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
1947 N_(
"Allow researching multiple technologies"),
1948 N_(
"Allows switching to any technology without wasting old "
1949 "research. Bulbs are never transferred to new technology. "
1950 "Techpenalty options are ineffective after enabling that "
1951 "option."), NULL, NULL,
1955 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
1956 N_(
"Percentage penalty when changing tech"),
1957 N_(
"If you change your current research technology, and you have "
1958 "positive research points, you lose this percentage of those "
1959 "research points. This does not apply when you have just gained "
1960 "a technology this turn."), NULL, NULL, NULL,
1965 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
1966 N_(
"Chance to lose a technology while receiving it"),
1967 N_(
"The chance that learning a technology by treaty or theft "
1973 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
1974 N_(
"Chance to lose a technology while giving it"),
1975 N_(
"The chance that your civilization will lose a technology if "
1976 "you teach it to someone else by treaty, or if it is stolen "
1982 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
1983 N_(
"Tech leakage percent"),
1984 N_(
"The rate of the tech leakage. This multiplied by the "
1985 "percentage of players who know the tech tell which "
1986 "percentage of tech's bulb cost gets leaked each turn. "
1987 "This setting has no effect if the ruleset has disabled "
1993 SSET_RULES, SSET_SCIENCE, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
1994 N_(
"Team pooled research"),
1995 N_(
"If this setting is turned on, then the team mates will share "
1996 "the science research. Else, every player of the team will "
1997 "have to make its own."),
2001 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2002 N_(
"Penalty when getting tech from treaty"),
2003 N_(
"For each technology you gain from a diplomatic treaty, you "
2004 "lose research points equal to this percentage of the cost to "
2005 "research a new technology. If this is non-zero, you can end up "
2006 "with negative research points."),
2011 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2012 N_(
"Penalty when getting gold from treaty"),
2013 N_(
"When transferring gold in diplomatic treaties, this percentage "
2014 "of the agreed sum is lost to both parties; it is deducted from "
2015 "the donor but not received by the recipient."),
2020 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2021 N_(
"Probability of gold loss during inciting revolt"),
2022 N_(
"When unit trying to incite revolt is eliminated, half of the gold "
2023 "(or quarter, if unit was caught), prepared to bribe citizens, "
2024 "can be lost or captured by enemy."),
2030 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2031 N_(
"Probability of gold capture during inciting revolt"),
2032 N_(
"When unit trying to incite revolt is eliminated and lose its "
2033 "gold, there is chance that this gold would be captured by "
2034 "city defender. Transfer tax would be applied, though. "
2035 "This setting is irrelevant, if incite_gold_loss_chance is zero."),
2041 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2042 N_(
"Penalty when getting tech from conquering"),
2043 N_(
"For each technology you gain by conquering an enemy city, you "
2044 "lose research points equal to this percentage of the cost to "
2045 "research a new technology. If this is non-zero, you can end up "
2046 "with negative research points."),
2052 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2053 N_(
"Penalty when getting a free tech"),
2056 N_(
"For each technology you gain \"for free\" (other than "
2057 "covered by 'diplcost' or 'conquercost': for instance, from huts "
2058 "or from Great Library effects), you lose research points "
2059 "equal to this percentage of the cost to research a new "
2060 "technology. If this is non-zero, you can end up "
2061 "with negative research points."),
2066 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2067 N_(
"Research point debt threshold for losing tech"),
2068 N_(
"When you have negative research points, and your shortfall is "
2069 "greater than this percentage of the cost of your current "
2070 "research, you forget a technology you already knew.\n"
2071 "The special value -1 prevents loss of technology regardless of "
2072 "research points."),
2078 SSET_RULES, SSET_SCIENCE, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2079 N_(
"Research points restored after losing a tech"),
2080 N_(
"When you lose a technology due to a negative research balance "
2081 "(see 'techlossforgiveness'), this percentage of its research "
2082 "cost is credited to your research balance (this may not be "
2083 "sufficient to make it positive).\n"
2084 "The special value -1 means that your research balance is always "
2085 "restored to zero, regardless of your previous shortfall."),
2091 SSET_RULES, SSET_ECONOMICS, SSET_SITUATIONAL,
2092 ALLOW_NONE, ALLOW_BASIC,
2093 N_(
"Food required for a city to grow"),
2094 N_(
"This is the base amount of food required to grow a city. "
2095 "This value is multiplied by another factor that comes from "
2096 "the ruleset and is dependent on the size of the city."),
2101 SSET_RULES, SSET_ECONOMICS, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2102 N_(
"Percentage food lost when city can't grow"),
2103 N_(
"If a city would expand, but it can't because it lacks some "
2104 "prerequisite (traditionally an Aqueduct or Sewer System), "
2105 "this is the base percentage of its foodbox that is lost "
2106 "each turn; the penalty may be reduced by buildings or other "
2107 "circumstances, depending on the ruleset."),
2113 SSET_RULES, SSET_ECONOMICS, SSET_SITUATIONAL,
2114 ALLOW_NONE, ALLOW_BASIC,
2115 N_(
"Multiplier percentage for production costs"),
2116 N_(
"This affects how quickly units and buildings can be "
2117 "produced. The base costs are multiplied by this value (as "
2129 SSET_RULES, SSET_ECONOMICS, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2130 N_(
"Minimum city size to get full trade"),
2133 N_(
"There is a trade penalty in all cities smaller than this. "
2134 "The penalty is 100% (no trade at all) for sizes up to "
2135 "'notradesize', and decreases gradually to 0% (no penalty "
2136 "except the normal corruption) for size='fulltradesize'. "
2137 "See also 'notradesize'."), NULL, NULL, NULL,
2142 SSET_RULES, SSET_ECONOMICS, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2143 N_(
"Maximum size of a city without trade"),
2146 N_(
"Cities do not produce any trade at all unless their size "
2147 "is larger than this amount. The produced trade increases "
2148 "gradually for cities larger than 'notradesize' and smaller "
2149 "than 'fulltradesize'. See also 'fulltradesize'."),
2155 SSET_RULES, SSET_ECONOMICS, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2156 N_(
"How largely trade distance is relative to world size"),
2159 N_(
"When determining trade between cities, the distance factor "
2160 "can be partly or fully relative to world size. This setting "
2161 "determines how big percentage of the bonus calculation is "
2162 "relative to world size, and how much only absolute distance "
2169 SSET_RULES, SSET_SOCIOLOGY, SSET_SITUATIONAL,
2170 ALLOW_NONE, ALLOW_BASIC,
2171 N_(
"Minimum distance between cities"),
2172 N_(
"When a player attempts to found a new city, it is prevented "
2173 "if the distance from any existing city is less than this "
2174 "setting. For example, when this setting is 3, there must be "
2175 "at least two clear tiles in any direction between all existing "
2176 "cities and the new city site. A value of 1 removes any such "
2177 "restriction on city placement."),
2183 SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2184 N_(
"Technology trading"),
2185 N_(
"If turned off, trading technologies in the diplomacy dialog "
2186 "is not allowed."), NULL, NULL,
2190 SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2192 N_(
"If turned off, trading gold in the diplomacy dialog "
2193 "is not allowed."), NULL, NULL,
2197 SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2199 N_(
"If turned off, trading cities in the diplomacy dialog "
2200 "is not allowed."), NULL, NULL,
2204 SSET_RULES, SSET_ECONOMICS, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2205 N_(
"Caravan bonus style"),
2206 N_(
"The formula for the bonus when a caravan enters a city. "
2207 "CLASSIC bonuses are proportional to distance and trade "
2208 "of source and destination with multipliers for overseas and "
2209 "international destinations. LOGARITHMIC bonuses are "
2210 "proportional to log^2(distance + trade)."),
2215 SSET_RULES, SSET_ECONOMICS, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2216 N_(
"Trade revenue style"),
2217 N_(
"The formula for the trade a city receives from a trade route. "
2218 "CLASSIC revenues are given by the sum of the two city sizes "
2219 "plus the distance between them, with multipliers for overseas "
2220 "and international routes. "
2221 "SIMPLE revenues are proportional to the average trade of the "
2227 SSET_RULES, SSET_ECONOMICS, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2228 N_(
"Minimum distance for trade routes"),
2229 N_(
"In order for two cities in the same civilization to establish "
2230 "a trade route, they must be at least this far apart on the "
2231 "map. For square grids, the distance is calculated as "
2232 "\"Manhattan distance\", that is, the sum of the displacements "
2233 "along the x and y directions."), NULL, NULL, NULL,
2238 SSET_RULES, SSET_SOCIOLOGY, SSET_SITUATIONAL,
2239 ALLOW_NONE, ALLOW_BASIC,
2240 N_(
"Number of turns between rapture effect"),
2241 N_(
"Sets the number of turns between rapture growth of a city. "
2242 "If set to n a city will grow after celebrating for n+1 "
2250 ALLOW_NONE, ALLOW_BASIC,
2251 N_(
"Frequency of disasters"),
2252 N_(
"Affects how often random disasters happen to cities, "
2253 "if any are defined by the ruleset. The relative frequency "
2254 "of disaster types is set by the ruleset. Zero prevents "
2255 "any random disasters from occurring."),
2261 SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2262 N_(
"AI trait distribution method"),
2263 N_(
"How trait values are given to AI players."),
2267 SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2268 N_(
"Chance for conquered building destruction"),
2269 N_(
"When a player conquers a city, each city improvement has this "
2270 "percentage chance to be destroyed."), NULL, NULL, NULL,
2274 SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2275 N_(
"Chance of moving into tile after attack"),
2276 N_(
"If set to 0, combat is Civ1/2-style (when you attack, "
2277 "you remain in place). If set to 100, attacking units "
2278 "will always move into the tile they attacked when they win "
2279 "the combat (and no enemy units remain in the tile). If "
2280 "set to a value between 0 and 100, this will be used as "
2281 "the percent chance of \"occupying\" territory."),
2287 SSET_SITUATIONAL, ALLOW_NONE, ALLOW_BASIC,
2288 N_(
"Turn on/off server-side autoattack"),
2289 N_(
"If set to on, units with moves left will automatically "
2290 "consider attacking enemy units that move adjacent to them."),
2295 ALLOW_NONE, ALLOW_BASIC,
2296 N_(
"Do all units in tile die with defender"),
2297 N_(
"If this is enabled, each time a defender unit loses in combat, "
2298 "and is not inside a city or suitable base, all units in the same "
2299 "tile are destroyed along with the defender. If this is disabled, "
2300 "only the defender unit is destroyed."),
2304 SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2305 N_(
"Reduce city population after attack"),
2306 N_(
"This flag indicates whether a city's population is reduced "
2307 "after a successful attack by an enemy unit. If this is "
2308 "disabled, population is never reduced. Even when this is "
2309 "enabled, only some units may kill citizens."),
2313 SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2314 N_(
"Slowly kill units without home cities (e.g., starting units)"),
2315 N_(
"If greater than 0, then every unit without a homecity will "
2316 "lose hitpoints each turn. The number of hitpoints lost is "
2317 "given by 'killunhomed' percent of the hitpoints of the unit "
2318 "type. At least one hitpoint is lost every turn until the "
2319 "death of the unit."),
2325 ALLOW_NONE, ALLOW_BASIC,
2326 N_(
"National borders"),
2327 N_(
"If this is not disabled, then any land tiles around a "
2328 "city or border-claiming extra (like the classic ruleset's "
2329 "Fortress base) will be owned by that nation. "
2330 "SEE_INSIDE and EXPAND makes everything inside a player's "
2331 "borders visible at once. ENABLED will, in some rulesets, "
2332 "grant the same visibility if certain conditions are met."),
2337 ALLOW_NONE, ALLOW_BASIC,
2338 N_(
"Units inside borders cause no unhappiness"),
2339 N_(
"If this is set, units will not cause unhappiness when "
2340 "inside your borders, or even allies borders, depending "
2341 "on value."), NULL, NULL, NULL,
2346 ALLOW_NONE, ALLOW_BASIC,
2347 N_(
"Ability to do diplomacy with other players"),
2348 N_(
"This setting controls the ability to do diplomacy with "
2353 SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2354 N_(
"Allowed city names"),
2358 N_(
"- \"No restrictions\" (NO_RESTRICTIONS): players can have "
2359 "multiple cities with the same names.\n"
2360 "- \"Unique to a player\" (PLAYER_UNIQUE): one player can't "
2361 "have multiple cities with the same name.\n"
2362 "- \"Globally unique\" (GLOBAL_UNIQUE): all cities in a game "
2363 "have to have different names.\n"
2364 "- \"No city name stealing\" (NO_STEALING): like "
2365 "\"Globally unique\", but a player isn't allowed to use a "
2366 "default city name of another nation unless it is a default "
2367 "for their nation also."),
2371 SSET_RULES, SSET_INTERNAL, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2372 N_(
"How to pick player colors"),
2377 N_(
"This setting determines how player colors are chosen. Player "
2378 "colors are used in the Nations report, for national borders on "
2379 "the map, and so on.\n"
2380 "- \"Per-player, in order\" (PLR_ORDER): colors are assigned to "
2381 "individual players in order from a list defined by the "
2383 "- \"Per-player, random\" (PLR_RANDOM): colors are assigned "
2384 "to individual players randomly from the set defined by the "
2386 "- \"Set manually\" (PLR_SET): colors can be set with the "
2387 "'playercolor' command before the game starts; these are not "
2388 "restricted to the ruleset colors. Any players for which no "
2389 "color is set when the game starts get a random color from the "
2391 "- \"Per-team, in order\" (TEAM_ORDER): colors are assigned to "
2392 "teams from the list in the ruleset. Every player on the same "
2393 "team gets the same color.\n"
2394 "- \"Per-nation, in order\" (NATION_ORDER): if the ruleset "
2395 "defines a color for a player's nation, the player takes that "
2396 "color. Any players whose nations don't have associated colors "
2397 "get a random color from the list in the ruleset.\n"
2398 "Regardless of this setting, individual player colors can be "
2399 "changed after the game starts with the 'playercolor' command."),
2418 ALLOW_NONE, ALLOW_BASIC,
2419 N_(
"Barbarian appearance frequency"),
2422 N_(
"This setting controls how frequently the barbarians appear "
2423 "in the game. See also the 'onsetbarbs' setting."),
2428 ALLOW_NONE, ALLOW_BASIC,
2429 N_(
"Barbarian onset turn"),
2430 N_(
"Barbarians will not appear before this turn."),
2436 SSET_RULES, SSET_SOCIOLOGY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2437 N_(
"Way to determine revolution length"),
2438 N_(
"Which method is used in determining how long period of anarchy "
2439 "lasts when changing government. The actual value is set with "
2440 "'revolen' setting. The 'quickening' methods depend on how "
2441 "many times any player has changed to this type of government "
2442 "before, so it becomes easier to establish a new system of "
2443 "government if it has been done before."),
2448 ALLOW_NONE, ALLOW_BASIC,
2449 N_(
"Length of revolution"),
2450 N_(
"When changing governments, a period of anarchy will occur. "
2451 "Value of this setting, used the way 'revolentype' setting "
2452 "dictates, defines the length of the anarchy."),
2458 SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2459 N_(
"Whether to enable fog of war"),
2460 N_(
"If this is enabled, only those units and cities within "
2461 "the vision range of your own units and cities will be "
2462 "revealed to you. You will not see new cities or terrain "
2463 "changes in tiles not observed."),
2467 SSET_RULES, SSET_MILITARY, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2468 N_(
"Whether fog of war applies to border changes"),
2469 N_(
"If this setting is enabled, players will not be able "
2470 "to see changes in tile ownership if they do not have "
2471 "direct sight of the affected tiles. Otherwise, players "
2472 "can see any or all changes to borders as long as they "
2473 "have previously seen the tiles."),
2478 ALLOW_NONE, ALLOW_BASIC,
N_(
"Airlifting style"),
2483 N_(
"This setting affects airlifting units between cities. It "
2484 "can be a set of the following values:\n"
2485 "- \"Allows units to be airlifted from allied cities\" "
2487 "- \"Allows units to be airlifted to allied cities\" "
2489 "- \"Unlimited units from source city\" (SRC_UNLIMITED): "
2490 "airlifting from a city doesn't reduce the "
2491 "airlifted counter. It depends on the ruleset whether "
2492 "this is possible even with zero airlift capacity.\n"
2493 "- \"Unlimited units to destination city\" "
2494 "(DEST_UNLIMITED): airlifting to a city doesn't "
2495 "reduce the airlifted counter. It depends on the ruleset "
2496 "whether this is possible even with zero airlift capacity."),
2501 ALLOW_NONE, ALLOW_BASIC,
2502 N_(
"Base chance for diplomats and spies to succeed"),
2503 N_(
"The base chance of a spy returning from a successful mission and "
2504 "the base chance of success for diplomats and spies for most "
2505 "aggressive mission types. Not all the mission types use diplchance "
2506 "as a base chance – a ruleset can even say that no action at all does. "
2507 "Unit Bribing, and Unit Sabotaging never do. "
2508 "Non-aggressive missions typically have no base chance "
2509 "at all, but always success."),
2515 ALLOW_NONE, ALLOW_BASIC,
2516 N_(
"What kinds of victories are possible"),
2522 N_(
"This setting controls how game can be won. One can always "
2523 "win by conquering entire planet, but other victory conditions "
2524 "can be enabled or disabled:\n"
2525 "- \"Spacerace\" (SPACERACE): Spaceship is built and travels to "
2527 "- \"Allied\" (ALLIED): After defeating enemies, all remaining "
2528 "players are allied.\n"
2529 "- \"Culture\" (CULTURE): Player meets ruleset defined cultural "
2530 "domination criteria.\n"),
2534 SSET_SCIENCE, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
2535 N_(
"Should the game end if the spaceship arrives?"),
2536 N_(
"If this option is turned on, the game will end with the "
2537 "arrival of a spaceship at Alpha Centauri."),
2543 N_(
"Percentage to multiply spaceship travel time by"),
2544 N_(
"This percentage is multiplied onto the time it will take for "
2545 "a spaceship to arrive at Alpha Centauri."), NULL, NULL, NULL,
2551 ALLOW_NONE, ALLOW_BASIC,
2552 N_(
"Minimum number of cities for civil war"),
2553 N_(
"A civil war is triggered when a player has at least this "
2554 "many cities and the player's capital is captured. If "
2555 "this option is set to the maximum value, civil wars are "
2556 "turned off altogether."), NULL, NULL, NULL,
2562 ALLOW_NONE, ALLOW_BASIC,
2563 N_(
"Restrict the use of the infrastructure for enemy units"),
2564 N_(
"If this option is enabled, the use of roads and rails "
2565 "will be restricted for enemy units."), NULL, NULL,
2570 ALLOW_NONE, ALLOW_BASIC,
2571 N_(
"Does unreachable unit protect reachable ones"),
2572 N_(
"This option controls whether tiles with both unreachable "
2573 "and reachable units can be attacked. If disabled, any "
2574 "tile with reachable units can be attacked. If enabled, "
2575 "tiles with an unreachable unit in them cannot be attacked. "
2576 "Some units in some rulesets may override this, never "
2577 "protecting reachable units on their tile."),
2582 ALLOW_NONE, ALLOW_BASIC,
2583 N_(
"Turns until player contact is lost"),
2584 N_(
"Players may meet for diplomacy this number of turns "
2585 "after their units have last met, even when they do not have "
2586 "an embassy. If set to zero, then players cannot meet unless "
2587 "they have an embassy."),
2594 ALLOW_NONE, ALLOW_BASIC,
2595 N_(
"Rebuild palace whenever capital is conquered"),
2596 N_(
"If this is turned on, when the capital is conquered the "
2597 "palace is automatically rebuilt for free in another randomly "
2598 "chosen city. This is significant because the technology "
2599 "requirement for building a palace will be ignored. (In "
2600 "some rulesets, buildings other than the palace are affected "
2601 "by this setting.)"),
2606 ALLOW_NONE, ALLOW_BASIC,
2607 N_(
"Give caught units a homecity"),
2610 N_(
"If unset, caught units will have no homecity and will be "
2611 "subject to the 'killunhomed' option."),
2616 ALLOW_NONE, ALLOW_BASIC,
2617 N_(
"Whether to use natural city names"),
2618 N_(
"If enabled, the default city names will be determined based "
2619 "on the surrounding terrain."),
2624 ALLOW_NONE, ALLOW_BASIC,
2625 N_(
"Whether to enable citizen migration"),
2628 N_(
"This is the master setting that controls whether citizen "
2629 "migration is active in the game. If enabled, citizens may "
2630 "automatically move from less desirable cities to more "
2631 "desirable ones. The \"desirability\" of a given city is "
2632 "calculated from a number of factors. In general larger "
2633 "cities with more income and improvements will be preferred. "
2634 "Citizens will never migrate out of the capital, or cause "
2635 "a wonder to be lost by disbanding a city. A number of other "
2636 "settings control how migration behaves:\n"
2637 " 'mgr_turninterval' - How often citizens try to migrate.\n"
2638 " 'mgr_foodneeded' - Whether destination food is checked.\n"
2639 " 'mgr_distance' - How far citizens will migrate.\n"
2640 " 'mgr_worldchance' - Chance for inter-nation migration.\n"
2641 " 'mgr_nationchance' - Chance for intra-nation migration."),
2646 ALLOW_NONE, ALLOW_BASIC,
2647 N_(
"Number of turns between migrations from a city"),
2649 N_(
"This setting controls the number of turns between migration "
2650 "checks for a given city. The interval is calculated from "
2651 "the founding turn of the city. So for example if this "
2652 "setting is 5, citizens will look for a suitable migration "
2653 "destination every five turns from the founding of their "
2654 "current city. Migration will never occur the same turn "
2655 "that a city is built. This setting has no effect unless "
2656 "migration is enabled by the 'migration' setting."),
2663 ALLOW_NONE, ALLOW_BASIC,
2664 N_(
"Whether migration is limited by food"),
2666 N_(
"If this setting is enabled, citizens will not migrate to "
2667 "cities which would not have enough food to support them. "
2668 "This setting has no effect unless migration is enabled by "
2669 "the 'migration' setting."), NULL, NULL,
2674 ALLOW_NONE, ALLOW_BASIC,
2675 N_(
"Maximum distance citizens may migrate"),
2677 N_(
"This setting controls how far citizens may look for a "
2678 "suitable migration destination when deciding which city "
2679 "to migrate to. The value is added to the candidate target "
2680 "city's radius and compared to the distance between the "
2681 "two cities. If the distance is lower or equal, migration "
2682 "is possible. (So with a setting of 0, citizens will only "
2683 "consider migrating if their city's center is within the "
2684 "destination city's working radius.) This setting has no "
2685 "effect unless migration is enabled by the 'migration' "
2692 ALLOW_NONE, ALLOW_BASIC,
2693 N_(
"Percent probability for migration within the same nation"),
2695 N_(
"This setting controls how likely it is for citizens to "
2696 "migrate between cities owned by the same player. Zero "
2697 "indicates migration will never occur, 100 means that "
2698 "migration will always occur if the citizens find a suitable "
2699 "destination. This setting has no effect unless migration "
2700 "is activated by the 'migration' setting."),
2707 ALLOW_NONE, ALLOW_BASIC,
2708 N_(
"Percent probability for migration between foreign cities"),
2710 N_(
"This setting controls how likely it is for migration "
2711 "to occur between cities owned by different players. "
2712 "Zero indicates migration will never occur, 100 means "
2713 "that citizens will always migrate if they find a suitable "
2714 "destination. This setting has no effect if migration is "
2715 "not enabled by the 'migration' setting."),
2728 SSET_META, SSET_NETWORK, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2729 N_(
"Players that users are allowed to take"),
2732 N_(
"This should be a string of characters, each of which "
2733 "specifies a type or status of a civilization (player).\n"
2734 "Clients will only be permitted to take or observe those "
2735 "players which match one of the specified letters. This "
2736 "only affects future uses of the \"take\" or \"observe\" "
2737 "commands; it is not retroactive. The characters and their "
2739 " o,O = Global observer\n"
2740 " b = Barbarian players\n"
2741 " d = Dead players\n"
2742 " a,A = AI players\n"
2743 " h,H = Human players\n"
2744 "The first description on this list which matches a "
2745 "player is the one which applies. Thus 'd' does not "
2746 "include dead barbarians, 'a' does not include dead AI "
2747 "players, and so on. Upper case letters apply before "
2748 "the game has started, lower case letters afterwards.\n"
2749 "Each character above may be followed by one of the "
2750 "following numbers to allow or restrict the manner "
2752 "(none) = Controller allowed, observers allowed, "
2753 "can displace connections. (Displacing a connection means "
2754 "that you may take over a player, even when another user "
2755 "already controls that player.)\n"
2756 " 1 = Controller allowed, observers allowed, "
2757 "can't displace connections;\n"
2758 " 2 = Controller allowed, no observers allowed, "
2759 "can displace connections;\n"
2760 " 3 = Controller allowed, no observers allowed, "
2761 "can't displace connections;\n"
2762 " 4 = No controller allowed, observers allowed"),
2766 SSET_META, SSET_NETWORK, SSET_SITUATIONAL,
2767 ALLOW_NONE, ALLOW_BASIC,
2768 N_(
"Whether AI-status toggles with connection"),
2769 N_(
"If enabled, AI status is turned off when a player "
2770 "connects, and on when a player disconnects."),
2774 SSET_META, SSET_SOCIOLOGY, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
2775 N_(
"Turn the game ends"),
2776 N_(
"The game will end at the end of the given turn."),
2781 SSET_MILITARY, SSET_SITUATIONAL, ALLOW_NONE, ALLOW_BASIC,
2782 N_(
"Reveal the map"),
2788 N_(
"If \"Reveal map at game start\" (START) is set, the "
2789 "initial state of the entire map will be known to all "
2790 "players from the start of the game, although it may "
2791 "still be fogged (depending on the 'fogofwar' setting). "
2792 "If \"Unfog map for dead players\" (DEAD) is set, dead "
2793 "players can see the entire map, if they are alone in "
2798 SSET_META, SSET_INTERNAL, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
2799 N_(
"Maximum seconds per turn"),
2804 N_(
"If all players have not hit \"Turn Done\" before this "
2805 "time is up, then the turn ends automatically. Zero "
2806 "means there is no timeout. In servers compiled with "
2807 "debugging, a timeout of -1 sets the autogame test mode. "
2808 "Only connections with hack level access may set the "
2809 "timeout to fewer than 30 seconds. Use this with the "
2810 "command \"timeoutincrease\" to have a dynamic timer. "
2811 "The first turn is treated as a special case and is controlled "
2812 "by the 'first_timeout' setting."),
2817 SSET_META, SSET_INTERNAL, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
2818 N_(
"First turn timeout"),
2821 N_(
"If greater than 0, T1 will last for 'first_timeout' seconds.\n"
2822 "If set to 0, T1 will not have a timeout.\n"
2823 "If set to -1, the special treatment of T1 will be disabled.\n"
2824 "See also 'timeout'."),
2830 SSET_META, SSET_INTERNAL, SSET_VITAL, ALLOW_NONE, ALLOW_BASIC,
2831 N_(
"Timeout at least n seconds when enemy moved"),
2832 N_(
"Any time a unit moves while in sight of an enemy player, "
2833 "the remaining timeout is increased to this value."),
2839 ALLOW_NONE, ALLOW_BASIC,
2840 N_(
"Minimum time between unit actions over turn change"),
2843 N_(
"This setting gives the minimum amount of time in seconds "
2844 "between unit moves and other significant actions (such as "
2845 "building cities) after a turn change occurs. For example, "
2846 "if this setting is set to 20 and a unit moves 5 seconds "
2847 "before the turn change, it will not be able to move or act "
2848 "in the next turn for at least 15 seconds. This value is "
2849 "limited to a maximum value of 2/3 'timeout'."),
2857 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
2858 ALLOW_NONE, ALLOW_BASIC,
2859 N_(
"Control of simultaneous player/team phases"),
2860 N_(
"This setting controls whether players may make "
2861 "moves at the same time during a turn. Change "
2862 "in setting takes effect next turn."),
2866 SSET_META, SSET_NETWORK, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2867 N_(
"Seconds to let a client's network connection block"),
2868 N_(
"If a network connection is blocking for a time greater than "
2869 "this value, then the connection is closed. Zero "
2870 "means there is no timeout (although connections will be "
2871 "automatically disconnected eventually)."),
2876 SSET_META, SSET_NETWORK, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2877 N_(
"Max seconds for network buffers to drain"),
2878 N_(
"The server will wait for up to the value of this "
2879 "parameter in seconds, for all client connection network "
2880 "buffers to unblock. Zero means the server will not "
2881 "wait at all."), NULL, NULL, NULL,
2885 SSET_META, SSET_NETWORK, SSET_RARE, ALLOW_NONE, ALLOW_BASIC,
2886 N_(
"Seconds between PINGs"),
2887 N_(
"The server will poll the clients with a PING request "
2888 "each time this period elapses."), NULL, NULL, NULL,
2893 ALLOW_NONE, ALLOW_BASIC,
2894 N_(
"Time to cut a client"),
2895 N_(
"If a client doesn't reply to a PING in this time the "
2896 "client is disconnected."), NULL, NULL, NULL,
2901 ALLOW_NONE, ALLOW_HACK,
2902 N_(
"Keep client IP hidden"),
2903 N_(
"Don't tell client IP address to other clients. Server operator "
2904 "can still see it. Also, changing this setting cannot do anything "
2905 "to the information already sent before."),
2909 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
2910 ALLOW_NONE, ALLOW_BASIC,
2911 N_(
"Turn-blocking game play mode"),
2912 N_(
"If this is turned on, the game turn is not advanced "
2913 "until all players have finished their turn, including "
2914 "disconnected players."),
2918 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
2919 ALLOW_NONE, ALLOW_BASIC,
2920 N_(
"Fixed-length turns play mode"),
2923 N_(
"If this is turned on the game turn will not advance "
2924 "until the timeout has expired, even after all players "
2925 "have clicked on \"Turn Done\"."),
2929 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
2930 ALLOW_NONE, ALLOW_BASIC,
2931 N_(
"What is in the Demographics report"),
2934 N_(
"This should be a string of characters, each of which "
2935 "specifies the inclusion of a line of information "
2936 "in the Demographics report.\n"
2937 "The characters and their meanings are:\n"
2938 " N = include Population\n"
2939 " P = include Production\n"
2940 " A = include Land Area\n"
2941 " L = include Literacy\n"
2942 " R = include Research Speed\n"
2943 " S = include Settled Area\n"
2944 " E = include Economics\n"
2945 " M = include Military Service\n"
2946 " O = include Pollution\n"
2947 " C = include Culture\n"
2948 "Additionally, the following characters control whether "
2949 "or not certain columns are displayed in the report:\n"
2950 " q = display \"quantity\" column\n"
2951 " r = display \"rank\" column\n"
2952 " b = display \"best nation\" column\n"
2953 "The order of characters is not significant, but "
2954 "their capitalization is."),
2958 SSET_META, SSET_INTERNAL, SSET_VITAL, ALLOW_HACK, ALLOW_HACK,
2959 N_(
"Turns per auto-save"),
2963 N_(
"How many turns elapse between automatic game saves. This "
2964 "setting only has an effect when the 'autosaves' setting "
2965 "includes \"New turn\"."), NULL, NULL, NULL,
2969 SSET_META, SSET_INTERNAL, SSET_VITAL, ALLOW_HACK, ALLOW_HACK,
2970 N_(
"Minutes per auto-save"),
2974 N_(
"How many minutes elapse between automatic game saves. "
2975 "Unlike other save types, this save is only meant as backup "
2976 "for computer memory, and it always uses the same name, older "
2977 "saves are not kept. This setting only has an effect when the "
2978 "'autosaves' setting includes \"Timer\"."), NULL, NULL, NULL,
2982 SSET_META, SSET_INTERNAL, SSET_VITAL, ALLOW_HACK, ALLOW_HACK,
2983 N_(
"Which savegames are generated automatically"),
2989 N_(
"This setting controls which autosave types get generated:\n"
2990 "- \"New turn\" (TURN): Save when turn begins, once every "
2991 "'saveturns' turns.\n"
2992 "- \"Game over\" (GAMEOVER): Final save when game ends.\n"
2993 "- \"No player connections\" (QUITIDLE): "
2994 "Save before server restarts due to lack of players.\n"
2995 "- \"Server interrupted\" (INTERRUPT): Save when server "
2996 "quits due to interrupt.\n"
2997 "- \"Timer\" (TIMER): Save every 'savefrequency' minutes."),
3001 SSET_META, SSET_INTERNAL, SSET_RARE, ALLOW_HACK, ALLOW_HACK,
3002 N_(
"Whether to do saving in separate thread"),
3005 N_(
"If this is turned in, compressing and saving the actual "
3006 "file containing the game situation takes place in "
3007 "the background while game otherwise continues. This way "
3008 "users are not required to wait for the save to finish."),
3012 SSET_META, SSET_INTERNAL, SSET_RARE, ALLOW_HACK, ALLOW_HACK,
3013 N_(
"Savegame compression level"),
3015 N_(
"If non-zero, saved games will be compressed depending on the "
3016 "'compresstype' setting. Larger values will give better "
3017 "compression but take longer."),
3022 SSET_META, SSET_INTERNAL, SSET_RARE, ALLOW_HACK, ALLOW_HACK,
3023 N_(
"Savegame compression algorithm"),
3024 N_(
"Compression library to use for savegames."),
3028 SSET_META, SSET_INTERNAL, SSET_VITAL, ALLOW_HACK, ALLOW_HACK,
3029 N_(
"Definition of the save file name"),
3034 N_(
"Within the string the following custom formats are "
3038 " %T = <turn-number>\n"
3039 " %Y = <game-year>\n"
3041 "Example: 'freeciv-T%04T-Y%+05Y-%R' => "
3042 "'freeciv-T0100-Y00001-manual'\n"
3044 "Be careful to use at least one of %T and %Y, else newer "
3045 "savegames will overwrite old ones. If none of the formats "
3046 "is used '-T%04T-Y%05Y-%R' is appended to the value of "
3051 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
3053 ALLOW_NONE, ALLOW_CTRL,
3055 ALLOW_HACK, ALLOW_HACK,
3057 N_(
"Whether to log player statistics"),
3060 N_(
"If this is turned on, player statistics are appended to "
3061 "the file defined by the option 'scorefile' every turn. "
3062 "These statistics can be used to create power graphs after "
3066 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
3067 ALLOW_HACK, ALLOW_HACK,
3068 N_(
"Scorelog level"),
3069 N_(
"Whether scores are logged for all players including AIs, "
3070 "or only for human players."), NULL, NULL, NULL,
3075 SSET_META, SSET_INTERNAL, SSET_SITUATIONAL,
3076 ALLOW_HACK, ALLOW_HACK,
3077 N_(
"Name for the score log file"),
3079 N_(
"The default name for the score log file is "
3080 "'freeciv-score.log'."),
3086 ALLOW_NONE, ALLOW_BASIC,
3087 N_(
"Maximum number of connections to the server per host"),
3088 N_(
"New connections from a given host will be rejected if "
3089 "the total number of connections from the very same host "
3090 "equals or exceeds this value. A value of 0 means that "
3091 "there is no limit, at least up to the maximum number of "
3092 "connections supported by the server."), NULL, NULL, NULL,
3098 ALLOW_HACK, ALLOW_HACK,
3099 N_(
"Time before a kicked user can reconnect"),
3102 N_(
"Gives the time in seconds before a user kicked using the "
3103 "\"kick\" command may reconnect. Changing this setting will "
3104 "affect users kicked in the past."), NULL, NULL, NULL,
3108 SSET_META, SSET_INTERNAL, SSET_RARE, ALLOW_CTRL, ALLOW_CTRL,
3109 N_(
"Metaserver info line"),
3110 N_(
"User defined metaserver info line. For most of the time "
3111 "a user defined metamessage will be used instead of an "
3112 "automatically generated message. "
3113 "Set to empty (\"\", not \"empty\") to always use an "
3114 "automatically generated meta server message."),
3143 if (0 == strcmp(
name, pset->name)) {
3181 if (!constant && pset->
help_func != NULL) {
3219 size_t reject_msg_len)
3230 _(
"The setting '%s' can't be modified after the map "
3266 _(
"The setting '%s' can't be modified after the game "
3277 log_error(
"Wrong class variant for setting %s (%d): %d.",
3291 size_t reject_msg_len)
3296 _(
"You are not allowed to change the setting '%s'."),
3304 _(
"The setting '%s' is locked by the ruleset."),
3317 enum cmdlevel plevel)
3341 const char *prefix,
int *ind_result,
3342 const char **matches,
size_t max_matches,
3343 size_t *pnum_matches)
3346 size_t len = strlen(prefix);
3356 for (i = 0, num_matches = 0; (
name = name_fn(i)); i++) {
3358 if (strlen(
name->support) ==
len) {
3362 if (num_matches < max_matches) {
3363 matches[num_matches] =
name->support;
3366 if (0 == num_matches++) {
3372 if (1 == num_matches) {
3374 }
else if (1 < num_matches) {
3386 const char *prefix,
int *pvalue,
3388 size_t reject_msg_len)
3390 const char *matches[16];
3404 _(
"\"%s\" prefix is ambiguous. Candidates are: %s."),
3420 _(
"No match for \"%s\"."), prefix);
3428 bool value,
bool pretty,
3429 char *buf,
size_t buf_len)
3449 const char *val,
int *pint_val,
3452 size_t reject_msg_len)
3456 if (SST_BOOL != pset->
stype) {
3458 _(
"This setting is not a boolean."));
3466 reject_msg, reject_msg_len)
3479 size_t reject_msg_len)
3485 reject_msg, reject_msg_len)) {
3510 size_t reject_msg_len)
3515 reject_msg, reject_msg_len);
3525 ((
const struct setting *) data)->boolean.name(val);
3527 return (NULL !=
name ?
name->support : NULL);
3534 int value,
bool pretty,
3535 char *buf,
size_t buf_len)
3565 size_t reject_msg_len)
3585 size_t reject_msg_len)
3587 if (SST_INT != pset->
stype) {
3589 _(
"This setting is not an integer."));
3595 _(
"Value out of range: %d (min: %d; max: %d)."),
3619 const char *
value,
bool pretty,
3620 char *buf,
size_t buf_len)
3636 size_t reject_msg_len)
3656 size_t reject_msg_len)
3658 if (SST_STRING != pset->
stype) {
3660 _(
"This setting is not a string."));
3666 _(
"String value too long (max length: %lu)."),
3693 ((
const struct setting *) data)->enumerator.name(val);
3695 return (NULL !=
name ?
name->support : NULL);
3712 return _(
name->pretty);
3714 return name->support;
3724 char *buf,
size_t buf_len)
3745 const char *val,
int *pint_val,
3748 size_t reject_msg_len)
3752 if (SST_ENUM != pset->
stype) {
3754 _(
"This setting is not an enumerator."));
3762 reject_msg, reject_msg_len)
3785 *to_char = (char) val;
3792 *to_short = (short) val;
3834 size_t reject_msg_len)
3843 reject_msg, reject_msg_len)) {
3848 log_error(
"Illegal enumerator value size %d for %s",
3863 size_t reject_msg_len)
3868 reject_msg, reject_msg_len);
3878 ((
const struct setting *) data)->bitwise.name(bit);
3880 return (NULL !=
name ?
name->support : NULL);
3888 int bit,
bool pretty)
3897 return _(
name->pretty);
3899 return name->support;
3907 unsigned value,
bool pretty,
3908 char *buf,
size_t buf_len)
3911 char *old_buf = buf;
3921 if ((1 << bit) & value) {
3950 if ((1 << bit) & value) {
3951 if (
'\0' != buf[0]) {
3976 size_t reject_msg_len)
3982 if (SST_BITWISE != pset->
stype) {
3984 _(
"This setting is not a bitwise."));
3992 p = strchr(val,
'|');
4001 if (NULL == p &&
'\0' == buf[0] && 0 == *pint_val) {
4005 reject_msg, reject_msg_len)) {
4008 *pint_val |= 1 << bit;
4010 }
while (NULL != p);
4014 reject_msg, reject_msg_len));
4024 size_t reject_msg_len)
4030 reject_msg, reject_msg_len)) {
4045 size_t reject_msg_len)
4050 reject_msg, reject_msg_len);
4067 char *buf,
size_t buf_len)
4073 switch (pset->
stype) {
4076 pretty, buf, buf_len);
4079 pretty, buf, buf_len);
4082 pretty, buf, buf_len);
4085 pretty, buf, buf_len);
4088 pretty, buf, buf_len);
4094 log_error(
"%s(): Setting \"%s\" (nb %d) not handled in switch statement.",
4103 char *buf,
size_t buf_len)
4109 switch (pset->
stype) {
4112 pretty, buf, buf_len);
4115 pretty, buf, buf_len);
4118 pretty, buf, buf_len);
4121 pretty, buf, buf_len);
4124 pretty, buf, buf_len);
4130 log_error(
"%s(): Setting \"%s\" (nb %d) not handled in switch statement.",
4140 switch (pset->
stype) {
4162 pset->
setdef = SETDEF_INTERNAL;
4170 if (pset->
action != NULL) {
4187 if (pset->ruleset_settable) {
4205 log_error(
"Unknown unsettable setting in '%s': %s",
4215 if (pset->ruleset_settable) {
4233 const char *
name,
const char *path)
4236 char reject_msg[256], buf[256];
4251 switch (pset->
stype) {
4261 "%s.value", path)) {
4271 sizeof(reject_msg))) {
4273 log_normal(
_(
"Ruleset: '%s' has been set to %s."),
4292 sizeof(reject_msg))) {
4293 log_normal(
_(
"Ruleset: '%s' has been set to %s."),
4310 }
else if (0 != strcmp(val, pset->
string.
value)) {
4312 sizeof(reject_msg))) {
4313 log_normal(
_(
"Ruleset: '%s' has been set to %s."),
4329 "%s.value", path)) {
4330 log_error(
"Can't read value for setting '%s': %s",
4335 sizeof(reject_msg))) {
4337 log_normal(
_(
"Ruleset: '%s' has been set to %s."),
4353 "%s.value", path)) {
4354 log_error(
"Can't read value for setting '%s': %s",
4359 reject_msg,
sizeof(reject_msg))) {
4361 log_normal(
_(
"Ruleset: '%s' has been set to %s."),
4376 pset->
setdef = SETDEF_RULESET;
4384 log_normal(
_(
"Ruleset: '%s' has been locked by the ruleset."),
4412 log_error(
"%s(): Setting \"%s\" (nb %d) not handled in switch statement.",
4488 char reject_msg[256] =
"", buf[256];
4505 FALSE, buf,
sizeof(buf))
4507 sizeof(reject_msg)));
4512 sizeof(reject_msg));
4517 sizeof(reject_msg));
4522 FALSE, buf,
sizeof(buf))
4524 sizeof(reject_msg)));
4529 FALSE, buf,
sizeof(buf))
4531 sizeof(reject_msg)));
4540 log_error(
"Error restoring setting '%s' to the value from game start: "
4576 "%s.set%d.name",
section, set_count);
4580 "%s.set%d.value",
section, set_count);
4583 "%s.set%d.gamestart",
section, set_count);
4588 "%s.set%d.value",
section, set_count);
4591 "%s.set%d.gamestart",
section, set_count);
4596 "%s.set%d.value",
section, set_count);
4599 "%s.set%d.gamestart",
section, set_count);
4605 "%s.set%d.value",
section, set_count);
4609 "%s.set%d.gamestart",
section, set_count);
4615 "%s.set%d.value",
section, set_count);
4619 "%s.set%d.gamestart",
section, set_count);
4625 "%s.set%d.value",
section, set_count);
4628 "%s.set%d.gamestart",
section, set_count);
4634 "%s.set%d.gamesetdef",
section, set_count);
4642 "%s.gamestart_valid",
section);
4651 char reject_msg[256], buf[256];
4660 log_verbose(
"Can't read the number of settings in the save file.");
4669 for (i = 0; i < set_count; i++) {
4678 switch (pset->stype) {
4688 pset->setdef = SETDEF_CHANGED;
4690 if (val != *pset->boolean.pvalue) {
4693 && (NULL == pset->boolean.validate
4694 || pset->boolean.validate(val, NULL, reject_msg,
4695 sizeof(reject_msg)))) {
4696 *pset->boolean.pvalue = val;
4697 log_normal(
_(
"Savegame: '%s' has been set to %s."),
4701 log_error(
"Savegame: error restoring '%s' . (%s)",
4705 log_normal(
_(
"Savegame: '%s' explicitly set to value same as default."),
4720 pset->setdef = SETDEF_CHANGED;
4722 if (val != *pset->integer.pvalue) {
4725 && (NULL == pset->integer.validate
4726 || pset->integer.validate(val, NULL, reject_msg,
4727 sizeof(reject_msg)))) {
4728 *pset->integer.pvalue = val;
4729 log_normal(
_(
"Savegame: '%s' has been set to %s."),
4733 log_error(
"Savegame: error restoring '%s' . (%s)",
4737 log_normal(
_(
"Savegame: '%s' explicitly set to value same as default."),
4753 pset->setdef = SETDEF_CHANGED;
4755 if (0 != strcmp(val, pset->string.value)) {
4757 sizeof(reject_msg))) {
4758 log_normal(
_(
"Savegame: '%s' has been set to %s."),
4762 log_error(
"Savegame: error restoring '%s' . (%s)",
4766 log_normal(
_(
"Savegame: '%s' explicitly set to value same as default."),
4779 "%s.set%d.value",
section, i)) {
4783 pset->setdef = SETDEF_CHANGED;
4788 && (NULL == pset->enumerator.validate
4789 || pset->enumerator.validate(val, NULL, reject_msg,
4790 sizeof(reject_msg)))) {
4792 log_normal(
_(
"Savegame: '%s' has been set to %s."),
4796 log_error(
"Savegame: error restoring '%s' . (%s)",
4800 log_normal(
_(
"Savegame: '%s' explicitly set to value same as default."),
4813 "%s.set%d.value",
section, i)) {
4817 pset->setdef = SETDEF_CHANGED;
4819 if (val != *pset->bitwise.pvalue) {
4822 && (NULL == pset->bitwise.validate
4823 || pset->bitwise.validate(val, NULL, reject_msg,
4824 sizeof(reject_msg)))) {
4825 *pset->bitwise.pvalue = val;
4826 log_normal(
_(
"Savegame: '%s' has been set to %s."),
4830 log_error(
"Savegame: error restoring '%s' . (%s)",
4834 log_normal(
_(
"Savegame: '%s' explicitly set to value same as default."),
4850 switch (pset->stype) {
4852 pset->boolean.game_value =
4854 "%s.set%d.gamestart",
section, i);
4858 pset->integer.game_value =
4860 "%s.set%d.gamestart",
section, i);
4866 "%s.set%d.gamestart",
4868 pset->string.value_size);
4872 pset->enumerator.game_value =
4875 pset,
"%s.set%d.gamestart",
section, i);
4879 pset->bitwise.game_value =
4882 pset,
"%s.set%d.gamestart",
section, i);
4892 setting_default_level_name(SETDEF_CHANGED),
4893 "%s.set%d.gamesetdef",
section, i);
4894 pset->game_setdef = setting_default_level_by_name(sdname,
4897 if (!setting_default_level_is_valid(pset->game_setdef)) {
4898 log_error(
"Setting %s has invalid gamesetdef value %s",
4900 pset->game_setdef = SETDEF_CHANGED;
4910 pset->game_setdef = SETDEF_CHANGED;
4938 log_debug(
"No saved settings from the game start available.");
5020#define PACKET_COMMON_INIT(packet, pset, pconn) \
5021 memset(&packet, 0, sizeof(packet)); \
5022 packet.id = setting_number(pset); \
5023 packet.is_visible = setting_is_visible(pset, pconn); \
5024 packet.is_changeable = setting_is_changeable(pset, pconn, NULL, 0); \
5025 packet.initial_setting = game.info.is_new_game; \
5026 packet.setdef = setting_get_setdef(pset);
5108 for (i = 0; (val_name = pset->
bitwise.
name(i)); i++) {
5146 enum cmdlevel old_level,
5147 enum cmdlevel new_level)
5149 enum cmdlevel min_level;
5152 if (old_level == new_level) {
5156 if (old_level < new_level) {
5157 min_level = old_level;
5160 min_level = new_level;
5165 if ((pset->access_level_read >= min_level
5166 && pset->access_level_read <=
max_level)
5167 || (pset->access_level_write >= min_level
5168 && pset->access_level_write <=
max_level)) {
5188 for (i = 0; i < SSET_NUM_CATEGORIES; i++) {
5220 for (i = 0; i < OLEVELS_NUM; i++) {
5232 "No setting level defined for '%s'.",
setting_name(pset));
5240 case SSET_SITUATIONAL:
5241 setting_list_append(
setting_sorted.level[SSET_SITUATIONAL], pset);
5253 "Invalid setting level for '%s' (%s).",
5260 for (i = 0; i < OLEVELS_NUM; i++) {
5300 const struct setting *
const *ppset2)
5302 const struct setting *pset1 = *ppset1;
5303 const struct setting *pset2 = *ppset2;
5331 for (i = 0; i < OLEVELS_NUM; i++) {
5343 pset->
setdef = SETDEF_CHANGED;
void astr_free(struct astring *astr)
const char * astr_build_and_list(struct astring *astr, const char *const *items, size_t number)
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
#define BV_ISSET(bv, bit)
#define conn_list_iterate(connlist, pconn)
#define conn_list_iterate_end
const struct ft_color ftc_server
int generate_save_name(const char *format, char *buf, int buflen, const char *reason)
#define GAME_DEFAULT_TECHPENALTY
#define GAME_MAX_RAPTUREDELAY
#define GAME_DEFAULT_START_CITY
#define GAME_DEFAULT_KILLSTACK
#define GAME_DEFAULT_INFRA
#define GAME_MAX_DIPLCHANCE
#define GAME_MAX_SCIENCEBOX
#define GAME_MAX_EVENT_CACHE_MAX_SIZE
#define GAME_DEFAULT_REVOLENTYPE
#define GAME_DEFAULT_AUTO_AI_TOGGLE
#define GAME_MIN_RAZECHANCE
#define GAME_MIN_GLOBAL_WARMING_PERCENT
#define GAME_DEFAULT_CARAVAN_BONUS_STYLE
#define GAME_MAX_TECHLOSSFG
#define GAME_DEFAULT_TCPTIMEOUT
#define GAME_DEFAULT_EVENT_CACHE_INFO
#define GAME_DEFAULT_MGR_FOODNEEDED
#define GAME_DEFAULT_TECHLOST_DONOR
#define GAME_DEFAULT_ALLOWED_CITY_NAMES
#define GAME_MIN_TRADEWORLDRELPCT
#define GAME_DEFAULT_SCORELOG
#define GAME_MAX_KILLUNHOMED
#define GAME_MIN_TECHLOST_RECV
#define GAME_MIN_FREECOST
#define GAME_MAX_CONTACTTURNS
#define GAME_MIN_SPACESHIP_TRAVEL_TIME
#define GAME_MAX_TECHLOST_RECV
#define GAME_DEFAULT_OCCUPYCHANCE
#define GAME_DEFAULT_USER_META_MESSAGE
#define GAME_DEFAULT_GLOBAL_WARMING_PERCENT
#define GAME_DEFAULT_TRADING_TECH
#define GAME_MIN_SCIENCEBOX
#define GAME_MAX_PINGTIMEOUT
#define GAME_MAX_SAVEFREQUENCY
#define GAME_MIN_REVOLUTION_LENGTH
#define GAME_MAX_MGR_TURNINTERVAL
#define GAME_DEFAULT_SAVETURNS
#define GAME_DEFAULT_IPHIDE
#define GAME_DEFAULT_BORDERS
#define GAME_DEFAULT_AIRLIFTINGSTYLE
#define GAME_MAX_CONQUERCOST
#define GAME_MAX_AQUEDUCTLOSS
#define GAME_DEFAULT_KILLUNHOMED
#define GAME_DEFAULT_SCIENCEBOX
#define GAME_MIN_DIPLGOLDCOST
#define GAME_DEFAULT_MGR_WORLDCHANCE
#define GAME_MIN_PINGTIME
#define GAME_DEFAULT_ONSETBARBARIAN
#define GAME_MIN_ONSETBARBARIAN
#define GAME_MAX_TECHLOSSREST
#define GAME_DEFAULT_KILLCITIZEN
#define GAME_MIN_INCITE_GOLD_LOSS_CHANCE
#define GAME_MIN_MGR_NATIONCHANCE
#define GAME_MAX_COMPRESS_LEVEL
#define GAME_DEFAULT_NATIONSET
#define GAME_DEFAULT_SHIELDBOX
#define GAME_MIN_NOTRADESIZE
#define GAME_MAX_OCCUPYCHANCE
#define GAME_DEFAULT_MAXCONNECTIONSPERHOST
#define GAME_DEFAULT_INCITE_GOLD_CAPT_CHANCE
#define GAME_DEFAULT_DEMOGRAPHY
#define GAME_MIN_MAXCONNECTIONSPERHOST
#define GAME_DEFAULT_FULLTRADESIZE
#define GAME_MAX_DISPERSION
#define GAME_MIN_TECHLOST_DONOR
#define GAME_DEFAULT_RAPTUREDELAY
#define GAME_MIN_MGR_TURNINTERVAL
#define GAME_DEFAULT_REVOLUTION_LENGTH
#define GAME_DEFAULT_MGR_TURNINTERVAL
#define GAME_DEFAULT_START_UNITS
#define GAME_MAX_SPACESHIP_TRAVEL_TIME
#define GAME_MAX_TCPTIMEOUT
#define GAME_DEFAULT_ALLOW_TAKE
#define GAME_DEFAULT_THREADED_SAVE
#define GAME_MAX_TRADEWORLDRELPCT
#define GAME_DEFAULT_MIN_PLAYERS
#define GAME_MIN_CONQUERCOST
#define GAME_MAX_MGR_DISTANCE
#define GAME_DEFAULT_SPACESHIP_TRAVEL_TIME
#define GAME_MIN_TECHLOSSREST
#define GAME_DEFAULT_AUTOATTACK
#define GAME_DEFAULT_SAVEFREQUENCY
#define GAME_DEFAULT_REVEALMAP
#define GAME_DEFAULT_SCOREFILE
#define GAME_MAX_FIRST_TIMEOUT
#define GAME_MIN_MGR_DISTANCE
#define GAME_MIN_DISPERSION
#define GAME_DEFAULT_TEAM_POOLED_RESEARCH
#define GAME_DEFAULT_SEED
#define GAME_DEFAULT_HOMECAUGHTUNITS
#define GAME_MAX_GLOBAL_WARMING_PERCENT
#define GAME_MAX_MAXCONNECTIONSPERHOST
#define GAME_DEFAULT_NETWAIT
#define GAME_MIN_PINGTIMEOUT
#define GAME_MIN_TECHPENALTY
#define GAME_MIN_CONTACTTURNS
#define GAME_MAX_INCITE_GOLD_LOSS_CHANCE
#define GAME_DEFAULT_KICK_TIME
#define GAME_DEFAULT_PLRCOLORMODE
#define GAME_MAX_CITYMINDIST
#define GAME_DEFAULT_DIPLCHANCE
#define GAME_MAX_NUCLEAR_WINTER_PERCENT
#define GAME_MIN_END_TURN
#define GAME_DEFAULT_UNRPROTECTS
#define GAME_MIN_MGR_WORLDCHANCE
#define GAME_DEFAULT_RAZECHANCE
#define GAME_MIN_SHIELDBOX
#define GAME_MIN_FIRST_TIMEOUT
#define GAME_MAX_RAZECHANCE
#define GAME_MAX_ONSETBARBARIAN
#define GAME_DEFAULT_INCITE_GOLD_LOSS_CHANCE
#define GAME_MAX_MAX_PLAYERS
#define GAME_DEFAULT_TRADING_CITY
#define GAME_DEFAULT_FOODBOX
#define GAME_DEFAULT_COMPRESS_TYPE
#define GAME_DEFAULT_PINGTIMEOUT
#define GAME_DEFAULT_TRADE_REVENUE_STYLE
#define GAME_DEFAULT_SAVEPALACE
#define GAME_MIN_EVENT_CACHE_TURNS
#define GAME_DEFAULT_GLOBAL_WARMING
#define GAME_MAX_DIPLGOLDCOST
#define GAME_DEFAULT_TECHLOST_RECV
#define GAME_DEFAULT_NOTRADESIZE
#define GAME_DEFAULT_COMPRESS_LEVEL
#define GAME_MAX_TECHLOST_DONOR
#define GAME_MIN_SAVETURNS
#define GAME_MAX_UNITWAITTIME
#define GAME_DEFAULT_FIRST_TIMEOUT
#define GAME_DEFAULT_NUCLEAR_WINTER_PERCENT
#define GAME_MIN_CIVILWARSIZE
#define GAME_DEFAULT_TRADING_GOLD
#define GAME_MIN_TECHLEAK
#define GAME_DEFAULT_TRAIT_DIST_MODE
#define GAME_DEFAULT_NUCLEAR_WINTER
#define GAME_MIN_DISASTERS
#define GAME_MIN_OCCUPYCHANCE
#define GAME_DEFAULT_FREECOST
#define GAME_MIN_KICK_TIME
#define GAME_DEFAULT_MAX_PLAYERS
#define GAME_DEFAULT_CITYMINDIST
#define GAME_MIN_NUCLEAR_WINTER_PERCENT
#define GAME_DEFAULT_PHASE_MODE
#define GAME_DEFAULT_AIFILL
#define GAME_DEFAULT_TRADEWORLDRELPCT
#define GAME_DEFAULT_MULTIRESEARCH
#define GAME_DEFAULT_CONQUERCOST
#define GAME_MAX_TECHPENALTY
#define GAME_DEFAULT_TIMEOUT
#define GAME_MAX_DISASTERS
#define GAME_MIN_INCITE_GOLD_CAPT_CHANCE
#define GAME_MIN_TECHLOSSFG
#define GAME_MAX_END_TURN
#define GAME_MIN_COMPRESS_LEVEL
#define GAME_DEFAULT_TECHLOSSREST
#define GAME_MIN_KILLUNHOMED
#define GAME_MAX_NOTRADESIZE
#define GAME_DEFAULT_CONTACTTURNS
#define GAME_DEFAULT_SCORELOGLEVEL
#define GAME_DEFAULT_TECHLOSSFG
#define GAME_DEFAULT_TECHLEVEL
#define GAME_MIN_MAX_PLAYERS
#define GAME_DEFAULT_DISASTERS
#define GAME_MAX_FREECOST
#define GAME_MAX_REVOLUTION_LENGTH
#define GAME_DEFAULT_GOLD
#define GAME_MIN_AQUEDUCTLOSS
#define GAME_MIN_DIPLBULBCOST
#define GAME_DEFAULT_MIGRATION
#define GAME_MIN_EVENT_CACHE_MAX_SIZE
#define GAME_MIN_CITYMINDIST
#define GAME_MIN_SAVEFREQUENCY
#define GAME_DEFAULT_NATURALCITYNAMES
#define GAME_DEFAULT_EVENT_CACHE_TURNS
#define GAME_DEFAULT_VICTORY_CONDITIONS
#define GAME_MIN_UNITWAITTIME
#define GAME_DEFAULT_FOGGEDBORDERS
#define GAME_DEFAULT_UNITWAITTIME
#define GAME_DEFAULT_TIMEOUTADDEMOVE
#define GAME_DEFAULT_DISPERSION
#define GAME_MAX_CIVILWARSIZE
#define GAME_DEFAULT_AUTOSAVES
#define GAME_DEFAULT_EVENT_CACHE_CHAT
#define GAME_DEFAULT_DIPLOMACY
#define GAME_DEFAULT_MGR_DISTANCE
#define GAME_MIN_DIPLCHANCE
#define GAME_DEFAULT_TURNBLOCK
#define GAME_MAX_SAVETURNS
#define GAME_MAX_PINGTIME
#define GAME_DEFAULT_PINGTIME
#define GAME_DEFAULT_AQUEDUCTLOSS
#define GAME_DEFAULT_TRADEMINDIST
#define GAME_DEFAULT_BARBARIANRATE
#define GAME_DEFAULT_HAPPYBORDERS
#define GAME_MAX_FULLTRADESIZE
#define GAME_MAX_TECHLEAK
#define GAME_MAX_MGR_NATIONCHANCE
#define GAME_MAX_TECHLEVEL
#define GAME_MAX_MGR_WORLDCHANCE
#define GAME_MIN_MIN_PLAYERS
#define GAME_MAX_TRADEMINDIST
#define GAME_DEFAULT_END_TURN
#define GAME_MAX_EVENT_CACHE_TURNS
#define GAME_MAX_DIPLBULBCOST
#define GAME_DEFAULT_DIPLGOLDCOST
#define GAME_MAX_SHIELDBOX
#define GAME_DEFAULT_TECHLEAK
#define GAME_MAX_MIN_PLAYERS
#define GAME_MIN_TCPTIMEOUT
#define GAME_DEFAULT_END_SPACESHIP
#define GAME_MIN_RAPTUREDELAY
#define GAME_DEFAULT_EVENT_CACHE_MAX_SIZE
#define GAME_DEFAULT_SAVE_NAME
#define GAME_MIN_TRADEMINDIST
#define GAME_DEFAULT_MGR_NATIONCHANCE
#define GAME_MIN_TECHLEVEL
#define GAME_MAX_INCITE_GOLD_CAPT_CHANCE
#define GAME_DEFAULT_FOGOFWAR
#define GAME_DEFAULT_PERSISTENTREADY
#define GAME_MIN_FULLTRADESIZE
#define GAME_DEFAULT_DIPLBULBCOST
#define GAME_DEFAULT_RESTRICTINFRA
#define GAME_MAX_KICK_TIME
#define GAME_DEFAULT_CIVILWARSIZE
void send_game_info(struct conn_list *dest)
enum unit_role_id crole_to_role_id(char crole)
static enum log_level max_level
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret(condition)
#define log_warn(message,...)
#define log_verbose(message,...)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_debug(message,...)
#define log_normal(message,...)
#define log_error(message,...)
int map_startpos_count(void)
#define MAP_MIN_STEEPNESS
#define MAP_MAX_LINEAR_SIZE
#define MAP_MAX_TILESPERPLAYER
#define MAP_MAX_FLATPOLES
#define MAP_MIN_TILESPERPLAYER
#define MAP_DEFAULT_LINEAR_SIZE
#define MAP_DEFAULT_STARTPOS
#define MAP_DEFAULT_ANIMALS
#define MAP_DEFAULT_TEAM_PLACEMENT
#define MAP_MIN_TEMPERATURE
#define MAP_DEFAULT_MAPSIZE
#define MAP_MIN_LINEAR_SIZE
#define MAP_MAX_STEEPNESS
#define MAP_DEFAULT_LANDMASS
#define MAP_MIN_FLATPOLES
#define MAP_MAX_TEMPERATURE
#define MAP_DEFAULT_SINGLE_POLE
#define MAP_DEFAULT_SEPARATE_POLES
#define MAP_DEFAULT_RICHES
#define MAP_DEFAULT_TINYISLES
#define MAP_DEFAULT_TILESPERPLAYER
#define MAP_DEFAULT_TEMPERATURE
#define MAP_DEFAULT_ALLTEMPERATE
#define MAP_DEFAULT_GENERATOR
#define MAP_DEFAULT_FLATPOLES
#define MAP_DEFAULT_WETNESS
#define MAP_DEFAULT_STEEPNESS
#define fc_calloc(n, esz)
const struct rgbcolor * nation_color(const struct nation_type *pnation)
struct nation_set * nation_set_by_rule_name(const char *name)
#define nations_iterate_end
#define nations_iterate(NAME_pnation)
#define NO_NATION_SELECTED
void notify_conn(struct conn_list *dest, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
int send_packet_server_setting_bitwise(struct connection *pc, const struct packet_server_setting_bitwise *packet)
int send_packet_server_setting_str(struct connection *pc, const struct packet_server_setting_str *packet)
int send_packet_server_setting_const(struct connection *pc, const struct packet_server_setting_const *packet)
int send_packet_server_setting_int(struct connection *pc, const struct packet_server_setting_int *packet)
int send_packet_server_setting_control(struct connection *pc, const struct packet_server_setting_control *packet)
int send_packet_server_setting_bool(struct connection *pc, const struct packet_server_setting_bool *packet)
int send_packet_set_topology(struct connection *pc, const struct packet_set_topology *packet)
int send_packet_server_setting_enum(struct connection *pc, const struct packet_server_setting_enum *packet)
bool player_set_nation(struct player *pplayer, struct nation_type *pnation)
#define players_iterate_end
#define players_iterate(_pplayer)
void send_nation_availability(struct conn_list *dest, bool nationset_change)
int normal_player_count(void)
void server_player_set_color(struct player *pplayer, const struct rgbcolor *prgbcolor)
void send_player_info_c(struct player *src, struct conn_list *dest)
void count_playable_nations(void)
bool nation_is_in_current_set(const struct nation_type *pnation)
const char * secfile_error(void)
bool secfile_lookup_int(const struct section_file *secfile, int *ival, const char *path,...)
bool secfile_lookup_enum_data(const struct section_file *secfile, int *pvalue, bool bitwise, secfile_enum_name_data_fn_t name_fn, secfile_data_t data, const char *path,...)
int secfile_lookup_enum_default_data(const struct section_file *secfile, int defval, bool bitwise, secfile_enum_name_data_fn_t name_fn, secfile_data_t data, const char *path,...)
struct entry * secfile_entry_lookup(const struct section_file *secfile, const char *path,...)
const char * secfile_lookup_str(const struct section_file *secfile, 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,...)
const char * secfile_name(const struct section_file *secfile)
struct section * secfile_section_by_name(const struct section_file *secfile, const char *name)
const char * secfile_lookup_str_default(const struct section_file *secfile, const char *def, const char *path,...)
bool secfile_lookup_bool(const struct section_file *secfile, bool *bval, const char *path,...)
#define secfile_insert_int(secfile, value, path,...)
#define secfile_insert_str(secfile, string, path,...)
#define secfile_insert_bool(secfile, value, path,...)
#define secfile_insert_enum_data(secfile, value, bitwise, name_fn, data, path,...)
const void * secfile_data_t
void log_civ_score_free(void)
bool is_valid_demography(const char *demography, int *error)
void log_civ_score_init(void)
bool setting_int_validate(const struct setting *pset, int val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static void metamessage_action(const struct setting *pset)
static const struct sset_val_name * phasemode_name(int phasemode)
void settings_init(bool act)
static bool savename_validate(const char *value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static const char * setting_bool_to_str(const struct setting *pset, bool value, bool pretty, char *buf, size_t buf_len)
#define PACKET_COMMON_INIT(packet, pset, pconn)
static bool endturn_callback(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
void setting_action(const struct setting *pset)
bool(* bitwise_validate_func_t)(unsigned value, struct connection *pconn, char *reject_msg, size_t reject_msg_len)
static const struct sset_val_name * revealmap_name(int bit)
#define GEN_BOOL(name, value, sclass, scateg, slevel, al_read, al_write, short_help, extra_help, func_validate, func_action, _default)
int setting_int_get(struct setting *pset)
static const char * setting_bool_secfile_str(secfile_data_t data, int val)
static void nationset_action(const struct setting *pset)
const char * setting_default_name(const struct setting *pset, bool pretty, char *buf, size_t buf_len)
bool setting_enum_validate(const struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
struct setting * setting_by_name(const char *name)
static const struct sset_val_name * compresstype_name(enum fz_method compresstype)
void setting_set_to_default(struct setting *pset)
static void timeout_action(const struct setting *pset)
static const struct sset_val_name * startpos_name(int startpos)
const char * setting_value_name(const struct setting *pset, bool pretty, char *buf, size_t buf_len)
void settings_game_load(struct section_file *file, const char *section)
const char * setting_extra_help(const struct setting *pset, bool constant)
static bool setting_match_prefix(const val_name_func_t name_fn, const char *prefix, int *pvalue, char *reject_msg, size_t reject_msg_len)
const char *(* help_callback_func_t)(const struct setting *pset)
int setting_number(const struct setting *pset)
struct setting * setting_by_number(int id)
bool setting_int_set(struct setting *pset, int val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
enum sset_category setting_category(const struct setting *pset)
bool setting_is_visible(const struct setting *pset, struct connection *caller)
static bool first_timeout_callback(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
bool setting_locked(const struct setting *pset)
bool setting_non_default(const struct setting *pset)
static bool xsize_callback(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static const struct sset_val_name * airliftingstyle_name(int bit)
enum sset_type setting_type(const struct setting *pset)
static const struct sset_val_name * caravanbonusstyle_name(int caravanbonus)
static void settings_list_free(void)
bool setting_str_set(struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
#define GEN_STRING(name, value, sclass, scateg, slevel, al_read, al_write, short_help, extra_help, func_validate, func_action, _default)
static const struct sset_val_name * bool_name(int enable)
static const struct sset_val_name * revolentype_name(int revolentype)
int setting_int_max(const struct setting *pset)
void setting_lock_set(struct setting *pset, bool lock)
enum sset_level setting_level(const struct setting *pset)
static struct setting settings[]
static void first_timeout_action(const struct setting *pset)
static bool allowtake_callback(const char *value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static bool setting_ruleset_one(struct section_file *file, const char *name, const char *path)
static const char * setting_bitwise_to_str(const struct setting *pset, unsigned value, bool pretty, char *buf, size_t buf_len)
static const struct sset_val_name * topology_name(int topology_bit)
bool setting_bitwise_set(struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static void topology_action(const struct setting *pset)
const char * setting_enum_secfile_str(secfile_data_t data, int val)
void settings_game_save(struct section_file *file, const char *section)
int settings_number(void)
bool setting_str_validate(const struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static const struct sset_val_name * traderevenuestyle_name(int revenue_style)
bool(* string_validate_func_t)(const char *value, struct connection *pconn, char *reject_msg, size_t reject_msg_len)
#define NAME_CASE(_val, _support, _pretty)
#define GEN_STRING_NRS(name, value, sclass, scateg, slevel, al_read, al_write, short_help, extra_help, func_validate, func_action, _default)
bool settings_ruleset(struct section_file *file, const char *section, bool act)
static bool setting_is_free_to_change(const struct setting *pset, char *reject_msg, size_t reject_msg_len)
static const char * setting_enum_to_str(const struct setting *pset, int value, bool pretty, char *buf, size_t buf_len)
const char * setting_enum_val(const struct setting *pset, int val, bool pretty)
struct setting_list * level[OLEVELS_NUM]
static bool compresstype_callback(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
void setting_changed(struct setting *pset)
#define GEN_ENUM(name, value, sclass, scateg, slevel, al_read, al_write, short_help, extra_help, func_help, func_validate, func_action, func_name, _default)
static bool startunits_callback(const char *value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static void huts_action(const struct setting *pset)
static bool nationset_callback(const char *value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
enum setting_default_level setting_get_setdef(const struct setting *pset)
static bool mapsize_callback(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static const char * setting_int_to_str(const struct setting *pset, int value, bool pretty, char *buf, size_t buf_len)
static bool setting_bool_validate_base(const struct setting *pset, const char *val, int *pint_val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static bool demography_callback(const char *value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
bool(* enum_validate_func_t)(int value, struct connection *pconn, char *reject_msg, size_t reject_msg_len)
void settings_game_start(void)
bool setting_enum_set(struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
const char * setting_short_help(const struct setting *pset)
static const struct sset_val_name * citynames_name(int citynames)
void send_server_setting_control(struct connection *pconn)
static bool plrcol_validate(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static const struct sset_val_name * generator_name(int generator)
const char * setting_bitwise_bit(const struct setting *pset, int bit, bool pretty)
static bool autosaves_callback(unsigned value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static bool maxplayers_callback(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
int setting_int_min(const struct setting *pset)
bool(* bool_validate_func_t)(bool value, struct connection *pconn, char *reject_msg, size_t reject_msg_len)
static bool setting_enum_validate_base(const struct setting *pset, const char *val, int *pint_val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static void autotoggle_action(const struct setting *pset)
bool setting_bitwise_validate(const struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static const struct sset_val_name * victory_conditions_name(int condition_bit)
#define GEN_INT(name, value, sclass, scateg, slevel, al_read, al_write, short_help, extra_help, func_help, func_validate, func_action, _min, _max, _default)
bool setting_bool_validate(const struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
struct setting_list * settings_list_get(enum sset_level level)
bool setting_is_changeable(const struct setting *pset, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static const struct sset_val_name * teamplacement_name(int team_placement)
int settings_list_cmp(const struct setting *const *pset1, const struct setting *const *pset2)
static struct @114 setting_sorted
static bool setting_bitwise_validate_base(const struct setting *pset, const char *val, unsigned *pint_val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static enum m_pre_result setting_match_prefix_base(const val_name_func_t name_fn, const char *prefix, int *ind_result, const char **matches, size_t max_matches, size_t *pnum_matches)
static void settings_list_init(void)
void settings_reset(void)
const char * setting_name(const struct setting *pset)
static const int SETTINGS_NUM
static const char * phasemode_help(const struct setting *pset)
static bool ysize_callback(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
bool settings_game_reset(void)
static void scorelog_action(const struct setting *pset)
static const struct sset_val_name * happyborders_name(int happyborders)
int setting_bitwise_get(struct setting *pset)
static const struct sset_val_name * scoreloglevel_name(enum scorelog_level sl_level)
void settings_list_update(void)
static bool timeout_callback(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
@ SSET_PLAYERS_CHANGEABLE
static bool generator_validate(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static const char * setting_str_to_str(const struct setting *pset, const char *value, bool pretty, char *buf, size_t buf_len)
void(* action_callback_func_t)(const struct setting *pset)
#define settings_snprintf(_buf, _buf_len, format,...)
char * setting_str_get(struct setting *pset)
const struct sset_val_name *(* val_name_func_t)(int value)
bool setting_bool_get(struct setting *pset)
static bool set_enum_value(struct setting *pset, int val)
static void setting_game_set(struct setting *pset, bool init)
static void setting_game_free(struct setting *pset)
static bool scorefile_validate(const char *value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
const char * setting_bitwise_secfile_str(secfile_data_t data, int bit)
static void aifill_action(const struct setting *pset)
static const struct sset_val_name * trait_dist_name(int trait_dist)
bool setting_is_visible_at_level(const struct setting *pset, enum cmdlevel plevel)
static const struct sset_val_name * plrcol_name(int plrcol)
bool setting_bool_set(struct setting *pset, const char *val, struct connection *caller, char *reject_msg, size_t reject_msg_len)
void send_server_setting(struct conn_list *dest, const struct setting *pset)
static const char * huts_help(const struct setting *pset)
static const struct sset_val_name * persistentready_name(int persistent_ready)
void send_server_settings(struct conn_list *dest)
#define GEN_BITWISE(name, value, sclass, scateg, slevel, al_read, al_write, short_help, extra_help, func_validate, func_action, func_name, _default)
static const struct sset_val_name * mapsize_name(int mapsize)
static void plrcol_action(const struct setting *pset)
void send_server_access_level_settings(struct conn_list *dest, enum cmdlevel old_level, enum cmdlevel new_level)
static const struct sset_val_name * diplomacy_name(int diplomacy)
static const struct sset_val_name * barbarians_name(int barbarians)
static void setting_game_restore(struct setting *pset)
int read_enum_value(const struct setting *pset)
static const struct sset_val_name * borders_name(int borders)
static const struct sset_val_name * autosaves_name(int autosaves_bit)
bool(* int_validate_func_t)(int value, struct connection *pconn, char *reject_msg, size_t reject_msg_len)
static bool unitwaittime_callback(int value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
static bool topology_callback(unsigned value, struct connection *caller, char *reject_msg, size_t reject_msg_len)
#define settings_iterate(_level, _pset)
#define settings_iterate_end
bool is_safe_filename(const char *name)
void remove_leading_trailing_spaces(char *s)
const char * aifill(int amount)
bool game_was_started(void)
enum server_states server_state(void)
void toggle_ai_player_direct(struct connection *caller, struct player *pplayer)
void strvec_destroy(struct strvec *psv)
void strvec_append(struct strvec *psv, const char *string)
struct strvec * strvec_new(void)
size_t strvec_size(const struct strvec *psv)
const char * strvec_to_and_list(const struct strvec *psv, struct astring *astr)
enum city_names_mode allowed_city_names
int incite_gold_capt_chance
enum barbarians_rate barbarianrate
struct civ_game::@30::@34 server
char start_units[MAX_LEN_STARTUNIT]
struct civ_game::@30::@34::@35 event_cache
int incite_gold_loss_chance
bool settings_gamestart_valid
enum plrcolor_mode plrcolormode
int spaceship_travel_time
char demography[MAX_LEN_DEMOGRAPHY]
struct conn_list * est_connections
struct packet_game_info info
struct timer * save_timer
enum scorelog_level scoreloglevel
struct civ_game::@30::@34::@37 meta_info
int maxconnectionsperhost
struct packet_scenario_info scenario
int nuclear_winter_percent
char nationset[MAX_LEN_NAME]
char save_name[MAX_LEN_NAME]
enum fz_method save_compress_type
enum trait_dist_mode trait_dist
struct packet_timeout_info tinfo
char allow_take[MAX_LEN_ALLOW_TAKE]
char scorefile[MAX_LEN_NAME]
int global_warming_percent
enum mapsize_type mapsize
enum map_startpos startpos
struct civ_map::@41::@43 server
enum team_placement team_placement
enum map_generator generator
enum cmdlevel access_level
enum borders_mode borders
bool team_pooled_research
enum happyborders_type happyborders
enum diplomacy_mode diplomacy
enum trade_revenue_style trade_revenue_style
enum airlifting_style airlifting_style
enum revolen_type revolentype
enum phase_mode_type phase_mode
enum caravan_bonus_style caravan_bonus_style
bool unreachable_protects
enum persistent_ready persistent_ready
enum victory_condition_type victory_conditions
char support_names[64][MAX_LEN_NAME]
char pretty_names[64][MAX_LEN_ENUM]
char category_names[256][MAX_LEN_NAME]
char pretty_names[64][MAX_LEN_ENUM]
char support_names[64][MAX_LEN_NAME]
char default_val[MAX_LEN_PACKET]
float seconds_to_phasedone
enum cmdlevel access_level_read
enum setting_default_level setdef
const char *const default_value
const int_validate_func_t validate
enum cmdlevel access_level_write
const val_name_func_t name
const help_callback_func_t help_func
struct setting::@115::@118 integer
enum setting_default_level game_setdef
const enum_validate_func_t validate
struct setting::@115::@119 string
struct setting::@115::@117 boolean
struct setting::@115::@121 bitwise
const action_callback_func_t action
struct setting::@115::@120 enumerator
const bool_validate_func_t validate
const string_validate_func_t validate
const bitwise_validate_func_t validate
const unsigned default_value
enum sset_category scategory
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_strncasecmp(const char *str0, const char *str1, size_t n)
#define sz_strlcpy(dest, src)
#define terrain_type_iterate(_p)
#define terrain_type_iterate_end
#define terrain_has_flag(terr, flag)
void timer_destroy(struct timer *t)
void timer_start(struct timer *t)
void timer_stop(struct timer *t)
struct timer * timer_renew(struct timer *t, enum timer_timetype type, enum timer_use use)
struct unit_type * get_role_unit(int role, int role_index)
#define uclass_index(_c_)