Mod Development:Armor


Armor.txt is a file used by Spring to make unit and unit-group specific damage models possible. If you wanted to make a weapon do 50 damage to land units, but 100 to all air units, you would use the Armor.txt file to accomplish your goal.

Here's an example:

[LandAir]
	{
	ARMBRAWL=99;
	ARMPEEP=99;
	ARMFIG=99;
	ARMCA=99;
	ARMACA=99;
	ARMATLAS=99;
	ARMPNIX=99;
	ARMHAWK=99;
	ARMLANCE=99;
	CORFINK=99;
	CORVENG=99;
	CORVAMP=99;
	CORHURC=99;
	CORTITAN=99;
	CORACA=99;
	CORSHAD=99;
	CORAPE=99;
	CORCA=99;
	CORVALK=99; 
}
[ARMTHUND] 
{ 

ARMTHUND=99;

}

The number after the unit's internal name (99, in this case) is irrelevent. It is only there because the SYs are too lazy to code the parser to not require them ;). They have no actual bearing on anything in the game, but they must actually be there.

The group of units in [LandAir] are the units the group-specific damage model will apply to. However, since the Arm Thunder has been put it its own group, [ARMTHUND], it will take damage specified to ARMTHUND in a weapon TDF. If ARMTHUND is in [LandAir] and [ARMTHUND] at the same time, the [LandAir] group will always take priority over [ARMTHUND] if both are used in a weapon TDF.

On that note, here's how you apply damage values to units in Armor.txt from the weapon TDF:

[WeaponName]
{
	//Whatever normal settings you have here for your weapon. 
	[DAMAGE]
	{
		Default=50;
		LandAir=100;
		ARMTHUND=500;
	}
}

Now your weapon will do 50 damage by default to all units. However, if it hits a unit in the LandAir category defined in Armor.txt, it will do 100. Finally, if it hits an Arm Thunder bomber specifically, it will do a whopping 500 damage. However, had the unit ARMTHUND been in the group [LandAir], it would only receive 100 damage, unless LandAir wasn't given a special damage value in your weapon TDF. Long story short, if a unit exists in a large group and one for itself, you cannot define both groups with different values and get the results you expect.

To make unit specific damages for every unit individually, you will need to edit the Armor.txt to contain an entry for each one much like the [ARMTHUND] entry above. The actual name inside the brackets [ ] doesn't matter too much, it just may not contain spaces and it is what is referenced in the [DAMAGE] section of a weapon TDF. It is just suggested that you use the unit's short name for ease.

Retrieved from "http://spring.clan-sy.com/wiki/Mod_Development:Armor"

This page has been accessed 1,249 times. This page was last modified 23:13, 5 August 2006.


 
 


Page editing toolbox

Browse
Main Page
Community portal
Current events
Recent changes
Random page
Help
Donations
Edit
View source
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Log in
Special pages
New pages
File list
Statistics
Bug reports
More...

Site layout created by Roflcopter.