Xonotic Forums
Help needed with custom gametypes - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Server Administration (https://forums.xonotic.org/forumdisplay.php?fid=16)
+--- Thread: Help needed with custom gametypes (/showthread.php?tid=7782)



Help needed with custom gametypes - Notavi - 07-29-2018

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:
   


Though there is a second weird error that shows up when the vote screen is rendered:
   

(Honestly not sure what to make of that one).


RE: Help needed with custom gametypes - Freddy - 07-29-2018

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


RE: Help needed with custom gametypes - Notavi - 07-29-2018

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?)


RE: Help needed with custom gametypes - Notavi - 07-29-2018

Oh, and it's working now BTW, so thanks for that Smile


RE: Help needed with custom gametypes - Freddy - 07-29-2018

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)