Xonotic Forums

Full Version: Help needed with custom gametypes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to add two custom gametypes to the end-of-map voting list but I'm not having a lot of success:

Code:
//InstaGib Gametype
alias instagib "gametype dm;g_instagib 1"
alias noinstagib "gametype dm;g_instagib 0"

addvote instagib
addvote noinstagib

sv_vote_gametype_instagib_name "Instagib"
sv_vote_gametype_instagib_description "Instagib Deathmatch"
sv_vote_gametype_instagib_type "dm"
alias sv_vote_gametype_hook_instagib "instagib"

//sv_vote_gametype_mygametype_name "My Mode" // Name displayed for the custom gametype "mygametype" (replace "mygametype" with the name you set in sv_vote_gametype_options)
//sv_vote_gametype_mygametype_type "ft" // the basetype that the custom gametype is derived from
//sv_vote_gametype_mygametype_description "This is my custom gametype" // the description for the custom gametype
//// Custom icons for custom gametypes are supported and have to be located in a server pk3 as gfx/menu/default/gametype_mygametype
Duel shows up in the list, but doesn't appear to work correctly (it plays as a straight deathmatch game). I've commented it out just in case I've broken something by overwriting it. The instagib cvars just return an error when they're loaded:
[attachment=1812]


Though there is a second weird error that shows up when the vote screen is rendered:
[attachment=1813]

(Honestly not sure what to make of that one).
Since the sv_vote_gametype_mytype_* cvars are custom cvars you need to use "set" to declare them, e.g.
Code:
set sv_vote_gametype_instagib_name "Instagib"
I guess the example config should be changed to make that clear.
The second error is probably caused by those missing cvars.

In Xonotic there is no real duel gametype, it's just deathmatch with a playerlimit of 2 and no powerups. Your gametype vote needs to reflect that
That sorta dovetails into my next question (which is, what are the standard settings for Duel).
So, no powerups, playerlimit 2. Is there anything else (I vaguely remember something about non mega health and armours not being able to take HP above 100?)
Oh, and it's working now BTW, so thanks for that Smile
Not being able to take 25 and 50 health/armor above 100HP/Armor is part of XPM (Xonotic Pro Mode). XPM is used in some modes like duel and competitive TDM.  You can look at https://github.com/packer-/server-configs to see how packer handles it (see pickup-extra.cfg)