osrsbox / osrsbox-db

A complete and up-to-date database of Old School Runescape (OSRS) items, monsters and prayers
https://www.osrsbox.com/projects/osrsbox-db/
GNU General Public License v3.0
224 stars 82 forks source link

Item Database: Include stacked item variants in database #174

Closed osrsbox closed 4 years ago

osrsbox commented 4 years ago

A new bug was discovered in the item database where items that are stackable (e.g., Coins) that also have graphical icon differences do not have their stackable variants in the database. Take the example of Coins with the item ID of 995. There is no additional item IDs in the database that cover the variations to the original Coins item... in different stacked amounts.

Identifying stacked items: It turns out that an ItemDefinition has two properties to identify an item with stacked variants: countObj and countCo. Examples for the Coins item is displayed below:

  "countCo": [
    2,
    3,
    4,
    5,
    25,
    100,
    250,
    1000,
    10000,
    0
  ],
  "countObj": [
    996,
    997,
    998,
    999,
    1000,
    1001,
    1002,
    1003,
    1004,
    0
  ],

The countObj property provides the variant item IDs, and the countCo property seems (at a best guess) to be a variable for the amount of a specific item to be represented by a different object.

Including stacked items: To include these items in the database, the following points need to be performed:

osrsbox commented 4 years ago

About to push an update to resolve this issue. After putting in a lot of time to try and solve this, there are still a couple of issues/quirks to the solution. The following changes have been made:

The remaining problems are:

osrsbox commented 4 years ago

Closed in a504a83fe81868fc73ce2766e14208d8dd68e2ca.