You've got an awesome mod and now you want to allow millions of Curse Client users to install it without any hassles. For games where all the mods sit together in the same folder, we've created Curse Mod 2 (CMOD2) and a packaging tool built-in to the Curse Client to help make packaging your mods easy.
About Curse Mod 2
Curse Mod 2 (CMOD2) is a standard ZIP archive where the files inside are organized so they can be easily copied from the ZIP into the game's mod folder. In a non-CMOD2 ZIP you may have all your files in the root and use a readme file to desribe to the user where each file goes. CMOD2 allows you to strictly define where the file should go relative to the mod folder.
Packaging Your Files
- To package your files, you'll need to download and install the Curse Client: http://www.curse.com/client
- Once installed and logged in, you should see a list of your installed games on the left. Select the game you want to package your mod for. For this example, we'll be using The Secret World.
- Select Tools > Create a Package
- Select "Create a Mod Package"
Note: After you've created your first package, you can come back and open it when you have an update ready. This will let you swap out the updated files without recreating the entire package.
- If you already have a ZIP of your mod, you can click "Add Archive" to
import everything you need. Otherwise, you can add files manually or add an
By default, your readme and some other files will be unchecked. This means they will be in the ZIP, but wont be copied into the game folder. This allows users who download the file without the Curse Client to still have the readme but not clutter up the game folder for those who do use the Curse Client.
You may have noticed that for The Secret World, "*Prefs.xml" and "Modules.xml" are unchecked. This is because the user probably already has these files from other mods so we'll need to script this part. Leave the files in the package unchecked so non-Curse Client users can still use them.
- You should have all your files inside the list now. It probably looks
something like this:
- Everything is at the root so far, but we need the .swf files to go
inside of a folder. To do this, we simply select the file in the list and
add the folder path to the begining of the file. For mine, I add "Flash\"
- Click Next to License Agreement
- You can provide a license agreement to the user if you want to emphasis copyright and usage terms. If you enter a license agreement, it'll be required for the user and they will be prompted when they install / updated the mod.
- Click Next to Scripting
- Because this is a TSW mod, we need to update 2 XML files, to do this
will be using the "xmlCreateOrUpdate" API - This allows us to insert an XML
element into an existing file. If the file doesn't exist, it'll create one
xmlCreateOrUpdate('CharPrefs.xml', '/Root', '<Value name="TSWRPCharacterViewer" value="true"/>');
In the API, we're telling the Curse Client the file we want to create or update, the XPath of where the element will go, and finally the element string that will be inserted. We call this method for each element we wanted to add.
- Click Next and save your package. Tip: It's best to save the package as the same name as your mod - You can leave any version information out if you want.
- Now head on over to http://tsw.curseforge.com and upload your file like normal. Our team of moderators will need to approve the file before users can start installing it from the Curse Client.
- 8 comments
- Date created
- Jul 20, 2012
- Last updated
- Sep 11, 2013