Announcement: game end condition moved to Lua
Posted: 09 Sep 2010, 23:37
Starting from next major spring engine release ( at least 6 months from this post, version something like 0.83.x ), spring will stop handling hardcoded game end conditions
the Lua API to handle lineage and display old game end condition are removed as well
mods will need to use a gadget to implement game end/victory conditions
GameOver call-in will now return a list of winning allyteams
added new synced call-outs to declare GameOver and to kill a team
teams will be able to stay alive with 0 units by default, manually killing them will be necessary
a sample gadget that reimplements kill all units game end is being included in springcontent, LuaGadgets/LuaRules/Gadgets/game_end.lua
the gadgets has the following features:
never ending game and teams don't die even with 0 units option
teams die when they have 0 units ( same as current beaviour ) option
teams don't die when they have 0 units, but die when the whole allyteam has 0 units option
option to let dynamic alliances have shared victory
I strongly reccomend modders to set default game end condition to "allyzerounits" ( teams die when 0 units in the whole allyteam ), this because it will allow players who dropped out the game to be /take'd and when will rejoin, they'll be able to resume playing by getting their units being shared back
here's a code snippet to add the gameend's options to your modoptions file:
updated the wiki accordingly
some forum moderator please make this thread stick in Game & Mod and Lua sections of the forums
the Lua API to handle lineage and display old game end condition are removed as well
mods will need to use a gadget to implement game end/victory conditions
GameOver call-in will now return a list of winning allyteams
added new synced call-outs to declare GameOver and to kill a team
teams will be able to stay alive with 0 units by default, manually killing them will be necessary
a sample gadget that reimplements kill all units game end is being included in springcontent, LuaGadgets/LuaRules/Gadgets/game_end.lua
the gadgets has the following features:
never ending game and teams don't die even with 0 units option
teams die when they have 0 units ( same as current beaviour ) option
teams don't die when they have 0 units, but die when the whole allyteam has 0 units option
option to let dynamic alliances have shared victory
I strongly reccomend modders to set default game end condition to "allyzerounits" ( teams die when 0 units in the whole allyteam ), this because it will allow players who dropped out the game to be /take'd and when will rejoin, they'll be able to resume playing by getting their units being shared back
here's a code snippet to add the gameend's options to your modoptions file:
Code: Select all
{
key="teamdeathmode",
name="Team Game End Mode",
desc="What it takes to eliminate a Team",
type="list",
def="allyzerounits",
items={
{key="none", name="Never Die", desc="All Teams will stay alive regardless of what happends, gameover will never arrive."},
{key="teamzerounits", name="Team Death on Zero Units", desc="The Team will die when it has 0 units."},
{key="allyzerounits", name="AllyTeam Death on Zero units", desc="The Team will die when every Team in his AllyTeam have 0 units."},
}
},
{
key = "shareddynamicalliancevictory",
name = "Dynamic Ally Victory",
desc = "Ingame alliance should count for game over condition.",
type = "bool",
def = false,
},
some forum moderator please make this thread stick in Game & Mod and Lua sections of the forums