This bugfix derives from the thread by Boaster on the public Bugs forum here:
(Ardanis and Technophobe contributed to expanding the extent of the fix parameters beyond Missile THACO alone.)
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.
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 hit
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, fist
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
I 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.
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 bonus
219- attack roll penalty
278- thac0 bonus
Then 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.
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