Shield magic...
Moderator: Moderators
Shield magic...
Recently, I some how got to talking about personal shields.
In FF I would really like to see more use of shields, generally around ships which is something I was working on a while ago, heard about mad ff and decided to stop and see where that went. Recently talking about mad FF I gather they want ships to have personal shields.
I think a simple way to do this might be to make the object s3o, copy the main body parts of the ship, keep their position but make them larger, simply, smooth and make holes, apply a texture to them that is semi transparent (if spring supports alpha channel textures). PErhaps with cob or lua you can do make object invisible/visible or whatever and have some kind of on hit event. This might be successful to a degree but is a huge kludge.
Anyway, I've noticed that the shields when used on a flying unit appear to work fine and are spherical not semi. I'm confused as to the lack of mobile shields in TAspring as they appear to work ok.
So for personal shields is there a way to make shields eliptical. Ideally with an x, y and z radius which would rotate with the unit. Primarily to fit the unit well.
Also can shields defend against area damage? Or something like a nuke?
In FF I would really like to see more use of shields, generally around ships which is something I was working on a while ago, heard about mad ff and decided to stop and see where that went. Recently talking about mad FF I gather they want ships to have personal shields.
I think a simple way to do this might be to make the object s3o, copy the main body parts of the ship, keep their position but make them larger, simply, smooth and make holes, apply a texture to them that is semi transparent (if spring supports alpha channel textures). PErhaps with cob or lua you can do make object invisible/visible or whatever and have some kind of on hit event. This might be successful to a degree but is a huge kludge.
Anyway, I've noticed that the shields when used on a flying unit appear to work fine and are spherical not semi. I'm confused as to the lack of mobile shields in TAspring as they appear to work ok.
So for personal shields is there a way to make shields eliptical. Ideally with an x, y and z radius which would rotate with the unit. Primarily to fit the unit well.
Also can shields defend against area damage? Or something like a nuke?
Re: Shield magic...
You're playing the wrong mods.Orakio wrote: I'm confused as to the lack of mobile shields in TAspring as they appear to work ok.
Shields shaped like the unit would be most feasible with lua rendering, triggered through luacob by hitbyweapon(), which would also handle the damage control.
Re: Shield magic...
CA has mobile shields.
Spring does not support alpha channels and such shields as you describe them would be purely visual.
Ive toyed with the idea of a mod that puts shields on almost everything, relying on a energy income for both weapons and shields. I was stopped by certain bugs with shields though (notably, not being able to displace their location properly).
Spring does not support alpha channels and such shields as you describe them would be purely visual.
Ive toyed with the idea of a mod that puts shields on almost everything, relying on a energy income for both weapons and shields. I was stopped by certain bugs with shields though (notably, not being able to displace their location properly).
Re: Shield magic...
What about:Spring does not support alpha channels
from changelog.txt
- Introduces the COB get/set variable 103, ALPHA_THRESHOLD. It ranges from 0-255 and changes the glAlphaFunc to use that alpha value as its minimum.
Re: Shield magic...
That is a very gritty effect.
Imagine me ripping a model and its faces into tiny shreds. Now, imagine a few shreds showing per percent higher that it goes.
Nothing like actual transparency.
Imagine me ripping a model and its faces into tiny shreds. Now, imagine a few shreds showing per percent higher that it goes.
Nothing like actual transparency.
Re: Shield magic...
ALPHA_THRESHOLD is for alpha test. ALPHA_THRESHOLD = 23 means that everything with an alpha value <= 23 will be invisible.
Bilinear filtering causes a lot of bleeding here too by the way, i.e. your "holes" may grow the higher ALPHA_THRESHOLD is set.
Bilinear filtering causes a lot of bleeding here too by the way, i.e. your "holes" may grow the higher ALPHA_THRESHOLD is set.
Re: Shield magic...
Small shields don't work too well because of Spring's collision code. For personal shields you should use HitByWeaponId and a custom effect, i.e. just reduce the damage the unit takes while the shield is active. How you render that effect is up to you.
Re: Shield magic...
So sounds to me mostly pointless, better to have a unit that shrouds near by units?
Using hitbyweapon also sounds like a kludge. With that, might as well just increase the hp or use armour instead.
Using hitbyweapon also sounds like a kludge. With that, might as well just increase the hp or use armour instead.
Re: Shield magic...
Well, yeah, personal shields are nothing else but HP. The difference is usually that shields have different damage properties (e.g. shoot a Dune shield with a laser...) and recharge behaviour.
Re: Shield magic...
ca has mobile shields? It has been too long since I played ca i guess
- Pressure Line
- Posts: 2283
- Joined: 21 May 2007, 02:09
Re: Shield magic...
i love pseudo-thermonuclear explosionsKDR_11k wrote:e.g. shoot a Dune shield with a laser...
Re: Shield magic...
Talon race by TRO has tanks with personal shields that're purely cob. Seem to work pretty well in Spring.
Re: Shield magic...
Other issues with shields are the manner in which they function, which is currently constant charge.. you cant make a shield that easily does a start at full, gets taken down, stays down for X time then either comes back at Full, or charges from X number... all you can do is X max shield HP and recharge rate and then the shield is always charging.. I find the lack of shield charging options annoying..
Re: Shield magic...
If the shield is always charging, then how can it ever truly be "down"? I mean, when the shield hits zero, wouldn't it charge back to some infinitesimal amount that is still enough to block the first shot that hits it that frame? I've never actually overwhelmed a shield - usually just taken out the generator or hit somewhere else or something.Fanger wrote:Other issues with shields are the manner in which they function, which is currently constant charge.. you cant make a shield that easily does a start at full, gets taken down, stays down for X time then either comes back at Full, or charges from X number... all you can do is X max shield HP and recharge rate and then the shield is always charging.. I find the lack of shield charging options annoying..
Re: Shield magic...
Thats what im saying Pxtl.. I want a shield that does this:
Starts at X number and takes hits until reduced to 0
Goes down for Y amount of time (during which it blocks nothing and is at 0 permanently)
Comes back online at either X number or 10-15-30% of X and charges to max..
We cant do that, because shields are ALWAYS charging so we get either starts at X number or charges to X number, and consistantly trys to get to that number no matter what.. hence Not ever going "down"
This is why I dont use shields because I cannot make them behave the way I want..
Starts at X number and takes hits until reduced to 0
Goes down for Y amount of time (during which it blocks nothing and is at 0 permanently)
Comes back online at either X number or 10-15-30% of X and charges to max..
We cant do that, because shields are ALWAYS charging so we get either starts at X number or charges to X number, and consistantly trys to get to that number no matter what.. hence Not ever going "down"
This is why I dont use shields because I cannot make them behave the way I want..
Re: Shield magic...
A shot can't be blocked with just any charge, a hard shield needs a charge equal or greater than the shot's default damage.Pxtl wrote:If the shield is always charging, then how can it ever truly be "down"? I mean, when the shield hits zero, wouldn't it charge back to some infinitesimal amount that is still enough to block the first shot that hits it that frame? I've never actually overwhelmed a shield - usually just taken out the generator or hit somewhere else or something.Fanger wrote:Other issues with shields are the manner in which they function, which is currently constant charge.. you cant make a shield that easily does a start at full, gets taken down, stays down for X time then either comes back at Full, or charges from X number... all you can do is X max shield HP and recharge rate and then the shield is always charging.. I find the lack of shield charging options annoying..
EDIT: Added shieldRechargeDelay tag in SVN, the shield won't charge for this long after it has been hit. Applies to any hit, not just shots that leave the shield drained.
Re: Shield magic...
so any hit delays the recharge, or just once it hits 0..?
Re: Shield magic...
Any hit, shields never hit 0 (they can't block shots with damage > their power). I expect it to primarily get used to prevent shield charging from acting as additional hitpoints.
Re: Shield magic...
Ahhh. I see it now.
Think money, with a constant inflow. You can't buy what you can't afford, you don't pay for what you don't buy. The shield absorbs every hit that is below its level (which, in turn, reduce its level equal to damage) and ignores every projectile that is above its level. The recharge is constant and ceaseless - because the shots stronger than the shield are ignored, it will build up enough energy to stop a hit - after which the hit will knock it back below threshold. So "shield-stalling" means that the shield will only stop one in N shots, where N is the number of impacts that occur in the time it takes to regenerate the shield to a level that is equal to the damage dealt by the projectile.
This also has some other nice ramifications - a shield that is stalling against low-strength levels will be utterly ineffective against high-strength attacks, but not vice-versa. For example, consider nukes. Lets say our shield could withstand a single nuke-hit - you hit it. A second nuke would pass through the shield, but a smaller artillery shell will still get stopped.
If a shield has a max level that is below the strength of a given weapon, it will _never_ stop the weapon.
That system is actually really clever. Still, it would be nice if it was more customizable (like being able to use the system Fanger describes).
You'd probably need some "shield threshold multiplier" to disable the weapon ignoring functionality of the shield and allowing the shield to hit "zero" and thus be Fanger-Disabled.
Think money, with a constant inflow. You can't buy what you can't afford, you don't pay for what you don't buy. The shield absorbs every hit that is below its level (which, in turn, reduce its level equal to damage) and ignores every projectile that is above its level. The recharge is constant and ceaseless - because the shots stronger than the shield are ignored, it will build up enough energy to stop a hit - after which the hit will knock it back below threshold. So "shield-stalling" means that the shield will only stop one in N shots, where N is the number of impacts that occur in the time it takes to regenerate the shield to a level that is equal to the damage dealt by the projectile.
This also has some other nice ramifications - a shield that is stalling against low-strength levels will be utterly ineffective against high-strength attacks, but not vice-versa. For example, consider nukes. Lets say our shield could withstand a single nuke-hit - you hit it. A second nuke would pass through the shield, but a smaller artillery shell will still get stopped.
If a shield has a max level that is below the strength of a given weapon, it will _never_ stop the weapon.
That system is actually really clever. Still, it would be nice if it was more customizable (like being able to use the system Fanger describes).
You'd probably need some "shield threshold multiplier" to disable the weapon ignoring functionality of the shield and allowing the shield to hit "zero" and thus be Fanger-Disabled.