Dismiss Notice
Wynncraft, the Minecraft MMORPG. Play it now on your Minecraft client at (IP): play.wynncraft.com. No mods required! Click here for more info...

How Are Item Stats Calculated When It Is Identified?

Discussion in 'Questions' started by NoobDoesMC, May 2, 2017.

Thread Status:
Not open for further replies.
  1. NoobDoesMC

    NoobDoesMC Skilled Adventurer

    Messages:
    281
    Likes Received:
    32
    Trophy Points:
    36
    Minecraft:
    The Item Database API returns only a single number for each stat of an item's identification.

    The item guide returns the range of the stat (min-max).

    I am wondering what calculation Wynncraft performs in-game to assign each stat its value when you identify an item.

    Is it weighted in any way? Or completely "random"?
     
  2. Pokextreme

    Pokextreme Avos Air Archer HERO

    Messages:
    5,335
    Likes Received:
    13,637
    Trophy Points:
    215
    Minecraft:
    @motoki1
     
  3. Yuno F Gasai

    Yuno F Gasai Forum God, FW

    Messages:
    13,439
    Likes Received:
    28,735
    Trophy Points:
    227
    Guild:
    Minecraft:
    Completely random
     
  4. NoobDoesMC

    NoobDoesMC Skilled Adventurer

    Messages:
    281
    Likes Received:
    32
    Trophy Points:
    36
    Minecraft:
  5. orange0401

    orange0401 Fortified with Vitamin C HERO

    Messages:
    3,839
    Likes Received:
    3,713
    Trophy Points:
    192
    Minecraft:
    Max = (baseId)(1.3)
    Min = (baseId)(.3)

    Feel free to tag me if you have any further questions.
     
  6. NoobDoesMC

    NoobDoesMC Skilled Adventurer

    Messages:
    281
    Likes Received:
    32
    Trophy Points:
    36
    Minecraft:
    I know already that this is false, because the numbers returned by the API call are not perfectly in the middle of the calculated min/max stat values.

    E.g. compare Kayde from its API call where the xpBonus is given as 10, but the Kayde as viewed in the Item Guide has an xpBonus range +3% to 13%.

    The Item Guide takes the API call result and does some calculation to figure out the min and max, I just can't figure out what those calculations are.

    More useful to me though are the calculations taken every time an item is identified, in the form

    Code:
    function get_stat(api_stat_result):
      return ...
    
    so that get_stat(10) can return anything from 3 to 13.

    Maybe the calculations are different for different stats, in which case I only really care about loot and xp at the moment, but knowing how all of them are found would be useful.
    ________________________________
    @orange0401 wow thanks, that seems very likely.

    How is it rounded though? Nearest? Floored? Ceilinged? (I've never seen non-integer stats.)

    And also, just to check, how are the results distributed towards those two limits? Are they in any way weighted towards the "middle" or are they evenly distributed?
     
    Last edited: May 2, 2017
  7. orange0401

    orange0401 Fortified with Vitamin C HERO

    Messages:
    3,839
    Likes Received:
    3,713
    Trophy Points:
    192
    Minecraft:
    the result of the above calculations are rounded up, to the nearest integer.
    it is a completely random roll between .30-1.30. 101 individual possibilities.
     
    Stag2001 likes this.
  8. NoobDoesMC

    NoobDoesMC Skilled Adventurer

    Messages:
    281
    Likes Received:
    32
    Trophy Points:
    36
    Minecraft:
    "are rounded up, to the nearest integer"

    Sorry for being a pain in the butt, but please can you clarify what that means? It's kind of contradictory.

    "it is a completely random roll between .30-1.30. 101 individual possibilities."

    That's awesome! How do you know this? xD

    So that means that, pretend I have an item with +10 xpBonus, the probability of it being a 13 is 1/11? (This depends on the meaning of "are rounded up, to the nearest integer")

    Thank you so much for your help @orange0401
     
  9. orange0401

    orange0401 Fortified with Vitamin C HERO

    Messages:
    3,839
    Likes Received:
    3,713
    Trophy Points:
    192
    Minecraft:
    Let me explain the entire process
    When an item is identified, every single base ID is rolled to a value of .30-1.30 (.3, .31, .32, .33, etc). Inclusive. This means that there are a total of 101 possible rolls on each identification.
    This id value (lets say we get a .72) is then multiplied by the base id, which lets say is 10 intel.
    (baseId)(roll)
    (10)(.72) - 7.2
    This number is then rounded to 8, meaning that we would get 8 intel on our item.
     
    Miles_ likes this.
  10. Yuno F Gasai

    Yuno F Gasai Forum God, FW

    Messages:
    13,439
    Likes Received:
    28,735
    Trophy Points:
    227
    Guild:
    Minecraft:
    let me rephrase
    you got the base id's
    the base id's get multiplied by 0.3-1.3 at random
    if its a negative id it gets multiplied by 1.3-0.7 at random
    the end result is rounded up so you can get a max id without a max roll (hench max id's on items with only two **)
     
  11. NoobDoesMC

    NoobDoesMC Skilled Adventurer

    Messages:
    281
    Likes Received:
    32
    Trophy Points:
    36
    Minecraft:
    Ah, thank you for clarifying :)

    Question: how are the negative values rounded? Towards or away from 0?
     
  12. Yuno F Gasai

    Yuno F Gasai Forum God, FW

    Messages:
    13,439
    Likes Received:
    28,735
    Trophy Points:
    227
    Guild:
    Minecraft:
    No idea
     
  13. Lexwomy

    Lexwomy Lexwomy HERO

    Messages:
    3,164
    Likes Received:
    1,390
    Trophy Points:
    123
    Minecraft:

    this shit makes my brain hurt ;-;
     
  14. orange0401

    orange0401 Fortified with Vitamin C HERO

    Messages:
    3,839
    Likes Received:
    3,713
    Trophy Points:
    192
    Minecraft:
    They are rounded the same way. Up, to the nearest integer.
     
  15. NoobDoesMC

    NoobDoesMC Skilled Adventurer

    Messages:
    281
    Likes Received:
    32
    Trophy Points:
    36
    Minecraft:
    So a roll of -5.9 would be "rounded" to -5? Just a ceiling function?
     
    orange0401 likes this.
Thread Status:
Not open for further replies.