How does ToEE roll a d20?

Discussion in 'The Temple of Elemental Evil' started by Lord Plothos, Mar 28, 2008.

Remove all ads!
  1. Lord Plothos

    Lord Plothos Established Member

    Joined:
    Apr 3, 2004
    Messages:
    550
    Likes Received:
    0
    Anybody know how their random number generator works?

    I ask because the numbers have always seemed skewed to me, so I've started compiling a list of d20 rolls sorted into two categories: Enemy is rolling and wants high vs. Player is rolling and wants high. The sample size thus far is too small to be interesting, but man is it ever skewed.

    Anyway, maybe I'm just documenting my bad luck, but I was curious if anybody knows anything about the num gen for this game.
     
  2. erkper

    erkper Bugbear Monk Supporter

    Joined:
    Jun 3, 2006
    Messages:
    1,201
    Likes Received:
    7
    It's called the Mersenne Twister, it sucks, and IIRC it was found to be too skewed to high and low results after inclusion in TOEE but never replaced by a better RNG.
     
  3. Lord Plothos

    Lord Plothos Established Member

    Joined:
    Apr 3, 2004
    Messages:
    550
    Likes Received:
    0
    Ah, the sweet sweet taste of validation! One never knows if one's psychology is playing tricks on one (hence the empirical data gathering), but I've always been convinced something was up. No wonder high ACs don't help as much as they should - this would explain a lot. I mean, if all the rolls were 18-20 or 1-3, most vacillations in AC and AB would count for nothing. Interesting. :scratchhe

    So, follow up. Any chance on some one of your wonderful co8 gents addressing this issue? :mrhappy: The numbers have always really bothered me. More than any of the patching/crashing issues.
     
  4. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,029
    Likes Received:
    42
    To quote Burne, "I can tell you that that thing is pure Evil...!" ;)

    Skewed results could account for a tendency toward high and low rolls, I would think, but not for the seemingly 'guaranteed' rolls we see so often, like the Moathouse bandit leader always rolling a critical on his first turn after raging, and the giant frog always winning initiative at Imeryd's run. (I've never played that encounter a single time where the damn frog didn't win initiative. Not once.) I've long suspected that there's something more sinister going on in those cases. :transform
     
  5. Lord Plothos

    Lord Plothos Established Member

    Joined:
    Apr 3, 2004
    Messages:
    550
    Likes Received:
    0
    Agreed. Never won init there either. I assumed it was a surprise issue like when the skeletons pop up, though he does always seem to be up at the front. Maybe he has improved improved initiative. :shrugno:

    But more generally yeah. I haven't tracked it down to specific enemies, but I have noticed an uncanny ability on my part to predict natural 20s - and it does seem more likely when the enemy NEEDS a 20. That was going to be my next empirical test. :thumbsup:

    I did record a lovely string of 18 PC attack rolls below 10 in one battle (against the moathouse gnolls). That's something like .00000000016% likely, if my math is working. That was combined with, if memory serves, 7 out of 20 of their rolls being natural 20s and all but 1 over 10. And I know it was bad leading up to that, compelling me to record every roll in the fight from that point to see if I wasn't crazy. The data stream ended there, though, when after the 7th 20 my computer mysteriously encountered a finger on its off button. :joy:
     
    Last edited: Mar 28, 2008
  6. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,651
    Likes Received:
    350
    I think concealed critters get a massive initiative bonus, if not just guaranteed first strike. Look at the spider in the Moathouse Tower: that thing always goes first when i go in there.
     
  7. Half Knight

    Half Knight Gibbering Mouther

    Joined:
    May 16, 2007
    Messages:
    2,148
    Likes Received:
    1
    In emridy meadows, skeletons always won initiative, even when you know where they are.

    If you enter combat hitting C, and hover the cursor on the area where you know there's a skeleton or zombie, the cursor change to attack, and you can have a first strike; nonethless, the critter still pop out and won the initiative after that first strike :yawn:

    Goblins with 28 initiative rolls ( a standard goblin should have something like a +2 or +4 bonus at maximum), Bugbears that always surprise your party even you've tracked succesfully (which at that point, you shouldn't be surprised), etc etc...

    It is supposed that the listen skill should help against that, but even when i've maxed out, it never showed any sinificant change. :shrug:
     
  8. nyarlathotep

    nyarlathotep Merry Murder Maniac

    Joined:
    Feb 4, 2008
    Messages:
    355
    Likes Received:
    0
    I wouldn't be surprised if some of the encounters are coded so that the heavy guy always has the first strike (like the king frog).

    Those skeletons on emredy on the other hand...Turn Undead, & they fall like flies.
     
  9. ErikModi

    ErikModi Member

    Joined:
    Oct 23, 2006
    Messages:
    45
    Likes Received:
    0
    I've noticed that seemingly every Open Lock attempt I make always scores a natural 20. I'd first assumed the game was assuming one would take 20, but now I'm not so sure.
     
  10. maggit

    maggit Zombie RipTorn Wonka

    Joined:
    Oct 20, 2005
    Messages:
    1,945
    Likes Received:
    0
    Take 20 is the rule for locks and traps in Toee. Honestly
    I don't like it, because it makes you max out your open
    lock skills. If the engine would 'roll' normally the DCs
    could be lower leaving a chance to open the lock/disable
    the trap before levelling up.
     
  11. erkper

    erkper Bugbear Monk Supporter

    Joined:
    Jun 3, 2006
    Messages:
    1,201
    Likes Received:
    7
    The game does roll normally - if you try to open lock or disarm trap while in combat. If you're not in combat the game assumes you will 'take 20' - and why wouldn't you, in a game with no chance of random monsters suprising you?
     
  12. rbc

    rbc Shoggoth

    Joined:
    Aug 3, 2007
    Messages:
    26
    Likes Received:
    0
    Do you have a reference for this? I've been Googling the topic a bunch, but I haven't found any mention of a problem. If there is a documented flaw, I'd be interested in porting in a better PRNG so we could at least use that in scripts. In my own basic testing so far, game.random_range() is showing good chi-square properties for low-dimensional correlations, so I haven't encountered a statistically surprising response. Is there some reason game.random_range() would use a different PRNG than the combat engine?
     
    Last edited: Apr 12, 2008
  13. rbc

    rbc Shoggoth

    Joined:
    Aug 3, 2007
    Messages:
    26
    Likes Received:
    0
    Now that's a different matter from the PRNG. ;) That said, I have won initiative at Imeryds Run and against skeletons at Emridy. Not often against the frogs, but quite frequently against the skeletons.

    Unfortunately, if you turn a skeleton before it stands up, you don't get to loot its weapons. My clerics routinely stand around waiting for all the skeletons to act first, before using one turning to take down the lot of them.
     
  14. nyarlathotep

    nyarlathotep Merry Murder Maniac

    Joined:
    Feb 4, 2008
    Messages:
    355
    Likes Received:
    0
    well, yes, if you want to loot them... Are you in such dire need of crossbowbolts?
     
  15. Bereforss

    Bereforss Member

    Joined:
    Jan 27, 2024
    Messages:
    1
    Likes Received:
    0
    Late to the party but I am still playing this fantastic game after all these years. I also notice, at the early levels at least, that about 80% of player to-hit rolls will be 8 and below, so much so I refer to the "Circle of Eight" as "The Circle of Eight and Below". It is almost a joke these continuous low rolls, and when the character misses I quip, "Eight and below! Let's see the result", and sure enough, 80% of the time the roll is 8 or below. Of this 80%, about 40% - 60% of the rolls are 4 and below, and for each critical hit made, you will make about 10 critical misses. This isn't a C08 issue but the random dice roller program, I think.

    Granted, the monsters also don't hit often either but when it comes to saving throws, it seems about 80% of the time they will roll a 14 and above, and of that 80%, about 60% of the time the roll will be 17 and above.

    In one combat, in 8 rounds I saw five of the characters roll a 2. I notice the random die roll generator seems to get stuck and will take the previous result and won't refresh, hence I see a character make two critical hits in a row or two critical misses in a row. One character --and it always seems to be the main fighter, rolled a 4 three combat rounds in a row. Possible, but not likely and seems to show the number generator is not refreshing. Whether it is the TOEE program or my OS or hardware (using old laptop) I don't know.

    Still, the game is fun, I enjoy it, and I think C08 improved TOEE to what it ought to have been. A job well done I would say.
     
Our Host!