Author Topic: Changing probability distribution of rolls?  (Read 1941 times)


  • Guest
Changing probability distribution of rolls?
« on: July 16, 2008, 05:32:32 PM »

I'm fairly new to the IE modding community, though I have played BG and IWD many times and am enjoying my second time through IWD2 (in HoF).

I am not interested in creating new NPCs, banter, items, etc. Rather, I would only like to change the way rolls are made. Right now all the rolls are pseudo random variables drawn from a normal distribution. I think it would be thrilling to be able to modify that; for example, use a clipped Gaussian distribution and instead of adding scalars to rolls as the characters level up, increase the mean (and possibly decrease the variance) of the Gaussian distribution for the roll.

I've read through many of the tutorials on the IE, but I can't find anything related to this. Most of the material seems to be fore editing characters, sounds, etc.

The main reason I love IWD/IWD2 is the statistical fun/strategy involved. It would be amazing to be able to alter that.



  • Guest
Re: Changing probability distribution of rolls?
« Reply #1 on: July 16, 2008, 05:36:21 PM »
Oops. I mistyped up there. I meant that currently the rolls are pseudo random variables draw from a uniform distribution, and I'd like to change to something such as a clipped normal.


Offline jcompton

  • Niche Exploiter
  • Administrator
  • Planewalker
  • *****
  • Posts: 7244
Re: Changing probability distribution of rolls?
« Reply #2 on: July 16, 2008, 11:28:49 PM »
I don't anticipate this being very likely, and I don't see how it could be accomplished without hacking at the executable. Dollars to donuts they're using bog standard C routines for random number generation--and no matter what it is, it's certainly not anything which is exposed at the scripting or resource creation level.
Cespenar says, "Kelsey and friends be at the Pocket Plane? Ohhh yesssss!"


  • Guest
Re: Changing probability distribution of rolls?
« Reply #3 on: July 17, 2008, 06:13:48 AM »
Thank you jcompton.

My question clearly betrayed my relative naivete of software engineering. I guess in my zeal for statistics and stochastic processes I forgot that we don't have access to source code.

I like IWD and IWD2 for their simplicity--that is, no silly graphics etc. to get in the way of what is essentially a series of encounters determined by drawing pseudo-random numbers. All the sprites, sounds, etc. are there just to make it more palatable.

Perhaps I'd be better suited to look for an even simpler game (Rogue-like?) to have fun with varying the probability distributions.

Is anyone as interested in this as I am? Does anyone else love the transparent way each each action is performed (i.e., with dice "rolls")?


Offline the bigg

  • The Avatar of Fighter / Thieves
  • Planewalker
  • *****
  • Posts: 3804
  • Gender: Male
Re: Changing probability distribution of rolls?
« Reply #4 on: July 17, 2008, 06:47:48 AM »
Changing the probability distribution (not to mention altering bonuses as you suggested) is hard but possible in an open-source game (like, say, Nethack or another roguelike), as opposed to almost-impossible as it'd be in a closed source game. If you'd like to do so in one of the IWDs or whatever, GemRB is an open-source clone of the IE engine - unfortunately, it isn't feature-complete yet, and thus you can't play 'normally' the game.

EDIT: also, keep in mind that homebrew random number implementations is very likely to not work (and that's for statistic analisis, not even counting crypto analisis).
« Last Edit: July 17, 2008, 06:49:38 AM by the bigg »
Author or Co-Author: WeiDU ( - Widescreen ( - Generalized Biffing ( - Refinements ( - TB#Tweaks ( - IWD2Tweaks ( - TB#Characters ( - Traify Tool ( - Some mods that I won't mention in public
Maintainer: Semi-Multi Clerics ( - Nalia Mod ( - Nvidia Fix (
Code dumps: Detect custom secondary types ( - Stutter Investigator (

If possible, send diffs, translations and other contributions using Git (


With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: