categorized-loot-rarity

1.0.1 • Public • Published

categorized_loot_rarity

suggestion of new loot NFT rarity

Loot for adventure

1. Problems of traditional Loot Rarity

  1. The variance of traditional rarity of Loot NFT is not even
  2. Some categories contains nothing
  3. Some items in categories for rarer ones contains more items than categories for more common ones.

2. Suggestion

  • We should adjust the counts threshold for each parts of items.

Before And After

  • 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 -

3. How to use this package

installation

 npm install --save categorized-loot-rarity
  • Or just download and unzip it
  • It doesn't depend anything. These are simple vanilaJs functions

code example

  • 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'

compare

Before And After

Readme

Keywords

Package Sidebar

Install

npm i categorized-loot-rarity

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

13 MB

Total Files

12

Last publish

Collaborators

  • lhwanstar