Ring of speed range of values

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • PowerDiver
    replied
    [edit] deleted my post, I read the wrong entry

    Leave a comment:


  • Derakon
    replied
    Okay, from my reading of the actual code for m_bonus, it appears to be trying to generate a normal distribution with average value (max bonus * item level / 128) and standard deviation of (max value / 4). There's a lot of weird stuff in there to approximate floating point with integer math, but I believe that's broadly accurate. And of course, values are clamped to be between 0 and the max value.

    Incidentally, I found this code by starting from the documentation in object.txt, which says:
    Code:
    # Some fields accept randomized numbers of the form "10+2d3M4" where
    # 10 is the non-variable base, 2d3 is a standard die roll, and
    # M4 uses the m_bonus function to generate a number between 0 and
    # 4 according to a normal distribution.
    From there, it's fairly straightforward to find the definition of m_bonus in the source code.

    Leave a comment:


  • Omnipact
    replied
    Originally posted by Nate
    After some hunting, mostly in the object folder, I can't find the pval calculation stuff in the source. I'm assuming this is where the chart Derakon mentions is located. Any leads?
    Have a look at z-rand.c

    Leave a comment:


  • Nate
    replied
    After some hunting, mostly in the object folder, I can't find the pval calculation stuff in the source. I'm assuming this is where the chart Derakon mentions is located. Any leads?

    Leave a comment:


  • PowerDiver
    replied
    Originally posted by Derakon
    The table I quoted would be compressed to have 6 columns instead of 11. So yes, there's a "different chart" for each possible max value. Except that there's no actual chart; the table is simply an example of what running the algorithm with a specific max tens of thousands of times generated. I quoted the table because it was easier than trying to explain the actual distribution used.
    If you already have the work done to calculate this stuff, would you be willing to produce a table of the probabilities of an amulet of the magi dropped for each depth to have a pval of +4?

    Leave a comment:


  • AnonymousHero
    replied
    EDIT: ... and now I notice that there are two pages in this topic. Oh well.

    My Vanilla Priest also found a +23.

    Leave a comment:


  • Nate
    replied
    No, I can't. I see now that the algorithm isn't just a normal distribution between 0-10 and I wouldn't know the std dev if it was. Anyway, I'll look for the algorithm in the code if I really want to do my own chart. Thanks again.

    Leave a comment:


  • Nate
    replied
    I should be able to generate a chart for the normal distribution from 0-5 from here. Thanks so much Omnipact and Derakon.

    Leave a comment:


  • Derakon
    replied
    Originally posted by Nate
    Cool. So does the sample distribution apply to ROS where a value generated of 5 or higher becomes 5 since the max is 5 or is there a different chart from 0 to 5 for ROS? Thank you for providing this detailed info.
    The table I quoted would be compressed to have 6 columns instead of 11. So yes, there's a "different chart" for each possible max value. Except that there's no actual chart; the table is simply an example of what running the algorithm with a specific max tens of thousands of times generated. I quoted the table because it was easier than trying to explain the actual distribution used.

    Leave a comment:


  • Omnipact
    replied
    The whole table would be used.

    To get the full 5 bonus at dlv 0 would happen .03% of the time.

    Don't forget the additional 'super-charging' code in obj-make.c:

    Code:
    /* Super-charge the ring */ 
    while (randint0(100) < 50) o_ptr->pval++;
    A ring of speed has no upper limit.

    Leave a comment:


  • Nate
    replied
    Cool. So does the sample distribution apply to ROS where a value generated of 5 or higher becomes 5 since the max is 5 or is there a different chart from 0 to 5 for ROS? Thank you for providing this detailed info.

    Leave a comment:


  • Derakon
    replied
    As the object.txt file notes, "M5" means to call m_bonus with a "max" argument of 5 and a "level" argument of the object's dungeon level. Here's a copy from the comments for that function:
    Code:
     * A sample distribution of values from "m_bonus(10, N)" is shown below:
     *
     *   N       0     1     2     3     4     5     6     7     8     9    10
     * ---    ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----
     *   0   66.37 13.01  9.73  5.47  2.89  1.31  0.72  0.26  0.12  0.09  0.03
     *   8   46.85 24.66 12.13  8.13  4.20  2.30  1.05  0.36  0.19  0.08  0.05
     *  16   30.12 27.62 18.52 10.52  6.34  3.52  1.95  0.90  0.31  0.15  0.05
     *  24   22.44 15.62 30.14 12.92  8.55  5.30  2.39  1.63  0.62  0.28  0.11
     *  32   16.23 11.43 23.01 22.31 11.19  7.18  4.46  2.13  1.20  0.45  0.41
     *  40   10.76  8.91 12.80 29.51 16.00  9.69  5.90  3.43  1.47  0.88  0.65
     *  48    7.28  6.81 10.51 18.27 27.57 11.76  7.85  4.99  2.80  1.22  0.94
     *  56    4.41  4.73  8.52 11.96 24.94 19.78 11.06  7.18  3.68  1.96  1.78
     *  64    2.81  3.07  5.65  9.17 13.01 31.57 13.70  9.30  6.04  3.04  2.64
     *  72    1.87  1.99  3.68  7.15 10.56 20.24 25.78 12.17  7.52  4.42  4.62
     *  80    1.02  1.23  2.78  4.75  8.37 12.04 27.61 18.07 10.28  6.52  7.33
     *  88    0.70  0.57  1.56  3.12  6.34 10.06 15.76 30.46 12.58  8.47 10.38
     *  96    0.27  0.60  1.25  2.28  4.30  7.60 10.77 22.52 22.51 11.37 16.53
     * 104    0.22  0.42  0.77  1.36  2.62  5.33  8.93 13.05 29.54 15.23 22.53
     * 112    0.15  0.20  0.56  0.87  2.00  3.83  6.86 10.06 17.89 27.31 30.27
     * 120    0.03  0.11  0.31  0.46  1.31  2.48  4.60  7.78 11.67 25.53 45.72
     * 128    0.02  0.01  0.13  0.33  0.83  1.41  3.24  6.17  9.57 14.22 64.07
    The "N" column here is the dungeon level; hence, at dungeon level 0, the item has only a .03% chance of getting its full bonus, while at dungeon level 128 it has a 64.07% chance of the full bonus.

    Leave a comment:


  • Nate
    replied
    Thanks for the lead PowerDiver. This is an old thread. I'm actually asking a couple new questions at the bottom of the thread re: how the M5 works in the d5M5 part of the ROS calculation. It seemed related to the thread but I probably should have started a new one. Sorry!

    Leave a comment:


  • PowerDiver
    replied
    Quite recently, bron mentioned =speed+23. Read the notes from http://angband.oook.cz/ladder-show.php?id=10647

    Leave a comment:


  • Nate
    replied
    How does the dlvl-dependent bonus work? Does it reach a fixed value of 5 at some point? Or is 5 just more likely to come up at dlvl 100 vs dlvl 75? Is dlvl 127 better than dlvl 100 for this bonus? Thank you!

    Leave a comment:

Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎