Hi, everyone. Ever wanted to get that campaign unit into your map without making your map dependent on any of the 2 campaign dependencies? Or, perhaps you have a mod and want to port the mod into a map or another mod (in this case a part of it). Say, you want to add the Diamondback into the game, but don't want to have to open a map with the campaign dependency, copy a part of the diamondback, open your map, paste it there, switch again, until the entire unit is in your map. Well, this tutorial is for you, then.
I'm not going to copy a unit from the campaign, but I will go over the basics of what you need to do to accomplish this.
Here are the tools you'll need:
Ladik's MPQ Editor (Be sure to download the 64-bit version if you have a 64-bit OS)
A text editor (Notepad will do)
StarCraft 2 and the SC2 Editor
So, let's get this started. Open up Ladik's MPQ Editor.
Go to File > Open
At the bottom, at the "files of type" dropdown menu, select "All Files *.*"
Navigate to the StarCraft 2 installation folder (usually C:\Program Files (x86)\StarCraft II or C:\Program Files\StarCraft II)
Find Campaigns\Liberty.SC2Campaign\Base.SC2Data inside the StarCraft II installation folder and open it.
Extract the "GameData" folder somewhere you can find it (E.G. Local Disk, Desktop, My Documents). This folder will contain ALL the in-game campaign data (Units such as the Diamondback and Leviathan, for example.)
Now close the MPQ file (File > Close)
Go to File > Open and again, under the StarCraft II installation directory, find and open Campaigns\LibertyStory.SC2Campaign\Base.SC2Data (Remember to set the "files of type" to "All Files *.*" or "StarCraft II Data")
CAUTION: Once again, extract the GameData folder, but NOT in the same directory as the previous file, as the files inside will override the in-game campaign data. These files contain the campaign data that is outside the missions (Hyperion Upgrades for example).
Now that all these files are extracted, you can open them with a text editor (Right Click, "Open With"), as double-clicking on them usually opens them in Internet Explorer and copy the unit, ability, model, etc. data that you want. I'm not going to cover this part in the tutorial however. Each data type (Ability, or Model, for example) has its very own XML file. AbilData.xml is the XML file for Abilities. You can also open the editor and check what you have to copy, for say, the Spectre. All its abilities, upgrades, etc. So this works well to replace the need for having a second editor open, which is not possible so far on the same computer.
Now, let's go to the editor and create a really basic mod so we can just add the data we want to the mod outside the editor. Open up the SC2 Editor.
Create a new Mod (File > New, and select Document Type "Mod" from the dropdown menu. Leave "Melee (Liberty)" as the dependency).
Save the Mod somewhere and close the editor.
Open the Mod with Ladik's MPQ Editor. (You need to select "All Files *.*" from the file type dropdown menu)
Create a new folder (Right Click on the mod filename at the top of the list on the left, and then click "New Folder...") and name it "Base.SC2Data"
Now again, click "Base.SC2Data" and click "New Folder..." and name this folder "GameData"
Create a new XML and add your data in it or edit an existing one. Remember all abilities have to be in the AbilData.XML file, and the same applies to Models, Units, etc. Take a look at the XML files you extracted to get an idea of what goes where. See note (1).
In the MPQ Editor, select the GameData folder from the list. Now drag & drop the XML file into the GameData folder. A menu will pop-up, but you can just click ok and ignore the pop-up menu.
Close the MPQ Editor and open the mod in SC2. Check the data editor for your new custom data. If you did everything correctly, it should be in there under the appropriate section.
This should make it much easier to port singleplayer heroes, units and buildings to multiplayer.
The first and second lines are the opening lines, and the third one is the closing line. So if you add "XYZ" which will be variable denoting, let's say, a weapon or an ability, it will look like this:
Thanks for that I'm trying to copy Scourge into a small stand-alone Mod using the steps you've provided but I'll have to add something that allows them to actually be built which dose no appear to be in the Campaign data (their just a pre-placed unit).
I'm going to try to get most if not all the SC1/BW units extracted out in this way (someones already done a nice Lurker extraction which I found on B-net). I'm still fuzzy on the dependency process, I presume it's some kind of append & overwrite of data as SC2 loads. What is the minimum necessary set of Dependencies for a standalone unit extract, most units seem to have references to standard abilities like Attack and Stop. If I manage to get several units extracted in this way can I then create a mod which combines them by just having the unit mods as Dependencies, allowing me to pick and choose which ones are included? Also I noticed when I added Campaign as as dependency to the aforementioned Lurker mod, it became 'stuck' and could not be removed as it said the Campaign dependency was defining the Lurker, when it was clearly the data in the Lurker mod itself that did that, is their some kind of behind the scenes merger/overwrite when the Campaign is used as a dependency, which is why we want to avoid having it as a dependency?
EDIT:
On further inspection it looks like Lurker is easier to do then other units because its graphics are in the Liberty-Melee MPQ pack, presumably because it was cut very very late in the process (too late to be put in the Campaign perhaps?), the Scourge and all the other Campaign units are in a different MPQ file so even copying all the XML for them out of the Campaign wouldn't be enough, I'll have to copy art files as well, this could take a bit more work to figure out.
Just tried this and for whatever reason, I can only move six-eight XML files before i am told I am "out of disk space" but I have PLENTY of surplus room (dozens of gigabytes) on my computer to move the files to. This is at the point after I have created a new mod and am trying to copy xml files into the newly created folders inside the mod MPQ.Any ideas as to what may be the problem?
EDIT
I fixed it... for thoses who experience similar issues, go to operations>Change Hash Table Size and increase the value in the file you're moving the XMLs to.
The map file by default can only have a small number of files because of the hash table size. Use Operation / Change Hash Table Size and it'll be good :)
Where are the doodads located? Which XML File? I was hoping to create a special dependency that includes all the melee units/settings and stuff, and include all of the campaign's doodads to it so that mappers can add more variety in their maps. But I don't know which file is the one I want. I already have the actor and model XML files done... now where are the doodads I want. :/
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi, everyone. Ever wanted to get that campaign unit into your map without making your map dependent on any of the 2 campaign dependencies? Or, perhaps you have a mod and want to port the mod into a map or another mod (in this case a part of it). Say, you want to add the Diamondback into the game, but don't want to have to open a map with the campaign dependency, copy a part of the diamondback, open your map, paste it there, switch again, until the entire unit is in your map. Well, this tutorial is for you, then.
I'm not going to copy a unit from the campaign, but I will go over the basics of what you need to do to accomplish this. Here are the tools you'll need:
So, let's get this started. Open up Ladik's MPQ Editor.
Now that all these files are extracted, you can open them with a text editor (Right Click, "Open With"), as double-clicking on them usually opens them in Internet Explorer and copy the unit, ability, model, etc. data that you want. I'm not going to cover this part in the tutorial however. Each data type (Ability, or Model, for example) has its very own XML file. AbilData.xml is the XML file for Abilities. You can also open the editor and check what you have to copy, for say, the Spectre. All its abilities, upgrades, etc. So this works well to replace the need for having a second editor open, which is not possible so far on the same computer.
Now, let's go to the editor and create a really basic mod so we can just add the data we want to the mod outside the editor. Open up the SC2 Editor.
This should make it much easier to port singleplayer heroes, units and buildings to multiplayer.
(1) Remember, every XML has to have this in it:
The first and second lines are the opening lines, and the third one is the closing line. So if you add "XYZ" which will be variable denoting, let's say, a weapon or an ability, it will look like this:
Post reserved; Answers to questions and additional help will be provided here.
Thanks for that I'm trying to copy Scourge into a small stand-alone Mod using the steps you've provided but I'll have to add something that allows them to actually be built which dose no appear to be in the Campaign data (their just a pre-placed unit).
I'm going to try to get most if not all the SC1/BW units extracted out in this way (someones already done a nice Lurker extraction which I found on B-net). I'm still fuzzy on the dependency process, I presume it's some kind of append & overwrite of data as SC2 loads. What is the minimum necessary set of Dependencies for a standalone unit extract, most units seem to have references to standard abilities like Attack and Stop. If I manage to get several units extracted in this way can I then create a mod which combines them by just having the unit mods as Dependencies, allowing me to pick and choose which ones are included? Also I noticed when I added Campaign as as dependency to the aforementioned Lurker mod, it became 'stuck' and could not be removed as it said the Campaign dependency was defining the Lurker, when it was clearly the data in the Lurker mod itself that did that, is their some kind of behind the scenes merger/overwrite when the Campaign is used as a dependency, which is why we want to avoid having it as a dependency?
EDIT:
On further inspection it looks like Lurker is easier to do then other units because its graphics are in the Liberty-Melee MPQ pack, presumably because it was cut very very late in the process (too late to be put in the Campaign perhaps?), the Scourge and all the other Campaign units are in a different MPQ file so even copying all the XML for them out of the Campaign wouldn't be enough, I'll have to copy art files as well, this could take a bit more work to figure out.
Just tried this and for whatever reason, I can only move six-eight XML files before i am told I am "out of disk space" but I have PLENTY of surplus room (dozens of gigabytes) on my computer to move the files to. This is at the point after I have created a new mod and am trying to copy xml files into the newly created folders inside the mod MPQ.Any ideas as to what may be the problem?
EDIT
I fixed it... for thoses who experience similar issues, go to operations>Change Hash Table Size and increase the value in the file you're moving the XMLs to.
@TremorsFist: Go
The map file by default can only have a small number of files because of the hash table size. Use Operation / Change Hash Table Size and it'll be good :)
Where are the doodads located? Which XML File? I was hoping to create a special dependency that includes all the melee units/settings and stuff, and include all of the campaign's doodads to it so that mappers can add more variety in their maps. But I don't know which file is the one I want. I already have the actor and model XML files done... now where are the doodads I want. :/