# CRE v1 (BG,BG2, EE)

Sorted by order in the file (sort alphabetically)

'Memorized spell' entries occur only as child entries for 'spell memorization data' entries (memorization_spell).

## Main Header

For readability, sound files and status flags are listed separately.

Special keys

Key | Type
--- | ---
both_names | Sets these: name_long,name_short
both_names-strref | Sets these: name_long-strref,name_short-strref
hp | Sets these: hp_current,hp_max
level_all | Sets these: level1,level2,level3
ac | Sets these: ac_natural,ac_effective
colors | Comma-separated list (color_metal,color_minor,color_major,color_skin,color_leather,color_armor,color_hair)
saves | Comma-separated list (save_vs_death,save_vs_wands,save_vs_polymorph,save_vs_breath,save_vs_spells)
abils | Comma-separated list (str,int,wis,dex,con,cha)

Standard keys

Key | Type
--- | ---
name_long | Strref
name_short | Strref
show_longname | Boolean
no_corpse | Boolean
permanent_corpse | Boolean
original_class_fighter | Boolean
original_class_mage | Boolean
original_class_cleric | Boolean
original_class_thief | Boolean
original_class_druid | Boolean
original_class_ranger | Boolean
fallen_paladin | Boolean
fallen_ranger | Boolean
exportable | Boolean
hide_injury_status | Boolean
bit_13 | Boolean
moves_between_areas | Boolean
been_in_party | Boolean
bit_16 | Boolean
reset_bit_16 | Boolean
no_exploding_death | Boolean
ignore_nightmare_mode | Boolean
no_tooltip | Boolean
allegiance_tracking | Boolean
general_tracking | Boolean
race_tracking | Boolean
class_tracking | Boolean
specifics_tracking | Boolean
gender_tracking | Boolean
alignment_tracking | Boolean
xp_value | Integer
xp | Integer
power | Integer
hp_current | Integer
hp_max | Integer
animation | id lookup (animate)
color_metal | Integer
color_minor | Integer
color_major | Integer
color_skin | Integer
color_leather | Integer
color_armor | Integer
color_hair | Integer
portrait_small | String (8 bytes)
portrait_large | String (8 bytes)
reputation | Integer
hide_in_shadows | Integer
ac_natural | Integer
ac_effective | Integer
ac_mod_crushing | Integer
ac_mod_missile | Integer
ac_mod_piercing | Integer
ac_mod_slashing | Integer
thac0 | Integer
attacks | Integer
save_vs_death | Integer
save_vs_wands | Integer
save_vs_polymorph | Integer
save_vs_breath | Integer
save_vs_spells | Integer
resist_fire | Integer
resist_cold | Integer
resist_electricity | Integer
resist_acid | Integer
resist_magic | Integer
resist_magic_fire | Integer
resist_magic_cold | Integer
resist_slashing | Integer
resist_crushing | Integer
resist_piercing | Integer
resist_missile | Integer
detect_illusion | Integer
set_traps | Integer
lore | Integer
pick_locks | Integer
move_silently | Integer
find_traps | Integer
pick_pockets | Integer
fatigue | Integer
intoxication | Integer
luck | Integer
nightmare_mode_applied | Integer
translucency | Integer
rep_gain_on_death | Integer
rep_gain_on_join | Integer
rep_gain_on_leave | Integer
turn_undead_level | Integer
tracking | Integer
level1 | Integer
level2 | Integer
level3 | Integer
sex | id lookup (gender)
str_base | Integer
str_ex | Integer
str | Strength (enter as integer or in 18/76 style)
int | Integer
wis | Integer
dex | Integer
con | Integer
cha | Integer
morale | Integer
morale_break | Integer
racial_enemy | id lookup (race)
morale_recovery | Integer
kit | id lookup (kit)
script_override | String (8 bytes)
script_class | String (8 bytes)
script_race | String (8 bytes)
script_general | String (8 bytes)
script_default | String (8 bytes)
allegiance | id lookup (ea)
general | id lookup (general)
race | id lookup (race)
class | id lookup (class)
specifics | id lookup (specific)
gender | id lookup (gender)
alignment | id lookup (alignmen)
dv | String (32 bytes)
script_name | String (32 bytes)
dialog | String (8 bytes)

Sounds

Key | Type
--- | ---
status_sleeping | Boolean
status_berserk | Boolean
status_panic | Boolean
status_stunned | Boolean
status_invisible | Boolean
status_helpless | Boolean
status_frozen_death | Boolean
status_stone_death | Boolean
status_exploding_death | Boolean
status_flame_death | Boolean
status_acid_death | Boolean
status_dead | Boolean
status_silenced | Boolean
status_charmed | Boolean
status_poisoned | Boolean
status_hasted | Boolean
status_slowed | Boolean
status_infravision | Boolean
status_blind | Boolean
status_diseased | Boolean
status_feebleminded | Boolean
status_nondetection | Boolean
status_improvedinvisibility | Boolean
status_bless | Boolean
status_chant | Boolean
status_draw_upon_holy_might | Boolean
status_luck | Boolean
status_aid | Boolean
status_chantbad | Boolean
status_blur | Boolean
status_mirrorimage | Boolean
status_confused | Boolean

## Known Spell (knownspell)

Standard keys

Key | Type
--- | ---
resref | String (8 bytes)
level | Integer
type | Lookup (0=Priest, 1=Wizard, 2=Innate)

## Spell Memorization Data (memorization)

Standard keys

Key | Type
--- | ---
level | Integer
type | Lookup (0=Priest, 1=Wizard, 2=Innate)

## Memorized Spell (memorizedspell)

'Memorized spell' entries occur only as child entries for 'spell memorization data' entries (memorization_spell)

Standard keys

Key | Type
--- | ---
resref | String (8 bytes)
memorized[1] | Boolean
disabled | Boolean

## Effect (fx)

Standard keys

Key | Type
--- | ---
opcode | Integer
target[1] | Lookup (0=None, 1=Self, 2=PresetTarget, 3=Party, 4=Everyone, 5=EveryoneExceptParty, 6=CasterGroup, 7=TargetGroup, 8=EveryoneExceptSelf, 9=OriginalCaster)
power | Integer
parameter1 | Integer
parameter2 | Integer
timing[9] | Lookup (0=InstantLimited, 1=InstantPermanent, 2=Equipped, 3=DelayLimited, 4=DelayPermanent, 5=DelayEquipped, 6=LimitedAfterDuration, 7=PermanentAfterDuration, 9=InstantPermanentAfterDeath)
duration | Integer
probability1[100] | Integer
probability2 | Integer
resource | String (8 bytes)
dicenumber | Integer
dicesize | Integer
save_vs_spells | Boolean
save_vs_breath | Boolean
save_vs_poison | Boolean
save_vs_wands | Boolean
save_vs_polymorph | Boolean
ignore_primary_target | Boolean
ignore_secondary_target | Boolean
bypass_mirror_image | Boolean
ignore_difficulty | Boolean
tobex_stacking | Boolean
save_bonus | Integer
tobex_stacking_id | Integer
special | Integer
primary | Integer
resist_dispel | Integer
parameter3 | Integer
parameter4 | Integer
parameter5 | Integer
resource2 | String (8 bytes)
resource3 | String (8 bytes)
parent_type | Lookup (0=None, 1=Spell, 2=Item)
parent_resource | String (8 bytes)
sectype | Integer

## Item (item)

Standard keys

Key | Type
--- | ---
resref | String (8 bytes)
duration | Integer
charges_1 | Integer
charges_2 | Integer
charges_3 | Integer
identified | Boolean
unstealable | Boolean
stolen | Boolean
undroppable | Boolean

## Item slot (item_slot)

Item slots are related to items in a way that core editing tools struggle with; use the bespoke lib_cre functions.

Standard keys

Key | Type
--- | ---
item | Integer