/**************************************************************************

template_aa_component.tgi
Copyright © 2002 TimeGate Studios

DESCRIPTION:  templates for aa components

REVISION HISTORY:
ban093003 - created

USAGE:

**************************************************************************/

/*
--------------------------------------------
EXPERIENCE LEVELS
--------------------------------------------
*/

;; INFANTRY

[template AAInfantryExperienceComponent template=ExperienceComponent]
{
	; Recruit - Infantry	
	
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 0
		
		[Property template=ModifierProperty]
		name = "#template_component_aa_ExperienceLevel_Property_name"
		icon = null
	}
	
	; Regular - Infantry		
		
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 150
		
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_2"
			icon = /Properties/PropertyIcons/IconPropertyExperience2.png
			
			[Modifier template=AddModifier]
			attribute = AV
			amount = +25
				
			[Modifier template=AddModifier]
			attribute = DV
			amount = +25
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.05

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.05
		}	
	}
	
	; Veteran - Infantry		

	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 350
			
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_3"
			icon = /Properties/PropertyIcons/IconPropertyExperience3.png
				
			[Modifier template=AddModifier]
			attribute = AV
			amount = +50
			
			[Modifier template=AddModifier]
			attribute = DV
			amount = +50
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.1

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +50

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.10
		}	
	}
	
	; Elite - Infantry	
	
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 600
			
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_4"
			icon = /Properties/PropertyIcons/IconPropertyExperience4.png
				
			[Modifier template=AddModifier]
			attribute = AV
			amount = +75
				
			[Modifier template=AddModifier]
			attribute = DV
			amount = +75
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.2

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +100

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.15
		}	
	}
}

;; PARATROOPERS

[template AAParatrooperExperienceComponent template=ExperienceComponent]
{
	; Recruit - Paratroopers	
	
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 0
		
		[Property template=ModifierProperty]
		name = "#template_component_aa_ExperienceLevel_Property_name"
		icon = null
	}
	
	; Regular - Paratroopers		
		
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 100
		
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_2"
			icon = /Properties/PropertyIcons/IconPropertyExperience2.png
			
			[Modifier template=AddModifier]
			attribute = AV
			amount = +30
				
			[Modifier template=AddModifier]
			attribute = DV
			amount = +30
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.05

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.05
		}	
	}
	
	; Veteran - Paratroopers		

	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 250
			
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_3"
			icon = /Properties/PropertyIcons/IconPropertyExperience3.png
				
			[Modifier template=AddModifier]
			attribute = AV
			amount = +60
			
			[Modifier template=AddModifier]
			attribute = DV
			amount = +60
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.1

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +50

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.10
		}	
	}
	
	; Elite - Paratroopers	
	
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 500
			
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_4"
			icon = /Properties/PropertyIcons/IconPropertyExperience4.png
				
			[Modifier template=AddModifier]
			attribute = AV
			amount = +90
				
			[Modifier template=AddModifier]
			attribute = DV
			amount = +90
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.2

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +100

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.15
		}	
	}
}


;; VEHICLE

[template AAMechanizedExperienceComponent template=ExperienceComponent]
{
	
	; Recruit - Vehicle	

	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 0
		
		[Property template=ModifierProperty]
		name = "#template_component_aa_ExperienceLevel_Property_name"
		icon = null
	}
		
	; Regular - Vehicle	
	
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 150
		
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_2"
			icon = /Properties/PropertyIcons/IconPropertyExperience2.png
			
			[Modifier template=AddModifier]
			attribute = AV
			amount = +10
				
			[Modifier template=AddModifier]
			attribute = DV
			amount = +10
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.05

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +25

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.05
		}	
	}
	
	; Veteran - Vehicle	
	
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 350
			
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_3"
			icon = /Properties/PropertyIcons/IconPropertyExperience3.png
				
			[Modifier template=AddModifier]
			attribute = AV
			amount = +25
			
			[Modifier template=AddModifier]
			attribute = DV
			amount = +25
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.1

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +50

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.10
		}	
	}
	
	; Elite - Vehicle	
	
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 600
			
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_4"
			icon = /Properties/PropertyIcons/IconPropertyExperience4.png
				
			[Modifier template=AddModifier]
			attribute = AV
			amount = +50
				
			[Modifier template=AddModifier]
			attribute = DV
			amount = +50
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.2

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +100

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.15
		}	
	}
}

;; TANKS

[template AAArmorExperienceComponent template=ExperienceComponent]
{
	
	; Recruit - Tank
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 0
		
		[Property template=ModifierProperty]
		name = "#template_component_aa_ExperienceLevel_Property_name"
		icon = null
	}
	
	; Regular	 - Tank
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 150
		
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_2"
			icon = /Properties/PropertyIcons/IconPropertyExperience2.png
			
			[Modifier template=AddModifier]
			attribute = AV
			amount = +50
				
			[Modifier template=AddModifier]
			attribute = DV
			amount = +50
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.05

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +25

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.05
		}	
	}
	
	; Veteran - Tank
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 350
			
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_3"
			icon = /Properties/PropertyIcons/IconPropertyExperience3.png
				
			[Modifier template=AddModifier]
			attribute = AV
			amount = +75
			
			[Modifier template=AddModifier]
			attribute = DV
			amount = +75
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.1

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +50

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.10
		}	
	}
	
	; Elite - Tank
	[ExperienceLevel template=ExperienceLevel]
	{
		experience_required = 600
			
		[Property template=ModifierProperty]
		{
			name = "#template_component_aa_ExperienceLevel_Property_name_4"
			icon = /Properties/PropertyIcons/IconPropertyExperience4.png
				
			[Modifier template=AddModifier]
			attribute = AV
			amount = +100
				
			[Modifier template=AddModifier]
			attribute = DV
			amount = +100
			
			[Modifier template=MultiplyModifier]
			attribute = HEALTH
			amount = +0.2

			[Modifier template=AddModifier]
			attribute = MORALE
			amount = +100

			[Modifier template=MultiplyModifier]
			attribute = MORALE_RECOVERY_RATE
			amount = 0.15
		}	
	}
}


;; --------------------------------------------
;; DYNAMIC DOODAD COMPONENT
;; --------------------------------------------

[Template TreeDynamicDoodadComponent Inherit=BreakableDynamicDoodadComponent]
{
	update_time = 1
	break_impulse = 100

	toppled = true
	topple_duration = 1					;; if toppled = true, amount of time taken to topple
	bounce_duration = 0.75				;; if toppled = true, amount of time taken to bounce
	bounce_percentage = 5				;; if toppled = true, how far up it bounces

	regrow = true
	regrow_dead_duration = 10			;; if regrow = true, delay between end of topple and begining of sink
	regrow_sink_duration = 4			;; if regrow = true, amount of time taken to sink (same as rot)
	regrow_grow_duration = 30			;; if regrow = true, amount of time taken to regrow	
	
	[Action Template=FXC_PlaySFX]
	audio_ids = dynamic_tree_fall
}

[Template AudioDynamicDoodadComponent Template=DisturbableDynamicDoodadComponent]
{
	update_time = 1
	affect_radius = 4
	recharge_time_min = 15
	recharge_time_max = 60

	[Action Template=FXC_PlayObjectAnimation]
	object_animation_IDS = speaker
}

;; --------------------------------------------
;; SUPPLY COMPONENT
;; --------------------------------------------

;; If you update the size of the SupplyComponent, then you also need to update
;;   the size of the view component as well below to match.
[Template HQSupplyComponent Template=SupplyComponent]
{
	supply_range = 60
	is_relay = true
	stockpile_max = 90
}

;; --------------------------------------------
;; DETECTION COMPONENT
;; --------------------------------------------

[Template HQDetectionComponent Template=DetectionComponent]
{
	detection_range = 65
	remote_detection_range = 20
}


;; --------------------------------------------
;; ECONOMY COMPONENT
;; --------------------------------------------

[Template EconomyComponentCitySmall Template=EconomyComponent]
{	
	;; supply_required = true
	
	[Production]
	money = 10
	oil = 10
	ammo = 10
}

[Template EconomyComponentCityLarge Template=EconomyComponent]
{	
	;; supply_required = true	

	[Production]
	money = 15
	oil = 10
	ammo = 10
}