Population Cap Gadget
Moderator: Moderators
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Population Cap Gadget
I've posted on this before, but basically here is what I want:
Per player supply cap (variable amount of course, preferably a modoption).
Per unit supply usage (using customparams)
So for example, with a supply cap of 100, in the unitdefs, I would define something like supply = 2, for that unit, so you could have 50 of them.
The ability to limit supply available using units (a la starcraft protoss pylons). In other words, lets say total supply cap is 100. I could designate units to be supply givers ( supplygranted = 8, ) which would grant more supply up to the total cap (but not over), or I could just turn that off and have all supply available from the start.
Chili widget visualizing it
In my mind, it would look like the resource bars, except, it would have a little icon and a number xx/yy next to it, and a bar with the current supply listed, and the bar would fill up depending on the total supply and would start flashing red when you get within X (variable number) of the supply cap. This would be it's own UI element, draggable and resizable.
Portability to other projects
It should be able to be used in any game that uses chili (for the gui portion)
I'm willing to donate some cash (50 bucks?) or other services, such as making CEGs, Maps, Videos, etc, to make this happen. I really really want this, and I'm tired of trying on my own and failing. I simply don't understand enough about lua to do it on my own (even hacking it together), and I honestly simply can't afford the time that it would take to learn how to do it (can't really afford the money either, but this is important enough to me that I'll do it). If I had unlimited time to throw at it, I would happily do that in order to learn, but I simply don't (I already feel guilty as hell about spending some hours playing games this weekend instead of working) , so I'm pretty much resorting to whatever I can to try to make it happen.
Anyone interested at all? I realize that there is some bias against people putting money bounties on features, and I understand that. That's why I say I will happily render other services (this would be far better for me anyway) if for whatever reason money is inappropriate.
Per player supply cap (variable amount of course, preferably a modoption).
Per unit supply usage (using customparams)
So for example, with a supply cap of 100, in the unitdefs, I would define something like supply = 2, for that unit, so you could have 50 of them.
The ability to limit supply available using units (a la starcraft protoss pylons). In other words, lets say total supply cap is 100. I could designate units to be supply givers ( supplygranted = 8, ) which would grant more supply up to the total cap (but not over), or I could just turn that off and have all supply available from the start.
Chili widget visualizing it
In my mind, it would look like the resource bars, except, it would have a little icon and a number xx/yy next to it, and a bar with the current supply listed, and the bar would fill up depending on the total supply and would start flashing red when you get within X (variable number) of the supply cap. This would be it's own UI element, draggable and resizable.
Portability to other projects
It should be able to be used in any game that uses chili (for the gui portion)
I'm willing to donate some cash (50 bucks?) or other services, such as making CEGs, Maps, Videos, etc, to make this happen. I really really want this, and I'm tired of trying on my own and failing. I simply don't understand enough about lua to do it on my own (even hacking it together), and I honestly simply can't afford the time that it would take to learn how to do it (can't really afford the money either, but this is important enough to me that I'll do it). If I had unlimited time to throw at it, I would happily do that in order to learn, but I simply don't (I already feel guilty as hell about spending some hours playing games this weekend instead of working) , so I'm pretty much resorting to whatever I can to try to make it happen.
Anyone interested at all? I realize that there is some bias against people putting money bounties on features, and I understand that. That's why I say I will happily render other services (this would be far better for me anyway) if for whatever reason money is inappropriate.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Population Cap Gadget
Sure, I'll happily donate it there if whoever does it wishes. In fact that would be excellent and help everyone all the way around.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Population Cap Gadget
You donated - it's great! but will someone implement what you need?
Re: Population Cap Gadget
Can't you read commits? They have.
Re: Population Cap Gadget
I want big great armies. With zervers multithreading engine, there is a possibility for it and no need for any cap at all. Why have a gap when there is no need?
Last edited by gajop on 12 Nov 2013, 23:57, edited 1 time in total.
Reason: removed link: (points to a page with rtsmp links which are not allowed here)
Reason: removed link: (points to a page with rtsmp links which are not allowed here)
-
- Posts: 1398
- Joined: 17 Sep 2008, 04:36
Re: Population Cap Gadget
1) There can be gameplay reasons for population caps not related to hardware limitations.pnöpel wrote:I want big great armies. With zervers multithreading engine, there is a possibility for it and no need for any cap at all. Why have a gap when there is no need?
2) Spamming random threads with snarky, off-topic remarks in an effort to plug zerver's engine reflects very poorly on whatever community you are trying to build.
Re: Population Cap Gadget
This, although I'd emphasize 1). Have you heard of Starcraft?luckywaldo7 wrote: 1) There can be gameplay reasons for population caps not related to hardware limitations.
2) Spamming random threads with snarky, off-topic remarks in an effort to plug zerver's engine reflects very poorly on whatever community you are trying to build.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Population Cap Gadget
That's nice, but as waldo says, there are a lot of great reasons for population caps.pnöpel wrote:I want big great armies. With zervers multithreading engine, there is a possibility for it and no need for any cap at all. Why have a gap when there is no need?
Wrt big armies, in sc2 a 200/200 army is very large. As zerg or terran, even larger than brotoss.
You may like spending 30 minutes to build a massive army, but I would much rather build and lose a massive army every 1.5 minutes, E.G. Evo. It's a lot more fun to have a bunch of massive armies won or lost in a shorter period of time, than spend forever building up one massive army, just to lose it in 1 minute or so.
I'm not going to bother to go into detail though.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Population Cap Gadget
Hmm, as a result of the gui widget, I am getting this error occasionally.
I set max supply to 100 and intrinsic to 0, and I got the error message once when I got the supply count up to 100 then I didn't get it again.
Unfortunately it's such a generic message that I can't figure out what is causing it.
I set max supply to 100 and intrinsic to 0, and I got the error message once when I got the supply count up to 100 then I didn't get it again.
Code: Select all
[f=0009001] Error: LuaRules::RunCallIn: error = 2, DrawScreen, [string "LuaRules/Gadgets/libs/FillModSpecific.lua"]:5: attempt to perform arithmetic on a nil value
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: Population Cap Gadget
Are you sure the widget causes that bug? It says luarules.
Re: Population Cap Gadget
Hmm, this is a bug from my code: I have a line that tries to parse the version number of Spring, and because the format of the version changed, (and my code wasn't robust), it breaks.
Your error message mention the file: FillModSpecific.lua and the line number: 5
So open the file \LuaRules\Gadgets\libs\FillModSpecific.lua
Look at line 5. It goes:Replace it by:Et voilà, fixed.
Yeah, my pattern to extract a version number out of the version string is a bit horrible. Then I suppose you don't really care about engine older than 0.8, so you could have fixed it by just removing the choice in the "if".
Your error message mention the file: FillModSpecific.lua and the line number: 5
So open the file \LuaRules\Gadgets\libs\FillModSpecific.lua
Look at line 5. It goes:
Code: Select all
local version=tonumber(string.match(Game.version,"^(%d+%.%d+)"))+(string.match(Game.version,"^[%d%.]+(%+)") and 0.009 or 0)
Code: Select all
local version=tonumber(string.match(Game.version,"^(%d+%.%d+)") or string.match(Game.version,"^(%d+)") or 100)+(string.match(Game.version,"^[%d%.]+(%+)") and 0.009 or 0)
Yeah, my pattern to extract a version number out of the version string is a bit horrible. Then I suppose you don't really care about engine older than 0.8, so you could have fixed it by just removing the choice in the "if".
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Population Cap Gadget
Awesome, thanks Z 

- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Population Cap Gadget
Found a bug.
When I give units to my enemies, the supply doesn't get removed from my used supply.
I need to remove sharing to enemies from evo anyway, but yeah, bug is a bug.
When I give units to my enemies, the supply doesn't get removed from my used supply.
I need to remove sharing to enemies from evo anyway, but yeah, bug is a bug.
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Population Cap Gadget
Found a bug. If you give a unit that provides supply to an ally, you keep the supply, they get the unit and none of the supply.
Edit: So apparently giving units that provide supply is jsut plain borked.
Edit: So apparently giving units that provide supply is jsut plain borked.
Re: Population Cap Gadget
I didn't even look at the code, and I do not know how it works, but from the sound of your description I can tell a fix would be to add at the end of the synced part of your gadget:
Code: Select all
function gadget:UnitTaken(u,ud,team,newteam)
gadget:UnitDestroyed(u,ud,team)
end
function gadget:UnitGiven(u,ud,team,oldteam)
-- Either one of the other, depending which exists in your gadget:
gadget:UnitCreated(u,ud,team)
gadget:UnitFinished(u,ud,team)
end
Re: Population Cap Gadget
Smart peoples automatically generate the supply cap.
It can already be annoying to set all wreckages manually to 100% hp, 50%m, etc. for 50+ units.
(Or energy=metal, time=metal, for build costs)
Each unit could cost 5+ metal/100 if you prefer bigger units (1* 1200m <-> 2* 100m).
It can already be annoying to set all wreckages manually to 100% hp, 50%m, etc. for 50+ units.
(Or energy=metal, time=metal, for build costs)
Each unit could cost 5+ metal/100 if you prefer bigger units (1* 1200m <-> 2* 100m).
- Forboding Angel
- Evolution RTS Developer
- Posts: 14673
- Joined: 17 Nov 2005, 02:43
Re: Population Cap Gadget
@neon
That would be relevant, if you knew what you were talking about, that is.
Edit: I just read your post 4 times... what are you talking about? DId you post in the wrong thread?
That would be relevant, if you knew what you were talking about, that is.
Edit: I just read your post 4 times... what are you talking about? DId you post in the wrong thread?