Results 1 to 16 of 16
  1. #1
    Community Member The_Phenx's Avatar
    Join Date
    Mar 2006
    Posts
    1,079

    Default Big Time Random Number Generator Coding Bug?

    While joking around with the guild last night about how you can roll 5 1's in a row, I started doing the /roll 100d100 thing to see if the standard deviation was present, and it was till I made a type-0.

    Which shouldn't have effected anything at all, but it does.

    So Devs, whats the deal with this?

    To test.

    Do a /roll 100d100 and you should land somewhere +/- a couple hundred points of 5000

    Do a /roll 100d0100 and you will land a number in the 3000 range...

    The 0 should have no effect but it does. And it effects all rolls of any ammount and variation.

    So I have found a flaw in the coding, not shure what that means, but its there, and figured I should bring it to your attention. Perhaps that is the stray bit that causes big spikes in low number rolling. Because the chances of rolling 6 ones in a row on a regular basis is astronomical.
    Ghinsuu, Spikey, Preying, , Pyroclastic
    Khyber, Jesters Court


    ***Your Vip Account Has Been Cancelled***

  2. #2
    Founder Garth_of_Sarlona's Avatar
    Join Date
    Feb 2006
    Posts
    0

    Default

    0100 is octal for 64, so you by rolling 100d0100 you are rolling 100 d64s which comes out averaging to 100*32.5 which is 3250, which matches your results.

    I never realised DDO had octal dice until now... I call it a feature not a bug.

    Garth

    Garth 20/ftr (Kensei) Haeson 20/clr Cairis 12/ftr 6/rgr 2/rog Xortan 20/wiz
    Tinosa 20/brd Garthbot 20/fvs Gaarth 18/ftr 1/rgr 1/rog (Stal Def)
    Tibetan 20/mnk Automatic DDO raid timers Haezon 20/sor (Conj)

  3. #3
    Community Member Raithe's Avatar
    Join Date
    Mar 2006
    Posts
    1,131

    Default

    In some programming languages like C, putting a leading 0 in front of a number tells the parser that the number is octal, not decimal. The results you get from the /roll output will probably always be in decimal, however.

    Your /roll 100d0100 is actually equivalent to /roll 100d64.

    EDIT: Beat to the punch.

  4. #4
    Community Member Depravity's Avatar
    Join Date
    Nov 2007
    Posts
    336

    Default

    This messes up the ctrl-click purchasing from vendors too. What you're seeing is a the underlying libraries assuming you know some of the standard methods to enter numbers in alternate bases. Iirc, throwing a 0 in front switches to octal notation, so you're rolling 100d64. 100 octal = 8^2, instead of 10^2 like decimal notation.

    Edit: *sigh* too slow. Also - checked and 0x works. 100d0x100 spits out values around 12,500. This definitely takes on "feature" status now.
    Last edited by Depravity; 09-08-2008 at 01:41 PM.
    Near useless builds for those who want a challenge: The True(ly Useless) Necromancer - The Abuse Sponge Paladin
    Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam.

  5. #5
    Community Member The_Phenx's Avatar
    Join Date
    Mar 2006
    Posts
    1,079

    Default

    See I knew I forgot all my C++ for a reason and went into design.

    That explains a few things, but is this something that needs addressing?

    I will leave that to the experts.
    Ghinsuu, Spikey, Preying, , Pyroclastic
    Khyber, Jesters Court


    ***Your Vip Account Has Been Cancelled***

  6. #6
    Community Member Laith's Avatar
    Join Date
    Mar 2006
    Posts
    1,194

    Default

    Quote Originally Posted by The Phenx View Post
    I will leave that to the experts.
    the experts start telling noobs that the roll command is /roll 1d0100.

    I'd insert a , but i can see it actually happening.
    Last edited by Laith; 09-08-2008 at 01:46 PM.

  7. #7
    Community Member The_Phenx's Avatar
    Join Date
    Mar 2006
    Posts
    1,079

    Default

    It is an obvious problem, do we need a different base system available to the number generator?
    Ghinsuu, Spikey, Preying, , Pyroclastic
    Khyber, Jesters Court


    ***Your Vip Account Has Been Cancelled***

  8. #8
    Founder Garth_of_Sarlona's Avatar
    Join Date
    Feb 2006
    Posts
    0

    Default

    all I know is, next time the chattering ring comes up, I'm rolling a 1d0x20

    Garth

    Garth 20/ftr (Kensei) Haeson 20/clr Cairis 12/ftr 6/rgr 2/rog Xortan 20/wiz
    Tinosa 20/brd Garthbot 20/fvs Gaarth 18/ftr 1/rgr 1/rog (Stal Def)
    Tibetan 20/mnk Automatic DDO raid timers Haezon 20/sor (Conj)

  9. #9
    Community Member The_Phenx's Avatar
    Join Date
    Mar 2006
    Posts
    1,079

    Default

    ROFL makes me wonder how many times I've lost rolls to this and not paid enough attention.
    Ghinsuu, Spikey, Preying, , Pyroclastic
    Khyber, Jesters Court


    ***Your Vip Account Has Been Cancelled***

  10. #10
    Founder Blagrak's Avatar
    Join Date
    Feb 2006
    Posts
    1

    Default

    Quote Originally Posted by willphase View Post
    all I know is, next time the chattering ring comes up, I'm rolling a 1d0x20

    Garth
    Why would you want to roll a d16 vs a d20? Are you trying to roll low?

  11. #11
    Community Member Uproar's Avatar
    Join Date
    Feb 2008
    Posts
    0

    Default

    Quote Originally Posted by Blagrak View Post
    Why would you want to roll a d16 vs a d20? Are you trying to roll low?
    Um note the X. 020 would be 16. 0x20 would be 32. Correct?
    Thelanis*: Mohroh, WF F10 /Bb3 /Ro2|7 Oohnoh, WF Ro8|12 /Bb3|4 Lohkoh, H F2|12 /R5|6 /Ro2
    Argo*: Dohjoh, Drow M7|11 /Ro2|3 /R6 Rohboh, WF Ro6|14 /B2|6 Lohkoh, WF R6|12 /W2|7 /Ro1
    External: Rock, Guild of the Zodiac (GOTZ)_________________* only characters freq. played

  12. #12
    Community Member Turial's Avatar
    Join Date
    Apr 2006
    Posts
    394

    Default

    The question is why are there octal dice in a game that doesn't have a use for them?
    970 sp and counting
    Help Fix Ranged Combat for Everyone. Come help complete the DDO Wiki

  13. #13
    Community Member Depravity's Avatar
    Join Date
    Nov 2007
    Posts
    336

    Default

    Quote Originally Posted by Turial View Post
    The question is why are there octal dice in a game that doesn't have a use for them?
    Because it runs so deep in the programming language/libraries it would be extra work to remove something that doesn't cause any actual errors. For all we know, the loot tables are expressed in powers of 2 (easy to handle with computers) vs powers of 10 (easy for dice), and that roll command is player access to the actual random number generator used in the rest of the game.

    And as far as cheating goes - if you roll a d0x20, you're rolling a d32. That's 12 out of 32 rolls that will be above 20, or a 37.5% chance of getting caught cheating. Poor odds, that. Worse at 0x100 - that's 156 out of 256 chances at getting caught.
    Near useless builds for those who want a challenge: The True(ly Useless) Necromancer - The Abuse Sponge Paladin
    Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam.

  14. #14
    Founder Blagrak's Avatar
    Join Date
    Feb 2006
    Posts
    1

    Default

    Quote Originally Posted by Uproar View Post
    Um note the X. 020 would be 16. 0x20 would be 32. Correct?
    Yeah missed that

  15. #15
    Stormreach Advisor
    Founder

    Join Date
    Jan 2006
    Posts
    11,237

    Default

    Sweet I guess I should start tipping the clerics with 02000 pp instead of 2000

  16. #16
    Community Member Tenkari_Rozahas's Avatar
    Join Date
    Apr 2006
    Posts
    1,732

    Default

    Quote Originally Posted by tihocan View Post
    Sweet I guess I should start tipping the clerics with 02000 pp instead of 2000
    sorry, I think it only works for the random dice generator, and I think you mean 0x2000pp >>
    Quote Originally Posted by jwbarry View Post
    Your doomsaying of doom does not meet the doom regulations for doom font, doom color, or doom spelling, specifically the number of "o"s. Please take a moment and correct these glaring doom issues.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload