Script.txt

From Spring
Revision as of 13:01, 12 October 2014 by Flozi (talk | contribs) (97.0 - added GAME/MUTATOR{0..9} so you can load arbitrary mutator archives before the game)
Jump to navigationJump to search

Script.txt

Start script file for Spring Engine.

Lobbies create it for spring, usually found in ~/.spring/script.txt on Linux/MacOSX.

On Windows it can be found mostly in My Documents\My Games\Spring\script.txt or next to spring.exe.

Structure

See doc/StartScriptFormat.txt for a more detailed example.

Spring 97.0 added GAME/MUTATOR{0..9} so you can load arbitrary mutator archives before the game. Addtionally since 97.0 GAME/GameID is the only seed of the synced random generator, so you can define the GameID in a luaAI battle startscript and you will always get a syncing match.


[GAME]
{
  // game attributes
  [MUTATOR0]
  {
    // mutator attributes
  }
  [AI0]
  {
    // AI attributes
  }
  [PLAYER0]
  {
    // player attributes
  }
  [TEAM0]
  {
    // team attributes
  }
  [ALLYTEAM0]
  {
    // ally team attributes
  }
  [RESTRICT]
  {
    // restrictions
  }
  [MODOPTIONS]
  {
    // values for the options defined in Modoptions.lua
  }
  [MAPOPTIONS]
  {
    // values for the options defined in Mapoptions.lua
  }
}