6#ifndef MACRO_CONFIG_INT
7#error "The config macros must be defined"
8#define MACRO_CONFIG_INT(Name, ScriptName, Def, Min, Max, Save, Desc) ;
9#define MACRO_CONFIG_COL(Name, ScriptName, Def, Save, Desc) ;
10#define MACRO_CONFIG_STR(Name, ScriptName, Len, Def, Save, Desc) ;
25#if defined(CONF_PLATFORM_ANDROID)
113MACRO_CONFIG_INT(EdAutosaveInterval, ed_autosave_interval, 10, 0, 240,
CFGFLAG_CLIENT |
CFGFLAG_SAVE, "Interval in minutes at which a copy of the current editor map is automatically saved to the 'auto' folder (0
for off)")
119MACRO_CONFIG_INT(EdAlignQuads, ed_align_quads, 1, 0, 1,
CFGFLAG_CLIENT |
CFGFLAG_SAVE, "Enable/disable quad alignment. When enabled, red lines appear to show how quad/points are aligned and snapped to other quads/points when moving them")
120MACRO_CONFIG_INT(EdShowQuadsRect, ed_show_quads_rect, 0, 0, 1,
CFGFLAG_CLIENT |
CFGFLAG_SAVE, "Show the bounds of the selected quad. In case of multiple quads, it shows the bounds of the englobing rect. Can be helpful when aligning a group of quads")
135MACRO_CONFIG_STR(ClSkinCommunityDownloadUrl, cl_skin_community_download_url, 100, "https:
138MACRO_CONFIG_INT(ClDownloadCommunitySkins, cl_download_community_skins, 0, 0, 1,
CFGFLAG_CLIENT |
CFGFLAG_SAVE, "Allow to download skins created by the community. Uses cl_skin_community_download_url instead of cl_skin_download_url
for the download")
150MACRO_CONFIG_INT(ClPlayerDefaultEyes, player_default_eyes, 0, 0, 5,
CFGFLAG_CLIENT |
CFGFLAG_SAVE, "Player eyes when joining server. 0 = normal, 1 = pain, 2 = happy, 3 = surprise, 4 = angry, 5 = blink")
222MACRO_CONFIG_INT(ClDummyDefaultEyes, dummy_default_eyes, 0, 0, 5,
CFGFLAG_CLIENT |
CFGFLAG_SAVE, "Dummy eyes when joining server (0 = normal, 1 = pain, 2 = happy, 3 = surprise, 4 = angry, 5 = blink)")
243MACRO_CONFIG_INT(SvTournamentMode, sv_tournament_mode, 0, 0, 1,
CFGFLAG_SERVER, "Tournament mode. When enabled, players joins the server as spectator")
247MACRO_CONFIG_INT(SvInactiveKickTime, sv_inactivekick_time, 0, 0, 1000,
CFGFLAG_SERVER, "How many minutes to wait before taking care of inactive players")
248MACRO_CONFIG_INT(SvInactiveKick, sv_inactivekick, 0, 0, 2,
CFGFLAG_SERVER, "How to deal with inactive players (0=move to spectator, 1=move to free spectator slot/kick, 2=kick)")
252MACRO_CONFIG_INT(SvVoteSpectateRejoindelay, sv_vote_spectate_rejoindelay, 3, 0, 1000,
CFGFLAG_SERVER, "How many minutes to wait before a player can rejoin after being moved to spectators by vote")
255MACRO_CONFIG_INT(SvVoteKickBantime, sv_vote_kick_bantime, 5, 0, 1440,
CFGFLAG_SERVER, "The time in seconds to ban a player if kicked by vote. 0 makes it just use kick")
256MACRO_CONFIG_INT(SvJoinVoteDelay, sv_join_vote_delay, 300, 0, 1000,
CFGFLAG_SERVER, "Add a delay before recently joined players can call any vote or participate in a kick/spec vote (in seconds)")
271MACRO_CONFIG_INT(SvRescue, sv_rescue, 0, 0, 1,
CFGFLAG_SERVER, "Allow /rescue command so players can teleport themselves out of freeze (setting only works in initial config)")
273MACRO_CONFIG_INT(SvPractice, sv_practice, 1, 0, 1,
CFGFLAG_SERVER, "Enable practice mode
for teams. Means you can use /rescue, but in turn your rank doesn't count.")
280MACRO_CONFIG_INT(ClVideoShowDirection, cl_video_show_direction, 0, 0, 3,
CFGFLAG_CLIENT |
CFGFLAG_SAVE, "Show players' key presses when rendering video (1 = other players', 2 = also your own, 3 = only your own)")
282MACRO_CONFIG_INT(ClVideoX264Preset, cl_video_preset, 5, 0, 9,
CFGFLAG_CLIENT |
CFGFLAG_SAVE, "Set preset when encode video with libx264, default is 5 (medium), 0 is ultrafast, 9 is placebo (the slowest, not recommend)")
289MACRO_CONFIG_INT(DbgTuning, dbg_tuning, 0, 0, 2,
CFGFLAG_CLIENT,
"Display information about the tuning parameters that affect the own player (0 = off, 1 = show changed, 2 = show all)")
301MACRO_CONFIG_INT(Loglevel, loglevel, 0, -3, 2,
CFGFLAG_SAVE |
CFGFLAG_CLIENT |
CFGFLAG_SERVER, "Adjusts the amount of information in the logfile (-3 = none, -2 = error only, -1 = warn, 0 = info, 1 = debug, 2 = trace)")
302MACRO_CONFIG_INT(StdoutOutputLevel, stdout_output_level, 0, -3, 2,
CFGFLAG_SAVE |
CFGFLAG_CLIENT |
CFGFLAG_SERVER, "Adjusts the amount of information in the system console (-3 = none, -2 = error only, -1 = warn, 0 = info, 1 = debug, 2 = trace)")
303MACRO_CONFIG_INT(ConsoleOutputLevel, console_output_level, 0, -3, 2,
CFGFLAG_SAVE |
CFGFLAG_CLIENT |
CFGFLAG_SERVER, "Adjusts the amount of information in the local/remote console (-3 = none, -2 = error only, -1 = warn, 0 = info, 1 = debug, 2 = trace)")
312MACRO_CONFIG_INT(ClEditorMaxHistory, cl_editor_max_history, 50, 1, 500,
CFGFLAG_SAVE |
CFGFLAG_CLIENT, "Maximum number of undo actions in the editor history (not shared between editor, envelope editor and server settings editor)")
350MACRO_CONFIG_STR(BrLocation, br_location, 16, "auto",
CFGFLAG_SAVE |
CFGFLAG_CLIENT, "Override location
for ping estimation, available: auto, af, as, as:cn, eu, na, oc, sa (Automatic, Africa, Asia, China, Europe, North America, Oceania/Australia, South America")
351MACRO_CONFIG_STR(BrCachedBestServerinfoUrl, br_cached_best_serverinfo_url, 256, "",
CFGFLAG_SAVE |
CFGFLAG_CLIENT, "Do not set this variable, instead create a ddnet-serverlist-urls.cfg next to settings_ddnet.cfg to specify all possible serverlist URLs")
390#if !defined(CONF_PLATFORM_MACOS)
392#if !defined(CONF_WEBASM)
410MACRO_CONFIG_INT(GfxAsyncRenderOld, gfx_asyncrender_old, 1, 0, 1,
CFGFLAG_SAVE |
CFGFLAG_CLIENT, "During an update cycle, skip the render cycle, if the render cycle would need to wait
for the previous render cycle to finish")
416#if defined(CONF_FAMILY_WINDOWS)
430MACRO_CONFIG_INT(ClContactPort, cl_contact_port, 0, 0, 65535,
CFGFLAG_SAVE |
CFGFLAG_CLIENT, "Port to use
for serverinfo connections to server (0 to choose a random port, 1024 or higher to set a manual port, requires a restart)")
435MACRO_CONFIG_INT(SvPort, sv_port, 0, 0, 65535,
CFGFLAG_SERVER, "Port to use
for the server (Only ports 8303-8310 work in LAN server browser, 0 to automatically find a free port in 8303-8310)")
440MACRO_CONFIG_INT(SvHighBandwidth, sv_high_bandwidth, 0, 0, 1,
CFGFLAG_SERVER, "Use high bandwidth mode. Doubles the bandwidth required
for the server. LAN use only")
441MACRO_CONFIG_STR(SvRegister, sv_register, 16, "1",
CFGFLAG_SERVER, "Register server with master server
for public listing, can also accept a comma-separated list of protocols to register on, like 'ipv4,ipv6'")
442MACRO_CONFIG_STR(SvRegisterExtra, sv_register_extra, 256, "",
CFGFLAG_SERVER, "Extra headers to send to the register endpoint, comma separated 'Header: Value' pairs")
449MACRO_CONFIG_INT(SvRconBantime, sv_rcon_bantime, 5, 0, 1440,
CFGFLAG_SERVER, "The time a client gets banned if remote console authentication fails. 0 makes it just use kick")
452MACRO_CONFIG_INT(SvTeeHistorian, sv_tee_historian, 0, 0, 1,
CFGFLAG_SERVER, "Activate the tee historian that writes complete gameplay data to disk (WARNING: This will use a lot of disk space)")
459MACRO_CONFIG_STR(SvDnsblBanReason, sv_dnsbl_ban_reason, 128, "VPN detected, try connecting without. Contact admin if mistaken",
CFGFLAG_SERVER, "Ban reason
for 'sv_dnsbl_ban'")
465MACRO_CONFIG_INT(SvServerInfoPerSecond, sv_server_info_per_second, 50, 0, 10000,
CFGFLAG_SERVER, "Maximum number of complete server info responses that are sent out per second (0
for no limit)")
470MACRO_CONFIG_STR(EcBindaddr, ec_bindaddr, 128, "localhost",
CFGFLAG_ECON, "Address to bind the external console to. Anything but 'localhost' is dangerous")
472MACRO_CONFIG_STR(EcPassword, ec_password, 128, "",
CFGFLAG_ECON, "External console password. This option is required to be set
for econ to be enabled.")
473MACRO_CONFIG_INT(EcBantime, ec_bantime, 0, 0, 1440,
CFGFLAG_ECON, "The time a client gets banned if econ authentication fails. 0 just closes the connection")
474MACRO_CONFIG_INT(EcAuthTimeout, ec_auth_timeout, 30, 1, 120,
CFGFLAG_ECON, "Time in seconds before the the econ authentication times out")
475MACRO_CONFIG_INT(EcOutputLevel, ec_output_level, 0, -3, 2,
CFGFLAG_ECON, "Adjusts the amount of information in the external console (-3 = none, -2 = error only, -1 = warn, 0 = info, 1 = debug, 2 = trace)")
481MACRO_CONFIG_INT(DbgGfx, dbg_gfx, 0, 0, 4,
CFGFLAG_CLIENT, "Show graphic library warnings and errors, if the GPU supports it (0: none, 1: minimal, 2: affects performance, 3: verbose, 4: all)")
493MACRO_CONFIG_INT(SvReservedSlotsAuthLevel, sv_reserved_slots_auth_level, 1, 1, 4,
CFGFLAG_SERVER, "Minimum rcon auth level needed to use a reserved slot. 4 = rcon auth disabled")
496MACRO_CONFIG_INT(SvTestingCommands, sv_test_cmds, 0, 0, 1,
CFGFLAG_SERVER, "Turns testing commands aka cheats on/off (setting only works in initial config)")
497MACRO_CONFIG_INT(SvFreezeDelay, sv_freeze_delay, 3, 1, 30,
CFGFLAG_SERVER |
CFGFLAG_GAME, "How many seconds the players will remain frozen (applies to all except delayed freeze in switch layer & deepfreeze)")
510MACRO_CONFIG_INT(SvEmotionalTees, sv_emotional_tees, 1, -1, 1,
CFGFLAG_SERVER, "Whether eye change of tees is enabled with emoticons = 1, not = 0, -1 not at all")
511MACRO_CONFIG_INT(SvEmoticonMsDelay, sv_emoticon_ms_delay, 3000, 20, 999999999,
CFGFLAG_SERVER, "The time in ms a player has to wait before allowing the next over-head emoticons")
512MACRO_CONFIG_INT(SvGlobalEmoticonMsDelay, sv_global_emoticon_ms_delay, 3000, 20, 999999999,
CFGFLAG_SERVER, "The time in ms a player has to wait before allowing the next over-head emoticons that is send to all clients (this config must be higher or equal to sv_emoticon_ms_delay to have an effect)")
516MACRO_CONFIG_INT(SvTeamChangeDelay, sv_team_change_delay, 3, 0, 9999,
CFGFLAG_SERVER, "The time in seconds between team changes (spectator/in game)")
517MACRO_CONFIG_INT(SvInfoChangeDelay, sv_info_change_delay, 5, 0, 9999,
CFGFLAG_SERVER, "The time in seconds between info changes (name/skin/color), to avoid ranbow mod set this to a very high time")
522MACRO_CONFIG_INT(SvVoteYesPercentage, sv_vote_yes_percentage, 50, 1, 99,
CFGFLAG_SERVER, "More than this percentage of players need to agree
for a vote to succeed")
523MACRO_CONFIG_INT(SvVoteMajority, sv_vote_majority, 0, 0, 1,
CFGFLAG_SERVER, "Whether non-voting players are considered as votes
for \"no\" (0) or are ignored (1)")
525MACRO_CONFIG_INT(SvVoteVetoTime, sv_vote_veto_time, 20, 0, 1000,
CFGFLAG_SERVER, "Minutes of time on a server until a player can veto map change votes (0 = disabled)")
541MACRO_CONFIG_INT(SvUseSql, sv_use_sql, 0, 0, 1,
CFGFLAG_SERVER, "Enables MySQL backend instead of SQLite backend (sv_sqlite_file is still used as fallback write server when no MySQL server is reachable)")
543MACRO_CONFIG_STR(SvSqliteFile, sv_sqlite_file, 64, "ddnet-server.sqlite",
CFGFLAG_SERVER, "File to store ranks in case sv_use_sql is turned off or used as backup sql server")
545#if defined(CONF_UPNP)
567MACRO_CONFIG_INT(SvAnnouncementInterval, sv_announcement_interval, 120, 1, 9999,
CFGFLAG_SERVER, "The time (minutes)
for how often an announcement will be displayed from the announcement file")
570MACRO_CONFIG_INT(SvOldLaser, sv_old_laser, 0, 0, 1,
CFGFLAG_SERVER |
CFGFLAG_GAME, "Whether lasers can hit you if you shot them and that they pull you towards the bounce origin (0
for all new maps) or lasers can't hit you if you shot them, and they pull others towards the shooter")
572MACRO_CONFIG_INT(SvRejoinTeam0, sv_rejoin_team_0, 1, 0, 1,
CFGFLAG_SERVER, "Make a team automatically rejoin team 0 after finish (only if not locked)")
640MACRO_CONFIG_INT(SvVotePauseTime, sv_vote_pause_time, 10, 0, 360,
CFGFLAG_SERVER, "The time (in seconds) players have to wait in pause when paused by vote")
642MACRO_CONFIG_STR(SvResetFile, sv_reset_file, 128, "reset.cfg",
CFGFLAG_SERVER, "File to execute on map change or reload to set the default server settings")
644MACRO_CONFIG_INT(SvDDRaceTuneReset, sv_ddrace_tune_reset, 1, 0, 1,
CFGFLAG_SERVER, "Whether DDRace tuning (sv_hit, sv_endless_drag and sv_old_laser) is reset after each map change or not")
647MACRO_CONFIG_INT(SvDefaultTimerType, sv_default_timer_type, 0, 0, 3,
CFGFLAG_SERVER, "Default way of displaying time either game/round timer or broadcast. 0 = game/round timer, 1 = broadcast, 2 = 0+1, 3 = none")
651MACRO_CONFIG_INT(SvChatPenalty, sv_chat_penalty, 250, 50, 1000,
CFGFLAG_SERVER, "chat score will be increased by this on every message, and decremented by 1 on every tick.")
652MACRO_CONFIG_INT(SvChatThreshold, sv_chat_threshold, 1000, 50, 10000,
CFGFLAG_SERVER, "if chats score exceeds this, the player will be muted
for sv_spam_mute_duration seconds")
653MACRO_CONFIG_INT(SvSpamMuteDuration, sv_spam_mute_duration, 60, 0, 3600,
CFGFLAG_SERVER, "how many seconds to mute, if player triggers mute on spam. 0 = off")
656MACRO_CONFIG_INT(SvReloadWhenEmpty, sv_reload_when_empty, 0, 0, 2,
CFGFLAG_SERVER, "Reload map when server is empty (1 = reload once, 2 = reload every time server gets empty)")
659MACRO_CONFIG_STR(SvClientSuggestion, sv_client_suggestion, 128, "Get DDNet client from DDNet.org to use all features on DDNet!",
CFGFLAG_SERVER, "Broadcast to display to players without DDNet client")
660MACRO_CONFIG_STR(SvClientSuggestionOld, sv_client_suggestion_old, 128, "Your DDNet client is old, update it on DDNet.org!",
CFGFLAG_SERVER, "Broadcast to display to players with an old version of DDNet client")
661MACRO_CONFIG_STR(SvClientSuggestionBot, sv_client_suggestion_bot, 128, "Your client has bots and can be remotely controlled!\nPlease use another client like DDNet client from DDNet.org",
CFGFLAG_SERVER, "Broadcast to display to players with a known botting client")
671#if defined(CONF_FAMILY_UNIX)
697MACRO_CONFIG_INT(ClConfirmDisconnectTime, cl_confirm_disconnect_time, 20, -1, 1440,
CFGFLAG_SAVE |
CFGFLAG_CLIENT, "Confirmation popup before disconnecting after game time (in minutes, -1 to turn off, 0 to always turn on)")
713#if !defined(CONF_ARCH_IA32) && !defined(CONF_PLATFORM_MACOS)
715#elif !defined(CONF_ARCH_IA32)
720#if !defined(CONF_PLATFORM_MACOS)
735#if defined(CONF_PLATFORM_ANDROID)
737#elif !defined(CONF_ARCH_IA32) && !defined(CONF_PLATFORM_MACOS)
742MACRO_CONFIG_INT(GfxRenderThreadCount, gfx_render_thread_count, 3, 0, 0,
CFGFLAG_SAVE |
CFGFLAG_CLIENT,
"Number of threads the backend can use for rendering. (note: the value can be ignored by the backend)")
#define MACRO_CONFIG_STR(Name, ScriptName, Len, Def, Save, Desc)
Definition: config_variables.h:10
#define MACRO_CONFIG_INT(Name, ScriptName, Def, Min, Max, Save, Desc)
Definition: config_variables.h:8
#define MACRO_CONFIG_COL(Name, ScriptName, Def, Save, Desc)
Definition: config_variables.h:9
Write
Definition: connection_pool.h:35
void Run(unsigned short Port, NETADDR Dest)
Definition: crapnet.cpp:49
@ SERVERINFO_LEVEL_MIN
Definition: protocol.h:83
@ SERVERINFO_LEVEL_MAX
Definition: protocol.h:84
@ MAX_CLIENTS
Definition: protocol.h:88
static SHA256_DIGEST s(const char *pSha256)
Definition: mapbugs.cpp:37
constexpr T minimum(T a, T b)
Definition: math.h:135
constexpr T absolute(T a)
Definition: math.h:155
Definition: protocol7.h:8
@ MAX_SKIN_ARRAY_SIZE
Definition: protocol7.h:64
for(tick=client_tick()+1;tick<=client_predtick();tick++) >
Definition: prediction.txt:12
@ CFGFLAG_COLLIGHT
Definition: config.h:56
@ CFGFLAG_CLIENT
Definition: config.h:45
@ CFGFLAG_SERVER
Definition: config.h:46
@ CFGFLAG_SAVE
Definition: config.h:44
@ CFGFLAG_ECON
Definition: config.h:49
@ CFGFLAG_GAME
Definition: config.h:54
@ CFGFLAG_MASTER
Definition: config.h:48
@ CFGFLAG_NONTEEHISTORIC
Definition: config.h:55
@ CFGFLAG_COLALPHA
Definition: config.h:58
@ CFGFLAG_INSENSITIVE
Definition: config.h:59
@ CFGFLAG_COLLIGHT7
Definition: config.h:57
@ IO_MAX_PATH_LENGTH
Definition: types.h:43
float length(const vector2_base< float > &a)
Definition: vmath.h:104
T distance(const vector2_base< T > a, const vector2_base< T > &b)
Definition: vmath.h:93