Xonotic Forums
how to make game modes votable - 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: how to make game modes votable (/showthread.php?tid=1412)

Pages: 1 2


how to make game modes votable - Morphed - 12-31-2010

Code:
alias tourneysettings "fraglimit_overide 0; g_tourney 1; minplayers 0; teamplay_mode 2"
alias publicsettings "fraglimit_override -1; g_tourney 0; minplayers 4; teamplay_mode 4"

alias 1v1dm     "gametype dm;        g_maxplayers 2;    tourneysettings;g_powerup_strength 0;endmatch"
alias 2v2tdm     "gametype tdm;        g_maxplayers 4;    tourneysettings;g_powerup_strength 1;endmatch"
alias 3v3tdm     "gametype tdm;        g_maxplayers 6;    tourneysettings;g_powerup_strength 1;endmatch"
alias 4v4tdm     "gametype tdm;        g_maxplayers 8;    tourneysettings;g_powerup_strength 1;endmatch"
alias 5v5tdm     "gametype tdm;        g_maxplayers 10;tourneysettings;g_powerup_strength 1;endmatch"
alias 2v2ctf     "gametype ctf;        g_maxplayers 4;    tourneysettings;g_powerup_strength 1;endmatch"
alias 3v3ctf     "gametype ctf;        g_maxplayers 6;    tourneysettings;g_powerup_strength 1;endmatch"
alias 4v4ctf     "gametype ctf;        g_maxplayers 8;    tourneysettings;g_powerup_strength 1;endmatch"
alias 5v5ctf     "gametype ctf;        g_maxplayers 10;tourneysettings;g_powerup_strength 1;endmatch"
alias 2v2ca     "gametype ca;        g_maxplayers 4;    tourneysettings;g_powerup_strength 1;endmatch"
alias 3v3ca     "gametype ca;        g_maxplayers 6;    tourneysettings;g_powerup_strength 1;endmatch"
alias 4v4ca     "gametype ca;        g_maxplayers 8;    tourneysettings;g_powerup_strength 1;endmatch"
alias 5v5ca     "gametype ca;        g_maxplayers 10;tourneysettings;g_powerup_strength 1;endmatch"
alias dm     "gametype dm;        g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias infection    "gametype infection;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias freezetag "gametype freezetag;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias tdm     "gametype tdm;        g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias ctf     "gametype ctf;        g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias ca     "gametype ca;        g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias assault     "gametype as;        g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias keepaway     "gametype keepaway;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias nexball     "gametype nexball;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias domination     "gametype dom;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias keyhunt     "gametype kh;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias rune     "gametype rune;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias arena     "gametype arena;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias lms     "gametype lms;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"
alias onslaught     "gametype onslaught;    g_maxplayers 0;    publicsettings;g_powerup_strength 1;endmatch"

alias 1on1dm "1v1dm"
alias 2on2tdm "2v2tdm"
alias 3on3tdm "3v3tdm"
alias 4on4tdm "4v4tdm"
alias 5on5tdm "5v5tdm"
alias 2on2ctf "2v2ctf"
alias 3on3ctf "3v3ctf"
alias 4on4ctf "4v4ctf"
alias 5on5ctf "5v5ctf"
alias 2on2ca "2v2ca"
alias 3on3ca "3v3ca"
alias 4on4ca "4v4ca"
alias 5on5ca "5v5ca"

alias dom "domination"
alias kh "keyhunt"
alias ons "onslaught"

addvote 1v1dm
addvote 2v2tdm
addvote 3v3tdm
addvote 4v4tdm
addvote 5v5tdm
addvote 2v2ca
addvote 3v3ca
addvote 4v4ca
addvote 5v5ca
addvote 2v2ctf
addvote 3v3ctf
addvote 4v4ctf
addvote 5v5ctf
addvote 3v3ca
addvote 4v4ca
addvote 1on1dm
addvote 2on2tdm
addvote 2on2ca
addvote 3on3ctf
addvote 3on3ca
addvote 4on4ca
addvote dm
addvote tdm
addvote ctf
addvote ca
addvote infection
addvote freezetag
addvote assault
addvote keepaway
addvote nexball
addvote kh
addvote keyhunt
addvote dom
addvote domination
addvote rune
addvote arena
addvote lms
addvote ons
addvote onslaught

alias minsta "toggle g_minstagib;g_weaponarena 0; restart"
alias nobots "minplayers 0; bot_number 0; say To re-enable bots, please revote for a public gametype"
alias infammo "toggle g_use_ammunition; restart"
alias warmup "toggle g_warmup; restart"

addvote minsta
addvote timelimit
addvote nobots
addvote infammo
addvote sv_fbskin_green
addvote sv_fbskin_orange
addvote sv_fbskin_red
addvote sv_fbskin_off
addvote warmup

put that at the end of server.cfg and players will be able to chose every game mode on your server. Script made by FruitieX. I would like to see at least dm and tdm on all dm servers, when 6+ players gather on such servers it stops all the fun and its just chaos ( not a cool version of chaos Wink )


RE: how to make game modes votable - chooksta - 12-31-2010

sweet! Big Grin


:^


RE: how to make game modes votable - nowego4 - 12-31-2010

Yes! If this catches on, I can play domination whenever I want on a good ping server (with a chance of someone else joining).

+1 for FruitieX again Big Grin


RE: how to make game modes votable - GreEn`mArine - 01-02-2011

For some gamemodes I would suggest to loose the "fixed player count" aspect a bit. I think there is a cvar that will limit the allowed number of spawned/playing players to the number of players playing when every body readied up. That means you can have a variant number of people on the server, once they joined a side and readied up you begin, and after that no new players can join.

I think it's the cvar "teamplay_lockonrestart". No clue whether it still exists.


RE: how to make game modes votable - TheLastProject - 03-10-2011

This is interesting, but is it also possible to make the server choose a game mode? For some reason this is possible with maps but, no matter how I put it, whenever I put more than one gamemode in the "gametype" command, the server only plays the first one in the list and ignores everything else, never to switch gamemode. Yes, I have maps for the other gamemodes I've added.


RE: how to make game modes votable - W4RP1G - 04-04-2012

Thanks!!!


RE: how to make game modes votable - W4RP1G - 04-04-2012

Ok, question....Is i possible to vote to change the "maxplayers"?


RE: how to make game modes votable - Mr. Bougo - 04-05-2012

No, the server needs to be restarted after setting maxplayers. Plus, you really don't want people to set that to 128.

Why do you want to make maxplayers votable?


RE: how to make game modes votable - W4RP1G - 04-06-2012

(04-05-2012, 12:19 AM)Mr. Bougo Wrote: No, the server needs to be restarted after setting maxplayers. Plus, you really don't want people to set that to 128.

Why do you want to make maxplayers votable?

For 1v1 purposes. 6 spectators is too much


RE: how to make game modes votable - Mr. Bougo - 04-06-2012

So you want to boot people out of your server when 1v1 is voted? Seems very wrong to me :x


RE: how to make game modes votable - W4RP1G - 04-06-2012

(04-06-2012, 09:30 AM)Mr. Bougo Wrote: So you want to boot people out of your server when 1v1 is voted? Seems very wrong to me :x
lol no never thought of it like that. no I guess not.


RE: how to make game modes votable - neXus - 04-18-2012

If i try to write "vcall gametype ctf" or "vcall ctf" i get "This command is not acceptable"


RE: how to make game modes votable - Cortez666 - 04-18-2012

(04-18-2012, 06:38 AM)GaryRoach Wrote: If i try to write "vcall gametype ctf" or "vcall ctf" i get "This command is not acceptable"

you need to enable these commands via the server.cfg.


RE: how to make game modes votable - neXus - 04-18-2012

i did : sv_vote_commands "ctf dm dom ca gametype" and stil nto working


RE: how to make game modes votable - Halogene - 04-18-2012

I assume you put the script provided above into the server.cfg that the server executes?


RE: how to make game modes votable - Sless - 04-18-2012

Yeah, either put this code into your server.cfg, or do this text in an extra cfg file (modes.cfg / FuBar.cfg / IDontKnowWhatImDoing.cfg / ... ) and add in your server.cfg the following:
'exec filename.cfg'

Have fun changing your gamemodes =)


RE: how to make game modes votable - W4RP1G - 04-18-2012

(04-18-2012, 08:20 AM)GaryRoach Wrote: i did : sv_vote_commands "ctf dm dom ca gametype" and stil nto working
You don't need to do that. Just put a // in front of all your voting options in server.cfg and you should be good to go, unless you want to tweak the voting system.

I use a separate alias.cfg to keep things nice and organized. Then I just add "exec alias.cfg" to my server.cfg(like sless said) and all of my other cfgs as well(just in case I run the server with a different cfg).


RE: how to make game modes votable - neXus - 04-19-2012

Sad i still get This command is not acceptable.
Copied the script in a file called UNvotes.cfg and wrote in server.cfg exec UNvotes.cfg.
Still nothing.

hmm... sxeems like i have to write exec UNvotes.cfg inside the server again to make it work


RE: how to make game modes votable - Mr. Bougo - 04-19-2012

What does the server console show when you type sv_vote_commands in it? (The server console, not the client console)


RE: how to make game modes votable - neXus - 04-19-2012

timelimit gotomap fraglimit kick restart nextmap movetoauto extendmatchtime reducematchtime endmatch cointoss allready


RE: how to make game modes votable - Mr. Bougo - 04-19-2012

Welp. Obviously you didn't set it right then. Can I get a server start log? Are you absolutely sure that you put exec UNvotes.cfg in the right server.cfg?


RE: how to make game modes votable - Sless - 04-19-2012

Mind to share your server.cfg?

There we could see where the problem occurs.


RE: how to make game modes votable - neXus - 04-19-2012

That's what server.cfg contains :
Quote:sv_public 1
sv_curl_serverpackages "unrealsounds-v1.pk3 unrealsounds-v1.serverpackage settings-ut2k4_v1.0.pk3 settings-ut2k4_v1.0.serverpackage"
sv_curl_defaulturl http://dl.dropbox.com/u/67627614/
cl_curl_maxspeed 20000
cl_curl_maxdownloads 10
g_grappling_hook 0
g_antilag 2
cl_curl_enabled 1
sv_motd "The best alternative to Unreal Tournament"
maxplayers 20
g_maplist_votable 9
g_maplist_nodetail 0
g_start_delay 5
sv_vote_call 1
hostname "Unreal Xonotic"
g_maplist "deck16][ old-steel-complex astralcity"
exec UNvotes.cfg

also, when i hit someone on the server, the hit sound is on an infinite loop, but this is not because of the UNvotes.cfg


RE: how to make game modes votable - Mr. Bougo - 04-19-2012

Can you show us a server log too? I'd like to see what happens after UNvotes.cfg is exec'd, that might overwrite the cvar.


RE: how to make game modes votable - neXus - 04-19-2012

where can i find it?