Jump to content


Photo

Probabilities for identical effects


  • Please log in to reply
3 replies to this topic

#1 temnix

temnix
  • Member
  • 983 posts

Posted 20 December 2017 - 01:50 PM

I'd like to know how probabilities are calculated for several effects of the same kind in a row, if I may. Especially Cast spell, because that's the most common and confusing case. I know that probabilities can be rolled for at once. For example, if I want a fireball spell to be cast on someone 30% of the time, cure light wounds another 30% and 40% bless, I would arrange the effects like this:

 

Cast spell - 100-70 fireball

Cast spell - 69-40 cure

Cast spell - 39-0 bless

 

Let's not quibble about percentile points, basically that's the order. The engine then makes one roll and, depending on where the die ends, the target gets that spell. But what if I have other Cast spells in the list? What if I want, in addition to these breaks, the target to always be hit by an extra fireball? Then I would write (I suppose):

 

Cast spell - 100-0 fireball

Cast spell - 100-70 fireball

Cast spell - 69-40 cure

Cast spell - 39-0 bless

 

Are those going to be two separate rolls - first always for one fireball, and then the choice between three spells? And would it matter in what order I put the three related effects? How about this:

 

Cast spell - 100-70 fireball

Cast spell - 69-40 cure

Cast spell - 100-0 fireball

Cast spell - 39-0 bless

 

Would this make a difference? And then, what if I want other effects entirely, for example:

 

Cast spell - 100-50 Use EFF

Cast spell - 100-50 Use EFF

Cast spell - 100-40 Use EFF

Cast spell - 100-70 fireball

Cast spell - 69-40 cure

Cast spell - 100-0 fireball

Cast spell - 39-0 bless

 

Would the engine roll once, twice or thrice in the case of Use EFF? Assuming that once, then a roll of 75 would trigger all three Use EFFs. If twice (supposing this because the first two are identical), then there would be one roll for the first two and another for the third. If three times (treated separately), then it's another possibility.

 

Which is it? And does it matter if the EFF is the same or not?



#2 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5148 posts

Posted 20 December 2017 - 03:20 PM

It's a single roll. So no separate rolls, and it's from 0 to 99, as the 100 can not actually be rolled. BG2Fixpack has the documentation on that...

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#3 Miloch

Miloch

    Barbarian

  • Modder
  • 6573 posts

Posted 21 December 2017 - 09:58 AM

If you use an EFF with separate probabilities, I believe that's a separate roll.


Infinity Engine Contributions
Aurora * BG1 NPC * BG1 Fixpack * Haiass * Infinity Animations * Level 1 NPCs * P5Tweaks
PnP Free Action * Thrown Hammers * Unique Containers * BG:EE * BGII:EE * IWD:EE
================================================================
Player & Modder Resources
BAM Batcher * Creature Lister * Creature Checker * Creature Fixer * Tutu/BGT Area Map & List * Tutu Mod List
================================================================
"Infinity turns out to be the opposite of what people say it is. It is not 'that which has nothing beyond itself' that is infinite, but 'that which always has something beyond itself'." -Aristotle


#4 temnix

temnix
  • Member
  • 983 posts

Posted 22 December 2017 - 09:37 AM

Well, here is what I can vouch for as making two rolls. I used to make some Self-targeted CRE effects for recoloring standard creatures, like giving Flaming Fist Mercenaries a selection of reds for their major color instead of always the same shade. And for that I first had to override (suppress) their major color in the CRE file, so I could include that shade among others later in the random selection. I did it like this:

 

Set Creature Color - 100-0, to some one color among mine

Set Creature Color - 100-95, red 1

Set Creature Color - 94-85, red 2

...

 

In this case I know that the engine did what I wanted it to and first rolled to cover up the original major color, 100% of the time; I know it because the original would never show again. Then a selection from the available colors was made, and even if I didn't take that list down to 0, covering the whole range, I would still never get the original color, only the replacement from the first line.


Edited by temnix, 22 December 2017 - 09:38 AM.