REQ: auto cancel producing unit

REQ: auto cancel producing unit

Discuss Lua based Spring scripts (LuaUI widgets, mission scripts, gaia scripts, mod-rules scripts, scripted keybindings, etc...)

Moderator: Moderators

User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

REQ: auto cancel producing unit

Post by manolo_ »

hi,

could somebody make a widget that cancels the building of an unit within a lab, when the lab has just (e.g.) 5% HP and the building-process of the unit is (e.g.) under 95%?

that widget would be usefull if your lab is nearly destroy and you will get the metal back for the built unit (that isnt finished yet)
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: REQ: auto cancel producing unit

Post by Pendrokar »

Cancel building one unit and then set factory to wait or stop all building queue? :?:
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: REQ: auto cancel producing unit

Post by manolo_ »

cancel and wait should be good, but does the lab start the production then but hold it (its important when cons assist, coz they will continue to build it), also it have to unwait after a definied time/hp....
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: REQ: auto cancel producing unit

Post by Pxtl »

Honestly, this is a "pointless decision" anyways. If a lab is facing imminent destruction, then you have two options:
1) Cancel construction
2) Be stupid.

There is no downside to (2), just a micro-management issue since you have to wait until you're positive the lab will be destroyed before cancelling building.

In other words, it's micro that adds nothing to the gameplay.

So, why not do it as a gadget? Obviously, BA won't do this because BA hates usability.

But for CA et al, it seems like a good idea to follow this simple logic: when a lab is destroyed with a unit under construction, the resources spent on the construction are reclaimed.
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: REQ: auto cancel producing unit

Post by Pendrokar »

Well factories don't get the entire damage from projectiles the constructing unit also does which lowers it's progress. At the end you would save like what 10 or 40 metal?

If you're building a Krogoth which is at 90% done and is attacked, you should be the one to determine whenever you should stop it(less than 95% probably was your idea to fix this right?)! Though what I don't like is that in Spring STOP doesn't act like in Supreme Commander where it stops all production...


But if you wish _manolo I can still make it!
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: REQ: auto cancel producing unit

Post by manolo_ »

yeah would be good, so cancel the production when the hp of the lab is under 5% and the unit-progress is under 90%
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: REQ: auto cancel producing unit

Post by CarRepairer »

Pxtl wrote:But for CA et al, it seems like a good idea to follow this simple logic: when a lab is destroyed with a unit under construction, the resources spent on the construction are reclaimed.
+1, this is the same logic behind storage. However, I believe it is only partially refunded as the cancellation of units within a factory is "free buildpower."
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: REQ: auto cancel producing unit

Post by Pendrokar »

Done. i finally understood why "right" option is needed when giving Orders.

5% is too low I set 10% as default

http://spring.jobjol.nl/show_file.php?id=2158
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: REQ: auto cancel producing unit

Post by manolo_ »

thx, i uploaded it to springdownloader
User avatar
Pressure Line
Posts: 2283
Joined: 21 May 2007, 02:09

Re: REQ: auto cancel producing unit

Post by Pressure Line »

fwiw, damaging something thats in construction with projectiles doesn't affect its completion %age.
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: REQ: auto cancel producing unit

Post by Pendrokar »

IIRC in some mods it did... :?
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: REQ: auto cancel producing unit

Post by manolo_ »

im getting this error message in xta:

error in unitdamaged() string .... :49 attemot to index local "factcmds" ( anil value)
User avatar
Pendrokar
Posts: 658
Joined: 30 May 2007, 10:45

Re: REQ: auto cancel producing unit

Post by Pendrokar »

I fixed it... :roll:
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: REQ: auto cancel producing unit

Post by TheFatController »

Pxtl wrote:So, why not do it as a gadget? Obviously, BA won't do this because BA hates usability.
I don't think getting an automatic metal refund when a factory gets destroyed building something is a good game feature :P
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: REQ: auto cancel producing unit

Post by Pxtl »

TheFatController wrote:
Pxtl wrote:So, why not do it as a gadget? Obviously, BA won't do this because BA hates usability.
I don't think getting an automatic metal refund when a factory gets destroyed building something is a good game feature :P
But a manual refund is?

It's the dictionary definition of pointless micro. The only reason *not* to do it is you don't have the widget. There is no downside.

If there is no reason not to do something, then it should be done automatically.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: REQ: auto cancel producing unit

Post by TheFatController »

There's still a risk imo, if a player chooses to use this widget then they also choose how these values are calibrated:
when the lab has just (e.g.) 5% HP and the building-process of the unit is (e.g.) under 95%?
I suppose in reality if a lab dies making a unit with more HP than the lab has and the buildframe has health remaining then the buildframe should remain damaged in the wreckage of the lab (+lab explosion damage) for units to reclaim or finish engineer style, which is possible but probably not essential!
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: REQ: auto cancel producing unit

Post by Regret »

Better players that pay attention are rewarded with a refund, newbies lose metal.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: REQ: auto cancel producing unit

Post by Pxtl »

Regret wrote:Better players that pay attention are rewarded with a refund, newbies lose metal.
That's twitch gameplay. If you want that, go play Gears of Quake Tournament.
Regret
Posts: 2086
Joined: 18 Aug 2007, 19:04

Re: REQ: auto cancel producing unit

Post by Regret »

Pxtl wrote:That's twitch gameplay. If you want that, go play Gears of Quake Tournament.
If you don't want that, don't play BA.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: REQ: auto cancel producing unit

Post by Caydr »

I understand very well where you're coming from Pxtl, but this is IMHO not an example of pointless micro. At what point does one draw the line and say "this is something that a human should have to do"?

Next someone will make a widget which, when a factory is at 94.99 percent damage, will automatically tell all units to hold fire for a second, then time all their firing to hit at the same instant and bypass the defender's widget. Would that be cheating? Or would that be "machine-assisted micromanagement"?

In my opinion widgets like these that are designed to work around a player's lack of awareness are cheating, plain and simple. This is because I balanced AA to have more than just the obvious resources of metal and energy. There are also duration, concentration, and knowledge. Duration is how long something takes in a linear sense, but more importantly concentration is how much effort it takes on the player's part in order to succeed. Knowledge, besides being skill, is also the awareness of vital intelligence through radar, etc.

An example being spies. If a widget was made which automatically moves spies to evade detection, would you be OK with it? I would consider it a severe cheat. That's because spies provide the player with information that can't be gathered in any other way, but they also require a great deal of concentration in order to use effectively. Of what value is knowing where your enemy's Vulcan is being built? Or where their nuke silo is? Or where their commander is? That is more than any amount of metal or energy, wouldn't you agree? It's enemy intel, knowledge.

Everything in a game is related, so when a widget is made which significantly alters the amount of any resource that's needed for a given action, I consider it a cheat. Automatically cancelling units when the factory they're being built in is about to be destroyed means you no longer need to monitor your base for such situations, and frees up your concentration for something that your enemy doesn't have concentration to balance against. So now his skill level is, in effect, being reduced by a widget. Maybe since you're not monitoring your base, you can micro a spy and self-destruct it near his factory, taking it out of the game for the immediate future.

That's cheating, and that's why I will never allow this widget or ones like it to be used with AA, and I hope TFC does the same with BA.
Post Reply

Return to “Lua Scripts”