Overly poor rolling script?

Discussion in 'General Modification' started by ShadowDeth, Jun 22, 2006.

Remove all ads!
  1. ShadowDeth

    ShadowDeth Save Versus : Stupid

    Joined:
    Apr 17, 2006
    Messages:
    144
    Likes Received:
    0
    I've noticed this time around, all my characters have rolled beyond abysmal. I'm having to resort to sheer force of will to beat monsters.

    Could this have anything to do with the fact I have 8 characters in my party, one - a consoled cat familiar/sorcerer? I can't think of any reason why I've scored a grand total of 3 critical hits through about 20 hours of play, somewhere in the region of 50 critical misses, and I miss about 70% of all my attacks. Note, I do have competent characters but all my rolls come out 1's, 2's, 3's, 4's, 5's etc. I even saw it scale up like that once, in sequence.

    Can anyone shed some light on this?
     
  2. Allyx

    Allyx Master Crafter Global Moderator Supporter

    Joined:
    Dec 2, 2004
    Messages:
    5,001
    Likes Received:
    250
    Yeah, the Mersenne Twister random number generator isn't perfect, but it's better than the original one that was shipped with the game (apparently) for more Mersenne Twister related woes look here.
     
  3. ShadowDeth

    ShadowDeth Save Versus : Stupid

    Joined:
    Apr 17, 2006
    Messages:
    144
    Likes Received:
    0
    Ahhhh, I see that i'm not the only one who experienced stuff like this. Is it safe to assume (without any knowledge of the code) that it's just a long algorithm? One that is probably keyed to certain values with each new game? Because every game before this i've either rolled [average], [good] or [fair].

    Thanks for the response though. Since I have posted this, and only a day before, i've noticed the game eased up on me a little. I hit a critical earlier today! How shocking!
     
  4. rufnredde

    rufnredde Established Member Veteran

    Joined:
    Apr 8, 2006
    Messages:
    266
    Likes Received:
    1
    I seriously doubt that it is keyed to anything it is just a random number generating algorithm. That is called by the program to approxiamate dice rolls. That is all, if you have had a bad run of luck with it, it is most likely just that a bad run of luck. Dice can do the same thing.
     
  5. Shiningted

    Shiningted I want my goat back Administrator

    Joined:
    Oct 23, 2004
    Messages:
    12,669
    Likes Received:
    358
    A random number generator has to be linked to something, though - its not like there is a box of dice to be rolled in there, or a hand pulling numbers out of a hat. They have to be created somehow: I tihnk the old BASIC command rnd(x) worked off the system clock.
     
  6. rufnredde

    rufnredde Established Member Veteran

    Joined:
    Apr 8, 2006
    Messages:
    266
    Likes Received:
    1
    Sorry for the semantic confusion there Ted obviously it has to be integrrated into the program in some manner to work at all. I was addressing the other assumption that people seem to be making here and on the thread that Allyx linked to, that it is overridden or slanted in favor of certain characters et. al.

    From a programming standpoint this is extremely improbable, though not impossible.

    To do it you would have to introduce a large amount of code that would then have to try and account for many different variables and situations. (more code), then it would have a very high rate of probable failure, and require many hours of testing, for very little return value. When all you have to do is link the random number generator to the call for a dice roll and use its output to approximate rolling a stinkin die.

    So in summation what I was trying to express was that, it is linked to the game, for dice rolling approximation, but not keyed to any conditions within the game, in all likelyhood.
     
  7. ShadowDeth

    ShadowDeth Save Versus : Stupid

    Joined:
    Apr 17, 2006
    Messages:
    144
    Likes Received:
    0
    Really? Because all the strategy games i've ever played have "keylinked" :mrhappy: your results to your movement thus far in the turn. I figured the generator looked for some variables within the game to determine your string of results for that particular situation.
     
  8. rufnredde

    rufnredde Established Member Veteran

    Joined:
    Apr 8, 2006
    Messages:
    266
    Likes Received:
    1
    It may Shadow, but as a programmer I just can't imagine why you would do that. Why would you need to do more than just generate the numbers, that is what you use them for in PnP, what would prompt a game developer to go though 80 - 100 man hours of extra work just to cheat?

    http://www.d20srd.org/diceBag.htm

    Let me illustrate my thinking a bit, the link above is a utility for a random number generator, I'm not sure which one they are using but that's not important. It does pretty much what I imagine the RNG in ToEE does, generates the numbers and logs them, the game engine itself, would add the modifiers, so say your rolling for damage using a longsword 1d8, it goes to the protos.tab pulls out the desired dice value d8 and how many 1, generates a random number adds the modifiers, to the number and logs it in the rolls window. I just can't imagine anyone writing extra code to do more than that, I can't say for sure they did not as I have no way to check the source. It just isn't logical that they would have IMO.
     
    Last edited: Jun 23, 2006
  9. Cujo

    Cujo Mad Hatter Veteran

    Joined:
    Apr 4, 2005
    Messages:
    3,636
    Likes Received:
    1
  10. Gaear

    Gaear Bastard Maestro Administrator

    Joined:
    Apr 27, 2004
    Messages:
    11,031
    Likes Received:
    42
    Makes perfect sense.

    But I don't believe it for a second. Sorry. :shrug:
     
  11. rufnredde

    rufnredde Established Member Veteran

    Joined:
    Apr 8, 2006
    Messages:
    266
    Likes Received:
    1
    Believe what you will, prove it if you can;) I intend to back up my position with facts, not suppositions, I have taken a look at the dissassembled code and can not find anything thing in there that even looks like it may manipulate the output of the RNG for incidious reasons that defy both logical and economic sense.

    It is true that any algoritm may produce unexpected results, due to poor implementation, but not break the immutable laws of mathematics in the process.

    I must add that I am doing this only in the spirit of having fun and getting to the bottom of the issue, because I find it interesting. Your perception of the presented facts is of course you own and if it makes you feel better to believe the machine is cheating then by all means do so. There is no malice in my fiddling around with this, only curiousity:)
    No apologies are necessary, this is all in fun!!!
     
    Last edited: Jun 24, 2006
  12. Cerulean the Blue

    Cerulean the Blue Blue Meanie Veteran

    Joined:
    Apr 23, 2005
    Messages:
    1,962
    Likes Received:
    0
    The fact is, mathematics being what they are, no random number generator will ever be as random as rolling dice. The list of variables when rolling actually dice is huge, ranging from the elastic properties of the material the dice are made of to the coefficient of friction of the surface they are being rolled on to the velocity and angle of incidence of the roll, to the barometric pressure of the atmosphere at the location and time they are being rolled, etc. With current technology it may be possible to model all of this, but the code for it would be huge for each type of die and it would probably take a supercomputer to run it.

    That being said, any random number generator (and from what I have seen the Mersene Twister is one of the better ones) will eventually show that it is not truly random in a game where it figures in so prominently, such as this one.
     
  13. Oxlar

    Oxlar Member

    Joined:
    Apr 22, 2007
    Messages:
    5
    Likes Received:
    0
    I can tell you flat out that this random dice roller is completely borked. Not only have the dice rolls been completely abysmal(70% of all d20 rolls are 6 or less in melee and d10 rolls for damage are almost always a 1, if not a 3), but I have seem patterns in the rolls. Just last night I was able to call out a series of 4 d20 rolls in a row. (3,1,2,6). That is absurd that the rolling is so bad, I can actually predict what number comes up next. Supposition or not, the fact remains that it behaves a certain way in my game and I'm not the only one seeing it.
     
  14. maggit

    maggit Zombie RipTorn Wonka

    Joined:
    Oct 20, 2005
    Messages:
    1,945
    Likes Received:
    0
    Yes, I think we've all experienced this, though I was sure that if it's supposed to be random
    then it should generate random numbers...or is there something some variable telling that a
    1 will be rolled more often than, let's say, 13?
     
    Last edited: Apr 23, 2007
  15. Cujo

    Cujo Mad Hatter Veteran

    Joined:
    Apr 4, 2005
    Messages:
    3,636
    Likes Received:
    1
    whatever, a random number generator could spit out 6 a million times in a row, it just doesn't apear ramdom to people who don't understand the true nature of chaos :bounce:
     
Our Host!