Editing Units Problem with Fix
submit to reddit

  • I wanted to help people that are having a similar problem to me or have found a different way to edit the Unitdata.xml out of the MPQ files. This specific way I have done works but if anyone else knows a way that is easier and more efficient, please share.

    Firstly, I started off with a "GameData" folder located in the Starcraft II directory. I then found an MPQ editor (http://www.zezula.net/en/mpq/download.html) and extracted the UnitData.xml from both the Patch.SC2Archive located in Versions folder and another UnitData.xml from Mods/Liberty.SC2Mods just to cover myself in case..
    From reading various forums about just placing the .xml files inside the GameData folder you create and finding out that your "Mods" or "edits" are not working, there is a small fix which I found.

    One thread located at TeknoGods says you need to place a blank UnitData.xml within the Patch.SC2Archive.mpq.

    Well I did this and I ran into a problem of having everything build in Triples. I use any launcher, Lazytown/Allinone/SC2Launch with the target line reading "-v 14803". The game loads just fine and voila, the unit I edited, a Drone on Zerg has 45HP instead of 40HP. Great, it works....

    One major problem however: Whenever I build any unit, they come in 3s. Meaning I build 3 drones out of 1 egg, 3 Overlords, 3 pairs of zerglings etc all for the cost of 1 unit. So 3 overlords cost 100 Minerals and 6 zerglings cost 25 Minerals.

    From what I was understanding, the game or code is trying to load UnitDatas from differing places. One in the Map.mpq and another from the Patch.mpq. Over at Teknogods they were explaining how to remove a CardLayout or remove=1 something or other. I really didn't understand so my apologies.

    So, I decided, what if I put ANOTHER blank UnitData.xml within the Liberty.SC2Mod.mpq.

    I did this and it worked. Don't ask me why or how, but it worked.

    Again, for anyone having the same problem or wanting to edit off the bat, here is how I went about it. The quick version:

    1. Extract a UnitData.xml from any .mpq be it the Patch or Liberty.SC2 .mpq.

    2. Create a copy of that UnitData.xml or if you are worried, create a copy of the UnitData.xml from both the Patch and Liberty.SC2 .mpq's.

    3. Open one copy with your favorite text editor and erase everything.

    **DO NOT FORGET TO MAKE COPIES...please

    4. Place the newly clean and erased UnitData.xml into BOTH the Patch.mpq AND Liberty.SC2.mpq. Both these .mpq's should now have blank UnitData.xml's within them.

    5. Create a "GameData" folder within your Starcraft II directory. Should read something like:
    Windows 7
    C:\Program Files (x86)\StarCraft II Beta\GameData
    Windows XP
    C:\Program Files\StarCraft II Beta\GameData

    6. Place one of the unerased original UnitData.xml's into the GameData folder and open with a favorite text editor and edit to your heart's content.

    **Please be aware, for some reason when I use the All-in-One Launcher v7.7.3 BETA, everytime I exit the game my GameData folder has been erased and both UnitData.xml files within the .MPQ's are back to their original. I have to save a copy of my modded GameData folder and blanks..

    If anyone has come across an easier way to mod the units in the game, please share as this is the only way that has worked for me. Simply creating a GameData folder with the .xml's never worked.

    I received and pieced together information from the following:
    http://www.teknogods.com/phpbb/viewforum.php?f=13
    and
    http://forums.sc2mapster.com/development/map-development/
    and
    http://sc2.nibbits.com/forums/
    last but not least
    http://darkblizz.org/Forum2/sc2-tools/

    I hope this helps anyone wanting to get a jump start on mods that is a beginner like myself.

    P.S. I posted this same thread over at TeknoGods

    Registered User
    avatar
  • This is a known issue:
    http://forums.sc2mapster.com/development/map-development/209-mpq-problems/

    In order to fix it there are 2 solutions:

    1) Have a blank xml file inside the base MPQ. Instead of fucking up your Liberty.SC2Mod.mpq you can just add it inside the patch.mpq. You tell your launcher to launch your version and it's all good :) See the Mapster TD to get an example.

    2) Only put the modifications inside the map xml. If you want to edit a unit life, just put <CUnit id="MyUnit"><Life value="100" /></CUnit>. That works for nearly anything except for arrays. You have to use the remove="1" trick:




    ... Add more for all indexes
    ... your data

    The first method is easier to do but will make your map harder to give to people. The second method is tougher to work with but you can package it in a single map.

    Registered User
    avatar

New Reply

If you were logged in you would gain 3 XP for posting a reply.

Please respect our terms of use when participating in Nibbits.

Preview
Comment
We will show a masked version of your IP address as well as your name.

Support Nibbits by linking to us: