Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monsters database: Drops: Add rare drop table parsing #161

Open
osrsbox opened this issue Jan 1, 2020 · 6 comments
Open

Monsters database: Drops: Add rare drop table parsing #161

osrsbox opened this issue Jan 1, 2020 · 6 comments
Assignees
Labels
enhancement monsters Anything to do with the monsters data, API or builder

Comments

@osrsbox
Copy link
Owner

osrsbox commented Jan 1, 2020

About to close #149 - that issue has surprisingly taken a long time to close, and was tricky to program. All drop tables have been added, apart from the rare drop table. This issue documents the rare drop table addition, and notes while creating it... as there are a few caveats to the design choices.

Template Links:

Documentation links:

@osrsbox osrsbox added enhancement monsters Anything to do with the monsters data, API or builder doing Currently working on this issue/PR labels Jan 1, 2020
@osrsbox osrsbox self-assigned this Jan 1, 2020
@BossHuso
Copy link

Does this mean we are getting the RDT in the monsters API next to the regular drops? :)

@osrsbox
Copy link
Owner Author

osrsbox commented Feb 20, 2021

@BossHuso - yeah, hoping to add this. The rare drop table will just be added into the existing drops array for each monster. Similar to how I did it for the Gem Drop Table. See:

def gem_drop_table(base_rarity: float) -> list:

When I rewrote the code for monster drops in December, it made it much easier to get this done and more accurate - but just haven't got around to converting the wiki page rare drop table values into code. Writing it up should be easy, but I keep procrastinating.

@BossHuso
Copy link

@osrsbox sounds good, great job <3

Take your time :)

@BossHuso
Copy link

BossHuso commented Feb 20, 2021

Oh just wondering btw, how are you going to handle duplicate drops (with different rarity)?

Lot of NPCs have items in their regular drop table as well as the RDT.

Example
Rune javelin
https://oldschool.runescape.wiki/w/Steel_dragon

@osrsbox
Copy link
Owner Author

osrsbox commented Feb 20, 2021

Good question @BossHuso! To be honest - I have yet to find a good way to generally handle monster drops. I almost removed them late last year, as I think they are inaccurate... But a couple users ask to keep them in, even though they aren't perfect. I switched to using SMW queries to get the data (instead of scraping), and it improved it - a little! There are so many "what if" edge cases (are you on a specific quest, are you wearing a ring of wealth, are you on a wildy slay task, are you in the catacombs etc. etc.).

To answer your question - I would probably just add another entry in the drops array and both have the same name but different index. To add to this, it would probably make sense to add another property to say it is from the rare drop table (and same for the gem drop table). The drop rarity for the item from the "rare drop table" would include the chance of rolling to get on the table to begin with. Always open the ideas - if you (or anyone else) has a better method!

@BossHuso
Copy link

@osrsbox Oh please don't :) I don't think they are inaccurate at all. Ofcourse there will always be some incorrect data, but not really that much to say it's useless.

To be honest, I don't care about the "what if" cases, people who use the API could implement that in their own code base since those are conditional and usually calculated on top of the base droprate anyways.

What I noticed is that some monsters already include the RDT while other's dont, is this correct?

Example
Steel dragons = https://api.osrsbox.com/monsters/139
Contains RDT

Alchemical Hydra = https://api.osrsbox.com/monsters/8621
Doesn't contain RDT

Is it a lot of work for you to implement the RDT on all NPCs the same way you did for Steel dragons? I don't mind both being in the drops array. What I ended up doing is comparing the quantity of the received loot with the matches I get from the drops array (they differ most of the time between the tables).

Since I can't detect if the loot received was from the RDT in the first place, it's fine that there is no distinction between the two (unless someone fetches your API to get an overview of the loot table ofcourse).

FYI: Using your API for https://github.com/BossHuso/discord-rare-drop-notificater :)

@osrsbox osrsbox removed the doing Currently working on this issue/PR label Aug 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement monsters Anything to do with the monsters data, API or builder
Projects
None yet
Development

No branches or pull requests

2 participants