| FileExtension : |
ITM |
| Content : |
Item Definitions |

|
Header: Size=114 Bytes |
|
Ext. Header: Size= 40 Bytes |
|
Feature Block: Size=48 Bytes |
Header:
Every Item File Contains A Header. It Contains The Basic Properties
Of The Item Represented By The File.
* not implemented in Baldur's Gate
Extended Header:
If An Item Affects Other Creatures, Like A Weapon Or A Wand, The Item
File Contains An Extended Header:
One ExtendedHeader Equals One Ability Of An Item.
| Offset |
Size |
Description |
| 0000h |
0001h |
AbilityType |
| 0001h |
0001h |
ForceIdentify (Item Must Be Identified To Be Used) |
| 0002h |
0002h |
???? (seems to affect item type?)[0 - ] [1 weapon/default]
[2 -] [3 magic] [4 gem/bandit skalp] |
| 0004h |
0008h |
EquiptIcon |
| 000Ch |
0002h |
Target |
| 000Eh |
0002h |
EffectRadius / AttackRange (feet) |
| 0010h |
0002h |
ProjectileType |
| 0012h |
0002h |
SpeedFactor |
| 0014h |
0002h |
THAC0 Bonus |
| 0016h |
0002h |
BaseDamage |
| 0018h |
0002h |
Throws |
| 001Ah |
0002h |
DamageBonus |
| 001Ch |
0002h |
DamageType |
| 001Eh |
0002h |
FeatureBlockCount (Only The Feature Blocks That Affect
The Attacked Creature) |
| 0020h |
0002h |
FeatureBlockOffset (Index Of The First Feature Block That
Belongs To This Extended Header) |
| 0022h |
0002h |
Charges |
| 0024h |
0006h |
???? |
| 002Ah |
0002h |
EffectAnimation (not only
graphic!!!) |
| 002Ch |
000Ch |
???? |
Feature Block:
Items With Magical Capabilities Contain One Or More Feature Blocks.
Every Feature Block Represents One Special Ability Of An Item.
Header:
FileType:
| Offset |
Size |
Data |
Type |
Default Data |
| 0000h |
0004h |
FileType |
Array[0..3] Of Char |
'ITM ' |
This Field Contains The Type Of The Data File. It Should Be The Same
As The File Extension.
FileRevision:
| Offset |
Size |
Data |
Type |
Default Data |
| 0004h |
0004h |
FileRevision |
Array[0..3] Of Char |
'V1 ' or 'V1.0' |
Revision Of The Data File. In BG I've Only Found 'V1.x' Files, But This
May Change With Future Expansions.
ItemNameReference(UnIdentified):
| Offset |
Size |
Data |
Type |
Default Data |
| 0008h |
0004h |
ItemNameReference |
Longint |
FFFFh for none |
This Is The Reference To The Name Of The (Unidentified) Item. The Reference
Is The Index Of The Name String Contained In Dialog.tlk.
ItemNameReference(Identified):
| Offset |
Size |
Data |
Type |
Default Data |
| 000Ch |
0004h |
ItemNameReference |
Longint |
FFFFh for none |
This Is The Reference To The Name Of The (Identified) Item. The Reference
Is The Index Of The Name String Contained In Dialog.tlk.
UsedUpItemFile:
| Offset |
Size |
Data |
Type |
Default Data |
| 0010h |
0008h |
UsedUpItemFile |
Array[0..7] Of Char |
|
This Field Contains The FileName Of An ItemFile. If The Item Gets Destroyed
(Used Up), It Will Get Replaced By The Item Specified In This Field.
ItemAttributes:
| Offset |
Size |
Data |
Type |
Default Data |
| 0018h |
0002h |
ItemAttributes |
(Array Of?) Boolean |
|
This Field Is Some Kind Of Boolean Array:
| Bit |
Data |
Description |
| 0 |
Indestructable |
Item Won't Disapear On The Ground. |
| 1 |
TwoHanded |
The User Of This Item Isn't Allowed To Use A Shield |
| 2 |
Dropable |
Item Won't Drop On The Ground If Possessing Creature Dies |
| 3 |
Displayable |
|
| 4 |
Cursed |
The Item Is Cursed And Cannot Be Removed Without A Remove
Cursed Item Spell. |
| 5 |
???? |
|
| 6 |
Magical |
Magical Item |
| 7 |
?Bow |
Item Is A Bow? |
| Bit |
Data |
Description |
| 0 |
?Silver |
Item Is Made From Silver? |
| 1 |
???? |
|
| 2 |
_ZERO |
|
| 3 |
_ZERO |
|
| 4 |
_ZERO |
|
| 5 |
_ZERO |
|
| 6 |
_ZERO |
|
| 7 |
_ZERO |
|
Bit 0 is the LSB, Bit 7 the MSB
ItemType:
| Offset |
Size |
Data |
Type |
Default Data |
| 0001Ch |
0002h |
ItemType |
Word |
|
It Can Contain The Following Values:
| Value |
Item Type |
Inventory |
| 0000h |
Book |
|
| 0001h |
Amulet/Necklace |
(Amulet) |
| 0002h |
Armor |
(Armor) |
| 0003h |
Belt |
(Belt) |
| 0004h |
Boots |
(Boots) |
| 0005h |
Arrow |
(Quiver) |
| 0006h |
Bracers |
(Bracer) |
| 0007h |
Helmet |
(Helmet) |
| 0008h |
<NONE> |
(Quick Item) |
| 0009h |
Potion |
(Quick Item) |
| 000Ah |
Ring |
(Ring) |
| 000Bh |
Scroll |
(Quick Item) |
| 000Ch |
Shield |
(Shield) |
| 000Dh |
|
|
| 000Eh |
Bullet |
(Quiver) |
| 000Fh |
Bow |
(Weapon) |
| 0010h |
Dagger |
(Weapon) |
| 0011h |
Club/Mace |
(Weapon) |
| 0012h |
Sling |
(Weapon) |
| 0013h |
Short Sword |
(Weapon) |
| 0014h |
Bastard-, Long- , 2-Handed Sword |
(Weapon) |
| 0015h |
Warhammer |
(Weapon) |
| 0016h |
Morning Star |
(Weapon) |
| 0017h |
Flail |
(Weapon) |
| 0018h |
Dart |
(Weapon) |
| 0019h |
Axe 1-Handed |
(Weapon) |
| 001Ah |
Staff |
(Weapon) |
| 001Bh |
Crossbow |
(Weapon) |
| 001Ch |
|
|
| 001Dh |
Spear |
(Weapon) |
| 001Eh |
Halbherd |
(Weapon) |
| 001Fh |
Bolt |
(Quiver) |
| 0020h |
Cloack |
(Cloack) |
| 0021h |
Gold Piece(s) |
|
| 0022h |
Misc (Gems....) |
(Quick Item) |
| 0023h |
Wand |
(Quick Item) |
Useability:
| Offset |
Size |
Data |
Type |
Default Data |
| 001Eh |
0004h |
Useability |
4*Array Of Boolean |
|
The Useability Field Is 4 Bytes Long And It's A Boolean Field, But I
Don't Know How To Name It In Detail. Every Bit Stands For A Character Attribute.
If The Bit Is Set, None Of The Characters With This Attribute Can Use The
Item.
I Split The Field Up Into 4 Bytes. They Are In The Same Order As In
The File.
| Bit |
Data |
Description |
| 0 |
Chaotic |
Chaotic.. (..Good/..Neutral/..Evil) |
| 1 |
Evil |
..Evil |
| 2 |
Good |
..Good |
| 3 |
Neutral |
..Neutral |
| 4 |
Lawful |
Lawful.. |
| 5 |
Neutral |
Neutral..(..Good/..Evil) / True..(..Neutral) |
| 6 |
Bard |
|
| 7 |
Cleric |
|
| Bit |
Data |
Description |
| 0 |
Cleric/Mage |
(Multiclass) |
| 1 |
Cleric/Thief |
(Multiclass) |
| 2 |
Cleric/Ranger |
(Multiclass) |
| 3 |
Fighter |
|
| 4 |
Fighter/Druid |
(Multiclass) |
| 5 |
Fighter/Mage |
(Multiclass) |
| 6 |
Fighter/Cleric |
(Multiclass) |
| 7 |
Fighter/Mage/Cleric |
(Multiclass) |
| Bit |
Data |
Description |
| 0 |
Fighter/Mage/Thief |
(Multiclass) |
| 1 |
Fighter/Thief |
(Multiclass) |
| 2 |
Mage |
|
| 3 |
Mage/Thief |
(Multiclass) |
| 4 |
Paladin |
|
| 5 |
Ranger |
|
| 6 |
Thief |
|
| 7 |
Elf |
|
| Bit |
Data |
Description |
| 0 |
Dwarf |
|
| 1 |
Half-Elf |
|
| 2 |
Halfling |
|
| 3 |
Human |
|
| 4 |
Gnome |
|
| 5 |
? |
|
| 6 |
Druid |
|
| 7 |
? |
|
ItemAnimation:
| Offset |
Size |
Data |
Type |
Default Data |
| 0022h |
0002h |
PaperdollItem |
Word |
|
This field specifies the item animation and the item appearance on the
paperdoll:
| Value(ASCII) |
Value(Hex) |
Description |
| " " |
2020h |
<none> |
| "2A" |
|
Leather Armor |
| "3A" |
|
Chainmail |
| "4A" |
|
Plate Mail |
| "2W" |
|
Robe |
| "3W" |
|
Robe |
| "4W" |
|
Robe |
| "AX" |
|
Axe |
| "BW" |
|
Bow |
| "CB" |
|
Crossbow |
| "CL" |
|
Club |
| "D1" |
|
Buckler |
| "D2" |
|
Shield (Small) |
| "D3" |
|
Shield (Medium) |
| "D4" |
|
Shield (Large) |
| "DD" |
|
Dagger |
| "FL" |
|
Flail |
| "FS" |
|
Flame Sword |
| "H0" |
|
Helm (Standart) |
| "H1" |
|
Helm |
| "H2" |
|
Helm (Bronce Winged) |
| "H3" |
|
Helm (Gold Winged) |
| "H4" |
|
Helm |
| "H5" |
|
Helm (Red ?Feathers?) |
| "H6" |
|
???? |
| "HB" |
|
Halbherd |
| "MC" |
|
Mace |
| "MS" |
|
Morning Star |
| "QS" |
|
Quarter Staff (Metal) |
| "S1" |
|
Sword 1-Handed |
| "S2" |
|
Sword 2-Handed |
| "SL" |
|
Sling |
| "SP" |
|
Spear |
| "SS" |
|
Short Sword |
| "WH" |
|
War Hammer |
ItemPrice:
| Offset |
Size |
Data |
Type |
Default Data |
| 0034h |
0004h |
ItemPrice |
Longint |
|
Contains The ItemPrice In Gold Pieces. A Price Of One GP Has To Be Writen
As A 0. If It Would Be Written As A 1 Then It Might Get Rounded Down To
Zero After The Multiplication With The Reputation Factor.
ItemStack:
| Offset |
Size |
Data |
Type |
Default Data |
| 0038h |
0002h |
ItemStack |
Word |
|
Contains The Number Of Items Of A Kind That Are Allowed To Be Stacked
By The Player In One Inventory Field. Any Number Greater Than 0 Will Display
The StackedItemsCountNumber In The Game. The System May Stack More Items
Than The ItemStack Field Allows. For Example To Avoid The Display Of The
StackedItemsCountNumber On Wands (Charges Of A Wand = Stacked Wands)
InventoryIcon:
| Offset |
Size |
Data |
Type |
Default Data |
| 003Ah |
0008h |
InventoryIcon |
Array[0..7] Of Char |
|
FileName Of The BAMFile That Contains The Inventory Icon.
LoreToIdentify:
| Offset |
Size |
Data |
Type |
Default Data |
| 0042h |
0002h |
LoreToIdentify |
Word |
|
Lore Needet To Identify This Item.
GroundIcon:
| Offset |
Size |
Data |
Type |
Default Data |
| 0044h |
0008h |
GroundIcon |
Array[0..7] Of Char |
|
FileName Of The BAMFile That Contains The Image Of The Item Lieing On
The Ground.
ItemWeight:
| Offset |
Size |
Data |
Type |
Default Data |
| 004Ch |
0004h |
ItemWeight |
Longint |
|
Weight Of The Item.
DescriptionReference(UnIdentified):
| Offset |
Size |
Data |
Type |
Default Data |
| 0050h |
0004h |
DescriptionReference |
Longint |
FFFFh for none |
This Is The Reference To The Description (Right Click In Inventory)
Of The Unidentified Item. The Reference Is The Index Of The Description
String Contained In Dialog.tlk.
DescriptionReference(Identified):
| Offset |
Size |
Data |
Type |
Default Data |
| 0054h |
0004h |
DescriptionReference |
Longint |
FFFFh for none |
This Is The Reference To The Description (Right Click In Inventory)
Of The Identified Item. The Reference Is The Index Of The Description String
Contained In Dialog.tlk.
DescriptionIcon:
| Offset |
Size |
Data |
Type |
Default Data |
| 0058h |
0008h |
DescriptionIcon |
Array[0..7] Of Char |
|
FileName Of The BAMFile That Contains The Description Icon (image on
the description screen).
ExtendedHeaderOffset:
| Offset |
Size |
Data |
Type |
Default Data |
| 0064h |
0004h |
ExtendedHeaderOffset |
Longint |
|
Offset Of The Extended Header Found In Weapons And Such Stuff.
ExtendedHeaderCount:
| Offset |
Size |
Data |
Type |
Default Data |
| 0068h |
0002h |
ExtdendedHeaderCount |
Word |
|
Some Item Files May Actually Contain More Than One Extended Header..
FeatureTableOffset:
| Offset |
Size |
Data |
Type |
Default Data |
| 006Ah |
0004h |
FeatureTableOffset |
Longint |
|
Offset Of The Feature Table. If No Features Available It Points To The
End Of The File.
FeatureBlockCount:
| Offset |
Size |
Data |
Type |
Default Data |
| 0070h |
0002h |
FeatureBlockCount |
Word |
|
This Field Contains The Number Of Feature Blocks That Affect The User
Of This Item.
Extended Header:
Feature:
| Offset |
Size |
Data |
Type |
Default Data |
| 0000h |
0001h |
AttackType |
Byte |
|
This field determines the type af the ability contained in the ExtendedHeader:
| Value |
Data |
| 00h |
- |
| 01h |
Melee Attack(Sword,Axe.....) |
| 02h |
Projectile Attack(Arrow, Bolt, Bullet) |
| 03h |
Magic Attack / Magic / Default (Wand,Potion,Gem....) |
| 04h |
Launch (Bow,Sling,X-Bow) |
Target:
| Offset |
Size |
Data |
Type |
Default Data |
| 000Ch |
0002h |
Target |
Byte |
|
Specifies the target of this Extended Header
| Value |
Data |
| 00h |
- |
| 01h |
Creature |
| 02h |
Inventory |
| 03h |
Dead Character |
| 04h |
Area |
| 05h |
Self |
ProjectileType:
| Offset |
Size |
Data |
Type |
Default Data |
| 002Ah |
0002h |
ProjectileType |
Word |
|
If the item is a projectile, this field specifies it's type:
| Value |
Data |
| 00h |
none |
| 01h |
Arrow |
| 02h |
Bolt |
| 03h |
Bullet |
DamageType:
| Offset |
Size |
Data |
Type |
Default Data |
| 001Ch |
0002h |
DamageType |
Word |
|
This field specifies the type of the damage done:
| Value |
Data |
| 00h |
none |
| 01h |
Piercing Melee / Magic |
| 02h |
Blunt |
| 03h |
Slashing |
| 04h |
Piercing Missile |
EffectAnimation:
| Offset |
Size |
Data |
Type |
Default Data |
| 002Ah |
0002h |
EffectAnimation |
Word |
|
EffectAnimation is the animation that will start when the item's ability
is used:
| Value |
Data |
| 00h |
- |
| 01h |
No Effect |
| 02h |
Brown Arrow |
| 03h |
Flame Arrow With Explosion (+damage) |
| 04h |
Flame Arrow |
| 05h |
Black Arrow |
| 06h |
- |
| 07h |
Throwing Axe |
| 08h |
Smoke Arrow With Explosion |
| 09h |
- |
| 0Ah |
Throwing Axe |
| 0Bh |
Throwing Axe |
| 0Ch |
Dart |
| 0Dh |
Golden Arrow With Explosion |
| 0Eh |
- |
| 0Fh |
Arrow |
| 10h |
Arrow |
| 11h |
Gray Bullet |
| 12h |
White Bullet With Explosion |
| 13h |
- |
| 14h |
Gray Bullet |
| 15h |
- |
| 16h |
Flames |
Feature Block:
Feature:
| Offset |
Size |
Data |
Type |
Default Data |
| 0000h |
0002h |
Feature/Effect |
Word |
|
TargetIdentifier:
| Offset |
Size |
Data |
Type |
Default Data |
| 0002h |
0002h |
TargetIdentifier |
Word |
|
TaregetIdentifier deetermines the target of this effect
Parameter 1:
| Offset |
Size |
Data |
Type |
Default Data |
| 0004h |
0004h |
Parameter 1 |
Longint |
|
Parameter 1 Is A Parameter Passed To The Feature/Effect Function. Most
Time It Contains The Modification Value Of A Feature/Effect.
Parameter 2:
| Offset |
Size |
Data |
Type |
Default Data |
| 0008h |
0004h |
Parameter 2 |
Longint/Bitfield |
|
Parameter 2 Is The Second Parameter Passed To The Feature/Effect Function.
Most Time It Contains The Mode Of Parameter 1(%, Absolute, Relative.....).
EffectTimeMode:
| Offset |
Size |
Data |
Type |
Default Data |
| 000Ch |
0001h |
EffectTimeMode |
Byte |
|
This field sets the timemode of the item and the EffectTimeField
| Value |
Start of Effect |
Duration |
| 0 |
Instantly |
For [EffecTime] Seconds |
| 1 |
Instantly |
Permanent |
| 2 |
Instantly |
While equiped |
| 4 |
After [EffecTime] Seconds |
Permanent |
EffectTime:
| Offset |
Size |
Data |
Type |
Default Data |
| 000Eh |
0004h |
EffectTime |
Longint |
|
EffectTime Contains A Time Value For The Effect.
Game Time In Rounds = EffectTime / 60
Probability:
| Offset |
Size |
Data |
Type |
Default Data |
| 0012h |
0002h |
Probability |
Word |
|
This Field Contains The Probability This Effect To Happen. It's Value
Can Go From 0 To 100.(0 The Effect Never Happens, 100 The Effect Happens
Allways) The Values Grater Than 100 Are Taken As 100.
FileName:
| Offset |
Size |
Data |
Type |
Default Data |
| 0014h |
0008h |
FileName |
Array[0..7] Of Char |
|
FileName Is Another Paremeter Passed To The Effect/Feature Function.
Some Functions Like Make Sound Use It To Specify The Sound File Played.
Throws:
| Offset |
Size |
Data |
Type |
Default Data |
| 0001Ch |
0004h |
Throws |
Longint |
|
This Field Only Matters For Dice Based Effects.
DiceSides:
| Offset |
Size |
Data |
Type |
Default Data |
| 00020h |
0004h |
DiceSides |
Longint |
|
This Field Only Matters For Dice Based Effects.
SavingThrowType:
| Offset |
Size |
Data |
Type |
Default Data |
| 00024h |
0004h |
SavingThrowType |
Longint |
|
This field determines the type of saving throw that must be made to
avoid Effect.
SavingThrowBonus:
| Offset |
Size |
Data |
Type |
Default Data |
| 00028h |
0004h |
SavingThrowBonus |
Longint |
|
This field determines the bonus to the saving throw that must be made
to avoid Effect.
|