Jump to content
Sign in to follow this  
Taimon

Random notes

Recommended Posts

Bit 10 (stolen) triggers the the two weapon animations (*A7, *A9). Makes sense since it's checked directly before the twohanded bit.

 

Now, I do wonder where that "stolen" came from. :)

Share this post


Link to post

Apparently it has something to do with double handedness, it disables wielding two single weapons in left/right hands. No idea what is it exactly.

Also, if switched enough times, it causes the graphic glitch shown above.

Share this post


Link to post

The bow flag can skip the rendering of the weapon (not 100% sure) under certain circumstances. (Orientation is one factor.)

I'm done with GUI stuff for now -- too weird.

 

In the .gam file, the npc+0x2c structure is the NumTimesInteracted() counter. [24 * 4, see npc.ids]

Apparently, the Interact() doesn't modify the counter, so this is always zero and the trigger is "broken".

 

npc+0x94 holds the ability indices for the weapons [4 * 2], with -1 meaning disabled.

Same for the quick items.

Share this post


Link to post

Huh, i thought the ability indices are already known....

 

The V1.1 description is currently a mess.

The quick items are not a dword, but pairs of words, just like the quick weapons.

 

In V2.0 it says only 'enabled' but it is as Taimon said, 0xffff-disabled, otherwise the selected ability header (0-2)

Share this post


Link to post

  Ambient sound flags (+0x90) Bit 4

"Low Mem Sounds 1" has some effect (skip?) on this sound.

 

  Animation flags (+0x34) Bit 7

"Low End Machine" has some effect (skip?) on this static.

 

  Door flags (+0x28) Bit 4

Door was successfully forced (bashed).

 

ARE:
 What effect the dwords (+0x20-0x48) after the linked ARE resrefs (flags?)
 Actor flags (+0x28) Bit 1 is unknown
 Animation flags (+0x34) Bits 5
 Door flags (+0x28) Bits 5 & 6 are unknown
 Door unknowns (+0x54-0x56) any intended use for these (WORDx2)?
 Trigger flags (+0x60) Bit 0 does what?

Didn't find anything for these. Either unreferenced or copied but not used.

Are those linked ARE resrefs used anywhere? Looks like a leftover from BG1.

Edited by Taimon

Share this post


Link to post

  Rest spawn "difficulty" (+0x9a) is obviously related to point "method"; does what?
 Rest spawn unknowns (+0x9c) are these (DWORD+WORDx2) ranges (why three)?
 Rest spawn unknown (+0xa6) is this flags? on/off WORD?

Finally something interesting.

 

0x9a: difficulty

Requires some explanation, I guess.

First the party level is calculated (sum of the effective levels of all members).

Every spawn has a difficulty associated with it. For CREs this is the xp stat, for groups it's the value in the difficulty row.

For every spawn, the difficulty sum of all spawns up to now (including the current) is compared against (party level * 0x9a). If it's greater, the spawning is aborted.

There is some code, that makes sure that the first spawn isn't aborted, if it's the only one.

 

0x9c: remove after X seconds (removal time)

0xa0: max. random walk distance

0xa2: max. move to object distance (remember, not working)

You already know these from the actor structure. (They are passed to the CRE constructor.)

 

0xa6: enabled (bool, word)

Share this post


Link to post
"Low Mem Sounds 1" has some effect (skip?) on this sound.
Hmm. Low Mem Sounds 1 would have almost no effect on ambients if that's all it's looking for, though (this flag is rarely set).

 

"Low End Machine" has some effect (skip?) on this static.
There's some sort of "Do Not Draw" code attached to this to ensure certain settings are enabled, but I don't know why. Also, this flag is set in some of the animations in Irenicus' dungeon, and I swear it doesn't behave this way (unlike in the ToB areas where they finally use the flag, the animation doesn't disappear, regardless of settings).

 

Are those linked ARE resrefs used anywhere? Looks like a leftover from BG1.
You got it. Somebody needs to shoot you a TotSC .exe already.

Share this post


Link to post
Requires some explanation, I guess.
Ah, OK. This behaves similar to the old random spawn effect (difficulty is defined as a maximum value to spawn / "XP" CREs).

 

Do you think "Left-handed" is a fair label for ITM Bit 10, or am I reading your description wrong?

Edited by devSin

Share this post


Link to post
Somebody needs to shoot you a TotSC .exe already.
Tell me when where and how and you've got access to one BG vanilla exe and one BG Totsc exe

 

 

Oh and a few posts back on the previous page, you were discussing item files and the flag bits...

 

Just wanted to share that in my BG2 TOB, I use bit 2: Movable and bit 3: Displayable to determine only those items that the player (and party members) can utilize.

 

Why?

If bit 2 is not set and the item gets created in inventory via spell or script, it can't get removed.

I don't know what bit 3 should really be called, but it's always set on any item that the player can use.

 

Just by checking for bit 3 alone, you can weed out most if not all of the items that are creature specific and not available to party members... So... perhaps it is 'Displayable in Shop'

Share this post


Link to post

Taimon, there is some mismatch between your spawn structure offsets and iesdp.

For example iesdp has these:

 

0x0078 2 (word) Seconds between spawning

0x007a 2 (word) Spawn method (1=Rest, 2=Revealed)

0x007c 4 (dword) Unknown

0x0080 2 (word) Unknown. Usually matches 0x0082

0x0082 2 (word) Unknown. Usually matches 0x0080

0x0084 2 (word) Maximum creatures to spawn

0x0086 2 (word) Spawn point enabled (0=Inactive, 1=Active)

 

Your offsets seem to be +0x20 :party:

Share this post


Link to post

He's doing the rest spawn, which has a slightly different structure but is otherwise identical (those fields are the same in both).

 

In spawn points, the difficulty ("frequency") is said to be 0x76 ((Frequency * Player Level) / Creature Power), but it should actually be 0x7a? I still have no idea what the nonsense at 0x76 is doing.

 

Actually, I change my mind. +0x76 seems to be constant across TotSC/ToB. +0x7a is some crazy stuff; I call bullshit on that "Spawn method" nonsense description, though. No wonder I left these HexNumber!

 

+0x78 doesn't make any sense either.

 

You got it. Somebody needs to shoot you a TotSC .exe already.
To clarify, I was hoping the code was still there so I could piggyback off your BG2 work and use it for BG/TotSC-only! I was being sneaky. Edited by devSin

Share this post


Link to post

Yeah, the spawn method in the spawn struct is BS :party:

 

So, the rest spawn header and the spawn structs share a lot in common?

Share this post


Link to post
Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...