Shields!

You think of something which could be added to TA3D post here! /
Vous pensez à quelque chose que l'on pourrait ajouter à TA3D, postez ici!
Post Reply
Sarwajagat
Posts: 5
Joined: Fri Feb 25, 2011 3:29 pm

Shields!

Post by Sarwajagat » Fri Feb 25, 2011 3:35 pm

Watch this space....brand new proposed shield tags and....Shield.tdf specially for defining a shield for...TA3D use! :o

The forum don't allow me to upload txt file...so putting it in the code thing below! TA3D should load up the Define tags in parts..and if a tag is missing,TA3D shouldn't load it and if the tag is actually important(like ShieldRadius tag),TA3D should use basic value for the tag(say 300,though depends on what tag it is though).Sorry if the formatting gone wrong..i just thought of it and made it 3 hours ago before posting here!

Code: Select all

[SHIELD] //Shield name
//ShieldId=1;
//ShieldName=Reflective Agiel Shield; //Secondary name,shows up when you press F1(infocard) on the unit that uses the shield
//ShieldType=0; //0 for basic bubble shield, 1 for frontal directional shield,2 for segmental shield, 3 for shield that is the shape of the unit
//Solid=0; //0 for non solid shield,units can pass through while 1 for solid shield,no unit can pass through it.This also affect whether another shield can be in the current shield radius or not.0 for no and 1 for yes.
//Stack=0; //Tells if the shield effectiveness can be stacked with other shield,0 for no and 1 for yes.Only used if Solid value is set to 0.
//Segment=0; //Tells how much segment does the shield have,each segment have their own shield power and act independantly though the other tags applied to them.Shield power is equally distributed between segment thus the more segment a shield have,the weaker the shield power of the overall shield.Player though can distribute shield power of the segments via the shield GUI.
//SegmentExplode=0; //Tells whether the shield segment explode or not if its shield power lowered to zero.Only used if Segment value is set to 1.
//ActiveStatus=1; //1 for shield is active at all times and 0 for shield only active if the unit that uses the shield is stationary

//[DefineShieldTexture] //to define shield textures.If values are set,other visual tags are nullified.
//{
//UseShield=0; // 0 for user defined shield, 1 for custom one
//ShieldLUA=filename.lua //Used if UseShield is set to 1,a lua file that tells how is the shield it is,a preset value.
//ShieldTexture=filename.tga // Used if UseShield is set to 0,shows the texture of the current active shield.Other visual tags are nullified if this value is set.
//ShieldTextureLow=filename.tga // Texture that showed if the shield is low in power
//ShieldTextureHit=filename.tga // Texture that showed if the shield is hit
//}

//[DefineShieldVisual] //to define shield visual appearance.
//{
//Dynamic=0; //1 for a shield that ripples if something hit it and 0 for none.
//ShieldColor=236; //Shield colour
//ShieldColor2=238; //Additonal colour info
//ShieldColorHit=270; //Colour of shield when hit
//ShieldColorLow=234; //Colour of shield when low on shield power
//Opacity=0.2; //Opacity of the shield, 1 for solid color shield and 0 for totally invisible shield color when not hit.Allowed value is 0.8 to 0.1
//Rotate=1; //1 if the shield rotates with time.Only work if ShieldType is not set to 1 or 3
//RotateAngle=1.2; //How much angle does the shield rotate per second
//RotateDirection=1; //1 for clockwise direction, 0 for anti clockwise direction
//}


//Rechargeable=0; //Tells if the shield can be charged by nearby energy storage,0 for no and 1 for yes.Only worked if the energy storage is full and the energy stored is instantly used up to recharge the shield.If the shield is under attack,the shield is unable to recharge.
//RechargeRatio=20; //How much energy used to restore 1 shield point.Only used if Rechargeable value set to 1
//Overcharge=0; //Tells if the shield can be overcharged by addtional energy,0 for no and 1 for yes.It doesn't add additional shield power though.
//OverchargeCost=900; //How much energy needed to overcharge the shield
//OverchargeImpact=0.3; //Tells how much shield power lost if it's being overcharged.Percent value,basis of current shield power
//OverchargeEffectiveness=0.2; //Modifier value for other tags
//OverchargeCooldown=4000; //Amount of time before the shield can be overcharged again.
//Flicker=0; //Tells if the shield flicker each time it's hit,0 for not and 1 for yes.If the shield flicker,any attack can pass through it.
//FlickerDuration=0.1; //In seconds,tells how long does the shield *turned* off if it's hit.Thus a rapid firing weapon can damage a unit that uses shield that flickers.
//FlickerCost=20; //Addtional energy a shield uses if it flickers.
//ActiveEnergyUse=2000; //Amount of energy a shield uses when active
//EnergyUseIfHit=200; //Additional energy usage if the shield is hit
//ShieldRadius=200; //Size of area shield covers
//ShieldPower=1200; //Amount of damage a shield can take before dissolving

//[DefineShieldLayer] //Defines if the shield have multiple layers or not
//{
//Layer=1; //0 for no shield layer and 1 for yes.The below tags only loaded if this tag set to 1
//LayerCount=3; //Tells how many shield layer the current shield have
//LayerDistribution=0.2,0.3,0.5; //Distributes the properties of the shield according to the percentage for each shield layer.Each value represent one shield layer
//LayerRange=0.7,0.8,0.9; //Tells how far the shield from the origin.Each value represent one shield layer
//}

[DefineShieldRegenAndAbsorb] //Define regen effects of the shield,including absorption effects
//{
//ShieldRegen=1; //1 for regenerative shield, 0 for non regenerative shield
//ShieldRegenRate=2; //Amount of time needed to regen shield point
//ShieldRegenValue=20; //How much a shield regen per rate basis
//ShieldRegenCost=5; //Amount of energy needed to regen 1 shield point
//Absorptive=0; //Tells do the shield absorb portion of the incoming attack or not.The incoming attack is not reduced by this value though.
//AbsorptiveType=1; //Tells what kind of the damage the shield able to absorb,0 for all attack type,1 for projectiles and 2 for energy weapons
//AbsorptiveRegen=0.2; //Tells how much damage does the shield absorb to restore its shield power.Percent based
//AbsorptiveRegenRate=0.2; //Tells how fast the shield replenish itself via absorbed damage
//AbsorptiveLimit=0.5; //Percent of maximum absorptive properties
//}


	
//[DefineSpark] //Define shield's energy spark
//{
//Spark=0; //0 if no energy spark and 1 for enery sparks.Energy spark can affect enemy shields.
//SparkLimit=0.2; //Minimum percent value from full shield power for spark to form
//SparkDisturbance=0.1; //Negative value modifier for enemy shield that get too close to the current shield.Non stackable and based on current shield power.If 	shield power is 100%,the value is at maximum of 0.5.
//SparkCount=5; //How much energy spark a shield make based on SparkDuration,randomly from 0 spark to current set value.
//SparkDuration=200; //Time interval between energy sparks,from zero to current set value.
//SparkRange=30; //Range of a shield energy spark may go,from the current maximum shield radius.
//SparkChance=0.1; //Chance for a sucessful energy shield spark to affect enemy shield
//SparkDeflectChance=0.3; //Chance for a shield energy spark to be deflected away from the enemy shield
//SparkDamage=100; //Damage done by the spark if it happens to hit an enemy unit.Randomly from 0 to current set value.
//SparkAffinity=0.2; //How much a spark may be attracted to hit enemy units instead of the enemy shield.0.8 means it will hit the enemy unit than the enemy shield, 8 times out of ten times the spark formed.Max value is 0.8 and minimum value is well zero.
//SparkTexture=0; //0 for user defined and 1 for default
//SparkColor=213; //Color of spark
//SparkColor2=214; //Secondary color of spark
//SparkOpacity=0.2; //Opacity of spark, 0.8 for near solid color and 0.2 for near invisible spark color.Max permitted value is from 0.9 to 0.2
//SparkType=0; //0 for random arching spark and 1 for straight spark arc
//SparkAnim=Spark1.tga; //Graphic file to show the spark effect if it hits something
//ImmuneToSpark=1; //1 for not immune to enemy shield energy spark and 0 for immune.
//}
				
	
//[DefineShieldBlock] //tags to define shield blocking behaviours
//{
//BlockType=0; //0 for shield that can block all attacks,1 for blocking projectiles only, 2 for blocking energy weapon only
//Nullify=0; //0 for shield that nullifies incoming damage with consumption of shield point,1 for shield that only lessen(migitate) the damage received.Doesn't work with Migitate tags.Nullify tags only work if Migitate tag is set to 0.If both tag is set to 0 or 1,default shield behaviour will be used instead.
//NullifyValue=0.4; //Percent of incoming damage completely dissipated by the shield with consumption of shield points.
//NullifyCostRatio=3; //How much shield point consumed to nullify incoming damage,a ratio of damage nullified to incoming attack received.Depends on NullifyValue tage
//NullifyMaxValue=300; //How much damage a shield able to nullify per attack received maximum


//Migitate=0; //0 if shield doesn't migitate damage and 1 if shield migitate damage,must be inverse value of Nullify tag.Migitate tags only works if this value set to 1
//MigitateProjectile=0.1; //Percent of projectile damage a shield reduce,only used if BlockType set to 1
//MigitateEnergy=0.2; //Percent of energy weapon damage a shield reduce,only used if BlockType set to 2
//MigitateIncrease=0.1; //How much a migitation a shield increases if it's hit more than once
//MigitateMax=0.7; //Maxmimum value of a shield migitation
//MigitateCost=100; //Amount of addtional energy a shield uses if the migitation value increases by 0.1
//BreakMigitation=0.1; //Tells the shield migitation effect to dissolve if the shield power is the same or below the value
//BreakMigitationExplode=0; //Tells does the shield explode if max migitation value is reached or not.0 for not and 1 for shield that explode if that happens.

//Deflect=1; //Tells whether the shield can deflect incoming attack or not.EMP attacks and nuclear attacks are not deflectable by the shield.0 for no and 1 for yes.Shield energy sparks however can be deflected
//DeflectCost=200; //Amount of additional energy consumed if the shield deflect something
//DeflectEffectivenss=0.2; //Fraction of the incoming attack deflected from hitting the shield
//DeflectChance=0.01; //Chance per attack that the shield is able to deflect the incoming attack
//DeflectAngle=0; //Angle which the deflected attack goes after it's deflected,value from 0 to 90,0 state that it will deflect opposite of its original travel path while 90 means it will deflected perpendicular to its original travel path.Deflect path may be randomly negative or positive angle within the allowed range from 0 to current set angle
//}

//ImmuneEMP=0; //0 for not immune to EMP attack and 1 for immunity against EMP attack.EMP attack temporarily shut down the shield for a set amount of time.
//EMPResistance=300; //Tells how much EMP effect the shield can resist before failing
//EMPRecoveryRate=300; //How fast the shield re-activate after being disabled by the EMP

//[DefineShieldDeath] //Defines shield death effects
//{					
//Explode=0; //Tells does the shield explode when its power value reached zero.Exploded shield lose all of the shield power until regenerated.0 for not and 1 for yes.
//DamageOnDeath=200; //Damage done if shield dies,only work if Explode tag set to 1
//DamageDeathRadius=0.1; //How far an exploding shield cause damage based on percent of shield coverage from the origin
//}

//[DefineShieldDeathAnim]
//{	
//ExplodeAnim=explosive 2.gaf; //GAF file to show the explosion effect if the shield explodes
//ExplodeSegmentAnim=SegmentExplode.gaf; //GAF file to show explosion effect if a shield segment explodes,only used if Segment value set to 1.
//}

Code: Select all

[SHIELD] //the shield name

	{
	ShieldId=1;
	ShieldName=Reflective Agiel Shield;  
	ShieldType=0; 
	Solid=0; 
	Stack=0; 
	Segment=0; 
	SegmentExplode=0; 
        ActiveStatus=1;

	[DefineShieldVisual]
		{
			Dynamic=1;
			ShieldColor=236; 
			ShieldColor2=238; 
			ShieldColorHit=270; 
			ShieldColorLow=234; 
			Opacity=0.2;
			Rotate=1;
			RotateAngle=1.5;
			RotateDirection=1;
		} 

	[DefineShieldTexture]
		{
			UseShield=0; 
			ShieldLUA=; 
			ShieldTexture=; 
			ShieldTextureLow=; 
			ShieldTextureHit=; 
		}

	Rechargeable=0; 
	RechargeRatio=;

	Overcharge=1; 
        OverchargeCost=900;
	OverchargeImpact=0.3; 
	OverchargeEffectiveness=0.2;
	OverchargeCooldown=4000; 

	Flicker=0; 
	FlickerDuration=;
	FlickerCost=; 

	ActiveEnergyUse=300; 
	EnergyUseIfHit=90; 
	ShieldRadius=200; 
	ShieldPower=1200; 

	[DefineShieldLayer]
		{
			Layer=1;
			LayerCount=3;
			LayerDistribution=0.2,0.3,0.5;
			LayerRange=0.7,0.8,0.9;
		}


	[DefineShieldRegenAndAbsorb]

		{
			ShieldRegen=1; 
			ShieldRegenRate=2; 
			ShieldRegenValue=20;
			ShieldRegenCost=5;

			Absorptive=0; 
			AbsorptiveType=1; 
			AbsorptiveRegen=0.2; 
			AbsorptiveRegenRate=0.2; 
			AbsorptiveLimit=0.5;
		} 



	[DefineSpark] 
			{
				Spark=5; 
				SparkLimit=0.2; 
				SparkDisturbance=0.1; 
				SparkCount=5; 
				SparkDuration=200; 
				SparkRange=30; 
				SparkChance=0.1; 
				SparkDeflectChance=0.3; 
				SparkDamage=100; 
				SparkAffinity=0.2; 
				SparkTexture=0; 
				SparkColor=213; 
				SparkColor2=214; 
				SparkOpacity=0.2; 
				SparkType=0; 
				SparkAnimExplode=Spark1.tga; 
                                ImmuneToSpark=1;
			}
				
	
	[DefineShieldBlock] 

			{
				BlockType=0; 
				Nullify=0; 
                               NullifyValue=;
				NullifyCostRatio=; 
				NullifyMaxValue=; 

				Migitate=1; 
				MigitateProjectile=0.1; 
				MigitateEnergy=0.2; 
				MigitateIncrease=0.1; 
				MigitateMax=0.7; 
				MigitateCost=100; 
				BreakMigitation=0.1; 
				BreakMigitationExplode=0; 

				Deflect=1; 
				DeflectCost=200; 
				DeflectEffectivenss=0.2; 
				DeflectChance=0.01; 
				DeflectAngle=30; 
			}


	ImmuneEMP=0; 
	EMPResistance=300; 
	EMPRecoveryRate=300; 

	[DefineShieldDeath]
		{	
			Explode=1; 
			DamageOnDeath=200; 
			DamageDeathRadius=0.1;
		}
 
	[DefineShieldDeathAnim]
		{
			ExplodeAnim=explosive 2.gaf; 
			ExplodeSegmentAnim=SegmentExplode.gaf; 
		}
	}
Last edited by Sarwajagat on Fri Feb 25, 2011 4:43 pm, edited 1 time in total.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

Re: Shields!

Post by zuzuf » Fri Feb 25, 2011 4:42 pm

:shock: this is huge ! I am sorry but it would be way too much work to implement all this (it would require to change many things in all parts of the engine) and I think many of these features could be implemented through scripting.

There are 2 things we can separate : the shield behavior and the shield rendering. The later could be coded with a generic Lua effect (which is something which doesn't exist yet in TA3D but is more or less planed when TA3D 0.6 becomes stable) but I have no idea yet how to implement shield behavior (without recoding all the engine :P).
=>;-D Penguin Powered

Sarwajagat
Posts: 5
Joined: Fri Feb 25, 2011 3:29 pm

Re: Shields!

Post by Sarwajagat » Fri Feb 25, 2011 4:51 pm

I know it's going too much for TA3D to handle,just listing possible tags for true shield characteristic as accurate as possible.Yeah,i guess the shield behaviour & shield rendering could be defined by the LUA files and perhaps use similar tags as listed above..to tell modders which is which.. :o

Implementing the shield behaviour with using all the tags i listed above indeed require recoding of the engine to include those tags,but it will be worth it..modders can actually customize how a shield should behave,not just how it looked like! 8)

Furthermore..you could brag that TA3D offers more modding capability than Spring..whereby even shield behaviour can be tweaked! :P

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests