Requires: Relic Mod Tools, specifically the Mod Packager, and also for you to have setup at least one mod ready for editing, preferably having done some modding on it too.
In this tutorial I will be investigating the folder tree system, module files and also how to merge two or more mods together.
When making a mod you will have a base mod data folder for it, this will be in your THQ/Dawn of War - Dark Crusade folder (assuming you are making a DC mod and assuming you haven't installed it anywhere funny). For the purposes of this tutorial it will be called YOURMOD folder. When you start the mod this will of course be pretty much empty as will just be a copy of the my_mod folder, but as you start to fill it up with modded goods you need to know where on earth you should be putting those things; the structure of the folder tree is very important and is integral to getting your mod working. OK, so how the heck do you find this structure out? The damn thing is empty right? And so are the other folders too...well, not quite. Take a look in the DXP2 folder which should be in the same bunch as YOURMOD folder, there's some archives in there, and it's those that will tell us the structure we need.
Extracting an Archive
Extract DXP2Data-SharedTextures-Full.sga using the Mod Packager. Open the packager, then open the correct .sga archives and extract the whole thing to a folder of your choice.
This extracted archive will contain all the textures that are used on models on the game. It is these textures that people are editing when they talk about "skinning". OK, open up the extraction and head on in. You'll find that you've got to plow through a whole shit load of folders before you get to any real files right? I'll answer that in a minute. If you wanted to edit a texture you would go and find the texture you want to edit, the ones for the units are in Art/EBPS/Races/*somerace*/texture_share, and then edit it to your heart's content. Then you would need to recreate the folder tree from the archive in YOURMOD folder and place the new texture in the right folder. The archive itself should be considered as the DATA folder (hence all of them have Data in the name), which goes inside the mod folder, so the full path is YOURMOD/Data/Art/EBPS/Races/*somerace*/texture_share. The spelling should be exactly correct or it will not work, although capitals don't matter. You do not however need any extraneous folders that are empty in your mod; the folders are only needed if there is something to go in them (pretty obvious that though really). Note: Data/Art/EBPs is already made for you in My_Mod folder that you copied.
The Combined Trees
So why all the folders? Well, that's because that's not the whole Art folder. The Art folder is spread across most of the archives. Extract DXP2Data.sga to a different folder and you will see that is has an Art folder in it too. This Art folder should be considered as the same Art folder as in the other archive; the two archive's folder structure overlaps and shares folders. The Art folder contains, among other things, the icons, they are in Art/ui/ingame/*somerace_icons*. So if you wanted to edit a couple of the icons you would need to recreate this folder structure in YOURMOD folder so that they are in the right place. Remeber to consider the archive itself as the Data folder. The Art folder is already made for us however, it's the same one as before.
Between them the archives contain the complete structure, many folders are shared across them like the Art folder, but the complete picture doesn't really matter as you only need to know the paths that are used by the things you are modding and know where they overlap. Take a look in the DXP2Data archive, in the Attrib folder. Look familiar? This is the folder structure that the Attribure Editor recreates as your mod the hell out of the game, it recreates this in....yep you guessed it YOURMOD/Data/Attrib.
So basically: PLACE IT WHERE YOU FOUND IT!! If you edit something, create an exact replica of its original home, but inside your YOURMOD folder instead. This way it will overwrite the original without destroying it. This goes for all your files: camera files, icons, .screen edits, vis files, models. Whatever.
Dawn of War is modular, this facilitates easy modding of it. There should be at least 4 mod folders and 4 corresponding module files in THQ/Dawn of War - Dark Crusade: DXP2 folder, W40k folder, My-Mod folder and YOURMOD folder along with DXP2.module, w40k.module etc. The real game that you'd paid money for is in fact a module itself or two rather, the DXP2 folder and W40k folder make up the game together. (Note: for DC only modders, DXP2 contains all the info from Winter Assault and Dark Crusade, and w40k contains the info from the original DOW game albeit stripped down to avoid duplicate files). Now there's nothing in these folders really but the archives, but for now you should consider those fully expanded out inside their parent folders, using the proper folder structure. That is basically what they are anyway, they have just been compressed down. Anything in these folders (archives) is up for modding, you can fuck about with any of this shit, just remember to stick it your own mod folder or you could break your game!.
Open up the DXP2.module file with a text editor (but you should know that already ). At the bottom you'll see the RequiredMods Section - this particular mod, DXP2, requires W40k for it to work. The DXP2 Dark Crusade part of the game is piggybacking off the original DOW data; it requires it. This means that the mod you're playing when you activate this module file, Relic DC, looks in its mod folder (DXP2) for all the data. It will then look in the RequiredMod.1 folder, which in this case is W40k, and it will also load any files in there that aren't already in DXP2, which in this case is most data regarding the original 4 races.
Now open up the module file for YOURMOD; the RequiredMods list has two mods in it this time. So, the engine first checks the mod folder for whichever mod has been activated, in this case it would be YOURMOD. After this it will now check DXP2 as that is the first in the list of required mods for YOURMOD, then W40k as this is next on the list. YOURMOD is piggybacking on DXP2. So any files that appear and are extra in DXP2 and then W40k (quite a lot most likely) will get loaded, for any files that clash between the folders, that have the same name and path etc. i.e. the stuff you've modded, the order of modules listed in the module file dictates which is used with the actual mod being activated taking overall precedence. In this case, YOURMOD will overrule DXP2, which will in turn overrule W40k - YOURMOD comes out on top.
Imagine/picture each mod folder as a mapped out tree of files laid flat. W40k lies at the bottom, with DXP2 on top of it; any files and folders with exactly the same name and path will lie directly on top of each other. YOURMOD's folder structure, most likely much smaller, sits on top of DXP2 and again indentical file paths lie exactly on top of each other. In this way the files that have been modded in YOURMOD cover over the old versions in DXP2, which covers defunct versions in W40k (though I don't think there any, they've been stripped out). Any files that are not covered poke out into the light and are still showing and so get loaded. If your files in YOURMOD don't use the same file path and folder structure as DXP2 then they won't sit directly above the corresponding file, and it's then that things go wrong, mainly being that your file will get ignored. The game engine will following a file path dictated in another file and your new file won't be there, but the old one will. You can either make sure your file is in the right place, or edit the directing file to point to a new place where your new file will be. Generally the first option is easier: If the path ain't broke then don't fix it!
Note: the Data folders are read first before any archives. This is dictated in the module file. If you place any real files in a correct folder structure in the DXP2 or w40k folders then it will override the corresponding file in the archives, without being a complete and separate mod. This is useful for things like skins and new maps which don't cause sync errors, and this is where they will tell you to put these. Any new maps you have will be in DXP2/Data/Scenarios/MP. Any skins will follow the structure laid out in the Texture archive we extracted earlier.
To merge mods you basically need to slide another layer, one for each extra mod, into this little stack we've created. First decide which mod you want to be to one that you are actually playing: this mod should be the top layer. Any additonal mods go beneath this, then DXP2, then W40k at the bottom. To achieve this first open the module file of the mod you want to play. Then edit the RequiredMod list. The module associated with the file you're editing will be top automatically of course, then RequiredMod1, RequiredMod2 etc.
YOURMOD.module file (<= top layer mod)
Note how DXP2 is now RequiredMod.3, not 1: it's moved down the list.Code:[global] UIName = YOURMOD Description = My Super Duper Mod for Dawn of War DllName = WXPMod Playable = 1 ModFolder = YOURMOD ModVersion = 1.0 TextureFE = Art/UI/Textures/Title_winter_assault.tga TextureIcon = DataFolder.1 = Data ArchiveFile.1 = RequiredMod.1 = that_new_race RequiredMod.2 = another_new_race RequiredMod.3 = DXP2 RequiredMod.4 = W40K (<= bottom of the stack)
The main mods you'll want to merge will be race mods. These (theoretcally) will not overlap the existing files at all, they will simply add a whole new branch to the folder structure - there will be no files underneath them in the hypothetical stack, and none above either. Other mods may have clashing files and this is where stuff is going to get broken, the overlaying/overriding file from the mod on top may not be right for the mod beneath it, which will fuck it up. Sorry!
A Patching Mod
Another use it use a piggybacking mod as a test mod for your own mod. EG you have a large mod that is publicly released and instead of crapping up your version you create a patching mod that has your mod as a requirement. The patch mod will then only contain the changes you have made and you can easily find any errors you made that way or revert, all the while you can still multi with the real public version. When the times comes you can combine and compile and installer.
Hope this has been useful. Not sure how necessary it was, but it felt good to get it down in text. It's pretty long winded and once it clicks it's all easy as pie, I just wanted to make sure it clicked! I may update this with more useful info about module files, some sneaky stuff, though only after some testing and research.