Page 1 of 1
Stockpile API?
Posted: 04 Dec 2014, 16:30
by Pxtl
I was looking around in the Wiki and couldn't find anything about it, so I thought I'd ask - is there any granularity of control in stockpile-based weapons? Any way to manipulate it from Lua, set a maximum stockpile, etc?
I can't find anything. Is it just one of those abandoned blind-alleys that nobody cares about, or am I missing something?
Re: Stockpile API?
Posted: 04 Dec 2014, 19:35
by knorke
There is Spring.SetUnitStockpile & Spring.GetUnitStockpile
The commandID is CMD.STOCKPILE (
http://springrts.com/wiki/Lua_CMDs ) in case you want to block the command or something.
Re: Stockpile API?
Posted: 05 Dec 2014, 10:32
by Silentwings
Any way to manipulate it from Lua, set a maximum stockpile, etc?
http://imolarpg.dyndns.org/trac/balates ... _limit.lua is a stockpile limiter. It was one of this first things I wrote for Spring and could be done better, but that code works fine

Re: Stockpile API?
Posted: 05 Dec 2014, 17:15
by Pxtl
Thanks everyone, no idea how I missed all that stuff.
Re: Stockpile API?
Posted: 06 Jan 2015, 06:41
by Forboding Angel
The version in evo that I modified allows for more control over specific units and such:
https://github.com/EvolutionRTS/Evoluti ... EvoRTS.lua
Nothing special, but more useful.