Reverse engineering the item formula

Discussion in 'Card Hunter General Chat' started by Martin K, Nov 29, 2013.

  1. Martin K

    Martin K Goblin Champion

    If someone already tried in an older thread please point me there.

    I found that a simple calculation can match the level of most card hunter items, at least within +/-1.

    Just add up the value of the cards in the item as per list below (divide by 2 for weapons)
    Black -3
    Paper 0
    Bronze 3
    Silver 6
    Gold 9
    Emerald 12
    Sapphire 15

    That still does not explain how item levels between the multiples of 3 come up. It also doesn't account for some epic and legendary items that seem to have a level bonus (example: Sharp Shell)

    I know some members here have Excel sheets of items, maybe even one with all the cards and their quality? That would be great to test a few more theories.

    Some assumptions, which could be true or false. It would be great if someone could confirm or contradict these.

    A - All item levels are generated automatically. There is no manual adjustment.
    B - The value of a card increases linearly with level
    C - All cards of the same quality are assigned the same value
    D - The formula is the same for all item types
    E - Card rarity does not factor into item level (only item rarity)
    F - Rarer items can contain higher quality cards for their level
    G - The type of item does not matter (for example, Lunging Thrust is valued the same on weapons, boots and armor)
    H - It does not matter if there are several identical cards
     
    Galdred and spacedust like this.
  2. Martin K

    Martin K Goblin Champion

    Items that don't follow the above formula within +/- 1 (Levels 1-5)

    (-) Item is has weaker cards than expected by formula
    (+) Item is has stronger cards than expected by formula

    - Arcane Item
    Blazing Stone - Rare 3 - P U / P U / P U (-)
    Copper Amulet - Rare 3 - P U / P U / P U (-)
    Copper Zapping Wand - Rare 3 - P U / P U / P U (-)
    Hot Crystal - Rare 3 - P U / P U / P U (-)
    White Orb - Rare 3 - P U / P U / P U (-)

    Cloudy Circlet - Common 4 - S U / P C / P C (+)
    Obscure Stone - Common 4 - S C / P C / P C (+)

    Malachite Orb - Uncommon 5 - B U / P U / P U (-)
    Viscous Locket - Uncommon 5 - B U / B U / Bl C (-)

    - Arcane Skill -

    Untrained Rifthopping - Common 1 - B U / P C / P C (+)
    Untrained Pyromancy - Uncommon 5 - B U / B U / Bl C (-)

    - Boots -
    Cheap Fencer's Boots - Uncommon 3 - P U / P U / P C (-)
    Plain Old Boots - Uncommon 3 - C U / C U / C U (-)

    Croc Skin Boots - Uncommon 5 - B U / P U / P C (-)
    Patchwork Boots - Common 5 - B C / P C / P C (-)
    - Divine Armor -
    Holy Leather Armor - Rare 1 - B C / B R / Bl C (+)
    Mageslayer Mail - Rare 1 - B R / P R / P C (+)
    Unholy Nimbus - Legendary 1 - B R / P R / P R (+)

    Holy Chainmail - Rare 4 - B R / B C / P U (+)

    - Divine Item -
    Relic Of St. Darqar - Legendary 4 - S R / P R / P R (+)

    - Divine Weapon -
    Vampire's Blade - Rare 2 - G C / G C / P R / P U / Bl C / Bl C (++)

    Witchdoctor's Axe - Uncommon 3 - P U / P U / P U / B C / P U / P U (-)

    - Heavy Armor
    Sparking Shell - Epic 1 - B R / B R / Bl C (+)

    Sharp Shell - Epic 3 - B R / B R / B C (++)

    Old Padded Mail - Uncommon 5 - B C / P U / P U (-)
    Patchwork Chain Mail - Uncommon 5 - S U / P U / Bl C (-)

    - Helmet -
    Shaman's Felt Cap - Rare 1 - P C / P C / B R (+)
    Shimmering Hood - Epic 1 - B R / B R / Bl C (+)

    Defensive Helm - Common 3 - S C / S C / P C (+)

    - Martial Skill -

    Novice Gouging - Common 5 - B U / P C / P C (-)

    - Racial Skill -
    Unskilled Elf - Uncommon 3 - C U / C U / C U (-)
    Unskilled Human - Uncommon 3 - C U / C U / C U (-)

    - Shield -
    Cover Shield - Uncommon 4 - B U / B U / P C (+)
    Ricochet Buckler - Rare 4 - B U / B U / P R (+)
    Striped Shield - Uncommon 4 - B U / B U / P C (+)

    - Staff -
    Heavy Oak Staff - Rare 2 - B C / B C / B C / P R / P R / Bl C (+)

    Staff Of Defense - Common 3 - P C / P C / P U / B C / B C / B C (+)
    Vladimir's Battlestaff - Uncommon 3 - B C / P C / P C / P U / P U / P U (-)
    White Oak Staff - Common 3 - S U / P C / P C / P C / P C / P C (+)

    Balsa Boltstaff - Rare 5 - B U / B U / P U / P U / P U / P U (-)

    - Weapon -
    Slippery Sword - Rare 2 - B U / B U / B U / B U / P C / Bl C (+)

    Flimsy Rapier - Rare 5 - B R / B R / B C / B C / Bl C / Bl C (-)
    Stiletto - Uncommon 5 - B C / B C / P C / P C / P C / P C (-)
     
  3. Lusus121

    Lusus121 Goblin Champion

    I must be missing something. I threw these numbers into a spreadsheet and about 1/2 the items didn't match their item level, about 1/4 by more than a 1 point difference.

    Just in level 18 items there's a point spread from 9 (Shield Of Ultimate Dodging) to 21 (Mail Of The Martyr)

    If there is a value system, it definitely has to take card rarity and item rarity into account.
     
  4. Martin K

    Martin K Goblin Champion

    After looking through the items of level 1 to 5, I'd say I'm pretty close.

    The items where it doesn't work are mostly common items with uncommon cards, or rare / epic / legendaries with common cards.
    I have the feeling that item rarity is based on card rarity, but not automatically. It's individually set for each item. The rule seems to be that an item with a rare card is at least rare, but you can find common items with all uncommon cards.

    There are ways to tweak the formula to be more in line with above findings. Here is one:

    - Card rarity does affect level. For each uncommon, add +1. For each rare, add +2. (?)
    - Items get a level break. For each rarity step, substract -1 from level. Uncommon -1, Rare -2, Epic -3, Legendary -4. (?)

    Since most rarer items also include rarer cards, the two mostly balance out. Where they don't you get the above results.

    Also, Wimpy seems to be valued as a black card, even though it's a paper card on paper.
     
  5. Martin K

    Martin K Goblin Champion

    As I said, I'm reverse engineering the formula. Which means I haven't found it yet.
    Can you share this spreadsheet? Either through the forum or by email? I'd love to see that.

    Half of the items matching isn't bad for a rule of thumb :)

    Mail of the Martyr isn't too far off, but Shield of Ultimate Dodging is a bit of a headscratcher.
    Sharp Shell has almost a similar setup (3 bronze, 2 rare 1 common compared to 3 rares) but it's level 3 (!)

    Possible explanations:
    - Dodge is valued as silver internally (or at least higher than other Bronze)
    - There is a level penalty for having 3 identical cards
    - There is a level penalty for card type (shields usually have blocks, this is a move / boost)
    - This is a database glitch and the item is supposed to be a level 9 rare, not 18 legendary. Slippery Shield is a level 18 rare. It's better in every way and it matches the formula.
     
  6. Pengw1n

    Pengw1n Moderately Informed Staff Member

    Did you take into account that multiple copies of cards can affect calculations? Or rather, I see you counted this out. This goes against what we've heard regarding like Vibrant Pain for instance.
     
  7. Martin K

    Martin K Goblin Champion

    I haven't found any other affected items, at least not beyond +3. Focused Pyromancy has 3 identical uncommon bronze and it's level 12. Focused Teleportation is the same and only level 9.

    Everyone's favorite Vibrant Pain has 6x rare silver and is still level 18 legendary.

    I declare Shield Of Ultimate Dodging a database glitch (or manually nerfed item) until a dev says otherwise.
     
  8. Pengw1n

    Pengw1n Moderately Informed Staff Member

    If you can find another item with 6 silver rares (non-matching), that might tell you something as a comparison.

    Edit: Oh, I see - your formula is only for the item level. Not tracking rarity affected apart from the obvious card level one.
     
  9. Martin K

    Martin K Goblin Champion

  10. Lusus121

    Lusus121 Goblin Champion

    To make sure I understand the adjustment, under the new system

    Vibrant Plate would be worth 23 points
    2 Gold (9*2) + 1 Bronze (3) + 2 Uncommon (1*2) + 1 Rare (2) - Rare Item (2) = 23

    And Shield Of Ultimate Dodging would be worth 11?
    3 Bronze (3*3) + 3 Rare (3*2) - Legendary Item (-4) = 11

    Perhaps Shield of Ultimate Dodging is just strange, I'll take take some items from level 1,

    Untrained Rifthopping would be worth
    2 Paper (0*2) + 1 Bronze (1*3) + 1 Uncommon (1*1) = 4

    Pain Hat would be worth
    2 Paper (0*2) + 1 Black (1*-3) = -3
     
  11. Lusus121

    Lusus121 Goblin Champion

    Sure Martin, I'll upload my workbook. The reason that I have it is that I was trying to do the same thing as you, but never reconciled some of the wierdness.

    As for what item rarity means,

    There is a clear boundary for what rarity of card items can use based on the item's rarity:
    Common Items - Only uses Common/Uncommon Cards, up to 33% Uncommon Cards
    Uncommon Items - Only uses Common/Uncommon Cards, up to 100% Uncommon Cards
    Rare Items - Can use any card rarity, up to 33% rare Cards (1 for 3 slot items, 2 for 6 slot items)
    Epic Items - Can use any card rarity, up to 66% rare cards
    Legendary Items - Can use any card rarity, up to 100% rare cards


    You mentioned something about common items full of uncommon cards, I don't think that is ever the case. Please correct me if I'm wrong.
     
  12. Questor

    Questor Ogre

    This is not as easy as it seems, i guess you have to adjust the formula for each item level.
    And even then it wont fit, because the system is more of a guideline.
     
  13. Martin K

    Martin K Goblin Champion

    Well, the devs said it's hardcoded (which is why they can't switch card rarities around easily).

    Anyhow, that Dodging Shield, could it be a legacy item of some sort? Does it still drop?
     
  14. Martin K

    Martin K Goblin Champion

    Focused Teleportation, Focused Blazing and Focused Pyromancy got me thinking.

    What if assumption C above is wrong?
    What if some cards are assigned a higher level value within their quality band? What if this is a hidden difference that is independent of rarity?

    I.e. Kindler (C) has a value of 3. Firestarter (U) has an increased value of 4, but Dimensional Traveller (U) has the standard bronze value of 3.

    In that case, neither card rarity nor item rarity would affect level. You'd have to start puzzling together card values by first looking at the 3x identical cards, then look at items with 2 cards you already have and a third unknown one, and so on...
     
  15. Martin K

    Martin K Goblin Champion

    Soooo... big update here.

    I've spend way too much time yesterday to work with the item sheet that turinturamba kindly updated.
    I've managed to reverse engineer most items, with about 10% left that are either a level higher or lower than expected.

    Here is the file:
    https://dl.dropboxusercontent.com/u/26790776/items spreadsheet martin.xls

    Here's a quick overview of my findings:
    - Most items adhere to a simple formula that starts with paper quality cards at zero "level cost", +3 for each quality step
    (Add up the level cost of all included cards to get the item level)

    - Some cards have a +1 bonus or penalty to their cost. Many of these items have stricly worse or better sister cards at the same quality (for example Draining Touch). See the second sheet in the excel file for the cost I assigned to each card.

    - Some cards seems to have manual adjustments, depending on what item they are on. It looks like this is mostly for class balancing.
    In particular:
    * Shimmering Aura is 2 levels step cheaper when on helmet, 3 when on heavy armor and divine armor
    * Hard To Pin Down is 3 more expensive when on boots
    * Dodge is 5 more expensive when on elf skills, 4 when on robes, and 2 more expensive when on Shields, assuming a standard cost of 4
    * Jump Back is 3 cheaper when on a shield

    There are a few more but they only apply to 2-3 items each.

    See the third page in the Excel file for details. (Note that these adjustments are done manually right now. It would be possible to implement with vlookup or macro but I haven't done so yet)

    - Item rarity appears to have no influence on the quality of the included cards. Card rarity seems to be independent from level cost.
     
    turinturamba likes this.
  16. Player1

    Player1 Mushroom Warrior

    As impressive as this is, I am not sure if it have much practical value. First, the numeric cost on each card is not a good indicator of its effectiveness. A card the system values at 6 may be worst than a card the system values at 2. Secondly, assessing the same cards found in different slots may not be appropriate. This is because different slots have different competitors and therefore it may not a be a fair comparison. Eg. helmet and heavy armor may both contain reliable mail, but the reliable mail in helmet is competing with push teams whereas the reliable mail in heavy armor is competing against other armor cards.
     
  17. Martin K

    Martin K Goblin Champion

    Well, to know which card the game values too high and which too low you'll need to know how the game values the cards in the first place. Then you can make your own judgement based on that.

    Same with the item slots: Sure, Hard To Pin Down competes with different cards on shields and boots, and Wizards will have to go for boots anyway, but if you have the choice it's good to know that on the shield, you pay less for the card. Dodge, on the other hand, is cheaper to get on weapons and helmets.

    I don't think anyone was aware of that until now. For top decks, where every token and every card counts, this is very important.
     
    kelsierHathsin and Flaxative like this.
  18. Kalin

    Kalin Begat G'zok

    First I had to find this thread, then find the other thread where you compared your results with the data files, then I decided to post here after all...

    Did you ever figure out the formula for rarity? In particular, why is Bejeweled Shortsword Common and Hammer Of Bashing Rare? If it's because having 6 copies of a card ups the rarity two levels above having only 2 or 3 copies, then shouldn't Vibrant Pain be two rarity levels above St. Nyssa's Hammer?

    EDIT: I started playing with this myself, using the official Cards and Equipment files and the numbers you give (plus some trial and error to figure out which class each slot belongs to). I can get almost all the items to match the values BM calculated, but there are 8 boots that just don't work:
    Bully Boots
    Rusty Red Boots
    Reckless Boots
    Toad Boots
    Jumpdragger Boots
    Greenguard Boots
    Argo's Boots
    Azure Boots
    Right now, boots are using the quality actually shown on the card; if I assign them to a class, lots more boots get broken. I can tell it's Hard To Pin Down and Fright causing the problem, but no way to fix it.
     
  19. Kalin

    Kalin Begat G'zok

    This is the first half of the rarity formula. Next you count duplicate cards:
    3-card item, all cards same: rarity +1
    6-card item, 4-5 cards same: rarity +1
    6-card item, all same: rarity +2

    Which means Vibrant Pain should actually be two levels beyond Legendary.
     
    Stexe, Flaxative and neoncat like this.
  20. Oberon

    Oberon Hydra


    What about the staff of a million embers (not to mention the beta version when it was 6X fireballs)?

    Seems a couple of items escaped that rule.
     

Share This Page