Shields

Shields

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Shields

Post by SanadaUjiosan »

So I'm working on the shields for my faction, and realized I need something ironed out. ShieldPower is the strength of the shield, and I'm guessing a weapons damage depletes that amount from the ShieldPower. But, I have a handful of armor types, and I wondered which value it reads for the shield. If my actual shield generator is in the Building armor category, does that mean the shield looks for the Building damage value from the weapon it's blocking?
User avatar
maackey
Posts: 490
Joined: 02 Jul 2008, 07:11

Re: Shields

Post by maackey »

I don't think shields use armordefs to change damage for the shields.
They use
interceptedByShieldType = 1,
shieldInterceptType = 3,
tags. So basically a binary matchup of the numbers will block shots, but otherwise weapons will go through.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Shields

Post by SanadaUjiosan »

Yeah, but I mean like what determines how fast the shield is depleted. I've got what controls what can go through or not down, it's the depletion/strength of the shield that's my question. Does each shot subtract its damage from the shield power, or is each shot like just a -1 from the shield power. And if it is weapon damage, which damage does it read if there's multiple kinds of damage.
User avatar
maackey
Posts: 490
Joined: 02 Jul 2008, 07:11

Re: Shields

Post by maackey »

Ahh, I misunderstood. Although I've never heard anything relating armordefs to the shield drain, I do believe that greater weapon damage drains the shields quicker, but mostly its just observational evidence; I haven't really looked at the code and can't help much beyond that, sorry.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Shields

Post by KDR_11k »

For a destroying shield it drains the projectile's default damage, for a deflector shield it's some wonky equation based on the force.
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: Shields

Post by Google_Frog »

Do not use deflector shields if you want balance between damage per second and damage per second. If you want even vaguely logical drain against multiple weapon types (cannon, laser, rocket etc..) forget about using deflector shields.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Shields

Post by lurker »

It's not a wonky equation, it's 1x weapon damage per second. The trouble comes when weapons spend different amounts of time inside the deflector.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Shields

Post by Forboding Angel »

lurker wrote:It's not a wonky equation, it's 1x weapon damage per second. The trouble comes when weapons spend different amounts of time inside the deflector.
There should be a way to define the total amount that a reflection will cost. Doing it vs weapon damage is very narrow and limited.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Shields

Post by SanadaUjiosan »

Alright, first of all, the shield won't be a deflector so it seems I'm in the clear of any alleged wonkiness.

Second of all, here's an example of one of my weapon defs.

Code: Select all

	      damage                  = {
		Cruiser = 15,
		Building = 15,
		Mech = 15,
		Tank = 15,
		Aircraft = 15,
		Ship = 15,
		Sub = 1,
	      },
So, there's no default, unless you mean the first in the list.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Re: Shields

Post by KDR_11k »

Default defaults to 1.
User avatar
SanadaUjiosan
Conflict Terra Developer
Posts: 907
Joined: 21 Jan 2010, 06:21

Re: Shields

Post by SanadaUjiosan »

Super awesome. Spring shows me whats for once again.
Post Reply

Return to “Game Development”