Server/Map Rotation

From Unvanquished
Jump to: navigation, search

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


Basic Format

This list will indefinitely loop

maprotation1 {
 atcs
 tremor
 niveus
 karith
}

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 then 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:

tremor

#mainloop
if numClients > 8 lightning
if numClients < 4 nano
psuedopolis
ankh-morpork

if lastwin humans #mainloop
humanmurder

Misc Notes

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