I have been experimenting in finding a way to add a new "Hero" Unit. I have not found a way. The Exeption error comes up making me unable to enter the menu screen. I was trying to make the hero with an Imperial Royal Gaurd model. Making a hero does as well involve the herocompanies.xml and the namedherounits.xml files
Here is my text if you want to see what needs improvement in order to "make" a new hero of mine.
<HeroCompany Name="Extas_Team">
<Text_ID>TEXT_INDIG_ELITE_GUARD</Text_ID>
<Icon_Name>i_button_imperial_guard.tga</Icon_Name>
<Is_Dummy>Yes</Is_Dummy>
<Damage>9999.0</Damage>
<Affiliation>Empire</Affiliation>
<Build_Time_Seconds>0</Build_Time_Seconds>
<Combat_Power_Value>0</Combat_Power_Value>
<Tech_Level>1</Tech_Level>
<Required_Timeline>0</Required_Timeline>
<Required_Ground_Base_Level>0</Required_Ground_Base_Level>
<Required_Star_Base_Level>0</Required_Star_Base_Level>
<Required_Special_Structures></Required_Special_Structures>
<Required_Planets>Byss</Required_Planets>
<Behavior>DUMMY_GROUND_COMPANY</Behavior>
<Company_Transport_Unit>Shuttle_Tyderium</Company_Transport_Unit>
<Company_Units>Darth_Extas</Company_Units>
<Is_Named_Hero>Yes</Is_Named_Hero>
<Is_Force_Sensitive>Yes</Is_Force_Sensitive>
<Available_In_Skirmish>yes</Available_In_Skirmish>
<Can_Be_Only_One>true</Can_Be_Only_One>
<Score_Cost_Credits> 2000 </Score_Cost_Credits>
<SFXEvent_Build_Started>EHD_Request_Assistance</SFXEvent_Build_Started>
<SFXEvent_Build_Cancelled>EHD_Request_Canceled</SFXEvent_Build_Cancelled>
<SFXEvent_Build_Complete>Unit_Respawn_Emperor</SFXEvent_Build_Complete>
<SFXEvent_Hero_Respawned>Unit_Respawn_Emperor</SFXEvent_Hero_Respawned>
<SFXEvent_Fleet_Move>Unit_Fleet_Move_Emperor</SFXEvent_Fleet_Move>
<Unit_Abilities_Data SubObjectList="Yes">
<!-- Primary ability -->
<Unit_Ability>
<Type>FORCE_LIGHTNING</Type>
<Recharge_Seconds>10.0</Recharge_Seconds>
<GUI_Activated_Ability_Name> Emperor_Force_Lightning </GUI_Activated_Ability_Name> <!-- GUI Command Bar support -->
</Unit_Ability>
<!-- Secondary ability -->
<Unit_Ability>
<Type>AREA_EFFECT_CONVERT</Type>
<Recharge_Seconds>10.0</Recharge_Seconds>
<GUI_Activated_Ability_Name> </GUI_Activated_Ability_Name> <!-- GUI Command Bar support -->
<Spawned_Object_Type> Proj_Special_Emperor_Instant_Dark_Side_Corrupt_Blast </Spawned_Object_Type>
</Unit_Ability>
</Unit_Abilities_Data>
<!--<MULTIPLAYER SKIRMISH VALUES BEGIN>-->
<Tactical_Build_Cost_Multiplayer>2000</Tactical_Build_Cost_Multiplayer>
<Tactical_Build_Time_Seconds>15</Tactical_Build_Time_Seconds>
<Tactical_Build_Prerequisites>EC_Level_Two_Tech_Upgrade</Tactical_Build_Prerequisites>
<Tactical_Production_Queue>Tactical_Units</Tactical_Production_Queue>
<Build_Limit_Current_Per_Player>1</Build_Limit_Current_Per_Player>
<Build_Limit_Lifetime_For_All_Allies>-1</Build_Limit_Lifetime_For_All_Allies>
<!--<MULTIPLAYER SKIRMISH VALUES END>-->
<Encyclopedia_Text>TEXT_TOOLTIP_UNIT_CAPTURE_ABILITY</Encyclopedia_Text>
<Encyclopedia_Unit_Class> TEXT_ENCYCLOPEDIA_CLASS_SITH_LORD </Encyclopedia_Unit_Class>
<CategoryMask>LandHero</CategoryMask>
<Ranking_In_Category> 1 </Ranking_In_Category>
<Population_Value>1</Population_Value>
</HeroCompany>
^ Is for The Hero Companies file, I still cannot find the problem. As well sorry if the code is mest up, just the way the computer made it when I pasted it in.
</HeroUnit>
<HeroUnit Name="Darth_Extas">
<Is_Named_Hero>Yes</Is_Named_Hero>
<Is_Force_Sensitive>Yes</Is_Force_Sensitive>
<Text_ID>TEXT_INDIG_ELITE_GUARD</Text_ID>
<Encyclopedia_Text> TEXT_TOOLTIP_UNIT_CAPTURE_ABILITY </Encyclopedia_Text>
<Encyclopedia_Unit_Class> TEXT_ENCYCLOPEDIA_CLASS_SITH_LORD </Encyclopedia_Unit_Class>
<Land_Model_Name>EI_RoyalGaurd.alo</Land_Model_Name>
<Icon_Name>i_button_imperial_guard.tga</Icon_Name>
<GalacticBehavior> SELECTABLE </GalacticBehavior>
<LandBehavior> SELECTABLE, SURFACE_FX, WALK_LOCOMOTOR, IDLE, REVEAL, HIDE_WHEN_FOGGED, TARGETING, WEAPON, DAMAGE_TRACKING, UNIT_AI, ABILITY_COUNTDOWN, IMPOSING_PRESENCE, HOLSTER_WEAPON </LandBehavior>
<Lua_Script>Palpatine</Lua_Script>
<!-- Lightsaber holstering data -->
<SFXEvent_Draw_Weapon> Unit_Light_Saber_On </SFXEvent_Draw_Weapon>
<SFXEvent_Holster_Weapon> Unit_Light_Saber_Off </SFXEvent_Holster_Weapon>
<Holster_Weapon_Bone_Name> b_saber </Holster_Weapon_Bone_Name>
<Holster_Drawn_Bone_Translation> 0.0, 0.0, 0.0 </Holster_Drawn_Bone_Translation>
<Holster_Holstered_Bone_Translation> 0.0, -5.835, 0.0 </Holster_Holstered_Bone_Translation>
<Holster_Transition_Time_In_Secs> 0.17 </Holster_Transition_Time_In_Secs>
<Holster_Minimum_Drawn_Time_In_Secs> 15.0 </Holster_Minimum_Drawn_Time_In_Secs>
<Holster_Disable_Engine_Loops> Yes </Holster_Disable_Engine_Loops>
<SFXEvent_Engine_Idle_Loop> Unit_Vader_Lightsaber_Idle_Loop </SFXEvent_Engine_Idle_Loop>
<SFXEvent_Engine_Moving_Loop> Unit_Vader_Lightsaber_Moving_Loop </SFXEvent_Engine_Moving_Loop>
<SFXEvent_Engine_Cinematic_Focus_Loop> Unit_Vader_Lightsaber_Cinematic_Loop </SFXEvent_Engine_Cinematic_Focus_Loop>
<SurfaceFX_Name>Generic_Footprint, Good_Ground</SurfaceFX_Name>
<Is_Visible_On_Radar>Yes</Is_Visible_On_Radar>
<Loop_Idle_Anim_00>No</Loop_Idle_Anim_00>
<Collidable_By_Projectile_Living>Yes</Collidable_By_Projectile_Living>
<CanCellStack>yes</CanCellStack>
<Movement_Animation_Speed> 0.8 </Movement_Animation_Speed>
<Max_Speed>3</Max_Speed>
<Max_Rate_Of_Turn>20.0</Max_Rate_Of_Turn>
<Custom_Soft_Footprint_Radius> 6.5 </Custom_Soft_Footprint_Radius>
<Custom_Hard_XExtent> 2.0 </Custom_Hard_XExtent>
<Custom_Hard_YExtent> 2.0 </Custom_Hard_YExtent>
<Space_Layer> Land </Space_Layer>
<UnitCollisionClass> Infantry </UnitCollisionClass>
<FormationSpacing> .5 </FormationSpacing> <!-- Temp scale change for scale test - change back once models resized -->
<MinimumPushReturnDistance> 10 </MinimumPushReturnDistance>
<Min_Speed> .4 </Min_Speed>
<OverrideAcceleration> .2 </OverrideAcceleration>
<OverrideDeceleration> .25 </OverrideDeceleration>
<Mouse_Collide_Override_Sphere_Radius> 20.0 </Mouse_Collide_Override_Sphere_Radius>
<Occlusion_Silhouette_Enabled>1</Occlusion_Silhouette_Enabled>
<Select_Box_Scale>27</Select_Box_Scale>
<Select_Box_Z_Adjust>3.0f</Select_Box_Z_Adjust>
<Selection_Blob_Material_Name>Selection_Empire_Hero</Selection_Blob_Material_Name>
<Highlight_Blob_Material_Name>Highlight_Empire_Hero</Highlight_Blob_Material_Name>
<Mass>1.1</Mass>
<Scale_Factor>1.75</Scale_Factor> <!-- Temp scale change for scale test - change back once models resized -->
<!--<Is_Sprite>No</Is_Sprite>-->
<Type>Walk</Type>
<Affiliation>Empire</Affiliation>
<!-- If you want heroes to contribute to political control, use Political_Control_Bonus_Ability -->
<Political_Faction>Empire</Political_Faction>
<IsBuildable>No</IsBuildable>
<Spawn_Planet>Byss</Spawn_Planet>
<Size_Value>78</Size_Value>
<Armor_Type> Armor_Hero </Armor_Type>
<Damage>9999.0</Damage>
<Autoresolve_Health>1000</Autoresolve_Health>
<Tactical_Health>800</Tactical_Health>
<Is_Stationary_When_Attacking>Yes</Is_Stationary_When_Attacking>
<Projectile_Types>Proj_Lightsaber</Projectile_Types>
<Land_FOW_Reveal_Range>600.0</Land_FOW_Reveal_Range>
<Dense_FOW_Reveal_Range_Multiplier>1.0</Dense_FOW_Reveal_Range_Multiplier>
<Targeting_Max_Attack_Distance>20.0</Targeting_Max_Attack_Distance>
<Ranged_Target_Z_Adjust>7.0</Ranged_Target_Z_Adjust>
<Projectile_Appearance_Delay_Frames> 8 </Projectile_Appearance_Delay_Frames>
<Projectile_Fire_Recharge_Seconds>0.7</Projectile_Fire_Recharge_Seconds>
<SFXEvent_Select>Unit_Select_Imp_Guard</SFXEvent_Select>
<SFXEvent_Move>Unit_Move_Imp_Guard</SFXEvent_Move>
<SFXEvent_Fleet_Move>Unit_Fleet_Move_Emperor</SFXEvent_Fleet_Move>
<SFXEvent_Attack>Unit_Attack_Imp_Guard</SFXEvent_Attack>
<SFXEvent_Guard>Unit_Guard_Imp_Guard</SFXEvent_Guard>
<SFXEvent_Group_Move>Unit_Group_Move_Emperor</SFXEvent_Group_Move>
<SFXEvent_Group_Attack>Unit_Group_Attack_Emperor</SFXEvent_Group_Attack>
<SFXEvent_Health_Low_Warning> Unit_Health_Low_Emperor </SFXEvent_Health_Low_Warning>
<SFXEvent_Health_Critical_Warning> Unit_Health_Critical_Emperor </SFXEvent_Health_Critical_Warning>
<Death_SFXEvent_Start_Die> Unit_Defeat_Emperor </Death_SFXEvent_Start_Die>
<Stealth_Capable>yes/Stealth_Capable>
<Victory_Relevant>yes</Victory_Relevant>
<CategoryMask> LandHero </CategoryMask>
<Ranking_In_Category> 1 </Ranking_In_Category>
<MovementClass>Infantry</MovementClass>
<OccupationStyle>1x1</OccupationStyle>
<Blob_Shadow_Below_Detail_Level>3</Blob_Shadow_Below_Detail_Level>
<Blob_Shadow_Scale>5.0, 5.0</Blob_Shadow_Scale>
<Blob_Shadow_Material_Name>Generic_Shadow</Blob_Shadow_Material_Name>
<Blob_Shadow_Bone_Name>B_Chest</Blob_Shadow_Bone_Name>
<Ground_Infantry_Turret_Target> Yes </Ground_Infantry_Turret_Target>
<Attach_To_Flagship_During_Space_Battle>Yes</Attach_To_Flagship_During_Space_Battle>
<Stay_In_Transport_During_Ground_Battle>No</Stay_In_Transport_During_Ground_Battle>
<Has_Land_Evaluator>True</Has_Land_Evaluator>
<AI_Combat_Power>600</AI_Combat_Power>
<Idle_Chase_Range>100.0</Idle_Chase_Range>
<Guard_Chase_Range>200.0</Guard_Chase_Range>
<Attack_Move_Response_Range>400.0</Attack_Move_Response_Range>
<Targeting_Stickiness_Time_Threshold>5.0</Targeting_Stickiness_Time_Threshold>
<Targeting_Priority_Set>AntiInfantry</Targeting_Priority_Set>
<Autonomous_Move_Extension_Vs_Attacker>200.0</Autonomous_Move_Extension_Vs_Attacker>
<Neutralization_Cost>5000.0</Neutralization_Cost>
<Can_Be_Neutralized_By_Major_Heroes>No</Can_Be_Neutralized_By_Major_Heroes>
<Can_Be_Neutralized_By_Minor_Heroes>No</Can_Be_Neutralized_By_Minor_Heroes>
<Score_Cost_Credits> 2000 </Score_Cost_Credits>
<Play_SFXEvent_On_Sighting>True</Play_SFXEvent_On_Sighting>
<Death_Fade_Time>0.55</Death_Fade_Time>
<Death_Persistence_Duration>0.0</Death_Persistence_Duration>
<!-- Controls the range within which Palpatine has an effect on other units' animations -->
<Presence_Range>200.0</Presence_Range>
<!-- Non-Hero unit abilities description -->
<Unit_Abilities_Data SubObjectList="Yes">
<Unit_Ability>
<Type>FORCE_LIGHTNING</Type>
<Recharge_Seconds>10.0</Recharge_Seconds>
<GUI_Activated_Ability_Name> Emperor_Force_Lightning </GUI_Activated_Ability_Name> <!-- GUI Command Bar support -->
<SFXEvent_Target_Ability> Unit_Lightning_Emperor </SFXEvent_Target_Ability>
</Unit_Ability>
<Unit_Ability>
<Type>AREA_EFFECT_CONVERT</Type>
<Recharge_Seconds>10.0</Recharge_Seconds>
<GUI_Activated_Ability_Name> </GUI_Activated_Ability_Name> <!-- GUI Command Bar support -->
<Spawned_Object_Type> Proj_Special_Emperor_Instant_Dark_Side_Corrupt_Blast </Spawned_Object_Type>
<SFXEvent_Target_Ability> Unit_Convert_Emperor </SFXEvent_Target_Ability>
</Unit_Ability>
</Unit_Abilities_Data>
<Abilities SubObjectList="Yes">
<!-- Redirect Blaster must appear in the special ability list before Absorb Blaster -->
<Redirect_Blaster_Ability Name="Emperor_Redirect_Blaster">
<Activation_Style>Take_Damage</Activation_Style>
<!-- Redirection chance is rolled first. If failed, we roll block chance. If failed, we take the damage. -->
<Redirect_Chance>0.80</Redirect_Chance>
<Block_Chance>0.80</Block_Chance>
<Reaction_Arc_In_Degrees>180.0</Reaction_Arc_In_Degrees>
<Max_Projectile_Redirection_Angle_In_Degrees> 135.0 </Max_Projectile_Redirection_Angle_In_Degrees>
<Turn_To_Face_Unblockable_Shots>No</Turn_To_Face_Unblockable_Shots>
<!-- We can block/redirect shots from the following units types: -->
<Applicable_Unit_Categories>Infantry, LandHero</Applicable_Unit_Categories>
<Applicable_Unit_Types />
<SFXEvent_Activate>Unit_Lightsaber_Projectile_Block</SFXEvent_Activate>
</Redirect_Blaster_Ability>
<Absorb_Blaster_Ability Name="Emperor_Absorb_Blaster">
<Activation_Style>Take_Damage</Activation_Style>
<Absorb_Chance>0.61</Absorb_Chance>
<!-- Absorb Percentage and Amount work together in the following way: -->
<!-- Actual Amount healed = (Projectile Damage * Absorb Percentage) + Absorb Amount -->
<!-- Either value can be zero, but at least one should be non-zero. -->
<Damage_Absorb_Percentage>0.1</Damage_Absorb_Percentage>
<Damage_Absorb_Amount>1</Damage_Absorb_Amount>
<!-- We can absorb shots from the following units types (but no missiles or grenades): -->
<Applicable_Unit_Categories>Infantry</Applicable_Unit_Categories>
<Applicable_Unit_Types />
<SFXEvent_Activate>Unit_Force_Absorb</SFXEvent_Activate>
<Owner_Light_Effect_Type>Color_Flash</Owner_Light_Effect_Type>
<Owner_Light_Effect_Color>2.0, 0.4, 0.4</Owner_Light_Effect_Color>
<Owner_Light_Effect_Color2 />
<Owner_Light_Effect_Duration>0.5</Owner_Light_Effect_Duration>
<Owner_Light_Effect_Pulse_Count />
</Absorb_Blaster_Ability>
<!-- Force Lightning must come after Force Whirlwind, otherwise Force Whirlwind would never activate. -->
<Force_Lightning_Ability Name="Emperor_Force_Lightning">
<!-- <Activation_Style>Special_Attack</Activation_Style> -->
<Activation_Style> User_Input </Activation_Style>
<Activation_Min_Range>0.0</Activation_Min_Range>
<Activation_Max_Range>175.0</Activation_Max_Range>
<Applicable_Unit_Categories>Infantry</Applicable_Unit_Categories>
<Applicable_Unit_Types />
<Damage_Amount>9999.0</Damage_Amount>
<Damage_Application_Time_In_Secs>1.3893</Damage_Application_Time_In_Secs>
<Start_Lightning_Frame_Number> 9 </Start_Lightning_Frame_Number>
<Lightning_Effect_Name>Force_Lightning</Lightning_Effect_Name> <!-- See LightningEffectTypes.xml -->
<Lightning_Source_Bone_Name>B_HAND_L</Lightning_Source_Bone_Name>
<Lightning_Target_Bone_Name>B_PELVIS</Lightning_Target_Bone_Name>
<Lightning_Max_Targets> 25 </Lightning_Max_Targets> <!-- How many victims will the lightning seek out, including original target -->
<Lightning_Targets_Radius> 200.0 </Lightning_Targets_Radius> <!-- How far from the original target will the lightning seek for other victims -->
<SFXEvent_Activate>Unit_Force_Lightning</SFXEvent_Activate>
<SFXEvent_Target_Affected />
<Target_Particle_Effect>Force_Lightning_Smoke</Target_Particle_Effect>
<Target_Particle_Bone_Name>B_PELVIS</Target_Particle_Bone_Name> <!-- B_FOOT_R B_FOOT_L -->
<Target_Light_Effect_Type>Linear_Pulse</Target_Light_Effect_Type>
<Target_Light_Effect_Color>0.3, 0.3, 0.8</Target_Light_Effect_Color>
<Target_Light_Effect_Color2 />
<Target_Light_Effect_Duration>2.3893</Target_Light_Effect_Duration>
<Target_Light_Effect_Pulse_Count>25</Target_Light_Effect_Pulse_Count>
</Force_Lightning_Ability>
<Earthquake_Attack_Ability Name="Emperor_Attack_Structures">
<Activation_Style>Special_Attack</Activation_Style>
<Terminate_Effect_On_Move_Command>Yes</Terminate_Effect_On_Move_Command>
<Activation_Min_Range>0.0</Activation_Min_Range>
<Activation_Max_Range>350.0</Activation_Max_Range>
<Activation_Chance>1.0</Activation_Chance>
<Damage_Amount>0.0</Damage_Amount>
<Damage_Percentage>0.16</Damage_Percentage>
<Damage_Interval_In_Secs>0.3</Damage_Interval_In_Secs>
<!-- Note: As well as matching the below Unit_Category/Unit_Type filters, the -->
<!-- target object must also have the EARTHQUAKE_TARGET behavior attached. -->
<Applicable_Unit_Categories>Structure</Applicable_Unit_Categories>
<Applicable_Unit_Types />
<SFXEvent_Activate />
<Target_Particle_Effect>Earthquake_Dust_Particles</Target_Particle_Effect>
<Target_Particle_Bone_Name />
</Earthquake_Attack_Ability>
<Combat_Bonus_Ability Name="Emperor_Land_Combat_Bonus">
<Activation_Style>Ground_Automatic</Activation_Style>
<Unit_Strength_Category>Vehicle | Infantry | Air</Unit_Strength_Category>
<Applicable_Unit_Categories>Vehicle | Infantry | Air</Applicable_Unit_Categories>
<Applicable_Unit_Types />
<Health_Bonus_Percentage>0.25</Health_Bonus_Percentage>
<Damage_Bonus_Percentage>0.25</Damage_Bonus_Percentage>
<Energy_Pool_Bonus_Percentage>0.25</Energy_Pool_Bonus_Percentage>
<Shield_Bonus_Percentage>0.25</Shield_Bonus_Percentage>
<Defense_Bonus_Percentage>0.25</Defense_Bonus_Percentage>
<Movement_Speed_Bonus_Percentage>0.25</Movement_Speed_Bonus_Percentage>
<Stacking_Category>0</Stacking_Category>
</Combat_Bonus_Ability>
<!-- Area Effect Force Corruption: Infantry Pain/Damage -->
<Force_Healing_Ability Name="Emperor_AE_Force_Corruption">
<Activation_Style>Ground_Automatic</Activation_Style>
<Heal_Range>90.0</Heal_Range>
<Heal_Amount>0.0</Heal_Amount> <!-- Negative damage means inflict pain on others -->
<Heal_Interval_In_Secs>3.0</Heal_Interval_In_Secs>
<Applicable_Unit_Categories> Infantry </Applicable_Unit_Categories>
<Applicable_Unit_Types />
<SFXEvent_Target_Affected>Unit_Force_Corruption</SFXEvent_Target_Affected> <!-- STUB for Frank -->
<Target_Particle_Effect>Corrupt_Enemy</Target_Particle_Effect>
<Target_Particle_Bone_Name>B_HEAD</Target_Particle_Bone_Name>
<Target_Light_Effect_Type>Smooth_Pulse</Target_Light_Effect_Type>
<Target_Light_Effect_Color>0.1, 0.1, 0.1</Target_Light_Effect_Color>
<Target_Light_Effect_Color2 />
<Target_Light_Effect_Duration>1.0</Target_Light_Effect_Duration>
<Target_Light_Effect_Pulse_Count>1</Target_Light_Effect_Pulse_Count>
</Force_Healing_Ability>
</Abilities>
</HeroUnit>
again sorry if the pasting is a bit mest up. Find any problems in it, I know there is somewhere.
Thanks in advance!
try changing company units to: Imperial_Elite_Guard
If that doesn't work, also change
<HeroCompany Name="Extas_Team"> to Imperial_Guard_Company
That might fix it.
How do you add units to the build menu? Cause when I make a duplicate of a ship or unit, only 1 build option of same one shows up.