Monday, July 21, 2008

How to Add BUG to Your Mod

Alerum's AvatarMerging together Mods can be difficult, and even more so with the BUG Mod. To add the BUG Mod to your mod, or even to combine with other mods, there are some things we will have to explain before you even attempt the merge.

The BUG Mod currently holds all of its options within a single file, "BUG Mod.ini". This file should be installed within your "...\My Documents\My Games\Beyond the Sword\BUG Mod\" folder. The reason why we have done this is to allow the user to keep their settings, regardless of which Mod containing BUG they are playing. It also allows us to store our other files in one location, reducing clutter in the root Beyond The Sword folder. For BUG Mod to work properly, this file must be in this location.

If you are just creating a Mod for the first time, I strongly suggest to use the BUG Mod as a base for your Mod, before adding any others. There is a good chance that any Interface Mods you will be adding, will already be included in BUG, and we've done a lot of the work for you already. If you have already added some changes, then you will need to use comparing software (such as Eclipse, or WinMerge) to find the differences between the files. I won't go into detail on this step, but if you have more questions about this, there are several good post at Civilization Fantics Forum.

The next piece of advice I can give: Take the latest files we have from the SVN on our SourceForge Page. Don't wait for us to make a new release, or you may miss alot of good features that are contained on the SVN. We keep the SVN in a fairly stable state, and have several users who give us good feedback on the current state of the SVN, so don't worry about bugs popping up to much. Steps for downloading from the SVN are located on the first post of the thread here.

Here are the steps you should follow to ensure BUG will work with your Mod. The directions are giving assuming a new install.:

  1. Either download the latest full release, or as recommended, download from SVN.
  2. I like to work from the desktop, so I'll use that as a reference here. Create a directory on your desktop called "Beyond the Sword".
  3. Within that directory create another named "Mods".
  4. Place a copy of your Mod within the Mods directory you just created.
  5. Copy "CustomAssets" into "Mods\Your Mod's Name".
  6. If you have no other modifications done yet, then you can just rename CustomAssets to Assets, within your Mod's directory. If you already have modified files within your Mod, then you will need to merge any conflicts you get with a program like WinMerge, then copy the contents of CustomAssets to your working Assets directory.
  7. Copy "BUG Mod" directory into the main "Beyond the Sword" directory.

That should give you a complete working copy of BUG within your mod. To make sure, copy that directory in the your "My Docs\My Games" directory. Copy the whole thing, even the Beyond the Sword directory. Once you have done this, then go ahead and fire up a game. You should see a blinking Message that says "Press Alt + Ctrl + O for BUG Mod Options..." Go ahead and do it. You should see all the options displayed there. If not, make sure you didn't forget a step.

Now to Customize the Mod. You can change the display of the Mod name withing the BUG Mod Options by editing the file within the "Python\BUG\Contrib" folder called "". You only want to edit two of the lines, and they are:

  1. displayName = "BUG Mod". Change "BUG Mod" to the name of your Mod.
  2. ModVersion = "X.X [Build XXXX]" The X's will be replaced by the current Mod Version of the BUG Mod. Change "X.X [Build XXXX]" to reflect your Mod version. To help with tracking of errors, please change [Build XXXX] with the current revision you got from SVN, or else keep the same if taken from a full release.
  3. Be sure to include the Quotations!

After this, you should be on your way! You may want to keep a working copy in a safe place, to make sure you can return to a clean version to prevent having to repeat these steps. And update the SVN regularly to ensure your users are getting the most update version avaliable.

One final Note: Please do not change the Credits tab within the BUG Mod Options Screen, and if you would like to call up your own help file, then include all the help files for BUG as well, to ensure the user will have all information they need for the BUG Mod, without having to go to the forum. Thank you!

No comments: