CamDawg Posted April 9, 2022 Share Posted April 9, 2022 All effects in the game--whether from a spell, item, EFF file, or applied directly on a creature--use two percentile probability fields (high and low) that determine whether they get applied. Quoting myself from a ticket: Quote There are systematic errors in how probabilities are set in effects throughout the game. Effects are set up to use a percentile (d100) roll so, e.g. an item with a 5% chance to do something will be set with a low probability of 0 and a high probability of 5 with both ends being inclusive. However, these are set assuming the percentile rolls are 1-100, when they're actually 0-99. So the aforementioned 0-5 effect probabilities actually occurs 6% of the time (rolls of 0, 1, 2, 3, 4, 5) instead of the assumed 5% (rolls of 1, 2, 3, 4, 5). This is a systematic and pervasive error that bridges spell and item effects--effects which should happen 10% of the time occur 11% of the time, effects which should occur 40% of the time actually occur 41% of the time, and so on and so forth. I had some fixes in hand for IWD and BG2 (via the respective Fixpacks) and have spent the better part of the past few days working on lists for PsTEE and BGEE/SoD. I found and fixed few other minor issues as I went along; unusual probability cases are also noted below. General notes I found at least a few effects on all games where an effect was "deactivated" by setting its probabilities to 0-0 or 100-100. Unfortunately the former still has a 1% chance to occur, and the latter is redundant. In both cases I delete the effect. BGEE/SoD (full fixes) Belhifet poisons on all hits, but was only showing the poison icon on half of them. Blind Albino Wyrmlings cause sleep and a thac0 drain on 15% of hits, but show a feeblemind portrait icon on all hits. If anyone has a better suggestion for an icon here, I'm all ears, as feeblemind doesn't seem like a good fit. Barrityl's Burden's ability randomly does fire/cold/electrical damage, but they overlapped awkwardly and the fire damage was 1d1 while cold end electrical were 1d2. They been separated to equal non-overlapping chances and normalized to 1d2 damage. BG2EE (full fixes) A handful of drow uses a 'whip' weapon with overlapping probabilities, which are separated. Fallen Solars have vorpal hits on 15% of hits, and dispel magic on the other 85%. It seems like they should still dispel magic on a failed vorpal so I made this 15% vorpal, 100% dispel. This was also adjusted on BGEE even though the item isn't used there. The spell weightings from the Cloak of Atonement were off by quite a bit more than 1% Power Word: Sleep lacked the normal (half-)elven sleep resistances IWDEE (full fixes) Dazer (and its spectral hero copy) had mismatched probabilities Static Two-Handed Sword has listed bonuses of bonus electrical damage on 50% of hits and stun on 25% hits, but was only doing these at 40% and 20% respectively PsTEE (full fixes) A huge number of items (mainly notes) have an odd, 0-0 op319 effect attached to a header and aimed at nothing. These are fairly consistent, which makes me worry they have some hardcoded function I don't know about--for now they're removed. Unlike BG/BG2/IWD there aren't a lot of items/spells with x% chances to do stuff, and when there is, it's never listed as an explicit percentage. Nonetheless I've adjusted a number of effects where it's clear they're going for an explicit percentage, e.g. something that's currently a 51/49 split gets adjusted to 50/50. Quote Link to comment
DavidW Posted April 9, 2022 Share Posted April 9, 2022 1 hour ago, CamDawg said: something that's currently a 51/49 split gets adjusted to 50/50. If that gets into an official fix, QA is going to love you. I think it would take about 40,000 repeats to reliably test. Quote Link to comment
CamDawg Posted April 9, 2022 Author Share Posted April 9, 2022 Yes, this is a 'verify this in an editor' fix for QA, especially given the number of files. Quote Link to comment
Almateria Posted April 9, 2022 Share Posted April 9, 2022 1 hour ago, DavidW said: If that gets into an official fix, QA is going to love you. I think it would take about 40,000 repeats to reliably test. Please, we’d just bounce it around assigning it to testers until a dev closes the ticket without testing Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.