Closed nwalsh1995 closed 5 years ago
Potentially we want to have something marked as equipable by player? For instance, I bet a lot of this stuff is wielded by NPCs and only equipable by them.
@nwalsh1995 - I was aware of this problem with some equipable items not having a slot
property. But it is nice to get an actual list documented of the affected items. Unfortunately, this is a difficult problem to fix.
Summary of how items are populated:
ItemDefinition
JSON data from the cache - not my item definition class)Equip
option in the options
object from the extracted cache data)Infobox bonuses
template and extract data (including stats, slot, attack speed etc.)Couple of issues here:
Equip
even when they are not equipable. Some examples are listed below: these are from one of the dwarf quests.
Item Dwarven battleaxe:5056 is incorrect
Item Dwarven battleaxe:5057 is incorrect
Item Dwarven battleaxe:5058 is incorrect
Item Dwarven battleaxe:5059 is incorrect
Item Left boot:5062 is incorrect
Item Right boot:5063 is incorrect
Item Exquisite boots:5064 is incorrect
Item Exquisite clothes:5067 is incorrect
Infobox bonuses
template on the OSRS Wiki. This means that the slot
property is not available. Some examples are below.
Item Ring of nature:20005 is incorrect
Item Ring of coins:20017 is incorrect
Infobox bonuses
. Some examples:
Item Crone-made amulet:10500 is incorrect
Item A jester stick:10840 is incorrect
Item Poisoned dagger(p):1235 is incorrect
Solution:
I am not too sure what to do about these items. Currently they are handled in the normalized_names.txt
file. If an item ID number has a status code of 6, it is equipable, but the stats (and slot/attack speed) are not obtainable. This file is loaded and used in the items_builder
process. I do not really want to hard-code the values, as each week I use the items_builder
to re-build the database. Couple of thoughts:
Null
items should be set to equipable being false
equipable
property from the OSRS Wiki Infoxbox Item
template to confirm an item is actually equipable. If not, set it to false
even when the cache says it is equipable (this seems like the best option).slot
propertiesInfobox bonuses
but some have just been skipped.Sorry about the long-winded reply - it was a bit of a brain dump!
Thanks, great explanation of whats happening.
@osrsbox tbh I think it is valid how they are being marked as equipable since by the game engine they are. I suggest to either alter the current .equipable
property or make a new property .equipable_by_player
where they check that it is equipable and that it has a valid slot (and potentially has valid bonuses? not sure about this one).
To me, it seems easier to just take an approach where we leave the data as in (besides a few cases like Null) and instead use some extra logic around them to determine their validity.
Just an update on this issue. I am planning to add a new attribute named equipable_by_player
(as you suggested in your last comment). Currently writing the code that will perform a check when the item database is populated to see if there are:
Infobox bonuses
on the wikiIf the requirements are met, the equipable_by_player
will be set to True.
Seems like there is some data that is incomplete or something marked incorrectly. If an item is equipable it must have a slot. If you search for equipable items that have
"slot": null
you will see which ones that are marked incorrectly.Reproduction: