//
// e.g. Xonotic 1.5.1 RC1 will be 15101
set g_xonoticversion git "Xonotic version (formatted for humans)"
+
gameversion 100 // 0.1.0
gameversion_min 0 // git builds see all versions
gameversion_max 65535 // git builds see all versions
seta crosshair_dot_color "1 0 0" "when != 0, use custom color for the crosshair dot"
seta crosshair_pickup 0.25
seta crosshair_pickup_speed 4
+ seta crosshair_hitindication 0.5
+ seta crosshair_hitindication_color "10 -10 -10"
+ seta crosshair_hitindication_speed 5
seta crosshair_per_weapon 0 "when 1, each gun will display a different crosshair"
seta crosshair_color_per_weapon 1 "when 1, each gun will display the crosshair with a different color"
seta crosshair_effect_speed -1 "how fast (in seconds) some crosshair effects should take place, 0 = instant, -1 = 2x weapon switch time"
seta crosshair_fireball_color "0.2 1.0 0.2" "crosshair color to display when wielding the fireball"
seta crosshair_fireball_alpha 1 "crosshair alpha value to display when wielding the fireball"
seta crosshair_fireball_size 1 "crosshair size when wielding the fireball"
+ seta crosshair_color_by_health 0 "if enabled, crosshair color will depend on current health"
// ring around crosshair, used for various purposes (such as indicating bullets left in clip, nex charge)
+ seta crosshair_ring 1 "main cvar to enable or disable crosshair rings"
+ seta crosshair_ring_inner 0 "allow inner rings to be drawn too"
seta crosshair_ring_size 2 "bullet counter ring size for Rifle, velocity ring for Nex"
seta crosshair_ring_alpha 0.2 "ring alpha"
+ seta crosshair_ring_sniperrifle 1 "draw a ring showing the ammount of ammo left in the sniperrifle
seta crosshair_ring_sniperrifle_alpha 0.15
- seta crosshair_ring_nex_outer_alpha 0.15
+ seta crosshair_ring_nex 1 "draw a ring showing the current charge of the nexgun"
+ seta crosshair_ring_nex_alpha 0.15
seta crosshair_ring_nex_inner_alpha 0.15
seta crosshair_ring_nex_inner_color_red 0.8
seta crosshair_ring_nex_inner_color_green 0
seta crosshair_ring_nex_currentcharge_scale 30
seta crosshair_ring_nex_currentcharge_movingavg_rate 0.05
+ seta crosshair_ring_minelayer 1
+ seta crosshair_ring_minelayer_alpha 0.15
+
seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"
- seta cl_reticle_item_nex 1 "draw aiming recticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha"
- seta cl_reticle_item_normal 1 "draw recticle when zooming with the zoom button, 0 disables and values between 0 and 1 change alpha"
+ seta cl_reticle_item_nex 1 "draw aiming reticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha"
+ seta cl_reticle_item_normal 1 "draw reticle when zooming with the zoom button, 0 disables and values between 0 and 1 change alpha"
fov 90
seta cl_velocityzoom 0 "velocity based zooming of fov, negative values zoom out"
seta cl_velocityzoomtime 0.3 "time value for averaging speed values"
seta sv_taunt 1 "allow taunts on the server"
seta sv_autotaunt 1 "allow autotaunts on the server"
seta cl_voice_directional 1 "0 = all voices are non-directional, 1 = all voices are directional, 2 = only taunts are directional"
- seta cl_voice_directional_taunt_attenuation 0.5 "this defines the distance from which taunts can be heared"
+ seta cl_voice_directional_taunt_attenuation 0.5 "this defines the distance from which taunts can be heard"
// server settings
hostname "Xonotic $g_xonoticversion Server"
set sv_ready_restart_after_countdown 0 "if set to 1 the players and map items are reset after the countdown ended, otherwise they're reset already at the beginning of the countdown"
set sv_ready_restart_repeatable 0 "allows the players to restart the game as often as needed"
- set sv_hitsound_antispam_time 0.05 "don't play the hitsound more often than this for the electro lightning gun or the laser gauntlet"
+ seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy"
+ set cl_hitsound_antispam_time 0.05 "don't play the hitsound more often than this"
//nifreks lockonrestart feature, used in team-based game modes, if set to 1 and all players readied up no other player can then join the game anymore, useful to block spectators from joining
set teamplay_lockonrestart 0 "it set to 1 in a team-based game, the teams are locked once all players readied up and the game restarted (no new players can join after restart unless using the server-command unlockteams)"
set bot_ai_aimskill_firetolerance_maxdegrees 60 "Maximum firing angle. Used on close range"
set bot_ai_aimskill_mouse 1 "How much of the aiming filters are applied"
set bot_ai_keyboard_distance 250 "Keyboard emulation is disabled after this distance to the goal"
- set bot_ai_keyboard_treshold 0.57
+ set bot_ai_keyboard_threshold 0.57
set bot_ai_aimskill_offset 0.3 "Amount of error induced to the bots aim"
set bot_ai_aimskill_think 1 "Aiming velocity. Use values below 1 for slower aiming"
set bot_ai_custom_weapon_priority_distances "300 850" "Define close and far distances in any order. Based on the distance to the enemy bots will choose different weapons"
set bot_ai_bunnyhop_stopdistance 125 "Stop jumping after reaching this distance to the goal"
set bot_ai_bunnyhop_firstjumpdelay 0.2 "Start running to the goal only if it was seen for more than N seconds"
set bot_god 0 "god mode for bots"
- set bot_ai_navigation_jetpack 0 "Enable bots to navigat maps using the jetpack"
+ set bot_ai_navigation_jetpack 0 "Enable bots to navigate maps using the jetpack"
set bot_ai_navigation_jetpack_mindistance 3500 "Bots will try fly to objects located farther than this distance"
// Better don't touch these, there are hard to tweak!
set bot_ai_aimskill_order_mix_1st 0.01 "Amount of the 1st filter output to apply to the aiming angle"
set g_powerup_strength 1 "if set to 0 the strength powerup will not spawn on the map"
set g_powerup_shield 1 "if set to 0 the shield (invincibility) powerup will not spawn on the map"
set g_balance_powerup_timer 1 "if set to 0 the powerups dont wear off"
- set g_use_ammunition 1 "if set to 0 all weapons you pick up have unlimited ammunition"
+ set g_use_ammunition 1 "if set to 0 all weapons have unlimited ammunition"
set g_pickup_items 1 "if set to 0 all items (health, armor, ammo, weapons...) are removed from the map"
set g_minstagib 0 "enable minstagib"
set g_minstagib_extralives 2 "how many extra lives you will get per powerup"
seta cl_sound_maptime_warning "1" "play announcer sound telling you the remaining maptime - 0: do not play at all, 1: play at one minute, 2: play at five minutes, 3: play both"
seta cl_notify_carried_items "3" "notify you of carried items when you obtain them (e.g. flags in CTF) - 0: disabled, 1: notify of taken items, 2: notify of picking up dropped items, 3: notify of both"
- seta cl_hitsound 1 "play a hit notifier sound when you have hit an enemy"
seta cl_announcer default "name of the announcer you wish to use from data/sound/announcer"
// startmap_dm is used when running with the -listen or -dedicated commandline options
seta menu_skin "luminos"
set menu_slowmo 1
seta menu_sounds 0 "enables menu sound effects. 1 enables click sounds, 2 also enables hover sounds"
- set menu_picmip_bypass 0 "bypass texture quality enforcement based on system resources, not recommended and may cause crashes!"
+seta menu_tooltips 1 "menu tooltips: 0 disabled, 1 enabled, 2 also shows cvar or console command (when available) changed or executed by the item"
r_textbrightness 0.2
r_textcontrast 0.8
set timelimit_decrement 5
set timelimit_min 5
set timelimit_max 60
- alias extendmatchtime "sv_cmd rpn /timelimit timelimit timelimit_max timelimit timelimit_increment add bound def"
- alias reducematchtime "sv_cmd rpn /timelimit timelimit timelimit_decrement sub timelimit_min timelimit bound def"
+ alias extendmatchtime "sv_cmd extendmatchtime"
+ alias reducematchtime "sv_cmd reducematchtime"
alias endmatch "timelimit -1"
// useful keybind to maximize the chat area temporarily
set camera_speed_chase 4 "Camera movement speed on the x/y/z axis while chasing the player"
set camera_speed_free 8 "Camera movement speed on the x/y/z axis in free mode"
set camera_speed_attenuation 10 "Camera movements attenuation factor. Bigger is smoother. Applies to mouse movements"
- set camera_mouse_treshold 0.5 "Use to ignore small mouse movements. This allows for smoother camera control"
+ set camera_mouse_threshold 0.5 "Use to ignore small mouse movements. This allows for smoother camera control"
set camera_chase_smoothly 0 "Attenuate player movements (only in chase mode)"
set camera_look_player 0 "Always look to the player. Mouse input is ignored in this mode"
set camera_look_attenuation 8 "Attenuation of \"looking\" movements, only if camera_look_player is set. Bigger is smoother"
seta g_ghost_items 1 "enable ghosted items (when between 0 and 1, overrides the alpha value)"
seta g_ghost_items_color "-1 -1 -1" "color of ghosted items, 0 0 0 leaves the color unchanged"
- set sv_weaponstats_damagefile "" "when set to a file name, per-weapon damage stats get written to that file"
- set sv_weaponstats_killfile "" "when set to a file name, per-weapon kill stats get written to that file"
+ set sv_weaponstats_file "" "when set to a file name, per-weapon stats get written to that file"
seta cl_noantilag 0 "turn this on if you believe antilag is bad"
// uid2name
seta cl_allow_uid2name -1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid2name (allows showing your name in race rankings for instance)"
+ seta cl_allow_uidtracking 1 "-1 = ask if the player wants to disable/enable this feature, 0 = disable, 1 = enable uid tracking (allows associating your data with your player ID)"
+ // FIXME set to -1 before release, once we have a dialog for this!
// polygonoffset for submodel SUCKS SUCKS SUCKS (only a hack for quake1, we don't need that)
r_polygonoffset_submodel_offset 0
exec effects-normal.cfg
exec physicsX0.cfg
exec turrets.cfg
- exec font-xolonium.cfg
// hud cvar descriptions
exec _hud_descriptions.cfg
sz = draw_PictureSize(img);
width_is_larger = (sz_x * draw_scale_y >= sz_y * draw_scale_x);
- isz_w = '1 0 0' + '0 1 0' * ((sz_y / sz_x) * (draw_scale_x / draw_scale_y));
- isz_h = '0 1 0' + '1 0 0' * ((sz_x / sz_y) * (draw_scale_y / draw_scale_x));
+ isz_w = '1 0 0' + '0 1 0' * ((sz_y / sz_x) * (draw_scale_x / draw_scale_y));
+ isz_h = '0 1 0' + '1 0 0' * ((sz_x / sz_y) * (draw_scale_y / draw_scale_x));
switch(scalemode)
{
}
}
+float menu_tooltips;
+float menu_tooltips_old;
vector menuTooltipAveragedMousePos;
entity menuTooltipItem;
vector menuTooltipOrigin;
vector menuTooltipSize;
float menuTooltipAlpha;
-float menuTooltipState; // 0: no tooltip, 1: fading in, 2: displaying, 3: fading out
-float m_testmousetooltipbox(vector pos)
+string menuTooltipText;
+float menuTooltipState; // 0: static, 1: fading in, 2: fading out
+float m_testmousetooltipbox()
{
- if(pos_x >= menuTooltipOrigin_x && pos_x < menuTooltipOrigin_x + menuTooltipSize_x)
- if(pos_y >= menuTooltipOrigin_y && pos_y < menuTooltipOrigin_y + menuTooltipSize_y)
+ if(menuMousePos_x >= menuTooltipOrigin_x && menuMousePos_x < menuTooltipOrigin_x + menuTooltipSize_x)
+ if(menuMousePos_y >= menuTooltipOrigin_y && menuMousePos_y < menuTooltipOrigin_y + menuTooltipSize_y)
return FALSE;
return TRUE;
}
vector avoidplus, avoidminus;
vector v;
- avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x) / conwidth;
- avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y) / conheight;
+ avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth;
+ avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight;
avoidplus_z = 0;
- avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x) / conwidth + menuTooltipSize_x;
- avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y) / conheight + menuTooltipSize_y;
+ avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth + menuTooltipSize_x;
+ avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight + menuTooltipSize_y;
avoidminus_z = 0;
// bottom right
it = it.itemFromPoint(it, pos);
if(it.tooltip)
best = it;
+ else if(menu_tooltips == 2 && (it.cvarName || it.onClickCommand))
+ best = it;
it = world;
}
else if(it.instanceOfModalController)
break;
if(it.tooltip)
best = it;
+ else if(menu_tooltips == 2 && (it.cvarName || it.onClickCommand))
+ best = it;
pos = globalToBox(pos, it.Container_origin, it.Container_size);
}
return best;
}
-void m_tooltip(vector pos)
+string gettooltip()
+{
+ if (menu_tooltips == 2)
+ {
+ string s;
+ if (menuTooltipItem.cvarName)
+ {
+ if (getCvarsMulti(menuTooltipItem))
+ s = strcat("[", menuTooltipItem.cvarName, " ", getCvarsMulti(menuTooltipItem), "]");
+ else
+ s = strcat("[", menuTooltipItem.cvarName, "]");
+ }
+ else if (menuTooltipItem.onClickCommand)
+ s = strcat("<", menuTooltipItem.onClickCommand, ">");
+ else
+ return menuTooltipItem.tooltip;
+ if (menuTooltipItem.tooltip)
+ return strcat(menuTooltipItem.tooltip, " ", s);
+ return s;
+ }
+ return menuTooltipItem.tooltip;
+}
+void m_tooltip()
{
float f, i, w;
entity it;
vector fontsize, p;
string s;
- fontsize = '1 0 0' * (SKINFONTSIZE_TOOLTIP / conwidth) + '0 1 0' * (SKINFONTSIZE_TOOLTIP / conheight);
-
- f = bound(0, frametime * 2, 1);
- menuTooltipAveragedMousePos = menuTooltipAveragedMousePos * (1 - f) + pos * f;
- f = vlen(pos - menuTooltipAveragedMousePos);
-
- if(f < 0.01)
- it = m_findtooltipitem(main, pos);
- else
+ menu_tooltips = cvar("menu_tooltips");
+ if (!menu_tooltips)
+ {
+ // don't return immediately, fade out the active tooltip first
+ if (menuTooltipItem == world)
+ return;
it = world;
+ menu_tooltips_old = menu_tooltips;
+ }
+ else
+ {
+ f = bound(0, frametime * 2, 1);
+ menuTooltipAveragedMousePos = menuTooltipAveragedMousePos * (1 - f) + menuMousePos * f;
+ f = vlen(menuMousePos - menuTooltipAveragedMousePos);
+ if(f < 0.01)
+ it = m_findtooltipitem(main, menuMousePos);
+ else
+ it = world;
+ }
+ fontsize = '1 0 0' * (SKINFONTSIZE_TOOLTIP / conwidth) + '0 1 0' * (SKINFONTSIZE_TOOLTIP / conheight);
// float menuTooltipState; // 0: static, 1: fading in, 2: fading out
if(it != menuTooltipItem)
menuTooltipItem = it;
menuTooltipOrigin_x = -1; // unallocated
+
+ menuTooltipText = strzone(gettooltip());
i = 0;
- w = 0;
- getWrappedLine_remaining = it.tooltip;
+ w = 0;
+ getWrappedLine_remaining = menuTooltipText;
while(getWrappedLine_remaining)
{
s = getWrappedLine(SKINWIDTH_TOOLTIP, fontsize, draw_TextWidth_WithoutColors);
menuTooltipState = 1;
if(menuTooltipItem)
- if(!m_testmousetooltipbox(pos))
+ if(!m_testmousetooltipbox())
menuTooltipState = 2; // fade out if mouse touches it
switch(menuTooltipState)
if(menuTooltipItem)
{
- if(menuTooltipOrigin_x < 0) // unallocated?
- m_allocatetooltipbox(pos);
+ if(menu_tooltips != menu_tooltips_old)
+ {
+ if (menu_tooltips != 0 && menu_tooltips_old != 0)
+ menuTooltipItem = world; // reload tooltip next frame
+ menu_tooltips_old = menu_tooltips;
+ }
+ else if(menuTooltipOrigin_x < 0) // unallocated?
+ m_allocatetooltipbox(menuMousePos);
if(menuTooltipOrigin_x >= 0)
{
p = menuTooltipOrigin;
p_x += SKINMARGIN_TOOLTIP_x / conwidth;
p_y += SKINMARGIN_TOOLTIP_y / conheight;
- getWrappedLine_remaining = menuTooltipItem.tooltip;
+ getWrappedLine_remaining = menuTooltipText;
while(getWrappedLine_remaining)
{
s = getWrappedLine(SKINWIDTH_TOOLTIP, fontsize, draw_TextWidth_WithoutColors);
if(Menu_Active)
if(!cvar("menu_video_played"))
{
- localcmd("set menu_video_played 1; cd loop $menu_cdtrack; play sound/announcer/default/welcome.ogg\n");
+ localcmd("cd loop $menu_cdtrack; play sound/announcer/default/welcome.ogg\n");
menuLogoAlpha = -0.8; // no idea why, but when I start this at zero, it jumps instead of fading FIXME
}
+ // ALWAYS set this cvar; if we start but menu is not active, this means we want no background music!
+ localcmd("set menu_video_played 1\n");
}
t = gettime();
}
main.draw(main);
- m_tooltip(menuMousePos);
+ m_tooltip();
draw_alpha = max(draw_alpha, SKINALPHA_CURSOR_INTRO * bound(0, menuLogoAlpha, 1));
string getZonedTooltipForIdentifier(string s)
{
string t;
- if(s == "")
+ if(s == "" || tooltipdb < 0)
return string_null;
if(tooltipdb >= 0)
{
.string cvarNames_Multi;
.void(entity me) saveCvars_Multi;
+string getCvarsMulti(entity me)
+{
+ if (me.cvarNames_Multi)
+ return me.cvarNames_Multi;
+ return string_null;
+}
void saveCvarsMulti(entity me)
{
float n, i;
return i;
}
- string language_filename(string s)
- {
- string fn;
- float fh;
- fn = prvm_language;
- if(fn == "" || fn == "dump")
- return s;
- fn = strcat(s, ".", fn);
- if((fh = fopen(fn, FILE_READ)) >= 0)
- {
- fclose(fh);
- return fn;
- }
- return s;
- }
- string CTX(string s)
- {
- float p = strstrofs(s, "^", 0);
- if(p < 0)
- return s;
- return substring(s, p+1, -1);
- }
-
void dialog_hudpanel_common_notoggle(entity me, string panelname)
{
float i;
void loadAllCvars(entity root);
void makeMulti(entity me, string otherCvars);
+string getCvarsMulti(entity me);
void makeCallback(entity me, entity cbent, void(entity, entity) cbfunc);
void setDependent(entity e, string theCvarName, float theCvarMin, float theCvarMax);
void setDependentStringNotEqual(entity e, string theCvarName, string theCvarValue);
void setDependentWeird(entity e, float(entity) func);
-float tooltipdb;
void loadTooltips();
void unloadTooltips();
string getZonedTooltipForIdentifier(string s);
me.TR(me); \
me.TD(me, 1, 4, e = makeXonoticCheckBox(0, strzone(strcat("hud_panel_", panelname)), _("Enable panel"))); \
DIALOG_HUDPANEL_COMMON_NOTOGGLE()
-
- string language_filename(string s);
- string CTX(string s);
- #define ZCTX(s) strzone(CTX(s))
\sv_vote_simple_majority_factor\Simple majority wins a vote
\XonoticMultiplayerDialog/Advanced settings...\Advanced server settings
\XonoticMultiplayerDialog/Mutators...\Mutators and weapon arenas
+ \g_dodging\Enable dodging
\g_cloaked\All players are almost invisible
\g_footsteps\Enable footstep sounds
- \g_midair\Only possible to inflict damage on your enemy while he's airborn
+ \g_midair\Only possible to inflict damage on your enemy while he's airborne
\g_vampire\Damage done to your enemy gets added to your own health
\g_bloodloss\Amount of health below which your player gets stunned because of blood loss
\sv_gravity\Make things fall to the ground slower, lower value means lower gravity
\cl_port\Force client to use chosen port unless it is set to 0
\XonoticSettingsDialog/Misc\Misc settings
+\menu_tooltips\Menu tooltips: disabled, standard or advanced (also shows cvar or console command bound to the menu item)
\showtime\Show current time of day, useful on screenshots
\showdate\Show current date, useful on screenshots
\showfps\Show your rendered frames per second