First of all, hello and welcome to the EAW filefront forums.
If you have not already extracated or downloaded the EAW XML files, you can find them here:
http://empireatwar.filefront.com/fil...ML_Files;61877
If you are modding for the FOC expansion, get these instead:
http://empireatwar.filefront.com/file/FOC_XMLs;76367
Also, depending on how much modding you will be doing, it might be worth the time to download 'Notepad++', I find it makes modding much easier. (However Notepad that comes with Windows will work fine)
The files we will be editing/looking at are: 'Spaceunitsfighters.xml', 'Squadrons.xml' and 'UniqueUnits.xml'
DONT GO COPYING UNIT ABILITY INFORMATION DIRECTLY FROM THIS POST - THERE MAY BE TYPOS THAT WILL STOP THIS WORKING PROPERLY
First: open 'UniqueUnits.xml' and, using the 'find' function, look for 'Veers'.
It should bring you to this:
'<!-- This special AT-AT is used by General Maximillian Veers (Empire Major Hero) during ground battles -->'
Then, scroll down until you find this:
(Copy and paste it somwhere, you will need this later)
<Unit_Ability>
<Type>MAXIMUM_FIREPOWER</Type>
<Expiration_Seconds>1</Expiration_Seconds>
<Recharge_Seconds>70</Recharge_Seconds>
<Mod_Multiplier>WEAPON_DELAY_MULTIPLIER, 0.0f</Mod_Multiplier> <!-- no delay, fire continuously -->
<GUI_Activated_Ability_Name>AT_AT_Maximum_Firepowe r_Attack</GUI_Activated_Ability_Name> <!-- GUI Command Bar support -->
<Projectile_Types_Override>Proj_Veers_AT_AT_Max_Po wer_Laser_Red</Projectile_Types_Override>
<Mod_Flag>ALLOW_TARGET_DIMINISHING_FIREPOWER, false</Mod_Flag>
<SFXEvent_GUI_Unit_Ability_Activated>Unit_Activate _Energy_Blast_Veers</SFXEvent_GUI_Unit_Ability_Activated>
<SFXEvent_Target_Ability> Unit_Target_Energy_Blast_Veers </SFXEvent_Target_Ability>
<Supports_Autofire>True</Supports_Autofire>
</Unit_Ability>
Now, open up 'Spaceunitsfighters.xml' and 'find' this:
<SpaceUnit Name="X-Wing">
then scroll down until you find this section:
<Unit_Abilities_Data SubObjectList="Yes">
<!-- Primary ability -->
<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.3</Mod_Multiplier>
<SFXEvent_GUI_Unit_Ability_Activated>Unit_Ability_ On_X_Wing</SFXEvent_GUI_Unit_Ability_Activated>
<SFXEvent_GUI_Unit_Ability_Deactivated>Unit_Abilit y_Off_X_Wing</SFXEvent_GUI_Unit_Ability_Deactivated>
</Unit_Ability>
</Unit_Abilities_Data>
As you can see this is where the X-wing's 'Spoiler Lock' ability is controlled from.
Now, using the information you copied from 'UniqueUnits' earlier, make the above section look like this in the Spaceunitsfighters.xml:
<Unit_Abilities_Data SubObjectList="Yes">
<!-- Primary ability -->
<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.3</Mod_Multiplier>
<SFXEvent_GUI_Unit_Ability_Activated>Unit_Ability_ On_X_Wing</SFXEvent_GUI_Unit_Ability_Activated>
<SFXEvent_GUI_Unit_Ability_Deactivated>Unit_Abilit y_Off_X_Wing</SFXEvent_GUI_Unit_Ability_Deactivated>
</Unit_Ability>
<Unit_Ability>
<Type>MAXIMUM_FIREPOWER</Type>
<Expiration_Seconds>3</Expiration_Seconds>
<Recharge_Seconds>30</Recharge_Seconds>
<Mod_Multiplier>WEAPON_DELAY_MULTIPLIER, 0.5f</Mod_Multiplier>
<GUI_Activated_Ability_Name>AT_AT_Maximum_Firepowe r_Attack</GUI_Activated_Ability_Name> <!-- GUI Command Bar support -->
<Projectile_Types_Override>Proj_Ship_Proton_Torped o_Light</Projectile_Types_Override>
<Mod_Flag>ALLOW_TARGET_DIMINISHING_FIREPOWER, false</Mod_Flag>
<SFXEvent_GUI_Unit_Ability_Activated>Unit_Activate _Energy_Blast_Veers</SFXEvent_GUI_Unit_Ability_Activated>
<SFXEvent_Target_Ability> Unit_Target_Energy_Blast_Veers </SFXEvent_Target_Ability>
<Supports_Autofire>False</Supports_Autofire>
</Unit_Ability>
</Unit_Abilities_Data>
Now, as you can see, I have made some slight alterations to the original code:
<Projectile_Types_Override>Proj_Ship_Proton_Torped o_Light</Projectile_Types_Override> - Tells the ship to fire torpedoes.
<Mod_Multiplier>WEAPON_DELAY_MULTIPLIER, 0.5f</Mod_Multiplier> - Makes it fire at half the rate of the X-wings lasers.
<Expiration_Seconds>3</Expiration_Seconds> - The torps will fire for 3 seconds.
<Recharge_Seconds>30</Recharge_Seconds> - It needs to be recharged for 30 seconds.
<Supports_Autofire>False</Supports_Autofire> - You need to tell it to fire.
Now, open 'Squadrons.xml', and the X-wing section should be right at the top.
Scroll down to the spoiler lock section and add in the same information we added before.
I am pretty sure this will work, if it doesn't, or you need better instructions, let me know.
When done like this, the X-wing won't be able to fire lasers while it's firing torps. If that it as problem, it can only be overcome by adding hardpoints.
If you would like to do this, let me know and I will talk you through it. (Or you could download my starfighter mod 'Doug's Starfighter Mod', it's for FOC, but it does this)
Also, the description for this torp ability will be the same as the 'Maximum firepower' ability. If you want this changed, let me know and I'll talk you through it.
Finally, you have to build the mod:
You need a folder structure like this:
Mod_Name/Data/XML
(The mod name CANNOT have spaces in it otherwise it won't work)
Into the 'XML' folder, you put the XML files we just modified. (Spacenitsfighters and Squadrons)
Now you need to put the folder 'Mod_Name' into your 'Mods' folder. (If the 'Mods' folder doesnt exist, create it)
If your modding the FOC expansion:
'Star Wars Empire at War Forces of Corruption\Mods'
If your modding the original EAW:
'Star Wars Empire at War\GameData\Mods' (I think - I've never done one for the original EAW)
Finally, you can either:
create a shortcut (Complicated)
or
download the Mod launcher (Easy)
http://empireatwar.filefront.com/fil...cher_Zip;96444
Some people have had trouble with the mod launcher not working. If this is the case with you, I'll try and show you how to do Modpaths or .bat files.
Also, I find it easier to save my edited files to the desktop or the my documents folder, as I have Win7 and it doesn't like me saving in other places.