![]() |
Crossfire Server, Trunk
1.75.0
|
Server settings. More...
#include <global.h>
Public Member Functions | |
void | add_hook (const char *name, collectorHook hook) |
Data Fields | |
uint8_t | account_block_create |
char * | account_trusted_host |
Block account creation for untrusted hosts. More... | |
int | allow_broken_converters |
If set, converters will work even if price of generated item is higher than the price of converted items. More... | |
int | allow_denied_spells_writing |
If set, players can write spells they can't cast. More... | |
uint8_t | always_show_hp |
'probe' spell HP bars for all living things (0, 1, or 2) More... | |
int | armor_max_enchant |
Maximum number of times an armor can be enchanted. More... | |
int | armor_speed_improvement |
Speed improvement. More... | |
uint8_t | armor_speed_linear |
If 1, speed improvement is linear, else exponantiel. More... | |
uint8_t | armor_weight_linear |
If 1, weight reduction is linear, else exponantiel. More... | |
int | armor_weight_reduction |
Weight reduction per enchantment. More... | |
class AssetsTracker * | assets_tracker |
If not NULL, called each time an asset is defined. More... | |
uint8_t | balanced_stat_loss |
If true, Death stat depletion based on level etc. More... | |
uint8_t | casting_time |
It takes awhile to cast a spell. More... | |
std::vector< std::pair< std::string, collectorHook > > | collector_hooks |
Collect hooks, as (filename, function) pairs. More... | |
const char * | confdir |
Configuration files. More... | |
uint8_t | create_home_portals |
If 1, can create portals in unique maps (apartments) More... | |
uint8_t | crypt_mode |
0 for legacy behavior, 1 for always Traditional More... | |
uint16_t | csport |
Port for new client/server. More... | |
const char * | datadir |
Read only data files. More... | |
uint8_t | death_penalty_level |
How many levels worth of exp may be lost on one death. More... | |
uint8_t | death_penalty_ratio |
Hhow much exp should be lost at death. More... | |
LogLevel | debug |
Default debugging level. More... | |
std::vector< char * > | disabled_plugins |
List of disabled plugins, 'All' means all. More... | |
const char * | dumparg |
Additional argument for some dump functions. More... | |
uint8_t | dumpvalues |
Set to dump various values/tables. More... | |
char * | emergency_mapname |
Map to return players to in emergency. More... | |
uint16_t | emergency_x |
uint16_t | emergency_y |
Coordinates to use on that map. More... | |
uint8_t | fastclock |
If true, clock goes warp 9. More... | |
fatalHook | fatal_hook |
If not NULL then called when fatal() is called. More... | |
int | ignore_assets_errors |
If set then go on running even if there are errors in assets. More... | |
uint8_t | ignore_plugin_compatibility |
If set, don't check plugin version. More... | |
float | item_power_factor |
See note in setings file. More... | |
const char * | localdir |
Read/write data files. More... | |
logHook | log_callback |
Log hook, to intercept log messages. More... | |
int | log_timestamp |
If set, log will comport a timestamp. More... | |
char * | log_timestamp_format |
Format for timestap, if log_timestamp is set. More... | |
const char * | logfilename |
Logfile to use. More... | |
const char * | mapdir |
Where the map files are. More... | |
int16_t | max_level |
This is read out of exp_table. More... | |
uint8_t | max_stat |
Maximum stat value - 255 should be sufficient. More... | |
char | meta_comment [MAX_BUF] |
Comment we send to the metaserver. More... | |
char | meta_host [MAX_BUF] |
Hostname of this host. More... | |
unsigned int | meta_on:1 |
True if we should send updates. More... | |
uint16_t | meta_port |
Port number to use for updates. More... | |
char | meta_server [MAX_BUF] |
Hostname/ip addr of the metaserver. More... | |
uint8_t | min_name |
Minimum characters for an account or player name. More... | |
const char * | motd |
Name of the motd file. More... | |
const char * | news |
Name of news file. More... | |
uint8_t | no_player_stealing |
If 1, can not steal from other players. More... | |
uint8_t | not_permadeth |
If true, death is non-permament. More... | |
uint8_t | permanent_exp_ratio |
How much exp should be 'permenant' and unable to be lost. More... | |
uint8_t | personalized_blessings |
If 1, blessed weapons get an owner and a willpower value. More... | |
int16_t | pk_luck_penalty |
Amount by which player luck is reduced if they PK. More... | |
int64_t | pk_max_experience |
Maximum experience one can get for PKing. More... | |
int | pk_max_experience_percent |
Percentage of experience of victim the killer gets. More... | |
const char * | playerdir |
Where the player files are. More... | |
uint8_t | real_wiz |
Use mud-like wizards. More... | |
uint8_t | recycle_tmp_maps |
Re-use tmp maps. More... | |
const char * | regions |
Name of the regions file - libdir is prepended. More... | |
int | reset_loc_time |
Number of seconds to put player back at home. More... | |
uint8_t | resurrection |
Ressurection possible w/ permadeth on. More... | |
uint8_t | roll_stat_points |
How many stat points legacy (rolled) chars start with. More... | |
const char * | rules |
Name of rules file. More... | |
uint8_t | search_items |
Search_items command. More... | |
uint16_t | set_friendly_fire |
Percent of damage done by peaceful player vs player damage. More... | |
uint8_t | set_title |
Players can set thier title. More... | |
uint8_t | simple_exp |
If true, use the simple experience system. More... | |
uint8_t | special_break_map |
If set, then submaps in random maps can break the walls. More... | |
uint8_t | spell_encumbrance |
Encumbrance effects spells. More... | |
uint8_t | spell_failure_effects |
Nasty backlash to spell failures. More... | |
uint8_t | spellpoint_level_depend |
Spell costs go up with level. More... | |
uint8_t | starting_stat_max |
Maximum value of a starting stat. More... | |
uint8_t | starting_stat_min |
Minimum value of a starting stat. More... | |
uint8_t | starting_stat_points |
How many stat points character starts with. More... | |
char * | stat_file |
uint8_t | stat_loss_on_death |
If true, chars lose a random stat when they die. More... | |
const char * | templatedir |
Directory for the template map. More... | |
const char * | tmpdir |
Directory to use for temporary files. More... | |
const char * | uniquedir |
Directory for the unique items. More... | |
char | who_format [MAX_BUF] |
The format that the who command should use. More... | |
char | who_wiz_format [MAX_BUF] |
The format that the who command should use when called by a dm. More... | |
uint32_t | worldmapstartx |
Starting x tile for the worldmap. More... | |
uint32_t | worldmapstarty |
Starting y tile for the worldmap. More... | |
uint32_t | worldmaptilesizex |
Number of squares wide in a wm tile. More... | |
uint32_t | worldmaptilesizey |
Number of squares high in a wm tile. More... | |
uint32_t | worldmaptilesx |
Number of tiles wide the worldmap is. More... | |
uint32_t | worldmaptilesy |
Number of tiles high the worldmap is. More... | |
|
inline |
Definition at line 340 of file global.h.
References collector_hooks, and name.
Referenced by add_server_collect_hooks(), cfcitybell_init(), and citylife_init().
uint8_t Settings::account_block_create |
Definition at line 330 of file global.h.
Referenced by account_block_create(), and load_settings().
char* Settings::account_trusted_host |
Block account creation for untrusted hosts.
Trusted host for account creation, defaults to 127.0.0.1.
Definition at line 331 of file global.h.
Referenced by account_block_create(), and load_settings().
int Settings::allow_broken_converters |
If set, converters will work even if price of generated item is higher than the price of converted items.
Definition at line 318 of file global.h.
Referenced by do_item_conversion(), and load_settings().
int Settings::allow_denied_spells_writing |
If set, players can write spells they can't cast.
Definition at line 317 of file global.h.
Referenced by command_settings(), load_settings(), and write_scroll().
uint8_t Settings::always_show_hp |
'probe' spell HP bars for all living things (0, 1, or 2)
Definition at line 275 of file global.h.
Referenced by check_probe(), and load_settings().
int Settings::armor_max_enchant |
Maximum number of times an armor can be enchanted.
Definition at line 307 of file global.h.
Referenced by improve_armour(), and load_settings().
int Settings::armor_speed_improvement |
Speed improvement.
Definition at line 310 of file global.h.
Referenced by load_settings(), and set_abs_magic().
uint8_t Settings::armor_speed_linear |
If 1, speed improvement is linear, else exponantiel.
Definition at line 311 of file global.h.
Referenced by load_settings(), and set_abs_magic().
uint8_t Settings::armor_weight_linear |
If 1, weight reduction is linear, else exponantiel.
Definition at line 309 of file global.h.
Referenced by load_settings(), and set_abs_magic().
int Settings::armor_weight_reduction |
Weight reduction per enchantment.
Definition at line 308 of file global.h.
Referenced by load_settings(), and set_abs_magic().
class AssetsTracker* Settings::assets_tracker |
If not NULL, called each time an asset is defined.
Definition at line 336 of file global.h.
Referenced by assets_collect().
uint8_t Settings::balanced_stat_loss |
If true, Death stat depletion based on level etc.
Definition at line 263 of file global.h.
Referenced by kill_player_not_permadeath(), and load_settings().
uint8_t Settings::casting_time |
It takes awhile to cast a spell.
Definition at line 272 of file global.h.
Referenced by attack_ob_simple(), cast_spell(), command_settings(), load_settings(), object_clear(), process_events(), process_players1(), and rangetostring().
std::vector<std::pair<std::string, collectorHook> > Settings::collector_hooks |
Collect hooks, as (filename, function) pairs.
Definition at line 334 of file global.h.
Referenced by add_hook(), and assets_collect().
const char* Settings::confdir |
Configuration files.
Definition at line 249 of file global.h.
Referenced by cfapi_system_directory(), checkbanned(), checkdm(), display_motd(), forbid_play(), init_experience(), init_startup(), init_stats(), load_settings(), metaserver2_init(), send_file(), send_news(), send_rules(), and set_confdir().
uint8_t Settings::create_home_portals |
If 1, can create portals in unique maps (apartments)
Definition at line 313 of file global.h.
Referenced by cast_create_town_portal(), command_settings(), and load_settings().
uint8_t Settings::crypt_mode |
0 for legacy behavior, 1 for always Traditional
Definition at line 332 of file global.h.
Referenced by crypt_string(), and load_settings().
uint16_t Settings::csport |
Port for new client/server.
Definition at line 244 of file global.h.
Referenced by init_server(), metaserver2_init(), and set_csport().
const char* Settings::datadir |
Read only data files.
Definition at line 250 of file global.h.
Referenced by cfapi_system_directory(), command_help(), command_purge_quest_definitions(), create_pathname(), find_help_file_in(), find_maps(), find_style(), help_topics(), i18n_init(), init_emergency_mappath(), init_environ(), load_assets(), and set_datadir().
uint8_t Settings::death_penalty_level |
How many levels worth of exp may be lost on one death.
Definition at line 262 of file global.h.
Referenced by apply_death_exp_penalty(), command_settings(), and load_settings().
uint8_t Settings::death_penalty_ratio |
Hhow much exp should be lost at death.
Definition at line 261 of file global.h.
Referenced by apply_death_exp_penalty(), command_settings(), and load_settings().
LogLevel Settings::debug |
Default debugging level.
Definition at line 245 of file global.h.
Referenced by command_debug(), LOG(), main(), set_debug(), set_mondebug(), and unset_debug().
std::vector<char *> Settings::disabled_plugins |
List of disabled plugins, 'All' means all.
Definition at line 328 of file global.h.
Referenced by cfcitybell_init(), citylife_init(), free_server(), initPlugins(), random_house_generator_init(), and set_disable_plugin().
const char* Settings::dumparg |
Additional argument for some dump functions.
Definition at line 248 of file global.h.
Referenced by init_beforeplay(), and set_dumpmont().
uint8_t Settings::dumpvalues |
Set to dump various values/tables.
Definition at line 247 of file global.h.
Referenced by init_beforeplay(), set_dumpmon1(), set_dumpmon2(), set_dumpmon3(), set_dumpmon4(), set_dumpmon5(), set_dumpmon6(), set_dumpmon7(), set_dumpmon8(), set_dumpmon9(), and set_dumpmont().
char* Settings::emergency_mapname |
Map to return players to in emergency.
Definition at line 301 of file global.h.
Referenced by enter_player_maplevel(), enter_player_savebed(), free_globals(), init_emergency_mappath(), kill_player_permadeath(), and save_player().
uint16_t Settings::emergency_x |
Definition at line 302 of file global.h.
Referenced by enter_player_maplevel(), enter_player_savebed(), init_emergency_mappath(), and kill_player_permadeath().
uint16_t Settings::emergency_y |
Coordinates to use on that map.
Definition at line 302 of file global.h.
Referenced by enter_player_maplevel(), enter_player_savebed(), init_emergency_mappath(), and kill_player_permadeath().
uint8_t Settings::fastclock |
fatalHook Settings::fatal_hook |
int Settings::ignore_assets_errors |
If set then go on running even if there are errors in assets.
Definition at line 335 of file global.h.
Referenced by init_library(), and set_ignore_assets_errors().
uint8_t Settings::ignore_plugin_compatibility |
If set, don't check plugin version.
Definition at line 329 of file global.h.
Referenced by load_settings(), and plugins_init_plugin().
float Settings::item_power_factor |
See note in setings file.
Definition at line 305 of file global.h.
Referenced by apply_check_item_power(), command_settings(), improve_armour(), improve_weapon(), and load_settings().
const char* Settings::localdir |
Read/write data files.
Definition at line 251 of file global.h.
Referenced by account_char_load_from_file(), account_char_save(), accounts_load(), accounts_save(), apply_race_and_class(), cfapi_system_directory(), check_login(), checkbanned(), command_banish(), command_players(), create_items_path(), create_overlay_pathname(), create_template_pathname(), dead_player(), delete_character(), hiscore_init(), init_book_archive(), init_clocks(), init_environ(), key_change_class(), knowledge_read_player_data(), knowledge_write_player_data(), map_path(), map_remove_unique_files(), quest_read_player_data(), quest_write_player_data(), read_map_log(), ready_map_name(), resurrect_player(), save_map(), save_player(), set_localdir(), verify_player(), write_book_archive(), write_map_log(), and write_todclock().
logHook Settings::log_callback |
int Settings::log_timestamp |
If set, log will comport a timestamp.
Definition at line 320 of file global.h.
Referenced by load_settings(), and LOG().
char* Settings::log_timestamp_format |
Format for timestap, if log_timestamp is set.
Definition at line 321 of file global.h.
Referenced by load_settings(), and LOG().
const char* Settings::logfilename |
Logfile to use.
Definition at line 243 of file global.h.
Referenced by init_globals(), LOG(), and set_logfile().
const char* Settings::mapdir |
Where the map files are.
Definition at line 253 of file global.h.
Referenced by cfapi_system_directory(), create_overlay_pathname(), create_pathname(), find_maps(), init_emergency_mappath(), init_environ(), and set_mapdir().
int16_t Settings::max_level |
This is read out of exp_table.
Definition at line 304 of file global.h.
Referenced by add_player_exp(), compute_price_variation_with_bargaining(), dragon_eat_flesh(), dump_experience(), exp_level(), fix_object(), init_experience(), level_exp(), player_lvl_adj(), and send_exp_table().
uint8_t Settings::max_stat |
Maximum stat value - 255 should be sufficient.
Definition at line 326 of file global.h.
Referenced by attempt_steal(), change_abil(), check_race_and_class(), command_abil(), do_symptoms(), do_throw(), dump_stat_bonuses(), fix_object(), fix_player(), get_cha_bonus(), get_cleric_chance(), get_con_bonus(), get_dam_bonus(), get_dex_bonus(), get_fear_bonus(), get_grace_bonus(), get_learn_spell(), get_sp_bonus(), get_speed_bonus(), get_thaco_bonus(), get_turn_bonus(), get_weight_limit(), init_stats(), kill_player_not_permadeath(), load_settings(), load_table(), and pick_up_object().
char Settings::meta_comment[MAX_BUF] |
Comment we send to the metaserver.
Definition at line 291 of file global.h.
Referenced by load_settings().
char Settings::meta_host[MAX_BUF] |
unsigned int Settings::meta_on |
True if we should send updates.
Definition at line 287 of file global.h.
Referenced by load_settings().
uint16_t Settings::meta_port |
Port number to use for updates.
Definition at line 290 of file global.h.
Referenced by load_settings().
char Settings::meta_server[MAX_BUF] |
Hostname/ip addr of the metaserver.
Definition at line 288 of file global.h.
Referenced by load_settings().
uint8_t Settings::min_name |
Minimum characters for an account or player name.
Definition at line 333 of file global.h.
Referenced by account_new_cmd(), create_player_cmd(), and load_settings().
const char* Settings::motd |
Name of the motd file.
Definition at line 280 of file global.h.
Referenced by display_motd(), load_settings(), and send_file().
const char* Settings::news |
Name of news file.
Definition at line 282 of file global.h.
Referenced by send_file(), and send_news().
uint8_t Settings::no_player_stealing |
If 1, can not steal from other players.
Definition at line 312 of file global.h.
Referenced by attempt_steal(), command_settings(), and load_settings().
uint8_t Settings::not_permadeth |
If true, death is non-permament.
Definition at line 264 of file global.h.
Referenced by command_settings(), kill_player(), and load_settings().
uint8_t Settings::permanent_exp_ratio |
How much exp should be 'permenant' and unable to be lost.
Definition at line 260 of file global.h.
Referenced by add_player_exp(), calc_perm_exp(), check_exp_loss(), command_settings(), load_settings(), show_skills(), and while().
uint8_t Settings::personalized_blessings |
If 1, blessed weapons get an owner and a willpower value.
Definition at line 314 of file global.h.
Referenced by apply_check_personalized_blessings(), god_enchants_weapon(), and load_settings().
int16_t Settings::pk_luck_penalty |
Amount by which player luck is reduced if they PK.
Definition at line 259 of file global.h.
Referenced by kill_object(), and load_settings().
int64_t Settings::pk_max_experience |
Maximum experience one can get for PKing.
Ignore if negative.
Definition at line 315 of file global.h.
Referenced by kill_object(), and load_settings().
int Settings::pk_max_experience_percent |
Percentage of experience of victim the killer gets.
Definition at line 316 of file global.h.
Referenced by kill_object(), and load_settings().
const char* Settings::playerdir |
Where the player files are.
Definition at line 252 of file global.h.
Referenced by apply_race_and_class(), cfapi_system_directory(), check_login(), command_players(), dead_player(), delete_character(), init_environ(), key_change_class(), key_confirm_quit(), knowledge_read_player_data(), knowledge_write_player_data(), map_path(), map_remove_unique_files(), quest_read_player_data(), quest_write_player_data(), ready_map_name(), resurrect_player(), save_map(), save_player(), set_playerdir(), and verify_player().
uint8_t Settings::real_wiz |
Use mud-like wizards.
Definition at line 273 of file global.h.
Referenced by command_abil(), command_addexp(), command_create(), command_nowiz(), command_patch(), load_settings(), pay_for_item(), and pick_up_object().
uint8_t Settings::recycle_tmp_maps |
Re-use tmp maps.
Definition at line 274 of file global.h.
Referenced by clean_tmp_files(), load_settings(), and swap_map().
const char* Settings::regions |
Name of the regions file - libdir is prepended.
Definition at line 254 of file global.h.
Referenced by set_regions().
int Settings::reset_loc_time |
Number of seconds to put player back at home.
Definition at line 266 of file global.h.
Referenced by check_login().
uint8_t Settings::resurrection |
Ressurection possible w/ permadeth on.
Definition at line 268 of file global.h.
Referenced by command_settings(), kill_player_permadeath(), and load_settings().
uint8_t Settings::roll_stat_points |
How many stat points legacy (rolled) chars start with.
Definition at line 325 of file global.h.
Referenced by load_settings(), and roll_stats().
const char* Settings::rules |
Name of rules file.
Definition at line 281 of file global.h.
Referenced by send_file(), and send_rules().
uint8_t Settings::search_items |
Search_items command.
Definition at line 269 of file global.h.
Referenced by check_login(), check_pick(), command_search_items(), fix_player(), and load_settings().
uint16_t Settings::set_friendly_fire |
Percent of damage done by peaceful player vs player damage.
Definition at line 277 of file global.h.
Referenced by command_settings(), hit_player(), and load_settings().
uint8_t Settings::set_title |
Players can set thier title.
Definition at line 267 of file global.h.
Referenced by check_login(), command_settings(), command_title(), key_confirm_quit(), kill_player_permadeath(), load_settings(), and save_player().
uint8_t Settings::simple_exp |
If true, use the simple experience system.
Definition at line 265 of file global.h.
Referenced by calc_skill_exp(), kill_object(), and load_settings().
uint8_t Settings::special_break_map |
If set, then submaps in random maps can break the walls.
Definition at line 327 of file global.h.
Referenced by find_spot_for_submap(), and load_settings().
uint8_t Settings::spell_encumbrance |
Encumbrance effects spells.
Definition at line 270 of file global.h.
Referenced by command_settings(), fix_object(), and load_settings().
uint8_t Settings::spell_failure_effects |
Nasty backlash to spell failures.
Definition at line 271 of file global.h.
Referenced by cast_spell(), command_settings(), load_settings(), scroll_failure(), scroll_type_apply(), spell_failure(), and spellbook_type_apply().
uint8_t Settings::spellpoint_level_depend |
Spell costs go up with level.
Definition at line 276 of file global.h.
Referenced by load_settings(), and SP_level_spellpoint_cost().
uint8_t Settings::starting_stat_max |
Maximum value of a starting stat.
Definition at line 323 of file global.h.
Referenced by create_player_cmd(), load_settings(), and send_new_char_info().
uint8_t Settings::starting_stat_min |
Minimum value of a starting stat.
Definition at line 322 of file global.h.
Referenced by create_player_cmd(), load_settings(), and send_new_char_info().
uint8_t Settings::starting_stat_points |
How many stat points character starts with.
Definition at line 324 of file global.h.
Referenced by create_player_cmd(), load_settings(), and send_new_char_info().
char* Settings::stat_file |
Definition at line 338 of file global.h.
Referenced by load_settings().
uint8_t Settings::stat_loss_on_death |
If true, chars lose a random stat when they die.
Definition at line 258 of file global.h.
Referenced by kill_player_not_permadeath(), and load_settings().
const char* Settings::templatedir |
Directory for the template map.
Definition at line 256 of file global.h.
Referenced by create_template_pathname(), init_environ(), and set_templatedir().
const char* Settings::tmpdir |
Directory to use for temporary files.
Definition at line 257 of file global.h.
Referenced by cfapi_system_directory(), init_environ(), save_map(), save_player(), and set_tmpdir().
const char* Settings::uniquedir |
Directory for the unique items.
Definition at line 255 of file global.h.
Referenced by cfapi_system_directory(), create_items_path(), init_environ(), and set_uniquedir().
char Settings::who_format[MAX_BUF] |
The format that the who command should use.
Definition at line 278 of file global.h.
Referenced by list_players(), and load_settings().
char Settings::who_wiz_format[MAX_BUF] |
The format that the who command should use when called by a dm.
Definition at line 279 of file global.h.
Referenced by list_players(), and load_settings().
uint32_t Settings::worldmapstartx |
Starting x tile for the worldmap.
Definition at line 293 of file global.h.
Referenced by command_loadtest(), and load_settings().
uint32_t Settings::worldmapstarty |
Starting y tile for the worldmap.
Definition at line 294 of file global.h.
Referenced by command_loadtest(), and load_settings().
uint32_t Settings::worldmaptilesizex |
Number of squares wide in a wm tile.
Definition at line 297 of file global.h.
Referenced by load_settings().
uint32_t Settings::worldmaptilesizey |
Number of squares high in a wm tile.
Definition at line 298 of file global.h.
Referenced by load_settings().
uint32_t Settings::worldmaptilesx |
Number of tiles wide the worldmap is.
Definition at line 295 of file global.h.
Referenced by command_loadtest(), and load_settings().
uint32_t Settings::worldmaptilesy |
Number of tiles high the worldmap is.
Definition at line 296 of file global.h.
Referenced by command_loadtest(), and load_settings().