D-Gun unstall widget
Moderator: Moderators
So, to clarify because I am potentially dumb: It stops all your building for 10s every time you dgun? That doesn't seem terribly useful to me.Masure wrote:Yeah there is no smart E excess control.LordMatt wrote:Hmm dunno how I feel about this widget, but I'll try it out anyways.Does it stop things from building even if you have a lot of e though?
I think D-Gun unstall is an emergency behaviour, no matter if you waste E for 10s.
That would be great to control E smarter but, harder to dev.
- 1v0ry_k1ng
- Posts: 4656
- Joined: 10 Mar 2006, 10:24
- FrOzEnTaCo
- Posts: 81
- Joined: 02 Jul 2008, 05:52
Re: D-Gun unstall widget
lurker wrote:You can do whatnow?Masure wrote:sets builders and factories to wait
press the ''w'' key to make a factory or building ''wait''. it will pause everything. press the ''w'' key again to unpause it. if you hold shift, you will see a ''wait'' icon indicating that the building or builder is paused
Re: D-Gun unstall widget
I hate necroing threads, but currently the dgun unstall widget only works if you do a /luaui reload or an f11+remove+add widget. I was trying to find a workaround to this by making it look for the commander, but the widget still fails unless reloaded:
I have added in game (after 5 secs of ingame time) commander detection, then it manages to detect a comm, but the parsing line never gets called unless the widget is reloaded.
Code: Select all
for _, comID in ipairs(coms) do
Spring.Echo("parsing for dgun order")
bDgunOrder = findCmdId(comID, CMD.DGUN)
if bDgunOrder then
break
end
end
Re: D-Gun unstall widget
Hi Beherith,
I haven't used/modified this widget since its release (which version of Spring and BA > I don't know). Shame on me cause it wasn't far from being fully operational.
However I'm surprised cause as far as I remember, I never had issues with Com detection. The only issue I remember was the "de-waiting" of a unit type (metal maker I think).
Maybe the issue you're talking about appeared in our current releases of Spring and BA. I'll give it a look.
No matter you necroed that thread, It's cool indeed.
I haven't used/modified this widget since its release (which version of Spring and BA > I don't know). Shame on me cause it wasn't far from being fully operational.
However I'm surprised cause as far as I remember, I never had issues with Com detection. The only issue I remember was the "de-waiting" of a unit type (metal maker I think).
Maybe the issue you're talking about appeared in our current releases of Spring and BA. I'll give it a look.
No matter you necroed that thread, It's cool indeed.
Re: D-Gun unstall widget
Code: Select all
function widget:Initialize()
local _, _, spec = Spring.GetPlayerInfo(MyTeamId)
if spec then
widgetHandler:RemoveWidget()
return false
end
local units = Spring.GetTeamUnits(MyTeamId)
for _,UID in ipairs(units) do
local UDID = Spring.GetUnitDefID(UID)
local UD = UnitDefs[UDID]
if (UD == nil) then break end
if (UD.TEDClass == "COMMANDER") then
table.insert(coms,UID)
end
end
end
function widget:UnitCreated(unitID, unitDefID, unitTeam)
local UD
UD = UnitDefs[unitDefID]
if (UD.TEDClass == "COMMANDER") then
table.insert(coms,UID)
end
end
function widget:UnitGiven(unitID, unitDefID, unitTeam)
local UD
UD = UnitDefs[unitDefID]
if (UD.TEDClass == "COMMANDER") then
table.insert(coms,UID)
end
end
function widget:UnitDestroyed(unitID, unitDefID, unitTeam)
for comIndex,comID in ipairs(coms) do
if (unitID == comID) then
table.remove(coms,comIndex)
break
end
end
end
function widget:UnitTaken(unitID, unitDefID, unitTeam)
for comIndex,comID in ipairs(coms) do
if (unitID == comID) then
table.remove(coms,comIndex)
break
end
end
end
Stay tuned :D
Re: D-Gun unstall widget
I used this widget for a little bit, but I have some ideas for seriously improving it.
Allow players to set a minimum energy level that economic units will simply not violate. I'll illustrate this with an example:
I drag a slider on my energy bar (similar to the one that autoshares) up to 500. As soon as my energy decreases to that point, my buildings and units currently under construction would "stall" like they do normally, but I will still have that 500 energy below my slider left untouched. That 500 e can only be accessed by weapons fire, and e will be prioritized to charge up to 500 before construction can resume.
So, it's sortof like setting a new bottom line for your stall point. Everything having to do with construction and metal maker usage will use that point as the bottom line, while your weapons and such can still dip into your reserves in order to fire. This way, even early ingame, I can ensure that my dgun will be able to fire at least once upon command, and I won't have to wait for energy to charge up.
Allow players to set a minimum energy level that economic units will simply not violate. I'll illustrate this with an example:
I drag a slider on my energy bar (similar to the one that autoshares) up to 500. As soon as my energy decreases to that point, my buildings and units currently under construction would "stall" like they do normally, but I will still have that 500 energy below my slider left untouched. That 500 e can only be accessed by weapons fire, and e will be prioritized to charge up to 500 before construction can resume.
So, it's sortof like setting a new bottom line for your stall point. Everything having to do with construction and metal maker usage will use that point as the bottom line, while your weapons and such can still dip into your reserves in order to fire. This way, even early ingame, I can ensure that my dgun will be able to fire at least once upon command, and I won't have to wait for energy to charge up.