Larian Banner: Baldur's Gate Patch 9
Previous Thread
Next Thread
Print Thread
Joined: Aug 2017
T
stranger
OP Offline
stranger
T
Joined: Aug 2017
It seems that the ability to attach files to posts is broken, so I am including the following markdown in a code section in the post.


Code
Item file (items.000) structure
===============================

  All integers in the file are either 32-bit signed or 8-bit unsigned.

  In the tables below "var" length denotes a variable-length field.

  Arrays will start with a length field, followed by a number of records equal
  to the length field. i.e if length is 0, then no array follows.

  The item file is a header, followed by an array of items, with the following structure:

  Field       | Len | Notes
  ------------|-----|-------------------------
  head        |  4  | Always = -101
  num_special |  4  | Number of "special" items
  len_ids     |  4  | Length of ID array
  ids         | var | Signed 32-bit int array of len_ids length
  id_check    |  4  | Last ID in ids, repeated
  len_items   |  4  | Number of items in the list that follows
  items       | var | Array of len_items item records

  The ids array will contain some place holders with ID of 0, and these
  ids don't appear in the items list.


Item record structure
---------------------

  Field       | Len | Notes
  ------------|-----|-------------------------
              |  1  | Always 0
  id          |  4  | Item ID
  is_special  |  1  | Boolean. 1 if item is "special" (wearable)
  special     | var | Special record (see below)
  len_title   |  4  | Length of following string
  title       | var | Item title
  damage      | 12  | (Min, Max, Bonus) damage
  armor       |  4  | Armor rating
  charm_slots |  4  | Number of charm slots
  durability  |  8  | (Max, Current) durability
   ?          |  4  | ? Seems to always be zero
   ?          |  4  | ? Equals 1 for 7 items, else 0
   ?          |  4  | ? Equals 1 for 34 items, 2 for 1, else 0
  boosts      | 24  | Bonus to (vit, mag, off, def, sight, hearing)
  resistances | 16  | Add (lightning, poison, fire, spirit) resistance
  id_level    |  4  | Identify level needed. Usually = special.rank.
  identified  |  1  | Boolean. 1 if item identified
  speed       |  4  | Bonus to speed
  kind        |  4  | Item category. (Not the same as equipped slot.)
  required    | 16  | Required attributes (str, agl, int, con)
  bonuses     | 16  | Bonus to attributes (str, agl, int, con)
  len_title   |  4  | Length of following string
  title       | var | Item title
  len_charms  |  4  | Number of charms
  charms      | var | Array of charm records
  len_props   |  4  | Number of properties
  properties  | var | Array of property records

### Charm and Property record structure

  Field    | Len | Notes
  ---------|-----|-------------------------
  len_name |  4  | Length of following string
  name     | var | Property or charm name
  val      |  4  | Value of property or charm
  end      |  1  | Allways zero. Marks end of property record


Special record structure
------------------------

  Field       | Len | Notes
  ------------|-----|-------------------------
   ?          |  4  | ? always equal 0 ?
  len_skills  |  4  | Number of skill records
  skills      | var | Array of skill records (132-bytes each)
   ?          |  4  |
  len_title   |  4  | Length of following string
  title       | var | Item title
  len_name    |  4  | Length of following string
  name        | var | Name of special item
   ?          |  4  | -1 for most. 0 for bows and crossbows?
  slot        |  4  | Item slot taken (i.e. legs, head, weapon, etc.)
  is_2h       |  1  | Boolean for Two-Handed?
  is_bow      |  1  | Boolean for Ranged? Seems to be 1 if bow.
   ?          |  4  | Seems to always be 0.
  rank        |  4  | Item rank (determines name color)
   ?          |  1  | ? Seems to always be 1
  damage      | 12  | (Min, Max, Bonus) damage
  armor       |  4  | Armor rating
   ?          |  4  | ? seems to always be 0
  durability  |  8  | (Max, Current) durability
   ?          | 61  | All zeros, except 3 items
  kind        |  4  | Item category
  required    | 16  | Required attributes (str, agl, int, con)
  bonuses     | 16  | ? Bonus to attributes (str, agl, int, con)
  len_title   |  4  | Length of following string
  title       | var | Item title
  is_2h       |  1  | Seems to always match is_2h
  is_bow      |  1  | Seems to always match is_bow
   ?          |  6  | Seems to always be 0.
  has_props   |  4  | Equals 1 if a special props record follows
  props       | var | Only one item has this. Record is detailed below

### Special properties structure

  Field       | Len | Notes
  ------------|-----|-------------------------
  len_list1   |  4  | Length of first property list
  len_list2   |  4  | Length of second property list
   ?          |  4  | ?
   ?          |  4  | ?
   ?          |  4  | ?
  list1       | var | Array of (p32_string, int) pairs
  list2       | var | Array of (p32_string, int) pairs
  len_title   |  4  | Length of following string
  title       | var | Item title




Joined: Aug 2017
T
stranger
OP Offline
stranger
T
Joined: Aug 2017
If someone can tell me how to add a file, I'll attach the file (which is more easily read with a markdown viewer or in plain text with a fixed-width font.)

Joined: Mar 2003
Location: Canada
Support
Offline
Support
Joined: Mar 2003
Location: Canada

There is no way to upload a file to the forum. You would have to host it elsewhere and include a link.

I've moved you to the user group, so you can use UBBCode now; it is disabled for new users to discourage spam (no clickable links), along with a few other restrictions.

Joined: Aug 2017
T
stranger
OP Offline
stranger
T
Joined: Aug 2017
Understood. Thanks Raze. I see that UBBCode is now working for me.

Odd that a "code" section doesn't automatically display in a fixed-width font. I'll see if I can fix that, to make it easier to read.

Joined: Mar 2003
Location: Canada
Support
Offline
Support
Joined: Mar 2003
Location: Canada

By default code does use a fixed width font.


Moderated by  Larian_QA, Lar_q, Lynn, Macbeth 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.5