Eternium
Eternium

Announcement

Collapse
No announcement yet.

[BUG / RFI] Rounding jewelry values

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [BUG / RFI] Rounding jewelry values

    One guy on Discord is having a predicted outcome of 78.8% CD for fusing 3x 59.9%s.

    I can't make sense of that, no matter how or where I round the numbers.

    59.9% * 1.2 = 71.88%

    *Rounding* to 71.9%, then multiplying by 1.1 for single-stat Rare = 79.09. Would *round* to 79.1% or *floor* to 79.0%
    *Flooring* to 71.8%, then multiplying by 1.1 for single-stat Rare = 78.98. Would *round* to 79.0% or *floor* to 78.9%

    etc etc.

    Any insight?
    Last edited by Jose Sarmento; 12-12-2017, 12:44 PM.

  • #2
    Can this person send screenshots of the 3 * 59.9 uncommons ?
    VUFO ZEBE ZAQI 1381 -|- Gethi, mage, & Kisheli, XP mage

    Comment


    • #3
      59.851 rounds to on screen display of 59.9, right?

      3 * 59.851 = 71.8212

      Then this * 1.1 = 79.00332

      I include the extra 0.001 in case we want to debate whether 0.05 rounds up or down.

      But, start back with 59.851, floor (59.8) then multiply 1.20 then floor again (71.7) then multiply 1.10, then floor one last time, I can get to 78.8

      But that seems unfairly cruel.


      VUFO ZEBE ZAQI 1381 -|- Gethi, mage, & Kisheli, XP mage

      Comment


      • #4
        Originally posted by Coda View Post
        Can this person send screenshots of the 3 * 59.9 uncommons ?
        https://streamable.com/9fyz8 <- short video
        ​​​​

        Comment


        • #5
          Also note that I got a 78.8 ring by fusing 3 x 60 CD rings.

          Comment


          • #6
            OK, through what Coda and two other guys on Discord wrote, we could infer an explanation - which we would like official confirmation please.

            All stats are internally generated as a real number that can vary between 144 and 180.

            Then each stat has its own scaling factor, which maps that internal value to the known ranges:

            Power, Vitality etc. the factor is 2 (so they vary between 72 and 90)
            CD the factor is 3 (so it varies between 48 and 60)
            Exp the factor is 4 (so 36-45)
            Armor the factor is 1
            LoH the factor is 0.5 (so it varies between 288 and 360)

            Now, the tricky (and cruel) math is that the displayed stat value ROUNDS the internal_value / scaling_factor result. But, when jewelry is fused, the internal value is (apparently) FLOORED first.

            So, when a Ring shows as 59.9% CD, the internal value can be anything between 179.55 and 179.85. When it shows as a 59.8%, the internal value can be anything between 179.25 and 179.54. And when it shows as a 60.0% CD, the internal value can be anything between 179.86 and 180.

            BUT, *all* those internal values *except* the truly perfect 180 floor down to 179... so when a jewelry fusion is attempted with any 59.8%, 59.9%, or 60.0% that isn't actually 180 internal, the outcome is always:

            179.xx ->> floor to 179 (on all 3 rings, so they become identical from this point forward) --> 179*1.2=214.8 --> 214.8*1.1 (for single-stat Rare ring) = 236.28 --> 236.28 / 3 (CD's scaling factor) = 78.76% --> round to 1 decimal for display purposes = 78.8%

            Same thing for 90-base stats. Only a perfect INTERNAL 180 will produce, in the Uncommon to Rare fusion, the famous output of 152 (with 3x Brilliant jewels).

            Comment


            • #7
              Originally posted by kis3lori View Post
              Also note that I got a 78.8 ring by fusing 3 x 60 CD rings.
              By my theory, this means your 60.0%s were not, internally, perfect 180s.

              Anyone else got a 79.2% Rare CD outcome?

              Comment


              • #8
                Originally posted by Jose Sarmento View Post

                By my theory, this means your 60.0%s were not, internally, perfect 180s.

                Anyone else got a 79.2% Rare CD outcome?
                And that's where the cruelty comes in. If it displays 60.0%, that should internally change the value to a perfect 180. It should be a virtuous cycle internally. Otherwise there's a penalisation on the player when the player had no way of controlling whether that internal value is 179 or 180.

                Comment


                • #9
                  Red (Developer) Adrian (Developer)

                  Please take a look at my previous post. If the display shows a perfect 60.0% / top value, please have the code set the internal value to be the top value. You'll have happier players who don't feel screwed over by internal randomization, non-perfection, and flooring when getting a perfect display value.

                  Comment


                  • #10
                    Been running a few tests in C, the flooring seems to closely match an internal conversion of the initial value from float to integer, and then the rest of the calculation is done with floating numbers - for those unfamiliar with C/Java/etc, you can either read here, or, simpler explanations: Integer are whole numbers, Float can have decimals.


                    Rather than changing the internal random generated value, the "proper" fix, would be to simply do the whole calculation with float, and then only perform the conversion in order to display the stat on the screen - internal calculation of bonuses would still use the computed floating number.

                    We've mostly got used to fact that other stats have the hidden decimal, which results in skewed calculations when we try to work backward to figure things out. From previous updates, changing Jewelry related calculations can cause a bit of a stir - such as that in 1.2.65 where they mentioned a bug relating to it was fixed, which resulted in higher fused values, and therefore was later reverted back to the existing calculations...


                    Edit:
                    Not quite sure how the gemstones values fit into the new calculation, Diamond +200, others +50 - so it seems Diamond gives 2 times the bonus of the others, following the above scaling factor. Will have a look when I can...


                    Test outputs:
                    Code:
                    Calculations: floating - all integer - initial integer
                    - Base values: 178.75 - 178 - 178.00
                    - Initial Fused: 214.50 - 213 - 213.60
                    - Final Fused: 235.95 - 234 - 234.96
                    
                    Equivalent Stats: Initial and Fused (actual | rounded | game)
                    AR, CR, H, P, V: 89 => 117.97 | 117 | 117
                    CD: 59.6 => 78.65 | 78.6 | 78.3
                    Armor: 178 => 235.95 | 235 | 234
                    DR: 357 => 471.90 | 471 | 469
                    EX, Gold: 44.7 => 58.99 | 59.0 | 58.7
                    
                    
                    Calculations: floating - all integer - initial integer
                    - Base values: 179.00 - 179 - 179.00
                    - Initial Fused: 214.80 - 214 - 214.80
                    - Final Fused: 236.28 - 235 - 236.28
                    
                    Equivalent Stats: Initial and Fused (actual | rounded | game)
                    AR, CR, H, P, V: 89 => 118.14 | 118 | 118
                    CD: 59.7 => 78.76 | 78.8 | 78.8
                    Armor: 179 => 236.28 | 236 | 236
                    DR: 358 => 472.56 | 472 | 472
                    EX, Gold: 44.8 => 59.07 | 59.1 | 59.1
                    
                    
                    Calculations: floating - all integer - initial integer
                    - Base values: 179.25 - 179 - 179.00
                    - Initial Fused: 215.10 - 214 - 214.80
                    - Final Fused: 236.61 - 235 - 236.28
                    
                    Equivalent Stats: Initial and Fused (actual | rounded | game)
                    AR, CR, H, P, V: 89 => 118.31 | 118 | 118
                    CD: 59.8 => 78.87 | 78.9 | 78.8
                    Armor: 179 => 236.61 | 236 | 236
                    DR: 358 => 473.22 | 473 | 472
                    EX, Gold: 44.8 => 59.15 | 59.2 | 59.1
                    
                    
                    Calculations: floating - all integer - initial integer
                    - Base values: 179.75 - 179 - 179.00
                    - Initial Fused: 215.70 - 214 - 214.80
                    - Final Fused: 237.27 - 235 - 236.28
                    
                    Equivalent Stats: Initial and Fused (actual | rounded | game)
                    AR, CR, H, P, V: 89 => 118.64 | 118 | 118
                    CD: 59.9 => 79.09 | 79.1 | 78.8
                    Armor: 179 => 237.27 | 237 | 236
                    DR: 359 => 474.54 | 474 | 472
                    EX, Gold: 44.9 => 59.32 | 59.3 | 59.1
                    
                    
                    Calculations: floating - all integer - initial integer
                    - Base values: 180.00 - 180 - 180.00
                    - Initial Fused: 216.00 - 215 - 216.00
                    - Final Fused: 237.60 - 236 - 237.60
                    
                    Equivalent Stats: Initial and Fused (actual | rounded | game)
                    AR, CR, H, P, V: 90 => 118.80 | 118 | 118
                    CD: 60.0 => 79.20 | 79.2 | 79.2
                    Armor: 180 => 237.60 | 237 | 237
                    DR: 360 => 475.20 | 475 | 475
                    EX, Gold: 45.0 => 59.40 | 59.4 | 59.4
                    Last edited by Nhat; 12-13-2017, 09:28 PM.
                    Eternium Files - links and details (Updated: 10 Aug 2018)

                    Eternium Guides:

                    Comment


                    • #11
                      We sure spend a lot of time mucking around in the dark trying to figure out bugs. Instead, the developers could perhaps comment on some of these "flawed code" issues to save everybody a lot of time.

                      "Yep we see it and it's on the list."

                      "Yep we see it, but it is working as intended."

                      "Nope, that's not how it works and you are off track."

                      VUFO ZEBE ZAQI 1381 -|- Gethi, mage, & Kisheli, XP mage

                      Comment


                      • #12
                        Originally posted by Coda View Post
                        We sure spend a lot of time mucking around in the dark trying to figure out bugs. Instead, the developers could perhaps comment on some of these "flawed code" issues to save everybody a lot of time.

                        "Yep we see it and it's on the list."

                        "Yep we see it, but it is working as intended."

                        "Nope, that's not how it works and you are off track."
                        To be fair to them, debugging through years-old code to find inconsistent/erroneous typecasts in function calls is neither zero-effort nor appealing...

                        But they could confirm, at least, about the 180 internal value range.

                        Comment


                        • #13
                          Just realised I used the wrong "rounding" method in the code above - I casted them all to integer, which FLOORED them rather than use the "%.0f" output, which rounds the floating values to whole numbers. From what we've seen with the displayed values in game, this is how they're displaying things, so no casting/flooring is involved - otherwise, we wouldn't be seeing those "not quite 90" values, they'll all be 89 instead.

                          I'm still wondering what that bug they fixed during those betas before 1.2.65 - kinda thinking there's now a big note in the code along the line of "Yes, this is a bug, but don't fix it because it'll make a lot of players upset"


                          Updated outputs, sorry for the poor layout...
                          Code:
                          Calculations: floating - all integer - initial integer
                          - Base values: 178.75 - 178 - 178.00
                          - Initial Fused: 214.50 - 213 - 213.60
                          - Final Fused: 235.95 - 234 - 234.96
                          
                          Equivalent Stats: Initial and Fused (actual | rounded | game)
                          AR, CR, H, P, V: 89.38 | 89 => 117.97 | 118 | 117
                          CD: 59.58 | 59.6 => 78.65 | 78.7 | 78.3
                          Armor: 178.75 | 179 => 235.95 | 236 | 235
                          DR: 357.50 | 358 => 471.90 | 472 | 470
                          EX, Gold: 44.69 | 44.7 => 58.99 | 59.0 | 58.7
                          
                          Calculations: floating - all integer - initial integer
                          - Base values: 179.00 - 179 - 179.00
                          - Initial Fused: 214.80 - 214 - 214.80
                          - Final Fused: 236.28 - 235 - 236.28
                          
                          Equivalent Stats: Initial and Fused (actual | rounded | game)
                          AR, CR, H, P, V: 89.50 | 90 => 118.14 | 118 | 118
                          CD: 59.67 | 59.7 => 78.76 | 78.8 | 78.8
                          Armor: 179.00 | 179 => 236.28 | 236 | 236
                          DR: 358.00 | 358 => 472.56 | 473 | 473
                          EX, Gold: 44.75 | 44.8 => 59.07 | 59.1 | 59.1
                          
                          Calculations: floating - all integer - initial integer
                          - Base values: 179.25 - 179 - 179.00
                          - Initial Fused: 215.10 - 214 - 214.80
                          - Final Fused: 236.61 - 235 - 236.28
                          
                          Equivalent Stats: Initial and Fused (actual | rounded | game)
                          AR, CR, H, P, V: 89.62 | 90 => 118.31 | 118 | 118
                          CD: 59.75 | 59.8 => 78.87 | 78.9 | 78.8
                          Armor: 179.25 | 179 => 236.61 | 237 | 236
                          DR: 358.50 | 358 => 473.22 | 473 | 473
                          EX, Gold: 44.81 | 44.8 => 59.15 | 59.2 | 59.1
                          
                          Calculations: floating - all integer - initial integer
                          - Base values: 179.50 - 179 - 179.00
                          - Initial Fused: 215.40 - 214 - 214.80
                          - Final Fused: 236.94 - 235 - 236.28
                          
                          Equivalent Stats: Initial and Fused (actual | rounded | game)
                          AR, CR, H, P, V: 89.75 | 90 => 118.47 | 118 | 118
                          CD: 59.83 | 59.8 => 78.98 | 79.0 | 78.8
                          Armor: 179.50 | 180 => 236.94 | 237 | 236
                          DR: 359.00 | 359 => 473.88 | 474 | 473
                          EX, Gold: 44.88 | 44.9 => 59.23 | 59.2 | 59.1
                          
                          Calculations: floating - all integer - initial integer
                          - Base values: 179.75 - 179 - 179.00
                          - Initial Fused: 215.70 - 214 - 214.80
                          - Final Fused: 237.27 - 235 - 236.28
                          
                          Equivalent Stats: Initial and Fused (actual | rounded | game)
                          AR, CR, H, P, V: 89.88 | 90 => 118.64 | 119 | 118
                          CD: 59.92 | 59.9 => 79.09 | 79.1 | 78.8
                          Armor: 179.75 | 180 => 237.27 | 237 | 236
                          DR: 359.50 | 360 => 474.54 | 475 | 473
                          EX, Gold: 44.94 | 44.9 => 59.32 | 59.3 | 59.1
                          
                          Calculations: floating - all integer - initial integer
                          - Base values: 180.00 - 180 - 180.00
                          - Initial Fused: 216.00 - 216 - 216.00
                          - Final Fused: 237.60 - 237 - 237.60
                          
                          Equivalent Stats: Initial and Fused (actual | rounded | game)
                          AR, CR, H, P, V: 90.00 | 90 => 118.80 | 119 | 119
                          CD: 60.00 | 60.0 => 79.20 | 79.2 | 79.2
                          Armor: 180.00 | 180 => 237.60 | 238 | 238
                          DR: 360.00 | 360 => 475.20 | 475 | 475
                          EX, Gold: 45.00 | 45.0 => 59.40 | 59.4 | 59.4
                          Eternium Files - links and details (Updated: 10 Aug 2018)

                          Eternium Guides:

                          Comment


                          • #14
                            Originally posted by Nhat View Post
                            From what we've seen with the displayed values in game, this is how they're displaying things, so no casting/flooring is involved - otherwise, we wouldn't be seeing those "not quite 90" values, they'll all be 89 instead.
                            "wrong" (sort of). While we have not obtained official confirmation by the devs, all fusion examples so far have matched the idea of the 180-base internal float value, which is SCALED (divided) by a factor according to the actual range of a particular stat (2 for Power Vitality etc., 3 for CD, 0.5 for LoH, etc. etc.), then ROUNDED for display purposes but FLOORED (probably by an unintended typecast) when fused.

                            Comment


                            • #15
                              Originally posted by Jose Sarmento View Post

                              "wrong" (sort of). While we have not obtained official confirmation by the devs, all fusion examples so far have matched the idea of the 180-base internal float value, which is SCALED (divided) by a factor according to the actual range of a particular stat (2 for Power Vitality etc., 3 for CD, 0.5 for LoH, etc. etc.), then ROUNDED for display purposes but FLOORED (probably by an unintended typecast) when fused.
                              Yeah, I was referring to the outputs from the code I was testing with, and with respect to the fused outcome.

                              For example:C printf formats

                              The output posted on #10 - used "%d" and integer FLOORING to display
                              Perfect 180 => 90; fused to 118.80, but the display was "118"
                              This is obviously wrong.

                              Fixed in #13 - using "%.0f" display instead - this is the ROUNDED for display part.
                              => fused still 118.80, but now rounded display as expected "119"


                              Also, the internal value FLOORING would be the same for fusing Epic and Legendary right?

                              CD Uncommon: 179.75 => 59.92% (Display 59.9%)

                              Fusing Rare:
                              1.1 * 179 * 1.2
                              => 1.1 * 214.8
                              => 236.28
                              => Scaled: 78.76 (Display 78.8%) - Existing calculation: 79.1%


                              Edit: Fixed FLOORING

                              Fusing Epic
                              1.2 * 236 * 1.2
                              => 1.2 * 283.2
                              => 339.84
                              => Scaled: 113.28 (Display 113.3%) - Existing calculation: 113.9%

                              Fusing Legendary, 4 stats so no bonus, also only one jewel for the stat:
                              339 + 339 / 15
                              => 339 + 22.6
                              => 361.6
                              => Scaled: 120.533* (Display 120.5%) - Existing calculation: 121.5%
                              Last edited by Nhat; 12-23-2017, 12:39 AM.
                              Eternium Files - links and details (Updated: 10 Aug 2018)

                              Eternium Guides:

                              Comment

                              Working...
                              X