Skip to content

Offsets

Named offset constants for IE file format structures (ARE, CRE, EFF, ITM, SPL, STO, etc.).

ARE

Source: structures/are/main.tph

NameValue
ARE_signature0x00
ARE_version0x04
ARE_wed0x08
ARE_last_saved0x10
ARE_flags0x14
ARE_north0x18
ARE_north_flags0x20
ARE_east0x24
ARE_east_flags0x2c
ARE_south0x30
ARE_south_flags0x38
ARE_west0x3c
ARE_west_flags0x44
ARE_type_flags0x48
ARE_rain_probability0x4a
ARE_snow_probability0x4c
ARE_fog_probability_EE0x4e
ARE_lighting_probability0x50
ARE_wind_speed_nonEE0x52
ARE_overlay_transparency_EE0x52
ARE_actors_offset0x54
ARE_actors_count0x58
ARE_regions_count0x5a
ARE_regions_offset0x5c
ARE_spawn_offset0x60
ARE_spawn_count0x64
ARE_entrances_offset0x68
ARE_entrances_count0x6c
ARE_containers_offset0x70
ARE_containers_count0x74
ARE_items_count0x76
ARE_items_offset0x78
ARE_vertices_offset0x7c
ARE_vertices_count0x80
ARE_ambients_count0x82
ARE_ambiets_offset0x84
ARE_variables_offset0x88
ARE_variables_count0x8c
ARE_tiled_object_flags0x90
ARE_tiled_object_count0x92
ARE_script0x94
ARE_bitmask_size0x9c
ARE_bitmask_offset0xa0
ARE_doors_count0xa4
ARE_doors_offset0xa8
ARE_animations_count0xac
ARE_animations_offset0xb0
ARE_tiled_objects_count0xb4
ARE_tiled_objects_offset0xb8
ARE_soung_offset0xbc
ARE_rest_interruptions_offset0xc0
ARE_map_note_offset_PST0xc8
ARE_map_note_count_PST0xcc
ARE_projectile_traps_count0xd0
ARE_rest_movie_day0xd4
ARE_rest_movie_night0xdc
ARE_REGION_size0xc4
ARE_REGION_name0
ARE_REGION_type0x20
ARE_REGION_bounding_box0x22
ARE_REGION_vertices_count0x2a
ARE_REGION_first_vertex_index0x2c
ARE_REGION_trigger_value0x30
ARE_REGION_cursor0x34
ARE_REGION_dest_area0x38
ARE_REGION_dest_area_entranc_name0x40
ARE_REGION_flags0x60
ARE_REGION_into_text0x64
ARE_REGION_trap_detect0x68
ARE_REGION_trap_remove0x6a
ARE_REGION_trapped0x6c
ARE_REGION_detected0x6e
ARE_REGION_trap_launch_location0x70
ARE_REGION_key_item0x74
ARE_REGION_script0x7c
ARE_REGION_alt_use_point_x_coord0x84
ARE_REGION_alt_use_point_y_coord0x86
ARE_REGION_sound_PST0xac
ARE_REGION_talk_location_point_x_PST0xb4
ARE_REGION_talk_location_point_y_PST0xb6
ARE_REGION_speaker_name_PST0xb8
ARE_REGION_dialog_PST0xbc
ARE_CONTAINER_size0xc0
ARE_CONTAINER_name0
ARE_CONTAINER_x0x20
ARE_CONTAINER_y0x22
ARE_CONTAINER_type0x24
ARE_CONTAINER_lock_difficulty0x26
ARE_CONTAINER_flags0x28
ARE_CONTAINER_trap_detect0x2c
ARE_CONTAINER_trap_remove0x2e
ARE_CONTAINER_trapped0x30
ARE_CONTAINER_trap_detected0x32
ARE_CONTAINER_trap_launch_x_coord0x34
ARE_CONTAINER_trap_launch_y_coord0x36
ARE_CONTAINER_bounding_left0x38
ARE_CONTAINER_bounding_top0x38
ARE_CONTAINER_bounding_right0x38
ARE_CONTAINER_bounding_bottom0x38
ARE_CONTAINER_first_item_index0x40
ARE_CONTAINER_items_count0x44
ARE_CONTAINER_script0x48
ARE_CONTAINER_first_vertex_index0x50
ARE_CONTAINER_vertices_count0x54
ARE_CONTAINER_trigger_range0x56
ARE_CONTAINER_owner_script_name0x58
ARE_CONTAINER_key_item0x78
ARE_CONTAINER_break_difficulty0x80
ARE_CONTAINER_lockpick_string0x84
ARE_DOOR_size0xc8
ARE_DOOR_name0
ARE_DOOR_id0x20
ARE_DOOR_flags0x28
ARE_DOOR_open_first_vertex_index0x2c
ARE_DOOR_open_vertices_count0x30
ARE_DOOR_closed_vertices_count0x32
ARE_DOOR_closed_first_vertex_index0x34
ARE_DOOR_bounding_open0x38
ARE_DOOR_bounding_closed0x40
ARE_DOOR_impeded_open_first_vertex_index0x48
ARE_DOOR_impeded_open_vertices_count0x4c
ARE_DOOR_impeded_closed_vertices_count0x4e
ARE_DOOR_impeded_closed_first_vertice_index0x50
ARE_DOOR_hp0x54
ARE_DOOR_ac0x56
ARE_DOOR_open_sound0x58
ARE_DOOR_close_sound0x60
ARE_DOOR_cursor0x68
ARE_DOOR_trap_detect0x6c
ARE_DOOR_trap_remove0x6e
ARE_DOOR_trapped0x70
ARE_DOOR_detected0x72
ARE_DOOR_trap_launch_x_coord0x74
ARE_DOOR_trap_launch_y_coord0x76
ARE_DOOR_key0x78
ARE_DOOR_script0x80
ARE_DOOR_trap_detect0x88
ARE_DOOR_lock_difficulty0x8c
ARE_DOOR_toggle_state_points0x90
ARE_DOOR_lockpick_string0x98
ARE_DOOR_travel_trigger_name0x9c
ARE_DOOR_speaker_name0xb4
ARE_DOOR_dialog0xb8
FLAG_ARE_EDGE_party_required0
FLAG_ARE_EDGE_party_enabled1
BGFORGE_ARE_DIR%BGFORGE_STRUCTURES_DIR%/are

ARE / Container Flags

Source: structures/are/container_flags.tph

NameValue
FLAG_ARE_CONTAINER_lockedBIT0
FLAG_ARE_CONTAINER_trap_resetsBIT3
FLAG_ARE_CONTAINER_disabledBIT5

ARE / Door Flags

Source: structures/are/door_flags.tph

NameValue
FLAG_ARE_DOOR_openBIT0
FLAG_ARE_DOOR_lockedBIT1
FLAG_ARE_DOOR_trap_resetsBIT2
FLAG_ARE_DOOR_trap_detectableBIT3
FLAG_ARE_DOOR_brokenBIT4
FLAG_ARE_DOOR_cannot_closeBIT5
FLAG_ARE_DOOR_linkedBIT6
FLAG_ARE_DOOR_hiddenBIT7
FLAG_ARE_DOOR_foundBIT8
FLAG_ARE_DOOR_not_blocking_line_of_sightBIT9
FLAG_ARE_DOOR_remove_key_bg2BIT10
FLAG_ARE_DOOR_ignore_obstacles_when_closingBIT11

ARE / Region Flags

Source: structures/are/region_flags.tph

NameValue
FLAG_ARE_REGION_key_requiredBIT0
FLAG_ARE_REGION_trap_resetsBIT1
FLAG_ARE_REGION_party_requiredBIT2
FLAG_ARE_REGION_trap_detectableBIT3
FLAG_ARE_REGION_npc_activatesBIT4
FLAG_ARE_REGION_active_in_tutorial_area_onlyBIT5
FLAG_ARE_REGION_anyone_activatesBIT6
FLAG_ARE_REGION_no_stringBIT7
FLAG_ARE_REGION_deactivatedBIT8
FLAG_ARE_REGION_party_onlyBIT9
FLAG_ARE_REGION_alternative_pointBIT10
FLAG_ARE_REGION_door_closedBIT11 // ??

ARE / Region Type

Source: structures/are/region_type.tph

NameValue
ARE_REGION_TYPE_proximity0
ARE_REGION_TYPE_info1
ARE_REGION_TYPE_travel2

CRE

Source: structures/cre/main.tph

NameValue
BGFORGE_CRE_DIR%BGFORGE_STRUCTURES_DIR%/CRE
CRE_name0x8
CRE_tooltip0xc
CRE_flags0x10
CRE_XP_value0x14
CRE_XP_power_level0x18
CRE_gold_carried0x1c
CRE_status0x20
CRE_current_HP0x24
CRE_maximum_HP0x26
CRE_animation0x28
CRE_metal_color0x2c
CRE_minor_color0x2d
CRE_major_color0x2e
CRE_skin_color0x2f
CRE_leather_color0x30
CRE_armor_color0x31
CRE_hair_color0x32
CRE_effect_version0x33
CRE_small_portrait0x34
CRE_large_portrait0x3c
CRE_reputation0x44
CRE_hide_in_shadows0x45
CRE_natural_AC0x46
CRE_effective_AC0x48
CRE_crushing_AC_mod0x4a
CRE_missile_AC_mod0x4c
CRE_piercing_AC_mod0x4e
CRE_slashing_AC_mod0x50
CRE_THAC00x52
CRE_attacks_per_round0x53
CRE_save_vs_death0x54
CRE_save_vs_wand0x55
CRE_save_vs_polymorph0x56
CRE_save_vs_breath0x57
CRE_save_vs_spell0x58
CRE_fire_resistance0x59
CRE_cold_resistance0x5a
CRE_electricity_resistance0x5b
CRE_acid_resistance0x5c
CRE_magic_resistance0x5d
CRE_magic_fire_resistance0x5e
CRE_magic_cold_resistance0x5f
CRE_slashing_resistance0x60
CRE_crushing_resistance0x61
CRE_piercing_resistance0x62
CRE_missile_resistance0x63
CRE_detect_illusion0x64
CRE_set_traps0x65
CRE_lore0x66
CRE_open_locks0x67
CRE_move_silently0x68
CRE_find_traps0x69
CRE_pick_pockets0x6a
CRE_fatigue0x6b
CRE_intoxication0x6c
CRE_luck0x6d
CRE_large_sword_proficiency0x6e
CRE_small_sword_proficiency0x6f
CRE_bow_proficiency0x70
CRE_spear_proficiency0x71
CRE_blunt_proficiency0x72
CRE_spiked_proficiency0x73
CRE_axe_proficiency0x74
CRE_missile_proficiency0x75
CRE_nightmare_mode0x7d
CRE_translucency0x7e
CRE_reputation_gain_loss_when_killed0x7f
CRE_reputation_gain_loss_when_joining_party0x80
CRE_reputation_gain_loss_when_leaving_party0x81
CRE_turn_undead_level0x82
CRE_tracking0x83
CRE_tracking_target0x84
CRE_soundset_start0xa4
CRE_level_first_class0x234
CRE_level_second_class0x235
CRE_level_third_class0x236
CRE_sex0x237
CRE_strength0x238
CRE_strength_bonus0x239
CRE_intelligence0x23a
CRE_wisdom0x23b
CRE_dexterity0x23c
CRE_constitution0x23d
CRE_charisma0x23e
CRE_morale0x23f
CRE_morale_break0x240
CRE_racial_enemy0x241
CRE_morale_recovery0x242
CRE_kit_high_word0x244
CRE_kit_low_word0x246
CRE_script_override0x248
CRE_script_class0x250
CRE_script_race0x258
CRE_script_general0x260
CRE_script_default0x268
CRE_allegiance0x270
CRE_general0x271
CRE_race0x272
CRE_class0x273
CRE_specifics0x274
CRE_gender0x275
CRE_object_spec_10x276
CRE_object_spec_20x277
CRE_object_spec_30x278
CRE_object_spec_40x279
CRE_object_spec_50x27a
CRE_alignment0x27b
CRE_global_identifier0x27c
CRE_local_identifier0x27e
CRE_script_name0x280

CRE / Flags

Source: structures/cre/flags.tph

NameValue
FLAG_CRE_identifiedBIT0
FLAG_CRE_no_corpseBIT1
FLAG_CRE_permanent_corpseBIT2
FLAG_CRE_original_class_fighterBIT3
FLAG_CRE_original_class_mageBIT4
FLAG_CRE_original_class_clericBIT5
FLAG_CRE_original_class_thiefBIT6
FLAG_CRE_original_class_druidBIT7
FLAG_CRE_original_class_rangerBIT8
FLAG_CRE_fallen_paladinBIT9
FLAG_CRE_fallen_rangerBIT10
FLAG_CRE_export_allowedBIT11
FLAG_CRE_hide_statusBIT12
FLAG_CRE_large_creatureBIT13
FLAG_CRE_moving_between_areasBIT14
FLAG_CRE_been_in_partyBIT15
FLAG_CRE_holding_itemBIT16
FLAG_CRE_reset_holding_itemBIT17
FLAG_CRE_no_exploding_deathBIT20
FLAG_CRE_ignore_nightmare_modeBIT22
FLAG_CRE_no_tooltipBIT23
FLAG_CRE_allegiance_trackingBIT24
FLAG_CRE_general_trackingBIT25
FLAG_CRE_race_trackingBIT26
FLAG_CRE_class_trackingBIT27
FLAG_CRE_specifics_trackingBIT28
FLAG_CRE_gender_trackingBIT29
FLAG_CRE_alignment_trackingBIT30
FLAG_CRE_uninterruptibleBIT31

EFF

Source: structures/eff/main.tph

NameValue
BGFORGE_EFF_DIR%BGFORGE_STRUCTURES_DIR%/EFF

EFF / Iesdp

Source: structures/eff/iesdp.tph

NameValueDescription
EFF_effect_type0x0Effect type
EFF_target0x2Target type
EFF_power0x3Power
EFF_parameter10x4Parameter 1
EFF_parameter20x8Parameter 2
EFF_timing_mode0xcTiming mode
EFF_resistance0xdDispel / Resistance
EFF_duration0xeDuration
EFF_probability10x12Probability 1
EFF_probability20x13Probability 2
EFF_resref_key0x14Resref key
EFF_dice_thrown0x1cDice Thrown / Maximum Level
EFF_dice_sides0x20Dice Sides / Minimum Level
EFF_save_type0x24Saving throw type
EFF_save_bonus0x28Saving throw bonus

EFF2

Source: structures/eff2/main.tph

NameValue
BGFORGE_EFF2_DIR%BGFORGE_STRUCTURES_DIR%/EFF2
EFF2_vvc0x20

EFF2 / Iesdp

Source: structures/eff2/iesdp.tph

NameValueDescription
EFF2_signature20x8External EFFs - the field is the same as the signature field from the header
EFF2_version20xcExternal EFFs - the field is the same as the version field from the header
EFF2_opcode0x10Opcode number
EFF2_target0x14Target type
EFF2_power0x18Power
EFF2_parameter10x1cParameter 1
EFF2_parameter20x20Parameter 2
EFF2_timing0x24Timing mode
EFF2_duration0x28Duration
EFF2_probability10x2cProbability 1
EFF2_probability20x2eProbability 2
EFF2_resource0x30Resource
EFF2_dice_thrown0x38Dice Thrown
EFF2_dice_sides0x3cDice Sides
EFF2_save_type0x40Saving throw type
EFF2_save_bonus0x44Save bonus
EFF2_stacking_id_tobex0x48Special (EE games)
EFF2_school0x4cPrimary Type (School)
EFF2_resistance0x5cDispel/Resistance
EFF2_parameter30x60Parameter 3
EFF2_parameter40x64Parameter 4
EFF2_parameter50x68Parameter 5
EFF2_time_applied0x6cTime applied (ticks)
EFF2_resource20x70Resource 2 (VVC in many effects)
EFF2_resource30x78Resource 3
EFF2_caster_x_coord0x80Caster X coordinate
EFF2_caster_y_coord0x84Caster Y coordinate
EFF2_target_x_coord0x88Target X coordinate
EFF2_target_y_coord0x8cTarget Y coordinate
EFF2_parent_resource_type0x90Parent resource type
EFF2_parent_resource0x94Parent resource
EFF2_parent_resource_flags0x9cParent resource flags
EFF2_projectile0xa0Projectile
EFF2_variable_name0xa8Variable name
EFF2_caster_level0xc8Caster level
EFF2_sectype0xd0Secondary Type
EFF2_signature0x0Signature ('EFF ')
EFF2_version0x4Version ('V2.0')

FX

Source: structures/fx/main.tph

NameValue
BGFORGE_FX_DIR%BGFORGE_STRUCTURES_DIR%/fx

FX / Iesdp

Source: structures/fx/iesdp.tph

NameValueDescription
FX_opcode0x0Opcode Number
FX_target0x2Target type
FX_power0x3Power
FX_parameter10x4Parameter 1
FX_parameter20x8Parameter 2
FX_timing0xcTiming mode
FX_resistance0xdDispel / Resistance
FX_duration0xeDuration
FX_probability10x12Probability 1
FX_probability20x13Probability 2
FX_resource0x14Resource
FX_max_level0x1cDice Thrown / Maximum Level
FX_min_level0x20Dice Sides / Minimum Level
FX_save_type0x24Saving throw type
FX_save_bonus0x28Saving Throw Bonus
FX_stacking_id_Ex0x2cTobEx: Stacking ID. Checked when bit 25 of the Saving Throw Type is set.

FX / Resist Dispel

Source: structures/fx/resist_dispel.tph

NameValue
NONMAGICAL0
DISPELLABLEBIT0
DISPELBIT0
IGNORE_MAGIC_RESISTANCEBIT1
BYPASS_MRBIT1
BYPASS_DEFLECTIONBIT2

FX / Saving Throw

Source: structures/fx/saving_throw.tph

NameValue
FLAG_SAVINGTHROW_spellBIT0
FLAG_SAVINGTHROW_breathBIT1
FLAG_SAVINGTHROW_deathBIT2
FLAG_SAVINGTHROW_wandBIT3
FLAG_SAVINGTHROW_polymorphBIT4
FLAG_SAVINGTHROW_limit_effect_stacking_ExBIT25
FLAG_SAVINGTHROW_ignore_primary_target_EEBIT10 // Line AoE projectile doesn't affect end target
FLAG_SAVINGTHROW_ignore_secondary_target_EEBIT11 // Line AoE projectile doesn't affect bystanders
FLAG_SAVINGTHROW_bypass_mirror_image_EEBIT24
FLAG_SAVINGTHROW_ignore_difficulty_EEBIT25

FX / Target

Source: structures/fx/target.tph

NameValue
TARGET_FX_none0
TARGET_FX_self1
TARGET_FX_preset2
TARGET_FX_party3
TARGET_FX_everyone4
TARGET_FX_everyone_except_party5
TARGET_FX_everyone_match_specific_caster6
TARGET_FX_everyone_match_specific_target7
TARGET_FX_everyone_except_self8
TARGET_FX_original_caster9

FX / Timing

Source: structures/fx/timing.tph

NameValue
TIMING_duration0
TIMING_permanent1
TIMING_instant1
TIMING_while_equipped2
TIMING_delayed_duration3
TIMING_delayed4
TIMING_permanent_after_death9
TIMING_duration_ticks10
TIMING_absolute_duration4096

ITM

Source: structures/itm/main.tph

NameValue
BGFORGE_ITM_DIR%BGFORGE_STRUCTURES_DIR%/itm

ITM / Attack Type

Source: structures/itm/attack_type.tph

NameValue
ITM_ATTACK_TYPE_none0
ITM_ATTACK_TYPE_melee1
ITM_ATTACK_TYPE_projectile2
ITM_ATTACK_TYPE_ranged2
ITM_ATTACK_TYPE_magic3
ITM_ATTACK_TYPE_launcher4

ITM / Damage Type

Source: structures/itm/damage_type.tph

NameValue
ITM_DAMAGE_TYPE_none0
ITM_DAMAGE_TYPE_piercing_magic1
ITM_DAMAGE_TYPE_blunt2
ITM_DAMAGE_TYPE_slashing3
ITM_DAMAGE_TYPE_ranged4
ITM_DAMAGE_TYPE_fists5
ITM_DAMAGE_TYPE_piercing_blunt6
ITM_DAMAGE_TYPE_piercing_slashing7
ITM_DAMAGE_TYPE_blunt_slashing8

ITM / Depletion

Source: structures/itm/depletion.tph

NameValue
DEPLETION_remains0
DEPLETION_vanishes1
DEPLETION_replace_with_used_up2
DEPLETION_recharges3

ITM / Header Flags

Source: structures/itm/header_flags.tph

NameValue
FLAG_HEAD_add_strength_bonusBIT0
FLAG_HEAD_breakableBIT1
FLAG_HEAD_damage_strength_bonus_EEBIT2
FLAG_HEAD_thac0_strength_bonus_EEBIT3
FLAG_HEAD_hostileBIT10
FLAG_HEAD_recharge_after_restBIT11
FLAG_HEAD_bypass_armorBIT16
FLAG_HEAD_keen_edgeBIT17
FLAG_HEAD_toggle_backstab_ExBIT25
FLAG_HEAD_cant_target_invisible_ExBIT26

ITM / Header Target

Source: structures/itm/header_target.tph

NameValue
TARGET_HEAD_creature1
TARGET_HEAD_character_portrait3
TARGET_HEAD_area4
TARGET_HEAD_self5
TARGET_HEAD_self_ignore_pause7

ITM / Iesdp

Source: structures/itm/iesdp.tph

NameValueDescription
ITM_HEAD_attack_type0x0Attack type
ITM_HEAD_id_required0x1ID Req.
ITM_HEAD_location0x2Location
ITM_HEAD_alt_dice_sides0x3Alternative dice sides
ITM_HEAD_use_icon0x4Use icon
ITM_HEAD_target0xcTarget type
ITM_HEAD_target_count0xdTarget count
ITM_HEAD_range0xeRange
ITM_HEAD_projectile_type0x10Launcher required
ITM_HEAD_alt_dice_thrown0x11Alternative dice thrown
ITM_HEAD_speed0x12Speed Factor
ITM_HEAD_alt_damage_bonus0x13Alternative damage bonus
ITM_HEAD_thac0_bonus0x14THAC0 bonus
ITM_HEAD_dice_sides0x16Dice sides
ITM_HEAD_primary_type0x17Primary Type (School)
ITM_HEAD_dice_thrown0x18Dice thrown
ITM_HEAD_secondary_type0x19Secondary Type
ITM_HEAD_damage_bonus0x1aDamage bonus
ITM_HEAD_damage_type0x1cDamage type
ITM_HEAD_feature_block_count0x1eCount of feature blocks
ITM_HEAD_feature_block_index0x20Index into feature blocks
ITM_HEAD_max_charges0x22Max Charges
ITM_HEAD_depletion0x24Charge depletion behaviour
ITM_HEAD_flags0x26Flags
ITM_HEAD_projectile_animation0x2aProjectile Animation (projectl.ids/missile.ids)
ITM_HEAD_melee_animation0x2cMelee animation
ITM_HEAD_is_arrow0x32Arrow qualifier / Is arrow?
ITM_HEAD_is_bolt0x34Bolt qualifier / Is bolt?
ITM_HEAD_is_bullet0x36Bullet qualifier / Is bullet?
ITM_signature0x0Signature ('ITM ')
ITM_version0x4Version ('V1 ')
ITM_unidentified_name0x8Unidentified Name (strref)
ITM_identified_name0xcIdentified Name (strref)
ITM_replacement0x10BG1, BG2, BGEE:
ITM_flags0x18Flags
ITM_type0x1cItem type
ITM_usability_flags0x1eUsability bitmask
ITM_animation0x22Item animation
ITM_min_level0x24Min Level
ITM_min_strength0x26Min Strength (unused in BG1)
ITM_min_strength_bonus0x28Min Strength Bonus (unused in BG1)
ITM_kit_usability10x29Kit Usability 1
ITM_min_intelligence0x2aMin Intelligence (unused in BG1)
ITM_kit_usability20x2bKit Usability 2
ITM_min_dexterity0x2cMin Dexterity (unused in BG1)
ITM_kit_usability30x2dKit Usability 3
ITM_min_wisdom0x2eMin Wisdom (unused in BG1)
ITM_kit_usability40x2fKit Usability 4
ITM_min_constitution0x30Min Constitution (unused in BG1)
ITM_weapon_proficiency0x31Weapon Proficiency
ITM_min_charisma0x32Min Charisma
ITM_price0x34Price
ITM_stack_amount0x38Stack amount
ITM_inventory_icon0x3aInventory icon (BAM)
ITM_lore_to_id0x42Lore to ID
ITM_ground_icon0x44Ground icon (BAM)
ITM_weight0x4cWeight
ITM_unidentified_desc0x50Unidentified Description (strref)
ITM_identified_desc0x54Identified Description (strref)
ITM_description_icon0x58Description icon (BAM)
ITM_enchantment0x60Enchantment
ITM_extended_headers_offset0x64Offset to extended headers
ITM_extended_headers_count0x68Count of extended headers
ITM_feature_blocks_offset0x6aOffset to feature blocks
ITM_feature_blocks_index0x6eIndex into equipping feature blocks
ITM_feature_blocks_count0x70Count of equipping feature blocks

SPL

Source: structures/spl/main.tph

NameValue
BGFORGE_SPL_DIR%BGFORGE_STRUCTURES_DIR%/spl

SPL / Flags

Source: structures/spl/flags.tph

NameValue
FLAG_SPL_break_sanctuary_EEBIT9
FLAG_SPL_hostileBIT10
FLAG_SPL_no_LoSBIT11
FLAG_SPL_allow_spottingBIT12
FLAG_SPL_outdoors_onlyBIT13
FLAG_SPL_ignore_dead_wild_magicBIT14
FLAG_SPL_ignore_wild_surgeBIT15
FLAG_SPL_not_in_combatBIT16
FLAG_SPL_can_target_invisible_EEExBIT24
FLAG_SPL_castable_when_silenced_EEExBIT25

SPL / Iesdp

Source: structures/spl/iesdp.tph

NameValueDescription
SPL_HEAD_form0x0Spell form
SPL_HEAD_friendly0x1- bit 2: 'Friendly' ability (PST only)
SPL_HEAD_location0x2Location
SPL_HEAD_memorised_icon0x4Memorised icon (BAM). The engine replaces the last character of this filename with a B.
SPL_HEAD_target0xcTarget
SPL_HEAD_target_count0xdTarget count
SPL_HEAD_range0xeRange
SPL_HEAD_level_required0x10Level Required
SPL_HEAD_casting_time0x12Casting Time
SPL_HEAD_times_per_day0x14Times per day
SPL_HEAD_feature_blocks_count0x1eCount of feature blocks
SPL_HEAD_feature_blocks_offset0x20Offset to feature blocks
SPL_HEAD_projectile0x26Projectile (BG2: projectl.ids. Note: in BG2, this value is off-by-one from projectl.ids value. I.e. binary value of 2 corresponds to 0x1 - ARROW)
SPL_signature0x0Signature ('SPL  ')
SPL_version0x4Version ('V1 ')
SPL_unidentified_name0x8Spell Name - Unidentified (strref)
SPL_completion_sound0x10Completion Sound
SPL_flags0x18Flags
SPL_type0x1cSpell type:
SPL_exclusion_flags0x1eExclusion Flags
SPL_casting_graphics0x22Casting Graphics
SPL_school0x25Primary Type (School) (IWD: school.2da, BG2:mschool.2da)
SPL_sectype0x27Secondary Type (BG2:msectype.2da)
SPL_level0x34Spell Level
SPL_spellbook_icon0x3aSpellbook icon (BAM). The engine replaces the last character of this filename with a C.
SPL_description0x50Spell Description
SPL_extended_headers_offset0x64Extended Header offset
SPL_extended_headers_count0x68Extended Header count
SPL_feature_blocks_offset0x6aFeature Block Table offset
SPL_casting_feature_blocks_offset0x6eCasting Feature Block offset (these feature blocks may not use target type 2)
SPL_casting_feature_blocks_count0x70Casting Feature Block count

SPL / Spell Form

Source: structures/spl/spell_form.tph

NameValue
SPELL_FORM_standard1
SPELL_FORM_projectile2

STO

Source: structures/sto/main.tph

NameValue
BGFORGE_STO_DIR%BGFORGE_STRUCTURES_DIR%/sto

STO / Flags

Source: structures/sto/flags.tph

NameValue
FLAG_STO_sellsBIT0
FLAG_STO_buysBIT1
FLAG_STO_identifiesBIT2
FLAG_STO_can_stealBIT3
FLAG_STO_can_donateBIT4
FLAG_STO_has_curesBIT5
FLAG_STO_has_drinksBIT6
FLAG_STO_buys_fencedBIT12
FLAG_STO_reputation_has_no_effect_EEBIT13
FLAG_STO_recharges_items_EXBIT14
FLAG_STO_buys_critical_EEBIT15

STO / Iesdp

Source: structures/sto/iesdp.tph

NameValueDescription
STO_CURE_spellname0x0Filename of SPL
STO_CURE_price0x8Spell price
STO_DRINK_rumor0x0Rumour resource
STO_DRINK_name0x8Drink name strref
STO_DRINK_price0xcDrink price
STO_DRINK_strength0x10Alcoholic strength
STO_signature0x0Signature ('STOR')
STO_version0x4Version ('V1.0')
STO_type0x8Type (0=Store, 1=Tavern, 2=Inn, 3=Temple, 5=Container)
STO_name0xcname
STO_flags0x10Flags
STO_sell_markup0x14Store "sell price markup" (percentage of base price store charges for items)
STO_buy_markup0x18Store "buy price markup" (percentage of base price store is willing to pay)
STO_depreciation0x1cDepreciation rate
STO_chance_of_steal_failure0x20% chance of steal failure
STO_capacity0x22Capacity (0=unlimited)
STO_unknown0x78Unknown
STO_buy_offset0x2cOffset to items purchased section
STO_buy_count0x30Count of items in items purchased section
STO_items_offset0x34Offset to items for sale section
STO_items_count0x38Count of items for sale
STO_lore0x3cLore
STO_identification_price0x40ID Price
STO_rumors_tavern0x44Rumours (Tavern)
STO_drinks_offset0x4cOffset to drinks section
STO_drinks_counts0x50Count of drinks
STO_rumors_temple0x54Rumours (Temple)
STO_room_flags0x5cRoom flags
STO_room_price_peasant0x60Price of a peasant room
STO_room_price_merchant0x64Price of a merchant room
STO_room_price_noble0x68Price of a noble room
STO_room_price_royal0x6cPrice of a royal room
STO_cures_offset0x70Offset to cures section
STO_cures_count0x74Count of cures
STO_ITEM_name0x0Filename of ITM
STO_ITEM_expiration_time0x8Item expiration time (replace with drained item)
STO_ITEM_charges10xaQuantity/Charges 1
STO_ITEM_charges20xcQuantity/Charges 2
STO_ITEM_charges30xeQuantity/Charges 3
STO_ITEM_flags0x10Flags
STO_ITEM_amount0x14Amount of this item in stock
STO_ITEM_infinite0x18Infinite supply flag (0=limited stock, 1=infinite stock)

STO / Item Flags

Source: structures/sto/item_flags.tph

NameValue
FLAG_STO_ITEM_identifiedBIT0
FLAG_STO_ITEM_unstealableBIT1
FLAG_STO_ITEM_stolenBIT2
FLAG_STO_ITEM_undroppableBIT3

Item Types

Source: structures/item_types.tph

NameValueDescription
ITEM_TYPE_misc0x00Books/misc
ITEM_TYPE_amulet0x01Amulets and necklaces
ITEM_TYPE_armor0x02Armor
ITEM_TYPE_belt0x03Belts and girdles
ITEM_TYPE_boots0x04Boots
ITEM_TYPE_arrow0x05Arrows
ITEM_TYPE_bracers0x06Bracers and gauntlets
ITEM_TYPE_helm0x07Headgear (helms, hats, and other head-wear)
ITEM_TYPE_key0x08Keys (not in Icewind Dale?)
ITEM_TYPE_potion0x09Potions
ITEM_TYPE_ring0x0aRings
ITEM_TYPE_scroll0x0bScrolls
ITEM_TYPE_shield0x0cShields (not in IWD)
ITEM_TYPE_food0x0dFood
ITEM_TYPE_bullet0x0eBullets (for a sling)
ITEM_TYPE_bow0x0fBows
ITEM_TYPE_dagger0x10Daggers
ITEM_TYPE_mace0x11Maces (in BG, this includes clubs)
ITEM_TYPE_sling0x12Slings
ITEM_TYPE_small_sword0x13Small swords
ITEM_TYPE_large_sword0x14Large swords
ITEM_TYPE_hammer0x15Hammers
ITEM_TYPE_morning_star0x16Morning stars
ITEM_TYPE_flail0x17Flails
ITEM_TYPE_dart0x18Darts
ITEM_TYPE_axe0x19Axes (specifically, 1-handed axes -- halberds and 2-handed polearms not included)
ITEM_TYPE_quarterstaff0x1aQuarterstaff
ITEM_TYPE_crossbow0x1bCrossbow
ITEM_TYPE_hand_to_hand0x1cHand-to-hand weapons (fist, fist irons, punch daggers, etc)
ITEM_TYPE_spear0x1dSpears
ITEM_TYPE_halberd0x1eHalberds (2-handed polearms)
ITEM_TYPE_bolt0x1fCrossbow bolts
ITEM_TYPE_cloak0x20Cloaks and robes
ITEM_TYPE_gold_piece0x21Gold pieces (not an inventory item, but can appear as "monster dropped" treasure)
ITEM_TYPE_gem0x22Gems
ITEM_TYPE_wand0x23Wands
ITEM_TYPE_container0x24Containers/eye/broken armor
ITEM_TYPE_eye0x24Containers/eye/broken armor
ITEM_TYPE_broken_armor0x24Containers/eye/broken armor
ITEM_TYPE_book0x25Books/broken shields/bracelets
ITEM_TYPE_broken_shield0x25Books/broken shields/bracelets
ITEM_TYPE_bracelet0x25Books/broken shields/bracelets
ITEM_TYPE_familiar0x26Familiars/broken swords/earrings
ITEM_TYPE_broken_sword0x26Familiars/broken swords/earrings
ITEM_TYPE_earring0x26Familiars/broken swords/earrings
ITEM_TYPE_tattoo0x27Tattoos (PST)
ITEM_TYPE_lenses0x28Lenses (PST)
ITEM_TYPE_buckler0x29Bucklers/teeth
ITEM_TYPE_teeth0x29Bucklers/teeth
ITEM_TYPE_candles0x2aCandles
ITEM_TYPE_clubs_iwd0x2cClubs (IWD)
ITEM_TYPE_large_shield_iwd0x2fLarge Shields (IWD)
ITEM_TYPE_medium_shield_iwd0x31Medium Shields (IWD)
ITEM_TYPE_notes0x32Notes
ITEM_TYPE_small_shield_iwd0x35Small Shields (IWD)
ITEM_TYPE_telescope_iwd0x37Telescopes (IWD)
ITEM_TYPE_drink_iwd0x38Drinks (IWD)
ITEM_TYPE_great_sword_iwd0x39Great Swords (IWD)
ITEM_TYPE_pelt0x3bFur/pelt
ITEM_TYPE_leather_armor0x3cLeather Armor
ITEM_TYPE_studded_leather0x3dStudded Leather Armor
ITEM_TYPE_chain_mail0x3eChain Mail
ITEM_TYPE_splint_mail0x3fSplint Mail
ITEM_TYPE_plate_mail0x40Half Plate
ITEM_TYPE_full_plate0x41Full Plate
ITEM_TYPE_hide_armor0x42Hide Armor
ITEM_TYPE_robe0x43Robe
ITEM_TYPE_bastard_sword0x45Bastard Sword
ITEM_TYPE_scarf0x46Scarf
ITEM_TYPE_food_iwd20x47Food (IWD2)
ITEM_TYPE_hat0x48Hat
ITEM_TYPE_gauntlet0x49Gauntlet