My ideal shield behaviour

My ideal shield behaviour

Requests for features in the spring code.

Moderator: Moderators

Post Reply
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

My ideal shield behaviour

Post by TheFatController »

** Note: This is topic is not to discuss the balance of BA shields **

Currently shields (at least how they're set up in BA) seem to work like this:
- Shield charges power which takes energy.
- Shield deflects projectiles and takes a fixed amount of energy per shot and takes a dynamic amount of power per shot.

1) Shield will let in a shot at full power if there's not enough energy to deflect it.
2) Shield will let in a shot if they don't have enough power to deflect it without using that power. eg. at 20% power if the shot takes >20% to deflect the shield will let it in and stay at 20%.


The way I want shields to work is to only ever let in shots if the power is at 0% and the shield is visibly red and this could be accomplished in two ways:

- For point 1 above add the option to take any excess energy from the shields power reserve before it lets a shot in, so the energy cost is eaten by taking extra power and the shield only lets the projectile in at 0% power. For point 2 this is a simple bug fix, the shield should go to 0% power as it lets in a shot that's too powerful to deflect.

- The other option would be to add a ProjectileInsideShield callin which contains the shield id,team etc and the projectile Id and weapon Id and team, this would be called every frame the projectile is inside a shield and you could return 0 for let it though, 1 for absorb and 2 for deflect for example, a new fbi def would need to be added to the shield to turn off the engine handling and allow you to purely lua-ise it.

Either of these changes would be great as there's no real way to have shields as they are without letting in shots while green which is unintuitive.

Thanks
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: My ideal shield behaviour

Post by Caydr »

Doesn't the shield just need more total power so the changing power state is more easily visible? Or am I misunderstanding?
User avatar
Spawn_Retard
Posts: 1248
Joined: 21 Dec 2006, 14:36

Re: My ideal shield behaviour

Post by Spawn_Retard »

Caydr wrote:Doesn't the shield just need more total power so the changing power state is more easily visible? Or am I misunderstanding?
your miss reading.

currently, if a shot with high enough damage goes through a shield that doesnt have enough power, it will allow the shot to pass through and not effect the state of the shield.


e.g.

Shot = 31 % damage

Shield is 30%

shot goes through, and the shield stays at 30%.

He wants shields to hit 0% before they let any shot in.

so regardless of the shot damage, it could be 100% and you only have 1% that shot will take the shield out without damaging anything inside.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: My ideal shield behaviour

Post by lurker »

If you mean shields should do a partial deflection down to 0% charge, I agree with that change, but if you don't, you have to realize that it's not a bugfix if, for example, an incoming tacnuke could drop a shield from 60% to 0% without changing course.

And remember that there is a severe bug where a shield needs 30 frames of repulsion charge to repulse at all.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: My ideal shield behaviour

Post by TheFatController »

lurker wrote:If you mean shields should do a partial deflection down to 0% charge, I agree with that change
That'd have to be the case yeah for realism and to make any sense
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: My ideal shield behaviour

Post by Argh »

I'd prefer if a Shield that cannot block a given shot, the shot goes through and the Shield goes back to zero, myself. I can't recall whether the shield's state can be manipulated via Lua, so I'll have to look at that and see if it's possible to do it that way.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: My ideal shield behaviour

Post by lurker »

Even if the shield is nearly full? Really? I could see the shield going down for a couple seconds, but having to recharge most of the way seems extreme.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: My ideal shield behaviour

Post by Argh »

No, only if the Shield had less power than it needed to repulse.

I.E., if it takes 20%, you have 19%... currently, the shot just goes through, no penalty to the Shield recharge, which looks rather funky when you have Shields with a fast-enough recharge rate or a broad range of things they can intercept. Better to knock it down again, imo- more intuitive.

Best yet, if it multiplied that percentage of the required power from the resulting damage (i.e. damage = damage * powerAvailable / powerRequired), then a hit on a part-charged Shield would still provide some protection as it dropped, which would be intuitive and look correct as well.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: My ideal shield behaviour

Post by lurker »

Okay, you don't seem to be reading my post very clearly. If a heavy weapon needs a shield that's almost full to block, say 75%, and the shield is at 70%, to me it would be crazy to drain that shield. I would have nothing against the shield turning off for 2-3 seconds as it's overwhelmed, but to have to recharge after not touching the weapon is just weird.

Your other possibility of making the shot do less damage after breaking a shield is interesting, but I don't think it would work out very sensibly. A missile coming through a shield visibly intact but then only doing a fraction of normal damage?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: My ideal shield behaviour

Post by Argh »

A missile coming through a shield visibly intact but then only doing a fraction of normal damage?
Trigger the shield going down at the point it checks that interception (since that happens every frame anyhow) and then the visual behavior would match the observed behavior.

As for the 70% vs. 75%... yes, I think it should knock that Shield down. I mean... these are "force shields". They are supposed to block damage and repel objects. If an object has greater force than the shield can block, it shouldn't magically just go through. The Shield should be overwhelmed, as it's still above the capacity. IRL, a force field such as a magnet doesn't magically quit interacting with other objects simply because they're too large or are moving too fast- it simply has less effect.

When shots go through, but visually the Shield looks intact (and it's harder to tell than you'd think, in the heat of battle) then it causes issues.

As an alternative... with repulsor shields, if they simply repulsed less as their percentage of available force dropped below the threshhold, then were reduced to zero, that would also make sense. So a plasma shell would be slowed down, but not moved away, for example.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: My ideal shield behaviour

Post by lurker »

'Less effect' than an instant detonation would still probably screw the shot up very visibly. If it can't do that, let it 'knock down' the shield for a moment, sure, but don't drain it to 0% so it takes 20 seconds to charge back.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: My ideal shield behaviour

Post by Argh »

'Less effect' than an instant detonation would still probably screw the shot up very visibly. If it can't do that, let it 'knock down' the shield for a moment, sure, but don't drain it to 0% so it takes 20 seconds to charge back.
It doesn't have to take 20 seconds. It uses the variable shieldRechargeDelay, IIRC. That's a mod-side issue, basically, in terms of how big of a deal "shield down" is.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: My ideal shield behaviour

Post by lurker »

My point is that a large amount of charge shouldn't disappear while doing nothing, or nothing visible.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: My ideal shield behaviour

Post by Google_Frog »

Could there be another shield mode that looks like reflect but drains like absorb? Reflecting different weapon types can vary widely from type to type making using reflection shields impractical against multiple weapon types. Something as simple as a projectile paying an up-front cost in shield power( equal to it's damage, the way absorber shields work) and then once that cost is paid the projectile is reflected/deflected for free by that shield.

Since people want lots of different things from shields it might be a good idea to lua-ise it.
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: My ideal shield behaviour

Post by TheFatController »

Google_Frog wrote:Since people want lots of different things from shields it might be a good idea to lua-ise it.
- The other option would be to add a ProjectileInsideShield callin which contains the shield id,team etc and the projectile Id and weapon Id and team, this would be called every frame the projectile is inside a shield and you could return 0 for let it though, 1 for absorb and 2 for deflect for example, a new fbi def would need to be added to the shield to turn off the engine handling and allow you to purely lua-ise it.
Something like this would be the best way forward imo
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: My ideal shield behaviour

Post by Pxtl »

So how would one prevent flimmering shields? Have shields go into negative? That is, the first nuke-hit is blocked, but it knocks the shield into -200% and so the player has to wait 2x full charge time before it will stop anything at all?
User avatar
TheFatController
Balanced Annihilation Developer
Posts: 1177
Joined: 10 Dec 2006, 18:46

Re: My ideal shield behaviour

Post by TheFatController »

It wouldn't go below 0%
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Re: My ideal shield behaviour

Post by Caydr »

I think he's making a suggestion about how it could be changed. Actually what he said makes a bit of sense.
Xeroxyster
Posts: 25
Joined: 16 Aug 2009, 01:31

Re: My ideal shield behaviour

Post by Xeroxyster »

I like these two Ideas:
Argh wrote:damage = damage * powerAvailable / powerRequired
Google_Frog wrote:...and then once that cost is paid the projectile is reflected/deflected for free by that shield.
My concern is that if the shield loses charge you must gain something in return. Also, If it can soften the blow of a projectile it should. My example below nests so that if there is a shield within a shield then together they can stop a projectile even if neither could alone.

my newbie example in lisp! :lol: :

Code: Select all

"damage_plasma is the damage the projectile would cause on impact.
charge_plasma is the amount of shield-charge needed to reflect the projectile
charge_shield is the amount of shield-charge the shield currently has."

(cond
 ;shield has enough to reflect
   (
       (=< charge_plasma charge_shield)
       (set! charge_shield (- charge_shield charge_plasma))
       (reflect)
    )
 ;shield doesn't have enough
   (
       (> charge_plasma charge_shield)
       (set! damage_plasma (*damage_plasma (/ charge_shield charge_plasma)))
       (set! charge_plasma (- charge_plasma charge_shield))
       (set! charge_shield 0)
   )
)
I have never understood the shield<->missile interaction. But even as unintuitive as it is, perhaps missiles/rockets should act the same way as plasma?
Saktoth
Zero-K Developer
Posts: 2665
Joined: 28 Nov 2006, 13:22

Re: My ideal shield behaviour

Post by Saktoth »

#1 is due to the shieldenergyuse tag. If you remove this tag, you should get something approximating the behaviour you desire.

There is really little point having the shield drain 'extra energy' from its power reserves if you have no energy in storage to fulfill the shieldenergyuse requirements: The shield drains power when hit anyway, unless you somehow want the shield to somehow charge faster when actively defending (Which is, essentially, what you're asking).

In addition, shieldenergyuse, being a flat cost, is why EMG drains your e to nothing (but doesnt drain the shield) when there is no real reason for it to do so- the flat cost is applied per projectile, so there are other reasons to remove this tag.

#2 is kinda weird. It seems to be some redundant leftover piece of code for solid-type shields, that doesnt block the projectile if the power is below the damage threshhold. However, for a respulsor, the power drained is not the whole damage of the projectile, but only a fraction of it (because it drains it while the projectile is inside the shield, rather than instantly). So checking whether you have more power than the projectile has damage to see whether you block the whole shot when it first enters the shield is unnecessary, since the repulsor wont need this much to deflect anyway.
Post Reply

Return to “Feature Requests”