Monday, April 23, 2012

Multi-Layeryed Bubble Shield?

I know how to make a plain Bubble shield, But I was wondering, if anyone knew how to make like... a Bubble Shield that has 3 layers? I have been trying to figure out a way to do it myself, but I cant seem to find the solution X-x
Anyone?|||Someone did this a few months ago.
It may have been Seiya.|||BulletMagnet|||Is it possible to just added 2 extra shield meshes in the the code?|||brandon007|||What's your goal with this? Keep in mind that the inner shields will take splash damage from anything that hits the outer shields, making it relatively pointless. If you make the inner shields invulnerable until the outer ones are down, then the unit becomes incredibly overpowered unless you make the shield recharge times extremely long, and at that point, why have a multi-shield anyway?|||Mithy|||I'm just letting you know what others have run into when using units like this, man. Seiya's unit was not a balanced, usable unit, just a proof-of-concept thing. It was basically invincible when he had only the top layer shield vulnerable, and extremely weak with all layers vulnerable at once.
If it's just for fun, then go for it, as long as you're up to the task of writing your own shield management code. It's not that hard, but you have to make your own copy of Unit.CreateShield that can handle multiple shield entities.|||I wanted to use a similar concept with SupCom2. If it's possible in FA it should be possible in SupCom2 as well.
My concept was to have a UEF shield on the bottom and a penetrate-able shield on top.
If the shield on top is 99% penetrate-able it will allow the projectile to pass through.
However, the second layer is the true shield.
The top layer shield is invisible and allows pass through. It goes down automatically when the lower layer of shield goes down.
What this accomplishes is a complex way to 'capture' splash damage for UEF shields.
This is important beecause this is one of the key benefits of shields vs regular health in SupCom.|||I'm not entirely clear on how damage-absorptive shields work in SC2.
If you have say, 4 Adaptor shields, which strip 97.something% damage from the incoming projectile, and the projectile lands and does that remaining ~2% splash damage, does it actually hurt units within its radius that are under the shields?
Do 5 of them actually completely nullify all splash damage done by the projectile, making it so only the shields themselves take damage?
Do the shields themselves take splash damage from landing projectiles (that still have damage left), or do they only take damage when a projectile impacts them directly?|||Mithy|||So a shell that hits an aeon/cybran shield has its splash property stripped completely? So one Adaptor can neutralize something like a Jackhammer shell as long as the shell hits the shield and doesn't directly impact a unit? That doesn't totally jive with what I've seen in videos, but having never played the game, I can't say for sure.
Regardless, stripping splash and making an absorption shield would be simple enough to do in FA.
On the other hand, doing multiple shields on an SC2 unit would probably be at least as difficult as doing it in FA, if not more so - depends on how much of the shield creation code is still in lua, and how much (if any) has been moved to the engine.|||Mithy|||The shield code will be in /lua/shield.lua and the shield management/creation code will be in /lua/sim/Unit.lua (CreateShield and CreatePersonalShield probably).
So shells still have splash when they do impact, but absorption shields don't cause an impact. That makes sense.
And FA shields don't 'absorb' anything, they just cause impacts normally and take damage. If an AE shell hits an FA shield, it still produces full splash damage, and the splash goes through the shield to hurt other shields inside (but not units inside obviously). FA would need a new class of shield that doesn't cause impacts and only strips damage, but that's actually very easy to do based on the existing shield class.|||Mithy|||Obviously, but my point is that units inside a shield do not take damage, where shields inside a shield do. So there's some code in the engine that accounts for this, even though there's no access to it in the lua.|||Mithy|||That's a big can of worms, and would be really, really difficult to coordinate between various units. Reeeealllly difficult.
And I don't think the shield damage within shields is an oversight, I think that's intentional. Could be wrong, but it'd be pretty tough to balance nested bubble shields if you could only ever damage the outer one at any given time.

On the other hand, your shield idea isn't as difficult as you think it might be. When a projectile impacts a shield, before it even registers as an impact, it runs a function on the shield entity called OnCollisionCheck. I would guess that the absorption shields use this to simply modify the damage of the projectile by -85%, and return false, allowing the projectile through. You could make a normal shield do the same damage reduction, but return true, causing an impact anyway.|||Nested shields only get damaged if they are hit with aoe. If you have only non-aoe damage incoming, then you need to go through all of them. And yeah, the layered shield I did was invincible versus certain units (perseuses) and quite vulnerable to aoe or units with a high rate of fire. Mostly, it was done as a proof of concept and because I was bored and the idea sounded interesting. You do have to re-write large chunks of the shield management code though.|||Shield mechanics can be so annoying.... Since there is no penetration on UEF shields, projectiles explode on impact with them, and deal AoE to everything instead of getting weakened. Interesting fact is that UEF shields arent the only ones that take splash. Adaptor shields CAN still take damage. Ground fire a jackhammer next to the adaptors, so that the projetile doesnt hit the shields, but the AoE does. Im sure youll like the result ><|||You could do something simple like stripping the projectile's DamageRadius when it impacts a UEF shield directly, so only the shield takes damage (but takes full damage and stops the projectile, unlike absorption shields). That might take it a little too far in the other direction, though.|||Mithy|||I can't tell you exactly how to do it, because I don't have SC2's shield code. I don't know if there are separate classes for both shield types, nor how the base Unit class handles the adding of shields based on blueprint information or upgrades.|||Mithy|||Bastilean

No comments:

Post a Comment