| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Adding and Editing Creatures

This version was saved 11 years, 9 months ago View current version     Page history
Saved by James Koppel
on August 20, 2012 at 6:11:56 pm
 

Project Ironfist distinguishes itself by the ability to add new content, and new creatures are the most important type. When we added our first creature, we needed to modify data tables in assembly, . Now, it can be done using little more than a text editor and a paint program. There's still a lot that goes into making a polished creature -- sound, animation, and game design -- but it is now possible to get a rough version up and moving in minutes.

 

It is recommended you already have the Project Ironfist repository set up, which you learn how to do in the Setting up the Repository tutorial.

 

To add a new creature, you will need to do the following:

 

  1. Create its art
  2. Set the frame info to control its animation
  3. Select sounds
  4. Package the resources
  5. Select its stats and metainformation

 

Unfortunately, putting creatures into a map still requires either getting your hands dirty with a hex editor, or removing an existing creature from the game.  We're currently working on a new map editor to fix this problem.

 

Also, at time of writing, we are unable to add new shooters, as we have not yet made it possible to set the graphics for a creature's projectile.

 

Making the Sprite

 

A creature starts off as a set of BMP images, one for each frame. This is mostly outside the scope of this tutorial. You can find spriting tutorials elsewhere, but there is no substitute for the hard work and critical eye needed to make good art. More detail on how to put art in the game is given in the Adding Artwork tutorial.

 

One issue specific to creature art is that, for the walking animation, the creature should be moving forward within the frame. However, for flying animations, the creature should be stationary; the game will smoothly move them to their destination. (This has the unfortunate consequence that, when flyers walk [because they are slowed], they will jerk from one hex to the next.)

 

Setting the Frame Info

 

Once you've packaged the creature art into an ICN file, you will need do instruct the game how to piece the frames together into animations, as well as set other information about how the creature is animated, such as its walking speed. Full details on how to do this are in the Controlling Creature Animation tutorial. 

 

Adding Sounds

 

You'll need to give your creature a short name, a four-letter abbreviation. For example, we use "kbld" for kobolds.

 

Every creature needs four sounds, for attacking, moving, taking damage, and dying. For kobolds, these must be named "kbldattk.82M", "kbldmove.82M", "kbldwnce.82M", and "kbldkill.82M", and similarly for other creatures, depending on the short name. Shooters need an additional fifth sound for shooting. If kobolds could shoot, this would be called "kbldshot.82M".

An "82M" file is a raw WAV file with playback rate 22050 Hz. Various standard tools such as Audacity are capable of dealing with raw WAV files. At some point, we'll write a tutorial on how to package sounds for the game. You can always skip the sound design by copying and renaming sounds from a different creature.

 

Packing Resources

 

The artwork, creature form, and sounds together give everything the game needs to display your creature. The final step in getting the data into the game is to package them together with the other game resources. Add the graphics, frame information, and sounds from the previous section to a folder, along with all other game resources, and then use the H2AggPack utility. Full details on how to do this are in the Packaging Resources tutorial.

 

Setting Creature Data

 

 

 

Adding to Maps

 

We have not yet modded the map editor, so we really don't have a proper way of putting creatures into maps. Still, if you want to see your creature moving, you can manually hex-edit a map to add it in.

 

In the normal Heroes 2 map editor, create a neutral town, and put 1337 Water Elementals in the garrison. Save the map. Open the map file in a hex editor, and search for the number "1337." This should bring you to the part of the map that specifies that the garrison has 1337 Water Elementals. You should see the number 65, the ID of Water Elementals, adjacent to the 1337. Change the ID to the ID of your creature, and change the quantity to whatever you want. Load the map in the game. Congratulations! You've fully added a creature.

 

Why are we adding them to the garrison of a neutral town? There are still a few things we have not put work into figuring out how to do: primarily adding in the portraits that display when you view a creature in your own army. We do know that the biggest challenges will be legal ones though: To do this, we will either need to substantially modify the code, or put your artwork in the same file as original artwork from the game. 

Comments (0)

You don't have permission to comment on this page.