This guide is aimed at anyone and everyone that wants to do creature editing. It tells beginners how to get started, but has useful reference material for even the more experienced editors. I have assumed throughout that you have either read my hex-editing guide or already know how to hex-edit. Of course, you can still use this guide if you can’t but you need knowledge of hex-editing to edit some stats for creatures.
In truth, it is impractical and very time-consuming to “create” a new creature from scratch. Therefore, neither of the editors gives you this option. Instead, choose the existing creature that is most similar to the one you want and edit it. You will need to use BiffTool to extract the Creatures.bif file,which can be found in the Baldurs Gate 2/data folder. This contains all the creature (CRE) files for the game.
I haven’t included ICM because it is not primarily a CRE editor and in the version I tested, there seemed to be a problem importing creatures, ie. all their attributes would be reset to the ICM defaults. References and site links are at the bottom.
Shadowkeeper: http://www.mud-master.com/shadowkeeper/
BG2 Character Control: http://www.teambg.com/
Infinity Engine Editor Pro: http://www.teambg.com/
Infinity Explorer: http://infexp.sourceforge.net/
BiffTool: http://www.teambg.com/
Any hex-editor will do: http://www.google.com/search?q=Hex-Editors
The hex-editing reference, Infinity Engine File Format Hacking Project (IEFFHP): http://www.ugcs.caltech.edu/~jedwin/baldur.html#FileFormats
OK, first of all here’s a table listing all the editable features of a creature and whether each program can edit them or not. SK = ShadowKeeper, CC = BG2 Character Control.
All acceptable values or references to a list of acceptable values are also given. Note: if a filename is given, for .IDS files look in your Baldurs Gate 2/scipt compiler/ folder. IDS files have numbers and explanatory text next to them. The numbers are what should be entered if you are hex-editing, NOT the hex code for the text!
Statistics are listed in alphabetical order for ease of reference. For detailed information on each feature, see the Detailed Editing section.
Feature to edit |
SK |
CC |
Reasonable/Acceptable Values |
AI script, class |
No |
No |
String ref to any script
file |
AI script, default |
No |
No |
String ref to any script
file |
AI script, general |
No |
No |
String ref to any script
file |
AI script, override |
No |
No |
String ref to any script
file |
AI script, race |
No |
No |
String ref to any script
file |
Alignment |
Yes |
Yes |
Alignment.ids |
Armour Class (base) |
Yes |
Yes |
-10...10 |
Attacks per round |
Yes |
Yes |
0…5 |
Avatar animation |
Yes |
Yes |
Animate.ids |
Charisma |
Yes |
Yes |
0…25 |
Class(es) |
Yes |
Yes |
Class.ids |
Colours |
Yes |
No |
See colour gradient scheme |
Constitution |
Yes |
Yes |
0…25 |
Dexterity |
Yes |
Yes |
0…25 |
Effects on creature |
Yes |
No |
Spell effects |
Enemy/Ally status |
No |
Yes |
EA.ids |
Experience earned |
Yes |
Yes |
0… |
Experience levels |
Yes |
Yes |
0… |
Experience worth |
No |
Yes |
0… |
Fallen ? (rangrs, pals) |
No |
Yes |
0/1 |
Fatigue level |
No |
No |
0…100 |
Gender |
Yes |
Yes |
Gender.ids |
General category |
No |
No |
General.ids |
Gold held |
Yes |
Yes |
0… |
Hit Points (base) |
Yes |
Yes |
0… |
Intelligence |
Yes |
Yes |
0…25 |
Intoxication level |
No |
No |
0…100 |
Inventory |
Yes |
No |
Any items |
Kit |
Yes |
Yes |
Kit.ids |
Lore |
No |
Yes |
0… |
Morale (base) |
No |
No |
0…255? |
Morale breaking point |
No |
No |
0…255? |
Movement Speed |
Yes |
No |
± x |
Name (long) |
Yes |
Yes |
String |
Racial Enemy |
Yes |
Yes |
Race.ids |
Race |
Yes |
Yes |
Race.ids |
Recovery Time |
No |
No |
0…255? |
Reputation |
Yes |
No |
0…20 |
Resistances |
Yes |
Yes |
0… |
Saving throws |
Yes |
Yes |
1…20 |
Specifics |
No |
No |
Specific.ids |
Spell Memorisation |
Yes |
No |
0…? |
Spells-innate |
Yes |
No |
Spell.ids + customs |
Spells-priest |
Yes |
No |
Spell.ids + customs |
Spells-wizard |
Yes |
No |
Spell.ids + customs |
Strength |
Yes |
Yes |
0…25 |
Strength+ |
Yes |
Yes |
1…00 |
THACO |
Yes |
Yes |
± x |
Thieving skills |
Yes |
Some |
0… |
Weapon proficiencies |
Yes |
No |
0…7? |
Wisdom |
Yes |
Yes |
0…25 |
Detailed Editing – Things to look out for!
This section includes any extra details that are not immediately clear from the table and/or from just looking at the program interface. Again, in alphabetical order.
The hex offsets were taken from the Infinity Engine File Format Hacking Project website.
AI scripts – There are 5 levels of AI scripts, which describe how a creature behaves. If no AI script is specified, the creature will simply stand there and do nothing. Of course, when you are editing an existing creature, it will already have an AI script so you don’t have to worry about this.
The order of priority from lowest to highest is: default, general, race, class, override. It doesn’t really matter which script you put in which “slot” as long as you have the more important ones in a higher priority slot than the less important ones. If you make a custom script, put the .bcs file in the override folder and hex-edit the CRE file, entering the filename in the text section without the .bcs suffix. The fields are all 8 bytes long and the offsets are: 248h override, 250h class, 258h race, 260h general, 268h default.
Alignment- This setting can play an important part in any scripts that the creature may feature in. For example, a script may have an action that effects all chaotic evil creatures, so think about which existing creatures have what in the game and set this accordingly. Also, some spells effect only evil or only good creatures, so it DOES matter what you set this to.
Armour Class (base) - This is the AC of the creature before any bonuses are added. For example, keep in mind that if you give your creature 18 DEX the actual AC will be 4 better than this.
.
Attacks
per Round –
The base number of “natural” attacks the creature has. This does not take
weapon proficiencies into consideration. For example, if you set this to 1 and
the creature has a high proficiency in the weapon it is using, it will actually
have more attacks than this.
Avatar
Animation –
This sets what your creature actually looks like, ie. which set of BAM files it
uses for its animation . Altering this to a non-default value will be like
visually shapeshifting the creature, but stats remain unchanged, except for
movement speed, which is effected by animation type. For example, changing the
animation type to “Lich” will result in the creature moving very slowly.
Beware: Trying to use certain animations with certain classes or “general”
types of creatures may crash the game.
Colours – All creatures have colour
settings, not just the playable ones. There are settings for different parts of
the avatar. Colours set here override the standard avatar colours for many
humanoid avatars but have no effect on avatars such as “Lich” which have fixed
colours. You should see the colour scheme that comes with IEEP for the values
you can use when hex-editing. You should just use SK where you can though.
Constitution – Remember, set this to a
number below 15 if you do not want it to effect the creature’s hit points.
Dexterity – Set this below 15 if you
do not want it to effect the creature’s Armour Class and THACO when using
missile weapons.
Effects
on Creature
– Any number of effects like spells can be permanently affecting a creature.
These are usually protections from certain opcodes. SK allows editing of
existing effects, but strangely doesn’t allow you to add new ones. The easier
way to add effects is to have an item to give them and equip the item on the
creature. Rings are often used to apply effects, as is the creature’s main
weapon.
The
value at offset 02C4h tells you the offset at which the effect details start in
the CRE file. I recommend editing an existing creature with effects on it
already, if you want to add your own effects. Copy the format for existing
effects. The opcodes for effects are the opcodes used in IEEP. I think there is
a list available somewhere, although I don’t know where. It is much easier to
use the items method as detailed above.
Enemy/Ally
status –
This setting is much more than just whether the creature will attack the party
on sight or not. A Neutral setting will give the creature a blue circle in the
game, and as most people know, green is ally and red is enemy. However see the
EA.ids file for the other possibilities. Set the creature to “neutral” if you
just want to talk to it. You can always have a dialogue option that lets it
join you, or become hostile. Setting this to “enemy” will mean that it is
hostile to the party as soon as it is created, not only when it sees you.
Setting this to “controlled” is good for creatures used in summoning spells
because, then no matter what you do the creature will not turn on you. Some
creatures turn on you if an area-effect spell from you hits them for example.
Experience
Earned –
This setting is only really important for playable characters when you want to
let the game set their experience levels depending on XP. In general, for monsters
and enemies that can’t join you, just set the Experience Levels.
Experience
Worth – How
much XP you get for killing the creature. Not important for playable characters
unless you anticipate him/her turning on the party!
Fallen?
– As you
may have guessed, this sets the whether the ranger or paladin in question is
fallen or not.
Fatigue
Level – I
am not sure if this setting is important for non-playable characters, seeing as
they don’t rest. However, keep in mind, that setting this higher than 0 might
affect the creature’s luck and therefore all its dice rolls for combat and
saving throws. This feature will have to be hex-edited, the relevant offset is
at 06Bh and the field is only 1 byte long. Enter a hex value between 00 and 64
(0-100).
Gender – Not as straight-cut as it
looks. Not just male or female. This setting plays an important role in scripts
so make sure you check other creatures that are similar to your creature and
set it the same unless you know exactly what you are doing.
General
Category –
All creatures fit into one of the main categories such as Humanoid, Monster or
Animal. This setting is also used for items, although I’ve never tried setting
the general category of a creature to that of a weapon! Again, this plays an
important role in scripts and in spells such as “Charm Mammal” which will only
affect those creatures who have this setting as “Animal”. Similarly, turn
undead will only affect those who have this set to “Undead”.
The
editors don’t cover this feature as I assume they expect you to edit an
existing creature. Just in case, the relevant offset is 271h, 1 byte, see
General.ids for the values which are given in decimal so you have to convert
them.
Gold
Held – Set
this to the number of gold pieces you want the creature to drop when you kill
it, hehe. Or, if this is a playable creature, this is the gold in its
inventory.
Hit
Points (base)
– Don’t forget that this value is affected by constitution, so set this lower
than you want if giving the creature a constitution above 14.
Intelligence – Not a terribly important
setting for non-playable creatures. Of course this does effect how long some of
your spells (like Maze) will affect them for and of course how many
intelligence drains they can survive.
Intoxication
Level –
Affects morale/luck, so judge for yourself how to set this. Again this must be
hex-edited. The field is at 06Ch and is 1 byte long, values are between 00h and
64h.
Inventory – Obviously very important
especially for non-playable creatures, as they are not going to go around and
pick things up for themselves. Give monsters un-droppable items for weapons
that represent things like their claws or paws. Items of type “Book” are often
used for “fist” weapons of creatures as they don’t seem to be dropped upon
death. As mentioned earlier, rings are useful for adding permanent effects and
protections to a creature. CC allows you to view a creature’s inventory but not
edit it. SK allows full editing. However, beware (for example) of putting
potions in the creature’s shield slot and stupid things like that, as that will
crash the game.
Kit – This setting is vital for
playable creatures. For other creatures it is usually set to “True class”.
Morale (base) – This is the basic, “normal” value of the creature’s morale. This sets how easily a creatures panics in combat. It must be hex-edited at the offset 023h. The length of this field is 1 byte so theoretically, acceptable values are between 0 and 255, that’s 00h and FFh.
Morale
Breaking Point
– If the morale drops to this level, the creature will panic. So obviously, a
big difference between Morale (base) and breaking point will result in a
fearless creature, hehe.
Movement
Speed –
Setting this to 0 will result in the normal movement speed of the player
character. Negative and positive numbers result in slower and faster movement.
This is actually not set by a specific field in the CRE file, rather it is
implemented by a permanent Spell Effect on the creature, which is applied when
you use this option in ShadowKeeper.
Name
(long) –
Each creature has 2 name settings, one for in game (this one) and one for
tooltips. The name is not stored as a string in the CRE file. The CRE file
contains a reference number to the dialog.tlk entry that is the creature’s name.
When you enter a new name in CC, it creates a new entry in dialog.tlk and sets
the reference in the CRE file to that entry. With SK, if you want a new name,
you have to use the dialog.tlk editor in IEEP to create a new entry with the
name and then enter the hex representation of the reference number in SK.
Usually, both the long and short names are the same, even if they point to
different entries, in other words, both entries contain the same thing. For
customs, this means, just make one entry and in SK, set both values to
reference that entry.
Racial
Enemy –
This setting is only supposed to be used for rangers and consequently, SK only
allows you to set if for rangers. However, you can be sly and hex-edit the
creature file and, in theory this should give any creature combat bonuses
against the hated race. An added advantage of hex-editing is that you can set
ANY race as the hated race, for example a Drow might hate humans. However, I
haven’t tried this, therefore I can’t tell you if it works, the game might
simply ignore this field for non-rangers. Set the byte at 241h to a value from
Race.IDS. Of course, change the number to hex first.
Race – This is of course one of
the most important settings. It affects many things including many script
actions so set it carefully for any creature. Note: weapons are also given
races to describe their type. Of course trying to set a creature’s Race to
“Sword” may well crash the game.
Recovery
Time – When
a creature’s morale reaches breaking point, this is the number of seconds it
takes to recover from panic. Edit the byte at 242h. I don’t recommend values of
over 3Ch (1 minute).
Reputation – This is really only
important for playable creatures, although you could use the reputation of a
creature in a custom script.
Resistances – Both programs can edit
these just fine, and they are pretty self-explanatory. It is useful to note
that nice effects can be achieved using scripts that check a creature’s
resistances. For example for a spell-casting enemy, you could make a script
that lets him check his own magic resistance and if it is low, make him cast
spell trap on himself or something.
Saving
Throws –
Again, one of the more important settings. Self-explanatory.
Spell
Memorisation
– The number of spells of each level and type that the creature can memorise.
This can be set in SK. Note: these numbers are usually determined by class and
level for playable characters and are not really important for non-playable
creatures, I’ll explain why under the Spells heading.
Spells – The number and type of
spells that a creature has memorised. Note: it is not actually necessary for a
creature to have a spell memorised for it to cast it. If the ReallyForceSpell
command is used in the creature’s script, it will cast the spell, regardless of
whether it has it memorised or not. These settings are useful when you want to
create a custom playable creature with innate abilities and I suggest you use
SK.
THACO
(base) –
This is the THACO of a creature before any strength or luck or weapon
proficiency modifiers are applied. Keep that in mind.
Thieving
Skills –
Obviously important settings for a thief NPC that can join you, but also
important for non-playable characters, for example, enemy thieves and rangers
when they try to hide in the shadows.
Weapon
Proficiencies
– These settings are not required for non-playable characters unless they are
using a weapon other than “fist” weapons. Most monsters including things like
golems have their own “fist” weapons.
Wisdom – Mostly important for
playable creatures only, but it also affects priests’ saving throws so may be
an important setting for enemy priests. Also, as with other stats, dialogue
options may depend on comparing the player character’s wisdom with the
creature’s.
For any comments, questions, or reports of errors in this document, please contact, me, Vaskez, the author at vaskez@runbox.com or please visit my site at http://vaskez.tripod.com and leave a message in my guest book. This would actually be better as then others won’t repeat what you wrote.