38 static void help(
void);
60 { NULL, NULL,
false, NULL, NULL }
68 for (
int module = 0; modules[module].
name != NULL; module++) {
84 for (
int module = 0; modules[module].
name != NULL; module++) {
98 for (
int module = 0; modules[module].
name != NULL; module++) {
280 int port = atoi(val);
281 if (port <= 0 || port > 65535) {
282 LOG(
llevError,
"%d is an invalid csport number, must be between 1 and 65535.\n", port);
304 for (
int module = 0; modules[module].
name; module++) {
305 if (strcmp(
"All", name) == 0 || strcmp(modules[module].name, name) == 0) {
462 while (on_arg < argc) {
464 if (!strcmp(options[i].
cmd_option, argv[on_arg])) {
468 if (options[i].pass != pass) {
473 if ((on_arg+options[i].num_args) >= argc) {
474 fprintf(stderr,
"%s requires an argument.\n", options[i].cmd_option);
478 if (options[i].num_args == 1)
480 if (options[i].num_args == 2)
491 fprintf(stderr,
"Unknown option: %s\n", argv[on_arg]);
492 fprintf(stderr,
"Type '%s -h' for usage.\n", argv[0]);
531 char *
buf, *cp, *next;
542 if (!strncmp(cp,
"name", 4)) {
547 }
else if (!strncmp(cp,
"description", 11)) {
549 }
else if (sscanf(cp,
"material %d", &value)) {
551 }
else if (!strncmp(cp,
"saves", 5)) {
552 cp = strchr(cp,
' ')+1;
558 if ((next = strchr(cp,
',')) != NULL)
560 sscanf(cp,
"%d", &value);
561 mt->
save[i] = (int8_t)value;
564 }
else if (!strncmp(cp,
"mods", 4)) {
565 cp = strchr(cp,
' ')+1;
571 if ((next = strchr(cp,
',')) != NULL)
573 sscanf(cp,
"%d", &value);
574 mt->
mod[i] = (int8_t)value;
598 static char motd[
MAX_BUF] = { 0 };
610 if ((fp = fopen(buf,
"r")) == NULL) {
614 while (fgets(buf,
MAX_BUF-1, fp) != NULL) {
618 if ((cp = strrchr(buf,
'\n')) != NULL)
628 if ((cp = strchr(buf,
' ')) != NULL) {
637 if (!
strcasecmp(buf,
"metaserver_notification")) {
643 LOG(
llevError,
"load_settings: Unknown value for metaserver_notification: %s\n", cp);
645 }
else if (!
strcasecmp(buf,
"metaserver_server")) {
649 LOG(
llevError,
"load_settings: metaserver_server must have a value.\n");
655 LOG(
llevError,
"load_settings: motd must have a value.\n");
656 }
else if (!
strcasecmp(buf,
"metaserver_host")) {
660 LOG(
llevError,
"load_settings: metaserver_host must have a value.\n");
663 }
else if (!
strcasecmp(buf,
"metaserver_port")) {
666 if (port < 1 || port > 65535)
667 LOG(
llevError,
"load_settings: metaserver_port must be between 1 and 65535, %d is invalid\n", port);
670 }
else if (!
strcasecmp(buf,
"metaserver_comment")) {
672 }
else if (!
strcasecmp(buf,
"worldmapstartx")) {
676 LOG(
llevError,
"load_settings: worldmapstartx must be at least 0, %d is invalid\n", size);
679 }
else if (!
strcasecmp(buf,
"worldmapstarty")) {
683 LOG(
llevError,
"load_settings: worldmapstarty must be at least 0, %d is invalid\n", size);
686 }
else if (!
strcasecmp(buf,
"worldmaptilesx")) {
690 LOG(
llevError,
"load_settings: worldmaptilesx must be greater than 1, %d is invalid\n", size);
693 }
else if (!
strcasecmp(buf,
"worldmaptilesy")) {
697 LOG(
llevError,
"load_settings: worldmaptilesy must be greater than 1, %d is invalid\n", size);
700 }
else if (!
strcasecmp(buf,
"worldmaptilesizex")) {
704 LOG(
llevError,
"load_settings: worldmaptilesizex must be greater than 1, %d is invalid\n", size);
707 }
else if (!
strcasecmp(buf,
"worldmaptilesizey")) {
711 LOG(
llevError,
"load_settings: worldmaptilesizey must be greater than 1, %d is invalid\n", size);
718 LOG(
llevError,
"load_settings: fastclock must be at least 0, %d is invalid\n", lev);
721 }
else if (!
strcasecmp(buf,
"not_permadeth")) {
727 LOG(
llevError,
"load_settings: Unknown value for not_permadeth: %s\n", cp);
729 }
else if (!
strcasecmp(buf,
"resurrection")) {
735 LOG(
llevError,
"load_settings: Unknown value for resurrection: %s\n", cp);
743 LOG(
llevError,
"load_settings: Unknown value for set_title: %s\n", cp);
745 }
else if (!
strcasecmp(buf,
"search_items")) {
751 LOG(
llevError,
"load_settings: Unknown value for search_items: %s\n", cp);
753 }
else if (!
strcasecmp(buf,
"spell_encumbrance")) {
759 LOG(
llevError,
"load_settings: Unknown value for spell_encumbrance: %s\n", cp);
761 }
else if (!
strcasecmp(buf,
"spell_failure_effects")) {
767 LOG(
llevError,
"load_settings: Unknown value for spell_failure_effects: %s\n", cp);
769 }
else if (!
strcasecmp(buf,
"casting_time")) {
775 LOG(
llevError,
"load_settings: Unknown value for casting_time: %s\n", cp);
783 LOG(
llevError,
"load_settings: Unknown value for real_wiz: %s\n", cp);
785 }
else if (!
strcasecmp(buf,
"recycle_tmp_maps")) {
791 LOG(
llevError,
"load_settings: Unknown value for recycle_tmp_maps: %s\n", cp);
793 }
else if (!
strcasecmp(buf,
"always_show_hp")) {
801 LOG(
llevError,
"load_settings: Unknown value for always_show_hp: %s\n", cp);
807 }
else if (!
strcasecmp(buf,
"who_wiz_format")) {
812 }
else if (!
strcasecmp(buf,
"spellpoint_level_depend")) {
818 LOG(
llevError,
"load_settings: Unknown value for spellpoint_level_depend: %s\n", cp);
820 }
else if (!
strcasecmp(buf,
"stat_loss_on_death")) {
826 LOG(
llevError,
"load_settings: Unknown value for stat_loss_on_death: %s\n", cp);
828 }
else if (!
strcasecmp(buf,
"use_permanent_experience")) {
829 LOG(
llevError,
"use_permanent_experience is deprecated, usepermenent_experience_percentage instead\n");
830 }
else if (!
strcasecmp(buf,
"permanent_experience_percentage")) {
832 if (val < 0 || val > 100)
833 LOG(
llevError,
"load_settings: permenent_experience_percentage must be between 0 and 100, %d is invalid\n", val);
836 }
else if (!
strcasecmp(buf,
"death_penalty_percentage")) {
838 if (val < 0 || val > 100)
839 LOG(
llevError,
"load_settings: death_penalty_percentage must be between 0 and 100, %d is invalid\n", val);
842 }
else if (!
strcasecmp(buf,
"death_penalty_levels")) {
844 if (val < 0 || val > 255)
845 LOG(
llevError,
"load_settings: death_penalty_levels can not be negative, %d is invalid\n", val);
848 }
else if (!
strcasecmp(buf,
"balanced_stat_loss")) {
854 LOG(
llevError,
"load_settings: Unknown value for balanced_stat_loss: %s\n", cp);
862 LOG(
llevError,
"load_settings: Unknown value for simple_exp: %s\n", cp);
864 }
else if (!
strcasecmp(buf,
"item_power_factor")) {
865 float tmp = atof(cp);
867 LOG(
llevError,
"load_settings: item_power_factor must be a positive number (%f < 0)\n", tmp);
870 }
else if (!
strcasecmp(buf,
"pk_luck_penalty")) {
871 int16_t val = atoi(cp);
873 if (val < -100 || val > 100)
874 LOG(
llevError,
"load_settings: pk_luck_penalty must be between -100 and 100, %d is invalid\n", val);
877 }
else if (!
strcasecmp(buf,
"set_friendly_fire")) {
880 if (val < 1 || val > 100)
881 LOG(
llevError,
"load_settings: set_friendly_fire must be between 1 an 100, %d is invalid\n", val);
884 }
else if (!
strcasecmp(buf,
"armor_max_enchant")) {
885 int max_e = atoi(cp);
887 LOG(
llevError,
"load_settings: armor_max_enchant is %d\n", max_e);
890 }
else if (!
strcasecmp(buf,
"armor_weight_reduction")) {
893 LOG(
llevError,
"load_settings: armor_weight_reduction is %d\n", wr);
896 }
else if (!
strcasecmp(buf,
"armor_weight_linear")) {
902 LOG(
llevError,
"load_settings: unknown value for armor_weight_linear: %s\n", cp);
904 }
else if (!
strcasecmp(buf,
"armor_speed_improvement")) {
907 LOG(
llevError,
"load_settings: armor_speed_improvement is %d\n", wr);
910 }
else if (!
strcasecmp(buf,
"armor_speed_linear")) {
916 LOG(
llevError,
"load_settings: unknown value for armor_speed_linear: %s\n", cp);
918 }
else if (!
strcasecmp(buf,
"no_player_stealing")) {
924 LOG(
llevError,
"load_settings: unknown value for no_player_stealing: %s\n", cp);
926 }
else if (!
strcasecmp(buf,
"create_home_portals")) {
928 #ifdef TRY_BROKEN_TOWN_PORTALS 931 LOG(
llevError,
"load_settings: create_home_portals is currently broken. It results in town portals that prematurely reset when the apartment is swapped.\n");
936 LOG(
llevError,
"load_settings: unknown value for create_home_portals: %s\n", cp);
938 }
else if (!
strcasecmp(buf,
"personalized_blessings")) {
944 LOG(
llevError,
"load_settings: unknown value for personalized_blessings: %s\n", cp);
946 }
else if (!
strcasecmp(buf,
"pk_max_experience")) {
947 int64_t pkme = atoll(cp);
951 }
else if (!
strcasecmp(buf,
"pk_max_experience_percent")) {
952 int pkmep = atoi(cp);
954 LOG(
llevError,
"load_settings: pk_max_experience_percent should be positive or zero (was \"%s\")\n", cp);
957 }
else if (!
strcasecmp(buf,
"allow_denied_spells_writing")) {
963 LOG(
llevError,
"load_settings: unknown value for allow_denied_spells_writing: %s\n", cp);
965 }
else if (!
strcasecmp(buf,
"allow_broken_converters")) {
971 LOG(
llevError,
"load_settings: unknown value for allow_broken_converters: %s\n", cp);
973 }
else if (!
strcasecmp(buf,
"log_timestamp")) {
979 LOG(
llevError,
"load_settings: unknown value for log_timestamp: %s\n", cp);
981 }
else if (!
strcasecmp(buf,
"log_timestamp_format")) {
984 }
else if (!
strcasecmp(buf,
"starting_stat_min")) {
988 LOG(
llevError,
"load_settings: starting_stat_min (%d) need to be within %d-%d (%d)\n",
992 }
else if (!
strcasecmp(buf,
"starting_stat_max")) {
996 LOG(
llevError,
"load_settings: starting_stat_max (%d) need to be within %d-%d (%d)\n",
1000 }
else if (!
strcasecmp(buf,
"starting_stat_points")) {
1005 LOG(
llevError,
"load_settings: starting_stat_points (%d) need to be within %d-%d\n",
1009 }
else if (!
strcasecmp(buf,
"roll_stat_points")) {
1017 if (val < NUM_STATS * 3 || val >
NUM_STATS * 18)
1018 LOG(
llevError,
"load_settings: roll_stat_points need to be within %d-%d\n",
1019 NUM_STATS * 3, NUM_STATS * 18);
1022 }
else if (!
strcasecmp(buf,
"special_break_map")) {
1028 LOG(
llevError,
"load_settings: unknown value for special_break_map: %s\n", cp);
1030 }
else if (!
strcasecmp(buf,
"ignore_plugin_compatibility")) {
1036 LOG(
llevError,
"load_settings: unknown value for ignore_plugin_compatibility: %s\n", cp);
1038 }
else if (!
strcasecmp(buf,
"account_block_create")) {
1044 LOG(
llevError,
"load_settings: unknown value for account_block_create: %s\n", cp);
1046 }
else if (!
strcasecmp(buf,
"account_trusted_host")) {
1051 if (val != 0 && val != 1) {
1052 LOG(
llevError,
"load_settings: crypt_mode must be 0 or 1\n");
1060 LOG(
llevError,
"load_settings: min_name (%d) need to be within %d-%d\n",
1067 LOG(
llevError,
"Unknown value in settings file: %s\n", buf);
1133 LOG(
llevInfo,
"Running server in test mode (no sockets).\n");
1156 printf(
"Usage: crossfire-server [options]\n\n");
1158 printf(
"Options:\n");
1159 printf(
" -conf Set the directory to find configuration files.\n");
1160 printf(
" -d Turn on extra debugging messages.\n");
1161 printf(
" -data Set the data (share/) directory (archetypes, treasures, etc).\n");
1162 printf(
" -disable-module\n" 1163 " Disable specified module, by its name\n" 1164 " Can be specified multiple times. 'All' disables all modules.\n");
1165 printf(
" -enable-module\n" 1166 " Enable specified module, by its name\n" 1167 " Can be specified multiple times. 'All' enables all modules.\n");
1168 printf(
" -disable-plugin\n" 1169 " Disables specified plugin. Use the name without the extension.\n" 1170 " Can be specified multiple times. 'All' disables all plugins.\n");
1171 printf(
" -dump-anims Dump animations.\n");
1172 printf(
" -h Print this help message.\n");
1173 printf(
" -ignore-assets-errors\n");
1174 printf(
" Allow going on even if there are errors in assets.\n");
1175 printf(
" Warning: this may lead to strange behaviour.\n");
1176 printf(
" -list-modules\n" 1177 " List built-in modules and exit.\n");
1178 printf(
" -local Set the local data (var/) directory.\n");
1179 printf(
" -log <file> Write logging information to the given file.\n");
1180 printf(
" -m List suggested experience for all monsters.\n");
1181 printf(
" -m2 Dump monster abilities.\n");
1182 printf(
" -m3 Dump artifact information.\n");
1183 printf(
" -m4 Dump spell information.\n");
1184 printf(
" -m5 Dump skill information.\n");
1185 printf(
" -m6 Dump race information.\n");
1186 printf(
" -m7 Dump alchemy information.\n");
1187 printf(
" -m8 Dump gods information.\n");
1188 printf(
" -m9 Dump more alchemy information (formula checking).\n");
1189 printf(
" -maps Set the map directory.\n");
1190 printf(
" -mexp Dump the experience table.\n");
1191 printf(
" -mon Turn on monster debugging.\n");
1192 printf(
" -mq Dump the quest list.\n");
1193 printf(
" -mt <name> Dump a list of treasures for a monster.\n");
1194 printf(
" -n Turn off debugging messages if on by default.\n");
1195 printf(
" -p <port> Specifies the port to listen on for incoming connections.\n");
1196 printf(
" -pack-assets <type> <filename>\n");
1197 printf(
" Packs specified assets type to the specified filename.\n");
1198 printf(
" Valid assets type are: archs, treasures, faces, messages, facesets, artifacts, formulae, images, quests.\n");
1199 printf(
" The file format will be tar ('images') or text (everything else).\n");
1200 printf(
" It is possible to combine multiple assets by using '+', for instance 'faces+messages+artifacts'.\n");
1201 printf(
" In this case the file will be in tar format.\n");
1202 printf(
" -playerdir Set the player files directory.\n");
1203 printf(
" -regions Set the region file.\n");
1204 printf(
" -templatedir Set the template map directory.\n");
1205 printf(
" -tmpdir Set the directory for temporary files (mostly maps.)\n");
1206 printf(
" -uniquedir Set the unique items/maps directory.\n");
1207 printf(
" -v Print version information.\n");
1280 #ifdef SHUTDOWN_FILE 1285 if ((fp = fopen(buf,
"r")) != NULL) {
1286 while (fgets(buf,
MAX_BUF-1, fp) != NULL)
1303 (void) signum_unused;
1333 struct sigaction sa;
1335 sa.sa_sigaction = NULL;
1336 sigemptyset(&sa.sa_mask);
1339 sigaction(SIGHUP, &sa, NULL);
1341 signal(SIGPIPE, SIG_IGN);
std::vector< materialtype_t * > materials
List all module initialisation functions.
static void set_dumpmon2(void)
Command line option: dump abilities.
void dump_gods(void)
Prints all gods to stderr.
uint8_t not_permadeth
If true, death is non-permament.
int ignore_assets_errors
If set then go on running even if there are errors in assets.
static void set_mapdir(const char *path)
Command line option: set map path.
uint8_t create_home_portals
If 1, can create portals in unique maps (apartments)
static void set_dumpmont(const char *name)
Command line option: dump monster treasures.
uint8_t stat_loss_on_death
If true, chars lose a random stat when they die.
char meta_host[MAX_BUF]
Hostname of this host.
uint8_t max_stat
Maximum stat value - 255 should be sufficient.
uint32_t worldmaptilesx
Number of tiles wide the worldmap is.
uint8_t pass
What pass this should be processed on.
FILE * logfile
Used by server/daemon.c.
uint8_t spell_encumbrance
Encumbrance effects spells.
uint32_t worldmaptilesizey
Number of squares high in a wm tile.
static void init_beforeplay(void)
Called before the server starts listening to connections, processes various dump-related options...
uint8_t starting_stat_min
Minimum value of a starting stat.
void(* func)()
function to call when we match this.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
unsigned int meta_on
True if we should send updates.
void init_readable(void)
Initialize linked lists utilized by message functions in tailor_readable_ob()
uint16_t meta_port
Port number to use for updates.
uint8_t death_penalty_level
How many levels worth of exp may be lost on one death.
char who_wiz_format[MAX_BUF]
The format that the who command should use when called by a dm.
static void do_module(const char *name, bool enabled)
Change the 'enabled' flag of a module.
uint8_t spellpoint_level_depend
Spell costs go up with level.
uint8_t num_args
Number or args it takes.
int forbid_play(void)
Checks if server should be started.
void assets_add_collector_hook(const char *name, collectorHook hook)
static void rec_sighup(int i)
SIGHUP handler.
void init_library(void)
It is vital that init_library() is called by any functions using this library.
static void set_dumpmon1(void)
Command line option: dump monsters.
uint16_t csport
Port for new client/server.
const char * playerdir
Where the player files are.
const char * motd
Name of the motd file.
void dump_alchemy_costs(void)
Dumps to output all costs of recipes.
static materialtype_t * get_empty_mat(void)
Creates an empty materialtype_t structure.
void dump_experience(void)
Dump the experience table, then calls exit() - useful in terms of debugging to make sure the format o...
uint32_t worldmapstarty
Starting y tile for the worldmap.
sstring add_string(const char *str)
Share a string.
const char * regions
Name of the regions file - libdir is prepended.
int allow_broken_converters
If set, converters will work even if price of generated item is higher than the price of converted it...
static void set_datadir(const char *path)
Command line option: set data path.
int armor_max_enchant
Maximum number of times an armor can be enchanted.
static void set_mondebug(void)
Command line option: monster debug flag.
static void server_dump_animations(void)
Dump all animations, then exit.
static void set_dumpmon7(void)
Command line option: dump alchemy.
sstring add_refcount(sstring str)
Like add_string(), but the string is already a shared string.
uint8_t starting_stat_max
Maximum value of a starting stat.
void accounts_load(void)
This loads all the account entries into memory.
void dump_alchemy(void)
Dumps alchemy recipes to output.
void dump_animations(void)
Dump all animations to stderr, for debugging purposes.
LogLevel debug
Default debugging level.
void init_server(void)
This sets up the listening socket.
uint8_t death_penalty_ratio
Hhow much exp should be lost at death.
void dump_faces(void)
Dump all faces to stderr, for debugging purposes.
static void set_dumpmon4(void)
Command line option: dump spells.
static void set_dumpmon6(void)
Command line option: dump races.
char meta_server[MAX_BUF]
Hostname/ip addr of the metaserver.
Global type definitions and header inclusions.
void free_quest(void)
Free all quest status structures.
uint32_t worldmaptilesy
Number of tiles high the worldmap is.
static struct Command_Line_Options options[]
Actual valid command line options.
const char * logfilename
Logfile to use.
uint8_t casting_time
It takes awhile to cast a spell.
uint8_t recycle_tmp_maps
Re-use tmp maps.
char meta_comment[MAX_BUF]
Comment we send to the metaserver.
void cleanup(void)
Clean up everything and exit.
void commands_init(void)
Init standard commands.
void dump_quests(void)
Dump all of the quests, then calls exit() - useful in terms of debugging to make sure that quests are...
void dump_monster_treasure(const char *name)
For debugging purposes.
void init_signals(void)
Setup our signal handlers.
void dump_artifacts(void)
For debugging purposes.
char * log_timestamp_format
Format for timestap, if log_timestamp is set.
int armor_speed_improvement
Speed improvement.
static void load_settings(void)
This loads the settings file.
static module_information modules[]
All built modules.
int8_t save[NROFATTACKS]
Save chances for the attacks.
static void list_modules()
List all modules, then exit.
const char * dumparg
Additional argument for some dump functions.
static void parse_args(int argc, char *argv[], int pass)
Parse command line arguments.
static void unset_debug(void)
Command line option: unset debug flag.
Defines for loader.l / loader.c.
uint8_t search_items
Search_items command.
uint8_t min_name
Minimum characters for an account or player name.
const char * tmpdir
Directory to use for temporary files.
int64_t pk_max_experience
Maximum experience one can get for PKing.
void cfcitybell_init(Settings *settings, ServerSettings *serverSettings)
Citybells module initialisation.
uint8_t always_show_hp
'probe' spell HP bars for all living things (0, 1, or 2)
void service_unregister()
void load_races(BufferReader *reader, const char *filename)
Reads the races file in the lib/ directory, then overwrites old 'race' entries.
std::vector< std::string > disabled_plugins
List of disabled plugins, 'All' means all.
int strcasecmp(const char *s1, const char *s2)
static void signal_shutdown(int signum_unused)
Signal handler that begins a normal server shutdown.
uint8_t armor_weight_linear
If 1, weight reduction is linear, else exponantiel.
#define FREE_AND_COPY_IF(sv, nv)
void read_map_log(void)
Reads temporary maps information from disk.
uint8_t balanced_stat_loss
If true, Death stat depletion based on level etc.
const char * cmd_option
How it is called on the command line.
static void free_materials(void)
Frees all memory allocated to materials.
static void server_dump_faces(void)
Dump all faces, then exit.
uint8_t armor_speed_linear
If 1, speed improvement is linear, else exponantiel.
static void set_uniquedir(const char *path)
Command line option: set unique path.
int8_t mod[NROFATTACKS]
Modification to resistances.
static void set_dumpmon3(void)
Command line option: dump artifacts.
uint8_t real_wiz
Use mud-like wizards.
void cftimer_init(void)
Initialize timers.
struct Settings settings
Global settings.
void print_monsters(void)
As dump_abilities(), but with an alternative way of output.
uint8_t ignore_plugin_compatibility
If set, don't check plugin version.
const char * templatedir
Directory for the template map.
static void set_enable_module(const char *name)
Enable a module.
uint8_t simple_exp
If true, use the simple experience system.
static int should_exit
If set after command line argument parsing, then the server will exit.
static void set_dumpmon5(void)
Command line option: ?
void close_modules()
Clean up all modules which are not disabled.
volatile sig_atomic_t shutdown_flag
void fatal(enum fatal_error err)
fatal() is meant to be called whenever a fatal signal is intercepted.
static void help(void)
Display the command line options and exits.
void assets_pack(const char *what, const char *filename)
Pack the specified assets in a file.
static void set_confdir(const char *path)
Command line option: set configuration path.
#define MAX_BUF
Used for all kinds of things.
static void set_disable_plugin(const char *name)
Disable a plugin.
const char * name
Name of the material.
char who_format[MAX_BUF]
The format that the who command should use.
void assets_finish_archetypes_for_play()
void free_server(void)
Frees all memory allocated around here:
const char * confdir
Configuration files.
void add_server_collect_hooks()
uint8_t account_block_create
void free_races(void)
Frees all race-related information.
const char * uniquedir
Directory for the unique items.
void init_modules()
Init all modules which are not disabled.
uint8_t permanent_exp_ratio
How much exp should be 'permenant' and unable to be lost.
int log_timestamp
If set, log will comport a timestamp.
const char * datadir
Read only data files.
void dump_spells(void)
Dumps all the spells - now also dumps skill associated with the spell.
uint8_t special_break_map
If set, then submaps in random maps can break the walls.
void random_house_generator_close()
Close the module.
uint16_t set_friendly_fire
Percent of damage done by peaceful player vs player damage.
int armor_weight_reduction
Weight reduction per enchantment.
static void call_version(void)
Command line option: show version.
const char * localdir
Read/write data files.
uint8_t starting_stat_points
How many stat points character starts with.
Only for debugging purposes.
uint8_t no_player_stealing
If 1, can not steal from other players.
static void set_tmpdir(const char *path)
Command line option: set temporary file path.
One command line option definition.
const char * mapdir
Where the map files are.
void dump_abilities(void)
Dump to standard out the abilities of all monsters.
void(* cmdlinefunc_args1)(const char *arg1)
void reset_sleep(void)
Initialise all variables used in the timing routines.
static void set_regions(const char *path)
Command line option: set regions file name.
int material
What basic type(s) it is linked to.
static void init_startup(void)
Checks if starting the server is allowed.
static void set_csport(const char *val)
Change the server's port.
void init_gods(void)
This takes a look at all of the archetypes to find the objects which correspond to the GODS (type GOD...
uint8_t fastclock
If true, clock goes warp 9.
static void set_debug(void)
Command line option: debug flag.
static void set_disable_module(const char *name)
Disable a module.
static void set_logfile(char *val)
Command line option: set logfile name.
static void server_pack_assets(const char *assets, const char *filename)
uint8_t crypt_mode
0 for legacy behavior, 1 for always Traditional
uint8_t dumpvalues
Set to dump various values/tables.
static void set_dumpmon9(void)
Command line option: dump alchemy costs.
static void server_dump_bonuses()
Dump all bonuses (from the stat_bonus file) then exit.
uint8_t set_title
Players can set thier title.
void(* cmdlinefunc_args2)(const char *arg1, const char *arg2)
C function wrappers to interact with assets.
void(* cmdlinefunc_args0)(void)
Typedefs used when calling option handlers.
static void set_localdir(const char *path)
Command line option: set local path.
uint32_t worldmapstartx
Starting x tile for the worldmap.
char * bufferreader_next_line(BufferReader *br)
Return the next line in the buffer, as separated by a newline.
int metaserver2_init(void)
This initializes the metaserver2 logic - it reads the metaserver2 file, storing the values away...
ServerSettings serverSettings
const char * description
Description, unused.
int allow_denied_spells_writing
If set, players can write spells they can't cast.
#define SHUTDOWN_FILE
If you want to take the game down while installing new versions, or for other reasons, put a message into the SHUTDOWN_FILE file.
uint8_t roll_stat_points
How many stat points legacy (rolled) chars start with.
static void set_dumpmon8(void)
Command line option: dump gods.
uint32_t worldmaptilesizex
Number of squares wide in a wm tile.
void hiscore_init(void)
Initializes the module.
void init_archetype_pointers(void)
Initialize global archtype pointers:
int pk_max_experience_percent
Percentage of experience of victim the killer gets.
uint8_t spell_failure_effects
Nasty backlash to spell failures.
void init_ob_methods(void)
Initializes the ob_method system.
float item_power_factor
See note in setings file.
void dump_races(void)
Dumps all race information to stderr.
uint8_t resurrection
Ressurection possible w/ permadeth on.
int16_t pk_luck_penalty
Amount by which player luck is reduced if they PK.
static void set_templatedir(const char *path)
Command line option: set template path.
uint8_t personalized_blessings
If 1, blessed weapons get an owner and a willpower value.
static void set_ignore_assets_errors()
Command line option: ignore assets errors.
static void load_materials(BufferReader *reader, const char *filename)
Loads the materials.
void init_skills(void)
This just sets up the skill_names table above.
void citylife_init(Settings *settings, ServerSettings *serverSettings)
void random_house_generator_init(Settings *settings, ServerSettings *serverSettings)
Module initialisation.
char * account_trusted_host
Block account creation for untrusted hosts.
static void set_playerdir(const char *path)
Command line option: set player path.