Jump to content

Attack Per Rounds opcode (1) stacking


CamDawg

Recommended Posts

Posted

Argh. Some information with which we may want to expand the Attacks Per Round opcode listing. This was tested in BG2.

 

If more than one Attacks Per Round modifier is in effect on a character, they are capped at five and may get unexpected results from stacking. From the current listing, the values available for the dword at 0x04 are the values of 'key':

 

Key	 Attacks Per Round
0		0
1		1
2		2
3		3
4		4
5		5
6		0.5
7		1.5
8		2.5
9		3.5
10	   4.5

 

When multiple opcodes of this type are stacked, the values of the key are added, not the actual attacks per round. This is usally one and the same, except in special cases. For example, a blade using offensive spin (+1 ApR, key value 1, added cumulatively) and Melf's Minute Meteors (set to 5 attacks, key value of 5, set) will get one attack per two rounds (key value 6). It appears that key values of > 10 remain at 4.5 ApR (tested with Melf's Meteors set to 4.5 ApR + offensive spin).

 

This opcode, when used in conjunction with the haste opcode, can exceed five attacks per round.

Posted
It's probably worth noting that the only attack per round value that overflows exactly in this buggy way is (5, type 1) - if you have a base apr of 0, 1, 2, 3, or 4 your key value (and thus attacks per round) will be clamped at five regardless of how many times you stack opcode1(type 0) effects.

I don't think this is the case. The immediate solution that occurred to me after reading this was to change melfmet.itm to set ApR to 4 and then add an attack on top of that. So, the base ApR is 4 + 1 from melfmet.itm + 1 from Offensive Spin--and the result remains a key value of 6 and only 0.5 ApR.

Posted
I don't think this is the case. The immediate solution that occurred to me after reading this was to change melfmet.itm to set ApR to 4 and then add an attack on top of that. So, the base ApR is 4 + 1 from melfmet.itm + 1 from Offensive Spin--and the result remains a key value of 6 and only 0.5 ApR.

 

You will not, I trust, be unduly surprised to hear that I've tested the same thing (with a variety of equipped weapon combinations, dual wield and otherwise) and consistently remained at five attacks per round, and had my PC run around quite happily with Belm + Kundane for a whole chapter worth of five not point five attacks per round :blush:

 

The opcode1 along with immunity to opcode1 solution is elegant...the first time I tried casting Melf's Minute Meteors modified to work this way I ended up with 3/2 attacks per round. Every time after that it correctly set attacks to five - unfortunately, the number of attacks per round I'd be left with after the Meteors were expended varied from five to one and a half.

 

I'm wondering if the order of operations is significant.

Archived

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

×
×
  • Create New...