determine active/current mapcfg on the nexuiz console?

Developer discussion of experimental fixes, changes, and improvements.

Moderators: Nexuiz Moderators, Moderators

determine active/current mapcfg on the nexuiz console?

Postby Cinquero » Thu Feb 22, 2007 7:41 pm

How can I do that?

"status" just gives me the map name, not the mapcfg name...
Cinquero
Advanced member
 
Posts: 91
Joined: Wed Jul 19, 2006 11:13 pm

Postby KadaverJack » Thu Feb 22, 2007 8:06 pm

There's no easy way to check that, because mapcfg files are just config files that are setting some variables and loading the map afterwards.
You can guess the mapcfg name, if you check the mapname with status and a few cvars:
g_domination, g_ctf, g_runematch, g_tdm, g_lms & g_arena
Of course that only works if the mapcfg files don't have fancy names and there is only one mapcfg files for each gamemode and map.
KadaverJack
Site admin and forum addon
 
Posts: 1102
Joined: Tue Feb 28, 2006 9:42 pm

Postby Cinquero » Thu Feb 22, 2007 8:13 pm

I'm looking for a way to select/identify the map configs by rcon. One way is to set g_maplist and let the nexuiz server change the mapcfgs. It would then probably be possible to track the current mapcfg by g_maplist_index.

Unfortunately, it seems that changing g_maplist has no effect when the server is already running. Is there a way to prevent automatic map/mapcfg changes between the games and select the maps via rcon with the "chmap" command?
Cinquero
Advanced member
 
Posts: 91
Joined: Wed Jul 19, 2006 11:13 pm

Postby KadaverJack » Thu Feb 22, 2007 8:26 pm

Cinquero wrote:Unfortunately, it seems that changing g_maplist has no effect when the server is already running.

Works fine here. But g_maplist must contain at least 2 valid mapcfg names, otherwise it's being reset.

Is there a way to prevent automatic map/mapcfg changes between the games and select the maps via rcon with the "chmap" command?

The only ways i can think of (without changing the game code) are setting fraglimit_override and timelinit_override to 0 (which would run the current map indefinitely) or setting samelevel 1 (which would just restart the same map once the match has ended).

Edit: of course you could add "set mapcfg <mapcfg name>" to all mapcfg files, then you can check that cvar which one is running.
KadaverJack
Site admin and forum addon
 
Posts: 1102
Joined: Tue Feb 28, 2006 9:42 pm

Postby Cinquero » Fri Feb 23, 2007 10:20 am

KadaverJack wrote:The only ways i can think of (without changing the game code) are setting fraglimit_override and timelinit_override to 0 (which would run the current map indefinitely) or setting samelevel 1 (which would just restart the same map once the match has ended).


Hm, ok, that's possibly an option. My final goal is to control the map start and end. I can use chmap to start a game, I don't need to know the status if the overrides are at 0, now I only need a method to finish the map (ie. start the sv_mapchange_delay and display the final scores to the players). Any ideas about that?
Cinquero
Advanced member
 
Posts: 91
Joined: Wed Jul 19, 2006 11:13 pm

Postby esteel » Wed Feb 28, 2007 6:06 pm

Not sure if i got you right.. but timelimit -1 will end the current map and switch to the next one (unless samelevel prevents that then its the same map again)
esteel
Site admin and forum addon
 
Posts: 3924
Joined: Wed Mar 01, 2006 8:27 am

Postby Cinquero » Wed Feb 28, 2007 9:11 pm

My current solution (implemented in the "AutoConf Nex223 Server" listed on the global Nexuiz Server list) is to "control" by setting the timelimit and removing the fraglimit. Of course, that does not work with certain game types (lms, for example), so I have disabled these game types for now. Maybe I'll track the status by parsing the console output of the server somewhen.
Cinquero
Advanced member
 
Posts: 91
Joined: Wed Jul 19, 2006 11:13 pm


Return to Nexuiz - Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron