This is a Capitalism 2 mod kit, written by Adam Milazzo (http://www.adammil.net).
It's based on my reverse-engineering effords described at
http://www.adammil.net/blog/v112_Reverse_Engineering_Capitalism_2.html

It requires the .NET Framework version 3.5 or later, which you probably
already have.

It consists of four programs:
* dbmod allows editing the cap2 database (i.e. gameset\1STD.SET) file, which
  allows you to edit many types of properties within the game, and to add new
  products and production rules. It requires an installed copy of Microsoft
  Excel 2007 or later.
* icnedit allow editing the ICN/COL files within the game's "image" directory,
  which allows you to edit some of the user interface graphics.
* iresedit allows editing the I_foo.RES/P_foo.RES pairs in the game's
  "Resource" directory, which allows you to edit product and CEO images, but
  not to add new ones or delete existing ones. (However, see prodedit.)
* prodedit allows more advanced editing of the I_ITEM.RES/P_ITEM.RES pair in
  the game's "Resource" directory. In particular, it allows you to add new
  product images and delete existing product images.

Here's how to use them. First copy the files from the build directory to a
convenient location.

Then, to use dbmod:
1. Make a backup copy of your gameset\1STD.SET file.
2. If you're not running Capitalism 2 version 1.03, first export your game
   database into the Excel file by running the following command:
     dbmod export 1STD.SET data.xlsx
   (The included data.xlsx file has been generated from version 1.03. This
   assumes you've changed to the "gameset" directory first.)
4. Modify the data.xlsx file using Excel and save it.
5. Import the changes back into the game database by running this command:
     dbmod import 1STD.SET data.xlsx
6. Repeat from step #4 if you want to make further changes.

Notes:
* The integrity of both the game database and the Excel workbook must be
  maintained because both the import and export process require a valid game
  database and a valid Excel workbook with all the right placeholders in it.
* Don't rename or delete columns or worksheets. You can add additional columns
  and worksheets if you like.
* You can add and remove rows to and from the game database, but I can't promise
  that the game will work. The game makes hardcoded assumptions about some things.
* Columns have length limits that are not validated by Excel. The import will
  fail with an error if you exceed a length limit.

To use icnedit, for example to edit the image/worldmap.* files:
1. Make a backup of the image\worldmap.ICN and image\worldmap.COL files.
2. Export the ICN/COL pair to a PNG file using the following command (which
   assumes you've changed to the "image" directory first.)
     icnedit export worldmap.icn worldmap.png
3. Edit the worldmap.png file that was generated. The file must be saved as an
   8-bit indexed file. (Note that some versions of Paint.NET have trouble
   saving 8-bit PNG files. It actually saves it as a 32-bit PNG file. If you
   have trouble convincing your edit program to create an 8-bit PNG, you can
   save it as a GIF file instead.)
4. Import the PNG file back into the ICN/COL pair:
     icnedit import worldmap.icn worldmap.png
You can make additional edits by restarting from step 3, or delete
worldmap.png if you're done making changes.

iresedit lets you edit the I_ITEM.RES, I_PERSON.RES, and I_PIE.RES files in
the "Resource" directory along with the corresponding P_*.RES files. I_ITEM
contains product images and I_PERSON contains CEO images. I_PIE has some
graphics used to construct pie charts. To use it:
1. Make a backup of the Resource\I_foo.RES and Resource\P_foo.RES files.
2. Export the images into a directory using the following command (which
   assumes you've changed to the "Resource" directory first.)
     iresedit export i_item.res products
3. Edit images found within the products directory. The files must be saved as
   8-bit indexed images. (Note that some versions of Paint.NET have trouble
   saving 8-bit PNG files. It actually saves them as 32-bit. If you have
   trouble convincing your edit program to create an 8-bit PNG, you can save
   it as a GIF file instead, and then rename the GIF file to PNG.) You can
   delete images that you don't want to edit, but it's not required.

4. Import the edited images back into the resource files:
     iresedit import i_item.res products
   Note that if you added any new images, they will be ignored, and if you
   deleted images from the directory, they will not be removed from the
   resource files. Only prodedit can add and delete images.
You can make additional edits by restarting from step 3, or delete
the "products" directory if you're done making changes.

prodedit lets you edit the I_ITEM.RES/P_ITEM.RES files in the "Resource"
directory, which contain product images. Unlike iresedit, prodedit allows
you to add new product images and delete existing product images. To use it:
1. Make a backup of the Resource\I_ITEM.RES and Resource\P_ITEM.RES files.
2. Export the images into a directory using the following command (which
   assumes you've changed to the "Resource" directory first.)
     prodedit export i_item.res products
3. Edit images found within the products directory. You can also add new
   images, but they must be named with 1-8 low ASCII characters and a PNG
   extension. (So BRASSBALLS.PNG is not okay, but BRASBALS.PNG is.) All images
   must be saved as 8-bit indexed images. (Note that some versions of
   Paint.NET have trouble saving 8-bit PNG files. It actually saves them as
   32-bit. If you have trouble convincing your edit program to create an 8-bit
   PNG, you can save it as a GIF file instead, and then rename the GIF file to
   PNG.) If you delete images from the directory, they will be deleted from
   the resource files during import.
4. Import the edited images back into the resource files:
     prodedit import i_item.res products
   Note that if you added any new images to the directory, they'll be added to
   the resource files, and if you deleted any images from the directory,
   they'll be deleted from the resource files. If an error occurs, the
   resource files will be corrupted and you must rerun step 4 after correcting
   the error.
You can make additional edits by restarting from step 3, or delete
the "products" directory if you're done making changes.

If you want to compile everything from source, you'll need my IO and Utility
libraries: http://www.adammil.net/AdamMil.net
Sorry for the duplicated code!

If you have any trouble, feel free to contact me:
http://www.adammil.net/contact.html
