PadGuideDb - TsubakiBotPad/pad-cogs GitHub Wiki
"Wow! Pad Coin from Monster Hunter Collab 2 is so cool! I sure do wish I knew its exact drop-rate in Master difficulty for some reason!" Well now you can get a closer estimate than ever before with PadGuideDb!
PadGuideDb (PDB) is a cog that allows specific bot users to make multiple fake runs through a dungeon to extract monster drop rates. It also allows users to control the pipeline via Discord.
Obtaining dungeon drop data is the main use of PDB, and it consists of three different commands.
First, to find the dungeon_id of the dungeon you're looking for, you must run [p]padguidedb searchdungeon <query>
^pdbs monster hunter collab
select dungeon_id, name_en, name_ja, visible from dungeons where lower(name_en) like %s or lower(name_ja) like %s order by dungeon_id desc limit 20 Results [ { "dungeon_id": 3560, "name_en": "Monster Hunter Collab 2", "name_ja": "モンスターハンター コラボ2", "visible": 1 }, { "dungeon_id": 2530, "name_en": "Monster Hunter Collab", "name_ja": "モンスターハンター コラボ", "visible": 1 }, { "dungeon_id": 2202, "name_en": "Multiplayer! Monster Hunter Collab!", "name_ja": "協力!モンハンコラボ!", "visible": 1 } ]
Once you've decided which dungeon you want to run, you can automate some runs of the dungeon via [p]padguidedb loaddungeon <server> <dungeon_id> <dungeon_floor_id> [queues]
-
server
is the server that you want to query from. You can only query dungeons that are open right now, so if it's not open in NA/JP, you'll have to try the other one.
-
dungeon_id
is the dungeon id you got from the previous command.
-
dungeon_floor_id
is the index of the floor. The bottom-most floor is 1, and it goes up from there. Monster Hunter Collab 2 Master difficult is 3 because it's the third from the bottom.
-
queues
is the number of times you want to run the dungeon 100 times. defaults to 1 (100 total runs), but it can be up to 5 (500 total runs). You can do more than 500 runs by running the command more than once, and you can have up to 6000 pending runs in the queue at a time.
This command takes a while to run, but it'll tell you in chat each time it finishes one group of 100 runs.
Once the bot has finished all of its runs, you can look at the data via [p]padguidedb dungeondrops <dungeon_id>
First it will show you how many runs per floor you have, and then it will say how many drops of each monster you got per floor.
To clear all old data from a dungeon, ask a bot admin to run [p]padguidedb cleardungeon <dungeon_id>
To run the data pipeline, use [p]padguidedb pipeline fulletl
.
To run the image pipeline, use [p]padguidedb pipeline extractimages
PDB is the most difficult cog to set up. In order to get it working, you have to have:
- A working copy of the Tsubaki Pipeline.
- Two accounts with 200+ stamina that you're willing to spare. One in NA server and one in JP server.
To setup, you'll have to run:
[p]padguidedb setconfigfile /path/to/pipeline/cronjobs/db_config.json
[p]padguidedb setdungeonscriptfile /path/to/pipeline/etl/pad_dungeon_pull.py
[p]padguidedb setimageupdatefile /path/to/pipeline/cronjobs/run_loader.sh
[p]padguidedb setuserinfo NA <NA_ACCOUNT_UUID> <NA_ACCOUNT_INTID>
[p]padguidedb setuserinfo JP <JP_ACCOUNT_UUID> <JP_ACCOUNT_INTID>
If you run the pipeline or your bot instance through a venv, you'll also have to specify the python executable that you want to run pipeline files from:
[p]padguidedb setpythonexecutable /path/to/pipeline-venv/bin/python
After PDB has been setup, bot admins can delegate PDB admins via [p]padguidedb addadmin
. Once granted these permissions, they will be able to use any PDB functionality until their admin status is removed.