Main Menu
The Game
Modding
Forums
Affiliates Affiliate
Affiliate
Affiliate
Link to Us

RSS Feeds
Site Stats
Topsites Mod DB Top 100

Rotors
GamesModding.com Link Rotor

Adding a New Fighter Squadron
» Added March 29, 2006 | Written by Lord Of Gifts

For this tutorial we will be adding a new fighter squadron to the Empire, the ARC-170 Starfighter. First we must add the individual fighter. Add this code to SPACEUNITSFIGHTERS.XML, just above the </FighterUnits> tag. I've added comments above most of the lines to explain them:
Code(SPACEUNITSFIGHTER.XML):
<!-- All space units start with the tag <SpaceUnit Name="%UNIT_NAME%">
    UNIT_NAME is what will be referenced in other files. -->
    <SpaceUnit Name="ARC-170">
        <!-- This line defines your unit's name that will show up ingame.
        Define it in the MasterTextFile_ENGLISH.dat -->
        <Text_ID>TEXT_UNIT_ARC-170</Text_ID>
        <!-- This line defines your unit class.
        Defined in MasterTextFile_ENGLISH.dat -->
        <Encyclopedia_Unit_Class> TEXT_ENCYCLOPEDIA_CLASS_FIGHTER </Encyclopedia_Unit_Class>
        <!-- The units that your unit is good against.  Maximum of three -->
        <Encyclopedia_Good_Against> TIE_Fighter TIE_Bomber </Encyclopedia_Good_Against>
        <!-- The units that your unit is bad against.  Maximum of three -->
        <Encyclopedia_Vulnerable_To> Tartan_Patrol_Cruiser Broadside_Class_Cruiser IPV1_System_Patrol_Craft </Encyclopedia_Vulnerable_To>
        <!-- The model that your unit uses ingame.
        Because we can't create a new model, we'll use one that works closest to our unit: the X-wing
        All the model names come from the ART/MODELS/ directory -->
        <Space_Model_Name>rv_XWing.ALO</Space_Model_Name>
        <!-- This line scales your unit by the selected factor
        1 is normal size, less than one is smaller, and more than one is bigger
        ie: 0.5 would cause the ingame model to be half as big as the actual model -->
        <Scale_Factor>1.0</Scale_Factor>
        <!-- The size of the section box around the unit.  I'm not sure where the units come from
        so its guess and check for now. -->
        <Select_Box_Scale>70</Select_Box_Scale>
        <!-- This line adusts the z value of the selection box.
        Again I'm not sure where the units come from, or what the 'f' signifys. -->
        <Select_Box_Z_Adjust>1.0f</Select_Box_Z_Adjust>
        <!-- I don't have a clue what this line does. -->
        <Mouse_Collide_Override_Sphere_Radius> 50.0 </Mouse_Collide_Override_Sphere_Radius>
        <!-- The type of damage your unit does.
        Defined in GAMECONSTANTS.XML -->
        <Damage_Type>Damage_Fighter</Damage_Type>
        <!-- Once again, not a clue -->
        <Ranged_Target_Z_Adjust>0</Ranged_Target_Z_Adjust>
        <!-- The value multipied to the Fog of War reveal range when in a dense fog of war. -->
        <Dense_FOW_Reveal_Range_Multiplier>0.2</Dense_FOW_Reveal_Range_Multiplier>
        <!-- Mass of the unit. I'm not sure what the units are.
        Used for physics calculations. -->
        <Mass>1</Mass>
        <!-- How fast can your unit move -->
        <Max_Speed>4.5</Max_Speed>
        <!-- The slowest your unit moves -->
        <Min_Speed>2.5</Min_Speed>
        <!-- How fast your unit can turn -->
        <Max_Rate_Of_Turn>2.5</Max_Rate_Of_Turn>
        <!--How fast your unit accelerates -->
        <Max_Thrust>1.2</Max_Thrust>
        <!-- How fast your unit can roll -->
        <Max_Rate_Of_Roll>5.0</Max_Rate_Of_Roll>
        <!-- The angle your unit angles when banking -->
        <Bank_Turn_Angle>40</Bank_Turn_Angle>
        <!-- The distance from your destination that your unit should begin turning at -->
        <Begin_Turn_Towards_Distance>800.0</Begin_Turn_Towards_Distance>
        <Fires_Forward>no</Fires_Forward>
        <!-- The maximum # of degrees a turret can move left to right -->
        <Turret_Rotate_Extent_Degrees>20</Turret_Rotate_Extent_Degrees>
        <!-- The maximum # of degrees a turret can move up and down -->
        <Turret_Elevate_Extent_Degrees>40</Turret_Elevate_Extent_Degrees>
        <!-- How many degrees your unit lifts when accelerating -->
        <Max_Lift>4</Max_Lift>
        <!-- Can your unit jump to hyperspace -->
        <Hyperspace>Yes</Hyperspace>
        <!-- How fast your unit moves when you call it in as a reinforcement -->
        <Hyperspace_Speed>1.5</Hyperspace_Speed>
        <!-- Not sure. -->
        <Maintenance_Cost>0.1</Maintenance_Cost>
        <!-- What faction is your unit used on -->
        <Affiliation>Empire</Affiliation>
        <!-- How many hit points your unit's sheild has -->
        <Shield_Points>30</Shield_Points>
        <!-- How many hit points your unit has in a tactical battle -->
        <Tactical_Health>70</Tactical_Health>
        <!-- How fast does your sheild recharge -->
        <Shield_Refresh_Rate>2</Shield_Refresh_Rate>
        <!-- Not sure what engery is used for -->
        <Energy_Capacity>500</Energy_Capacity>
        <!-- How fast your energy replenishes itself -->
        <Energy_Refresh_Rate>300</Energy_Refresh_Rate>
        <!-- Your ships class. Not sure where they are defined. Look at other units for different types. -->
        <Ship_Class>fighter</Ship_Class>
        <!-- Your ships armor. Defined in GAMECONSTANTS.XML -->
        <Armor_Type> Armor_Fighter </Armor_Type>
        <!-- The armor your sheild uses. Don't know where it is defined -->
        <Shield_Armor_Type>Shield_Fighter</Shield_Armor_Type>
        <!-- Not a clue -->
        <Formation_Priority>1</Formation_Priority>
        <!-- Is your unit an escort unit?  -->
        <Is_Escort>yes</Is_Escort>
        <!-- Is your unit a bomber? -->
        <Is_Bomber>no</Is_Bomber>
        <!-- The amount of political control you get for this unit. I don't think it is used by the game. -->
        <Political_Control>0</Political_Control>
        <!-- How many units can this squadron contain. Set it to 0 for actual fighters. -->
        <Squadron_Capacity>0</Squadron_Capacity>
        <!-- How many of these units are in a squadron -->
        <Number_per_Squadron>3</Number_per_Squadron>
        <!-- Not a clue -->
        <Size_Value>8</Size_Value>
        <!-- Behaviors your unit follows. Don't know where they are defined. -->
        <SpaceBehavior>FIGHTER_LOCOMOTOR, SELECTABLE, TARGETING, WEAPON, POWERED, SHIELDED, HIDE_WHEN_FOGGED, AMBIENT_SFX, DAMAGE_TRACKING, NEBULA </SpaceBehavior>
        <!-- Can your unit crash into living projectiles? -->
        <Collidable_By_Projectile_Living>Yes</Collidable_By_Projectile_Living>
        <!-- How much damage does your unit do -->
        <Damage>7</Damage>
        <!-- What projectile does your unit fire per pulse
        Defined in PROJECTILES.XML -->
        <Projectile_Types>Proj_Ship_Small_Laser_Cannon_Red</Projectile_Types>
        <!-- How many pulses per shot -->
        <Projectile_Fire_Pulse_Count>3</Projectile_Fire_Pulse_Count>
        <!-- How long between pulses -->
        <Projectile_Fire_Pulse_Delay_Seconds>0.1</Projectile_Fire_Pulse_Delay_Seconds>
        <!-- How long between shots -->
        <Projectile_Fire_Recharge_Seconds>1.7</Projectile_Fire_Recharge_Seconds>
        <!-- Defines how acurate your unit is against units with the specified Category Masks. Not totaly sure how the values work.
        I think that the value is the distance that your unit will hit 100% of the time. -->
        <Fire_Inaccuracy_Distance> Fighter, 1.0 </Fire_Inaccuracy_Distance>
        <Fire_Inaccuracy_Distance> Bomber, 1.0 </Fire_Inaccuracy_Distance>
        <Fire_Inaccuracy_Distance> Transport, 1.0 </Fire_Inaccuracy_Distance>
        <Fire_Inaccuracy_Distance> Corvette, 30.0 </Fire_Inaccuracy_Distance>
        <Fire_Inaccuracy_Distance> Frigate, 30.0 </Fire_Inaccuracy_Distance>
        <Fire_Inaccuracy_Distance> Capital, 30.0 </Fire_Inaccuracy_Distance>
        <Fire_Inaccuracy_Distance> Super, 30.0 </Fire_Inaccuracy_Distance>
        <!-- How much of the Fog of War does your unit reveal on land -->
        <Land_FOW_Reveal_Range>130.0</Land_FOW_Reveal_Range>
        <!-- How much of the Fog of War does your unit reveal in space -->
        <Space_FOW_Reveal_Range>500.0</Space_FOW_Reveal_Range>
        <!-- The furthest away a target can be before firing -->
        <Targeting_Max_Attack_Distance>450.0</Targeting_Max_Attack_Distance>
        <!-- The explosion that happens when your unit dies.
        Defined in PARTICLES.XML -->
        <Death_Explosions>Small_Explosion_Space</Death_Explosions>
        <!-- The sound effect played when your unit dies.
        Defined in SFXEVENTSDEATHS.XML-->
        <Death_SFXEvent_Start_Die>Unit_X_Wing_Death_SFX</Death_SFXEvent_Start_Die>
        <!-- The particles that are created when your unit takes damage from an asteroid field
        Defined in PARTICLES.XML -->
        <Asteroid_Damage_Hit_Particles>Small_Damage_Space</Asteroid_Damage_Hit_Particles>
        <!-- Sound effects played for certain conditions. Mostly self explanitory
        Defined in SFXEVENTS_____.XML -->
        <SFXEvent_Fire>Unit_X_Wing_Fire</SFXEvent_Fire>
        <SFXEvent_Select>Unit_Select_X_Wing</SFXEvent_Select>
        <SFXEvent_Move>Unit_Move_X_Wing</SFXEvent_Move>
        <SFXEvent_Fleet_Move>Unit_Fleet_Move_X_Wing</SFXEvent_Fleet_Move>
        <SFXEvent_Attack>Unit_Attack_X_Wing</SFXEvent_Attack>
        <SFXEvent_Guard>Unit_Guard_X_Wing</SFXEvent_Guard>
        <SFXEvent_Assist_Move> Unit_Assist_Move_X_Wing </SFXEvent_Assist_Move>       
        <SFXEvent_Assist_Attack> Unit_Assist_Attack_X_Wing </SFXEvent_Assist_Attack>
        <SFXEvent_Move_Into_Asteroid_Field> Unit_Asteroids_X_Wing </SFXEvent_Move_Into_Asteroid_Field>
        <SFXEvent_Move_Into_Nebula> Unit_Nebula_X_Wing </SFXEvent_Move_Into_Nebula>
        <SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_LASER, Unit_HP_LASER_X_Wing </SFXEvent_Attack_Hardpoint>
        <SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_MISSILE, Unit_HP_MISSILE_X_Wing </SFXEvent_Attack_Hardpoint>
        <SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_TORPEDO, Unit_HP_TORP_X_Wing </SFXEvent_Attack_Hardpoint>
        <SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_ION_CANNON, Unit_HP_ION_X_Wing </SFXEvent_Attack_Hardpoint>
        <SFXEvent_Attack_Hardpoint> HARD_POINT_SHIELD_GENERATOR, Unit_HP_SHIELDS_X_Wing </SFXEvent_Attack_Hardpoint>
        <SFXEvent_Attack_Hardpoint> HARD_POINT_ENGINE, Unit_HP_ENGINES_X_Wing </SFXEvent_Attack_Hardpoint>
        <SFXEvent_Attack_Hardpoint> HARD_POINT_GRAVITY_WELL, Unit_HP_GRAV_X_Wing </SFXEvent_Attack_Hardpoint>
        <SFXEvent_Health_Low_Warning> Unit_Health_Low_X_Wing </SFXEvent_Health_Low_Warning>
        <SFXEvent_Health_Critical_Warning> Unit_Health_Critical_X_Wing </SFXEvent_Health_Critical_Warning>
        <SFXEvent_Enemy_Damaged_Health_Low_Warning> Unit_Enemy_Health_Low_X_Wing </SFXEvent_Enemy_Damaged_Health_Low_Warning>
        <SFXEvent_Enemy_Damaged_Health_Critical_Warning> Unit_Enemy_Health_Critical_X_Wing </SFXEvent_Enemy_Damaged_Health_Critical_Warning>       
        <SFXEvent_Ambient_Moving> Unit_X_Wing_Fly_By </SFXEvent_Ambient_Moving>
        <SFXEvent_Ambient_Moving_Min_Delay_Seconds> 5 </SFXEvent_Ambient_Moving_Min_Delay_Seconds>
        <SFXEvent_Ambient_Moving_Max_Delay_Seconds> 10 </SFXEvent_Ambient_Moving_Max_Delay_Seconds>
        <SFXEvent_Engine_Cinematic_Focus_Loop> Unit_X_Wing_Cinematic_Engine_Loop </SFXEvent_Engine_Cinematic_Focus_Loop>
        <!-- Your units category
        Defined in ENUM\GAMEOBJECTCATEGORYTYPE.XML -->
        <CategoryMask> Fighter | AntiBomber</CategoryMask>
        <!-- Your unit's properites
        Defined in ENUM\GAMEOBJECTPROPERTIESTYPE.XML -->
        <Property_Flags> SmallShip </Property_Flags>
        <!-- The icon that your unit uses. Used for the reinforcement window,  commandbar, etc...
        Defined in MTCOMMANDBAR.MTD -->
        <Icon_Name>i_button_x_wing.tga</Icon_Name>
        <!-- Does your unit have to be destroyed for the enemy to win? -->
        <Victory_Relevant>yes</Victory_Relevant>
        <!-- Does your unit show up on the radar? -->
        <Is_Visible_On_Radar>Yes</Is_Visible_On_Radar>
        <!-- Don't have a clue -->
        <Custom_Footprint_Radius> 7.0 </Custom_Footprint_Radius>
        <!-- Movement class. Defined in ENUM\MOVEMENTCLASSTYPE.XML -->
        <MovementClass> Space </MovementClass>
        <!-- Don't have a clue -->
        <FormationOrder>2</FormationOrder>
        <!-- Don't have a clue -->
        <Out_Of_Combat_Defense_Adjustment>-1.0</Out_Of_Combat_Defense_Adjustment>
        <Minimum_Follow_Distance>25.0</Minimum_Follow_Distance>
        <!-- Does this unit make a team -->
        <Create_Team>Yes</Create_Team>
        <!-- Don't have a clue -->
        <AI_Combat_Power>60</AI_Combat_Power>
        <!-- Don't have a clue -->
        <Collision_Box_Modifier>2.0</Collision_Box_Modifier>
        <!-- Targeting Priority for your unit.
        Defined in SPACEUNITTARGETINGPRIORITIES.XML -->
        <Targeting_Priority_Set>Fighter</Targeting_Priority_Set>
        <!-- Don't have a clue -->
        <Targeting_Stickiness_Time_Threshold>5.0</Targeting_Stickiness_Time_Threshold>   
        <!-- Tooltip to describe your unit.
        Defined in MasterTextFile_ENGLISH.dat-->   
        <Encyclopedia_Text>TEXT_TOOLTIP_ARC-170</Encyclopedia_Text>
        <!-- Any unit abilitys go within the Unit_Abilities_Data Block -->
        <Unit_Abilities_Data SubObjectList="Yes">
            <Unit_Ability>
                <!-- Type of ability. Possibly defined within the LUA Files. -->
                <Type>SPOILER_LOCK</Type>
                <!-- How this ability affects the unit -->
                <Mod_Multiplier>WEAPON_DELAY_MULTIPLIER, 3.0f</Mod_Multiplier>
                <Mod_Multiplier>SHIELD_REGEN_MULTIPLIER, 3.0f</Mod_Multiplier>
                <Mod_Multiplier>ENERGY_REGEN_MULTIPLIER, 3.0f</Mod_Multiplier>
                <!-- Go 1.5 times faster -->
                <Mod_Multiplier>SPEED_MULTIPLIER, 1.5</Mod_Multiplier>
                <!-- Sound Effects for toggling the ability on/off -->
                <SFXEvent_GUI_Unit_Ability_Activated>Unit_Ability_On_X_Wing</SFXEvent_GUI_Unit_Ability_Activated>
                <SFXEvent_GUI_Unit_Ability_Deactivated>Unit_Ability_Off_X_Wing</SFXEvent_GUI_Unit_Ability_Deactivated>
            </Unit_Ability>
        </Unit_Abilities_Data>
        <!-- Does this unit spin away when it dies -->
        <Spin_Away_On_Death>Yes</Spin_Away_On_Death>
        <!-- What is the chance we will spin away instead of outright exploding? -->
        <Spin_Away_On_Death_Chance>0.2</Spin_Away_On_Death_Chance>
        <!-- How long do we spin?
        Not sure what the 'f' signifys. -->
        <Spin_Away_On_Death_Time>2.0f</Spin_Away_On_Death_Time>
        <!-- Explosion to play after we are done spinning -->
        <Spin_Away_On_Death_Explosion>Small_Explosion_Space</Spin_Away_On_Death_Explosion>
        <!-- Sound effect to play when we start spinning -->
        <Spin_Away_On_Death_SFXEvent_Start_Die>Unit_X_Wing_Spinning_By</Spin_Away_On_Death_SFXEvent_Start_Die>
        <!-- Do we remove this unit from the map when it is dead. -->
        <Remove_Upon_Death>true</Remove_Upon_Death>
        <!-- What is the distance that this unit can strafe for? -->
        <Strafe_Distance>500.0</Strafe_Distance>
        <!-- How much of the population cap does this unit take up -->
        <Population_Value>0</Population_Value>
    </SpaceUnit>

Now that we have the actual fighter done, we need to put them in a squadron. Add the following code to SQUADRONS.XML. Once again, all the explanation is in the comments in the code.
Code(SQUADRONS.XML):
<!-- All squadrons start with the <Squardron Name="%UNIT_NAME%">
    %UNIT_NAME% is what is used to reference this squadron in other files. -->
    <Squadron Name="ARC-170_Squadron">
        <!--The text used to signify this squadron ingame.
        Defined in MasterTextFile_ENGLISH.DAT -->
        <Text_ID>TEXT_ARC-170_SQUADRON</Text_ID>
        <!--Units this squadron is good against. Should be the same as your unit. -->
        <Encyclopedia_Good_Against> TIE_Fighter TIE_Bomber </Encyclopedia_Good_Against>
        <!-- Units this squadron is bad against. Should be the same as your unit -->
        <Encyclopedia_Vulnerable_To> Tartan_Patrol_Cruiser Broadside_Class_Cruiser IPV1_System_Patrol_Craft </Encyclopedia_Vulnerable_To>
        <!-- Which row does this unit show up in, in the GUI.
        The EaW Standard is units go in row 1, and buildings/upgrades in 2-->
        <GUI_Row> 1 </GUI_Row>
        <!-- Is this an actual unit, or just a container for other units.
        For squadrons you should always set this to Yes -->
        <Is_Dummy>Yes</Is_Dummy>
        <!-- Not a clue. Has somthing to do with formations -->
        <Formation_Priority>1</Formation_Priority>
        <!-- Is your squadron an escort? Should be the same as your unit.-->
        <Is_Escort>Yes</Is_Escort>
        <!-- Is your squadron an bomber? Should be the same as your unit.-->
        <Is_Bomber>no</Is_Bomber>
        <!-- How many hit points does this unit have during autoresolve.-->
        <Autoresolve_Health>300</Autoresolve_Health>
        <!-- How much damage does this squadron do? -->
        <Damage>25</Damage>
        <!-- What faction is this squadron used by? -->
        <Affiliation>Empire</Affiliation>
        <!-- How much this squadron affects political control-->
        <Political_Control>0</Political_Control>
        <!-- How much does this squadron cost to build -->
        <Build_Cost_Credits>400</Build_Cost_Credits>
        <!-- How long does this squadron take to build-->
        <Build_Time_Seconds>10</Build_Time_Seconds>
        <!-- Does this squadron show up in the space tab. -->
        <Build_Tab_Space_Units>Yes</Build_Tab_Space_Units>
        <!-- At the start of the game, can you build the unit.-->
        <Build_Initially_Locked>No</Build_Initially_Locked>
        <!-- Can we unlock the squadron through the use of a slicer?-->
        <Build_Can_Be_Unlocked_By_Slicer>No</Build_Can_Be_Unlocked_By_Slicer>
        <!-- What tech level do we need to be able to build this unit?-->
        <Tech_Level>1</Tech_Level>
        <!-- What events in the timeline have to happen before we can build this squad-->
        <Required_Timeline />
        <!-- What level of star base do we need to build this squadron?-->
        <Required_Star_Base_Level>1</Required_Star_Base_Level>
        <!-- What structures do we need to be able to build this squadron?-->
        <Required_Special_Structures />
        <!-- What behavior does this squadron use?
        Possibly defined in the LUA files. -->
        <Behavior>DUMMY_SPACE_FIGHTER_SQUADRON</Behavior>
        <Squadron_Units>ARC-170, ARC-170</Squadron_Units>
        <Squadron_Units>ARC-170</Squadron_Units>
        <Squadron_Offsets>30.0,0.0,0.0</Squadron_Offsets>
        <Squadron_Offsets>0.0,15.0,0.0</Squadron_Offsets>
        <Squadron_Offsets>0.0,-15.0,0.0</Squadron_Offsets>
        <Squadron_Offsets>-30.0,30.0,0.0</Squadron_Offsets>
        <Squadron_Offsets>-30.0,-30.0,0.0</Squadron_Offsets>
        <!-- What icon does this unit use. Defined in MTCOMMANDBAR.MTD-->
        <Icon_Name>i_button_x_wing.tga</Icon_Name>
        <!-- What model shows up in the GUI. Should be the same as the model used for the unit.-->
        <GUI_Model_Name>RV_xwing.ALO</GUI_Model_Name>
        <!--Not a clue -->
        <GUI_Distance>95</GUI_Distance>
        <!--Not a clue -->
        <GUI_Offset>0 0 0</GUI_Offset>
        <!--Not a clue -->
        <GUI_Velocity>45</GUI_Velocity>
        <!--Sound effects. Self explanitory. Defined in SFXEVENTS_____.XML-->
        <SFXEvent_Build_Started>RHD_Build_Vehicle</SFXEvent_Build_Started>
        <SFXEvent_Build_Cancelled>RHD_Unit_Canceled</SFXEvent_Build_Cancelled>
        <SFXEvent_Build_Complete>Unit_Complete_X_Wing</SFXEvent_Build_Complete>
        <!--Not a clue -->
        <FormationOrder>2</FormationOrder>
        <!--Not a clue -->
        <Squadron_Formation_Error_Tolerance>25.0</Squadron_Formation_Error_Tolerance>
        <!--When we are guarding another unit, how far will we go when chasing enemy units -->
        <Guard_Chase_Range>1000.0</Guard_Chase_Range>
        <!--When we aren't doing anything, how far will we chase enemy unis -->
        <Idle_Chase_Range>200.0</Idle_Chase_Range>
        <!--When atackmoving, how far away will we go to attack an enemy unit -->
        <Attack_Move_Response_Range>300.0</Attack_Move_Response_Range>
        <!-- Property flags for this squad.
        Defined in ENUM/GAMEOBJECTPROPERTIESTYPE.XML -->
        <Property_Flags> SmallShip </Property_Flags>
        <!--Not a clue -->
        <Autonomous_Move_Extension_Vs_Attacker>500.0</Autonomous_Move_Extension_Vs_Attacker>
        <!--The abilitys for this squadron Should be the same as the Unit_Abilities_Data block in your unit. -->
        <Unit_Abilities_Data SubObjectList="Yes">
            <Unit_Ability>
                <Type>SPOILER_LOCK</Type>           
                <Mod_Multiplier>WEAPON_DELAY_MULTIPLIER, 3.0f</Mod_Multiplier>
                <Mod_Multiplier>SHIELD_REGEN_MULTIPLIER, 1.0f</Mod_Multiplier>
                <Mod_Multiplier>ENERGY_REGEN_MULTIPLIER, 1.0f</Mod_Multiplier>
                <Mod_Multiplier>SPEED_MULTIPLIER, 1.5</Mod_Multiplier>
            </Unit_Ability>
        </Unit_Abilities_Data>
        <!--Tooltip to describe this squadron. Usualy the same as your unit's text
        Defined in MasterTextFile_ENGLISH.DAT -->
        <Encyclopedia_Text>TEXT_TOOLTIP_ARC-170</Encyclopedia_Text>
        <!-- The unit class for this squadron. Usualy the same as your unit.
        Defined in MasterTextFile_ENGLISH.DAT -->
        <Encyclopedia_Unit_Class> TEXT_ENCYCLOPEDIA_CLASS_FIGHTER </Encyclopedia_Unit_Class>
        <!-- How much does this unit cost in a tactical battle -->
        <Tactical_Build_Cost_Multiplayer>500</Tactical_Build_Cost_Multiplayer>
        <!-- How long does this unit take to build during a tactical battle -->
        <Tactical_Build_Time_Seconds>15</Tactical_Build_Time_Seconds>
        <!-- What prereqs does this unit need in a tactical battle
        Defined in UPGRADEOBJECT.XML -->
        <Tactical_Build_Prerequisites />
        <!-- Which production cue does this unit go into -->
        <Tactical_Production_Queue>Tactical_Units</Tactical_Production_Queue>
        <!-- How much of the population does this squadron take up-->
        <Population_Value>1</Population_Value>
        <!-- Not sure what this does -->
        <Score_Cost_Credits> 600</Score_Cost_Credits>
    </Squadron>

Finally, to have our unit buildable in skirmishes, we must add the squadron name to the list of buildable units for a starbase. In this example I want the ARC-170 to be built by the Level One imperial starbase only. Open STARBASES.XML and find this line:
Code:
<StarBase Name="Skirmish_Empire_Star_Base_1">
This is the starting tag for the level one imperial starbase. Inside of this StarBase entry you'll find
Code:
<Tactical_Buildable_Objects_Multiplayer>
All the buildable units for the empire are listed in this codeblock. To add our new ARC-170 squadron, add the squadron name right under the 'Empire,' entry. The Tactical_Buildable_Objects_Multiplayer block should now look like:
Code:
<Tactical_Buildable_Objects_Multiplayer> 
            Empire,
                ARC-170_Squadron,
                TIE_Fighter_Squadron,
                Tartan_Patrol_Cruiser,
                TIE_Bomber_Squadron,
                ES_Enhanced_Reactors_L1_Upgrade,
                ES_Reinforced_Armor_L1_Upgrade,
                ES_Level_Two_Starbase_Upgrade,
        </Tactical_Buildable_Objects_Multiplayer>
To have your squadron buildable at other starbase levels, add the squadron name to the corresponding StarBase Entries.

You must also add some strings to your master text file:
TEXT_UNIT_ARC-170 => 'ARC-170'
TEXT_TOOLTIP_ARC-170 => 'Versatile fighter armed with laser cannons and able to defeat enemy fighters. Can hyperspace without requiring a carrier ship. 5 fighters per squadron.'
TEXT_ARC-170_SQUADRON => 'ARC-170 Squadron'


If you need any more help feel free to contact me through the contact form on the website.

Link To This Tutorial: [tut=10]Adding a New Fighter Squadron[/tut]