RDNWiki: ModTools/ModConversion ...

RDN Wiki Home | Page Index | Recent Changes | Recently Commented | Users | Registration | Login:  Password:  

Mod Conversion


Contents


Dawn of War Mod Setup



Warhammer 40,000: Dawn of War™


RDN MOD Tools v. 1.11/Patch 1.3


New Attribute Conversion Documentation

Written by:


Ian Cox (THQ QA)
Raphael van Lierop (Relic)
George Hornmoen (Relic)


Introduction


In support of our efforts to develop Winter Assault, we have adopted a new attribute file format. The data for this new file format was included in the Patch 1.3 release, and therefore all MODs developed using previous data sets (1.0 – 1.2) were instantly ‘broken’ by this.


To support the MOD community, we have prepared a simple command-line utility which carries out the conversion process. Because of this script, the amount of manual work required to convert your MOD to 1.3 data is minimized, but as every MOD is different your particular experience may vary from what is described below.


This document outlines the process of converting your MOD from 1.2 data to 1.3 data. Please refer to the closing section entitled ‘Modding Links’, for more information about modding Warhammer 40,000: Dawn of War.

What You Need


New Modding Features in Patch 1.3


Installing Patch 1.3


To install Dawn of War Patch 1.3, simply:


  1. Start Dawn of War.
  2. Click the ‘Multiplayer Game’ button in the Main Menu.
  3. Click ‘Online’ from the Multiplayer Game menu.
  4. Log in to Dawn of War Online using an existing Game Spy? ID (or, alternatively, create a new ID through the provided interface).
  5. Dawn of War online should automatically patch your game to the latest version (1.3).

Alternatively, you can find Patch 1.3 from various download sites, including www.fileplanet.com, www.fileshack.com, etc.


For Troubleshooting help with installing Patch 1.3, refer to the following forums:


http://forums.relicnews.com/forumdisplay.php?f=125

MOD Conversion Process

Step 1 – Data Backup


Make a back up copy of your MOD’s attribute data. This way if you make any undesirable changes you can always revert to this backup copy.

Step 2 – Move Attribute Files to Data Generic Folder


In Dawn of War versions 1.0 to 1.2, the game loaded LUA files directly. With version 1.3 the game now loads binary data files that are created with the Attribute Editor (version 1.1). In order for the Attribute Editor to load your LUA files, you must place them in the proper folder.


Assuming you have installed Dawn of War in the default location of:


C:\Program Files\THQ\Dawn of War


…you will need to move the entire C:\Program Files\THQ\Dawn of War\<your_mod>\Data\Attrib folder to:


C:\Program Files\THQ\Dawn of War\Mod Tools?\Data Generic?\<your_mod>\Attrib


Notes:


  1. If you have installed the game in a different location than the one specific above, please modify the path accordingly.
  2. Replace <your_mod> with the name of your MOD, e.g. Space_Hulk.
  3. For information on how to setup a MOD for Dawn of War please refer to the Mod Setup.rtf? document.

Step 3 – Conversion Utility


The Conversion Utility will go through all the files in your MOD and automatically make most of the changes necessary. Note that it might take the utility some time to go through all the attribute data and make the conversion from 1.2 to 1.3 data.


When the utility has completed the conversion work, you should see a short summary of how many changes were made.

To run the Conversion Utility:


  1. Open a command prompt (Start > Run, then type cmd and press the Enter key).
  2. Navigate to the folder where you have installed the Conversion Utility.

Note: You MUST run the utility from the installed folder, otherwise the utility will not find the support files it needs. Also, make sure you have read/write access to the data you want to convert.


  1. Enter the command ‘update13’, along with the appropriate parameters (see below).

The syntax for the utility is:


update13 modattribdir parentattribdir

Where:



Example:


update13 “c:/program files/thq/dawnofwar/modtools/datageneric/mymod/attrib” “c:/program files/thq/dawn of war/modtools/datageneric/w40k/attrib”


Note: It is important to include the space between the two attribute paths (i.e. between the quotation marks in the above example).

Problem Files


In a few cases, the utility may not be able to convert certain files, and will provide a listing of ‘problem files’.


For any of the files that are listed as such, open them in a text editor (Notepad works well), and edit the Inherit and Inherit Meta? lines so that they follow the new relative paths.


Example:


Inherit(abilities/ability.nil?)

As opposed to:


Inherit(“ability.nil”)

The utility can and should be run more than once on the same set of data. If you run the utility on your MOD, then fix some errors, you should run the utility again to make sure everything has been converted properly and that you have not introduced any new errors.

Step 4 – Open the MOD in the Attribute Editor


With the conversion process complete, you are now ready to open your MOD project in the Attribute Editor.


To open your MOD project in the Attribute Editor:


  1. Open the Attribute Editor.
  2. Select File > Open, then browse to your MOD.
  3. Click ‘Ok’.

The Attribute Editor will load all the files from your MOD, which may take a while. After this is completed, the attribute editor will pop up a list of the files that failed to load.

If Files Fail to Load


Changes to the Dawn of War data will almost certainly introduce issues in the converted data, which will prevent files from loading properly.


To find out which files are causing problems:


  1. Browse to the modtools directory and look for the warnings.log file. The warnings.log file should provide a list of problem files, along with a description of why each file failed.
  2. Open the failed .lua files from your MOD in the text editor of your choice (Notepad works well) and fix the problem listed in the warnings.log file.
  3. If there is no apparent problem with a file that fails to load, check the files it inherits or references.

You may have to go through a couple rounds of fixing before everything loads correctly.

File Inheritance Errors


If files fail to load, this is probably indicative of issues with improperly defined file inheritance.


To fix file inheritance issues:


  1. Look at the files that failed to load, and find what file from the w40k data they all inherit from.
  2. Open this file and compare it to the files that failed to load, looking for any time the failed files set a field in an extension that may have been removed or renamed from the inherited file.

Example:


weapon.nil has a reference to a requirements table in 1.2, but not in 1.3. Any weapons that try and set requirements without first referencing a requirements table are going to fail in 1.3.

If Dawn of War files are now broken


You may find that your MOD files load correctly, but a number of original Dawn of Wars files now fail. This is because you have overloaded a file that the Dawn of War data inherits from, and that file has changed in version 1.3 (for example weapon.nil). This will most likely happen if you have included files that you don't necessarily need to.


To fix these issues you can either remove any unmodified files you have included in your MOD, or replace the file with the new version found under Mod Tools?\Data Generic?\W40k\Attrib\.

General Comments




Step 5 – Save out the binaries


To save the binary files:


  1. Open your MOD in the Attribute Editor.
  2. Select File > Save Binary.

Note: You will be asked if you want to sync files to Perforce. This is a development message, so ignore it.


You should now have updated binary files.

Step 6 – Update any Win Conditions or Taskbar Changes


The Conversion Utility should make all the necessary data changes, but there are some other things that have changed in the 1.3 version.

Win Conditions


Any _local files that come along with Win Conditions will need the exclusive flag added to them and the always_on flag removed. Note that these files should only be included in your MOD if they actually modify the stock win conditions.

Taskbar


The taskbar.lua file has changed considerably to support Observer Mode, and so any hotkeys or other taskbar changes are going to have to be made to the new file.


Also note that tooltip_desc has been removed and it has been replaced with three separate variables.

Step 7 – Convert Module File


The format for the module file has changed – please take a peek at the sample my_mod.module for fields that have been added.

Step 8 – Load Converted MOD


Now that the conversion from 1.2 to 1.3 data is complete, you should now try to load your MOD in Dawn of War.


To load your converted MOD in Dawn of War:


  1. Start Dawn of War.
  2. Click the ‘Mod Manager’ button in the Main Menu, and select your MOD from the list.
  3. Click the ‘Activate’ button. Your MOD should now load.

MOD Loading Failure


If you have completed the conversion steps using the Attribute Editor, but your MOD still failed at loading, this likely indicates you have data that is syntactically correct, but still invalid.


To troubleshoot MOD loading issues:


  1. Check the warnings.log file for details of which files failed and why.
  2. Open your MOD in the Attribute Editor, or if you prefer, open the problematic .lua files in a text editor.
  3. Fix the problems listed in the warnings.log.
  4. Save out the binaries from your MOD.
  5. See if you can now load your MOD in Dawn of War.

Note: The most likely problem will be files that try to load abilities/research/squads that don't actually exist.


Modding Links


Relic Developer Network


http://www.relic.com/rdn/index.php (registration required)


Adeptus Modificatus – Official Dawn of War Modding Forums


http://forums.relicnews.com/forumdisplay.php?f=96


End of Page

Files [Hide files/form]
There is no comment on this page. [Display comments/form]