| 
  • 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
 

Setting Creature Stats

Page history last edited by Hongxuan Zhang 7 years, 10 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"/>
 </creature> 

 

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

 

id

 

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.

 

name-singular

 

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

 

name-plural

 

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

 

icn

 

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"

 

frm

 

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"

 

cost

 

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"

 

fight-value

 

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).

 

fight-value-aux

 

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)

 

growth

 

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

 

hp

 

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

 

faction

 

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.

 

speed

 

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

 

attack

 

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

 

defense

 

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

 

shots

 

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

 

short-name

 

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

 

damage

 

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

 

random-spawn

 

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"/>

 

creature-attribute

 

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.

 

secondary-cost

 

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.