rotations

Taken from http://forums.gameservers.com/viewtopic.php?t=14040 , written by Birdman on Fri Aug 25, 2006. Unfortunately one picture is already missing.

have tried to write this as simple as possible.

Throughout this post I will refer to ET's 6 built in maps (i.e. oasis, goldrush, etc) as the stock maps and all other maps as custom maps.

I have broken the post up into 4 posts, this first post is to simply explain a few things, please read this post before moving onto the type rotation you wish to do as it will help explain some of what’s going on in all 3 types of rotations I’m going to explain.

The other posts are:

    • Post 2 Objective rotations (without the need for a pk3 file).

    • Post 3 Stopwatch rotations (without the need for a pk3 file).

    • Post 4 Campaign rotations.

You will also need the program Pakscape, you can get it here :click me:. If the link is broken then google for it. This doesn't install on you pc, just double click the pakscape exe icon, in the window that opens click run. Note: I take no responsibility should this program damage your pc in any way. If you decide to use it you do so at your own risk. I've never had any trouble with it, nor have any of my friends online who also use it.

One little bit of advice before you go writing your own rotations, "be very careful writing them", one little mistake like mis-spelling something, leaving out a " (quotation mark) or a ; (semi-colon) can muck the whole thing up and you'll probably post here saying "

my rotation don't work", when it might be something small like these.

I have often done it myself and cursed on the rotation for not working, then I might notice I left something out or mis-spelt something. So double check before posting because it's nearly always something small that causes it not to work.

--------------------------------------

Introduction

There are 5 types of game play in Enemy Territory:

    • Single Player (SP) - g_gametype 1

    • Objective (OBJ) - g_gametype 2

    • Stopwatch (SW) - g_gametype 3

    • Campaign (CMPGN) - g_gametype 4

    • Last Man Standing (LMS) - g_gametype 5 - afaik only the 6 stock maps support this (i.e. oasis, battery, etc).

I will only be focusing on Objective, Stopwatch and Campaign, I’ll start with the easier Objective and Stopwatch gametypes which can be run with just a cfg file. Campaign rotations require both a cfg and a pk3 to work.

When attempting to run any map in your rotation(s) you must use the exact bsp name of the map. Oasis is actually called Siwa Oasis but to run the map it's bsp name is oasis.

Not all custom maps have the same bsp name as there pk3 name, an example of this would be the custom map dubrovnik_final_1104.pk3. If you where to add this map to your rotation using the pk3 name then your rotation would break, because the bsp name is just dubrovnik_final without the "_1104" at the end.

To find out the bsp name of a custom map run Pakscape and explore the map pk3. Quick how to: run pakscape from the file menu option select open, direct it to where in your pc the pk3 is, click on the pk3 you wish to explore, click open, you should now be able to see a few folders the bsp will be in the maps folder.

The best program to write rotations and/or campaigns with is "Notepad", I’m not explaining why other text programs shouldn't be used it's just easier to use notepad.

Once you have written your rotation, from the file menu option in notepad choose "Save As..." , when naming the file you must enclose the name with quotation marks and also add .cfg (dot cfg) after the name you have chosen, otherwise it will only save as a .txt (text) file.

Do not include a space in the file name.

right - "my_rotation.cfg"

wrong - "my rotation.cfg" <-- game wont read a file with a space in the name

wrong - my_rotation.cfg <-- no quotation marks

wrong - my rotation.cfg <-- no quotation marks and there's a space

The first wrong way will save as a cfg file but the game won't read files with spaces in the name. The next 2 wrong ways will also save the file but it will save it as a .txt file.

Campaigns also use .campaign (dot campaign), but I’ll explain this later.

A few things to take note of:

In the rotation examples I give everything that’s written after the // will be ignored by the game, this is only information letting you know what each part is, you don’t have to add these lines, it's entirely up to you.

Here's a list of commands you will be using to write the cfg rotations. Campaigns also use these but not "nextmap", campaigns have a few more commands which I will explain in the campaign post.

    • "com_watchdog_cmd" - a useful command should a map fail to load, this command would trigger if a map fails to load and starts whatever rotation cfg you have assigned to it. You don't have to add this to your cfg rotation(s), you can set it in your server.cfg if you like.

    • g_gametype - lets the game know what type game you want to play (listed above)

    • map - lets the game know which map to start

    • nextmap - an ET game specific string variable which lets the game know where it's to go to find the next set of map instructions

    • vstr - in simple terms this is the same as saying "goto", example "vstr m1" lets the game know it has to goto the string named m1 and execute it's instructions.

    • set - used to set a string library or a cvar

here's a breakdown of one line from my example objective rotation to explain some of these:

set m1 "g_gametype 2; map oasis; set nextmap vstr m2"

m1 is the name of the string variable which the game is to store, when the game is instructed to read the m1 string (i.e. vstr m1) it then carries out the instructions inside this string.

Note: The ; (semi-colon) is used to separate commands/instructions.

First the game is told it must set the gameplay to objective mode "g_gametype 2", next it's told what map to run "map oasis", the next command/instruction lets it know where to go once the map ends (objective is completed or time runs out) "set nextmap vstr m2"

Simply put "run the map oasis in objective mode, once the map has ended go read what instructions are in string m2"

Ok depending on what type rotation you wish to know about, read the appropriate following posts.

Have fun.

Last edited by Birdman on Mon Aug 28, 2006 5:04 am, edited 1 time in total.

Objective Rotations

In objective mode players playing on ETPro or ETmain servers don't carry over any XP they have gained to the next map as it resets it to zero again, some mods do allow XP to be carried over like ETPub and Jaymod, but only if the server has been set up to allow XP to be carried over.

Here's an example of an objective rotation with an explanation after:

//Objective Rotation

//Watchdog

set com_watchdog_cmd "vstr m1"

// Map Rotation

set m1 "g_gametype 2; map oasis; set nextmap vstr m2"

set m2 "g_gametype 2; map goldrush; set nextmap vstr m3"

set m3 "g_gametype 2; map fueldump; set nextmap vstr m1"

vstr m1

Note: I use the name variables m1, m2 meaning "map 1", "map2", etc you can call it something different if you like.

A quick run through on what’s happening here, but at this point you should already know from the explanation in the first post.

com_watchdog_cmd is set to restart your rotation should a map fail to load.

The last line "vstr m1" is actually the line which triggers your rotation to start, simply put it's telling the game to goto string m1 and carry out the instructions in this string.

When string m1's instructions have been carried out it then waits for m1's map "oasis" to end before carrying out string m2's instructions, again it sets the gametype to objective but this time it runs the map "goldrush", once goldrush has ended it then moves onto string m3's instructions, again setting the game to objective mode but this time it runs the map fueldump, once fueldump has ended it is then instructed to go back to string m1 "nextmap vstr m1". It will now continue to run these 3 maps one after the other always looping back to m1 to play them through again.

You can add many maps to this type of rotation, once the maps are in the server etmain folder, but it does have a limit the problem though is this limit can't be numbered as it involves a few different factors of which I’m not getting into here, but the limit can range anywhere from 20 to 40 maps. Don't forget though if you have a lot of custom maps running your clients might not have these maps so you'll need a redirect set up for fast download. If your using only the basic web package that came with your server then you will be limited to the amount of maps you can fit on this website for redirect.

Adding more maps

To add more maps to the rotation just add more of the same lines changing the map command to the map name you want to run, also don't forget to adjust the "nextmap" command to goto these new lines.

Example adding 2 more maps to the existing objective map rotation:

// MAP ROTATION

set m1 "g_gametype 2; map oasis; set nextmap vstr m2"

set m2 "g_gametype 2; map goldrush; set nextmap vstr m3"

set m3 "g_gametype 2; map fueldump; set nextmap vstr m4" <-- notice change here from first example

set m4 "g_gametype 2; map radar; set nextmap vstr m5"

set m5 "g_gametype 2; map railgun; set nextmap vstr m1" <-- return to m1 and repeat the rotation is now here

Stopwatch Rotation

Stopwatch rotations have two ways they can be run ABAB or ABBA, the cvar that controls this is:

g_altstopwatchmode "" (default is "0")

    • When set to "1" it runs ABAB stopwatch rounds

    • When set to "0" it runs ABBA stopwatch rounds

    • "ABAB" would be used for running 2 rounds of a single map. Think of it more as just "AB" and not "ABAB".

    • "A" = round 1, attacking team try to complete the objective and set a time before the game clock runs out.

    • "B" = round 2, the teams are auto swapped and the team that defended in round 1 are now the attacking team and have to try beat the time that was set in round 1, if in round 1 the attacking team complete the objective before the clock runs out the time at which they completed it will be the amount of time set for round 2.

    • "ABBA" would be used for running 4 rounds of a single map.

    • "AB" would run the same as above, but in round 3 (the second "B") the team that defended in round 1 are now the attackers and must try complete the map and set the time, in round 4 (the second "A") they are auto swapped and the team that defended in round 3 must now try to beat the time set in round 3.

LoL hope you understood all that.

ABAB

An "ABAB" rotation which is commonly used by leagues would be written like this:

// ABAB STOPWATCH ROTATION

// STOPWATCH MODE

set g_altstopwatchmode "1"

// WATCHDOG

set com_watchdog_cmd "vstr m1r1"

// MAP ROTATION

set m1r1 "g_gametype 3; map oasis; set nextmap vstr m1r2"

set m1r2 "map_restart 0; set nextmap vstr m2r1"

set m2r1 "g_gametype 3; map railgun; set nextmap vstr m2r2"

set m2r2 "map_restart 0; set nextmap vstr m3r1"

set m3r1 "g_gametype 3; map goldrush; set nextmap vstr m3r2"

set m3r2 "map_restart 0; set nextmap vstr m1r1"

vstr m1r1

Note: I use m1r1, m1r2 meaning "map 1 round 1, map 1 round 2" etc, you can call it something different if you like, but it's best to stick to one format all through so you don't get confused.

Lets look at the // MAP ROTATION first 2 lines:

set m1r1 "g_gametype 3; map oasis; set nextmap vstr m1r2"

set m1r2 "map_restart 0; set nextmap vstr m2r1"

The first line sets the gametype "g_gametype 3", ET knows in this gametype a map will have 2 or 4 rounds depending on what g_altstopwatchmode was set at, the next command tells it what map to run "map oasis", the last command tells it what string variable it should goto once round 1 is complete "set nextmap vstr m1r2".

The second lines first command is to restart the map, because the gametype is 3 ET knows to switch the teams and set the clock to whatever time was achieved in round 1, it then waits until the now attacking team either beats the time that was set or the clock runs out it then executes the next command "nextmap vstr m2r1".

It now repeats the process for the next map and so on until it reach’s the last command in the last line "set m3r2 etc" where it's instructed to return to m1r1 "nextmap vstr m1r1" once that round finishes and repeat the rotation again. It will now continue to repeat these maps in a never-ending loop, because the last command is always sending it back to the first string variable.

ABBA

An "ABBA" rotation running just 2 maps would be written like this:

// ABBA STOPWATCH ROTATION

// STOPWATCH MODE

set g_altstopwatchmode "0"

// WATCHDOG

set com_watchdog_cmd "vstr m1r1"

// MAP ROTATION

set m1r1 "g_gametype 3; map oasis; set nextmap vstr m1r2"

set m1r2 "map_restart 0; set nextmap vstr m1r3"

set m1r3 "map_restart 0; set nextmap vstr m1r4"

set m1r4 "map_restart 0; set nextmap vstr m2r1"

set m2r1 "g_gametype 3; map fueldump; set nextmap vstr m2r2"

set m2r2 "map_restart 0; set nextmap vstr m2r3"

set m2r3 "map_restart 0; set nextmap vstr m2r4"

set m2r4 "map_restart 0; set nextmap vstr m1r1"

vstr m1r1

Like the first 2 lines of the "ABAB" // MAP ROTATION the first 2 lines of the "ABBA" // MAP ROTATION do exactly the same, it's lines 3 and 4 "m1r3, m1r4" that continue running the same map with the team that defended in round 1 now setting the map time and the defenders trying to beat there time in round 4.

More maps

If you plan on using any of these rotations but want to add more maps, then refer to the objectives post "adding more maps", but unlike the objectives cfg your stopwatch rotation will need either the 2 or 4 lines depending on which stopwatch mode rotation you are using.

Campaign Rotations

Unlike Objective and Stopwatch rotations which can be run with just a cfg file, campaigns have to have both a cfg and a pk3 file.

Just a word of warning here, if your planning to run a campaign on your server then there can be no more then 15 pk3's in the server etmain folder or the campaign will hang on the last map repeating it. Because campaigns need a pk3 this is 1 of the 15 your allowed, 4 others are taken up by the game (pak0.pk3, pak1.pk3, pak2.pk3 and mp_bin.pk3), this leaves 10 slots for custom maps you wish to use. Because the stock maps are inside the pak0.pk3 file you can have a possible 16 maps to choose from (6 stock maps and 10 custom).

Pk3

I'll start with showing a written campaign pk3 file that I wrote for this post and then explain what every line is for/doing. There is also a picture to show some of what i'm explaining.

{

name "Custom Maps"

shortname "custom"

description "^0Welcome to ^1The Warriors*^0-=OC=- Outcasts server**^7Delibrate TK'ers and*^7Cheaters will be Kicked**^4MAPS**^0 1. Oasis*^0 2. Warbell*^0 3. ET Center*^0 4. Goldrush*^0 5. Sub Base B1*^0 6. Fueldump"

maps "oasis;warbell;etcenter_final;goldrush;sub_base_b1;fueldump"

mapTC 374 374

type "wolfmp"

}

<Missing Image :http://www.birdmanswarriors.clanservers.com/pics/screen.JPG:>

The campaign must be enclosed between these type brackets {}.

name - this names your campaign and shows it on the loading screen, highlighted blue in the pic. You can also add colors to this if you like, try not to make the name to long because the game also adds how many maps are in the campaign and what number map is on at the moment (i.e. 1 of 6 see pic).

shortname - this will be used in the cfg part of a campaign, it doesn't have to be the same as what you named the campaign, but don't use a name separated by a space (i.e. my maps), instead separate it with an underscore (i.e. my_maps) if you wish to do this or simply make it all the one word (i.e. mymaps), also do not include color codes in this name.

description - Highlighted green in the pic. Because this line is long the post has wrapped it creating two lines, nothing i can do about this but it's actually all one line. In the description you can write whatever you like, for example info about the server or your clan, what maps are in the campaign (hmm about exactly what i have lol), it's up to you what if anything you want to mention here. The * (asterisk) is used to create a carriage return, multiple ** = extra carriage returns. The limit of letters/characters across this text area is 26 characters, this doesn't include color codes, but spaces are counted. I'm not sure how many lines of text will fit in this area, that’s one for you to figure out yourself lol. (btw The Warriors is my clan team name and our clan is -=OC=-Outcasts).

maps - this is the main line of the campaign where you list the running order of your maps, these have to be the exact bsp file names (see first post). Campaigns cannot have more then 10 (ten) maps in the rotation or it will break down. Each map name must be separated by a ; (semi-colon).

Depending on the maps you wish to run in your rotation i will say this "some maps are fussy" and this includes the stock maps, some maps won't work properly if they are the first map in the campaign (either campaign won't start or it gets stuck on this map repeating it), others don't work too well being the last map (i.e. the campaign gets stuck on this map and keeps repeating it, not allowing the campaign to restart or move onto another campaign you might have set). This can only be cured by testing the campaign when it's complete, two maps i nearly always use to start and finish a campaign are Oasis at start and fueldump at the end, both these maps have no trouble in these positions. There are also maps that never finish unless one team has completed at least one objective (i.e. early versions of baserace, i think the last version baserace_b3b fixed this).

The next two commands:

mapTC 374 374

type "wolfmp"

I won't explain, only to say that these should not be altered. There is no need for you to ever change the info in these, but they are needed in the campaign code.

After you've written yours and added the closing bracket do another carriage return, this is for the games purpose of separating things.

Saving your campaign

Unlike cfg's these are saved as .campaign. Do not name it with a space included (i.e. "my maps.campaign"), if you wish to break the name use the underscore (i.e. "my_maps.campaign") and make sure to enclose it with quotation marks:

right - "my_first_campaign.campaign"

wrong - "my first campaign.campaign" <- game wont read file names with spaces

wrong - my_first_campaign.campaign <- no quotation marks

wrong - my first campaign.campaign <- spaces and no quotation marks

The first wrong way will save as a .campaign file but the game won't be able to read it because of the spaces separating the name. The other 2 wrong ways will save, but they will save as .txt files.

You now have to create a folder naming it scripts, you cannot name this folder anything else, it has to be named scripts, move or copy your saved campaign file into this folder. To complete the process you need to zip this folder as a pk3, to do this use the Pakscape program.

Run pakscape, once the program window has opened in the file menu option choose new, once the new window has opened drag the scripts folder into this new window (see pic below), again from the file menu option choose "Save As...", in this window name your file (i.e. my_camp), do not name it with a space involved (i.e. my camp), from the "save as type" drop down menu choose "Quake 3 pak (*.pk3)", you can now click save.

add screenshot

You now have your pk3 campaign file.

cfg

A cfg file is now needed to run the campaign, this slightly differs from the Objective and Stopwatch cfg's instead of calling the individual maps you now call a campaign.

There are 3 different commands used in the campaign cfg:

campaign - this is used for setting the campaign to be played

nextcampaign - like nextmap in the objective and stopwatch cfg's, this is used to call the next campaign

d_initial - is a game specific string variable used to store info about your campaign rotation

Here's the code with an explanation to follow.

// CAMPAIGN ROTATION

// WATCHDOG

set com_watchdog_cmd "vstr d_initial"

// CAMPAIGN

set d1 "campaign custom; set nextcampaign vstr d2"

set d2 "campaign custom; set nextcampaign vstr d1"

set d_initial "set g_gametype 4; map oasis; set nextcampaign vstr d2"

vstr d_initial

First the watchdog is set to restart your campaign should a map fail to load.

I'll skip to the setting of d_initial, the first command in this line sets the gametype to campaign "g_gametype 4".

The next command map sets the first map listed in the campaign maps list which was "oasis", it's always best to set this to the first map in your rotation, having it set to any other map (i.e. goldrush which is fourth in the example campaign) might cause problems.

The last command instructs the game to goto string variable d2 and carry out the instructions there.

Now you may wonder why i have 2 lines for running the campaign (set d1, set d2), i have had trouble in the past when only using one line and read in a post somewhere to use 2 lines when only running a single campaign if it was kicking up. From then on I’ve always used 2 lines to run a single campaign and have never had any trouble since.

"set d1" - campaign is the command used for calling your campaign, this is where the shortname in the campaign file comes into use, in the example i named it "custom", when the game comes across this command it will search the scripts folders looking for a campaign with the shortname "custom", once found it then runs the maps listed in this campaign.

The next command tells it what campaign string variable it should goto next, to read the instructions from once all the maps in this campaign have played through (i.e. vstr d2).

Once you've written your cfg save it as a .cfg file (explained in post 1).

Both the pk3 and cfg file have to be in the server etmain folder for your campaign to run, also any custom map pk3's (it can't run a map if its not in the server etmain folder lol), you must also adjust the line in your server.cfg to execute your cfg:

exec whatever_name_you_gave_it.cfg

Once you've uploaded the cfg, pk3, adjusted server.cfg and any custom maps you have included in your campaign restart the server. Your campaign should now be running, pat yourself on the back for a job well done lol.

Multiple Campaigns

Should you wish to have 2, 3 or even more different campaigns, then include them all in the one .campaign file, otherwise you will end up having multiple campaign pk3's losing custom map slots. Even with them all in the one file you can call then individually if you wanted.

Here's an example of 2 campaigns in the one campaign file, by doing this you end up having only 1 campaign pk3 instead of multiple campaign pk3's.

{

name "Custom Maps"

shortname "custom"

description "^0Welcome to ^1The Warriors*^0-=OC=- Outcasts server**^7Delibrate TK'ers and*^7Cheaters will be Kicked**^4MAPS**^0 1. Oasis*^0 2. Warbell*^0 3. ET Center*^0 4. Goldrush*^0 5. Sub Base B1*^0 6. Fueldump"

maps "oasis;warbell;etcenter_final;goldrush;sub_base_b1;fueldump"

mapTC 374 374

type "wolfmp"

}

{

name "6 Original"

shortname "6org"

description "^0Welcome to ^1The Warriors*^0-=OC=- Outcasts server**^7Delibrate Tk'ers and*^7Cheaters will be Kicked**^4Maps**^01. Oasis*^02. Railgun*^03. Battery*^04. Radar*^05. Goldrush*^06. Fueldump"

maps "oasis;railgun;battery;radar;goldrush;fueldump"

mapTC 374 374

type "wolfmp"

}

If you wanted to run the campaigns one after the other here's what the cfg file would look like:

// CAMPAIGN ROTATION

// WATCHDOG

set com_watchdog_cmd "vstr d_initial"

// CAMPAIGN

set d1 "campaign 6org; set nextcampaign vstr d2"

set d2 "campaign custom; set nextcampaign vstr d1"

set d_initial "set g_gametype 4; map oasis; set nextcampaign vstr d2"

vstr d_initial

Because d_initial is set to goto variable d2 first, it will run the custom campaign first and then the 6org campaign.

----------------

Have fun Birdman.