hide results

    Beginner's Modding Guide by RC1162

    Version: 1.1 | Updated: 11/27/06 | Search Guide | Bookmark Guide

    *Fixed Characters* - V1.01
    This process allows you to edit the .xml game files of "Star Wars: Empire 
    at War".  Save backups just in case you screw up!
    REMEMBER:  Read this entire guide down to the bottom before trying anything.
    That way, you'll be able to get a good idea of what you want to do, and you'll
    see the warnings and tips in there.
    The example lines are from the named XML files in the "XML" folder in "Star Wars
    Empire at War" The default address on the hard drive is:  
    C:\Program Files\Lucasarts\Star Wars Empire at War\GameData\Data\XML
    Any xml file can be opened with internet explorer, you can click 
    on lines with a - or + by them to open or close sections.  To 
    actually edit them, you'll need to use a basic text editor like 
    windows notepad.
    Any line beginning with <!-- is usually a note left for programmers and 
    editors, often with the purpose of explaining anything important about 
    a line; like this one: 
    <Space_Retreat_Off_Map_Dest_Pos>12000.0, 12000.0, 0.0
    - <!--  WARNING: For some reason, non-0.0 Z can cause problems? -->
         -Determines what unit is used in a bombing run for the faction
         -Determines the maximum unit cap for the faction, too many will 
            eventually kill the framerate and crash the game during major battles, 
            50 or 75 is a good number, but you may not even feel like changing this 
            number. You'll find out why later on.
         -Determines the countdown time when retreating
         -The multiplier for how much damage space units take during the retreat 
            countdown.  In this example, units take 4x more damage.  Change to 0 to 
            make your units invincible while retreating, or if you always play as 
            one faction, change the value for another's to be 10x or more to quickly
            annihilate what's left of them when they retreat
         -Same as for Space_Retreat... but applies to retreating from a land 
         -You guessed it - Same thing as before for Space_Retreat... but applies 
            to land skirmish
         -Sets how many seconds between buildings releasing their garrison 
            (i.e., a barracks releasing rebel troopers every 20 seconds, 
            in this example)
    <Encyclopedia_Good_Against>TIE_Fighter TIE_Bomber</Encyclopedia_Good_Against>
         -Sets what units the named unit deals extra damage against (max. of 3).
            Only tells the game what to display in your popup information window for
            "Good against" and "Vulnerable To".  To actually change what it's good 
            against, you'd need to change the Armor_Type and Shield_Armor_Type to 
            one that corresponds to that already (like give the Empire's SSD the 
            same weakness to Corvettes by changing the values in these lines:
            to the values in these lines:
         -Sets what units the named unit is dealt extra damage from
         -Sets whether or not a unit can guard other units (yes or no)
         -Sets how much health the unit has in an autoresolved battle.  You see, 
            the way autoresolved battles work is the autoresolve health of both 
            sides is added up.  The total health of one side has the total <Damage>
            value of the other side's units subtracted from it.  The same goes the 
            other way around.  This is how, on the rare occasion, you'll win the 
            battle, but both you and the other faction lost ALL of your units.  This
            would be because the total damage dealt by each faction was more than 
            the total Autoresolve health of the other.  It's a bit more complicated
            than that, but that's as far as I'll go.
         -Sets how much damage the unit does in an autoresolved battle.  
            See above explanation.
         -Sets how many credits you have to spend to build the unit
         -Sets the build time for the unit in seconds
         -Sets whether or not it's part of the queue for space units
         -Sets whether or not the unit must be researched/stolen when tech level
            is reached
         -Sets whether or not the unit can be unlocked by R2-D2 or Researched
         -Sets what the slice cost is if the build is initially locked, and can 
            be unlocked by slicer (R2 or Research).
         -Sets the tech level unit becomes available, for Rebels 0-3, for the 
            Empire 1-4
         -Sets what space station level is required to build the unit, you can set
            it to 0 to never have to build a space station to build space units 
      <Tactical_Build_Prerequisites /> 
         -This block is (obviously) for Multiplayer Skirmish mode.  There's the 
            build cost, build time, prerequisites, and production queue.
         -Sets how much of a population the unit takes up (fighters squadrons are
            always 1, which is what this is).  You can set it to 0 for an unlimited
            number of the unit in a battle.  Just don't put too many in any one 
            fleet or you'll crash the game when you enter battle.
         -Sets the scale factor of a unit from the model size to the actual 
            in-game size.  You can put your own notes out there to say what it 
            originally was before you changed it so you can experiment and get an
            idea of scale, like this, for example: 
    <Scale_Factor>1.2</Scale_Factor>  <!--originally 0.7-->
         -Sets how fast a unit can turn (not sure what the scale is, play around
            with it and get your own idea of what it means for a unit to have a 
            value of whatever)
         -Sets how fast a unit goes from planet to planet in the Galactic View, 
            groups of units only travel as fast as the slowest unit, a higher number
            mean faster speed
         -If you've read down this far, you probably know what it is by reading
            its name.  If you're just not good at this yet, it means the required
            ground base level for producing/building the object.
         -Sets how many shield points the unit has (set to -1 for infinite)
         -Sets how much health the unit has in a battle (not autoresolve, set 
            to –1 for unlimited health)
         -Sets how fast the shields regenerate (every 3—4 seconds)
         -Sets whether or not a fighter can spin away & explode, or just blow up 
         -Sets the chance of a fighter spinning away if the previous line is Yes. 
            In this example, the fighter will spin away 40% of the time, or 0.4/1. 
            Set to 1 to always spin away on death. This only applies if the fighter
            has <Spin_Away_On_Death> set to Yes.
         -Sets how long the fighter will spin away before exploding (who knows 
            what the little "f" on the end is for.  This only applies if the fighter
            Has <Spin_Away_On_Death> set to Yes.
    This hardpoint is an ARC-170's hardpoint, from the "Conflicts in Space" mod
         -Tells what type of weapon is fired from the hardpoint (in this case, 
            a proton torpedo).  Available text for this variable is:
         -Tells how much damage the hardpoint's shots do.  Change this to whatever
            you so desire!
         -Tells the minimum time in seconds that will pass before the hardpoint 
            will fire again.  Setting this and the one below to 0 would cause the 
            hardpoint to fire continuously, making for much more realistic gameplay.
         -Tells the maximum time in seconds that will pass before the hardpoint 
            will fire another round
         -Tells how many times to fire in one round (between recharges)
         -Tells the time in seconds between shots in a round
         -Tells how close a hostile unit must be before the hardpoint will fire, 
            though it still has to be able to see the enemy to fire.  Set to -1 
            (infinity) to be able to fire at any visible unit on the map.
         -Attachment_Bone, Collision_Mesh, Damage_Decal, Damage_Particles, and 
            Death_Breakoff_Prop must correspond to the proper locations on a unit 
            if you want to switch hardpoints between units.  Unless you somehow know
            the names to all the attachment bones and collision meshes, don't mess 
            with these lines or the hardpoint will simply no longer be present on 
            the unit.  And I know you don't want that...
         -Sets whether or not the hardpoint can be targeted and shows up on the 
            ship as a hardpoint.
         -Sets whether or not the hardpoint can be fired upon to be destroyed, or
            remains on the unit until all the destroyable hardpoints have been
            destroyed and/or the unit's health is at zero.
         -These two values set the range of motion that the hardpoint can fire, I
            think you can set them to 360.0 to allow them to fire in any direction
         -Tells what layer the unit is in; I think some of the layers are Capital,
            Fighter, Frigate, Super, StaticObject, Land, and None.  I think there 
            may be others, and some of the ones I've named may not exist, but play 
            around with it and see what's what.  (That's how I learned all this,
            after all!)
         -Sets whether or not the unit is visible on radar.  A variant for 
            exceptionally large vehicles like the SSD & SD would be the next line 
         -Tells if you can see a unit on the radar even if it's in an area of 
            Fog Of War.  Again, if you always play against one specific faction, 
            you can paste this line somewhere below either this line:
            or the line that tells damage, which is <Damage>60</Damage> for every 
            single unit that belongs to the enemy. If the game crashes, just erase 
            that line from the unit.  I've never tried it with land units, but it 
            may work for them as well as it does for space units.
         -Tells how many shield points the unit has; again, -1 is infinite
         -Tells the distance around the unit that the Fog Of War is revealed
         -Tells how close the unit must be to engage in hostilities
    <Targeting_Fire_Inaccuracy>Infantry, 1.0</Targeting_Fire_Inaccuracy> 
    <Targeting_Fire_Inaccuracy>Vehicle, 10.0</Targeting_Fire_Inaccuracy> 
    <Targeting_Fire_Inaccuracy>Air, 70.0</Targeting_Fire_Inaccuracy> 
    <Targeting_Fire_Inaccuracy>Structure, 15.0</Targeting_Fire_Inaccuracy>
         -The preceding block tells the unit's accuracy rating towards different 
            units.  The lower the number, the more accurate the unit/hardpoint is 
            towards that type of hostile unit.  In this example (from an Imperial 
            Scout Bike), the rating for Air is 70.0, which means the unit will 
            almost never hit an aerial unit (like a Snowspeeder), if it can even 
            get close enough to fire.  However, it will almost never miss infantry.
         -Taken from the same unit (speeder bike), this indicates that the unit 
            cannot fire at aerial units.  To eliminate this restriction (and all 
            restrictions) change the line like so:
         -This tells the game that there are no restrictions, and the unit can 
            fire on any hostile unit, provided it's in range.  You can also add
            unit types to an enemy's stats, or make them very inaccurate towards the
            unit type that they're most effective against (heck, all other units!)
         -Indicates that the unit will be fired upon by anti-infantry turrets
         -Tells if the unit can be run over by a vehicle with legs or treads; a 
            TIE Mauler can run over and instantly kill/destroy any unit that has Yes
            for this value.  Turning this to No would mean the unit can't be run 
            over by any unit with the line <Is_Supercrusher>True</Is_Supercrusher>
         -Tells how close an attacking enemy has to be for the attacked unit to 
            automatically move to attack the enemy;  i.e., an artillery unit fires 
            at tanks from 900 units away.  The tanks, however, are set to only 
            attack attacking enemies who are 500 units or less away, so they just 
            sit there, unresponsive, until they blow up.
         -Tells what category the unit falls under, i.e., what weather affects 
            the unit's abilities.  The weather categories that are used are:  
            Infantry, LargeWalker, Walker, Speeder, Flying, Tracked, and Hover.
            There may be more, though I haven't found any...
         -Tells whether unit can capture reinforcement points, set to True to 
            enable the unit to do so
         -Determines whether or not the unit can run over enemy troops
         -The absolute fastest speed the unit can achieve
         -The absolute fastest that the unit can turn (this was for an AT-AT)
         -Determines if the unit looks for and is affected and bound by terrain 
            (cliffs and rivers on land, asteroid fields and space stations in space)
         -Tells how many credits the planet gives you per galactic day
         -Tells how many credits the planet gives you per day after the Death Star
            has destroyed it.
         -Tells how many land structures can be built, it can't go higher than 9
         -Tells the highest Space Station level that can be built above the planet
         -Tells whether or not the planet has anything on the ground (Bespin and
            asteroid fields have this set to No)
         -Tells how many credits are awarded to the capturing faction when the 
            planet is taken
         -tells how many additional units the planet adds to the population cap
    **More on editing hardpoints**
    First of all, to change or add hardpoints in any way, you need to modify both 
    the Hardpoints.xml file's entry and the XML file that contains the ship with the
    hardpoint itself.  The main areas of interest (I'll use the Mon Calamari
    Cruiser for my examples) in these two programs would be:
     -The entry list of hardpoints on the Mon Calamari Cruiser:
    <HardPoints>HP_Calamari_Cruiser_Weapon_FL, HP_Calamari_Cruiser_Weapon_FR, 
    HP_Calamari_Cruiser_Weapon_BL, HP_Calamari_Cruiser_Weapon_BR, 
    HP_Calamari_Cruiser_Weapon_ML, HP_Calamari_Cruiser_Weapon_MR, 
     -and the entry itself for a hardpoint - the front left in this case (which, 
      when viewed from above, is the left forward ion cannon on the cruiser), 
      represented by the "FL" on the end of the Hardpoint Name
    - <HardPoint Name="HP_Calamari_Cruiser_Weapon_FL">
      <Fire_Inaccuracy_Distance>Fighter, 70.0</Fire_Inaccuracy_Distance> 
      <Fire_Inaccuracy_Distance>Bomber, 70.0</Fire_Inaccuracy_Distance> 
      <Fire_Inaccuracy_Distance>Transport, 70.0</Fire_Inaccuracy_Distance> 
      <Fire_Inaccuracy_Distance>Corvette, 30.0</Fire_Inaccuracy_Distance> 
      <Fire_Inaccuracy_Distance>Frigate, 1.0</Fire_Inaccuracy_Distance> 
      <Fire_Inaccuracy_Distance>Capital, 15.0</Fire_Inaccuracy_Distance> 
      <Fire_Inaccuracy_Distance>Super, 1.0</Fire_Inaccuracy_Distance> 
    When just editing a hardpoint, first you need to figure out what you want to be
    changing.  let's just make this current hardpoint very strong, and very accurate
    towards frigates, capital ships, and super weapons (like the SSD).
    The first step that you want to do: change the power.  To make the individual
    shots more powerful, just change the <Projectile_Damage> value to 300, about 7.5
    times more powerful than originally.  Don't forget to note what the original
    damage was.  The line should now look like this:
      <Projectile_Damage>300.0</Projectile_Damage>  <!-- originally 40 -->
    Okay, now for making it fire faster and longer.  You can change the value for
    both <Fire_Min_Recharge_Seconds> and <Fire_Max_Recharge_Seconds> to 0, so it'll
    never stop firing.  Another way to do the same thing would be to change the line
    <Fire_Pulse_Count> to negative one so that, again, it would never stop firing.
    You can make it fire anywhere on the map at any visible target by setting
    <Fire_Range_Distance> also to -1, meaning unlimited range.
    Now for accuracy.  To almost always hit the target, you can change the values
    for every <Fire_Inaccuracy_Distance> number to 1.0 or 0.1, even.
    As far as ADDING hardpoints goes, it's a lot more difficult.  All you can do is
    copy an existing hardpoint, give it a different name, like the original's with a
    _Secondary on the end of its name.  Here I go now with the example.
    I want to add an invisible laser cannon to the front left ion cannon.  I can't 
    just put it anywhere I want, because there are attachment meshes and bones that
    govern where hardpoints go and what direction they point (so the angle settings
    can govern where it can fire).  You can only put hardpoints where there is
    already an attachment bone and mesh in the model.  Seemingly, you can only put
    two on the same point at a time, at least, that's what I've found.
    Alright, step one, copy the hardpoint that you want to add a second one on. I'll
    use <HardPoint Name="HP_Calamari_Cruiser_Weapon_FL">.  I'll change the name in 
    quotes to "HP_Calamari_Cruiser_Weapon_FL_Secondary".  Here are the lines in
    order that need changing, I've already changed their variables.
    Note that if you don't make sure that it's not targetable or destroyable, it 
    will glitch and become an invincible hardpoint that will never die.  Just also
    make sure that the attachment bones and meshes match to the proper hardpoint 
    that you want it to be on.  When you do this, then congratulations!  You've just
    added a hardpoint to your Mon-Calamarian Cruiser!  If it doesn't work, then try
    another hardpoint, and make sure that the <Type> value coincides with the
    <Fire_Projectile_Type> and <Fire_SFXEvent> so you can tell what it's doing.
    The line <Damage_Type>Damage_Calamari_Cruiser</Damage_Type> tells what units are
    weak to its firepower, so you can change this around to the damage type of, say,
    a Y-Wing, making a super-effective anti-capital (ship) Mon-Cal Cruiser.
    If you don't know the proper values for changing the type, just look around in 
    the Hardpoints.xml file for whatever fire type you're looking for, like
    torpedoes, missiles, or even a hangar.  The hangars are different though, I'll 
    cover more on those in my next update to this Guide.  It's interesting, just 
    when you think you've covered it all, taking 5 hours to write a guide, you think
    of something else you still didn't cover in it!  Wait until 2007, and if I 
    haven't updated this thing, I probably lost the whole computer in a catastrophic
    hard drive failure and haven't gotten another one.  They happen a lot to me, 
    don't know why...
    Tips for Editing:
    -The computer I'm using is Windows 2000 with Service Pack 4, so I don't know if
     this applies to everyone, but whenever I try to have a windows explorer window
     running *and* an internet explorer window showing the XML file, the Windows
     process called "explorer.exe" blows up after about 5 seconds of the two being
     running at the same time.  To fix this, I just dragged the "My Computer" icon
     into my start menu, so I can look through folders and select files from the
     Windows start menu.  Handy feature.
    -Remember to comment the variable's original value or status out to the side, so
     that you can quickly find it and make changes.
     Example line:
     <!--originally 150.0-->
     In that case, you would simply press Control-F (bringing up the Find window),
     then search for "Originally" until you found the one referencing the line
    -The reason -1 is infinite for health in this case is mainly because the health
     of a unit would only drop down to 0 ordinarily.  When it hits 0, the game 
     destroys the hardpoint (or unit).  Since the health is already below zero, it
     never hits the point where it's supposed to blow up.
    -Remember to always save a copy of the original .xml file 
     BEFORE you make any changes.  When all else is lost, you can just restore the
     original version.  I know you don't want to have to reinstall the game!
    -When in doubt...take a wild guess!  (But note it or save a backup first)
    -Any unit that has _E3 on the end of its name was only used for the demo of the 
     game (at E3, go figure) and isn't the unit used for the final game.
    -Lastly, don't be afraid to be as devious as you want with this. After all, I 
     made all my fighters, bombers, snowspeeders, and troopers invincible, doubled
     the hardpoints on most of my fleet craft, made all my units super-accurate and
     super-powerful, quadrupled the FOW reveal and attack range of most of my units,
     raised my unit cap to 75, changed fighter-sized units and land units to 0 
     population count, and gave my artillery units unlimited range!  That, coupled 
     with having made all my units 0 credits to build makes this game way more fun 
     than the designers ever thought possible!
     After all, that's what cheating's all about - having more fun!
     Hope the guide helped you out.  Have fun modding EAW!

    View in: