[Solved] Load rotation based on g_gametype?

20 replies [Last post]
epsiplayer
THE ONE AND ONLY
intact-epsilon's picture
Offline
Joined: Dec 2006
Posts:
Re: Load rotation based on g_gametype?

Please read the "Conditional rotation gotcha" from the documentation. It explains an issue with the rotation of the maps and what to do to avoid it.

The conclusion: You should have the same number of maps in all conditions. Add an else condition for being sure that the number of maps never change in the other situations.

_____________
epsislow


kszksz
japierdole's picture
Offline
Joined: Jan 2012
Posts:
GB United Kingdom
Re: Load rotation based on g_gametype?

I thought you use custom maps also, anyway Epsi resolved issue I think ;]

And even I walk through the darkest valley of the shadow of death I will be not afraid because I am the worst motherfucker in this place.

SwedishGojira
SwedishGojira's picture
Offline
Joined: Aug 2013
Posts:
Re: Load rotation based on g_gametype?

Oh, I intend to use custom maps as soon as I get the rotation working.
I will be using maps from QL, Threewave CTF, some LvL packs and some others.

So just adding the same number of maps to the rotation should fix it?
I guess repeating some maps should be ok as long as there is the same number of lines in each rotation?
I will check when I get home from work and report back.

EDIT: I went over the code again and they all have the same number o maps already, but there is no "else" statement in the code only "else if". I believe this edited code might work, but I can not try it out until tonight when I get home.

if ( g_gametype == 3 ) { // TDM
    timelimit: 15
    fraglimit: 200
    capturelimit: 0
 
    q3dm7
    q3dm11
    q3dm12
 
} else if ( g_gametype == 4 ) { // CTF
    timelimit: 15
    fraglimit: 0
    capturelimit: 10
 
    q3ctf1
    q3ctf2
    q3ctf3
 
} else if ( g_gametype == 8 ) { // FREEZE
    timelimit: 15
    fraglimit: 0
    capturelimit: 0
 
    q3dm11
    overkill
    q3dm12
 
} else { // DM
    timelimit: 10
    fraglimit: 30
    capturelimit: 0
 
    q3dm1
    q3dm2
    q3dm3
 
}

EDIT 2: Nope, still will not rotate. Started my server remotely and it is still only loading the big box and ignores the maps specified in rotation. Sad

cml
Forum moderator Rank moderator LIVING LEGEND
camel-xp's picture
Offline
Joined: Mar 2006
Posts:
Re: Load rotation based on g_gametype?

did you put cvar: set xp_rotation "yourfile.txt" in your server cfg ?

THOR*ELITE'Z*
Thor-NL's picture
Offline
Joined: Jan 2011
Posts:
NL Netherlands
Re: Load rotation based on g_gametype?

And let the last command in your server.cfg be a map
Like :
seta xp_rotation "rotation_yourname.txt" // new rotation file with conditinal maps

// --------------------------------------------------------------------------
// Call to map is absolutly needed to get rotation on the road! Don't delete!
// --------------------------------------------------------------------------
map q3dm4 // or any map you want for starters

www.elitez.eu


The whole world is searching for Waldo...
In Soviet Russia, Waldo finds YOU !

SwedishGojira
SwedishGojira's picture
Offline
Joined: Aug 2013
Posts:
Re: Load rotation based on g_gametype?

I finally made it work. I went back to basics and saw that the rotation formatting recently changed so the instructions I got from the documentation was not correct for 2.2b.
This code works great! Happy

if ( $g_gametype == 3 ) // Team Deathmatch
{
$timelimit = 15;
$fraglimit = 200;
$capturelimit = 0;
q3dm7
q3dm11
q3dm12
}
 
if ( $g_gametype == 4 ) // Capture The Flag
{
$timelimit = 15;
$fraglimit = 0;
$capturelimit = 10;
q3ctf1
q3ctf2
q3ctf3
}
 
if ( $g_gametype == 8 ) // Freeze Tag
{
$timelimit = 15;
$fraglimit = 0;
$capturelimit = 0;
q3dm11
overkill
q3dm12
}
 
if ( $g_gametype == 0 ) // Free for All (DeathMatch)
{
$timelimit = 10;
$fraglimit = 30;
$capturelimit = 0;
q3dm1
q3dm2
q3dm3
}

Thanks for the help, even if I figured it out on my own in the end.
Happy fraggin'!

epsiplayer
THE ONE AND ONLY
intact-epsilon's picture
Offline
Joined: Dec 2006
Posts:
Re: Load rotation based on g_gametype?

Great to hear it's working now.
Thanks for telling the solution.

Documentation is now updated thanks.
____________
epsislow


SwedishGojira
SwedishGojira's picture
Offline
Joined: Aug 2013
Posts:
Re: Load rotation based on g_gametype?
epsiplayer wrote:

Documentation is now updated thanks.

Shouldn't the variables in the documentation be "$timelimit = 15;" instead of "$timelimit: 15;"?

/
q3fun's picture
Offline
Joined: Jun 2010
Posts:
Re: [Solved] Load rotation based on g_gametype?

do as I say and not suffer, just/rcon xp_vote callvote.txt

РЕАЛЬНО ВВЕРИТЕ - ВЫ ВСЕ ЗАЕБАЛИ!!