(BG1) Physical attack and damage negative penalty items end up wrapping to bonuses (0815)
This bugfix derives from the thread by Boaster on the public Bugs forum here:
http://forum.baldursgate.com/discussion/1427/bug-subtracting-thac0-via-missile-thac0-bonus-167
(Ardanis and Technophobe contributed to expanding the extent of the fix parameters beyond Missile THACO alone.)
OBSERVED:
An item which reduces Missile THACO (using Effect 167) using Timing Mode 1 instead adds a huge amount to Missile Attack Bonus. The formula supplied by Boaster was this for a -4 Missile THACO item:
EXPECTED:
The penalty should apply directly to THACO as an addition to THACO.
As Boaster's formula continued:
This same negative wrapping of penalties into excessive bonuses applies also to these effects from ITMs using Timing Mode 1 (Instant/Permanent):
There's also 178 - THAC0 v Type, 179 - dam v Type which I'm assuming are very relevant to rangers as an effect- though not in the negative- but I couldn't figure out how to make an item with it properly with Near Infinity.
I also tested the following and found them completely ineffective at a -5 penalty/value (not just a normal -5 penalty but no difference at all):
Also note that many of these may be existing ToBEx fixes, particularly given the familiar "negative wrapping" issue.
And after all that, everyone had better start wearing attack and damage penalty items to make that time well spent. :-P
http://forum.baldursgate.com/discussion/1427/bug-subtracting-thac0-via-missile-thac0-bonus-167
(Ardanis and Technophobe contributed to expanding the extent of the fix parameters beyond Missile THACO alone.)
OBSERVED:
An item which reduces Missile THACO (using Effect 167) using Timing Mode 1 instead adds a huge amount to Missile Attack Bonus. The formula supplied by Boaster was this for a -4 Missile THACO item:
BASE THACO - 255 (to which -4 wraps)So the amount you need to hit is abysmally low- i.e., an auto-hit. Using a -5 Missile THACO item I saw an improvement from +8 AB to + 263 AB in the To-Hit combat feedback for missile weapons only.
EXPECTED:
The penalty should apply directly to THACO as an addition to THACO.
As Boaster's formula continued:
BASE THACO + 4, thus raising the THAC0 value to make it more difficult to hitNOTES:
This same negative wrapping of penalties into excessive bonuses applies also to these effects from ITMs using Timing Mode 1 (Instant/Permanent):
73- Attack damage bonus- negative wrap to +140s for all damage- melee, missile, fistI confirmed them all to make sure of the same negative wrapping issue by creating items with each one at -5 penalty and all of them giving an excessive bonus.
284- THACO bonus (with an "O", not a zero)- melee or fist only
285- Melee weapon damage bonus- melee or fist only
286- Missile weapon damage bonus- missile only
288- Fist thac0 bonus- fist only
289- Fist damage bonus- fist only
305- Offhand (melee) thac0 bonus- fist only (tested by @Tanthalas)
306- Main hand (melee) thac0 bonus (though this effect is listed in NI as "Unknown")- melee only
There's also 178 - THAC0 v Type, 179 - dam v Type which I'm assuming are very relevant to rangers as an effect- though not in the negative- but I couldn't figure out how to make an item with it properly with Near Infinity.
I also tested the following and found them completely ineffective at a -5 penalty/value (not just a normal -5 penalty but no difference at all):
54- thac0 bonusThen I tested all of the above including the original Effect 167 using an .ITM which instead used Timing Mode 2 (Instant/While Equipped) with exactly the same results.
219- attack roll penalty
278- thac0 bonus
Also note that many of these may be existing ToBEx fixes, particularly given the familiar "negative wrapping" issue.
And after all that, everyone had better start wearing attack and damage penalty items to make that time well spent. :-P
Post edited by Bhryaen on
1
Comments
There is a certain combination of (all) Thac0 penalty combined with Missile Thac0 bonus that will cause a bug that makes the Ranged character's thac0 to to drop to -250 or some extravagantly low thac0.
It's been awhile since I've had to deal with it. I did find a work-around on it. I thought it would be worth mentioning though.
Actual Behavior:
When you insert a negative value (i.e. -4)... it wraps to -255 +4 + (13) BASE THAC0.
-255 - (-4) +13 = -238
Expected behavior:
13 (Base THAC0) minus -4 to equal 17 THAC0, thus raising the THAC0 value to make it more difficult to hit.
13 - (-4) = 17.
The same case may also be applied with Melee Attack Bonus and Missile Attack Bonus, where in some cases will cause damage to wrap around backwards.
278 - thac0 bonus
284 - melee thac0 bonus
288 - fist thac0 bonus
305 - offhand (melee) thac0 bonus
306 - main hand (melee) thac0 bonus
It does however appear as "THACO bonus (284)."
[EDIT] lost power on Friday - I think they're all fixed now. I tested each one with a 10/-10.
I'll have to make some for my own test, so if no one else helps I'll just attach what I make and flag you
OK, didn't have the items from the last test, so I created a new slew, all Power 0, affect Self, Timing Mode 1 (instant, permanent), 0 duration, 100% probabilty, and increment a -11 this time (since @SethDavis mentioned testing with a +/-10). I used a half-elf fighter w/ 15 STR, 18 DEX wielding a simple longsword (with a dagger for the off-hand) and shortbow to test how melee and ranged THAC0 and Dam were affected (if at all). Note that I had no pips in Two Weapon so a -4/ -8 was expected. Then I used a human monk w/ 15 STR, 18 DEX to test Fist THAC0 and Dam. I also tested by starting a new game every item given that the Timing Mode = 1 effects are permanent. I was going to test Timing Mode = 2 (while equipped) since that's the mode presumably most will use it on... but no... So most everything functioned as expected, including 305 and 306 which I erringly tested as not working when I first made the above chart. X-/
But Opcodes 54, 219 are still useless. I just checked to see if the former two are used in-game:
- 219: SHLD06P, SHLD07P... But then for those two ITMs- "No hits found." So not a problem... I suppose...
- 54: Affects the following ITMs... much (but not all) of which are monster ITMs but, well, used in-game...
BRAC08
BRAC09
BRAC10
BRAC11
BRAC21
BRAC25
CHILLT
DRUEAR
DRUFIR
FLIND1
GHAST1
HELM07
PARAGHAS
PLAT22
PLAT23
POTN09
POTN41
PTION41 (?)
RSBRAC
SW1H69
SW1H69C
WAND19
By the way- not sure if it's new, but I like the addition of "(Left)" to indicate it's the off-hand strike. Very helpful... However, I think "(Off-hand)" would be better... Adding that to GTU thread...
Also noting the oddball way that Opcode1 works: APR bonus. Apparently it does nothing until the first hit- at which point it takes off. So you can swing indefinitely with your APR unaffected, but the moment you get your first hit- voom in comes Opcode 1. Separate report for that too...
@Tanthalas
Attaching the slew of rings- all named for the opcode they're using with a ".RNG" prefix... I'm adding the weapons I used: essentially SW1H04, DAGG01, BOW05 except I gave them the max APR so the test would go faster- and I renamed them .SWRDXX, .DAGGXX, and .BOWXX... Also a copy of the Green 999HP Megaxvart (.xvartx) since he's got +25 THAC0 and does little dam in case he's useful for your tests. Keep in mind you'll have to do a new game for each one because the Timing Mode = 1 boosts the stats permanently (or is supposed to anyway).
Sorry- I had to fix .DAGGXX. Everything else is the same...
Opcode 54 seems to be working for me. My test character has a THAC0 and base THAC0 of 16 listed in the character sheet. Equipping the item giving the effects raises/lowers the listings properly and testing against Gibberlings results in a fairly prompt smacking or an inability to hit the broad side of a barn.
I'm now not at home but will verify later- could very well have setup the ring wrong or maybe I did something sloppy in the first part of the tests...
I was really hoping to be wrong so as to move forward, but... Can you check the .RNG054 I made? I've septuply examined it- same stats as everything else, just using Opcode54. I also thought maybe I'd just confused my results, but I just got the same ones repeatedly- no THAC0 bonus (normal dam) with the Opcode54 ring on. Just in case I added it as an effect to the dagger, but that didn't show up either. I also tried switching to the range you were using- -9 rather than -11: still no THAC0 effect. I even tried starting a completely new CHARNAME with regular weapons, +1 Field Plate, nothing I made, then loaded him with .RNG054... nothing. I'll attach a save game in case there's reason for this otherwise.
@Avenger_teambg
You're good at spotting modder mistakes. ;-) Can you see what I did wrong with .RNG054 in the .zip above- or if I did something wrong?
This isn't a problem itself, though, just my lister gets confused.
00h Signature ITM V1
08h UnID name 00004389
0ch ID name 0000438a
10h Used up
18h Attributes 0000006c
1ch Itemtype 000a
1eh Usability 00000000
22h Animation 2020
24h MinLevel 00
25h UNKNOWN 00
26h MinStr 00
27h UNKNOWN 00
28h MinStrBonus 00
29h Kit 1 00
2ah MinInt 00
2bh Kit 2 00
2ch MinDex 00
2dh Kit 3 00
2eh MinWis 00
2fh Kit 4 00
30h MinCon 00
31h Proficiency 00
32h MinCha 00
33h UNKNOWN 00
34h Price 0000000a
38h Stack 0001
3ah Inventory IMISC72
42h Lore to ID 0000
44h Ground GDAGG01
4ch Weight 00000001
50h UnID desc 00002e47
54h ID desc 00002e48
58h Desc icon CMISC72
60h Magiclevel 00000000
64h Ext. offset 000000a2
68h Ext. count 0000
6ah Feat. offset 00000072
6eh Equip offset 0000
70h Equip count 0001
72h **Error**
You use a permanent timing for an equipping effect. That means, when you remove the ring, the effect will remain. I don't see other problems.
It changed my base thac0 to 25 (worst possible), and it remained there.
If you want to see something really weird, try timing mode 9. And reequip the ring a few times.
It kept changing base thac0 until 255!
Ok, so using your ring also works for me, and creating a duplicate with a negative effect lets me play with the THAC0 between 0 and 25. Perhaps it's just a matter of doing a fresh install with the next build?
I'll attach the item I'm using as well, just in case something wild and magical is happening because it can only be worn by thieves or something.
Just tested your item- had to create a thief to use it- and also made a rework of it with the lore down and class restrictions gone... same result for me- no THAC0 bonus. The only difference between yours and mine is that yours is Power = 1, but that doesn't affect things anyway.
@Avenger_teambg
So my Opcode54 item worked in your game! (It gives a THAC0 -11 penalty.) So that means something's off in my game itself.
I've been making the items using NI. Yeah, I was making all my test items Timing Mode = 2 (while equipped) but during ToBEx tests @Wisp mentioned that only Timing Mode = 1 really counts (maybe just for those ToBEx's), so ever since I use Timing Mode = 1... unless I'm actually making an item to use, of course.
Since Seth did so much of his own testing and @Avenger_teambg confirmed 054, I'll just send this one on then...