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

  • Finally, you can manage your Google Docs, uploads, and email attachments (plus Dropbox and Slack files) in one convenient place. Claim a free account, and in less than 2 minutes, Dokkio (from the makers of PBworks) can automatically organize your content for you.


Setting Creature Stats

Page history last edited by Hongxuan Zhang 4 years, 7 months ago

Some of this is covered in the video tutorial Modding with an Iron Fist: Episode 3: Adding New Creatures: http://www.youtube.com/watch?v=jLEjN6YkvEQ


Project Ironfist makes it very easy to add new creatures and modify their attributes. After you install the game (see Download), it adds the creatures.xml file to your Heroes II data folder, which lets you tweak creature stats with an ordinary text editor such as Notepad and have them instantly reflected in the game. This is a detailed guide to how to set creature stats using the creatures.xml file; see Adding and Editing Creatures for the basics of how to deal with new creatures.


Overview of creatures.xml


creatures.xml is an XML file. XML is a very simple format for storing structured data as ordinary text. You can learn more at a dedicated XML tutorial such as http://w3schools.com/xml/default.asp , but, for dealing with Project Ironfist, you only need to follow a single example.


 <creature id="73" name-singular="bloodsucker" name-plural="bloodsuckers" icn="bloodsuc.icn" frm="blds_frm.bin" cost="150" fight-value="500" fight-value-aux="20" growth="6" hp="7" faction="6" speed="6" attack="6" defense="1" shots="0" short-name="blsc">
       <damage minimum="2" maximum="3"/>
       <creature-attribute name="flies"/>
       <random-spawn minimum="20" maximum="30"/>


creatures.xml contains a list of creature declarations similar to the above. To create a new creature, simply copy one such declaration and place it after the last "</creature>" ("end creature declarations") but before the "</creatures>" ("end creatures list"). You can then modify all the values in quotes to change its information. 


Attributes of the "creature" tag




A unique ID for the creature. IDs should be in ascending order; i.e.: if the last creature has ID 77, your new creature should have ID 78.




 The singular form of the creature's name. Should be lowercase. Example: "harpy"




The plural form of the creature's name. Should be lowercase. Example: "harpies"




The name of the .ICN sprite archive file which contains the creature's battle graphics. See Adding Artwork for instructions on how to create these files and get them in the game. Case-insensitive. Example: "harpy.icn"




The name of the FRM.BIN creature-frame information file which tells the game how the creature's art fits into animations. See Controlling Creature Animation for instructions on how to create these files and get them in the game. Case-insensitive. Example: "hrpy_frm.bin"




The cost to recruit the creature in gold. At time of writing, you cannot assign a creature's secondary resource costs. (Please ask if you want this; it should not be too hard.) Example: "500"




A number which tells the game AI how "good" the creature is. Should range between 0 and 65535. Example: "28144" (for the Black Dragon, the highest fight-value in the game).




Another number used by the game AI to determine how "good" a creature is. In particular, used by the AI when deciding whether to build a creature dwelling. Should range between 0 and 255. Example: "79" (for the Titan, highest in the game)




The weekly growth of the creature. Does not include the Well or special-growth buildings. Should be between 0 and 255.




The hit-points of a creature. Should be between 0 and 65535.




The faction of a creature. Should be 0,1,2,3,4,5, or 6 for Knight, Barbarian, Sorceress, Warlock, Wizard, Necromancer, or Neutral, respectively.




The speed of a creature. All current creatures range from 2 ("Very Slow") to 6 ("Very Fast"), but can be higher or lower.




The Attack skill of a creature. Should be between 0 and 255.




The Defense skill of a creature. Should be between 0 and 255.




The number of shots a creature has. Should be 0 for non-shooters. Should be between 0 and 255.




A four-letter "short name" which determines what the creature's sounds are called. For example, both the Archer and its upgrade, the Ranger, have short name "arch". Their sounds are thus "ARCHATTK.82M", "ARCHWNCE.82M", "ARCHKILL.82M", "ARCHMOVE.82M", and (because they are shooters) "ARCHSHOT.82M". Case-insensitive. See Adding and Editing Sounds for information on how to get sounds in the game.


Children of the Creature Tag




The damage the creature can deal in combat. Example: <damage minimum="3" maximum="7"/>




Stacks of a creature will randomly spawn at the start of certain months. For example, at the start of the "Month of the Wolf," stacks of Wolves will spawn all over the map. This controls how many of that creature will spawn in each stack. Example: 

<random-spawn minimum="10" maximum="20"/>




Sets that the creature has some attribute or ability. Example: <creature-attribute name="flies"/> makes the creature a flyer. Valid options for the "name" field are "two-hex", "flies", "shoots", "two-hex-attack", "undead", and "strike-and-return". Note that most creature abilities, such as the Dwarf's magic resistance or the Vampire Lord's regeneration, are currently hardcoded into the game. If you'd like to provide these abilities to your creatures, please ask, and we'll make it possible.




Configure the secondary resource cost for creatures. Example: <secondary-cost resource="ore" cost="2"/> makes the creature cost 2 ore. Valid options for the "resource" field are "wood", "mercury", "ore", "sulfur", "crystal" and "gems". Note that some creatures (Genie, Phoenix, Cyclops, Green Dragon, Black Dragon, Giant and Titan) already have default secondary cost. If you add a secondary resource cost for one of these creatures, it will override the default one. Right now, Ironfist only support one secondary resource cost per creature. You will expect to see an error message window pops up at startup if you assign more than one secondary resources to a single creature.



Comments (0)

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