Xonotic Forums
[NEED HELP] Help Adding 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: [NEED HELP] Help Adding Custom Gametypes (/showthread.php?tid=9621)



Help Adding Custom Gametypes - CarbonGhost - 01-22-2023

Hello, I'm new to hosting a Xonotic server and I'm looking to add a few custom gametypes that can be voted on by players. This seems possible according to the server config file, but it's not clear to me what I need to do to actually get them working. I'm not looking to do anything revolutionary here, simply add a few gametypes which utilize standard mutations.


RE: Help Adding Custom Gametypes - ballerburg9005 - 01-23-2023

"Gametypes" are CTF, DM, Duel, KH, Nexball and such. If you really wanted to add another gametype, then you need to mod the game, it is not so easy.

I think what you mean are game modifiers, such as g_nix or overkill. You can put those up for vote, e.g. "call vote XPM" and it will switch to XPM. But it will not show a menu for that at the end of a match.

This is explained here: https://gitlab.com/xonotic/xonotic/-/wikis/custom-server-votes

This old server config I found makes use of this: https://git.teknik.io/antares/infinity_xonotic_server_config/src/branch/master/server.cfg

Don't forget that you can't wildly mix all the game modifiers, like overkill with nix mode hardly makes sense. So for each vote option you need to consider that and undo the modifiers that have already been voted for if they can't really be combined.


RE: Help Adding Custom Gametypes - Freddy - 01-24-2023

It is possible to add custom "gamemodes" to the vote screen after each map: https://gitlab.com/xonotic/xonotic/-/blob/master/server/server.cfg#L101
We should probably extend the documentation for this.


RE: Help Adding Custom Gametypes - ballerburg9005 - 01-24-2023

You can also type "apropos gametype" in the console, and it will search all cvars for that term and show them to you with explanation.

This way you will easily find sv_vote_gametype and other variables.