Enhancement to superweapons - multifire and targetself

Bug #895972 reported by Marshall
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ares
New
Wishlist
Unassigned

Bug Description

SW.Multifire=yes should cause the super weapon to be fired from all buildings that house the super weapon.
SW.TargetSelf=yes should cause the super weapon to fire with a single click at the SW building.

Example:
[YAPSYT]
SuperWeapon=KillMCImmuneStuff

[KillMCImmuneStuff]
GenericWarhead.Warhead=KillMCImmuneStuffWarhead
GenericWarhead.Damage=10000
SW.Multifire=true ;new flag
SW.TargetSelf=yes ;new flag
AuxBuilding=TECH
RechargeTime=5

When a player owns a battle lab and multiple Psychic Towers, every 5 minutes they can click the SW icon to activate it. In the above example, the KillMCImmuneStuffWarhead is detonated at every psychic tower that player owns.

Revision history for this message
Chanterier (speederyr) wrote :

Sounds interesting.

Revision history for this message
WoRmINaToR (worminator) wrote :

SW.AITargeting=self already exists in Alex's SW feature branch. All we need for this usage case is a way to "Auto-target" without actually having the superweapon auto-fire. In other words, use the AITargeting for the target decision, but allow the player to choose when to fire by clicking the SW's button.

The SW-MultiFire= might be an interesting tag to play around with too

Revision history for this message
EricAnimeFreak (ericanimefreak) wrote :

I was thinking of posting a feature request for basically this, so I checked the logs to see if anyone else had already made the request. Seeing how a feature request already exists I'll state my reasons for wanting it as well.

For SW.Multifire=yes, this would allow me to make a few things possible which I've had to use clone and multiple building icons for, such as shield generators which fire automatically every so often, to shield any buildings nearby any active generators with the Shield SW. Also this can be used for repair towers put throughout base. Or many other things are also possible.

[SuperWeapon]►SW.Multifire= (boolean)
    Sets whether this super weapon should be launched by all buildings with this Super Weapon. Each building with this super weapon will fire a clone of this Super weapon. Defaults to no.SW.Multifire=

SW.TargetSelf=yes would also be helpful if I or someone in the community, wanted to make the super weapon auto target, but only after I told it to activate. This could be very useful. This would help balance my hacking satellites, and if I or anyone else chose to use repair towers and shield generators in their mods, "which might cost money to activate" that released a healing/shielding aura around base.

I also suggest this following tag "SW.AutoTargetFire=" isntead of SW.TargetSelf=yes, "as SW.TargetSelf=yes could be considered confusing by some".

[SuperWeapon]►SW.AutoTargetFire= (boolean)
    Sets whether this super weapon should be launched automatically after clicking the icon for the Super Weapon. If this is set to yes, the AI targeting options are used to infer the best target cell after the player has clicked the Super Weapons Icon. Defaults to no.SW.AutoTargetFire=

Revision history for this message
mevitar (mevitar) wrote :

@EricAnimeFreak:
Did you try SW.AITargeting=Self?

Revision history for this message
EricAnimeFreak (ericanimefreak) wrote :

Yes, but that does not work like SW.Multifire= would. If you have a super weapon and put it on multiple buildings, only the first one constructed will fire.

One of my thought was to ask for ares team to make SW.AITargeting=Self be respected like multifire would be, but a multifire tag is better as it allows aitargeting to be left alone but still allows the use of multiple clone sws. Each clone, superweapon, would use its own aitargeting per building basis.

Example if self was respected on aitargetingtypes it would help if i was making repair tower stations throughout base, but would not help if i wanted to build multiple missile silo's. With Multifire i can have 1 missile silo, with 1 weak missile or 5 silo's, with 5 weak combined missile strikes. If i Set them to autofire, it will strike via the aitargetting from each building, but if not, and left to the human to target, all building/missile silos with the super weapon will independently fire at your targeting coordinates in unison.

Also upon further thopught, another tag will be important for multifire sw clones.

[SuperWeapon]►SW.MultifireCost= (integer – credits)
    This many credits are added to the firing player's account when the super weapon is fired, regardless of how many Super weapon clones were fired. Use a negative number to subtract credits.SW.MultifireCost=
Note this tag will only work if SW.Multifire=yes.

If you do not use SW.MultifireCost= on a SW.Multifire=yes super weapon, it will use these default tags on the superweapon and charge you for each instance of the sw being used.

[SuperWeapon]►Money.Amount= (integer – credits)
[SuperWeapon]►Money.DrainAmount= (integer – credits)
[SuperWeapon]►Money.DrainDelay= (integer – frames)

Revision history for this message
cranium (cranium) wrote :

Also, in addition to this, maybe add a tag to allow multiple fired SW's to fire into seperate cells instead of just one cell or one type of building?. Like maybe
[SuperWeapon]
SW.Scatter=yes/no, If more than one of these SW buildings exist fire projectile/warhead into seperate cells. (scatter determined by CellSpread)?
Just a thought.

Revision history for this message
EricAnimeFreak (ericanimefreak) wrote :

I like and agree with SW.Scatter=, but not all multifire based SW's using multiple buildings with the same sw's are going to be using superweapons that are warhead based. So i agree it should be cell based like the lightning storms Lightning.Separation=.

I suggest this tag be added as well.

[SuperWeapon]►SW.Scatter.Separation= (integer – distance)
    The least number of cells between two cloned superwepons to better distribute superweapons. This is not the direct distance, but rather the sum of the differences of the x and y components. Values of 0 or lower will disable separation rules. Defaults to [SuperWeapon]►SW.Scatter.Separation=0

Lightning.Separation= defined for reference.

[SuperWeapon]►Lightning.Separation= (integer – distance)
    The least number of cells between two random clouds to better distribute damage. This is not the direct distance, but rather the sum of the differences of the x and y components. Values of 0 or lower will disable separation rules. Defaults to [General]►LightningSeparation.Lightning.Separation=

Revision history for this message
AlexB (alexander-b) wrote :

I think this system is too complicated. Multifire would work with a few SW types anyhow. There can only be one Lightning Storm or Psychic Dominator active at the same time. Sonar, Psychic Reveal, Iron Curtain and Force Shield are idempotent. It is impossible to unreasonable on the Chronosphere.

It makes only shallow sense on the Spy Plane and the Genetic Mutator, depending on coding. Paradrops and Unit Delivery would just double/triple/... the bunch of units created. The only SWs this makes sense are the Nuke and the Generic Warhead.

Adding Multifire is a quite large task, and too many things have to be accounted for - for very little gain. I don't want to do that. There is a request to have multiple SWs of the same type already, as well as many more. Next request will be to customize the separation behavior, then to have multiple types fired at once. It's bloated already and I really don't want to have code the flags to make the super weapons do your taxes or clean your garage.

In example codes I already see people use flags that don't belong on certain SW types. They can't hurt, can they? If Ares adds new features and five new tags just to control multifire, nobody will be able to code a SW properly, because they won't understand how to do this (some people hardly do now). Not saying adding features is bad, but is such complexity needed for a problem like this?

The initial request was to have SWs fire at their owner building. I coded something that's working already, but it isn't committed yet. It helps to solve the scenario where all buildings fire a weapon at themselves.

Revision history for this message
EricAnimeFreak (ericanimefreak) wrote :
Download full text (3.3 KiB)

I agree this is a feature and does not need a high priority, and your right, some superweapons would never need multifire support. I'm purely against wasted efforts on ares. Clone paradrops and unit delivery aren't very helpful accept in special casses and for the ai, clone paradrops can be done already by using the conventional method via regular sw cloning, although it might be a nice option.

As for the feature request for multiple superwepons on buildings, multifire is very different. It allows for higher customizations which are not currently possible via cloning sw's on a per building basis. For isntance multiple missles laucnhes or generic based sw's which fire at multiple locations etc.

And yes I'm aware of SW.AITargeting=Self, unless your referring to something else you're working on that I'm not aware of. It does indeed allow SW's to target their "building, Not Buildings*" of origin. Multifire would fix this by allowing all sw's on each building to fire independently at their Self. "this supposed logic is much like a firestorm accept when the SW is activated all building with the SW fire their sw at their intended targets, whether they be human or aitargeting defined. Of course I'd like another Tag which could do it, "maybe a new aitargeting type which targets buildings housing the sw," if you think there's a better way to implement it coding wise please think about doing that.

As for

[SuperWeapon]►SW.AutoTargetFire= (boolean)
    Sets whether this super weapon should be launched automatically after clicking the icon for the Super Weapon. If this is set to yes, the AI targeting options are used to infer the best target cell after the player has clicked the Super Weapons Icon. Defaults to no.SW.AutoTargetFire=

I almost think this should be a separate feature request. This would be nice feature.
At the moment we have:

SW.ShowCameo= (boolean)
    Sets whether this super weapon will appear in the side bar. This setting is ignored if SW.AutoFire=no is set. Defaults to yes.SW.ShowCameo=

This should not be ignored.

SW.AutoFire= (boolean)
    Sets whether this super weapon should be launched automatically even for human players. If this is set to yes, the AI targeting options are used to infer the best target cell. Defaults to no.SW.AutoFire=

This is fine

SW.ManualFire= (boolean)
    Sets whether this super weapon can be fired by the owning player. If set to no, the player will not be able to launch the super weapon. This setting is ignored if SW.AutoFire=no is set. Defaults to yes.SW.ManualFire=

This is good and should determine the outcome.

These are all fine and dandy but either I Don't understand them right, or they're screwed up.

This is what i Think should be the case but isn't in game, correct me if I'm wrong. Scnerio Below.

SW.ShowCameo=yes
The icon shows up

SW.AutoFire=yes
This SW will automatically fire itself if manualfire is set to no.

SW.ManualFire=yes

In this case you would think, the SW will auto fire itself but only when the human clicks the ICON. If this could be fixed, forgot about SW.AutoTargetFire=.

Anyways I understand not all feature requests will receiv...

Read more...

Revision history for this message
AlexB (alexander-b) wrote :

Yes, SW.AutoTargetFire= is a fine feature, and I thought implementing it already. It needs a reasonably small amount of work and serves a valid purpose: finding enemy subs using a sonar auto-targeting stealth stuff, or creating an auto-forceshield you could activate in case a nuke is launched, or to have costly paradrops send to your base only if you want to spend the money, or a psychic reveal that finds enemy bases. It is more complicated to do it right, like not using up the SW if there is no valid target, though.

ShowCameo=no has to be ignored if the SW is launched manually. Otherwise you couldn't fire it at all.

AutoFire=yes will fire the SW using AI targeting. ManualFire=no on the other hand is not to be confused with something like UseAITargetingIfPlayerClicksCameo=yes. It's purpose is not to select a target automatically. It exists to disallow players getting the SW cursor if an autofiring Lightning Storm can't be fired because there already is a LS active, or the AI hasn't elected a favourite enemy player to attack yet. I'm no fan of those "In weird case of X, the ManualFire will behave like this, otherwise it will do that. Does not apply if Z. Defaults to A for blah, to B otherwise. Don't use in combination with H unless stated otherwise. See Appendix D for more information". Nobody would get that.

So there has to be a new flag. Of course it is possible to use ShowCameo=yes, ManualFire=no and AutoFire=no to mean something special like "Show cameo, and when the user clicks, select target automatically and fire", but this is completely counter-intuitive.

Revision history for this message
Marshall (m-edward) wrote :

Is it possible to add Multifire as an option just for the generic warhead?
I imagine it would be quite simple to check for GenericWarhead.Multifire=yes and apply the same GW operations for each building that has the same super weapon.

At least while multiple buildings of the same type only ever create a single SW. But even if automatic multi-instance SWs are added in future, having GenericWarhead.Multifire=yes and MultiInstance=yes on the same SW would just make it uber powerful - it wouldn't actually break anything.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.