Jump to content

ARE file updates


CamDawg

Recommended Posts

So, the Baldur's Gate Enhanced Edition devs have the IE source code and were kind enough to share some of the file formats with us. From the definition of the area files I can now add the following info. These are taken from the source code comments, so don't take them as gospel until they're tested.

 

In the area file header:

  • Headers at 0x20, 0x2c, 0x38, 0x44 are edge flags (NSEW). Bit 0 is party required and bit 1 is party enabled.
  • The word at 0x52 is described as the base wind speed.
  • 0x8c is a word, not dword, of the variable count. It's followed by a word of "m_tiledObjectFlagsCount" and a dword of "m_tiledObjectFlagsOffset".
  • The dword at 0xe4 is listed as unused.

In the creatures section:

  • At 0x28, bit 1 is labeled as 'HasSeenParty' and bit 2 as 'invulnerable'.
  • Bit 0 at 0x2c is listed as 0 (normal) and 1 (random).
  • 0x2e is labeled and commented as "char - m_cFirstResSlot; //The resref of my first character BYTE structureAlignment1[1];"
  • 0x2f is labeled as "BYTE structureAlignment1[1];"
  • The animation at 0x30 is commented as "this is only needed by editor to drastically speed up load times"
  • IESDP lists a dword at 0x34 as orientation, but the notes list orientation as a word followed by two bytes listed as "structureAlignment2".
  • 0x90 and beyond is unused.

In rest interruptions:

  • The probabilities at 0xa8 and 0xaa are commented as 'per hour'
  • 0xac and beyond are unused.

Spawn points:

  • 0x90 and beyond are unused.

Entry points:

  • 0x26 and beyond are unused.

Containers:

  • Flags at 0x28 - bit 1 is "DisableIfNoOwner", bit 2 is "MagicallyLocked", and bit 4 is "RemoveOnly"
  • The 34 unknown bytes 0x56 are listed as a word for trigger range and a script name for the owner.
  • 0x80 is a dword for 'break difficulty'.
  • 0x88 and beyond are unused.

Ambients

  • The name at 0x00 includes the comment "FirstSixCharacters is the AREANAME"
  • Height at 0x26 is listed in the code as two bytes of "structure alignment".
  • The six unknown bytes at 0x28 are a dword for pitch variance followed by a word for volume variance.
  • The two bytes at 0x82 are two more "structure alignments"
  • Bit 1 at 0x90 is labeled as 'looping'. Otherwise bits 0 and 2-4 are correct; 5-7 are unused.
  • 0x94 and beyond are unused.

Song entries

  • The unknown section starting at 0x14 is listed as five dwords labeled altMusic0 through altMusic4.
  • The Main Day Ambient 2 and Main Night Ambient 2 are listed as 'extended' in the source.
  • Source says anything beyond 0x50 is unused.

Regions

  • dword at 0x30 is listed as triggerValue
  • At 0x60, but 0 is labeled as 'Key must be in possession', bit 4 is monster activated, bit 7 is 'no string', bit 10 is 'EnableWalkTo' and bit 11 is 'DoorClosed'. Bits 12+ are unused.
  • The alt coordinated at 0x84 and 0x86 are listed as transitiionWalkToX and transitionWalkToY.
  • Everything beyond 0x88 is unused.

Doors

  • 0x28 flags - bit 6 is commented out but labeled as detected. Bit 11 is labeled commented as "don't check obstacles when closing door".
  • 0x54 is listed as a short for hit points followed by another short for armor class.
  • From 0x9c, the code lists 32 bytes for script name followed by three unused dwords.

Since this is exceedingly tedious, I'll tackle the remainder of the area files in a subsequent post.

Link to comment

Tiled objects

  • 0x20 is TileID
  • 0x28 is flags - "AREA_TILEDOBJECT_SECONDARYSTATE 0x00000001" and "AREA_TILEDOBJECT_GATE 0x00000002 // means you can see through it"
  • 0x3c and beyond are unused

Animations

  • Flags at 0x34 look more or less correct, but here are the descriptions and comments from the code: bit 0 - ENABLED, bit 1 - GLOWING, bit 2 - ALLOWTINT, bit 3 - STOPPED, bit 4 - STARTATBEGINNING // animation starts with first frame (versus random frame), bit 5 - USESTARTRANGE // animation starts with random frame in start range, bit 6 - IGNORECLIPPING, bit 7 - DISABLEONSLOWMACHINES, bit 8 - BACKLIST, bit 9 - SEQUENCEALL, bit 10 - PALETTE, bit 11 - MIRROR, bit 12 - NEVERDISABLE
  • Byte at 0x3f is labeled as period
  • 0x48 is unused

Variables

  • Unknown at 0x20 is a word for type (bit 0 is INT, bit 1 is FLOAT, bit 2 is SCRIPTNAME, bit 3 is RESREF, bit 4 is STRREF, and bit 5 is DWORD) followed by a word for ResRefType (no clarification--possibly to separate references between file types, i.e. itm vs. bam vs. dlg)
  • Unknown at 0x2c is a LONG for intValue, a DOUBLE for floatValue and a SCRIPTNAME listed as stringValue.

Map notes

  • 0x10 and beyond are unused.

I didn't notice anything in the projectile trap and vertex sections.

 

Again, let me stress that these notes are inference from variable names and comments in the source and have not been verified.

Link to comment

Well, we already knew that variables hold more than ints. The exact type list wasn't known. And there isn't much use of them in scripts so far.

 

triggerValue - still not much what i know about this. Any use of this in editors?

 

0x2e - 'firstresslot' is the byte where the first byte from resref goes when it is overwritten by *. A really ugly hack.

 

Container owner features - wow, that's interesting. Sadly, in multiplayer, all your players characters will be named 'charname'.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...