Loading...
  OR  Zero-K Name:    Password:   

What is the most sane way of adding an alternate winning condition?

6 posts, 442 views
Post comment
Filter:    Player:  
sort

4 years ago
I am guessing it is just adding more code at the scope of a map that runs the check for the condition.

Let's assume I wanted to make a timed FFA match which declares that declares the player or team with the most energy at the end of the time. I guess what I would do is take a map like Violence_4.2 add the Lua code would measure the time, display the time, check the win condition, and end the match with the right winner. Then I would need to upload that to https://springfiles.com/.

PTrankraaar just made a map https://springfiles.com/spring/spring-maps/crucible http://zero-k.info/Maps/Detail/58103 where a lava timer is a feature of the map itself. My timer would probably have to be a widget.

Is this anywhere on the right track?
+0 / -0

4 years ago
"Declare victory after X time for the team whose value of some function Y is the highest" sounds pretty map-independent so would ideally go into the game itself. The code would look more or less the same either way.
+0 / -0
Old Zero-K Dota had a similar feature. Once you lose your main base then no matter how many commanders and units you had you will still lose. You will need to ask PLrankRafalpluk about this and how did he manage to code. I think that also FIrankAdminAlcur has some knowledge about special win conditions on maps.
+0 / -0
4 years ago
...there was a zero k dota?
+1 / -0


4 years ago
PLrankAdminSprung did something: https://github.com/ZeroK-RTS/Zero-K/commit/905ae5ab580ef83ac18296c9d89b064a99619829

Note that a team is a set of controlled units. An allyTeam is a 'side'.
+0 / -0

4 years ago
If you just want to declare victory then use `Spring.GameOver`. The commit mentioned by AUrankAdminGoogleFrog is actually unrelated but as he says on github `GG.ResignAllyTeam` would be a decent alternative.
+0 / -0