Page 1 of 2

[suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 16:30
by Forboding Angel
Before the groaning starts, let me point out that supply caps perform a very real function other than just limiting attacking units. Anyone that has played *craft knows this, and anyone who isn't a noob in *crap understands it's function and how it dramatically affects gameplay by forcing you to be much more strategic and tactical in your unit choices rather than setting up a factory queue and spamming that same queue for the next 30 minutes.

Does anyone have any plans to create this ability? Does it already exist?

Ideally unit supply could be set in customparams of each unitdef.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 17:21
by smoth
why isn't this in game development?

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 18:09
by knorke
AllowUnitCreation allows to block a units creation.
So just keep count of things, something like

Code: Select all

local maxPop = {} -- maximum per [teamID]
local currPop = {)-- current per [teamID]
local hardLimit = 200 --no matter how many overlords, this is maximum of maximum

*some loop to set everything to zero*

function gaddget:UnitFinished (blabla)
	local cp = UnitDefs[unitDefID].customParams
	if not cp then return end
	maxPop[teamID] = maxPop[teamID] + cp.providepop or 0
	currPop[teamID] = currPop[teamID] - cp.usepop or 0
end

function gaddget:UnitDestroyed (blabla)
	local cp = UnitDefs[unitDefID].customParams
	if not cp then return end
	maxPop[teamID] = maxPop[teamID] - cp.providepop or 0
	currPop[teamID] = currPop[teamID] + cp.usepop or 0
end

function gaddget:AllowUnitCreation (blabla)
	local cp = UnitDefs[unitDefID].customParams
	if not cp then return true end
	if currPop[teamID] + cp.usepop > hardLimit then return false end
	if currPop[teamID] + cp.usepop - cp.providepop > maxPop[teamID] then return false end
	return true
end
unitdefs like

Code: Select all

supply depot:
customParams =
{
	providepop = 10,
}

space marine:
customParams =
{
	usepop = 1,
}

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 18:56
by Forboding Angel
Granted, this wouldn't show anything guiwise... but is it really that simple? O_o

Too bad I'm not at home. I'd tackle this in a heartbeat. :-(

3 more weeks

Does unitcreated take into account units that are given?
How to take into account units that are given? Would it just be yet another call like the others?

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 18:57
by FLOZi
http://springrts.com/wiki/Units-UnitDef ... Restricted ??

Or knorke's way if you don't want it per-unitdef.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 18:58
by Forboding Angel
Not the same, Flozi. Have you played *Crap before?

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 19:08
by FLOZi
No but if knorkes system is what you want then I imagine it is much like AoE. Also, BTL kinda has a system like this but it is based on energy, which is only produced/consumed by buying and losing units where some units 'weigh' more than others.

edit; for Given/Taken:

Code: Select all

function gadget:UnitGiven(unitID, unitDefID, newTeamID, oldTeamID)
  gadget:UnitDestroyed(unitID, unitDefID, oldTeamID)
  gadget:UnitCreated(unitID, unitDefID, newTeamID)
end
I might have mixed up the argument order but hopefully you get the idea (just forward the args to the other functions you already set up)

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 19:29
by Forboding Angel
Never played AOE but I imagine it's probably pretty similar.

Basically the way it works is that you have a max supply cap amount (in sc, it would be 200). Each mobile unit eats some supply (a variable amount, E.G. Stalker 2, Marine 1, Colossus 6, Skillray 3, etc) and buildings require none.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 20:04
by Google_Frog
To put it on the UI just use a teamRulesParam (is that a thing? I know that there is a version for unit and for game) and then make chili read it.

I don't see the difficulty. This is just AllowUnitCreation attached to a counter to keep track of creation and destruction. This should just skip over units in factory queues that take up too much supply cap.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 20:05
by luckywaldo7
AoE was similar but worse. Everything was one supply; supply structures only existed for the sake of supply (whereas ovies, pylons, and depots interact with the game through additional mechanics).

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 20:18
by SinbadEV
luckywaldo7 wrote:AoE was similar but worse. Everything was one supply; supply structures only existed for the sake of supply (whereas ovies, pylons, and depots interact with the game through additional mechanics).
I liked how the farms in Warcraft 2 were really effective walls. In AoE they just took up space... lot's of space.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 20:22
by Forboding Angel
Hmm, in evo I was thinking that because storage buildings basically act as capacitors, it would be neat if storage buildings acted as supply givers. In evo storage is really important, but noobs don't understand that, so this would be a way of killing 2 birds with one stone, and overbuilding on supply would be a good thing too because capacitors.

I like unit spamfests as much as the next OTA player, but I also like strategy and tactics involved in army composition.

In evo, using ORBS as nanoturrets, you could essentially have both (meaning that using orbs you can crap out units extremely fast).

Also, supply amounts, by their very nature, have a way of introducing timings, and also introduce another aspect of screwing your enemy. Currently energyscrewing is a valid tactic, supplyscrewing would be another more valid tactic.

So yeah, I have a few pretty legit reasons for wanting this.

ATM I'm out of town on business and can't really do anything till june19th when I get back, but I thought I would get the ball rolling, cause iirc ZK was discussing supply caps as well as a potential gameplay element. Figured that by raising the subject, I kill two birds with one stone and get outside ideas/opinions at the same time. :-)

If no one else has tackled this by then I'll definitely give it a whirl. I think it would do a lot to shape gameplay in a positive light (assuming that implementation into games isn't terrible).

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 20:31
by Beherith
Flow based economy makes times much more diluted.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 04 Jun 2013, 21:19
by Forboding Angel
Yes, but not irrelevant. Moreover it serves as a meter with which you can measure overall strength.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 05 Jun 2013, 04:42
by zwzsg
IIRC you can do Supply Cap with my tech gadget (with negative ProvideTech and RequireTech).

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 05 Jun 2013, 07:40
by Forboding Angel
The negative stuff doesn't work very well in the tech gadget. Tends to be really erratic.

Even so, this should be it's own entity, not something shoehorned into something else.

If for no other reason, Cleanliness.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 05 Jun 2013, 07:59
by Google_Frog
I think supply on energy storage would be boring on Evo exactly because it kills two birds with one stone. Storage is currently a way of storing up a burst of damage to be unleashed when your armies meet. It can be an interesting choice as to how much you want to spend on increasing the size of your burst damage. If you have a lot of storage it gives your army sustained high damage over some time.

So there is a choice there, storage has a good purpose but there is no prescribed amount you need to make. Maybe you want to play with many small armies attacking at different locations at different times, this would not require much storage to do. On the other hand you may want to make a lot of storage and not much energy if you have a very skirmishy army.

Directly linking army size to storage count removes this choice. By leading people by the hand towards a reasonable way to play you lose diversity. There is no longer a significant storage difference between large armies of different sizes. One will rarely be at an advantage through having much more energy storage. They will both have a minimum baseline.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 05 Jun 2013, 23:35
by Forboding Angel
Wow. That's actually a really excellent point. Thanks for the insight, I need to think this through so more.

On the one hand it makes it much more noobfriendly (technically?), but on the other hand, the thought of it being a very real choice is very compelling.


Interestingly enough, I also think that a supply cap will have the effect of narrowing the skill gap between vets and newer players.

Maybe not so much that it would make a huge difference, but I like games where the ability of noobs vs vets is more narrow than something like sc2 or even sc. In sc it's all about mechanics and how good you are at real world things like having a high apm with high accuracy, etc etc, multitasking, bla bla. I think that spring games tend to minimize the overall impact of those points.

That said, better mechanics is better mechanics. by default a player with better mechanics will outperform a player with poorer mechanics, but in spring games, due to the way spring works and all our various widget/gadgetry, someone with bad mechanics can very well beat a superior player.

The overall effect being a narrowing of the skill gap between the two types of players.

My description is terrible and crappy, but I'm pretty sure that you understand what I mean.

Let me say it another way... The tools in evo/spring allow me to occasionally beat godde, even though as a player, I am nowhere near as good. :mrgreen:

A game that did this very very well (the best I have seen to date, imo) was RUSE. RUSE was all about how you played the game, your strategy and your tactics, as opposed to how fast your could act and how accurate your clicks were (I'm overgeneralizing).

Anyway, I went 50 miles offtopic, but your point is really good, Google.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 06 Jun 2013, 01:45
by knorke
Forboding Angel wrote:Let me say it another way... The tools in evo/spring allow me to occasionally beat godde, even though as a player, I am nowhere near as good. :mrgreen:
I doubt that is because of the tools in evo/spring. The "tools" of zK only differ in details (custom formation widget and such are the same) so if this was true, you would also be able to occasionally beat godde in zK.
I assume that this would not happen.

Re: [suggestion][idea][request][annoyingtag] Supply Cap

Posted: 06 Jun 2013, 16:00
by Google_Frog
Storage with supply cap would narrow the skill range with respect to strategic skill. This in some way makes mechanical skill even more important because there is less to gain through strategy. As in if you make your game strategically simpler you lower the strategic skill ceiling so the mechanics become much more important sooner.

This is not to say that supply is bad idea. It might work out well on some dedicated supply structure. This would encourage people to use their armies more quickly. With the state of play as it is I think defences should require supply as well. Be careful with adding these mechanics though, if supply is too cheap then you've just added an attention task. This will only increase the number of tasks you have to do to keep up. So my advice is that if you add a supply building make it expensive enough to be important.