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
  Help needed with custom gametypes Notavi 4 1,440 07-29-2018, 07:22 AM
Last Post: Freddy

Forum Jump:


Users browsing this thread:
1 Guest(s)

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