This is a brief outline of the use of the Mod Packager tool. The tool itself is just used to open and extract SGA files, and also pack them. It is useful if you want to cut down the files shown in explorer to standard users for mods, or just make things look nice. Note that you'll have to specially set up your SGA files to be read however.
SGA files are better compressed then if extracted. If you do not have much space do not extract too many of them!
Opening an SGA File
Go to FIle -> Open, and select the SGA file you wish to extract. By default, the game has SGA files in these locations:
InstallPath\Dawn of War\Engine\Engine.sga – Files for the UI and basic files
InstallPath\Dawn of War\GraphicOptions\GOTData.sga – Graphic Option files
InstallPath\Dawn of War\W40k\W40kData-SharedTextures-Full.sga – Full texture files for shared textures
InstallPath\Dawn of War\W40k\W40kData-Sound-Full.sga – All sounds at High (Full) quality
InstallPath\Dawn of War\W40k\W40kData-Sound-Med.sga – All sounds at Medium (Med) quality
InstallPath\Dawn of War\W40k\W40kData-Sound-Low.sga – All sounds at Lowest (Low) quality
InstallPath\Dawn of War\W40k\W40kData-Whm-High.sga – Whm Files are texture related. Highest quality textures.
InstallPath\Dawn of War\W40k\W40kData-Whm-Medium.sga – Whm Files are texture related. Medium quality textures.
InstallPath\Dawn of War\W40k\W40kData-Whm-Low.sga – Whm Files are texture related. Lowest quality textures.
InstallPath\Dawn of War\W40k\W40kData.sga – All non-texture, non-sound and non-speech data, such as RGD and map files. AI, SCAR and attributes.
InstallPath\Dawn of War\W40k\Locale\Language\W40kData-Sound-Speech.sga – This is all the speech files. They are always one set quality.
InstallPath\Dawn of War\W40k\Locale\Language\W40kDataLoc.sga – Language Localisation files like keyboard defaults, and some DDS files (The blood splatters are removed in some languages).
Extracting an SGA File
Once opened, all you can do is extract *all* the files.
For an example, if you are extracting Engine.sga, you need to select a folder. If you select somewhere called New Folder, it will not create a folder inside that called Engine for the files and folders to go, so be careful where you extract to.
The size of uncompressed files might well go over double the size of the SGA file. The Engine.sga file is 61.9 MB, while uncompressed it totals 128 MB.
Packing a new SGA File
Note: Requires screenshots
Packing a new SGA file is easier then first expected. These instructions are from Xnight
Step one, create a text file (with notepad or similar) that contains this text:
Now, run the Mod Packager and open test.arciv from File -> Open (and select the file you just saved).
Go to the tab that says Archive and click on Archive info, change this to whatever the name of the archive you want to create e.g. ModNameData, or ModInitialsSoundFull (Like MyModdata/MMdata, or MMSoundFull) This will be the final filename of the file.
NOTE: It's works best if you keep the names simalar to the original W40k ones i.e. W40kData = ModNameData, or ModInitialsdata ... or W40kData-SharedTextures-Full = ModNameData-SharedTextures-Full.sga.
Now go to the tab that says Archive and click on New TOC.
For the Name field, use the same name as the Archive Info you just entered.
The next line that says Alias(Data) enter in Data...
NOTE: this is the line that makes sure it will always be found as all the SGA archive all have the alias of Data! Just like the data dir in each mods folder.
The third line is where the files you want to archive are ... i.e. \Data, or \Data_Shared_Textures, or \Data_WHM\High, etc. Choose Browse and go to the folder you wish to have the contents added.
NOTE: It will only read down the tree not up so all the files you want to pack have to be in that directory.
NOTE: This is the reason the mod tools set us up with the dir structure they do to prep the files for packing in to SGAs. Make sure the structure is present before making an SGA!
Now you can click OK.
Now all that has to be done is right click the area under that red arrow you see then add files or add folders.
IMPORTANT NOTE!: You must pack them like the original W40k SGAs, so for the Data SGA you must add all files and folder in the data directory but not the data directory itself. All the ModNameData-SharedTextures-XXX and the 3 ModNameData-Whm-XXX archives must begin with the art directory, actually thats the only thing you to do to those archives.
Now lastly all you have to click is build archive and when it asks you what to save it as use the name you just used twice i.e. ModInitialsData (Like MyModData, or MMSound) or whatever the name was. If sucessful it should create a new SGA file.
Using SGA files in mods
Ok after building an SGA archive, you just need to change the module file. We add in references to our new SGA files.
We need to add new ArchiveFile.X lines to the file (if they don't exsist). Usually, if an SGA file isn't used, the Data Folders will instead. Now you have SGA files, you need to add similar lines for ArchiveFile.X, such as:
;; For a .module file, ;; means a comment line.
;; SGA file is called "TestData.sga", but we add this line:
ArchiveFile.1 = TestData
See this example for a complete .module file that uses similar standards to the base W40k sga's:
;; //////////////////////////////////////////////////////////////////
;; File : my_test_mod.module
;; Desc : My Test Mod Mod descriptor file.
;;
[global]
UIName = My Test Mod
Description = My Test Mod
DllName = W40kMod
ModFolder = my_test_mod
ModVersion = 1.0
;; //////////////////////////////////////////////////////////////////
;; List of folders to map for this MOD
;; order is important - the first Archives registered will be scanned for files first
DataFolder.1 = Data
DataFolder.2 = Data_Shared_Textures\%TEXTURE-LEVEL%
DataFolder.3 = Data_Whm\%MODEL-LEVEL%
DataFolder.4 = Data_Sound\%SOUND-LEVEL%
;; //////////////////////////////////////////////////////////////////
;; List of archives to load for this MOD
;; order is important - the first Archives registered will be scanned for files first
ArchiveFile.1 = MTMData
ArchiveFile.2 = MTMData-SharedTextures-%TEXTURE-LEVEL%
ArchiveFile.3 = MTMData-Sound-%SOUND-LEVEL%
ArchiveFile.4 = MTMData-Whm-%MODEL-LEVEL%
;; //////////////////////////////////////////////////////////////////
;; List of archives containing localized content to load for this MOD
;; order is important - the first Archives registered will be scanned for files first
;; LocaleFile.1 = W40kDataLoc
;; LocaleFile.2 = W40kData-Sound-Speech
;; //////////////////////////////////////////////////////////////////
;; List of MODs that this MOD requires to work
RequiredMod.1 = W40k