Jump to content

Random notes


Taimon

Recommended Posts

I was updating my NI sources, so I gathered a list of research areas based on my own personal interest and not the greater good of the community:

 

ARE:
 What effect the dwords (+0x20-0x48) after the linked ARE resrefs (flags?)
 Actor flags (+0x28) Bit 1 is unknown
(set in some TotSC creatures; no visible effect)
 Door flags (+0x28) Bits 5 & 6 are unknown
(an official ruling on what exactly 6 does is needed)
 Trigger flags (+0x60) Bit 0 does what?

VVC:
 Any news is good news :-)
Especially Bits 1-2, 7-8 (+0x20),
actual effect DWORD +0x40,
DWORDx2 +0x50 (linked to Bit 1 how?)

WFX:
 Flags (+0xc) Any other flags beyond Bit 2 (pitch); maybe volume?

Link to comment

Well, that looks like a nice little list. :)

I'll let you know when I come across something, but I doubt I'll look at VVC+WFX.

 

Bit 5 in the item flags seems to be unused in ToB.

In fact, I think the only bits that are used are bit 0 (named it indestructable -- don't know why), bit 1, bit 2, bit 4, bit 8, bit 9 and bit 11.

If you know for sure that any of the other bits is in use in ToB, tell me where.

Link to comment
I'll let you know when I come across something, but I doubt I'll look at VVC+WFX.
Sad for VVC, but WFX is totally useless (and unused). The pitch changes happen randomly for all sounds referenced from the 2DAs, so it's a dead format anyway (I was just curious if it was a more generic control or they ever had any other plans for it). Don't bother.

 

Bit 5 in the item flags seems to be unused in ToB.
Since V1.1 has its own flags slist, Unknown, it is!

 

In fact, I think the only bits that are used are bit 0 (named it indestructable -- don't know why), bit 1, bit 2, bit 4, bit 8, bit 9 and bit 11.
Because it is indestructible (no decay on ground; stays in party). I believe there's even some official string where they dub it such in the exe. Unsellable was just a side-effect added in SoA, and it's the label that stuck (just like ridiculous "death variable" that couldn't ever get rid of).

 

I don't know what you're looking at. All bits but 5 and maybe 10 should work (I could see 7 doing nothing too, though) that I'm aware of...

Link to comment
I don't know what you're looking at. All bits but 5 and maybe 10 should work (I could see 7 doing nothing too, though) that I'm aware of...

There is a function that retrieves the flags from an itm resource. The bits that I listed are the only ones that get checked after the call.

A closer inspection reveals a different function that retrieves a structure with item type, flags and enchantment (for effect 0x078). But this only adds bit 6 (magical) to my list.

 

What about the others?

Stolen (bit 10) is handled via inventory flags, not item flags. And what does bit 3 (displayable) mean?

Link to comment

If you find something let me know.

But I'd say bits 3, 5, 7 and 10 are unused in ToB.

 

Now, 2 more things before I start working on that list:

item ability + 0x17/0x19:

Since main dice values are bytes, this leaves us with two more bytes in the item abilities. And they are actually used ingame. Those values are the primary and the secondary type of the effects.

 

item ability + 0x1c:

There are three additional damage types (6-8).

6: pierce/crush

7: pierce/slash

8: crush/slash

It will pick whatever resistance is lower on the target (for the damage effect). But there seems to be a bug in 8 (crush/slash), because it actually picks the one where the resistance is higher.

Link to comment

I don't know about 5, (i just call it :) always set in dltcep)

But the other disputed bit, 10, i'm pretty sure that it makes the item unsellable.

 

DLG: any of those 3 bits can cause the same non-pause effect, no idea if they have different functions.

 

VVC: sequence flags (0x20) value 0x40 = covers walls (wallgroups don't affect it)

position flags (0x40) -

value 1 causes the vvc to orbit the target (orbit is based on xyz position of vvc)

value 2 is relative positioning (based on target orientation)

Link to comment

Spawn points: i'm pretty sure there is some running counter for spawns.

Some spawns are 'running out' of creatures, and i'm sure there is more than an 'on' / 'off' state.

This state should be saved, therefore the spawn header has a field containing this value.

Never been patient enough to find it :)

Link to comment
DLG:
 Flags (+0x30) we know 0 pause, !0 not pause, but uses Bits 0-2, all unknown?

That was a tough one, very hard to find.

 

Those flags specify what the creature does when the dialogue is interrupted by a hostile action from a EA < GOODCUTOFF creature.

Bit 0: Enemy()

Bit 1: EscapeArea()

Bit 2: nothing (but since the action was hostile, it behaves similar to bit 0)

 

In addition, all these bits trigger the not-pause, but that is already known.

 

Hostile action is something like an effect from a spell with the hostile flag, damage effect, a simple attack or a failed pickpocket action.

 

Man, I need a break now.

Link to comment
VVC: sequence flags (0x20) value 0x40 = covers walls (wallgroups don't affect it)
That's Bit 6 (from 0). I have that one labeled, but 7 and 8 are frequently used but have no labels here. (COPYFROMBACK has an assert, but that's probably one at 0x18.)

 

position flags (0x40) -

value 1 causes the vvc to orbit the target (orbit is based on xyz position of vvc)

value 2 is relative positioning (based on target orientation)

I think I would leave this a hex number, then. Any info on Bit 2 (value 4)?

 

Spawn points: i'm pretty sure there is some running counter for spawns.
I don't think there's any room for it, but yeah, I've never truly researched what's going on with all five unknowns.
Link to comment
Since main dice values are bytes, this leaves us with two more bytes in the item abilities. And they are actually used ingame. Those values are the primary and the secondary type of the effects.
Wow. Never set, but wow. They just stuck everything they could think of in there, didn't they?

 

I'm not sure I'd bother to break them out, though (these are certainly all unmolested WORDs in BG/TotSC, and probably other IEs).

 

There are three additional damage types (6-8).

6: pierce/crush

7: pierce/slash

8: crush/slash

Nice find. I completely forgot about these guys (they are used). I think 8 is actually the most common (or at least, the one I really remember). :-)

 

Those flags specify what the creature does when the dialogue is interrupted by a hostile action from a EA < GOODCUTOFF creature.

Bit 0: Enemy()

Bit 1: EscapeArea()

Bit 2: nothing (but since the action was hostile, it behaves similar to bit 0)

Interesting. I'm not sure why they would have wanted to override behavior like this instead of having a sensible script, but it's good to know.

 

Thanks much.

Link to comment
Since main dice values are bytes, this leaves us with two more bytes in the item abilities. And they are actually used ingame. Those values are the primary and the secondary type of the effects.
Wow. Never set, but wow. They just stuck everything they could think of in there, didn't they?

Certainly. But what do you mean with "never set". They are used -- check some of the wands for example.

To clarify, I'm talking about 0x17 and 0x19 here.

Link to comment

I don't have enough of BG2 installed to look at it, so when I say "never set," it really means that it's something I don't ever remember seeing.

 

The second half of the year is my customary vacation from IE, so I usually go into lazy mode and just pontificate without any actual facts to back me up. ;-)

 

I'm mostly working off NI code and something I think I remember I might have seen some time ago some place, so don't read too much into my offerings of "insight."

Link to comment

Oh well, I really enjoy any "offerings of insight", so keep them coming. :)

 

Back to item flags:

There is another function that accesses the flags in a non-standard way. It simply passes them to an (virtual) animation function.

Nearly all of those functions use Bit 7 (bow) and I did find one that uses Bit 10.

Now, I don't think there is a special kind of animation for stolen items. Any ideas?

Link to comment

None whatsoever. But the animation code has pieces of old-world, Icewind, and new-world support, and I don't know much about them or their differences (so it could be specific to one and not the others)?

 

I believe "Bow" is called so because it only ever got set for BOWxx (but there's nothing unique to BOW that would call for such a thing?); I don't know where "Stolen" comes from.

Link to comment

Archived

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

×
×
  • Create New...