perryhuynh / kcauto

kcauto, the successor to kancolle-auto, a Kantai Collection (Kancolle) bot/automation tool
GNU General Public License v3.0
68 stars 22 forks source link

Modify port check for events to include equipment slots #416

Open perryhuynh opened 4 years ago

perryhuynh commented 4 years ago

Relevant sortie requirements for events:

Must have 5 empty ship slots for new ships
Must have 20 free equipment slots
mrmin123 commented 4 years ago

I remember looking into this early on in development and found that equipment count is actually very difficult to find. The only place I found it in the API was when you went into the player profile page. That said, I haven't looked into it again since so I might have missed it somewhere obvious, but for now this is a known shippable.

stackhanovets commented 4 years ago

@mrmin123 Please try digging into this. KC3Kai does not need an opened profile page but the main screen only.

mrmin123 commented 4 years ago

I am familiar with the require_info payload. kcauto already uses it to determine whether the player has provisional resupply or not. This API call only occurs when loading the game the first time, making it useless for determining the inventory size in real-time. For this, I need the data to be in the port response, which it is not, as far as I know. I suspect KC3 keeps track of this by tracking every other API call that can affect the number of inventory items, which I am currently not willing to do for kcauto.