suggestion of new loot NFT rarity
- The variance of traditional rarity of Loot NFT is not even
- Some categories contains nothing
- Some items in categories for rarer ones contains more items than categories for more common ones.
- We should adjust the counts threshold for each parts of items.
- adjusted threshold of item counts each part
part | legendary | epic | rare | common |
---|---|---|---|---|
weapon | count<2 | count<200 | count<320 | other |
chest | count<2 | count<300 | count<385 | other |
head | count<2 | count<300 | count<380 | other |
waist | count<2 | count<300 | count<380 | other |
foot | count<2 | count<300 | count<380 | other |
hand | count<2 | count<300 | count<380 | other |
neck | count<2 | count<1800 | other | - |
ring | count<2 | count<1000 | other | - |
npm install --save categorized-loot-rarity
- Or just download and unzip it
- It doesn't depend anything. These are simple vanilaJs functions
- sample1
var LootRarity = require('categorized-loot-rarity');
var result = LootRarity.getCategorizedRarities(lootId=50);
console.log(result);
- output
{
weapon: 1,
chest: 3,
head: 1,
waist: 1,
foot: 3,
hand: 4,
neck: 2,
ring: 2
}
- sample2
var LootRarity = require('categorized-loot-rarity');
var result = LootRarity.getCategorizedRarities(lootId=50, parts='weapon', value_type='tier');
- output :
common
- appendix
- it works to get traditional rarity also for your convenience.
var LootRarity = require('categorized-loot-rarity'); console.log(LootRarity.getCategorizedRarities(lootId=50, parts='weapon', value_type='tier')); // 'common'