Post tutorial Report RSS Tutorial: Good Times with the Rocket Ability

In this tutorial I will show you guys/gals how we can use the "Rocket Ability" to our advantage when modding EAW/FOC. Some of you might be wondering what is the "Rocket Attack Ability"? The answer is that it is the ability used by the T-4B to switch from it's main guns to use it's Rockets. This ability can be adapted to other units to do new things.

Posted by on - Intermediate Client Side Coding

Tutorial: Good Times with the Rocket Ability
By: rebel5555 (AKA Joshua R.)

In this tutorial I will show you guys/gals how we can use the "Rocket Ability" to our advantage when modding EAW/FOC. Some of you might be wondering what is the "Rocket Attack Ability"? The answer is that it is the ability used by the T-4B to switch from it's main guns to use it's Rockets. This ability can be adapted to other units to do new things.

Alrighty then. So, here we go. I'm using code from a modified B-wing from my personal mod. First I'm going to open SPACEUNITSFIGHTERS.XML & SQUADRONS.XML

SPACEUNITSFIGHTERS.XML

	<SpaceUnit Name="B_Wing">
		<Text_ID>RV_BWING_ID</Text_ID>
		<Encyclopedia_Unit_Class> TEXT_ENCYCLOPEDIA_CLASS_BOMBER </Encyclopedia_Unit_Class>
		<Encyclopedia_Text>RV_BWING_TEXT</Encyclopedia_Text>
		<Encyclopedia_Good_Against> Executor_Stardestroyer ISD2 Star_Destroyer </Encyclopedia_Good_Against>
		<Encyclopedia_Vulnerable_To> Imperial_Missleboat TIE_Avenger TIE_Defender </Encyclopedia_Vulnerable_To>
		<Space_Model_Name>rv_bwing.alo</Space_Model_Name>
		<Scale_Factor>0.38</Scale_Factor>
		<Select_Box_Scale>70</Select_Box_Scale>
		<Select_Box_Z_Adjust>1.0f</Select_Box_Z_Adjust>
		<Mouse_Collide_Override_Sphere_Radius> 50.0 </Mouse_Collide_Override_Sphere_Radius>
		<Dense_FOW_Reveal_Range_Multiplier>0.2</Dense_FOW_Reveal_Range_Multiplier>
		<Mass>0.98</Mass>
		<Max_Speed>4.6</Max_Speed>
		<Min_Speed>1.5</Min_Speed>
		<Max_Rate_Of_Turn>2.0</Max_Rate_Of_Turn>
		<Max_Thrust>1.0</Max_Thrust>
		<Max_Rate_Of_Roll>2.5</Max_Rate_Of_Roll>
		<Bank_Turn_Angle>50</Bank_Turn_Angle>
		<Begin_Turn_Towards_Distance>300.0</Begin_Turn_Towards_Distance>
		<Fires_Forward>no</Fires_Forward>
		<Turret_Rotate_Extent_Degrees>20</Turret_Rotate_Extent_Degrees>
		<Turret_Elevate_Extent_Degrees>40</Turret_Elevate_Extent_Degrees>
		<Hyperspace>Yes</Hyperspace>
		<Hyperspace_Speed>0.6</Hyperspace_Speed>
		<Maintenance_Cost>0.1</Maintenance_Cost>
		<Max_Lift>4</Max_Lift>
		<Affiliation>Rebel</Affiliation>
		<Required_Ground_Base_Level>0</Required_Ground_Base_Level>
		<Required_Star_Base_Level>1</Required_Star_Base_Level>
		<Shield_Points>100</Shield_Points>
		<Tactical_Health>120</Tactical_Health>
		<Shield_Refresh_Rate>10</Shield_Refresh_Rate>
		<Energy_Capacity>1000</Energy_Capacity>
		<Energy_Refresh_Rate>500</Energy_Refresh_Rate>
		<Armor_Type> Armor_Fighter </Armor_Type>
        <Shield_Armor_Type>Shield_Fighter</Shield_Armor_Type>
		<Ranged_Target_Z_Adjust>0</Ranged_Target_Z_Adjust>
		<Ship_Class>bomber</Ship_Class>
		<Formation_Priority>1</Formation_Priority>
		<Is_Escort>No</Is_Escort>
		<Is_Bomber>Yes</Is_Bomber>
		<Political_Control>0</Political_Control>
		<Squadron_Capacity>0</Squadron_Capacity>
		<Number_per_Squadron>6</Number_per_Squadron>
		<Build_Cost_Credits>60</Build_Cost_Credits>
		<Build_Time_Seconds>15</Build_Time_Seconds>
		<Size_Value>4</Size_Value>
		<Land_Bomber_Type>B_Wing_Bombing_Run</Land_Bomber_Type>		
		<SpaceBehavior>HUNT, ABILITY_COUNTDOWN, FIGHTER_LOCOMOTOR, SELECTABLE, TARGETING, WEAPON, POWERED, SHIELDED, HIDE_WHEN_FOGGED, AMBIENT_SFX, DAMAGE_TRACKING, REVEAL, NEBULA </SpaceBehavior>			
		<Collidable_By_Projectile_Living>Yes</Collidable_By_Projectile_Living>
		<Damage>7</Damage>
		<Land_FOW_Reveal_Range>130.0</Land_FOW_Reveal_Range>
		<Space_FOW_Reveal_Range>600.0</Space_FOW_Reveal_Range>
		<Targeting_Max_Attack_Distance>500.0</Targeting_Max_Attack_Distance>
		<Death_Explosions>Small_Explosion_Space</Death_Explosions>
		<Death_SFXEvent_Start_Die>Unit_A_Wing_Death_SFX</Death_SFXEvent_Start_Die>
		<Asteroid_Damage_Hit_Particles>Small_Damage_Space</Asteroid_Damage_Hit_Particles>
		<Hardpoints>
			HP_BWING_ION,
			HP_Bwing_Lasers,
			HP_BWING_Torpedo
		</Hardpoints>
		<SFXEvent_Fire>Unit_A_Wing_Fire</SFXEvent_Fire>
		<SFXEvent_Select>Unit_Select_A_Wing</SFXEvent_Select>
		<SFXEvent_Move>Unit_Move_A_Wing</SFXEvent_Move>
		<SFXEvent_Fleet_Move>Unit_Fleet_Move_A_Wing</SFXEvent_Fleet_Move>
		<SFXEvent_Attack>Unit_Attack_A_Wing</SFXEvent_Attack>
		<SFXEvent_Guard>Unit_Guard_A_Wing</SFXEvent_Guard>
		<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_LASER, Unit_HP_LASER_A_Wing </SFXEvent_Attack_Hardpoint>
		<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_MISSILE, Unit_HP_MISSILE_A_Wing </SFXEvent_Attack_Hardpoint>
		<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_TORPEDO, Unit_HP_TORP_A_Wing </SFXEvent_Attack_Hardpoint>
		<SFXEvent_Attack_Hardpoint> HARD_POINT_WEAPON_ION_CANNON, Unit_HP_ION_A_Wing </SFXEvent_Attack_Hardpoint>
		<SFXEvent_Attack_Hardpoint> HARD_POINT_SHIELD_GENERATOR, Unit_HP_SHIELDS_A_Wing </SFXEvent_Attack_Hardpoint>
		<SFXEvent_Attack_Hardpoint> HARD_POINT_ENGINE, Unit_HP_ENGINES_A_Wing </SFXEvent_Attack_Hardpoint>
		<SFXEvent_Attack_Hardpoint> HARD_POINT_GRAVITY_WELL, Unit_HP_GRAV_A_Wing </SFXEvent_Attack_Hardpoint>
		<SFXEvent_Health_Low_Warning> Unit_Health_Low_A_Wing </SFXEvent_Health_Low_Warning>
		<SFXEvent_Health_Critical_Warning> Unit_Health_Critical_A_Wing </SFXEvent_Health_Critical_Warning>
		<SFXEvent_Enemy_Damaged_Health_Low_Warning> Unit_Enemy_Health_Low_A_Wing </SFXEvent_Enemy_Damaged_Health_Low_Warning>
		<SFXEvent_Enemy_Damaged_Health_Critical_Warning> Unit_Enemy_Health_Critical_A_Wing </SFXEvent_Enemy_Damaged_Health_Critical_Warning>
		<SFXEvent_Ambient_Moving> Unit_A_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_A_Wing_Cinematic_Engine_Loop </SFXEvent_Engine_Cinematic_Focus_Loop>
		<CategoryMask> Bomber | AntiCapital | Fighter | AntiBomber</CategoryMask>
		<Property_Flags> SmallShip </Property_Flags>
		<Icon_Name>I_BUTTON_RV_BWING.TGA</Icon_Name>
		<Victory_Relevant>yes</Victory_Relevant>
		<Air_Vehicle_Turret_Target> Yes </Air_Vehicle_Turret_Target>		
		<Is_Visible_On_Radar>Yes</Is_Visible_On_Radar>
		<Custom_Footprint_Radius> 7.0 </Custom_Footprint_Radius>
		<MovementClass> Space </MovementClass>
		<FormationOrder>1</FormationOrder>
		<Out_Of_Combat_Defense_Adjustment>-1.0</Out_Of_Combat_Defense_Adjustment>
		<Minimum_Follow_Distance>25.0</Minimum_Follow_Distance>
		<Create_Team>Yes</Create_Team>
		<AI_Combat_Power>80</AI_Combat_Power>
		<Collision_Box_Modifier>2.0</Collision_Box_Modifier>
		<Targeting_Priority_Set>Bomber</Targeting_Priority_Set>		
		<Targeting_Stickiness_Time_Threshold>5.0</Targeting_Stickiness_Time_Threshold>
		
		<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,	3.0f</Mod_Multiplier>
				<Mod_Multiplier>ENERGY_REGEN_MULTIPLIER,	3.0f</Mod_Multiplier>
				<Mod_Multiplier>SPEED_MULTIPLIER,		            1.5</Mod_Multiplier>
				<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_Ability>
				<Type>ROCKET_ATTACK</Type>
			</Unit_Ability>
		</Unit_Abilities_Data>
		
		<Spin_Away_On_Death>Yes</Spin_Away_On_Death>
		<Spin_Away_On_Death_Chance>0.2</Spin_Away_On_Death_Chance>
		<Spin_Away_On_Death_Time>2.0f</Spin_Away_On_Death_Time>
		<Spin_Away_On_Death_Explosion>Small_Explosion_Space</Spin_Away_On_Death_Explosion>
		<Spin_Away_On_Death_SFXEvent_Start_Die>Unit_A_Wing_Spinning_By</Spin_Away_On_Death_SFXEvent_Start_Die>
		<Remove_Upon_Death>true</Remove_Upon_Death>		
		<Strafe_Distance>500.0</Strafe_Distance>
		<Population_Value>0</Population_Value>	
	</SpaceUnit>

SQUADRONS.XML

	<Squadron Name="Rebel_B_Wing_Squadron">
		<Text_ID>RV_BWING_SQUAD_ID</Text_ID>
		<Encyclopedia_Good_Against> Executor_Stardestroyer ISD2 Star_Destroyer </Encyclopedia_Good_Against>
		<Encyclopedia_Vulnerable_To> Imperial_Missleboat TIE_Avenger TIE_Defender </Encyclopedia_Vulnerable_To>
		<GUI_Row> 1 </GUI_Row>
		<Is_Dummy>Yes</Is_Dummy>
		<Formation_Priority>1</Formation_Priority>
		<Is_Escort>No</Is_Escort>
		<Is_Bomber>Yes</Is_Bomber>
		<Autoresolve_Health>500</Autoresolve_Health>
		<Damage>40</Damage>
		<Affiliation>Rebel</Affiliation>
		<Political_Control>0</Political_Control>
		<Build_Cost_Credits>800</Build_Cost_Credits>
		<Build_Time_Seconds>25</Build_Time_Seconds>
		<Build_Tab_Heroes>Yes</Build_Tab_Heroes>
		<Tech_Level>3</Tech_Level>
		<Required_Timeline />
		<Required_Star_Base_Level>1</Required_Star_Base_Level>
		<Required_Special_Structures />
		<Behavior>DUMMY_SPACE_FIGHTER_SQUADRON</Behavior>
		<Squadron_Units>B_Wing, B_Wing</Squadron_Units>
		<Squadron_Units>B_Wing, B_Wing</Squadron_Units>
		<Squadron_Units>B_Wing, B_Wing</Squadron_Units>
		<Squadron_Offsets>15.0,15.0,0.0</Squadron_Offsets>
		<Squadron_Offsets>15.0,-15.0,0.0</Squadron_Offsets>
		<Squadron_Offsets>15.0,90.0,0.0</Squadron_Offsets>
		<Squadron_Offsets>15.0,-90.0,0.0</Squadron_Offsets>
		<Squadron_Offsets>0.0,30.0,0.0</Squadron_Offsets>
		<Squadron_Offsets>0.0,-30.0,0.0</Squadron_Offsets>
		<Max_Squad_Size> 6 </Max_Squad_Size>
		<Icon_Name>I_BUTTON_RV_BWING.TGA</Icon_Name>
		<GUI_Model_Name>RV_Bwing.ALO</GUI_Model_Name>
		<GUI_Distance>95</GUI_Distance>
		<GUI_Offset>0 0 0</GUI_Offset>
		<GUI_Velocity>45</GUI_Velocity>

		<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>

		<FormationOrder>2</FormationOrder>
		<Squadron_Formation_Error_Tolerance>25.0</Squadron_Formation_Error_Tolerance>
		<Guard_Chase_Range>1000.0</Guard_Chase_Range>
		<Idle_Chase_Range>200.0</Idle_Chase_Range>
		<Attack_Move_Response_Range>300.0</Attack_Move_Response_Range>
		<Property_Flags> SmallShip </Property_Flags>
		<Autonomous_Move_Extension_Vs_Attacker>500.0</Autonomous_Move_Extension_Vs_Attacker>
	
		<Unit_Abilities_Data SubObjectList="Yes">
			<Unit_Ability>
				<Type>SPOILER_LOCK</Type>
				<Mod_Multiplier>WEAPON_DELAY_MULTIPLIER,	9.0f</Mod_Multiplier>
				<Mod_Multiplier>SHIELD_REGEN_MULTIPLIER,	0.1f</Mod_Multiplier>
				<Mod_Multiplier>ENERGY_REGEN_MULTIPLIER,	0.1f</Mod_Multiplier>
				<Mod_Multiplier>SPEED_MULTIPLIER,		            1.5</Mod_Multiplier>
				<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_Ability>
				<Type>ROCKET_ATTACK</Type>
			</Unit_Ability>
		</Unit_Abilities_Data>
		
		<Encyclopedia_Text>RV_BWING_TEXT</Encyclopedia_Text>
		<Encyclopedia_Unit_Class> TEXT_ENCYCLOPEDIA_CLASS_FIGHTER </Encyclopedia_Unit_Class>
		
		<!--<MULTIPLAYER SKIRMISH VALUES BEGIN>-->
		<Tactical_Build_Cost_Multiplayer>900</Tactical_Build_Cost_Multiplayer>
		<Tactical_Build_Time_Seconds>30</Tactical_Build_Time_Seconds>
		<Tactical_Build_Prerequisites />
		<Tactical_Production_Queue>Tactical_Units</Tactical_Production_Queue>
		<!--<Build_Limit_Current_Per_Player>0</Build_Limit_Current_Per_Player>-->
		<!--<Build_Limit_Lifetime_Per_Player>0</Build_Limit_Lifetime_Per_Player>-->  
		<!--<MULTIPLAYER SKIRMISH VALUES END>-->
		<Population_Value>1</Population_Value>
		<Score_Cost_Credits> 600</Score_Cost_Credits>
	</Squadron>

If you looked through my code very closely you should of seen some the below code in both files.

			<Unit_Ability>
				<Type>ROCKET_ATTACK</Type>
			</Unit_Ability>

That code is for the "Rocket Attack Ability" What this code does is set up the Special ability button, however we can not use the ability yet as we haven't told the game what weapon will we be using when we turn the button on/off.

Now I'm going to open HARDPOINTS.XML to tell the game what weapon to use when the abilities button is turned on/off.

HARDPOINTS.XML

   <HardPoint Name="HP_BWING_ION">
			<Type> HARD_POINT_WEAPON_ION_CANNON </Type>
            <Is_Targetable>No</Is_Targetable>
            <Is_Destroyable>No</Is_Destroyable>

            <Fire_Bone_A>MuzzleA_00</Fire_Bone_A>
            <Fire_Bone_B>MuzzleA_01</Fire_Bone_B>
			<Fire_Bone_B>MuzzleA_02</Fire_Bone_B>
			<Fire_Bone_B>MuzzleA_03</Fire_Bone_B>
            <Fire_Cone_Width>90.0</Fire_Cone_Width>
            <Fire_Cone_Height>90.0</Fire_Cone_Height>
            <Fire_Projectile_Type>Proj_Ship_Ion_Cannon_Bwing</Fire_Projectile_Type>
            <Fire_Min_Recharge_Seconds>1.0</Fire_Min_Recharge_Seconds>
            <Fire_Max_Recharge_Seconds>2.0</Fire_Max_Recharge_Seconds>
            <Fire_Pulse_Count>3</Fire_Pulse_Count>
            <Fire_Pulse_Delay_Seconds>0.25</Fire_Pulse_Delay_Seconds>
            <Fire_Range_Distance>900.0</Fire_Range_Distance>
			<Fire_SFXEvent>Unit_Ion_Fire</Fire_SFXEvent>

			<Damage_Type> Damage_IonCannon </Damage_Type>

			<Fire_Inaccuracy_Distance> Fighter, 2.0 </Fire_Inaccuracy_Distance>
			<Fire_Inaccuracy_Distance> Bomber, 2.0 </Fire_Inaccuracy_Distance>
			<Fire_Inaccuracy_Distance> Transport, 2.0 </Fire_Inaccuracy_Distance>
			<Fire_Inaccuracy_Distance> Corvette, 10.0 </Fire_Inaccuracy_Distance>
			<Fire_Inaccuracy_Distance> Frigate, 1.0 </Fire_Inaccuracy_Distance>
			<Fire_Inaccuracy_Distance> Capital, 1.0 </Fire_Inaccuracy_Distance>
			<Fire_Inaccuracy_Distance> Super, 30.0 </Fire_Inaccuracy_Distance>

			<Fire_When_In_Rocket_Attack_Mode>Yes</Fire_When_In_Rocket_Attack_Mode>
			<Fire_When_In_Normal_Attack_Mode>No</Fire_When_In_Normal_Attack_Mode>
	</HardPoint>

	    <HardPoint Name="HP_Bwing_Lasers">
			<Type> HARD_POINT_WEAPON_LASER </Type>
            <Is_Targetable>No</Is_Targetable>
            <Is_Destroyable>No</Is_Destroyable>

            <Fire_Bone_A>MuzzleA_00</Fire_Bone_A>
            <Fire_Bone_B>MuzzleA_01</Fire_Bone_B>
			<Fire_Bone_C>MuzzleA_02</Fire_Bone_C>
			<Fire_Bone_C>MuzzleA_03</Fire_Bone_C>
			<Fire_Cone_Width>20.0</Fire_Cone_Width>
            <Fire_Cone_Height>20.0</Fire_Cone_Height>
            <Fire_Projectile_Type>Proj_Ship_Small_Laser_Cannon_E_Wing</Fire_Projectile_Type>
            <Fire_Min_Recharge_Seconds>0.5</Fire_Min_Recharge_Seconds>
            <Fire_Max_Recharge_Seconds>0.5</Fire_Max_Recharge_Seconds>
            <Fire_Pulse_Count>6</Fire_Pulse_Count>
            <Fire_Pulse_Delay_Seconds>0.2</Fire_Pulse_Delay_Seconds>
            <Fire_Range_Distance>500.0</Fire_Range_Distance>
			<Fire_SFXEvent>Unit_Rebel_Ship_Laser_Fire</Fire_SFXEvent>

			<Damage_Type> Damage_Fighter </Damage_Type>

			<Fire_Inaccuracy_Distance> Fighter, 2.5 </Fire_Inaccuracy_Distance>
			<Fire_Inaccuracy_Distance> Bomber, 1.5 </Fire_Inaccuracy_Distance>
			<Fire_Inaccuracy_Distance> Transport, 2.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>
			
			<Fire_When_In_Rocket_Attack_Mode>No</Fire_When_In_Rocket_Attack_Mode>
			<Fire_When_In_Normal_Attack_Mode>Yes</Fire_When_In_Normal_Attack_Mode>
	</HardPoint>


	<HardPoint Name="HP_BWING_Torpedo">
    	<Type> HARD_POINT_WEAPON_TORPEDO </Type>
    	<Is_Targetable>No</Is_Targetable>
    	<Is_Destroyable>No</Is_Destroyable>
    	<Damage_Type> Damage_Proton_Torp </Damage_Type>

    	<Fire_Bone_A>MuzzleB_00</Fire_Bone_A>
    	<Fire_Bone_B>MuzzleB_01</Fire_Bone_B>
    	<Fire_Cone_Width>30.0</Fire_Cone_Width>
    	<Fire_Cone_Height>30.0</Fire_Cone_Height>
    	<Fire_Projectile_Type>Proj_Ship_Proton_Torpedo_Fighter</Fire_Projectile_Type>
    	<Fire_Min_Recharge_Seconds>8.0</Fire_Min_Recharge_Seconds>
    	<Fire_Max_Recharge_Seconds>8.0</Fire_Max_Recharge_Seconds>
    	<Fire_Pulse_Count>6</Fire_Pulse_Count>
    	<Fire_Pulse_Delay_Seconds>0.3</Fire_Pulse_Delay_Seconds>
    	<Fire_Range_Distance>300.0</Fire_Range_Distance>
    	<Fire_SFXEvent>Unit_Torpedo_Fire</Fire_SFXEvent>

    	<Fire_Category_Restrictions> Fighter, Bomber </Fire_Category_Restrictions>
    	<Allow_Opportunity_Fire_When_Targeting>False</Allow_Opportunity_Fire_When_Targeting>
    	<Allow_Opportunity_Fire_When_Idle>False</Allow_Opportunity_Fire_When_Idle>
  		
		<Fire_When_In_Rocket_Attack_Mode>No</Fire_When_In_Rocket_Attack_Mode>
		<Fire_When_In_Normal_Attack_Mode>Yes</Fire_When_In_Normal_Attack_Mode>
    </HardPoint>

Again, if you looked through my code very closely you should of seen the below lines of code.

<Fire_When_In_Rocket_Attack_Mode>Yes</Fire_When_In_Rocket_Attack_Mode>	<Fire_When_In_Normal_Attack_Mode>No</Fire_When_In_Normal_Attack_Mode>

and this

<Fire_When_In_Rocket_Attack_Mode>No</Fire_When_In_Rocket_Attack_Mode>	
<Fire_When_In_Normal_Attack_Mode>Yes</Fire_When_In_Normal_Attack_Mode>

This particular pieces of code tells the game that when the "Rocket Attack Ability" is turned off the B-wing fires it's Laser Cannons and Proton Torpedoes. However, when the "Rocket Attack Ability" is turned on the B-wing only Fires it's Ion Cannons. Pretty neat huh.

This ability can be used to have a vehicle switch from AA fire to Ground fire, have a vehicle switch from Anti-Tank fire to Anti-Infantry fire, etc.

I hope you guys/gals have enjoyed another of my series of tutorials. Now children just remember to be patient when you're modifying code because shit happens sometimes and we have all wanted to throw are computers out the window several times at one time or another.

Have Fun and Godspeed,
Rebel5555 (AKA joshua R.)

Post comment Comments
rebel5555 Author
rebel5555

If you need any help following this tutorial or want to post any feedback please feel free to leave me a comment or send me a pm.

Reply Good karma+1 vote
Spinobreaker
Spinobreaker

aaaah.... thanks ive been wondering about this...

Reply Good karma Bad karma+1 vote
mattcat83
mattcat83

Could you use this trick or similar tricks to give S-Foils' Spoiler_Lock ability to units that don't have it? I'm trying to give S-Foils to the E-Wing unit from AEM 5.1 in addition to Lure. The AI's path-finding is just too dumb for the Hunt ability to be effective.

Reply Good karma Bad karma+1 vote
mattcat83
mattcat83

I'm also trying to give the AT-ST's Barrage ability to all ground artillery as well.

Reply Good karma Bad karma+1 vote
rossy1605
rossy1605

hey mate
love the tutorial I'm new to modding this game and they are really helping me, I'm trying to find out how to get fighters to respawn ive looked through mmost files but cant seem to find out how to do it any help would be appreciated :)

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: