Darklands general lists

Files with this format: "darkland.lst".

Contains item definitions, saint names, and formula names.

Table of Contents

Offsets

starting at 0x00

Structures

item_definition

Offsets

Offset: starting at 0x00

0x00: num_item_slots: byte = 0xc8
Number of item definition slots.
  • This is the number of slots, not the actual number of items that are defined.
0x01: num_saints: byte = 0x88
Number of saints defined.
  • Saint information is also stored in other file(s) like darkland.snt; changing this value would probably be a bad idea.
0x02: num_formulae: byte = 0x42
Number of alchemical formulae defined.
  • Alchemical formula information is also stored in other file(s) like darkland.alc; changing this value would probably be a bad idea.
0x03: item_definitions: array[ num_item_slots ] of struct item_definition (each size 0x2e)
Item definitions.
  • The index of an item in this array is called the item's "code", and is used very frequently in other files. Unfortunately, the code is not stored anywhere in the item's definition.
  • A comprehensive list of codes (and corresponding types) can be found in the UGE module, available from the files section of darklands.net.
  • "Empty" slots contain all 0x00.
[next]: saint_full_names: array[ num_saints ] of string (null-delimited)
Full names of saints.
  • All start with "St.".
  • The longest one is 23 letters: "St.Christina, Astonish.".
  • The order of these is the "definitive" order, since the full name is the best unique identifier.
[next]: saint_short_names: array[ num_saints ] of string (null-delimited)
Short names of saints.
  • All start with "S.".
  • The longest ones are 13 letters.
  • The order of saints here matches the order in saint_full_names.
[next]: formula_full_names: array[ num_formulae ] of string (null-delimited)
Full names of alchemical formulae.
  • The longest ones are 26 letters.
  • The order of these is the "definitive" order, since the full name is the best unique identifier.
[next]: formula_short_names: array[ num_formulae ] of string (null-delimited)
Short names of alchemical formulae.
  • All start with two initials, then a space, then five to seven letters: 8 to 10 letters total.
  • The order of formulae here matches the order in formula_full_names.

Structures

Structure: item_definition

Size 0x2e.

A definition of an item.

0x00: name: string(20)
Name.
0x14: short_name: string(10)
Full name.
0x1e: type: word
Item type.
  • TODO: add ext-reference to the UGE file for the enum data.
  • TODO: instead, make this an empty enum pointing there...
0x20: bitmask[1]
bit 1: is_edged: Item is an edged weapon.
bit 2: is_impact: Item is an impact weapon.
bit 3: is_polearm: Item is an polearm.
bit 4: is_flail: Item is a flail.
bit 5: is_thrown: Item is a thrown weapon.
bit 6: is_bow: Item is a bow.
bit 7: is_metal_armor: Item is metal armor.
bit 8: is_shield: Item is a shield.
0x21: bitmask[1]
bit 1: unknown
  • This and the next bit seem to indicate items that could be found in a pawnshop (all unequippable "normal" items).
  • 0x03 for harp and flute, 0x02 for clock, grappling hook, and lockpicks, 0x01 for all other pawnshop items.
bit 2: unknown
bit 3: is_component: Item is an alchemical component.
bit 4: is_potion: Item is a potion.
bit 5: is_relic: Item is a relic.
bit 6: is_horse: Item is a horse.
bit 7: is_quest_1:
  • These seem to be the types of quest items that would be found in offices (love letters), or unused ones (treason note).
bit 8: [constant: 0]
0x22: bitmask[1]
bit 1: is_lockpicks: Item is lockpicks.
bit 2: is_light: Item gives light.
  • Torch, candle, and lantern.
  • Note that lights are not a factor in game play.
bit 3: is_arrow: Item is an arrow.
bit 4: [constant: 0]
bit 5: is_quarrel: Item is a quarrel.
bit 6: is_ball: Item is a ball.
bit 7: [constant: 0]
bit 8: is_quest_2:
  • These seem to be outdoors quest items (prayerbook), fortress/baphomet/dragon items (sword of war, bone, gold cup), and creature parts (tusk and wolfskin).
0x23: bitmask[1]
  • This is the only one of the five bitmasks where more than one bit is on for a given item: leather armor is 0x14.
bit 1: is_throw_potion: Item is a throwable potion.
bit 2: [constant: 0]
bit 3: is_nonmetal_armor: Item is a non-metal armor.
bit 4: is_missile_weapon: Item is a missile weapon.
bit 5: [constant: 0]
bit 6: is_unknown_1: unknown
  • Set only for: great hammer, maul, military hammer, leather armor, pure gold, manganes, zincblende, antimoni, orpiment, white cinnibar, nikel, pitchblende, zinken, and brimstone.
  • Best guess is "items found in chests in the mines", but it's a wild guess.
bit 7: is_music: Item is a musical instrument.
  • Harp and flute.
bit 8: [constant: 0]
0x24: bitmask[1]
bit 1: is_unknown_2: unknown
  • This and the next bit are set for anything that does not have the high bit is_unknown_3 set, except for: cloth armor, superb horse, and fast horse.
  • W: I don't see relation with is_unknown_3. This and next bit are never set together. 1st or 2nd is set for misc weapons, armor and potions, 2nd only for all ingredients.
bit 2: unknown
bit 3: [constant: 0]
bit 4: [constant: 0]
bit 5: [constant: 0]
bit 6: [constant: 0]
bit 7: [constant: 0]
bit 8: is_unknown_3: unknown
  • Set for cloth armor, all types of quest items, relics, and creature parts.
  • This is always set if any of these three bits was set: is_relic, is_quest_1, is_quest_2.
0x25: weight: byte
Item weight (when wielded).
0x26: quality: byte
Default quality of the item.
  • Based on the values, this is probably used as a sort of "base" or "default" item quality.
  • Values are: 25 for most everyday items. 35 for composite bow. 70/40/25/15/5 for horses (superb, fast, average, pack, and mule). 99 for quest items and non-weapon relics. High (40-70) for weapon relics.
0x27: rarity: byte
Rarity of the item.
  • Range 0-12 (relics 12, quest items 0 [n/a?], missiles 1, bows: Short 3, Long 10, Composite 12, horses: Pack 2, Average 3, Fast 4, Superb 6
0x28: unknown word
  • Non-zero only for relics.
  • Ranges from 0x06 (St. Edward's Ring) to 0x50 (St. Gabriel's Horn).
0x2a: unknown word
  • Non-zero only for relics, and for the "residency permit" (which is unused by the game).
  • Ranges from 0x05 to 0x27 (residency permit).
0x2c: value: word
  • This value is high for expensive things (transformation potion is 0x4e0=1248) and low for cheap things (arrows are 2).
  • Quest items are either low values or off-the-scale high values (0x270f).
  • Relics vary but are lower than many potions.