Server/Map Rotation

From Unvanquished
Jump to: navigation, search

The maprotation.cfg file holds a server's default map rotation.

Basic Format

This list will indefinitely loop

maprotation1 {
 plat23
 antares 
 vega {
   // execute console commands on mapstart
   cp "Important message for everyone"
 }
 parpax {
   // load the map with one of the layouts
   layouts myfavoritelayout mysecondfavoritelayout
 }
}

Advanced Logic

#label

Labels are used as location markers. They can bee 'seeked' to using a goto statement:

goto #label

For more advanced logic IF statements can be used. if STATEMENT ACTION

Where STATEMENT is one of:

  • numClients (> or < or = ) (number)
  • lastwin (aliens or humans)
  • random

...and ACTION is either a map or label to goto.

Example:

perseus
 
#mainloop
if numClients > 8 vega
if numClients < 4 chasm
spacetracks
station15
 
if lastwin humans #mainloop
thunder

Misc Notes

  • If you want to reverse a goto, use return
  • goto can jump to a label in another rotation, and resume will return to the last rotation.