Crossfire Server, Trunk
Settings Struct Reference

#include <global.h>

+ Collaboration diagram for Settings:

Public Member Functions

void add_hook (const char *name, collectorHook hook)
 

Data Fields

uint8_t account_block_create
 
char * account_trusted_host
 
int allow_broken_converters
 
int allow_denied_spells_writing
 
uint8_t always_show_hp
 
int armor_max_enchant
 
int armor_speed_improvement
 
uint8_t armor_speed_linear
 
uint8_t armor_weight_linear
 
int armor_weight_reduction
 
class AssetsTrackerassets_tracker
 
uint8_t balanced_stat_loss
 
uint8_t casting_time
 
const char * confdir
 
uint8_t create_home_portals
 
uint8_t crypt_mode
 
uint16_t csport
 
const char * datadir
 
uint8_t death_penalty_level
 
uint8_t death_penalty_ratio
 
LogLevel debug
 
std::vector< char * > disabled_plugins
 
const char * dumparg
 
uint8_t dumpvalues
 
char * emergency_mapname
 
uint16_t emergency_x
 
uint16_t emergency_y
 
uint8_t fastclock
 
fatalHook fatal_hook
 
collectorHook hooks [20]
 
uint8_t hooks_count
 
const char * hooks_filename [20]
 
int ignore_assets_errors
 
uint8_t ignore_plugin_compatibility
 
float item_power_factor
 
const char * localdir
 
logHook log_callback
 
int log_timestamp
 
char * log_timestamp_format
 
const char * logfilename
 
const char * mapdir
 
int16_t max_level
 
uint8_t max_stat
 
char meta_comment [MAX_BUF]
 
char meta_host [MAX_BUF]
 
unsigned int meta_on:1
 
uint16_t meta_port
 
char meta_server [MAX_BUF]
 
uint8_t min_name
 
const char * motd
 
const char * news
 
uint8_t no_player_stealing
 
uint8_t not_permadeth
 
uint8_t permanent_exp_ratio
 
uint8_t personalized_blessings
 
int16_t pk_luck_penalty
 
int64_t pk_max_experience
 
int pk_max_experience_percent
 
const char * playerdir
 
uint8_t real_wiz
 
uint8_t recycle_tmp_maps
 
const char * regions
 
int reset_loc_time
 
uint8_t resurrection
 
uint8_t roll_stat_points
 
const char * rules
 
uint8_t search_items
 
uint16_t set_friendly_fire
 
uint8_t set_title
 
uint8_t simple_exp
 
uint8_t special_break_map
 
uint8_t spell_encumbrance
 
uint8_t spell_failure_effects
 
uint8_t spellpoint_level_depend
 
uint8_t starting_stat_max
 
uint8_t starting_stat_min
 
uint8_t starting_stat_points
 
char * stat_file
 
uint8_t stat_loss_on_death
 
const char * templatedir
 
const char * tmpdir
 
const char * uniquedir
 
char who_format [MAX_BUF]
 
char who_wiz_format [MAX_BUF]
 
uint32_t worldmapstartx
 
uint32_t worldmapstarty
 
uint32_t worldmaptilesizex
 
uint32_t worldmaptilesizey
 
uint32_t worldmaptilesx
 
uint32_t worldmaptilesy
 

Detailed Description

Server settings.

Definition at line 240 of file global.h.

Member Function Documentation

◆ add_hook()

void Settings::add_hook ( const char *  name,
collectorHook  hook 
)
inline

Definition at line 340 of file global.h.

References hooks, hooks_count, hooks_filename, and give::name.

Referenced by add_server_collect_hooks(), cfcitybell_init(), citylife_init(), and ResourcesManager::load().

+ Here is the caller graph for this function:

Field Documentation

◆ account_block_create

uint8_t Settings::account_block_create

Definition at line 328 of file global.h.

Referenced by account_block_create(), and load_settings().

◆ account_trusted_host

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 329 of file global.h.

Referenced by account_block_create(), and load_settings().

◆ allow_broken_converters

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 316 of file global.h.

Referenced by do_item_conversion(), and load_settings().

◆ allow_denied_spells_writing

int Settings::allow_denied_spells_writing

If set, players can write spells they can't cast.

Definition at line 315 of file global.h.

Referenced by command_settings(), load_settings(), and write_scroll().

◆ always_show_hp

uint8_t Settings::always_show_hp

'probe' spell HP bars for all living things (0, 1, or 2)

Definition at line 273 of file global.h.

Referenced by check_probe(), and load_settings().

◆ armor_max_enchant

int Settings::armor_max_enchant

Maximum number of times an armor can be enchanted

Definition at line 305 of file global.h.

Referenced by improve_armour(), and load_settings().

◆ armor_speed_improvement

int Settings::armor_speed_improvement

Speed improvement

Definition at line 308 of file global.h.

Referenced by load_settings(), and set_abs_magic().

◆ armor_speed_linear

uint8_t Settings::armor_speed_linear

If 1, speed improvement is linear, else exponantiel

Definition at line 309 of file global.h.

Referenced by load_settings(), and set_abs_magic().

◆ armor_weight_linear

uint8_t Settings::armor_weight_linear

If 1, weight reduction is linear, else exponantiel

Definition at line 307 of file global.h.

Referenced by load_settings(), and set_abs_magic().

◆ armor_weight_reduction

int Settings::armor_weight_reduction

Weight reduction per enchantment

Definition at line 306 of file global.h.

Referenced by load_settings(), and set_abs_magic().

◆ assets_tracker

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(), and ResourcesManager::load().

◆ balanced_stat_loss

uint8_t Settings::balanced_stat_loss

If true, Death stat depletion based on level etc

Definition at line 261 of file global.h.

Referenced by kill_player_not_permadeath(), and load_settings().

◆ casting_time

uint8_t Settings::casting_time

It takes awhile to cast a spell

Definition at line 270 of file global.h.

Referenced by attack_ob_simple(), cast_spell(), command_settings(), load_settings(), object_clear(), process_events(), process_players1(), and rangetostring().

◆ confdir

◆ create_home_portals

uint8_t Settings::create_home_portals

If 1, can create portals in unique maps (apartments)

Definition at line 311 of file global.h.

Referenced by cast_create_town_portal(), command_settings(), and load_settings().

◆ crypt_mode

uint8_t Settings::crypt_mode

0 for legacy behavior, 1 for always Traditional

Definition at line 330 of file global.h.

Referenced by crypt_string(), and load_settings().

◆ csport

uint16_t Settings::csport

Port for new client/server

Definition at line 242 of file global.h.

Referenced by init_server(), metaserver2_init(), and set_csport().

◆ datadir

◆ death_penalty_level

uint8_t Settings::death_penalty_level

How many levels worth of exp may be lost on one death

Definition at line 260 of file global.h.

Referenced by apply_death_exp_penalty(), command_settings(), and load_settings().

◆ death_penalty_ratio

uint8_t Settings::death_penalty_ratio

Hhow much exp should be lost at death

Definition at line 259 of file global.h.

Referenced by apply_death_exp_penalty(), command_settings(), and load_settings().

◆ debug

LogLevel Settings::debug

Default debugging level

Definition at line 243 of file global.h.

Referenced by command_debug(), LOG(), main(), set_debug(), set_mondebug(), setup(), and unset_debug().

◆ disabled_plugins

std::vector<char *> Settings::disabled_plugins

List of disabled plugins, 'All' means all.

Definition at line 326 of file global.h.

Referenced by cfcitybell_init(), citylife_init(), free_server(), initPlugins(), random_house_generator_init(), and set_disable_plugin().

◆ dumparg

const char* Settings::dumparg

Additional argument for some dump functions

Definition at line 246 of file global.h.

Referenced by init_beforeplay(), and set_dumpmont().

◆ dumpvalues

uint8_t Settings::dumpvalues

◆ emergency_mapname

char* Settings::emergency_mapname

Map to return players to in emergency

Definition at line 299 of file global.h.

Referenced by enter_player_maplevel(), enter_player_savebed(), free_globals(), init_emergency_mappath(), kill_player_permadeath(), and save_player().

◆ emergency_x

uint16_t Settings::emergency_x

◆ emergency_y

uint16_t Settings::emergency_y

Coordinates to use on that map

Definition at line 300 of file global.h.

Referenced by enter_player_maplevel(), enter_player_savebed(), init_emergency_mappath(), and kill_player_permadeath().

◆ fastclock

uint8_t Settings::fastclock

If true, clock goes warp 9

Definition at line 297 of file global.h.

Referenced by load_settings().

◆ fatal_hook

fatalHook Settings::fatal_hook

If not NULL then called when fatal() is called.

Definition at line 337 of file global.h.

Referenced by fatal(), and ResourcesManager::load().

◆ hooks

collectorHook Settings::hooks[20]

Collect hooks, called when the filename matches.

Definition at line 334 of file global.h.

Referenced by add_hook(), and assets_collect().

◆ hooks_count

uint8_t Settings::hooks_count

Number of items in hooks_filename and hooks.

Definition at line 332 of file global.h.

Referenced by add_hook(), and assets_collect().

◆ hooks_filename

const char* Settings::hooks_filename[20]

Filenames to process for each hook.

Definition at line 333 of file global.h.

Referenced by add_hook(), and assets_collect().

◆ ignore_assets_errors

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(), ResourcesManager::load(), and set_ignore_assets_errors().

◆ ignore_plugin_compatibility

uint8_t Settings::ignore_plugin_compatibility

If set, don't check plugin version.

Definition at line 327 of file global.h.

Referenced by load_settings(), and plugins_init_plugin().

◆ item_power_factor

float Settings::item_power_factor

See note in setings file

Definition at line 303 of file global.h.

Referenced by apply_check_item_power(), command_settings(), improve_armour(), improve_weapon(), and load_settings().

◆ localdir

◆ log_callback

logHook Settings::log_callback

Log hook, to intercept log messages.

Definition at line 244 of file global.h.

Referenced by ResourcesManager::load(), and LOG().

◆ log_timestamp

int Settings::log_timestamp

If set, log will comport a timestamp.

Definition at line 318 of file global.h.

Referenced by load_settings(), and LOG().

◆ log_timestamp_format

char* Settings::log_timestamp_format

Format for timestap, if log_timestamp is set.

Definition at line 319 of file global.h.

Referenced by load_settings(), and LOG().

◆ logfilename

const char* Settings::logfilename

Logfile to use

Definition at line 241 of file global.h.

Referenced by cctk_setlog(), init_globals(), LOG(), main(), and set_logfile().

◆ mapdir

◆ max_level

◆ max_stat

◆ meta_comment

char Settings::meta_comment[MAX_BUF]

Comment we send to the metaserver

Definition at line 289 of file global.h.

Referenced by load_settings().

◆ meta_host

char Settings::meta_host[MAX_BUF]

Hostname of this host

Definition at line 287 of file global.h.

Referenced by load_settings().

◆ meta_on

unsigned int Settings::meta_on

True if we should send updates

Definition at line 285 of file global.h.

Referenced by load_settings().

◆ meta_port

uint16_t Settings::meta_port

Port number to use for updates

Definition at line 288 of file global.h.

Referenced by load_settings().

◆ meta_server

char Settings::meta_server[MAX_BUF]

Hostname/ip addr of the metaserver

Definition at line 286 of file global.h.

Referenced by load_settings().

◆ min_name

uint8_t Settings::min_name

Minimum characters for an account or player name

Definition at line 331 of file global.h.

Referenced by account_new_cmd(), create_player_cmd(), and load_settings().

◆ motd

const char* Settings::motd

Name of the motd file

Definition at line 278 of file global.h.

Referenced by display_motd(), load_settings(), and send_file().

◆ news

const char* Settings::news

Name of news file

Definition at line 280 of file global.h.

Referenced by send_file(), and send_news().

◆ no_player_stealing

uint8_t Settings::no_player_stealing

If 1, can not steal from other players

Definition at line 310 of file global.h.

Referenced by attempt_steal(), command_settings(), and load_settings().

◆ not_permadeth

uint8_t Settings::not_permadeth

If true, death is non-permament

Definition at line 262 of file global.h.

Referenced by command_settings(), kill_player(), and load_settings().

◆ permanent_exp_ratio

uint8_t Settings::permanent_exp_ratio

How much exp should be 'permenant' and unable to be lost

Definition at line 258 of file global.h.

Referenced by add_player_exp(), calc_perm_exp(), check_exp_loss(), command_settings(), load_settings(), show_skills(), and while().

◆ personalized_blessings

uint8_t Settings::personalized_blessings

If 1, blessed weapons get an owner and a willpower value

Definition at line 312 of file global.h.

Referenced by apply_check_personalized_blessings(), god_enchants_weapon(), and load_settings().

◆ pk_luck_penalty

int16_t Settings::pk_luck_penalty

Amount by which player luck is reduced if they PK

Definition at line 257 of file global.h.

Referenced by kill_object(), and load_settings().

◆ pk_max_experience

int64_t Settings::pk_max_experience

Maximum experience one can get for PKing. Ignore if negative.

Definition at line 313 of file global.h.

Referenced by kill_object(), and load_settings().

◆ pk_max_experience_percent

int Settings::pk_max_experience_percent

Percentage of experience of victim the killer gets.

Definition at line 314 of file global.h.

Referenced by kill_object(), and load_settings().

◆ playerdir

◆ real_wiz

uint8_t Settings::real_wiz

◆ recycle_tmp_maps

uint8_t Settings::recycle_tmp_maps

Re-use tmp maps.

Definition at line 272 of file global.h.

Referenced by clean_tmp_files(), load_settings(), and swap_map().

◆ regions

const char* Settings::regions

Name of the regions file - libdir is prepended

Definition at line 252 of file global.h.

Referenced by set_regions().

◆ reset_loc_time

int Settings::reset_loc_time

Number of seconds to put player back at home

Definition at line 264 of file global.h.

Referenced by check_login().

◆ resurrection

uint8_t Settings::resurrection

Ressurection possible w/ permadeth on

Definition at line 266 of file global.h.

Referenced by command_settings(), kill_player_permadeath(), and load_settings().

◆ roll_stat_points

uint8_t Settings::roll_stat_points

How many stat points legacy (rolled) chars start with

Definition at line 323 of file global.h.

Referenced by load_settings(), and roll_stats().

◆ rules

const char* Settings::rules

Name of rules file

Definition at line 279 of file global.h.

Referenced by send_file(), and send_rules().

◆ search_items

uint8_t Settings::search_items

Search_items command

Definition at line 267 of file global.h.

Referenced by check_login(), check_pick(), command_search_items(), fix_player(), and load_settings().

◆ set_friendly_fire

uint16_t Settings::set_friendly_fire

Percent of damage done by peaceful player vs player damage

Definition at line 275 of file global.h.

Referenced by command_settings(), hit_player(), and load_settings().

◆ set_title

uint8_t Settings::set_title

Players can set thier title

Definition at line 265 of file global.h.

Referenced by check_login(), command_settings(), command_title(), key_confirm_quit(), kill_player_permadeath(), load_settings(), and save_player().

◆ simple_exp

uint8_t Settings::simple_exp

If true, use the simple experience system

Definition at line 263 of file global.h.

Referenced by calc_skill_exp(), kill_object(), and load_settings().

◆ special_break_map

uint8_t Settings::special_break_map

If set, then submaps in random maps can break the walls.

Definition at line 325 of file global.h.

Referenced by find_spot_for_submap(), and load_settings().

◆ spell_encumbrance

uint8_t Settings::spell_encumbrance

Encumbrance effects spells

Definition at line 268 of file global.h.

Referenced by command_settings(), fix_object(), and load_settings().

◆ spell_failure_effects

uint8_t Settings::spell_failure_effects

Nasty backlash to spell failures

Definition at line 269 of file global.h.

Referenced by cast_spell(), command_settings(), load_settings(), scroll_failure(), scroll_type_apply(), spell_failure(), and spellbook_type_apply().

◆ spellpoint_level_depend

uint8_t Settings::spellpoint_level_depend

Spell costs go up with level

Definition at line 274 of file global.h.

Referenced by load_settings(), and SP_level_spellpoint_cost().

◆ starting_stat_max

uint8_t Settings::starting_stat_max

Maximum value of a starting stat

Definition at line 321 of file global.h.

Referenced by create_player_cmd(), load_settings(), and send_new_char_info().

◆ starting_stat_min

uint8_t Settings::starting_stat_min

Minimum value of a starting stat

Definition at line 320 of file global.h.

Referenced by create_player_cmd(), load_settings(), and send_new_char_info().

◆ starting_stat_points

uint8_t Settings::starting_stat_points

How many stat points character starts with

Definition at line 322 of file global.h.

Referenced by create_player_cmd(), load_settings(), and send_new_char_info().

◆ stat_file

char* Settings::stat_file

Definition at line 338 of file global.h.

Referenced by load_settings().

◆ stat_loss_on_death

uint8_t Settings::stat_loss_on_death

If true, chars lose a random stat when they die

Definition at line 256 of file global.h.

Referenced by kill_player_not_permadeath(), and load_settings().

◆ templatedir

const char* Settings::templatedir

Directory for the template map

Definition at line 254 of file global.h.

Referenced by create_template_pathname(), init_environ(), and set_templatedir().

◆ tmpdir

const char* Settings::tmpdir

Directory to use for temporary files

Definition at line 255 of file global.h.

Referenced by cfapi_system_directory(), init_environ(), main(), save_map(), save_player(), and set_tmpdir().

◆ uniquedir

const char* Settings::uniquedir

Directory for the unique items

Definition at line 253 of file global.h.

Referenced by cfapi_system_directory(), create_items_path(), init_environ(), and set_uniquedir().

◆ who_format

char Settings::who_format[MAX_BUF]

The format that the who command should use

Definition at line 276 of file global.h.

Referenced by list_players(), and load_settings().

◆ who_wiz_format

char Settings::who_wiz_format[MAX_BUF]

The format that the who command should use when called by a dm

Definition at line 277 of file global.h.

Referenced by list_players(), and load_settings().

◆ worldmapstartx

uint32_t Settings::worldmapstartx

Starting x tile for the worldmap

Definition at line 291 of file global.h.

Referenced by command_loadtest(), and load_settings().

◆ worldmapstarty

uint32_t Settings::worldmapstarty

Starting y tile for the worldmap

Definition at line 292 of file global.h.

Referenced by command_loadtest(), and load_settings().

◆ worldmaptilesizex

uint32_t Settings::worldmaptilesizex

Number of squares wide in a wm tile

Definition at line 295 of file global.h.

Referenced by load_settings().

◆ worldmaptilesizey

uint32_t Settings::worldmaptilesizey

Number of squares high in a wm tile

Definition at line 296 of file global.h.

Referenced by load_settings().

◆ worldmaptilesx

uint32_t Settings::worldmaptilesx

Number of tiles wide the worldmap is

Definition at line 293 of file global.h.

Referenced by command_loadtest(), and load_settings().

◆ worldmaptilesy

uint32_t Settings::worldmaptilesy

Number of tiles high the worldmap is

Definition at line 294 of file global.h.

Referenced by command_loadtest(), and load_settings().


The documentation for this struct was generated from the following file: