Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[NEED HELP] g_maplist for all voteable gametypes

#1
Hi,
I am running into a problem I am unable to solve. My server runs the latest GIT version (30 march 2020)
I think these are the relevant config entries:
Code:
g_maplist "atelier boil dance implosion solarium space-elevator"
g_maplist_shuffle 1  
g_maplist_votable 5 
gametype dm     // default gamemode
sv_vote_gametype 1   // set to 1 to enable voting for gametypes after every match
sv_vote_gametype_options "dm ctf tdm ca"

The problem: the map voting shows the correct maps when staying in the DM gametype. When another gametype is voted, other maps. i.e. runningmanctf will be showed during the map voting. (this map is not in my g_maplist).
After this  the g_maplist is ignored as it seems and every installed map is showing up at the map votes.
Is this "normal" behavior? Is it something I can fix. Ie. have a g_maplist per gametype?
Reply

#2
I think switching gametype resets g_maplist. This is somewhat expected as different modes have different maps and g_maplist is not just a config cvar, the code also changes it to keep track of the maps - it's a glorified global variable. You have 2 options:

a) disable some maps by overriding their mapinfo and putting "hidden" in it like here: https://github.com/martin-t/xonotic-conf...02.mapinfo

b) set g_maplist per gametype using sv_vote_gametype_hook_ like here: https://gitlab.com/xonotic/xonotic/-/blo...r.cfg#L107 (this is unmerged code because we're still arguing about some details) - not sure this'll actually work but do try
[Image: 30381.jpg]

<packer> when i see martin-t's name my blood pressure increases

<[BOT]Hоtdоg> anyone here lives near martin?
<[BOT]Hоtdоg> will pay monies for shooting him
Reply

#3
(03-31-2020, 05:11 AM)martin-t Wrote: I think switching gametype resets g_maplist. This is somewhat expected as different modes have different maps and g_maplist is not just a config cvar, the code also changes it to keep track of the maps - it's a glorified global variable. You have 2 options:

a) disable some maps by overriding their mapinfo and putting "hidden" in it like here: https://github.com/martin-t/xonotic-conf...02.mapinfo

b) set g_maplist per gametype using sv_vote_gametype_hook_ like here: https://gitlab.com/xonotic/xonotic/-/blo...r.cfg#L107 (this is unmerged code because we're still arguing about some details) - not sure this'll actually work but do try

Thank you Martin, this is very valuable information. I will try to go for option b at first as it's the most flexible.

Ok option B kind of works for me. I made a seperate cfg file that I execute at the hook:

Code:
alias sv_vote_gametype_hook_all "g_instagib 0; exec sv_maps_tdm.cfg"



In my sv_maps_tdm.cfg I have this:
Code:
g_maplist_votable 3
g_maplist "dance solarium space-elevator"
//need to shuffle otherwise will show the first listed maps above.
g_maplist_shufflenow


I always see this in my log:
Code:
Game type successfully switched to dm
execing sv_maps_tdm.cfg

Now I alwasy get 3 maps to choose from. When I go from example DM -> DM it is fine. If I swich from DM -> TDM, the first time I also see other maps. If I then choose TDM again it's the correct map list in the vote.
It looks like the g_maplist is set too late for some reason. A list of possible hooks would be nice, maybe there is another hook I can use that loads the maps in time for the map voting.
Reply

#4
I decided to go for the mapinfo option. This works well now. It's a bit more setup hassle, but it works like a charm.
The "hooks" are really nice for other things by the way. It enabled me to make an instagib ctf mode for example. Cool stuff
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [NEED HELP] Help Adding Custom Gametypes CarbonGhost 3 1,971 01-24-2023, 09:09 PM
Last Post: ballerburg9005
  all are welcome at hightime deathmatch lister 52 38,437 07-06-2022, 05:13 PM
Last Post: lister
  Mutator all weapon saddesad 1 2,000 11-27-2020, 11:45 AM
Last Post: BuddyFriendGuy
  Variables for max health + all weapons Duckman 2 3,261 05-21-2020, 08:14 AM
Last Post: Duckman
  Help needed with custom gametypes Notavi 4 3,539 07-29-2018, 07:22 AM
Last Post: Freddy
  [SOLVED] Disable Freeze Tag All-Weapons Spawn / Hooney Duel Antares* 3 3,347 04-12-2018, 07:45 PM
Last Post: Antares*
  new irc for all duel servers Ch4mp 3 5,262 08-07-2016, 03:13 AM
Last Post: end user
  all-inclusive server-side demo BuddyFriendGuy 8 8,635 05-16-2015, 01:37 AM
Last Post: BuddyFriendGuy
  When using ./all run dedicated multiple instance different cfg file end user 1 3,293 04-29-2013, 01:19 AM
Last Post: Mr. Bougo
  [SOLVED] Where did all the ammo come from ?? -maniac|Su- 19 16,379 04-10-2012, 02:48 PM
Last Post: -maniac|Su-

Forum Jump:


Users browsing this thread:
2 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-