Modder's Starter Package

Thalassicus

Bytes and Nibblers
Joined
Nov 9, 2005
Messages
11,057
Location
Texas
.
Download

Here's a mod starter package with all the basics. To use it takes 3 easy steps: #1 download and load the template, #2 personalize it, and #3 create new mods with it. Templates are a helpful way to create some parts of a new mod automatically. I use a version similar to this for my own mods.

This automatically creates the following for new mods:
  • Mod - General.xml - with basic fill-in-the-blanks <Update> framework.
  • Mod - General.sql - can leave empty if you make no SQL edits. *
  • Mod - General.lua - can leave empty if you add no Lua code.
  • Mod - Readme.rtf - with several sections to add your details, contact info, etc.
  • The necessary links for the XML and SQL files in the Actions tab of the project properties, and the Lua file in the Content tab.

* Sql files must have at least 1 character of text. A -- double hyphen works.

--- Load the Package ---

  1. Download the attached ZIP file into this folder (do not unzip it, ModBuddy will handle that automatically):
    C:\<username>\Documents\Firaxis ModBuddy\Templates\ProjectTemplates
  2. Start ModBuddy.
  3. Click the New Project button.
  4. On the left, under Installed Templates, click the top Civilization 5 entry and select Mod Template.
  5. Name the new project "Mod Template".
  6. Click OK.

--- Personalize the Template ---

Note: all changes to files in the Template will be included in every mod you make with it later.
  1. In the Solution Explorer (on right) right-click the Mod Template project and select Properties.
  2. Enter your name in the Author box (or names of all co-authors working on your mod projects).
  3. In the Solution Explorer double-click Mod - Readme.rtf
  4. Update information in the sections included here with your name(s), contact information to leave feedback, etc.
  5. Click ModBuddy's File menu > Export Template.
  6. Click Next.
  7. Give your template a name. You can keep it as "Mod Template" if you want, and it'll replace the old one. If you pick a new name, you can delete the old template afterward from the folder you downloaded it to.
  8. Uncheck "Display an Explorer window on the output files folder".
  9. Click Finish.

--- Create Mods! ---

  1. Click the New Project button.
  2. Select the template.
  3. Name your mod.
  4. Click OK.
  5. In the Solution Explorer (on right) right-click the project name and select Properties.
  6. Next to the ModID field, click New. Mods must have a unique ID. This is very important!

That's all! Now you can add whatever you wanted to your mod. Details of how to create mods can be found in Kael's excellent Modder's Guide to Civilization V. Make sure to remove the basic Update framework in the XML file if you won't be making any XML edits. Also update the project properties and readme.rtf with appropriate information for your mod each time before you upload a new version to the online Civ V Mod Browser. You can open the readme.rtf file in Word to add formatting like fonts, bullets and so on.

To test a mod:
  1. In the ModBuddy menus go to Build > Build Solution.
  2. Open Civ V and enable your mod under Mods > Installed Mods.
  3. Start a new game on Civ V's Mods > Single Player menu. Mods will not have an effect under the normal Single Player menu.
  4. Sometimes mods disappear from the Civ V mod list when built, robk created a solution you can download here.

To upload your mod, go to the ModBuddy menu Tools > Online Services, and log in. Note there appear to be a few bugs:
  • Mod names with an apostrophe ( ' ) in the title will error when attempting to upload.
  • Mod descriptions over 1000 characters in length error on upload (not 1024 as stated in ModBuddy).
  • All files in mod packages must have a "." with an extension at the end of the filename. For example, I had a file simply to give people instructions, but this causes the Civ V ingame mod installer to crash:
  • If the list of uploads is taller than the window, the scrollbar is broken. You must click an entry in the list and use up and down arrow keys.
  • ModBuddy will sometimes permanently break with a logon username. You'll have to register a new username. Any attempts to log on Online Services with the old username will crash ModBuddy.
  • Some people have been unable to access mods through the online Civ V Mod Browser. As such, it helps to post a thread about your mod on a forum, such as here at CivFanatics, with a manual download. Offer a link to this in your online mod description. http://tiny.cc/ is a useful service for shortening links.
  • There's some significant load order issues in Civilization.
    • CiV loads all mods in the order they were installed when the "Single Player" button is clicked on the Mods menu.
    • Each loaded mod overrides changes from earlier-loaded mods, which will often cause bugs in otherwise perfectly working mods.
    • CiV does not read the creation, modified, or access dates of files to determine this load order - it appears to be stored somewhere internally.
    • The only way I know of to manually set this load order is delete mods and re-install them with the 'install' button ingame.
    • There is an interface for mod dependencies and load order in ModBuddy, but the service was not finished and only the UI for it remains.

The "Mod" prefix before each file name you can change to an acronym for your mod (make sure the file name matches in the Actions and/or Content tab of the project properties). I labeled the files in the manner listed earlier so you can create specific files as containers for particular types of information. For example, in Balance - City Development I have a BCD - Buildings.xml file for building edits, and a BCD - General.xml file for miscellaneous stuff. This helps keep track of what edits are where.
 

Attachments

  • Mod Template.zip
    10.4 KB · Views: 1,695
  • NoExtension.JPG
    NoExtension.JPG
    26.2 KB · Views: 11,528
This uses the existing mod tools. ModBuddy is just a mod of Visual Studio, which I use at work and is how I knew about templates. I use a template like this to create mods. For new modders it can be a helpful starting point, and for experienced modders a template can help speed up workflow.

As for how to actually do the modding part... check out Kael's Modder's Guide to Civilization V. It's a great resource, and I used it to get started. He goes over a lot of stuff in it, such as how to modify existing things or add new things.
 
I updated the download and tutorial with the appropriate links for a Lua file if you wish to do Lua coding (it's necessary to have a Content tab entry).
 
This may be a silly question but I don't see any executable file in the package?

What am I missing here?
 
Those references to "ModBuddy" refer to the development environment that is part of the Civilization V SDK (for and from which these templates were created). It's installed through the "Tools" section of your Steam game library. Though the Modder's Guide linked above is outdated, you will find it very useful.
 
Does a BNW version exist or will it exist?
  1. Thalassicus has not been an active modder in Civ5 for longer than I can remember, so not very likely.
  2. I would need to take a much closer look to be sure, but it would appear that probably none of the information presented relating to uploading mods to Steam Workshop is valid any longer. Many changes in procedures have been made to streamline and strengthen the robustness of the process. For example, all you need is your steam account, and that you be in 'Online' mode in the steam client when you start ModBuddy. There is no need for additional 'logons' or 'usernames' associated with Modbuddy and uploading to Steam Workshop.
  3. See Modding Basics (by ceej12) This is a guide on Steam which shows the steps needed to upload a mod to Steam Workshop. Even this is a bit out of date, however, because Steam has added additional pop-ups that must be navigated through when uploading a new mod to the Workshop (as opposed to updating an existing one) having to do with accepting even more terms of use agreements for Steam Workshop.
 
Top Bottom