FileFront Forums

FileFront Forums (http://forums.filefront.com/)
-   SW:EaW Modding, Mapping and Editing (http://forums.filefront.com/sw-eaw-modding-mapping-editing-1099/)
-   -   Adding abilities to units - need help (http://forums.filefront.com/sw-eaw-modding-mapping-editing/445596-adding-abilities-units-need-help.html)

xt255641 March 25th, 2012 04:19 PM

Adding abilities to units - need help
 
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).

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

Any help?

Blood Asp March 26th, 2012 01:18 PM

Re: Adding abilities to units - need help
 
Quote:

Originally Posted by xt255641 (Post 5626136)
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).

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)

AUS_Doug March 26th, 2012 05:07 PM

Re: Adding abilities to units - need help
 
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.

Blood Asp March 26th, 2012 07:48 PM

Re: Adding abilities to units - need help
 
Quote:

Originally Posted by AUS_Doug (Post 5626774)
a long post i actually read

I never knew you could do this... interesting...

AUS_Doug March 26th, 2012 08:41 PM

Re: Adding abilities to units - need help
 
Quote:

Originally Posted by Blood Asp (Post 5626865)
I never knew you could do this... interesting...

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:

xt255641 March 27th, 2012 02:58 PM

Re: Adding abilities to units - need help
 
Quote:

Originally Posted by AUS_Doug (Post 5626910)
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:

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)

AUS_Doug March 27th, 2012 03:11 PM

Re: Adding abilities to units - need help
 
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.

AUS_Doug March 27th, 2012 05:39 PM

Re: Adding abilities to units - need help
 
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:

<Unit_Abilities_Data SubObjectList="Yes">
<!-- Primary ability -->
<Unit_Ability>
<Type>SPOILER_LOCK</Type>

<Mod_Multiplier>WEAPON_DELAY_MULTIPLIER, 3.0</Mod_Multiplier>
<Mod_Multiplier>SHIELD_REGEN_MULTIPLIER, 1.0f</Mod_Multiplier>
<Mod_Multiplier>ENERGY_REGEN_MULTIPLIER, 1.0f</Mod_Multiplier>
<Mod_Multiplier>SPEED_MULTIPLIER, 2</Mod_Multiplier>
<Projectile_Types_Override>Proj_Ship_Proton_Torped o_Light</Projectile_Types_Override>
<Expiration_Seconds>10</Expiration_Seconds>
<Recharge_Seconds>30</Recharge_Seconds>
</Unit_Ability>
</Unit_Abilities_Data>

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.


All times are GMT -7.

Powered by vBulletin®
Copyright ©2000 - 2016, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.