CurseForge.com Knowledge base

Curse Mod / Getting Started

Getting Started

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.

CMOD2 also lets users customize how the files will be installed using a simple scripting engine, powered by JavaScript. With the scripting engine you can modify parts of an XML file, copy optional files, and more.

Packaging Your Files

  1. To package your files, you'll need to download and install the Curse Client: http://www.curse.com/client
  2. 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.
  3. Select Tools > Create a Package
  4. 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.

  5. 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 entire folder.

    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.

  6. You should have all your files inside the list now. It probably looks something like this:


  7. 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\"


  8. Click Next to License Agreement
  9. 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.
  10. Click Next to Scripting
  11. 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 for us.

    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.
  12. 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.
  13. 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.
  • Packager_Files.png
    Packager - Files
  • Packager_RelativePaths.png
    Packager - Relative Paths

You must login to post a comment. Don't have an account? Register to get one!

  • 2 comments
  • Avatar of lilliehawkins lilliehawkins Apr 10, 2014 at 08:33 UTC - 0 likes

    Yes, absolutely! I was looking for this and fortunately here it is. I'm so thankful that I ame across to this site. Thanks for the share. -buy youtube packages

    Socialformula.com

  • Avatar of tyggyr tyggyr Oct 31, 2013 at 21:53 UTC - 0 likes

    I'm seeing this as an option under the client for WoTanks, but not when I have WoWarcraft selected - is this proper?

  • 2 comments

Facts

Date created
Jul 20, 2012
Last updated
Sep 11, 2013

Author