Jump to content

IWD2 ITM Strength Bonus?


FredSRichardson

Recommended Posts

I noticed that the IWD2 ITM "Allow strength bonus" flag (offset 0x026 in the Ability struct) can be 0, 1 or 3 in IWD2 (those are the only values I've seen). Does 3 have any special meaning, or is just the same as 1? I'm guessing it's the same as 1 (I looked at a few ITM's and didn't see any pattern).

 

The strength bonus flag seems to make sense. From looking at the ITM's, it didn't apply to ranged weapons but it did apply to missile and melee ones (consistent with the rules of course).

 

Does anyone know if the strength bonus applies to both the attack and damage? I did a quick test and I'm guessing it does (skellies with 22 strength were kicking my @ss with critical hits and massive damage).

Link to comment

Yeah. I mapped 1 and 3 to "Yes" in my NI build, and 0 and 2 to "No." I pray it's not more bit flags.

 

These values started in BG (most non-magical weapons used 3, and magical weapons always used 1). I wasn't ever able to find any difference between 1 and 3 when testing under BG2 (3 is used occasionally there; mainly with katanas).

Link to comment

That's what I thought (actually Dex-only; it seemed logical for katanas), but it doesn't track with the usage in BG (where it was first used and was used consistently for only non-magical items), and there was no difference between 1 and 3 when testing in BG2 with a 25 Str, 25 Dex PC.

 

I can't remember if I tested using 2 (I must have?); I may have mapped it "No" because it didn't give any bonuses (same as 0) or because I didn't actually test it (I'm sure I would have assigned "Yes" if I tested it and it worked).

 

The recharge behavior value is also scary unknown (I believe I concluded that it was, in fact, a bit field, but I don't remember).

Link to comment

Yes, that part is a 32 bit field with many unknown, reserved or unused bits.

A nightmare ???

I guess the only way to uncover the unknown bits is to reverse engineer the code.

Eventually, i will get to it.

But first i work on opcodes then actions/triggers and probably then the combat process.

Link to comment

Well, I can tell you that the byte at offset 0x026 in the IWD2 Item Ability struct only takes values 0, 1 and 3 in the game. The neighboring unknown at 0x025 is always zeroed out. NI makes you think that the other two bytes at 0x024 and 0x027 (drain/charges) are known, but I don't know if that's true.

 

Not sure if that helps. I imagine you're more interested in the run-time usage of these data structures.

Link to comment

Those fields are not fully known.

The recharge flag is 0x8, in the appropriate byte, the rest is unknown/unused.

And there are 2 new bits used only in iwd2 (keen and ..., i forgot).

Those are also stored around these bits.

Link to comment
Could it be Dexterity added?
In BG, this appears to be a bit field. If Bit 0 is set, strength bonus is added to damage on hit. If Bit 1 is set, there is a random chance on hit that the item will break due to the iron plague (either replaced with the used up item reference or disappearing, depending on the drain behavior value).

 

It's probably the same with BG2 (and the second bit is completely ignored), but like you said, they could have usurped any and all of the header for whatever purpose for ID2.

Link to comment

Nope. According to my tests yesterday, whether magical or not, replacement and replace on drain set or not, the item will only break if you have the bit here set (either a value of 2 for no strength bonus, or a value of 3 if you want the strength bonus). I tried 10 copies of BLUN01 with different values set for replacement and strength bonus, gave the party perma-haste and boosted all Imoen's resistances, and let them kick her ass for about 2 hours or so.

 

Checking periodically to replace used up items and swap them around to the chars with more attacks, every single item that had this bit set eventually broke; not a single one of the items without it ever broke.

Link to comment

Archived

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

×
×
  • Create New...