<?xml version="1.0" encoding="UTF-8"?>
<!--
	$Id: base.xml 13776 2010-11-06 06:10:08Z amaitland $
-->
<character>
	<export>
		<date>|EXPORT.DATE|</date>
		<time>|EXPORT.TIME|</time>
		<version>|EXPORT.VERSION|</version>
		<paperinfo>
			<name>|PAPERINFO.NAME|</name>
			<height>|PAPERINFO.HEIGHT|</height>
			<width>|PAPERINFO.WIDTH|</width>
			<margins>
				<top>|PAPERINFO.MARGINTOP|</top>
				<bottom>|PAPERINFO.MARGINBOTTOM|</bottom>
				<left>|PAPERINFO.MARGINLEFT|</left>
				<right>|PAPERINFO.MARGINRIGHT|</right>
			</margins>
		</paperinfo>
		<directories>
			<pcgen>|DIR.PCGEN|</pcgen>
			<templates>|DIR.TEMPLATES|</templates>
			<pcg>|DIR.PCG|</pcg>
			<html>|DIR.HTML|</html>
			<temp>|DIR.TEMP|</temp>
		</directories>
	</export>
	<unit_set>
		<name>|UNITSET|</name>
		<height_unit>|UNITSET.HEIGHTUNIT|</height_unit>
		<distance_unit>|UNITSET.DISTANCEUNIT|</distance_unit>
		<weight_unit>|UNITSET.WEIGHTUNIT|</weight_unit>
	</unit_set>
	<!--
	  ====================================
	  ====================================
			BIO
	  ====================================
	  ====================================-->
	<basics>
		<bonuses>|BONUSLIST.STAT.STR|</bonuses>
		<bonuses>|BONUSLIST.STAT.STR.TOTAL|</bonuses>
		<bonuses>|BONUSLIST.CHECK.BASE|</bonuses>
		<bonuses>|BONUSLIST.CHECK.BASE.TOTAL|</bonuses>
		<name>|NAME|</name>
		<followerof>|FOLLOWEROF|</followerof>
		<playername>|PLAYERNAME|</playername>
		<hero_points>|VAR.HEROPOINTS.INTVAL|</hero_points>
		<age>|AGE|</age>
		<alignment>
			<long>|ALIGNMENT|</long>
			<short>|ALIGNMENT.SHORT|</short>
		</alignment>
		<bab>|ATTACK.MELEE.BASE|</bab>
		<bio>|BIO|</bio>
		<birthday>|BIRTHDAY|</birthday>
		<birthplace>|BIRTHPLACE|</birthplace>
		<catchphrase>|CATCHPHRASE|</catchphrase>
		<classes>
|FOR,%class,0,COUNT[CLASSES]-1,1,0|
			<class>
				<name>|CLASS.%class|</name>
				<abbreviation>|CLASSABB.%class|</abbreviation>
				<level>|CLASS.%class.LEVEL|</level>
				<bonuslist>|CLASS.%class.BONUSLIST|</bonuslist>
				<sequence>|%class|</sequence>
			</class>
|ENDFOR|	<!-- Classes -->
			<levels_total>|TOTALLEVELS|</levels_total>
			<levels_ecl>|ECL|</levels_ecl>
			<!-- shortform below should be removed - it can be derived from class info above -->
			<shortform>|FOR.0,10,1,\CLASSABB.%\\CLASS.%.LEVEL\, , ,1|</shortform>
			<!-- CLASSLIST is not extracted because we can derive it from the information above -->
		</classes>
		<deity>
			<name>|DEITY|</name>
			<alignment>|DEITY.ALIGNMENT|</alignment>
			<description>|DEITY.DESCRIPTION|</description>
			<domainlist>|DEITY.DOMAINLIST|</domainlist>
			<favoredweapon>|DEITY.FAVOREDWEAPON|</favoredweapon>
			<followeralignment>|DEITY.FOLLOWERALIGNMENT|</followeralignment>
			<holyitem>|DEITY.HOLYITEM|</holyitem>
			<pantheonlist>|DEITY.PANTHEONLIST|</pantheonlist>
			<source>|DEITY.SOURCE|</source>
			<special_abilities>|DEITY.SA|</special_abilities>
			<appearance>|DEITY.APPEARANCE|</appearance>
			<title>|DEITY.TITLE|</title>
			<worshippers>|DEITY.WORSHIPPERS|</worshippers>
		</deity>
		<description>|DESC|</description>
		<experience>
			<current>|EXP.CURRENT|</current>
			<next_level>|EXP.NEXT|</next_level>
			<factor>|EXP.FACTOR|</factor>
			<penalty>|EXP.PENALTY|</penalty>
		</experience>
		<eyes>
			<color>|COLOR.EYE|</color>
		</eyes>
		<hair>
			<color>|COLOR.HAIR|</color>
			<length>|LENGTH.HAIR|</length>
		</hair>
		<skin>
			<color>|COLOR.SKIN|</color>
		</skin>
		<cr>|CR|</cr>
		<face>
			<face>|FACE|</face>
			<short>|FACE.SHORT|</short>
			<squares>|FACE.SQUARES|</squares>
		</face>
		<favoredlist>|FAVOREDLIST|</favoredlist>
		<followerlist>|FOLLOWERLIST|</followerlist>
		<gender>
			<long>|GENDER.LONG|</long>
			<short>|GENDER.SHORT|</short>
		</gender>
		<handed>|HANDED|</handed>
		<height>
			<total>|HEIGHT|</total>
			<feet>|HEIGHT.FOOTPART|</feet>
			<inches>|HEIGHT.INCHPART|</inches>
		</height>
		<hitdice>|HITDICE|</hitdice>
		<image>file:|DIR.PCG|/|NAME|.jpg</image>
		<interests>|INTERESTS|</interests>
		<languages>
|FOR,%lang,0,COUNT[LANGUAGES]-1,1,0|
			<language>|LANGUAGES.%lang|</language>
|ENDFOR|
			<all>|LANGUAGES|</all>
		</languages>
		<location>|LOCATION|</location>
		<move>
|FOR,%move,0,COUNT[MOVE]-1,1,0|
			<move>
				<name>|MOVE.%move.NAME|</name>
				<rate>|MOVE.%move.RATE|</rate>
				<squares>|MOVE.%move.SQUARES|</squares>
|IIF(MOVE.%move.NAME:Fly)|
				<maneuverability>(|ABILITYALL.Special Ability.HIDDEN.0.TYPE=Maneuverability.ASPECT.Maneuverability|)</maneuverability>
|ENDIF|
			</move>
|ENDFOR|
			<all>|MOVEMENT|</all>
		</move>
		<personality>
			<trait>|PERSONALITY1|</trait>
			<trait>|PERSONALITY2|</trait>
		</personality>
		<portrait>|PORTRAIT|</portrait>
		<phobias>|PHOBIAS|</phobias>
		<race>|RACE|</race>
		<reach>
			<reach>|REACH|</reach>
			<squares>|REACH.SQUARES|</squares>
		</reach>
		<region>|REGION|</region>
		<reputation>|VAR.REPUTATION.INTVAL|</reputation>
		<residence>|RESIDENCE|</residence>
		<size>
			<long>|SIZELONG|</long>
			<short>|SIZE|</short>
		</size>
		<speechtendency>|SPEECHTENDENCY|</speechtendency>
		<type>|TYPE|</type>
		<vision>
|FOR,%vision,0,COUNT[VISION]-1,1,0|
			<vision>|VISION.%vision|</vision>
|ENDFOR|
			<all>|VISION|</all>
		</vision>
		<wealth>|VAR.WEALTH.INTVAL|</wealth>
		<weight>
			<weight_unit>|WEIGHT|</weight_unit>
			<weight_nounit>|WEIGHT.NOUNIT|</weight_nounit>
		</weight>
		<poolpoints>
			<cost>|POOL.COST|</cost>
			<current>|POOL.CURRENT|</current>
		</poolpoints>
		<notes>
|FOR,%note,0,COUNT[NOTES]-1,1,0|
|IIF(NOTE.%note.NAME:DM Notes)|
|ELSE|
			<note>
				<name>|NOTE.%note.NAME|</name>
				<value>|NOTE.%note.VALUE.|</value>
			</note>
|ENDIF|
|ENDFOR|
		</notes>
	</basics>
	<!--
	  ====================================
	  ====================================
			ABILITIES
	  ====================================
	  ====================================-->
	<abilities>
|FOR,%stat,0,COUNT[STATS]-1,1,0|
		<ability>
			<name>
				<long>|STAT.%stat.LONGNAME|</long>
				<short>|STAT.%stat.NAME|</short>
			</name>
			<score>|STAT.%stat|</score>
			<modifier>|STAT.%stat.MOD|</modifier>
<!--
		Old BASE tag does not give stats with racial, and other permentant adjustments.
		Use NOTEMP.NOEQUIP instead of BASE gives the correct results.

			<base>|STAT.%stat.BASE|</base>
			<basemod>|STAT.%stat.BASEMOD|</basemod>
-->
			<base>|STAT.%stat.NOTEMP.NOEQUIP|</base>
			<basemod>|STAT.%stat.MOD.NOTEMP.NOEQUIP|</basemod>

			<noequip>|STAT.%stat.NOEQUIP|</noequip>
			<noequip_mod>|STAT.%stat.MOD.NOEQUIP|</noequip_mod>
			<no_temp_score>|STAT.%stat.NOTEMP|</no_temp_score>
			<no_temp_modifier>|STAT.%stat.MOD.NOTEMP|</no_temp_modifier>
		</ability>
|ENDFOR|
	</abilities>
	<!--
	  ====================================
	  ====================================
			HIT POINTS
	  ====================================
	  ====================================-->
	<hit_points>
		<usealternatedamage>|VAR.UseAlternateDamage.INTVAL|</usealternatedamage>
		<points>|HP|</points>
		<alternate>|ALTHP|</alternate>
		<die>|HITDICE|</die>
		<die_short>|HITDICE.SHORT|</die_short>
		<current/>
		<subdual/>
		<damage_reduction>|DR|</damage_reduction>
		<damage_threshold>|VAR.DAMAGETHRESHOLD.INTVAL|</damage_threshold>
		<history>
|FOR,%level,1,ECL,1,1|
			<roll>
				<level>|%level|</level>
				<roll>|HPROLL.%level|</roll>
				<stat>|HPROLL.%level.STAT|</stat>
				<total>|HPROLL.%level.TOTAL|</total>
			</roll>
|ENDFOR|
		</history>
	</hit_points>
	<!--
	  ====================================
	  ====================================
			ARMOR CLASS
	  ====================================
	  ====================================-->
	<armor_class>
		<total>|AC.Total|</total>
		<listing>|BONUS.COMBAT.AC.LISTING|</listing>
		<flat>|AC.Flatfooted|</flat>
		<touch>|AC.Touch|</touch>
		<base>|AC.Base|</base>
		<armor_bonus>|AC.Armor|</armor_bonus>
		<shield_bonus>|AC.Shield|</shield_bonus>
		<stat_mod>|AC.Ability|</stat_mod>
		<size_mod>|AC.Size|</size_mod>
		<natural>|AC.NaturalArmor|</natural>
		<deflection>|AC.Deflection|</deflection>
		<class_bonus>|AC.ClassDefense|</class_bonus>
		<dodge_bonus>|AC.Dodge|</dodge_bonus>
|IIF(isgamemode("Modern").OR.isgamemode("Darwins_World_2").OR.isgamemode("Sidewinder")).OR.isgamemode("Gaslight")|
		<equipment_bonus>|AC.Equipment|</equipment_bonus>
|ENDIF|
		<misc>|AC.Misc|</misc>
		<miss_chance/>
		<max_dex>|MAXDEX|</max_dex>
		<spell_failure>|SPELLFAILURE|</spell_failure>
		<check_penalty>|ACCHECK|</check_penalty>
		<spell_resistance>|SR|</spell_resistance>
	</armor_class>
	<!--
	  ====================================
	  ====================================
			INITIATIVE
	  ====================================
	  ====================================-->
	<initiative>
		<total>|INITIATIVEMOD|</total>
		<dex_mod>|STAT.1.MOD|</dex_mod>
		<misc_mod>|INITIATIVEMISC|</misc_mod>
	</initiative>
	<!--
	  ====================================
	  ====================================
			SKILLS
	  ====================================
	  ====================================-->
	<skills>
		<skillpoints>
			<total>|SKILLPOINTS.TOTAL|</total>
			<used>|SKILLPOINTS.USED|</used>
			<unused>|SKILLPOINTS.UNUSED|</unused>
		</skillpoints>
		<list_mods>|SKILLLISTMODS|</list_mods>
		<max_class_skill_level>|MAXSKILLLEVEL|</max_class_skill_level>
		<max_cross_class_skill_level>|MAXCCSKILLLEVEL|</max_cross_class_skill_level>
|FOR,%skill,0,COUNT[SKILLS]-1,1,0|
		<skill>
			<name>|SKILL.%skill|</name>
			<ranks>|SKILL.%skill.RANK|</ranks>
			<mod>|SKILL.%skill.MOD|<!-- Mods from abilities, equipment, etc -->
			</mod>
			<skill_mod>|SKILL.%skill.TOTAL|</skill_mod>
			<ability_mod>|SKILL.%skill.ABMOD|<!-- Mod from the key ability -->
			</ability_mod>
			<misc_mod>|SKILL.%skill.MISC|<!-- This is a calc value of TOTAL-RANK-ABMOD -->
			</misc_mod>
			<ability>|SKILL.%skill.ABILITY|</ability>
			<synergy>|SKILL.%skill.SYNERGY|</synergy>
			<untrained>|SKILL.%skill.UNTRAINED|</untrained>
			<exclusive>|SKILL.%skill.EXCLUSIVE|</exclusive>
			<trained_total>|SKILL.%skill.TRAINED_TOTAL|</trained_total>
			<exclusive_total>|SKILL.%skill.EXCLUSIVE_TOTAL|</exclusive_total>
			<type>|SKILL.%skill.TYPE|</type>
		</skill>
|ENDFOR|

<!-- Skills -->
	</skills>
	<!--
	  ====================================
	  ====================================
			SAVING THROWS
	  ====================================
	  ====================================-->
	<saving_throws>
		<conditional_modifiers>
|FOR,%ability,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","NATURE=AUTOMATIC","TYPE=SaveBonus")-1,1,0|
|IIF(ABILITYAUTO.Special Ability.VISIBLE.%ability.TYPE=SaveBonus.HASASPECT.SaveBonus:Y)|
			<savebonus>
				<description>|ABILITYAUTO.Special Ability.%ability.TYPE=SaveBonus.ASPECT.SaveBonus|</description>
			</savebonus>
|ENDIF|
|ENDFOR|
		</conditional_modifiers>
		<saving_throw>
			<name>
				<long>fortitude</long>
				<short>fort</short>
			</name>
			<ability>constitution</ability>
			<total>|CHECK.FORTITUDE.TOTAL|</total>
			<base>|CHECK.FORTITUDE.BASE|</base>
			<abil_mod>|CHECK.FORTITUDE.STATMOD|</abil_mod>
			<feats>|CHECK.FORTITUDE.FEATS|</feats>
			<magic_mod>|CHECK.FORTITUDE.MAGIC|</magic_mod>
			<misc_mod>|CHECK.FORTITUDE.MISC.NOMAGIC.NOSTAT|</misc_mod>
			<misc_w_magic_mod>|CHECK.FORTITUDE.MISC.NOSTAT|</misc_w_magic_mod>
			<race>|CHECK.FORTITUDE.RACE|</race>
			<epic_mod>|CHECK.FORTITUDE.EPIC|</epic_mod>
			<temp_mod/>
		</saving_throw>
		<saving_throw>
			<name>
				<long>reflex</long>
				<short>ref</short>
			</name>
			<ability>dexterity</ability>
			<total>|CHECK.REFLEX.TOTAL|</total>
			<base>|CHECK.REFLEX.BASE|</base>
			<feats>|CHECK.REFLEX.FEATS|</feats>
			<abil_mod>|CHECK.REFLEX.STATMOD|</abil_mod>
			<magic_mod>|CHECK.REFLEX.MAGIC|</magic_mod>
			<misc_mod>|CHECK.REFLEX.MISC.NOMAGIC.NOSTAT|</misc_mod>
			<misc_w_magic_mod>|CHECK.REFLEX.MISC.NOSTAT|</misc_w_magic_mod>
			<race>|CHECK.REFLEX.RACE|</race>
			<epic_mod>|CHECK.REFLEX.EPIC|</epic_mod>
			<temp_mod/>
		</saving_throw>
		<saving_throw>
			<name>
				<long>will</long>
				<short>will</short>
			</name>
			<ability>wisdom</ability>
			<total>|CHECK.2.TOTAL|</total>
			<base>|CHECK.2.BASE|</base>
			<abil_mod>|CHECK.2.STATMOD|</abil_mod>
			<feats>|CHECK.2.FEATS|</feats>
			<magic_mod>|CHECK.2.MAGIC|</magic_mod>
			<misc_mod>|CHECK.2.MISC.NOMAGIC.NOSTAT|</misc_mod>
			<misc_w_magic_mod>|CHECK.2.MISC.NOSTAT|</misc_w_magic_mod>
			<race>|CHECK.2.RACE|</race>
			<epic_mod>|CHECK.2.EPIC|</epic_mod>
			<temp_mod/>
		</saving_throw>
	</saving_throws>
	<!--
	  ====================================
	  ====================================
			ATTACK
	  ====================================
	  ====================================-->
	<attack>
		<melee>
			<total>|ATTACK.MELEE.TOTAL|</total>
			<total_short>|ATTACK.MELEE.TOTAL.SHORT|</total_short>
			<bab>|ATTACK.MELEE.BASE|</bab>
			<base_attack_bonus>|ATTACK.MELEE|</base_attack_bonus>
			<stat_mod>|ATTACK.MELEE.STAT|</stat_mod>
			<size_mod>|ATTACK.MELEE.SIZE|</size_mod>
			<misc_mod>|ATTACK.MELEE.MISC|</misc_mod>
			<epic_mod>|ATTACK.MELEE.EPIC|</epic_mod>
			<temp_mod/>
		</melee>
		<ranged>
			<total>|ATTACK.RANGED.TOTAL|</total>
			<bab>|ATTACK.RANGED.BASE|</bab>
			<base_attack_bonus>|ATTACK.RANGED|</base_attack_bonus>
			<stat_mod>|ATTACK.RANGED.STAT|</stat_mod>
			<size_mod>|ATTACK.RANGED.SIZE|</size_mod>
			<misc_mod>|ATTACK.RANGED.MISC|</misc_mod>
			<epic_mod>|ATTACK.RANGED.EPIC|</epic_mod>
			<temp_mod/>
		</ranged>
		<!-- Either CMB block, or Grapple Block -->
|IIF(HASVAR:CMB.OR.HASFEAT:CMB Output)|
			<cmb>
				<!-- Base stuff for standard block -->
				<title>CMB</title>
				<total>|VAR.CMB.INTVAL.SIGN|</total>
				<bab>|ATTACK.MELEE.BASE|</bab>
				<base_attack_bonus>|ATTACK.MELEE|</base_attack_bonus>
				<stat_mod>|VAR.CMB_STAT.INTVAL.SIGN|</stat_mod>
				<size_mod>|VAR.CMB_SizeMod.INTVAL.SIGN|</size_mod>
				<misc_mod>|VAR.CMB-ATTACK.MELEE.BASE-VAR.CMB_STAT-VAR.CMB_SizeMod.INTVAL.SIGN|</misc_mod>
				<epic_mod/>
				<temp_mod/>
				<!-- Base values (not yet used) -->
				<grapple_base>|VAR.CMB_Grapple.INTVAL.SIGN|</grapple_base>
				<trip_base>|VAR.CMB_Trip.INTVAL.SIGN|</trip_base>
				<disarm_base>|VAR.CMB_Disarm.INTVAL.SIGN|</disarm_base>
				<sunder_base>|VAR.CMB_Sunder.INTVAL.SIGN|</sunder_base>
				<bullrush_base>|VAR.CMB_Bull.INTVAL.SIGN|</bullrush_base>
				<overrun_base>|VAR.CMB_Overrun.INTVAL.SIGN|</overrun_base>
				<!-- Defense values -->
|IIF(HASVAR:CMD)|
				<!-- Pathfinder (final release) -->
				<!-- Attack values -->
				<grapple_attack>|VAR.CMB_Grapple.INTVAL.SIGN|</grapple_attack>
				<trip_attack>|VAR.CMB_Trip.INTVAL.SIGN|</trip_attack>
				<disarm_attack>|VAR.CMB_Disarm.INTVAL.SIGN|</disarm_attack>
				<sunder_attack>|VAR.CMB_Sunder.INTVAL.SIGN|</sunder_attack>
				<bullrush_attack>|VAR.CMB_BullRush.INTVAL.SIGN|</bullrush_attack>
				<overrun_attack>|VAR.CMB_Overrun.INTVAL.SIGN|</overrun_attack>
				<!-- Defense values -->
				<defense>|VAR.CMD.INTVAL|</defense>
				<grapple_defense>|VAR.CMD_Grapple.INTVAL|</grapple_defense>
				<trip_defense>
|IIF(VAR.IF(var("CantBeTripped")!=0;1;0):1)|
Immune
|ELSE|
|VAR.CMD_Trip.INTVAL|
|ENDIF|
				</trip_defense>
				<disarm_defense>|VAR.CMD_Disarm.INTVAL|</disarm_defense>
				<sunder_defense>|VAR.CMD_Sunder.INTVAL|</sunder_defense>
				<bullrush_defense>|VAR.CMD_BullRush.INTVAL|</bullrush_defense>
				<overrun_defense>|VAR.CMD_Overrun.INTVAL|</overrun_defense>

|ELSE|
				<!-- Pathfinder Beta version -->
				<!-- Attack values -->
				<grapple_attack>|VAR.CMB_Grapple_OFF.INTVAL.SIGN|</grapple_attack>
				<trip_attack>|VAR.CMB_Trip_OFF.INTVAL.SIGN|</trip_attack>
				<disarm_attack>|VAR.CMB_Disarm_OFF.INTVAL.SIGN|</disarm_attack>
				<sunder_attack>|VAR.CMB_Sunder_OFF.INTVAL.SIGN|</sunder_attack>
				<bullrush_attack>|VAR.CMB_Bull_OFF.INTVAL.SIGN|</bullrush_attack>
				<overrun_attack>|VAR.CMB_Overrun_OFF.INTVAL.SIGN|</overrun_attack>
				<!-- Defense values -->
				<defense>|VAR.CMB+VAR.CMB_DEF.INTVAL|</defense>
				<grapple_defense>|VAR.CMB_Grapple_DEF.INTVAL|</grapple_defense>
				<trip_defense>|VAR.CMB_Trip_DEF.INTVAL|</trip_defense>
				<disarm_defense>|VAR.CMB_Disarm_DEF.INTVAL|</disarm_defense>
				<sunder_defense>|VAR.CMB_Sunder_DEF.INTVAL|</sunder_defense>
				<bullrush_defense>|VAR.CMB_Bull_DEF.INTVAL|</bullrush_defense>
				<overrun_defense>|VAR.CMB_Overrun_DEF.INTVAL|</overrun_defense>
|ENDIF|
			</cmb>
|ELSE|
			<grapple>
				<total>|ATTACK.GRAPPLE.TOTAL|</total>
				<bab>|ATTACK.GRAPPLE.BASE|</bab>
				<base_attack_bonus>|ATTACK.GRAPPLE|</base_attack_bonus>
				<stat_mod>|ATTACK.GRAPPLE.STAT|</stat_mod>
				<size_mod>|ATTACK.GRAPPLE.SIZE|</size_mod>
				<misc_mod>|ATTACK.GRAPPLE.MISC|</misc_mod>
				<epic_mod>|ATTACK.GRAPPLE.EPIC|</epic_mod>
				<temp_mod/>
			</grapple>
|ENDIF|
		<!-- End CMB / Grapple Block -->
	</attack>
	<!--
	  ====================================
	  ====================================
			WEAPONS
	  ====================================
	  ====================================-->
	<weapons>
		<unarmed>
			<total>|WEAPONH.TOTALHIT|</total>
			<damage>|WEAPONH.DAMAGE|</damage>
			<critical>|WEAPONH.CRIT|/x|WEAPONH.MULT|</critical>
			<!-- Should be changed to a variable due to improved crit -->
			<reach>|REACH|</reach>
						<!-- Commenting this out (will need a test as well)
			3.0 uses "Subdual", 3.5 uses "nonlethal".  We'll need a separate node for both.
|IIF(<test for Lethal)|
|IIF(VAR.UnarmedLethal>0)|
			<type>(lethal or nonlethal)</type>
|ELSE|
			<type>(nonlethal only)</type>
|ENDIF|
|ELSE|
|IIF(VAR.Unarmed>0)|
			<type>(subdual or normal)</type>
|ELSE|
			<type>(subdual only)</type>
|ENDIF|
|ENDIF|
			 -->
		</unarmed>
|ENDIF|

|FOR,%weap,0,COUNT[EQTYPE.WEAPON]-1,1,1|
|IIF(WEAPON.%weap.CATEGORY:BOTH)|

|IIF(WEAPON.%weap.CATEGORY:Ranged)|
|ELSE| <!-- IIF(WEAPON.%weap.CATEGORY:Ranged) -->
		<weapon>
			<common>
				<name>
					<short>|WEAPON.%weap.NAME|</short>
					<long>|WEAPON.%weap.LONGNAME|</long>
					<output>|WEAPON.%weap.OUTPUTNAME|</output>
				</name>
				<category>|WEAPON.%weap.CATEGORY|</category>
				<critical>
					<range>|WEAPON.%weap.CRIT|</range>
					<multiplier>|WEAPON.%weap.MULT|</multiplier>
				</critical>
				<to_hit>
					<hit>|WEAPON.%weap.HIT|</hit>
					<magic_hit>|WEAPON.%weap.MAGICHIT|</magic_hit>
					<total_hit>|WEAPON.%weap.TOTALHIT|</total_hit>
				</to_hit>
				<feat>
					<hit>|WEAPON.%weap.FEATHIT|</hit>
					<damage>|WEAPON.%weap.FEATDAMAGE|</damage>
				</feat>
				<magic>
					<hit>|WEAPON.%weap.MAGICHIT|</hit>
					<damage>|WEAPON.%weap.MAGICDAMAGE|</damage>
				</magic>
				<template>
					<hit>|WEAPON.%weap.TEMPLATEHIT|</hit>
					<damage>|WEAPON.%weap.TEMPLATEDAMAGE|</damage>
				</template>
				<hand>|WEAPON.%weap.HAND|</hand>
				<num_attacks>|WEAPON.%weap.NUMATTACKS|</num_attacks>
				<reach>|WEAPON.%weap.REACH|</reach>
				<reachunit>|WEAPON.%weap.REACHUNIT|</reachunit>
				<size>|WEAPON.%weap.SIZE|</size>
				<special_properties>|WEAPON.%weap.SPROP|</special_properties>
				<type>|WEAPON.%weap.TYPE|</type>
				<weight>|WEAPON.%weap.WT|</weight>
				<attacks>|WEAPON.%weap.ATTACKS|</attacks>
				<heft>|WEAPON.%weap.HEFT|</heft>
				<range>|WEAPON.%weap.RANGE|</range>
				<sizemod>|WEAPON.%weap.SIZEMOD|</sizemod>
				<basehit>|WEAPON.%weap.BASEHIT|</basehit>
				<misc>|WEAPON.%weap.MISC|</misc>
				<damage>|WEAPON.%weap.DAMAGE|</damage>
				<damagebonus>|WEAPON.%weap.DAMAGEBONUS|</damagebonus>
				<basedamagebonus>|WEAPON.%weap.BASEDAMAGEBONUS|</basedamagebonus>
				<thdamagebonus>|WEAPON.%weap.THDAMAGEBONUS|</thdamagebonus>
				<ohdamagebonus>|WEAPON.%weap.OHDAMAGEBONUS|</ohdamagebonus>
				<rateoffire>|WEAPON.%weap.RATEOFFIRE|</rateoffire>
				<islight>|WEAPON.%weap.ISLIGHT|</islight>
				<sequence>|%weap|</sequence>
			</common>
			<melee>
				<hand>|WEAPON.%weap.HAND|</hand>
				<w1_h1_p>
					<!-- One weapon, 1 hand, primary hand -->
					<to_hit>|WEAPON.%weap.BASEHIT|</to_hit>
					<damage>|WEAPON.%weap.BASICDAMAGE|</damage>
				</w1_h1_p>
				<w1_h1_o>
					<!-- One weapon, 1 handed, offhand -->
					<to_hit>|WEAPON.%weap.OHHIT|</to_hit>
					<damage>|WEAPON.%weap.OHDAMAGE|</damage>
				</w1_h1_o>
				<w1_h2>
					<!-- One weapon, 2 handed -->
					<to_hit>|WEAPON.%weap.THHIT|</to_hit>
					<damage>|WEAPON.%weap.THDAMAGE|</damage>
				</w1_h2>
				<w2_p_oh>
					<!-- Two weapons, this weapon in primary hand, other hand with heavy weapon -->
					<to_hit>|WEAPON.%weap.TWPHITH|</to_hit>
					<damage>|WEAPON.%weap.BASICDAMAGE|</damage>
				</w2_p_oh>
				<w2_p_ol>
					<!-- Two weapons, this weapon in primary hand, other hand with light weapon -->
					<to_hit>|WEAPON.%weap.TWPHITL|</to_hit>
					<damage>|WEAPON.%weap.BASICDAMAGE|</damage>
				</w2_p_ol>
				<w2_o>
					<!-- Two weapons, this weapon in off-hand -->
					<to_hit>|WEAPON.%weap.TWOHIT|</to_hit>
					<damage>|WEAPON.%weap.OHDAMAGE|</damage>
				</w2_o>
			</melee>
|ENDIF| <!-- IIF(WEAPON.%weap.CATEGORY:Ranged) -->
|IIF(WEAPON.%weap.CATEGORY:Ranged)|
			<ranges>
|FOR,%range,0,4,1,0|
				<range>
					<distance>|WEAPON.%weap.RANGELIST.%range|</distance>
					<to_hit>|WEAPON.%weap.RANGELIST.%range.TOTALHIT|</to_hit>
					<damage>|WEAPON.%weap.RANGELIST.%range.DAMAGE|</damage>
					<basehit>|WEAPON.%weap.RANGELIST.%range.BASEHIT|</basehit>
					<tohit_offhand>|WEAPON.%weap.RANGELIST.%range.OHHIT|</tohit_offhand>
					<tohit_twohand>|WEAPON.%weap.RANGELIST.%range.BASEHIT|</tohit_twohand>
					<tohit_2weap_heavy>|WEAPON.%weap.RANGELIST.%range.TWPHITH|</tohit_2weap_heavy>
					<tohit_2weap_light>|WEAPON.%weap.RANGELIST.%range.TWPHITL|</tohit_2weap_light>
					<tohit_2weap_offhand>|WEAPON.%weap.RANGELIST.%range.TWOHIT|</tohit_2weap_offhand>
				</range>
|ENDFOR|	<!-- Range -->
			</ranges>
		</weapon>
|ELSE| <!-- IIF(WEAPON.%weap.CATEGORY:Ranged) -->
|ENDIF| <!-- IIF(WEAPON.%weap.CATEGORY:Ranged) -->


|ELSE| <!-- IIF(WEAPON.%weap.CATEGORY:BOTH) -->


|IIF(WEAPON.%weap.CATEGORY:Ranged)|

		<weapon>
			<common>
				<name>
					<short>|WEAPON.%weap.NAME|</short>
					<long>|WEAPON.%weap.LONGNAME|</long>
					<output>|WEAPON.%weap.OUTPUTNAME|</output>
				</name>
				<category>|WEAPON.%weap.CATEGORY|</category>
				<critical>
					<range>|WEAPON.%weap.CRIT|</range>
					<multiplier>|WEAPON.%weap.MULT|</multiplier>
				</critical>
				<to_hit>
					<hit>|WEAPON.%weap.HIT|</hit>
					<magic_hit>|WEAPON.%weap.MAGICHIT|</magic_hit>
					<total_hit>|WEAPON.%weap.TOTALHIT|</total_hit>
				</to_hit>
				<feat>
					<hit>|WEAPON.%weap.FEATHIT|</hit>
					<damage>|WEAPON.%weap.FEATDAMAGE|</damage>
				</feat>
				<magic>
					<hit>|WEAPON.%weap.MAGICHIT|</hit>
					<damage>|WEAPON.%weap.MAGICDAMAGE|</damage>
				</magic>
				<template>
					<hit>|WEAPON.%weap.TEMPLATEHIT|</hit>
					<damage>|WEAPON.%weap.TEMPLATEDAMAGE|</damage>
				</template>
				<hand>|WEAPON.%weap.HAND|</hand>
				<num_attacks>|WEAPON.%weap.NUMATTACKS|</num_attacks>
				<reach>|WEAPON.%weap.REACH|</reach>
				<reachunit>|WEAPON.%weap.REACHUNIT|</reachunit>
				<size>|WEAPON.%weap.SIZE|</size>
				<special_properties>|WEAPON.%weap.SPROP|</special_properties>
				<type>|WEAPON.%weap.TYPE|</type>
				<weight>|WEAPON.%weap.WT|</weight>
				<attacks>|WEAPON.%weap.ATTACKS|</attacks>
				<heft>|WEAPON.%weap.HEFT|</heft>
				<range>|WEAPON.%weap.RANGE|</range>
				<sizemod>|WEAPON.%weap.SIZEMOD|</sizemod>
				<basehit>|WEAPON.%weap.BASEHIT|</basehit>
				<misc>|WEAPON.%weap.MISC|</misc>
				<damage>|WEAPON.%weap.DAMAGE|</damage>
				<damagebonus>|WEAPON.%weap.DAMAGEBONUS|</damagebonus>
				<basedamagebonus>|WEAPON.%weap.BASEDAMAGEBONUS|</basedamagebonus>
				<thdamagebonus>|WEAPON.%weap.THDAMAGEBONUS|</thdamagebonus>
				<ohdamagebonus>|WEAPON.%weap.OHDAMAGEBONUS|</ohdamagebonus>
				<rateoffire>|WEAPON.%weap.RATEOFFIRE|</rateoffire>
				<islight>|WEAPON.%weap.ISLIGHT|</islight>
				<sequence>|%weap|</sequence>
			</common>
|IIF(WEAPON.%weap.CONTENTS:0)|
			<ranges>
|FOR,%range,0,4,1,0|
				<range>
					<distance>|WEAPON.%weap.RANGELIST.%range|</distance>
					<to_hit>|WEAPON.%weap.RANGELIST.%range.TOTALHIT|</to_hit>
					<damage>|WEAPON.%weap.RANGELIST.%range.DAMAGE|</damage>
					<basehit>|WEAPON.%weap.RANGELIST.%range.BASEHIT|</basehit>
					<tohit_offhand>|WEAPON.%weap.RANGELIST.%range.OHHIT|</tohit_offhand>
					<tohit_twohand>|WEAPON.%weap.RANGELIST.%range.BASEHIT|</tohit_twohand>
					<tohit_2weap_heavy>|WEAPON.%weap.RANGELIST.%range.TWPHITH|</tohit_2weap_heavy>
					<tohit_2weap_light>|WEAPON.%weap.RANGELIST.%range.TWPHITL|</tohit_2weap_light>
					<tohit_2weap_offhand>|WEAPON.%weap.RANGELIST.%range.TWOHIT|</tohit_2weap_offhand>
				</range>
|ENDFOR|	<!-- Range -->
			</ranges>
|ELSE|   <!-- IIF(WEAPON.%weap.CONTENTS:0) -->
|FOR,%ammo,0,WEAPON.%weap.CONTENTS-1,1,0|
			<ranges>
				<ammunition>
					<name>|WEAPON.%weap.CONTENTS.%ammo|</name>
					<special_properties>|WEAPON.%weap.CONTENTS.%ammo.SPROP|</special_properties>
					<quantity>|EQ.IS.WEAPON.%weap.CONTENTS.%ammo.QTY|</quantity>
				</ammunition>
|FOR,%range,0,4,1,0|
				<range>
					<distance>|WEAPON.%weap.RANGELIST.%range|</distance>
					<to_hit>|WEAPON.%weap.RANGELIST.%range.CONTENTS.%ammo.TOTALHIT|</to_hit>
					<damage>|WEAPON.%weap.RANGELIST.%range.CONTENTS.%ammo.DAMAGE|</damage>
					<basehit>|WEAPON.%weap.RANGELIST.%range.BASEHIT|</basehit>
					<tohit_offhand>|WEAPON.%weap.RANGELIST.%range.OHHIT|</tohit_offhand>
					<tohit_twohand>|WEAPON.%weap.RANGELIST.%range.BASEHIT|</tohit_twohand>
					<tohit_2weap_heavy>|WEAPON.%weap.RANGELIST.%range.TWPHITH|</tohit_2weap_heavy>
					<tohit_2weap_light>|WEAPON.%weap.RANGELIST.%range.TWPHITL|</tohit_2weap_light>
					<tohit_2weap_offhand>|WEAPON.%weap.RANGELIST.%range.TWOHIT|</tohit_2weap_offhand>
				</range>
|ENDFOR|	<!-- Range -->
			</ranges>
|ENDFOR|  <!-- FOR,%ammo,0,WEAPON.%weap.CONTENTS-1,1,1 -->
|ENDIF|   <!-- IIF(WEAPON.%weap.CONTENTS:0) -->
		</weapon>

|ELSE|  <!-- IIF(WEAPON.%weap.CATEGORY:Ranged) -->


|IIF(WEAPON.%weap.ISTYPE.Double.OR.WEAPON.%weap.CATEGORY:Non-Standard-Melee.OR.WEAPON.%weap.CATEGORY:NATURAL)|
		<weapon>
			<common>
				<name>
					<short>|WEAPON.%weap.NAME|</short>
					<long>|WEAPON.%weap.LONGNAME|</long>
					<output>|WEAPON.%weap.OUTPUTNAME|</output>
				</name>
				<category>|WEAPON.%weap.CATEGORY|</category>
				<critical>
					<range>|WEAPON.%weap.CRIT|</range>
					<multiplier>|WEAPON.%weap.MULT|</multiplier>
				</critical>
				<to_hit>
					<hit>|WEAPON.%weap.HIT|</hit>
					<magic_hit>|WEAPON.%weap.MAGICHIT|</magic_hit>
					<total_hit>|WEAPON.%weap.TOTALHIT|</total_hit>
				</to_hit>
				<feat>
					<hit>|WEAPON.%weap.FEATHIT|</hit>
					<damage>|WEAPON.%weap.FEATDAMAGE|</damage>
				</feat>
				<magic>
					<hit>|WEAPON.%weap.MAGICHIT|</hit>
					<damage>|WEAPON.%weap.MAGICDAMAGE|</damage>
				</magic>
				<template>
					<hit>|WEAPON.%weap.TEMPLATEHIT|</hit>
					<damage>|WEAPON.%weap.TEMPLATEDAMAGE|</damage>
				</template>
				<hand>|WEAPON.%weap.HAND|</hand>
				<num_attacks>|WEAPON.%weap.NUMATTACKS|</num_attacks>
				<reach>|WEAPON.%weap.REACH|</reach>
				<reachunit>|WEAPON.%weap.REACHUNIT|</reachunit>
				<size>|WEAPON.%weap.SIZE|</size>
				<special_properties>|WEAPON.%weap.SPROP|</special_properties>
				<type>|WEAPON.%weap.TYPE|</type>
				<weight>|WEAPON.%weap.WT|</weight>
				<attacks>|WEAPON.%weap.ATTACKS|</attacks>
				<heft>|WEAPON.%weap.HEFT|</heft>
				<range>|WEAPON.%weap.RANGE|</range>
				<sizemod>|WEAPON.%weap.SIZEMOD|</sizemod>
				<basehit>|WEAPON.%weap.BASEHIT|</basehit>
				<misc>|WEAPON.%weap.MISC|</misc>
				<damage>|WEAPON.%weap.DAMAGE|</damage>
				<damagebonus>|WEAPON.%weap.DAMAGEBONUS|</damagebonus>
				<basedamagebonus>|WEAPON.%weap.BASEDAMAGEBONUS|</basedamagebonus>
				<thdamagebonus>|WEAPON.%weap.THDAMAGEBONUS|</thdamagebonus>
				<ohdamagebonus>|WEAPON.%weap.OHDAMAGEBONUS|</ohdamagebonus>
				<rateoffire>|WEAPON.%weap.RATEOFFIRE|</rateoffire>
				<islight>|WEAPON.%weap.ISLIGHT|</islight>
				<sequence>|%weap|</sequence>
			</common>
			<simple>
				<to_hit>|WEAPON.%weap.TOTALHIT|</to_hit>
				<damage>|WEAPON.%weap.DAMAGE|</damage>
				<range>|WEAPON.%weap.RANGE|</range>
			</simple>
		</weapon>
|ELSE|  <!-- IIF(WEAPON.%weap.ISTYPE.Double.OR.WEAPON.%weap.CATEGORY:Non-Standard-Melee) -->
		<weapon>
			<common>
				<name>
					<short>|WEAPON.%weap.NAME|</short>
					<long>|WEAPON.%weap.LONGNAME|</long>
					<output>|WEAPON.%weap.OUTPUTNAME|</output>
				</name>
				<category>|WEAPON.%weap.CATEGORY|</category>
				<critical>
					<range>|WEAPON.%weap.CRIT|</range>
					<multiplier>|WEAPON.%weap.MULT|</multiplier>
				</critical>
				<to_hit>
					<hit>|WEAPON.%weap.HIT|</hit>
					<magic_hit>|WEAPON.%weap.MAGICHIT|</magic_hit>
					<total_hit>|WEAPON.%weap.TOTALHIT|</total_hit>
				</to_hit>
				<feat>
					<hit>|WEAPON.%weap.FEATHIT|</hit>
					<damage>|WEAPON.%weap.FEATDAMAGE|</damage>
				</feat>
				<magic>
					<hit>|WEAPON.%weap.MAGICHIT|</hit>
					<damage>|WEAPON.%weap.MAGICDAMAGE|</damage>
				</magic>
				<template>
					<hit>|WEAPON.%weap.TEMPLATEHIT|</hit>
					<damage>|WEAPON.%weap.TEMPLATEDAMAGE|</damage>
				</template>
				<hand>|WEAPON.%weap.HAND|</hand>
				<num_attacks>|WEAPON.%weap.NUMATTACKS|</num_attacks>
				<reach>|WEAPON.%weap.REACH|</reach>
				<reachunit>|WEAPON.%weap.REACHUNIT|</reachunit>
				<size>|WEAPON.%weap.SIZE|</size>
				<special_properties>|WEAPON.%weap.SPROP|</special_properties>
				<type>|WEAPON.%weap.TYPE|</type>
				<weight>|WEAPON.%weap.WT|</weight>
				<attacks>|WEAPON.%weap.ATTACKS|</attacks>
				<heft>|WEAPON.%weap.HEFT|</heft>
				<range>|WEAPON.%weap.RANGE|</range>
				<sizemod>|WEAPON.%weap.SIZEMOD|</sizemod>
				<basehit>|WEAPON.%weap.BASEHIT|</basehit>
				<misc>|WEAPON.%weap.MISC|</misc>
				<damage>|WEAPON.%weap.DAMAGE|</damage>
				<damagebonus>|WEAPON.%weap.DAMAGEBONUS|</damagebonus>
				<basedamagebonus>|WEAPON.%weap.BASEDAMAGEBONUS|</basedamagebonus>
				<thdamagebonus>|WEAPON.%weap.THDAMAGEBONUS|</thdamagebonus>
				<ohdamagebonus>|WEAPON.%weap.OHDAMAGEBONUS|</ohdamagebonus>
				<rateoffire>|WEAPON.%weap.RATEOFFIRE|</rateoffire>
				<islight>|WEAPON.%weap.ISLIGHT|</islight>
				<sequence>|%weap|</sequence>
			</common>
			<melee>
				<w1_h1_p>
					<!-- One weapon, 1 hand, primary hand -->
					<to_hit>|WEAPON.%weap.BASEHIT|</to_hit>
					<damage>|WEAPON.%weap.BASICDAMAGE|</damage>
				</w1_h1_p>
				<w1_h1_o>
					<!-- One weapon, 1 handed, offhand -->
					<to_hit>|WEAPON.%weap.OHHIT|</to_hit>
					<damage>|WEAPON.%weap.OHDAMAGE|</damage>
				</w1_h1_o>
				<w1_h2>
					<!-- One weapon, 2 handed -->
					<to_hit>|WEAPON.%weap.THHIT|</to_hit>
					<damage>|WEAPON.%weap.THDAMAGE|</damage>
				</w1_h2>
				<w2_p_oh>
					<!-- Two weapons, this weapon in primary hand, other hand with heavy weapon -->
					<to_hit>|WEAPON.%weap.TWPHITH|</to_hit>
					<damage>|WEAPON.%weap.BASICDAMAGE|</damage>
				</w2_p_oh>
				<w2_p_ol>
					<!-- Two weapons, this weapon in primary hand, other hand with light weapon -->
					<to_hit>|WEAPON.%weap.TWPHITL|</to_hit>
					<damage>|WEAPON.%weap.BASICDAMAGE|</damage>
				</w2_p_ol>
				<w2_o>
					<!-- Two weapons, this weapon in off-hand -->
					<to_hit>|WEAPON.%weap.TWOHIT|</to_hit>
					<damage>|WEAPON.%weap.OHDAMAGE|</damage>
				</w2_o>
			</melee>
		</weapon>
|ENDIF|  <!-- IIF(WEAPON.%weap.ISTYPE.Double.OR.WEAPON.%weap.CATEGORY:Non-Standard-Melee) -->
|ENDIF|  <!-- IIF(WEAPON.%weap.CATEGORY:Ranged) -->
|ENDIF|  <!-- IIF(WEAPON.%weap.CATEGORY:BOTH) -->
|ENDFOR|  <!-- FOR,%weap,0,COUNT[EQTYPE.WEAPON]-1,1,1 -->
	</weapons>
	<!--
	  ====================================
	  ====================================
			ARMOR
	  ====================================
	  ====================================-->
	<protection>
|FOR,%armor,0,COUNT[EQTYPE.Armor]-1,1,0|
		<armor>
			<name>|ARMOR.Armor.ALL.%armor.NAME|</name>
			<acbonus>|ARMOR.Armor.ALL.%armor.ACBONUS|</acbonus>
			<accheck>|ARMOR.Armor.ALL.%armor.ACCHECK|</accheck>
			<baseac>|ARMOR.Armor.ALL.%armor.BASEAC|</baseac>
			<edr>|ARMOR.Armor.ALL.%armor.EDR|</edr>
			<maxdex>|ARMOR.Armor.ALL.%armor.MAXDEX|</maxdex>
			<move>|ARMOR.Armor.ALL.%armor.MOVE|</move>
			<spellfail>|ARMOR.Armor.ALL.%armor.SPELLFAIL|</spellfail>
			<special_properties>|ARMOR.Armor.ALL.%armor.SPROP|</special_properties>
			<totalac>|ARMOR.Armor.ALL.%armor.TOTALAC|</totalac>
			<type>|ARMOR.Armor.ALL.%armor.TYPE|</type>
			<wt>|ARMOR.Armor.ALL.%armor.WT|</wt>
		</armor>
|ENDFOR|
|FOR,%armor,0,COUNT[EQTYPE.SHIELD]-1,1,0|
		<shield>
			<name>|ARMOR.SHIELD.ALL.%armor.NAME|</name>
			<acbonus>|ARMOR.SHIELD.ALL.%armor.ACBONUS|</acbonus>
			<accheck>|ARMOR.SHIELD.ALL.%armor.ACCHECK|</accheck>
			<baseac>|ARMOR.SHIELD.ALL.%armor.BASEAC|</baseac>
			<edr>|ARMOR.SHIELD.ALL.%armor.EDR|</edr>
			<maxdex>|ARMOR.SHIELD.ALL.%armor.MAXDEX|</maxdex>
			<move>|ARMOR.SHIELD.ALL.%armor.MOVE|</move>
			<spellfail>|ARMOR.SHIELD.ALL.%armor.SPELLFAIL|</spellfail>
			<special_properties>|ARMOR.SHIELD.ALL.%armor.SPROP|</special_properties>
			<totalac>|ARMOR.SHIELD.ALL.%armor.TOTALAC|</totalac>
			<type>|ARMOR.SHIELD.ALL.%armor.TYPE|</type>
			<wt>|ARMOR.SHIELD.ALL.%armor.WT|</wt>
		</shield>
|ENDFOR|
|FOR,%armor,0,COUNT[EQTYPE.ACITEM]-1,1,0|
		<item>
			<name>|ARMOR.ACITEM.%armor.NAME|</name>
			<acbonus>|ARMOR.ACITEM.%armor.ACBONUS|</acbonus>
			<accheck>|ARMOR.ACITEM.%armor.ACCHECK|</accheck>
			<baseac>|ARMOR.ACITEM.%armor.BASEAC|</baseac>
			<edr>|ARMOR.ACITEM.%armor.EDR|</edr>
			<maxdex>|ARMOR.ACITEM.%armor.MAXDEX|</maxdex>
			<move>|ARMOR.ACITEM.%armor.MOVE|</move>
			<spellfail>|ARMOR.ACITEM.%armor.SPELLFAIL|</spellfail>
			<special_properties>|ARMOR.ACITEM.%armor.SPROP|</special_properties>
			<totalac>|ARMOR.ACITEM.%armor.TOTALAC|</totalac>
			<type>|ARMOR.ACITEM.%armor.TYPE|</type>
			<wt>|ARMOR.ACITEM.%armor.WT|</wt>
		</item>
|ENDFOR|
	</protection>
	<!--
	  ====================================
	  ====================================
			CLASS-DEPENDANT FEATURES
	  ====================================
	  ====================================-->
	<class_features>
|%VAR.BardicMusicLevel.GTEQ.1|
		<bardic_music>
			<uses_per_day>|VAR.BardicMusicLevel.INTVAL|</uses_per_day>
			<effects>Effects (Perform ranks required)</effects>
			<text>Inspire Courage(3), Countersong(3), Fascinate(3),Inspire Competence(6), Suggestion(9), Inspire Greatness(12)</text>
		</bardic_music>
|%|
|%VAR.BardicMusicTimes.GTEQ.1|
		<bardic_music>
			<uses_per_day>|VAR.BardicMusicTimes.INTVAL|</uses_per_day>
			<text>
|%|
|%VAR.CountersongDuration.GTEQ.1|
	Countersong(duration = |VAR.CountersongDuration.INTVAL| rounds)
|%|
|%VAR.FascinateCreatures.INTVAL.GTEQ.1|
	Fascinate(up to |VAR.FascinateCreatures.INTVAL| creatures for up to |VAR.FacinateDuration.INTVAL| rounds)
|%|
|%VAR.InspireCourageSaves.GTEQ.1|
	Inspire Courage(save bonus = |VAR.InspireCourageSaves.INTVAL.SIGN|, attack and damage bonus = |VAR.InspireCourageAttack.INTVAL.SIGN|)
|%|
|%VAR.InspireCompetenceBonus.INTVAL.GTEQ.1|
	Inspire Competence(skill check bonus = |VAR.InspireCompetenceBonus.INTVAL.SIGN| for up to |VAR.InspireCompetenceDuration.INTVAL| minutes)
|%|
|%VAR.SingleSuggestionDC.INTVAL.GTEQ.1|
	Suggestion(DC: |VAR.SingleSuggestionDC.INTVAL|)
|%|
|%VAR.InspireGreatnessAllies.INTVAL.GTEQ.1|
	Inspire Greatness(number of allies = |VAR.InspireGreatnessAllies.INTVAL|, bonus HD = |VAR.InspireGreatnessHD.INTVAL|, attack bonus = |VAR.InspireGreatnessAttack.INTVAL.SIGN|, Fortitude bonus = |VAR.InspireGreatnessSaves.INTVAL.SIGN|)
|%|
|%VAR.SongOfFreedomLVL.INTVAL.GTEQ.1|
	Song of Freedom(effective caster level = |VAR.SongOfFreedomLVL.INTVAL|)
|%|
|%VAR.InspireHeroicsAllies.INTVAL.GTEQ.1|
	Inspire Greatness(number of allies = |VAR.InspireHeroicsAllies.INTVAL|, save bonus = |VAR.InspireHeroicsSaves.INTVAL.SIGN|, dodge bonus = |VAR.InspireHeroicsDodge.INTVAL.SIGN|)
|%|
|%VAR.MassSuggestionDC.INTVAL.GTEQ.1|
	Mass Suggestion(DC: |VAR.MassSuggestionDC.INTVAL|)
|%|
|%VAR.BardicMusicTimes.GTEQ.1|
			</text>
		</bardic_music>
|%|	<!-- Bard -->


|%VAR.RageTimes.GTEQ.1|	<!-- If character can Rage -->
	<rage>
		<uses_per_day>|VAR.RageTimes.INTVAL|</uses_per_day>
		<description>The Barbarian temporarily gains +|VAR.RageStrBonus.INTVAL| to Strength, +|VAR.RageConBonus.INTVAL| to Constitution, and a +|VAR.RageMorale.INTVAL| morale bonus on Will saves, but suffers a -2 penalty to AC. A fit of rage lasts for a number of rounds equal to 3 + the character's (newly improved) Constitution modifier. At the end of the rage, the barbarian is fatigued (-2 to Strength, -2 to Dexterity, can't charge or run) for the duration of that encounter (unless the barbarian is 20th level, when this limitation no longer applies). The barbarian can only fly into a rage once per encounter, and only a certain number of times per day (determined by level). Entering a rage takes no time itself, but the barbarian can only do it during his action.</description>
	</rage>
	<!-- this stuff needs a bit of work to display correct info for both 3e and 3.5e properly. - Tir Gwaith -->
|%|	<!-- Character Rage -->


	<!-- Turning ability -->

|FOR,%turncount,0,count("ABILITIES","CATEGORY=Special Ability","TYPE=Turning"),1,0|
|IIF(ABILITYALL.Special Ability.%turncount.TYPE=Turning.HASASPECT.TurnType:Y)|
	<turning kind="|TEXT.UPPER.ABILITYALL.Special Ability.%turncount.TYPE=Turning.ASPECT.TurnKind|" type="|TEXT.UPPER.ABILITYALL.Special Ability.%turncount.TYPE=Turning.ASPECT.TurnType|">
		<level>|ABILITYALL.Special Ability.%turncount.TYPE=Turning.ASPECT.TurnLevel.INTVAL|</level>
		<turn_check>1d20|ABILITYALL.Special Ability.%turncount.TYPE=Turning.ASPECT.TurnCheck.INTVAL.SIGN|</turn_check>
		<damage>|ABILITYALL.Special Ability.%turncount.TYPE=Turning.ASPECT.TurnDamage|</damage>
		<uses_per_day>|ABILITYALL.Special Ability.%turncount.TYPE=Turning.ASPECT.TurnTimes.INTVAL|</uses_per_day>
		<notes>|ABILITYALL.Special Ability.%turncount.TYPE=Turning.ASPECT.TurnNotes|</notes>
		</turning>
|ENDIF|
|ENDFOR|


|%VAR.StunningAttack.GTEQ.1|
		<stunning_fist>
			<save_dc>|VAR.StunDC.INTVAL|</save_dc>
			<uses_per_day>|VAR.StunningAttack.INTVAL|</uses_per_day>
		</stunning_fist>
|%|	<!-- 3.0 stunning fist -->

|%VAR.StunningFistAttack.GTEQ.1|
		<stunning_fist>
			<save_dc>|VAR.StunningFistDC.INTVAL|</save_dc>
			<uses_per_day>|VAR.StunningFistAttack.INTVAL|</uses_per_day>
		</stunning_fist>
|%|	<!-- 3.5 stunning fist -->

|%VAR.WholenessHpLVL.GTEQ.1|
		<wholeness_of_body>
			<hp_per_day>|VAR.WholenessHpLVL.INTVAL*2|</hp_per_day>
		</wholeness_of_body>
|%|	<!-- 3.0 wholeness of body -->

|%VAR.WholenessBody.GTEQ.1|
		<wholeness_of_body>
			<hp_per_day>|VAR.WholenessBody.INTVAL|</hp_per_day>
		</wholeness_of_body>
|%|	<!-- 3.5 wholeness of body -->

|%VAR.TOTALPOWERPOINTS.GTEQ.1|	<!-- Psionics -->
		<psionics>
|IIF(HASVAR:Manifester.OR.HASVAR:PsychicWarriorManifester)|
			<type>3.0</type>
|ELSE|
			<type>3.5</type>
|ENDIF|
			<base_pp>|VAR.BASEPOWERPOINTS.INTVAL|</base_pp>
			<bonus_pp>|VAR.BONUSPOWERPOINTS.INTVAL|</bonus_pp>
			<total_pp>|VAR.TOTALPOWERPOINTS.INTVAL|</total_pp>
		</psionics>
|%|	<!-- Psionics -->

|%VAR.LayOnHands.GTEQ.1|
		<layonhands>
			<hp_per_day>|VAR.LayOnHands.INTVAL|</hp_per_day>
		</layonhands>
|%|

|%VAR.WildshapeTimes.GTEQ.1|
		<wildshape>
			<uses_per_day>|VAR.WildShapeTimes.INTVAL|</uses_per_day>
			<elemental_uses_per_day>|VAR.WildShapeElementalTimes.INTVAL|</elemental_uses_per_day>
			<duration>|VAR.WildShapeDuration.INTVAL|</duration>
		</wildshape>
|%|


|%VAR.LeadershipScore.GTEQ.1|
		<leadership>
			<score>|VAR.LeadershipScore.INTVAL|</score>
			<max_cohort_level>|VAR.LeadershipMaxCohortLvl|</max_cohort_level>
		</leadership>
|%|
	</class_features>

	<!-- Abilites with check lists -->
	<checklists>
|FOR,%ability,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","NATURE=AUTOMATIC","TYPE=CheckList")-1,1,0|
|IIF(ABILITYAUTO.Special Ability.VISIBLE.%ability.TYPE=CheckList.HASASPECT.CheckCount:Y)|
		<checklist>
|IIF(ABILITYAUTO.Special Ability.VISIBLE.%ability.TYPE=CheckList.TYPE:Extraordinary)|
			<name>|ABILITYAUTO.Special Ability.%ability.TYPE=CheckList| (Ex)</name>
|ELSE|
|IIF(ABILITYAUTO.Special Ability.VISIBLE.%ability.TYPE=CheckList.TYPE:Supernatural)|
			<name>|ABILITYAUTO.Special Ability.%ability.TYPE=CheckList| (Su)</name>
|ELSE|
|IIF(ABILITYAUTO.Special Ability.VISIBLE.%ability.TYPE=CheckList.TYPE:SpellLike)|
			<name>|ABILITYAUTO.Special Ability.%ability.TYPE=CheckList| (Sp)</name>
|ELSE|
|ENDIF|
|ENDIF|
|ENDIF|
			<header>|ABILITYAUTO.Special Ability.VISIBLE.%ability.TYPE=CheckList|</header>
			<description>|ABILITYAUTO.Special Ability.VISIBLE.%ability.TYPE=CheckList.DESC|</description>
			<type>|ABILITYAUTO.Special Ability.VISIBLE.%ability.TYPE=CheckList.TYPE|</type>
			<source>|ABILITYAUTO.Special Ability.VISIBLE.%ability.TYPE=CheckList.SOURCE|</source>
			<check_count>|ABILITYAUTO.Special Ability.%ability.TYPE=CheckList.ASPECT.CheckCount.INTVAL|</check_count>
			<check_type>|ABILITYAUTO.Special Ability.%ability.TYPE=CheckList.ASPECT.CheckType|</check_type>
		</checklist>
|ENDIF|
|ENDFOR|
	</checklists>

<!--
	  ====================================
	  ====================================
			EQUIPMENT
	  ====================================
	  ====================================-->
	<equipment>
|FOR,%equip,0,COUNT[EQUIPMENT.MERGELOC]-1,1,1|
		<item>
			<longname>|EQ.MERGELOC.%equip.LONGNAME|</longname>
			<id>|EQ.MERGELOC.%equip.ID|</id>
			<name>|EQ.MERGELOC.%equip.NAME|</name>
			<carried>|EQ.MERGELOC.%equip.CARRIED|</carried>
			<charges>|EQ.MERGELOC.%equip.CHARGES|</charges>
			<charges_used>|EQ.MERGELOC.%equip.CHARGESUSED|</charges_used>
			<contents>|EQ.MERGELOC.%equip.CONTENTS|</contents>
			<contents_num>|EQ.MERGELOC.%equip.CONTENTSNUM|</contents_num>
			<content_weight>|EQ.MERGELOC.%equip.CONTENTWEIGHT|</content_weight>
			<cost>|EQ.MERGELOC.%equip.COST|</cost>
			<equipped>|EQ.MERGELOC.%equip.EQUIPPED|</equipped>
			<location>|EQ.MERGELOC.%equip.LOCATION|</location>
			<locationId>|EQ.MERGELOC.%equip.LOCATIONID|</locationId>
			<maxcharges>|EQ.MERGELOC.%equip.MAXCHARGES|</maxcharges>
			<note>|EQ.MERGELOC.%equip.NOTE|</note>
			<quantity>|EQ.MERGELOC.%equip.QTY|</quantity>
			<checkbox>|EQ.MERGELOC.%equip.CHECKBOXES|</checkbox>
			<size>
				<long>|EQ.MERGELOC.%equip.SIZELONG|</long>
				<short>|EQ.MERGELOC.%equip.SIZE|</short>
			</size>
			<special_properties>|EQ.MERGELOC.%equip.SPROP|</special_properties>
			<type>|EQ.MERGELOC.%equip.TYPE|</type>
			<weight>|EQ.MERGELOC.%equip.WT|</weight>
			<total_wt>|EQ.MERGELOC.%equip.TOTALWT|</total_wt>
			<total_weight>|EQ.MERGELOC.%equip.TOTALWEIGHT|</total_weight>
			<bonuslist>|EQ.MERGELOC.%equip.BONUSLIST|</bonuslist>
			<acmod>|EQ.MERGELOC.%equip.ACMOD|</acmod>
			<maxdex>|EQ.MERGELOC.%equip.MAXDEX|</maxdex>
			<accheck>|EQ.MERGELOC.%equip.ACCHECK|</accheck>
			<edr>|EQ.MERGELOC.%equip.EDR|</edr>
			<move>|EQ.MERGELOC.%equip.MOVE|</move>
			<spell_failure>|EQ.MERGELOC.%equip.SPELLFAILURE|</spell_failure>
			<damage>|EQ.MERGELOC.%equip.DAMAGE|</damage>
			<damage_alt>|EQ.MERGELOC.%equip.ALTDAMAGE|</damage_alt>
			<crit_range>|EQ.MERGELOC.%equip.CRITRANGE|</crit_range>
			<crit_mult>|EQ.MERGELOC.%equip.CRITMULT|</crit_mult>
			<crit_range_alt>|EQ.MERGELOC.%equip.ALTCRITRANGE|</crit_range_alt>
			<crit_mult_alt>|EQ.MERGELOC.%equip.ALTCRITMULT|</crit_mult_alt>
			<range>|EQ.MERGELOC.%equip.RANGE|</range>
			<attacks>|EQ.MERGELOC.%equip.ATTACKS|</attacks>
			<prof>|EQ.MERGELOC.%equip.PROF|</prof>
			<source>|EQ.MERGELOC.%equip.SOURCE|</source>
		</item>
|ENDFOR|	<!-- Equipment -->
		<total>
			<weight>|TOTAL.WEIGHT|</weight>
			<value>|TOTAL.VALUE|</value>
			<load>|TOTAL.LOAD|</load>
			<capacity>|TOTAL.CAPACITY|</capacity>
		</total>
		<equipmentsets>
|EQSET.START|
		<equipmentset name="|EQSET.NAME|">
|FOR,%equip,0,COUNT[EQUIPMENT.MERGELOC]-1,1,1|
				<item>
					<longname>|EQ.MERGELOC.%equip.LONGNAME|</longname>
					<name>|EQ.MERGELOC.%equip.NAME|</name>
					<carried>|EQ.MERGELOC.%equip.CARRIED|</carried>
					<charges>|EQ.MERGELOC.%equip.CHARGES|</charges>
					<charges_used>|EQ.MERGELOC.%equip.CHARGESUSED|</charges_used>
					<contents>|EQ.MERGELOC.%equip.CONTENTS|</contents>
					<contents_num>|EQ.MERGELOC.%equip.CONTENTSNUM|</contents_num>
					<content_weight>|EQ.MERGELOC.%equip.CONTENTWEIGHT|</content_weight>
					<cost>|EQ.MERGELOC.%equip.COST|</cost>
					<equipped>|EQ.MERGELOC.%equip.EQUIPPED|</equipped>
					<location>|EQ.MERGELOC.%equip.LOCATION|</location>
					<maxcharges>|EQ.MERGELOC.%equip.MAXCHARGES|</maxcharges>
					<note>|EQ.MERGELOC.%equip.NOTE|</note>
					<quantity>|EQ.MERGELOC.%equip.QTY|</quantity>
					<checkbox>|EQ.MERGELOC.%equip.CHECKBOXES|</checkbox>
					<size>
						<long>|EQ.MERGELOC.%equip.SIZELONG|</long>
						<short>|EQ.MERGELOC.%equip.SIZE|</short>
					</size>
					<special_properties>|EQ.MERGELOC.%equip.SPROP|</special_properties>
					<type>|EQ.MERGELOC.%equip.TYPE|</type>
					<weight>|EQ.MERGELOC.%equip.WT|</weight>
					<total_wt>|EQ.MERGELOC.%equip.TOTALWT|</total_wt>
					<total_weight>|EQ.MERGELOC.%equip.TOTALWEIGHT|</total_weight>
					<bonuslist>|EQ.MERGELOC.%equip.BONUSLIST|</bonuslist>
					<acmod>|EQ.MERGELOC.%equip.ACMOD|</acmod>
					<maxdex>|EQ.MERGELOC.%equip.MAXDEX|</maxdex>
					<accheck>|EQ.MERGELOC.%equip.ACCHECK|</accheck>
					<edr>|EQ.MERGELOC.%equip.EDR|</edr>
					<move>|EQ.MERGELOC.%equip.MOVE|</move>
					<spell_failure>|EQ.MERGELOC.%equip.SPELLFAILURE|</spell_failure>
					<damage>|EQ.MERGELOC.%equip.DAMAGE|</damage>
					<damage_alt>|EQ.MERGELOC.%equip.ALTDAMAGE|</damage_alt>
					<crit_range>|EQ.MERGELOC.%equip.CRITRANGE|</crit_range>
					<crit_mult>|EQ.MERGELOC.%equip.CRITMULT|</crit_mult>
					<crit_range_alt>|EQ.MERGELOC.%equip.ALTCRITRANGE|</crit_range_alt>
					<crit_mult_alt>|EQ.MERGELOC.%equip.ALTCRITMULT|</crit_mult_alt>
					<range>|EQ.MERGELOC.%equip.RANGE|</range>
					<attacks>|EQ.MERGELOC.%equip.ATTACKS|</attacks>
					<prof>|EQ.MERGELOC.%equip.PROF|</prof>
					<source>|EQ.MERGELOC.%equip.SOURCE|</source>
				</item>
|ENDFOR|	<!-- Equipment -->
			</equipmentset>
|EQSET.END|
		</equipmentsets>
	</equipment>
	<weight_allowance>
		<light>|WEIGHT.LIGHT|</light>
		<medium>|WEIGHT.MEDIUM|</medium>
		<heavy>|WEIGHT.HEAVY|</heavy>
		<lift_over_head>|WEIGHT.OVERHEAD|</lift_over_head>
		<lift_off_ground>|WEIGHT.OFFGROUND|</lift_off_ground>
		<!-- And loses Dex bonus to AC and can only move 5 feet per round as a full-round action -->
		<push_drag>|WEIGHT.PUSHDRAG|</push_drag>
	</weight_allowance>
	<!--
	  ====================================
	  ====================================
			SPECIAL ABILITIES
	  ====================================
	  ====================================-->
	<special_abilities>
|FOR,%sa,0,COUNT[SA]-1,1,1|
		<ability>
			<name>|SPECIALABILITY.%sa|</name>
			<description>|SPECIALABILITY.%sa.DESCRIPTION|</description>
		</ability>
|ENDFOR|	<!-- Special Abilities -->
		<race>|RACE.ABILITYLIST|</race>
|FOR,%class,0,COUNT[CLASSES]-1,1,1|
		<class>
			<class>|CLASS.%class|</class>
			<ability>|CLASS.%class.SALIST|</ability>
		</class>
|ENDFOR|
	</special_abilities>
	<!--
	  ====================================
	  ====================================
			FEATS
	  ====================================
	  ====================================-->
	<feats>
		<!-- Visible standard feats (not including the auto feats) -->
|FOR,%feat,0,COUNT[FEATS.VISIBLE]-1,1,0|
		<feat>
			<name>|FEAT.VISIBLE.%feat|</name>
			<description>|FEAT.VISIBLE.%feat.DESC|</description>
			<type>|FEAT.VISIBLE.%feat.TYPE|</type>
			<associated>|FEAT.VISIBLE.%feat.ASSOCIATED|</associated>
			<count>|FEAT.VISIBLE.%feat.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<source>|FEAT.VISIBLE.%feat.SOURCE|</source>
		</feat>
|ENDFOR|

		<!-- Auto feats -->
|FOR,%feat,0,COUNT[FEATSAUTO.VISIBLE]-1,1,0|
		<feat>
			<name>|FEATAUTO.VISIBLE.%feat|</name>
			<description>|FEATAUTO.VISIBLE.%feat.DESC|</description>
			<type>|FEATAUTO.VISIBLE.%feat.TYPE|</type>
			<associated>|FEATAUTO.VISIBLE.%feat.ASSOCIATED|</associated>
			<count>|FEATAUTO.VISIBLE.%feat.ASSOCIATEDCOUNT|</count>
			<auto>T</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<source>|FEATAUTO.VISIBLE.%feat.SOURCE|</source>
		</feat>
|ENDFOR|

		<!-- Virtual Feats -->
|FOR,%feat,0,COUNT[VFEATS.VISIBLE]-1,1,0|
		<feat>
			<name>|VFEAT.VISIBLE.%feat|</name>
			<description>|VFEAT.VISIBLE.%feat.DESC|</description>
			<type>|VFEAT.VISIBLE.%feat.TYPE|</type>
			<associated>|VFEAT.VISIBLE.%feat.ASSOCIATED|</associated>
			<count>|VFEAT.VISIBLE.%feat.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>T</virtual>
			<source>|VFEAT.VISIBLE.%feat.SOURCE|</source>
		</feat>
|ENDFOR|
		<!-- End Virtual Feats -->
		<!-- Hidden feats (all feats less the virtual, automatic and visible ones) -->
|FOR,%feat,0,COUNT[FEATS.HIDDEN]-1,1,0|
		<feat>
			<name>|FEAT.HIDDEN.%feat|</name>
			<description>|FEAT.HIDDEN.%feat.DESC|</description>
			<type>|FEAT.HIDDEN.%feat.TYPE|</type>
			<associated>|FEAT.HIDDEN.%feat.ASSOCIATED|</associated>
			<count>|FEAT.HIDDEN.%feat.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>T</hidden>
			<virtual>F</virtual>
			<source>|FEAT.HIDDEN.%feat.SOURCE|</source>
		</feat>
|ENDFOR|
<!-- Hidden VFEATS -->
|FOR,%feat,0,COUNT[VFEATS.HIDDEN]-1,1,0|
		<feat>
			<name>|VFEAT.HIDDEN.%feat|</name>
			<description>|VFEAT.HIDDEN.%feat.DESC|</description>
			<type>|VFEAT.HIDDEN.%feat.TYPE|</type>
			<associated>|VFEAT.HIDDEN.%feat.ASSOCIATED|</associated>
			<count>|VFEAT.HIDDEN.%feat.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>T</hidden>
			<virtual>T</virtual>
			<source>|VFEAT.HIDDEN.%feat.SOURCE|</source>
		</feat>
|ENDFOR|
<!-- END Hidden VFEATS -->
|FOR,%feat,0,COUNT[FEATSAUTO.HIDDEN]-1,1,0|
		<feat>
			<name>|FEATAUTO.HIDDEN.%feat|</name>
			<description>|FEATAUTO.HIDDEN.%feat.DESC|</description>
			<type>|FEATAUTO.HIDDEN.%feat.TYPE|</type>
			<associated>|FEATAUTO.HIDDEN.%feat.ASSOCIATED|</associated>
			<count>|FEATAUTO.HIDDEN.%feat.ASSOCIATEDCOUNT|</count>
			<auto>T</auto>
			<hidden>T</hidden>
			<virtual>F</virtual>
			<source>|FEATAUTO.HIDDEN.%feat.SOURCE|</source>
		</feat>
|ENDFOR|
	</feats>
	<!--
	  ====================================
	  ====================================
			ARCHETYPES
	  ====================================
	  ====================================-->
	<archetypes>
|IIF(count("ABILITIES";"CATEGORY=Archetype";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=Archetype")==0)|
|ELSE|
	<!-- Archetypes -->
|ENDIF|
|FOR,%archetype,0,count("ABILITIES","CATEGORY=Archetype","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=Archetype")-1,1,0|
		<archetype>
			<name>|ABILITYALL.Archetype.VISIBLE.%archetype.TYPE=Archetype|</name>
			<description>|ABILITYALL.Archetype.VISIBLE.%archetype.TYPE=Archetype.DESC|</description>
			<type>|ABILITYALL.Archetype.VISIBLE.%archetype.TYPE=Archetype.TYPE|</type>
			<associated>|ABILITYALL.Archetype.VISIBLE.%archetype.TYPE=Archetype.ASSOCIATED|</associated>
			<count>|ABILITYALL.Archetype.VISIBLE.%archetype.TYPE=Archetype.ASSOCIATEDCOUNT|</count>
			<category>Archetype</category>
			<source>|ABILITYALL.Archetype.VISIBLE.%archetype.TYPE=Archetype.SOURCE|</source>
		</archetype>
|ENDFOR|
	</archetypes>
	<!--
	  ====================================
	  ====================================
			SPECIAL QUALITIES
	  ====================================
	  ====================================-->
	<special_qualities>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=SpecialQuality")==0)|
|ELSE|
	<!-- Standard Special Qualities -->
|ENDIF|
|FOR,%specialquality,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=SpecialQuality")-1,1,0|
		<special_quality>
|IIF(ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%specialquality.TYPE=SpecialQuality.SOURCE|</source>
		</special_quality>
|ENDFOR|
	</special_qualities>
	<!--
	  ====================================
	  ====================================
			SPECIAL ATTACKS
	  ====================================
	  ====================================-->
	<special_attacks>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=SpecialAttack")==0)|
|ELSE|
	<!-- Standard Special Attacks -->
|ENDIF|
|FOR,%specialattack,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=SpecialAttack")-1,1,0|
		<special_attack>
|IIF(ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%specialattack.TYPE=SpecialAttack.SOURCE|</source>
		</special_attack>
|ENDFOR|
	</special_attacks>
		<!--
	  ====================================
	  ====================================
			Animal Trick
	  ====================================
	  ====================================-->
	<animal_tricks>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=AnimalTrick")==0)|
|ELSE|
	<!-- Standard Animal Trick -->
|ENDIF|
|FOR,%animalTrick,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=AnimalTrick")-1,1,0|
		<animal_trick>
			<name>|ABILITYALL.Special Ability.VISIBLE.%animalTrick.TYPE=AnimalTrick|</name>
			<description>|ABILITYALL.Special Ability.VISIBLE.%animalTrick.TYPE=AnimalTrick.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%animalTrick.TYPE=AnimalTrick.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%animalTrick.TYPE=AnimalTrick.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%animalTrick.TYPE=AnimalTrick.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%animalTrick.TYPE=AnimalTrick.SOURCE|</source>
		</animal_trick>
|ENDFOR|
	</animal_tricks>

	<!--
	  ====================================
	  ====================================
			TALENTS
	  ====================================
	  ====================================-->
	<talents>
|IIF(count("ABILITIES";"CATEGORY=Talent";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=Talent")==0)|
|ELSE|
	<!-- Standard Talents -->
|ENDIF|
|FOR,%talent,0,count("ABILITIES","CATEGORY=Talent","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=Talent")-1,1,0|
		<talent>
|IIF(ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent.TYPE:Extraordinary)|
			<name>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent.TYPE:Supernatural)|
			<name>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent.TYPE:SpellLike)|
			<name>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent.TYPE:PsiLike)|
			<name>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent.DESC|</description>
			<type>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent.TYPE|</type>
			<associated>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent.ASSOCIATED|</associated>
			<count>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Talent</category>
			<source>|ABILITYALL.Talent.VISIBLE.%talent.TYPE=Talent.SOURCE|</source>
		</talent>
|ENDFOR|
	</talents>

<!--
	  ====================================
	  ====================================
			Intelligent Item
	  ====================================
	  ====================================-->
	<intelligent_items>
|IIF(count("ABILITIES";"CATEGORY=Intelligent Item";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=IntelligentItemOutput")==0)|
|ELSE|
	<!-- Intelligent OS Output -->
|ENDIF|
|FOR,%intelligentItem,0,count("ABILITIES","CATEGORY=Intelligent Item","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=IntelligentItemOutput")-1,1,0|
		<intelligent_item>
|IIF(ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput.TYPE:Extraordinary)|
			<name>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput.TYPE:Supernatural)|
			<name>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput.TYPE:SpellLike)|
			<name>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput.TYPE:PsiLike)|
			<name>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput.DESC|</description>
			<type>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput.TYPE|</type>
			<associated>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput.ASSOCIATED|</associated>
			<count>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Intelligent Item</category>
			<source>|ABILITYALL.Intelligent Item.VISIBLE.%intelligentItem.TYPE=IntelligentItemOutput.SOURCE|</source>
		</intelligent_item>
|ENDFOR|
	</intelligent_items>


	<!--
	  ====================================
	  ====================================
			SALIENT DIVINE ABILITIES
	  ====================================
	  ====================================-->
|IIF(count("ABILITIES";"CATEGORY=Salient Divine Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY")==0)|
|ELSE|
|ENDIF|
<salient_divine_abilities>
|FOR,%ability,0,count("ABILITIES","CATEGORY=Salient Divine Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY")-1,1,0|
		<salient_divine_ability>
			<name>|ABILITYALL.Salient Divine Ability.VISIBLE.%ability|</name>
			<description>|ABILITYALL.Salient Divine Ability.VISIBLE.%ability.DESC|</description>
			<type>|ABILITYALL.Salient Divine Ability.VISIBLE.%ability.TYPE|</type>
			<associated>|ABILITYALL.Salient Divine Ability.VISIBLE.%ability.ASSOCIATED|</associated>
			<count>|ABILITYALL.Salient Divine Ability.VISIBLE.%ability.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Salient Divine Ability</category>
		</salient_divine_ability>
|ENDFOR|
	</salient_divine_abilities>
	<!--
	  ====================================
	  ====================================
			Occupations
	  ====================================
	  ====================================-->
|IIF(count("ABILITIES";"CATEGORY=Occupation";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY")==0)|
|ELSE|
|ENDIF|
	<occupations>
|FOR,%occupation,0,count("ABILITIES","CATEGORY=Occupation","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY")-1,1,0|
		<occupation>
			<name>|ABILITYALL.Occupation.VISIBLE.%occupation|</name>
			<description>|ABILITYALL.Occupation.VISIBLE.%occupation.DESC|</description>
			<type>|ABILITYALL.Occupation.VISIBLE.%occupation.TYPE|</type>
			<associated>|ABILITYALL.Occupation.VISIBLE.%occupation.ASSOCIATED|</associated>
			<count>|ABILITYALL.Occupation.VISIBLE.%occupation.ASSOCIATEDCOUNT|</count>
			<source>|ABILITYALL.Occupation.VISIBLE.%occupation.SOURCE|</source>
			<category>Occupation</category>
		</occupation>
|ENDFOR|
	</occupations>
		<!--
	  ====================================
	  ====================================
			DISADVANTAGES
	  ====================================
	  ====================================-->
	<disadvantages>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=Disadvantage")==0)|
|ELSE|
	<!-- Standard Disadvantages -->
|ENDIF|
|FOR,%disadvantage,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=Disadvantage")-1,1,0|
		<disadvantage>
			<name>|ABILITYALL.Special Ability.VISIBLE.%disadvantage.TYPE=Disadvantage|</name>
			<description>|ABILITYALL.Special Ability.VISIBLE.%disadvantage.TYPE=Disadvantage.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%disadvantage.TYPE=Disadvantage.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%disadvantage.TYPE=Disadvantage.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%disadvantage.TYPE=Disadvantage.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%disadvantage.TYPE=Disadvantage.SOURCE|</source>
		</disadvantage>
|ENDFOR|
	</disadvantages>
	<!--
	  ====================================
	  ====================================
			POWERS - CLASSFEATURES
	  ====================================
	  ====================================-->
	<powers_classfeatures>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=ClassFeature")==0)|
|ELSE|
	<!-- Standard Special Qualities -->
|ENDIF|
|FOR,%classFeature,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=ClassFeature")-1,1,0|
		<power_classfeature>
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.DESC|</description>

|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Power Type:Y)|
			<power_type>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Power Type|</power_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Power Use:Y)|
			<power_use>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Power Use|</power_use>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Action Type:Y)|
			<action_type>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Action Type|</action_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Special:Y)|
			<special>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Special|</special>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Trigger:Y)|
			<trigger>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Trigger|</trigger>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Target:Y)|
			<target>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Target|</target>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Attack:Y)|
			<attack>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Attack|</attack>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Hit:Y)|
			<hit>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Hit|</hit>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Miss:Y)|
			<miss>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Miss|</miss>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Effect:Y)|
			<effect>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Effect|</effect>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.HASASPECT.Sustain:Y)|
			<sustain>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASPECT.Sustain|</sustain>
|ENDIF|
			<type>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%classFeature.TYPE=ClassFeature.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
		</power_classfeature>
|ENDFOR|
	</powers_classfeatures>
	<!--
	  ====================================
	  ====================================
			POWERS - FEATPOWERS
	  ====================================
	  ====================================-->
	<powers_featpowers>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=Feat Power")==0)|
|ELSE|
	<!-- Standard Special Qualities -->
|ENDIF|
|FOR,%featPower,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=Feat Power")-1,1,0|
		<power_featpower>
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.DESC|</description>

|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Power Type:Y)|
			<power_type>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Power Type|</power_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Power Use:Y)|
			<power_use>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Power Use|</power_use>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Action Type:Y)|
			<action_type>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Action Type|</action_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Special:Y)|
			<special>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Special|</special>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Trigger:Y)|
			<trigger>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Trigger|</trigger>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Target:Y)|
			<target>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Target|</target>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Attack:Y)|
			<attack>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Attack|</attack>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Hit:Y)|
			<hit>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Hit|</hit>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Miss:Y)|
			<miss>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Miss|</miss>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Effect:Y)|
			<effect>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Effect|</effect>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.HASASPECT.Sustain:Y)|
			<sustain>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASPECT.Sustain|</sustain>
|ENDIF|
			<type>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%featPower.TYPE=Feat Power.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
		</power_featpower>
|ENDFOR|
	</powers_featpowers>

	<!--
	  ====================================
	  ====================================
			4e Powers - At-Will
	  ====================================
	  ====================================-->
	<powers_atwills>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=AtWill")==0)|
|ELSE|
	<!-- Standard At Will Powers -->
|ENDIF|
|FOR,%atWill,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=AtWill")-1,1,0|
		<powers_atwill>
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Power Use:Y)|
			<power_use>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Power Use|</power_use>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Power Type:Y)|
			<power_type>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Power Type|</power_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Action Type:Y)|
			<action_type>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Action Type|</action_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Special:Y)|
			<special>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Special|</special>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Trigger:Y)|
			<trigger>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Trigger|</trigger>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Target:Y)|
			<target>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Target|</target>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Attack:Y)|
			<attack>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Attack|</attack>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Hit:Y)|
			<hit>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Hit|</hit>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Miss:Y)|
			<miss>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Miss|</miss>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Effect:Y)|
			<effect>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Effect|</effect>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.HASASPECT.Sustain:Y)|
			<sustain>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASPECT.Sustain|</sustain>
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%atWill.TYPE=AtWill.SOURCE|</source>
		</powers_atwill>
|ENDFOR|
	</powers_atwills>
	<!--
	  ====================================
	  ====================================
			4e Powers - Encounter
	  ====================================
	  ====================================-->

	<powers_encounters>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=Encounter")==0)|
|ELSE|
	<!-- Standard Encounter Powers -->
|ENDIF|
|FOR,%encounter,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=Encounter")-1,1,0|
		<powers_encounter>
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Power Use:Y)|
			<power_use>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Power Use|</power_use>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Power Type:Y)|
			<power_type>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Power Type|</power_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Action Type:Y)|
			<action_type>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Action Type|</action_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Trigger:Y)|
			<trigger>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Trigger|</trigger>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Special:Y)|
			<special>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Special|</special>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Target:Y)|
			<target>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Target|</target>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Attack:Y)|
			<attack>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Attack|</attack>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Hit:Y)|
			<hit>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Hit|</hit>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Miss:Y)|
			<miss>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Miss|</miss>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Effect:Y)|
			<effect>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Effect|</effect>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.HASASPECT.Sustain:Y)|
			<sustain>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASPECT.Sustain|</sustain>
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%encounter.TYPE=Encounter.SOURCE|</source>
		</powers_encounter>
|ENDFOR|
	</powers_encounters>
	<!--
	  ====================================
	  ====================================
			4e Powers - Daily
	  ====================================
	  ====================================-->
	<powers_dailies>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=Daily")==0)|
|ELSE|
	<!-- Standard Daily Powers -->
|ENDIF|
|FOR,%daily,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=Daily")-1,1,0|
		<powers_daily>
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Power Type:Y)|
			<power_type>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Power Type|</power_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Power Use:Y)|
			<power_use>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Power Use|</power_use>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Action Type:Y)|
			<action_type>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Action Type|</action_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Special:Y)|
			<special>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Special|</special>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Trigger:Y)|
			<trigger>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Trigger|</trigger>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Target:Y)|
			<target>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Target|</target>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Attack:Y)|
			<attack>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Attack|</attack>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Hit:Y)|
			<hit>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Hit|</hit>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Miss:Y)|
			<miss>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Miss|</miss>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Effect:Y)|
			<effect>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Effect|</effect>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.HASASPECT.Sustain:Y)|
			<sustain>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASPECT.Sustain|</sustain>
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%daily.TYPE=Daily.SOURCE|</source>
		</powers_daily>
|ENDFOR|
	</powers_dailies>
	<!--
	  ====================================
	  ====================================
			4e Powers - Utility
	  ====================================
	  ====================================-->

	<powers_utilities>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=Utility")==0)|
|ELSE|
	<!-- Standard Utility Powers -->
|ENDIF|
|FOR,%utility,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=Utility")-1,1,0|
		<powers_utility>
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Power Type:Y)|
			<power_type>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Power Type|</power_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Power Use:Y)|
			<power_use>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Power Use|</power_use>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Action Type:Y)|
			<action_type>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Action Type|</action_type>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Special:Y)|
			<special>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Special|</special>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Trigger:Y)|
			<trigger>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Trigger|</trigger>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Target:Y)|
			<target>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Target|</target>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Attack:Y)|
			<attack>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Attack|</attack>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Hit:Y)|
			<hit>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Hit|</hit>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Miss:Y)|
			<miss>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Miss|</miss>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Effect:Y)|
			<effect>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Effect|</effect>
|ENDIF|
|IIF(ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.HASASPECT.Sustain:Y)|
			<sustain>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASPECT.Sustain|</sustain>
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%utility.TYPE=Utility.SOURCE|</source>
		</powers_utility>
|ENDFOR|
	</powers_utilities>

	<!--
	  ====================================
	  ====================================
			Demon Cant
	  ====================================
	  ====================================-->
	<demon_cants>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=DemonCant")==0)|
|ELSE|
	<!-- Standard Demon Cant -->
|ENDIF|
|FOR,%demoncant,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=DemonCant")-1,1,0|
		<demon_cant>
|IIF(ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%demoncant.TYPE=DemonCant.SOURCE|</source>
		</demon_cant>
|ENDFOR|
	</demon_cants>
	<!--
	  ====================================
	  ====================================
			Mage Gnosis
	  ====================================
	  ====================================-->
	<mage_gnosises>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=MageGnosis")==0)|
|ELSE|
	<!-- Standard Mage Gnosis -->
|ENDIF|
|FOR,%magegnosis,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=MageGnosis")-1,1,0|
		<mage_gnosis>
|IIF(ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%magegnosis.TYPE=MageGnosis.SOURCE|</source>
		</mage_gnosis>
|ENDFOR|
	</mage_gnosises>
	<!--
	  ====================================
	  ====================================
			Vampire Disciplines
	  ====================================
	  ====================================-->
	<vampire_disciplines>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=VampireDiscipline")==0)|
|ELSE|
	<!-- Standard Vampire Disciplines -->
|ENDIF|
|FOR,%vampirediscipline,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=VampireDiscipline")-1,1,0|
		<vampire_discipline>
|IIF(ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%vampirediscipline.TYPE=VampireDiscipline.SOURCE|</source>
		</vampire_discipline>
|ENDFOR|
	</vampire_disciplines>
	<!--
	  ====================================
	  ====================================
			Werewolf Rites
	  ====================================
	  ====================================-->
	<werewolf_rites>
|IIF(count("ABILITIES";"CATEGORY=Special Ability";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=WerewolfRite")==0)|
|ELSE|
	<!-- Standard Rites -->
|ENDIF|
|FOR,%werewolfRite,0,count("ABILITIES","CATEGORY=Special Ability","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=WerewolfRite")-1,1,0|
		<werewolf_rite>
|IIF(ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite.TYPE:Extraordinary)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite| (Ex)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite.TYPE:Supernatural)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite| (Su)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite.TYPE:SpellLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite| (Sp)</name>
|ELSE|
|IIF(ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite.TYPE:PsiLike)|
			<name>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite| (Ps)</name>
|ELSE|
			<name>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite|</name>
|ENDIF|
|ENDIF|
|ENDIF|
|ENDIF|
			<description>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite.DESC|</description>
			<type>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite.TYPE|</type>
			<associated>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite.ASSOCIATED|</associated>
			<count>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Special Ability</category>
			<source>|ABILITYALL.Special Ability.VISIBLE.%werewolfRite.TYPE=WerewolfRite.SOURCE|</source>
		</werewolf_rite>
|ENDFOR|
	</werewolf_rites>

	<!--
	  ====================================
	  ====================================
			Force Powers
	  ====================================
	  ====================================-->
	<force_powers>
|IIF(count("ABILITIES";"CATEGORY=Force Powers";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=ForcePower")==0)|
|ELSE|
	<!-- Force Powers -->
|ENDIF|
|FOR,%forcepower,0,count("ABILITIES","CATEGORY=Force Powers","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=ForcePower")-1,1,0|
		<force_power>
			<name>|ABILITYALL.Force Powers.VISIBLE.%forcepower.TYPE=ForcePower|</name>
			<description>|ABILITYALL.Force Powers.VISIBLE.%forcepower.TYPE=ForcePower.DESC|</description>
			<type>|ABILITYALL.Force Powers.VISIBLE.%forcepower.TYPE=ForcePower.TYPE|</type>
			<associated>|ABILITYALL.Force Powers.VISIBLE.%forcepower.TYPE=ForcePower.ASSOCIATED|</associated>
			<count>|ABILITYALL.Force Powers.VISIBLE.%forcepower.TYPE=ForcePower.ASSOCIATEDCOUNT|</count>
			<source>|ABILITYALL.Force Powers.VISIBLE.%forcepower.TYPE=ForcePower.SOURCE|</source>
			<category>Force Powers</category>
		</force_power>
|ENDFOR|
	</force_powers>
	<!--
	  ====================================
	  ====================================
			Force Techniques
	  ====================================
	  ====================================-->
	<force_techniques>
|IIF(count("ABILITIES";"CATEGORY=Force Techniques";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=ForceTechniques")==0)|
|ELSE|
	<!-- Standard Force Techniques -->
|ENDIF|
|FOR,%forcetechnique,0,count("ABILITIES","CATEGORY=Force Techniques","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=ForceTechniques")-1,1,0|
		<force_technique>
			<name>|ABILITYALL.Force Techniques.VISIBLE.%forcetechnique.TYPE=ForceTechniques|</name>
			<description>|ABILITYALL.Force Techniques.VISIBLE.%forcetechnique.TYPE=ForceTechniques.DESC|</description>
			<type>|ABILITYALL.Force Techniques.VISIBLE.%forcetechnique.TYPE=ForceTechniques.TYPE|</type>
			<associated>|ABILITYALL.Force Techniques.VISIBLE.%forcetechnique.TYPE=ForceTechniques.ASSOCIATED|</associated>
			<count>|ABILITYALL.Force Techniques.VISIBLE.%forcetechnique.TYPE=ForceTechniques.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Force Techniques</category>
			<source>|ABILITYALL.Force Techniques.VISIBLE.%forcetechnique.TYPE=ForceTechniques.SOURCE|</source>
		</force_technique>
|ENDFOR|
	</force_techniques>
	<!--
	  ====================================
	  ====================================
			Force Secrets
	  ====================================
	  ====================================-->
	<force_secrets>
|IIF(count("ABILITIES";"CATEGORY=Force Secrets";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY";"TYPE=ForceSecrets")==0)|
|ELSE|
	<!-- Standard Force Secrets -->
|ENDIF|
|FOR,%forceSecret,0,count("ABILITIES","CATEGORY=Force Secrets","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY","TYPE=ForceSecrets")-1,1,0|
		<force_secret>
			<name>|ABILITYALL.Force Secrets.VISIBLE.%forceSecret.TYPE=ForceSecrets|</name>
			<description>|ABILITYALL.Force Secrets.VISIBLE.%forceSecret.TYPE=ForceSecrets.DESC|</description>
			<type>|ABILITYALL.Force Secrets.VISIBLE.%forceSecret.TYPE=ForceSecrets.TYPE|</type>
			<associated>|ABILITYALL.Force Secrets.VISIBLE.%forceSecret.TYPE=ForceSecrets.ASSOCIATED|</associated>
			<count>|ABILITYALL.Force Secrets.VISIBLE.%forceSecret.TYPE=ForceSecrets.ASSOCIATEDCOUNT|</count>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Force Secrets</category>
			<source>|ABILITYALL.Force Secrets.VISIBLE.%forceSecret.TYPE=ForceSecrets.SOURCE|</source>
		</force_secret>
|ENDFOR|
	</force_secrets>

<!--
	====================================
	====================================
			MUTATIONS
	====================================
	====================================	-->
|IIF(count("ABILITIES";"CATEGORY=Mutation";"VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY")==0)|
|ELSE|
|ENDIF|
	<mutations>
|FOR,%mutation,0,count("ABILITIES","CATEGORY=Mutation","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY")-1,1,0|
		<mutation>
			<name>|ABILITYALL.Mutation.VISIBLE.%mutation|</name>
			<description>|ABILITYALL.Mutation.VISIBLE.%mutation.DESC|</description>
			<type>|ABILITYALL.Mutation.VISIBLE.%mutation.TYPE|</type>
			<associated>|ABILITYALL.Mutation.VISIBLE.%mutation.ASSOCIATED|</associated>
			<count>|ABILITYALL.Mutation.VISIBLE.%mutation.ASSOCIATEDCOUNT|</count>
			<source>|ABILITYALL.Mutation.VISIBLE.%mutation.SOURCE|</source>
			<auto>F</auto>
			<hidden>F</hidden>
			<virtual>F</virtual>
			<category>Mutation</category>
		</mutation>
|ENDFOR|
	</mutations>




	<!--
	  ====================================
	  ====================================
			TRAITS
	  ====================================
	  ====================================-->
	<traits>
|FOR,%trait,0,count("ABILITIES","CATEGORY=Special Ability","TYPE=Trait","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY")-1,1,0|
		<trait>
			<name>|ABILITYALL.Special Ability.VISIBLE.%trait.TYPE=Trait|</name>
			<description>|ABILITYALL.Special Ability.VISIBLE.%trait.TYPE=Trait.DESC|</description>
			<source>|ABILITYALL.Special Ability.VISIBLE.%trait.TYPE=Trait.SOURCE|</source>
		</trait>
|ENDFOR|
	</traits>

	<!--
	  ====================================
	  ====================================
			Afflictions
	  ====================================
	  ====================================-->
	<afflictions>
|FOR,%affliction,0,count("ABILITIES","CATEGORY=Afflictions","TYPE=Affliction","VISIBILITY=DEFAULT[or]VISIBILITY=OUTPUT_ONLY")-1,1,0|
		<affliction>
			<name>|ABILITYALL.Afflictions.VISIBLE.%affliction.TYPE=Affliction|</name>
			<description>|ABILITYALL.Afflictions.VISIBLE.%affliction.TYPE=Affliction.DESC|</description>
			<source>|ABILITYALL.Afflictions.VISIBLE.%affliction.TYPE=Affliction.SOURCE|</source>
		</affliction>
|ENDFOR|
	</afflictions>


	<!--
	  ====================================
	  ====================================
			MISCELLANEOUS
	  ====================================
	  ====================================-->


|%DOMAIN.1|
	<domains>
|FOR,%domain,1,COUNT[DOMAINS],1,0|
		<domain>
			<name>|DOMAIN.%domain|</name>
			<power>|DOMAIN.%domain.POWER|</power>
		</domain>
|ENDFOR|	<!-- Domains -->
	</domains>
|%|	<!-- Domains -->
	<weapon_proficiencies>|WEAPONPROFS|</weapon_proficiencies>
	<languages>|LANGUAGES|</languages>
|%TEMPLATE|
	<templates>
		<list>|TEMPLATELIST|</list>
|FOR,%template,0,COUNT[TEMPLATES]-1,1,1|
		<template>
			<name>|TEMPLATE.%template.NAME|</name>
			<strmod>|TEMPLATE.%template.STRMOD|</strmod>
			<dexmod>|TEMPLATE.%template.DEXMOD|</dexmod>
			<conmod>|TEMPLATE.%template.CONMOD|</conmod>
			<intmod>|TEMPLATE.%template.INTMOD|</intmod>
			<wismod>|TEMPLATE.%template.WISMOD|</wismod>
			<chamod>|TEMPLATE.%template.CHAMOD|</chamod>
			<cr>|TEMPLATE.%template.CR|</cr>
			<dr>|TEMPLATE.%template.DR|</dr>
			<feat>|TEMPLATE.%template.FEAT|</feat>
			<sa>|TEMPLATE.%template.SA|</sa>
			<sr>|TEMPLATE.%template.SR|</sr>
			<bonuslist>|TEMPLATE.%template.BONUSLIST|</bonuslist>
		</template>
|ENDFOR|
	</templates>
|%|

|%PROHIBITEDLIST|
	<prohibited_schools>|PROHIBITEDLIST|</prohibited_schools>
|%|

	<misc>
|%MISC.FUNDS|
		<funds>
			<fund>|MISC.FUNDS|</fund>
		</funds>
|%|
|%MISC.COMPANIONS|
		<companions>
			<companion>|MISC.COMPANIONS|</companion>
		</companions>
|%|
|%MISC.MAGIC|
		<magics>
			<magic>|MISC.MAGIC|</magic>
		</magics>
|%|
	</misc>
	<!--
	  ====================================
	  ====================================
			COMPANIONS
	  ====================================
	  ====================================-->
	<companions>
|%FOLLOWERTYPE.FAMILIAR|
|FOR,%companion,0,COUNT[FOLLOWERTYPE.FAMILIAR]-1,1,0|
		<familiar>
			<!-- Note that only one familiar is allowed, so no support for multiple familiars
			New: 4/8/2010 - Added Support for multiple Familiars-->
			<name>|FOLLOWERTYPE.FAMILIAR.0.NAME|</name>
			<race>|FOLLOWERTYPE.FAMILIAR.0.RACE|</race>
			<hp>|FOLLOWERTYPE.FAMILIAR.0.HP|</hp>
			<ac>|FOLLOWERTYPE.FAMILIAR.0.BONUS.COMBAT.AC.TOTAL|</ac>
			<fortitude>|FOLLOWERTYPE.FAMILIAR.0.CHECK.FORTITUDE.TOTAL|</fortitude>
			<reflex>|FOLLOWERTYPE.FAMILIAR.0.CHECK.REFLEX.TOTAL|</reflex>
			<willpower>|FOLLOWERTYPE.FAMILIAR.0.CHECK.2.TOTAL|</willpower>
			<initiative_mod>|FOLLOWERTYPE.FAMILIAR.0.INITIATIVEMOD|</initiative_mod>
			<special_properties>|FOLLOWERTYPE.FAMILIAR.0.SPECIALLIST|</special_properties>
|ENDFOR|

			<attacks>
|FOR,%weap,0,COUNT[FOLLOWERTYPE.FAMILIAR.0.EQTYPE.WEAPON]-1,1,0|
				<attack>
					<common>
						<name>
							<short>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.NAME|</short>
							<long>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.LONGNAME|</long>
						</name>
						<category>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.CATEGORY|</category>
						<critical>
							<range>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.CRIT|</range>
							<multiplier>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.MULT|</multiplier>
						</critical>
						<to_hit>
							<hit>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.HIT|</hit>
							<magic_hit>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.MAGICHIT|</magic_hit>
							<total_hit>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.TOTALHIT|</total_hit>
						</to_hit>
						<feat>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.FEAT|</feat>
						<hand>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.HAND|</hand>
						<num_attacks>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.NUMATTACKS|</num_attacks>
						<reach>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.REACH|</reach>
						<reachunit>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.REACHUNIT|</reachunit>
						<size>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.SIZE|</size>
						<special_properties>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.SPROP|</special_properties>
						<template>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.TEMPLATE|</template>
						<type>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.TYPE|</type>
						<weight>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.WT|</weight>
						<sequence>|%weap|</sequence>
					</common>
					<simple>
						<to_hit>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.TOTALHIT|</to_hit>
						<damage>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.DAMAGE|</damage>
						<range>|FOLLOWERTYPE.FAMILIAR.0.WEAPON.%weap.RANGE|</range>
					</simple>
				</attack>
|ENDFOR|
			</attacks>
		</familiar>
|%|
|%FOLLOWERTYPE.SPECIAL MOUNT|
|FOR,%companion,0,COUNT[FOLLOWERTYPE.SPECIAL MOUNT]-1,1,0|
		<mount>
			<!-- Note that only one mount is allowed, so no support for multiple mounts
			Added Support as Eclipse allows for more than one Mount; also handy if you have a shapeshifting
			Mount - AM-->
			<name>|FOLLOWERTYPE.SPECIAL MOUNT.0.NAME|</name>
			<race>|FOLLOWERTYPE.SPECIAL MOUNT.0.RACE|</race>
			<hp>|FOLLOWERTYPE.SPECIAL MOUNT.0.HP|</hp>
			<ac>|FOLLOWERTYPE.SPECIAL MOUNT.0.BONUS.COMBAT.AC.TOTAL|</ac>
			<fortitude>|FOLLOWERTYPE.SPECIAL MOUNT.0.CHECK.FORTITUDE.TOTAL|</fortitude>
			<reflex>|FOLLOWERTYPE.SPECIAL MOUNT.0.CHECK.REFLEX.TOTAL|</reflex>
			<willpower>|FOLLOWERTYPE.SPECIAL MOUNT.0.CHECK.2.TOTAL|</willpower>
			<initiative_mod>|FOLLOWERTYPE.SPECIAL MOUNT.0.INITIATIVEMOD|</initiative_mod>
			<special_properties>|FOLLOWERTYPE.SPECIAL MOUNT.0.SPECIALLIST|</special_properties>
|ENDFOR|

			<attacks>
|FOR,%weap,0,COUNT[FOLLOWERTYPE.SPECIAL MOUNT.0.EQTYPE.WEAPON]-1,1,0|
				<attack>
					<common>
						<name>
							<short>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.NAME|</short>
							<long>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.LONGNAME|</long>
						</name>
						<category>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.CATEGORY|</category>
						<critical>
							<range>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.CRIT|</range>
							<multiplier>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.MULT|</multiplier>
						</critical>
						<to_hit>
							<hit>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.HIT|</hit>
							<magic_hit>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.MAGICHIT|</magic_hit>
							<total_hit>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.TOTALHIT|</total_hit>
						</to_hit>
						<feat>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.FEAT|</feat>
						<hand>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.HAND|</hand>
						<num_attacks>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.NUMATTACKS|</num_attacks>
						<reach>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.REACH|</reach>
						<reachunit>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.REACH|</reachunit>
						<size>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.SIZE|</size>
						<special_properties>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.SPROP|</special_properties>
						<template>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.TEMPLATE|</template>
						<type>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.TYPE|</type>
						<weight>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.WT|</weight>
						<sequence>|%weap|</sequence>
					</common>
					<simple>
						<to_hit>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.TOTALHIT|</to_hit>
						<damage>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.DAMAGE|</damage>
						<range>|FOLLOWERTYPE.SPECIAL MOUNT.0.WEAPON.%weap.RANGE|</range>
					</simple>
				</attack>
|ENDFOR|
			</attacks>
		</mount>
|%|
|%FOLLOWERTYPE.ANIMAL COMPANION|
|FOR,%companion,0,COUNT[FOLLOWERTYPE.ANIMAL COMPANION]-1,1,0|
		<companion>
			<name>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.NAME|</name>
			<race>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.RACE|</race>
			<hp>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.HP|</hp>
			<ac>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.BONUS.COMBAT.AC.TOTAL|</ac>
			<fortitude>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.CHECK.FORTITUDE.TOTAL|</fortitude>
			<reflex>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.CHECK.REFLEX.TOTAL|</reflex>
			<willpower>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.CHECK.2.TOTAL|</willpower>
			<initiative_mod>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.INITIATIVEMOD|</initiative_mod>
			<special_properties>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.SPECIALLIST|</special_properties>
|FOR,%trick,0,COUNT[FOLLOWERTYPE.FOLLOWER.%companion.TYPE=AnimalTrick]-1,1,0|
			<trick>|FOLLOWERTYPE.ANIMAL COMPANION.%companion.ABILITYALL.Special Ability.VISIBLE.%animalTrick.TYPE=AnimalTrick|</trick>
|ENDFOR|

			<attacks>
|FOR,%weap,0,COUNT[FOLLOWERTYPE.ANIMAL COMPANION.%companion.EQTYPE.WEAPON]-1,1,0|
				<attack>
					<common>
						<name>
							<short>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.NAME|</short>
							<long>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.LONGNAME|</long>
						</name>
						<category>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.CATEGORY|</category>
						<critical>
							<range>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.CRIT|</range>
							<multiplier>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.MULT|</multiplier>
						</critical>
						<to_hit>
							<hit>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.HIT|</hit>
							<magic_hit>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.MAGICHIT|</magic_hit>
							<total_hit>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.TOTALHIT|</total_hit>
						</to_hit>
						<feat>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.FEAT|</feat>
						<hand>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.HAND|</hand>
						<num_attacks>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.NUMATTACKS|</num_attacks>
						<reach>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.REACH|</reach>
						<reachunit>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.REACHUNIT|</reachunit>
						<size>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.SIZE|</size>
						<special_properties>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.SPROP|</special_properties>
						<template>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.TEMPLATE|</template>
						<type>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.TYPE|</type>
						<weight>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.WT|</weight>
						<sequence>|%weap|</sequence>
					</common>
					<simple>
						<to_hit>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.TOTALHIT|</to_hit>
						<damage>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.DAMAGE|</damage>
						<range>|FOLLOWERTYPE.ANIMAL COMPANION.0.WEAPON.%weap.RANGE|</range>
					</simple>
				</attack>
|ENDFOR|
			</attacks>
		</companion>
|ENDFOR|	<!-- Followertype Animal -->
|%|
|%FOLLOWERTYPE.FOLLOWER|
|FOR,%companion,0,COUNT[FOLLOWERTYPE.FOLLOWER],1,0|
		<follower>
			<name>|FOLLOWERTYPE.FOLLOWER.%companion.NAME|</name>
			<race>|FOLLOWERTYPE.FOLLOWER.%companion.RACE|</race>
			<hp>|FOLLOWERTYPE.FOLLOWER.%companion.HP|</hp>
			<ac>|FOLLOWERTYPE.FOLLOWER.%companion.BONUS.COMBAT.AC.TOTAL|</ac>
			<fortitude>|FOLLOWERTYPE.FOLLOWER.%companion.CHECK.FORTITUDE.TOTAL|</fortitude>
			<reflex>|FOLLOWERTYPE.FOLLOWER.%companion.CHECK.REFLEX.TOTAL|</reflex>
			<willpower>|FOLLOWERTYPE.FOLLOWER.%companion.CHECK.2.TOTAL|</willpower>
			<initiative_mod>|FOLLOWERTYPE.FOLLOWER.%companion.INITIATIVEMOD|</initiative_mod>
			<special_properties>|FOLLOWERTYPE.FOLLOWER.%companion.SPECIALLIST|</special_properties>
			<attacks>
|FOR,%weap,0,COUNT[FOLLOWERTYPE.FOLLOWER.%companion.EQTYPE.WEAPON]-1,1,0|
				<attack>
					<common>
						<name>
							<short>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.NAME|</short>
							<long>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.LONGNAME|</long>
						</name>
						<attacks>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.ATTACKS|</attacks>
						<damage>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.BASICDAMAGE|</damage>
						<bonusdamage>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.BONUSDAMAGE|</bonusdamage>
						<category>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.CATEGORY|</category>
						<critical>
							<range>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.CRIT|</range>
							<multiplier>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.MULT|</multiplier>
						</critical>
						<damage>
							<primary_hand>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.DAMAGE|</primary_hand>
							<magic_damage>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.MAGICDAMAGE|</magic_damage>
						</damage>
						<to_hit>
							<hit>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.HIT|</hit>
							<magic_hit>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.MAGICHIT|</magic_hit>
							<total_hit>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.TOTALHIT|</total_hit>
						</to_hit>
						<feat>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.FEAT|</feat>
						<hand>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.HAND|</hand>
						<num_attacks>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.NUMATTACKS|</num_attacks>
						<base_range>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.RANGENOUNITS|</base_range>
						<reach>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.REACH|</reach>
						<reachunit>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.REACHUNIT|</reachunit>
						<size>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.SIZE|</size>
						<special_properties>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.SPROP|</special_properties>
						<template>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.TEMPLATE|</template>
						<type>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.TYPE|</type>
						<weight>|FOLLOWERTYPE.FOLLOWER.%companion.WEAPON.%weap.WT|</weight>
						<sequence>|%weap|</sequence>
					</common>
				</attack>
|ENDFOR|
			</attacks>
		</follower>
|ENDFOR|	<!-- Followertype Follower -->
|%|
	</companions>
	<!--
	  ====================================
	  ====================================
			SPELLS
	  ====================================
	  ====================================-->
	<spells>
		<!-- ### BEGIN Innate spells ### -->
|FOR,%spellrace,COUNT[SPELLRACE],COUNT[SPELLRACE],1,0|
|IIF(%spellrace:0)|
	<spells_innate number="none"/>
|ELSE|
	<spells_innate>
|FOR,%spellbook,1,1,1,1|
|FOR,%class,0,0,1,1|
|FOR,%level,0,0,1,1|
|%SPELLLISTBOOK.%class.%level.%spellbook|
		<racial_innate>
|FOR,%spell,0,COUNT[SPELLSINBOOK.%class.%spellbook.%level]-1,1,0|
			<spell>
					<name>|SPELLMEM.%class.%spellbook.%level.%spell.NAME|</name>
					<outputname>|SPELLMEM.%class.%spellbook.%level.%spell.OUTPUTNAME|</outputname>
					<times_memorized>|SPELLMEM.%class.%spellbook.%level.%spell.TIMES|</times_memorized>
					<range>|SPELLMEM.%class.%spellbook.%level.%spell.RANGE|</range>
					<components>|SPELLMEM.%class.%spellbook.%level.%spell.COMPONENTS|</components>
					<castingtime>|SPELLMEM.%class.%spellbook.%level.%spell.CASTINGTIME|</castingtime>
					<casterlevel>|SPELLMEM.%class.%spellbook.%level.%spell.CASTERLEVEL|</casterlevel>
					<dc>|SPELLMEM.%class.%spellbook.%level.%spell.DC|</dc>
					<duration>|SPELLMEM.%class.%spellbook.%level.%spell.DURATION|</duration>
					<effect>|SPELLMEM.%class.%spellbook.%level.%spell.EFFECT|</effect>
					<target>|SPELLMEM.%class.%spellbook.%level.%spell.TARGET|</target>
					<saveinfo>|SPELLMEM.%class.%spellbook.%level.%spell.SAVEINFO|</saveinfo>
					<school>
						<school>|SPELLMEM.%class.%spellbook.%level.%spell.SCHOOL|</school>
						<subschool>|SPELLMEM.%class.%spellbook.%level.%spell.SUBSCHOOL|</subschool>
						<descriptor>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTOR|</descriptor>
						<fullschool>|SPELLMEM.%class.%spellbook.%level.%spell.FULLSCHOOL|</fullschool>
					</school>
					<source>
						<sourcelevel>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCELEVEL|</sourcelevel>
						<source>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCE|</source>
						<sourcepage>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCEPAGE|</sourcepage>
						<sourceshort>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCESHORT|</sourceshort>
					</source>
					<spell_resistance>|SPELLMEM.%class.%spellbook.%level.%spell.SR|</spell_resistance>
					<description>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTION|</description>
					<bonusspell>|SPELLMEM.%class.%spellbook.%level.%spell.BONUSSPELL|</bonusspell>
				</spell>
|ENDFOR|
		</racial_innate>
|%|
|ENDFOR|
|ENDFOR|
|ENDFOR|

		<class_innate>
|FOR,%spellbook,2,COUNT[SPELLBOOKS]-1,1,0|
|FOR,%class,0,0,1,1|
|FOR,%level,0,0,1,1|
|%SPELLLISTBOOK.%class.%level.%spellbook|
			<spellbook number="%spellbook" name="|SPELLBOOKNAME.%spellbook|">
|FOR,%spell,0,COUNT[SPELLSINBOOK.%class.%spellbook.%level]-1,1,0|
				<spell>
						<name>|SPELLMEM.%class.%spellbook.%level.%spell.NAME|</name>
						<outputname>|SPELLMEM.%class.%spellbook.%level.%spell.OUTPUTNAME|</outputname>
						<times_memorized>|SPELLMEM.%class.%spellbook.%level.%spell.TIMES|</times_memorized>
						<range>|SPELLMEM.%class.%spellbook.%level.%spell.RANGE|</range>
						<components>|SPELLMEM.%class.%spellbook.%level.%spell.COMPONENTS|</components>
						<castingtime>|SPELLMEM.%class.%spellbook.%level.%spell.CASTINGTIME|</castingtime>
						<casterlevel>|SPELLMEM.%class.%spellbook.%level.%spell.CASTERLEVEL|</casterlevel>
						<dc>|SPELLMEM.%class.%spellbook.%level.%spell.DC|</dc>
						<duration>|SPELLMEM.%class.%spellbook.%level.%spell.DURATION|</duration>
						<effect>|SPELLMEM.%class.%spellbook.%level.%spell.EFFECT|</effect>
						<target>|SPELLMEM.%class.%spellbook.%level.%spell.TARGET|</target>
						<saveinfo>|SPELLMEM.%class.%spellbook.%level.%spell.SAVEINFO|</saveinfo>
						<school>
							<school>|SPELLMEM.%class.%spellbook.%level.%spell.SCHOOL|</school>
							<subschool>|SPELLMEM.%class.%spellbook.%level.%spell.SUBSCHOOL|</subschool>
							<descriptor>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTOR|</descriptor>
							<fullschool>|SPELLMEM.%class.%spellbook.%level.%spell.FULLSCHOOL|</fullschool>
						</school>
						<source>
							<sourcelevel>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCELEVEL|</sourcelevel>
							<source>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCE|</source>
							<sourcepage>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCEPAGE|</sourcepage>
							<sourceshort>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCESHORT|</sourceshort>
						</source>
						<spell_resistance>|SPELLMEM.%class.%spellbook.%level.%spell.SR|</spell_resistance>
						<description>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTION|</description>
						<bonusspell>|SPELLMEM.%class.%spellbook.%level.%spell.BONUSSPELL|</bonusspell>
					</spell>
|ENDFOR|
			</spellbook>
|%|
|ENDFOR|
|ENDFOR|
|ENDFOR|
		</class_innate>
		</spells_innate>
|ENDIF|
<!-- ### END Innate spells ### -->
		<!-- ### BEGIN Known spells ### -->
		<known_spells>
|FOR,%spellbook,0,0,1,0|
|FOR,%class,COUNT[SPELLRACE],COUNT[SPELLRACE]+COUNT[CLASSES]-1,1,1|
|%SPELLLISTCLASS.%class|
		<class number="%class" spelllistclass="|SPELLLISTCLASS.%class|" spellcasterlevel="|SPELLLISTCLASS.%class.LEVEL|" spellcastertype="|SPELLLISTTYPE.%class|" memorize="|SPELLLISTMEMORIZE.%class|">
|FOR,%level,0,MAXSPELLLEVEL.%class,1,1|
|FOR,%spellcount,COUNT[SPELLSINBOOK.%class.%spellbook.%level],COUNT[SPELLSINBOOK.%class.%spellbook.%level],1,0|
			<level number="%level" known="|SPELLLISTKNOWN.%class.%level|" cast="|SPELLLISTCAST.%class.%level|">
|IIF(%spellcount:0)|
|ELSE|
|FOR,%spell,0,COUNT[SPELLSINBOOK.%class.%spellbook.%level]-1,1,0|
				<spell>
						<name>|SPELLMEM.%class.%spellbook.%level.%spell.NAME|</name>
						<outputname>|SPELLMEM.%class.%spellbook.%level.%spell.OUTPUTNAME|</outputname>
						<times_memorized>|SPELLMEM.%class.%spellbook.%level.%spell.TIMES|</times_memorized>
						<range>|SPELLMEM.%class.%spellbook.%level.%spell.RANGE|</range>
						<components>|SPELLMEM.%class.%spellbook.%level.%spell.COMPONENTS|</components>
						<castingtime>|SPELLMEM.%class.%spellbook.%level.%spell.CASTINGTIME|</castingtime>
						<casterlevel>|SPELLMEM.%class.%spellbook.%level.%spell.CASTERLEVEL|</casterlevel>
						<dc>|SPELLMEM.%class.%spellbook.%level.%spell.DC|</dc>
						<duration>|SPELLMEM.%class.%spellbook.%level.%spell.DURATION|</duration>
						<effect>|SPELLMEM.%class.%spellbook.%level.%spell.EFFECT|</effect>
						<target>|SPELLMEM.%class.%spellbook.%level.%spell.TARGET|</target>
						<saveinfo>|SPELLMEM.%class.%spellbook.%level.%spell.SAVEINFO|</saveinfo>
						<school>
							<school>|SPELLMEM.%class.%spellbook.%level.%spell.SCHOOL|</school>
							<subschool>|SPELLMEM.%class.%spellbook.%level.%spell.SUBSCHOOL|</subschool>
							<descriptor>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTOR|</descriptor>
							<fullschool>|SPELLMEM.%class.%spellbook.%level.%spell.FULLSCHOOL|</fullschool>
						</school>
						<source>
							<sourcelevel>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCELEVEL|</sourcelevel>
							<source>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCE|</source>
							<sourcepage>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCEPAGE|</sourcepage>
							<sourceshort>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCESHORT|</sourceshort>
						</source>
						<spell_resistance>|SPELLMEM.%class.%spellbook.%level.%spell.SR|</spell_resistance>
						<description>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTION|</description>
						<bonusspell>|SPELLMEM.%class.%spellbook.%level.%spell.BONUSSPELL|</bonusspell>
				</spell>
|ENDFOR|
|ENDIF|
			</level>
|ENDFOR|
|ENDFOR|
		</class>
|%|
|ENDFOR|
|ENDFOR|
	</known_spells>
		<!-- ### END Known spells ### -->
		<!-- ### BEGIN memorized spells ### -->
|FOR,%memorised,COUNT[SPELLRACE]+COUNT[SPELLBOOKS]-2,COUNT[SPELLRACE]+COUNT[SPELLBOOKS]-2,1,0|
|IIF(%memorised:0)|
	<memorized_spells/>
|ELSE|
	<memorized_spells>
			<!-- ### BEGIN innate memorized spell section -->
|FOR,%spellrace,COUNT[SPELLRACE],COUNT[SPELLRACE],1,0|
|IIF(%spellrace:0)|
|ELSE|

<!-- ### BEGIN innate memorized spells ### -->
|FOR,%spellbook,1,1,1,1|
|FOR,%class,0,0,1,1|
|FOR,%level,0,0,1,1|
|%SPELLLISTBOOK.%class.%level.%spellbook|
		<racial_innate_memorized>
|FOR,%spell,0,COUNT[SPELLSINBOOK.%class.%spellbook.%level]-1,1,0|
			<spell>
					<name>|SPELLMEM.%class.%spellbook.%level.%spell.NAME|</name>
					<outputname>|SPELLMEM.%class.%spellbook.%level.%spell.OUTPUTNAME|</outputname>
					<times_memorized>|SPELLMEM.%class.%spellbook.%level.%spell.TIMES|</times_memorized>
					<range>|SPELLMEM.%class.%spellbook.%level.%spell.RANGE|</range>
					<components>|SPELLMEM.%class.%spellbook.%level.%spell.COMPONENTS|</components>
					<castingtime>|SPELLMEM.%class.%spellbook.%level.%spell.CASTINGTIME|</castingtime>
					<casterlevel>|SPELLMEM.%class.%spellbook.%level.%spell.CASTERLEVEL|</casterlevel>
					<dc>|SPELLMEM.%class.%spellbook.%level.%spell.DC|</dc>
					<duration>|SPELLMEM.%class.%spellbook.%level.%spell.DURATION|</duration>
					<effect>|SPELLMEM.%class.%spellbook.%level.%spell.EFFECT|</effect>
					<target>|SPELLMEM.%class.%spellbook.%level.%spell.TARGET|</target>
					<saveinfo>|SPELLMEM.%class.%spellbook.%level.%spell.SAVEINFO|</saveinfo>
					<school>
						<school>|SPELLMEM.%class.%spellbook.%level.%spell.SCHOOL|</school>
						<subschool>|SPELLMEM.%class.%spellbook.%level.%spell.SUBSCHOOL|</subschool>
						<descriptor>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTOR|</descriptor>
						<fullschool>|SPELLMEM.%class.%spellbook.%level.%spell.FULLSCHOOL|</fullschool>
					</school>
					<source>
						<sourcelevel>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCELEVEL|</sourcelevel>
						<source>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCE|</source>
						<sourcepage>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCEPAGE|</sourcepage>
						<sourceshort>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCESHORT|</sourceshort>
					</source>
					<spell_resistance>|SPELLMEM.%class.%spellbook.%level.%spell.SR|</spell_resistance>
					<description>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTION|</description>
					<bonusspell>|SPELLMEM.%class.%spellbook.%level.%spell.BONUSSPELL|</bonusspell>
				</spell>
|ENDFOR|
		</racial_innate_memorized>
|%|
|ENDFOR|
|ENDFOR|
|ENDFOR|
<!-- ### END innate memorized spells ### -->
			<!-- ### BEGIN class innate memorized spells ### -->
			<class_innate_memorized>
|FOR,%spellbook,2,COUNT[SPELLBOOKS]-1,1,0|
|FOR,%class,0,0,1,1|
|FOR,%level,0,0,1,1|
|%SPELLLISTBOOK.%class.%level.%spellbook|
			<spellbook number="%spellbook" name="|SPELLBOOKNAME.%spellbook|">
|FOR,%spell,0,COUNT[SPELLSINBOOK.%class.%spellbook.%level]-1,1,0|
				<spell>
						<name>|SPELLMEM.%class.%spellbook.%level.%spell.NAME|</name>
						<outputname>|SPELLMEM.%class.%spellbook.%level.%spell.OUTPUTNAME|</outputname>
						<times_memorized>|SPELLMEM.%class.%spellbook.%level.%spell.TIMES|</times_memorized>
						<range>|SPELLMEM.%class.%spellbook.%level.%spell.RANGE|</range>
						<components>|SPELLMEM.%class.%spellbook.%level.%spell.COMPONENTS|</components>
						<castingtime>|SPELLMEM.%class.%spellbook.%level.%spell.CASTINGTIME|</castingtime>
						<casterlevel>|SPELLMEM.%class.%spellbook.%level.%spell.CASTERLEVEL|</casterlevel>
						<dc>|SPELLMEM.%class.%spellbook.%level.%spell.DC|</dc>
						<duration>|SPELLMEM.%class.%spellbook.%level.%spell.DURATION|</duration>
						<effect>|SPELLMEM.%class.%spellbook.%level.%spell.EFFECT|</effect>
						<target>|SPELLMEM.%class.%spellbook.%level.%spell.TARGET|</target>
						<saveinfo>|SPELLMEM.%class.%spellbook.%level.%spell.SAVEINFO|</saveinfo>
						<school>
							<school>|SPELLMEM.%class.%spellbook.%level.%spell.SCHOOL|</school>
							<subschool>|SPELLMEM.%class.%spellbook.%level.%spell.SUBSCHOOL|</subschool>
							<descriptor>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTOR|</descriptor>
							<fullschool>|SPELLMEM.%class.%spellbook.%level.%spell.FULLSCHOOL|</fullschool>
						</school>
						<source>
							<sourcelevel>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCELEVEL|</sourcelevel>
							<source>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCE|</source>
							<sourcepage>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCEPAGE|</sourcepage>
							<sourceshort>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCESHORT|</sourceshort>
						</source>
						<spell_resistance>|SPELLMEM.%class.%spellbook.%level.%spell.SR|</spell_resistance>
						<description>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTION|</description>
						<bonusspell>|SPELLMEM.%class.%spellbook.%level.%spell.BONUSSPELL|</bonusspell>
					</spell>
|ENDFOR|
			</spellbook>
|%|
|ENDFOR|
|ENDFOR|
|ENDFOR|
		</class_innate_memorized>
			<!-- ### END class innate memorized spells ### -->
|ENDIF|
|ENDFOR|
<!-- ### END innate memorized spell section -->
			<!-- ### BEGIN class Spellbook memorized spells ### -->
|FOR,%spellbook,2,COUNT[SPELLBOOKS]-1,1,0|
|FOR,%foo,COUNT[SPELLRACE],COUNT[SPELLRACE],1,1|
<!-- FOR,%foo,COUNT[SPELLRACE],COUNT[SPELLRACE],1,1 -->
|FOR,%bar,COUNT[SPELLSINBOOK0.%spellbook.0],COUNT[SPELLSINBOOK0.%spellbook.0],1,1|
<!-- FOR,%bar,COUNT[SPELLSINBOOK0.%spellbook.0],COUNT[SPELLSINBOOK0.%spellbook.0],1,1 -->
|IIF(%foo:0.OR.%bar:0)|
<!-- Either we do not have a innate race, or if we do we do not have any 0 level spell for the innate race -->
			<spellbook number="%spellbook" name="|SPELLBOOKNAME.%spellbook|">
|FOR,%class,COUNT[SPELLRACE],COUNT[SPELLRACE]+COUNT[CLASSES]-1,1,1|
|%SPELLLISTCLASS.%class|
			<class number="%class" spelllistclass="|SPELLLISTCLASS.%class|" spellcasterlevel="|SPELLLISTCLASS.%class.LEVEL|" spellcastertype="|SPELLLISTTYPE.%class|" memorize="|SPELLLISTMEMORIZE.%class|">
|FOR,%level,0,MAXSPELLLEVEL.%class,1,1|
|FOR,%spelllevelcount,COUNT[SPELLSINBOOK.%class.%spellbook.%level],COUNT[SPELLSINBOOK.%class.%spellbook.%level],1,0|
|IIF(%spelllevelcount:0)|
				<level number="%level" spellcount="%spelllevelcount"/>
|ELSE|
				<level number="%level" spellcount="%spelllevelcount">
|FOR,%spell,0,COUNT[SPELLSINBOOK.%class.%spellbook.%level]-1,1,0|
					<spell>
							<name>|SPELLMEM.%class.%spellbook.%level.%spell.NAME|</name>
							<outputname>|SPELLMEM.%class.%spellbook.%level.%spell.OUTPUTNAME|</outputname>
							<times_memorized>|SPELLMEM.%class.%spellbook.%level.%spell.TIMES|</times_memorized>
							<range>|SPELLMEM.%class.%spellbook.%level.%spell.RANGE|</range>
							<components>|SPELLMEM.%class.%spellbook.%level.%spell.COMPONENTS|</components>
							<castingtime>|SPELLMEM.%class.%spellbook.%level.%spell.CASTINGTIME|</castingtime>
							<casterlevel>|SPELLMEM.%class.%spellbook.%level.%spell.CASTERLEVEL|</casterlevel>
							<dc>|SPELLMEM.%class.%spellbook.%level.%spell.DC|</dc>
							<duration>|SPELLMEM.%class.%spellbook.%level.%spell.DURATION|</duration>
							<effect>|SPELLMEM.%class.%spellbook.%level.%spell.EFFECT|</effect>
							<target>|SPELLMEM.%class.%spellbook.%level.%spell.TARGET|</target>
							<saveinfo>|SPELLMEM.%class.%spellbook.%level.%spell.SAVEINFO|</saveinfo>
							<school>
								<school>|SPELLMEM.%class.%spellbook.%level.%spell.SCHOOL|</school>
								<subschool>|SPELLMEM.%class.%spellbook.%level.%spell.SUBSCHOOL|</subschool>
								<descriptor>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTOR|</descriptor>
								<fullschool>|SPELLMEM.%class.%spellbook.%level.%spell.FULLSCHOOL|</fullschool>
							</school>
							<source>
								<sourcelevel>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCELEVEL|</sourcelevel>
								<source>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCE|</source>
								<sourcepage>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCEPAGE|</sourcepage>
								<sourceshort>|SPELLMEM.%class.%spellbook.%level.%spell.SOURCESHORT|</sourceshort>
							</source>
							<spell_resistance>|SPELLMEM.%class.%spellbook.%level.%spell.SR|</spell_resistance>
							<description>|SPELLMEM.%class.%spellbook.%level.%spell.DESCRIPTION|</description>
							<bonusspell>|SPELLMEM.%class.%spellbook.%level.%spell.BONUSSPELL|</bonusspell>
						</spell>
|ENDFOR|
				</level>
|ENDIF|
|ENDFOR|
|ENDFOR|
			</class>
|%|
|ENDFOR|
		</spellbook>
|ELSE|
|ENDIF|
<!-- END FOR,%bar,COUNT[SPELLSINBOOK0.%spellbook.0],COUNT[SPELLSINBOOK0.%spellbook.0],1,1 -->
|ENDFOR|
<!-- END FOR,%foo,COUNT[SPELLRACE],COUNT[SPELLRACE],1,1 -->
|ENDFOR|
|ENDFOR|
	</memorized_spells>
|ENDIF|
|ENDFOR|
<!-- ### END class Spellbook memorized spells ### -->
	</spells>

</character>
