Big Request No. Two: Upgrade System
Posted: 25 Feb 2007, 16:29
Yup... let's talk about this topic.
Upgrade systems (global, individual units) are one of the major game design features Spring lacks. Please, do not clutter this thread with stuff about how upgrades suck- I am not proposing anything that would ever be used for a traditional mod like BA.
That said... let's talk about specific issues:
1. Upgrades need to be of two types: global replacement of Units with other Units, and singular per-unit upgrades that affect one Unit, also by replacing it and passing on certain important gameplay variable values to the new Unit. So far as I am aware, this is 100% OK in Spring- .take/.give will allow for such behavior. And, unlike actually changing Unit variable values for a particular user, which will (and should) cause desync, this should be completely compatible with existing code.
2. The secondary issue is one of UI- how do we provide Upgrade buttons inside of a Builder to give them ability to initiate these changes? How do we hook into the existing UI callouts and make this seamless and integrated with a mod?
My idea on this is very straightforward. Since the LUA GUI code can add/subtract Build icons for any Unit (I don't believe that Builder must == 1 but I'll await confirmation) and since LUA can do things like internal timers outside the normal game-state code, it's perfectly possible to have upgrades that merely cost time, for example. Doing upgrades that cost Metal or Energy, on the other hand, will be a bit harder. We'll need units that can Upgrade that way to have Builder == 1, workerTime != 0, and a buildDistance != 0 (however, a value of 1 is, for all practical purposes, 0) and a buildable "unit" that actually passes a LUA GUI callout when complete, replacing the previous Unit with the new one.
So... to rehash, and give a visual aid, for those who're wondering what I'm wanting, exactly... here's the path for the two types of Upgrade I would like to see made possible (I know that they're theoretically available now, I'm basically asking for somebody to please be a super cool and write this so that modders have it available to put into their mods):


Upgrade systems (global, individual units) are one of the major game design features Spring lacks. Please, do not clutter this thread with stuff about how upgrades suck- I am not proposing anything that would ever be used for a traditional mod like BA.
That said... let's talk about specific issues:
1. Upgrades need to be of two types: global replacement of Units with other Units, and singular per-unit upgrades that affect one Unit, also by replacing it and passing on certain important gameplay variable values to the new Unit. So far as I am aware, this is 100% OK in Spring- .take/.give will allow for such behavior. And, unlike actually changing Unit variable values for a particular user, which will (and should) cause desync, this should be completely compatible with existing code.
2. The secondary issue is one of UI- how do we provide Upgrade buttons inside of a Builder to give them ability to initiate these changes? How do we hook into the existing UI callouts and make this seamless and integrated with a mod?
My idea on this is very straightforward. Since the LUA GUI code can add/subtract Build icons for any Unit (I don't believe that Builder must == 1 but I'll await confirmation) and since LUA can do things like internal timers outside the normal game-state code, it's perfectly possible to have upgrades that merely cost time, for example. Doing upgrades that cost Metal or Energy, on the other hand, will be a bit harder. We'll need units that can Upgrade that way to have Builder == 1, workerTime != 0, and a buildDistance != 0 (however, a value of 1 is, for all practical purposes, 0) and a buildable "unit" that actually passes a LUA GUI callout when complete, replacing the previous Unit with the new one.
So... to rehash, and give a visual aid, for those who're wondering what I'm wanting, exactly... here's the path for the two types of Upgrade I would like to see made possible (I know that they're theoretically available now, I'm basically asking for somebody to please be a super cool and write this so that modders have it available to put into their mods):

