Adding Artwork


You can also learn much of this by watching the video tutorial "Modding with an Iron Fist: Episode 3: Adding New Creatures," http://www.youtube.com/watch?v=jLEjN6YkvEQ

 

Heroes II stores graphics in its own format called ICN. Each ICN file contains many related spirtes. For example, PIKEMAN.ICN contains all of the pikeman's combat graphics and animations, while ARTIFACT.ICN contains full-size portraits of every artifact in the game. This tutorial explains how to turn your art into an ICN file so that it can be added to the game. You will need to download the Ironfist tools, IronfistTools.zip .

 

Perhaps the easiest way to understand how to prepare art is to see an example. You can unpack any existing ICN file by dragging and dropping it onto "H2IcnUnpack.exe" . See Packaging Resources to learn how to access the ICN and other data files used by Heroes II.  Here's an example of what the pikeman graphics look like when unpacked:  pikeman.zip .

 

Using the ICN Importer

 

The overall setup is that you will create a folder named something like "MY_ART.ICN.cadres", place all frames inside the folder along with a special file called "setup.ini," and then run the program "ICNPack" on it. The ICNPacker is included in the "tools" directory of the Project Ironfist git repository. You can also download it separately here: (IronfistTools.zip )

 

 

Image Format

 

 

Notes on the HoMM II Palette

 

This is the HoMM 2 palette:

 

 

 

Note that some of the first colors are actually special "control" colors. We use special colors not in the image above to specify them to the ICN importer tool.

 

 

Furthermore, some additional colors on the palette are treated specially by the game, and are involved in "Color Cycling." The game will automatically rotate between the colors every frame to produce some "animations." For example, the game cycles between several blues to animate its sea tiles, and between several reds and oranges to animate its lava tiles. If you unintentionally use a cycled color, your art may appear to "blink."

 

This GIMP palette file contains all colors of the HoMM 2 palette in the correct order, along with the special control colors: HoMM2.gpl

 

Converting other Images to the Palette

 

These instructions are for the GIMP. We would also like to have documentation on how to do this in Photoshop.

 

Use this GIMP palette file: HoMM2.gpl

 

Install it in your GIMP palettes directory.

 

To convert an image, open it in the GIMP, then go to Windows > Dockable Dialogs > Palettes > R-click > Import Palette . 

 

 

 

Creating the setup.ini file

 

The setup.ini file will control the order the images will appear. It looks like this:

 

[Position]
X=0
Y=0
[Bits]
first_image.bmp=0
second_image.bmp=0
...
last_image.bmp=0


You can set the "X" and "Y" fields in setup.ini to shift all frames by those amounts. If you write "-X" and "-Y" as the offsets, then you are essentially making pixel (X,Y) the reference pixel, meaning the game will use that pixel to position the graphic.

 

Running ICNPack

 

 

Place all the images in a folder. Name the folder what you want the ICN to be called followed by ".cadres". For example, if you want to produce a file called "PIKEMAN.ICN", then you will need to name the folder "PIKEMAN.ICN.cadres".

 

Now, add create the setup.ini file as explained above.

 

To transform the folder of images into an ICN sprite archive, you'll again need the Ironfist tools ( IronfistTools.zip  ) . Drag-and-drop the folder onto "H2IcnPack.exe", and it will create your ICN file.

 

 

Instructions for Ironfist Artists Exporting Art

 

As an Ironfist artist, you are responsible for delivering the frames of a creature in the correct format.Deliver one zip file containing a folder name <ICN_NAME>.ICN.cadres . The ICN name to use is given in the asset list, https://docs.google.com/spreadsheets/d/1y-gvrztkAMGj11rl_c7oRfU-BhxDh67baKPgyqE7o2Y/edit#gid=0 . So, for example, the graphics for the Shadow Assassin will be in a folder called "SASSASSN.ICN.cadres" .

 

If you are creating all the frames for an ICN (as opposed to adding to an existing one), then you are also responsible for numbering the frames correctly. See the section above for what the requirements on the format and numbering are. You are not responsible for creating the "setup.ini" file, nor for running the ICNPack tool.

 

You are also responsible for providing a couple numbers:

 

 

 

 

 

Some constraints on creature graphics:

 

Formatting Graphics in Photoshop

 

All exported frames must be BMP files. It turns out there are many different kinds of BMP files, and the Ironfist tools are very picky about which kind you use. Follow these instructions to ensure your exports are in the right format:

 

When you begin a new asset, do the following at the start of the project:

 

  1. Set the color mode to "Indexed Color":



  2. Under the "Forced" menu, select Custom Palette, and then set it to the following palette:  ironfist_palette_photoshop.act

    The menu should now look like this:



  3.  

 

When you export a graphic, do the following:

 

  1. Merge layers 
  2. Save the graphic as a BMP.