6#ifndef MACRO_CONFIG_INT
7#error "The config macros must be defined"
9#define MACRO_CONFIG_INT(Name, ScriptName, Def, Min, Max, Save, Desc)
10#define MACRO_CONFIG_COL(Name, ScriptName, Def, Save, Desc)
11#define MACRO_CONFIG_STR(Name, ScriptName, Len, Def, Save, Desc)
28#if defined(CONF_PLATFORM_ANDROID)
96MACRO_CONFIG_INT(ClSpecAutoSync, cl_spec_auto_sync, 0, 0, 1,
CFGFLAG_CLIENT |
CFGFLAG_SAVE,
"Automatically synchronize with spectating players's camera setting if available (0 = disable, 1 = enable on reset zoom)")
124MACRO_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)")
130MACRO_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")
131MACRO_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")
141MACRO_CONFIG_INT(ClMapDownloadConnectTimeoutMs, cl_map_download_connect_timeout_ms, 2000, 0, 100000,
CFGFLAG_CLIENT |
CFGFLAG_SAVE,
"HTTP map downloads: timeout for the connect phase in milliseconds (0 to disable)")
148#if defined(CONF_ARCH_IA32)
157MACRO_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")
170MACRO_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")
246MACRO_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)")
267MACRO_CONFIG_INT(SvTournamentMode, sv_tournament_mode, 0, 0, 1,
CFGFLAG_SERVER,
"Tournament mode. When enabled, players joins the server as spectator")
268MACRO_CONFIG_INT(SvSpamprotection, sv_spamprotection, 1, 0, 1,
CFGFLAG_SERVER,
"Spam protection for: team change, chat, skin change, emotes and votes")
271MACRO_CONFIG_INT(SvInactiveKickTime, sv_inactivekick_time, 0, 0, 1000,
CFGFLAG_SERVER,
"How many minutes to wait before taking care of inactive players")
272MACRO_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)")
276MACRO_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")
279MACRO_CONFIG_INT(SvVoteKickBantime, sv_vote_kick_bantime, 5, 0, 1440,
CFGFLAG_SERVER,
"The time in minutes to ban a player if kicked by vote. 0 makes it just use kick")
280MACRO_CONFIG_INT(SvVoteKickMuteTime, sv_vote_kick_mutetime, 300, 0, 86400,
CFGFLAG_SERVER,
"The time in seconds to mute a player if they are voted from a different team. 0 disables muting")
281MACRO_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)")
296MACRO_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)")
298MACRO_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.")
299MACRO_CONFIG_INT(SvPracticeByDefault, sv_practice_by_default, 0, 0, 1,
CFGFLAG_SERVER,
"Enable use of practice commands by default. Requires sv_test_cmds 1.")
306MACRO_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)")
309MACRO_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)")
316MACRO_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)")
328MACRO_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)")
329MACRO_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)")
330MACRO_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)")
338MACRO_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)")
341MACRO_CONFIG_INT(ClAutoDemoOnConnect, cl_auto_demo_on_connect, 0, 0, 1,
CFGFLAG_SAVE |
CFGFLAG_CLIENT,
"If 1, start recording a demo automatically only once when connecting. If 0, also restart automatic demo recording after every game over")
376MACRO_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")
377MACRO_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")
416#if !defined(CONF_PLATFORM_MACOS)
418#if !defined(CONF_PLATFORM_EMSCRIPTEN)
435MACRO_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")
441#if defined(CONF_FAMILY_WINDOWS)
455MACRO_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)")
460MACRO_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). See sv_register_port for the external port if you're behind NAT")
465MACRO_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")
466MACRO_CONFIG_INT(SvPreInput, sv_preinput, 1, 0, 1,
CFGFLAG_SERVER,
"Sends client inputs to other clients before their correct tick. Increases the bandwidth required for the server")
467MACRO_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'")
468MACRO_CONFIG_STR(SvRegisterExtra, sv_register_extra, 256,
"",
CFGFLAG_SERVER,
"Extra headers to send to the register endpoint, comma-separated 'Header: Value' pairs")
469MACRO_CONFIG_STR(SvRegisterUrl, sv_register_url, 128,
"https://master1.ddnet.org/ddnet/15/register",
CFGFLAG_SERVER,
"Masterserver URL to register to")
470MACRO_CONFIG_INT(SvRegisterPort, sv_register_port, 0, 0, 65535,
CFGFLAG_SERVER,
"Port for the master server to register the server with, useful if you are behind NAT, otherwise you only need sv_port")
471MACRO_CONFIG_STR(SvRegisterCommunityToken, sv_register_community_token, 128,
"",
CFGFLAG_SERVER,
"Token to register this server to a particular community")
479MACRO_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")
482MACRO_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)")
489MACRO_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'")
493MACRO_CONFIG_INT(SvPlayerDemoRecord, sv_player_demo_record, 0, 0, 1,
CFGFLAG_SERVER,
"Automatically record a demo when a player sets a new personal best time.")
495MACRO_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)")
500MACRO_CONFIG_STR(EcBindaddr, ec_bindaddr, 128,
"localhost",
CFGFLAG_ECON,
"Address to bind the external console to. Anything but 'localhost' is dangerous")
502MACRO_CONFIG_STR(EcPassword, ec_password, 128,
"",
CFGFLAG_ECON,
"External console password. This option is required to be set for econ to be enabled.")
503MACRO_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")
504MACRO_CONFIG_INT(EcAuthTimeout, ec_auth_timeout, 30, 1, 120,
CFGFLAG_ECON,
"Time in seconds before the the econ authentication times out")
505MACRO_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)")
511MACRO_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)")
527MACRO_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")
530MACRO_CONFIG_INT(SvTestingCommands, sv_test_cmds, 0, 0, 1,
CFGFLAG_SERVER,
"Turns testing commands aka cheats on/off (setting only works in initial config)")
531MACRO_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)")
544MACRO_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")
545MACRO_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")
546MACRO_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)")
550MACRO_CONFIG_INT(SvTeamChangeDelay, sv_team_change_delay, 3, 0, 9999,
CFGFLAG_SERVER,
"The time in seconds between team changes (spectator/in game)")
551MACRO_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")
556MACRO_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")
557MACRO_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)")
559MACRO_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)")
570MACRO_CONFIG_INT(SvSaveSwapGamesDelay, sv_saveswapgames_delay, 30, 0, 10000,
CFGFLAG_SERVER,
"Delay in seconds for loading a savegame or before swapping")
571MACRO_CONFIG_INT(SvSaveSwapGamesPenalty, sv_saveswapgames_penalty, 60, 0, 10000,
CFGFLAG_SERVER,
"Penalty in seconds for saving or swapping position")
575MACRO_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)")
577MACRO_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")
579#if defined(CONF_UPNP)
601MACRO_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")
604MACRO_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")
605MACRO_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)")
676MACRO_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")
678MACRO_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")
679MACRO_CONFIG_STR(SvInputFifo, sv_input_fifo, 128,
"",
CFGFLAG_SERVER,
"Fifo file (non-Windows) or Named Pipe (Windows) to use as input for server console")
680MACRO_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")
683MACRO_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")
687MACRO_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.")
688MACRO_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")
689MACRO_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")
692MACRO_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)")
695MACRO_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")
696MACRO_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")
697MACRO_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")
707#if defined(CONF_FAMILY_UNIX)
734MACRO_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)")
750#if !defined(CONF_ARCH_IA32) && !defined(CONF_PLATFORM_MACOS)
752#elif !defined(CONF_ARCH_IA32)
757#if !defined(CONF_PLATFORM_MACOS)
772#if defined(CONF_PLATFORM_ANDROID)
774#elif defined(CONF_PLATFORM_EMSCRIPTEN)
776#elif !defined(CONF_ARCH_IA32) && !defined(CONF_PLATFORM_MACOS)
781MACRO_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_INT(Name, ScriptName, Def, Min, Max, Flags, Desc)
#define MACRO_CONFIG_STR(Name, ScriptName, Len, Def, Flags, Desc)
#define MACRO_CONFIG_COL(Name, ScriptName, Def, Flags, Desc)
#define MACRO_CONFIG_STR(Name, ScriptName, Len, Def, Save, Desc)
Definition config_variables.h:11
#define MACRO_CONFIG_INT(Name, ScriptName, Def, Min, Max, Save, Desc)
Definition config_variables.h:9
@ SERVERINFO_LEVEL_MIN
Definition protocol.h:84
@ SERVERINFO_LEVEL_MAX
Definition protocol.h:85
@ SERVER_MAX_CLIENTS
Definition protocol.h:91
@ CFGFLAG_COLLIGHT
Definition config.h:95
@ CFGFLAG_CLIENT
Definition config.h:84
@ CFGFLAG_SERVER
Definition config.h:85
@ CFGFLAG_SAVE
Definition config.h:83
@ CFGFLAG_ECON
Definition config.h:88
@ CFGFLAG_GAME
Definition config.h:93
@ CFGFLAG_MASTER
Definition config.h:87
@ CFGFLAG_NONTEEHISTORIC
Definition config.h:94
@ CFGFLAG_COLALPHA
Definition config.h:97
@ CFGFLAG_INSENSITIVE
Definition config.h:98
@ CFGFLAG_COLLIGHT7
Definition config.h:96
constexpr auto IO_MAX_PATH_LENGTH
Definition types.h:49