Script.txt: Difference between revisions
From Spring
Jump to navigationJump to search
m recategorise Filetype -> Development (for now) |
97.0 - added GAME/MUTATOR{0..9} so you can load arbitrary mutator archives before the game |
||
| Line 1: | Line 1: | ||
Start script file for | = Script.txt = | ||
Start script file for Spring Engine. | |||
Lobbies create it for spring, usually found in <code>~/.spring/script.txt</code> on Linux/MacOSX. | |||
On Windows it can be found mostly in <code>My Documents\My Games\Spring\script.txt</code> or next to spring.exe. | |||
== Structure == | |||
See {{sourcelink|file=doc/StartScriptFormat.txt}} for a more detailed example. | |||
Spring 97.0 added <code>GAME/MUTATOR{0..9}</code> so you can load arbitrary mutator archives before the game. Addtionally since 97.0 <code>GAME/GameID</code> is the only seed of the synced random generator, so you can define the <code>GameID</code> in a luaAI battle startscript and you will always get a syncing match. | |||
<code><pre>[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 | |||
} | |||
}</pre></code> | |||
[[Category:Development]] | [[Category:Development]] | ||
Revision as of 13:01, 12 October 2014
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
}
}