Adding abilities to units - need help -1 reply

Please wait...

Hi guys I am new here and I was thinking in editing the x-wings in the game, giving then an ability buttom to allow then to launch proton torpedos.

The idea is to allow x-wings to do the same as the y-wings but only that they will need to activate the ability and after using it they will need to recharge it (similar to the y-wings ion cannon ability).

xt255641;5626136Hi guys I am new here and I was thinking in editing the x-wings in the game, giving then an ability buttom to allow then to launch proton torpedos.

The idea is to allow x-wings to do the same as the y-wings but only that they will need to activate the ability and after using it they will need to recharge it (similar to the y-wings ion cannon ability).

I just need to know where to look for the files and how to edit it.

Any help?

I would suggest spacefighters.xml, squadrons.xml, and containers.xml, and look at the Y-wing entries... I could probably code it myself - another way of adding torpedoes is adding hardpoints (But this would be more like a regular bomber than a special ability)

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/file/EAW_XML_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:
''
Then, scroll down until you find this:
(Copy and paste it somwhere, you will need this later)
MAXIMUM_FIREPOWER170WEAPON_DELAY_MULTIPLIER, 0.0fAT_AT_Maximum_Firepower_AttackProj_Veers_AT_AT_Max_Power_Laser_RedALLOW_TARGET_DIMINISHING_FIREPOWER, falseUnit_Activate_Energy_Blast_Veers Unit_Target_Energy_Blast_Veers True
Now, open up 'Spaceunitsfighters.xml' and 'find' this:
then scroll down until you find this section:
SPOILER_LOCKWEAPON_DELAY_MULTIPLIER, 3.0fSHIELD_REGEN_MULTIPLIER, 3.0fENERGY_REGEN_MULTIPLIER, 3.0fSPEED_MULTIPLIER, 1.3Unit_Ability_On_X_WingUnit_Ability_Off_X_Wing
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:
SPOILER_LOCKWEAPON_DELAY_MULTIPLIER, 3.0fSHIELD_REGEN_MULTIPLIER, 3.0fENERGY_REGEN_MULTIPLIER, 3.0fSPEED_MULTIPLIER, 1.3Unit_Ability_On_X_WingUnit_Ability_Off_X_WingMAXIMUM_FIREPOWER330WEAPON_DELAY_MULTIPLIER, 0.5fAT_AT_Maximum_Firepower_AttackProj_Ship_Proton_Torpedo_LightALLOW_TARGET_DIMINISHING_FIREPOWER, falseUnit_Activate_Energy_Blast_Veers Unit_Target_Energy_Blast_Veers False
Now, as you can see, I have made some slight alterations to the original code:
Proj_Ship_Proton_Torpedo_Light - Tells the ship to fire torpedoes.
WEAPON_DELAY_MULTIPLIER, 0.5f - Makes it fire at half the rate of the X-wings lasers.
3 - The torps will fire for 3 seconds.
30 - It needs to be recharged for 30 seconds.
False - 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/file/SMGMOD_Launcher_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.

As I said, I THINK it will work......It should work.......Most probably will work. :uhm:
Basically, all Veers's mega shot does is over-ride his normal laser weapon and gives him a big one that does more damge. So it should {In theory} work for anything that doesn't use hardpoints for its weapons.
When I was giving my X-wings torpedos before, I never thought of doing it as an ability, I just went straight to doing hardpoints.
Or were you talking about someone actually making you read a long post? :lulz:

AUS_Doug;5626910As I said, I THINK it will work......It should work.......Most probably will work. :uhm:
Basically, all Veers's mega shot does is over-ride his normal laser weapon and gives him a big one that does more damge. So it should {In theory} work for anything that doesn't use hardpoints for its weapons.
When I was giving my X-wings torpedos before, I never thought of doing it as an ability, I just went straight to doing hardpoints.
Or were you talking about someone actually making you read a long post? :lulz:

Just a question: How much damage this will do?

I am asking that because my intention has to give rebel players a tactical element by allowing x-wings to do "bombing runs", although needing a activation buttom, and thus help into fighting the empire units.

Dont know if anyone noticed but the AI of the game makes the use of fighters against the empire a nightmare because it always construct patrol cruisers and broadside launchers for its fleet and with the exception of the y-wing, the x-wings and the A-wings are sitting ducks in an actual fight thanks to that and their low damage (reasonable I must add) against capital ships as a whole.

Also even if you build a great fleet with lots of anti-capital ships vessels, if you place fighters in the middle of it when you enter battle the majority of the fleet will be composed of fighters... can you see the pattern?

My second question is about the buttom icon. How I make so that the icon used is the one for the ion cannon used in the y-wings? its the more close icon I have see to the proton torpedoes (it appear like a little comet)

The amount of damage it will do will be somewhat less than the damage dealt by the torpedo from a true bomber.
This is because the bombes use a more powerful torpedo.
If you remove the '_light' bit from the override projectile line, they will have the same torp as a proper bomber.
As for changing the icon, it can be done, but I don't have access to my pc at the moment, so I cannot be sure of the line you would use.
If you feel like looking, it is in the code for Admiral Thrawn's power to weapons ability. (It's something like 'Alternate_Icon' I think)
But I'll have a look myself later on.

Ok, I was not able to get it to work using Veers's mega shot as a template, nor could I get it basing it off of the Y-wings/TIE-Defenders Ion cannon shot.
What I was able to do however was this:
SPOILER_LOCK[COLOR=red]WEAPON_DELAY_MULTIPLIER, 3.0[/COLOR]SHIELD_REGEN_MULTIPLIER, 1.0fENERGY_REGEN_MULTIPLIER, 1.0fSPEED_MULTIPLIER, 2[COLOR=red]Proj_Ship_Proton_Torpedo_Light[/COLOR][COLOR=red]10[/COLOR][COLOR=red]30[/COLOR]
Basically, this means that when the X-wings have activated their S-Foil ability, they will fire torpedos instead of lasers. (The red text indicates what is different from the original spoiler code - make these changes to the original code and you should be set)
This is the best I can do for you without creating hardpoints.
I think if you fiddled with containers you might be able to make it work the way I first suggested.
Problem is, every time I touch containers I break something, so you're gonna have to find someone else to help with that.

Interact

About

DBolical

GameFront

The best serving of video game culture, since 1998. Whether you're looking for the biggest collection of PC gaming files on the planet, tools, tips or advice, GameFront has you covered. Browse through over 145,000 mods, maps, tools and more. Game on!