XVs32 / kcauto_custom

kcauto_custom, the successor to kcauto, a Kantai Collection (Kancolle) bot / automation tool
https://xvs32.github.io/kcauto_custom/
GNU General Public License v3.0
8 stars 2 forks source link

Multi stages maps handling in `sortie mode: auto` #52

Open XVs32 opened 1 year ago

XVs32 commented 1 year ago

What

How

Result

Reference

XVs32 commented 1 year ago

From https://github.com/andanteyk/ElectronicObserver/blob/develop/ElectronicObserver/Other/Information/apilist.txt There is a api_gauge_num api shows that what is the current stage in a map.

Although I don't see any api shows if any gimmick(ギミック) is needed.

XVs32 commented 1 year ago

I can't find any api that is relate to gimmick(ギミック) It make sense since the game client does not get any gimmick(ギミック) related info in the combat menu

Now kcauto_custom will have to somehow save the state of a map and refresh it every month

XVs32 commented 1 year ago

It seems that api_gauge_num goes back to 1 after the map is cleared

CUI might need a extra pop up for user to manually pick the stage of a map when needed

XVs32 commented 1 year ago

Till 2023/08/24 7-5 is the only normal map which has gimmick(ギミック)

My current plan to handle gimmick(ギミック) is by adding an gimmick element in 7-5.json It starts from 0 (gimmick not solved) to whatever gimmicks(ギミック) need to solved in the map In 7-5, there is only one gimmick, so the maximum gimmick here is 1

A gimmick_timestamp element will shows the date when the gimmick is solved That way kcauto can refresh gimmick every month

XVs32 commented 1 year ago

First thing first, I will have to make the 7-5.json before I can start handling this gimmick thing

XVs32 commented 1 year ago

For the sake of summer event. I merged this branch into develop first.

XVs32 commented 10 months ago

The problem become: How do I know if a gimmick is needed to be solve...?

Just do it after a certain stage is clear, leave a txt to record if the gimmick in cleared this month.

When a gimmick is cleared, the port/api_event_object/api_m_flag2 will be 1=ギミック解除SE再生

Clearly this method cannot detect multi gimmicks solved at the same time..... It is ok for 7-5, but what about events?

XVs32 commented 10 months ago

Will have to define a format for gimmick record JSON will be fine

It will need:

  1. The map id
  2. The gimmick id
  3. The month gimmick is solved

example: "7-5" : {"timestamp"=<second passed from 1970>, "gimmick_level"=< how many gimmick solved >}

XVs32 commented 9 months ago

Except the gimmick handling, the combat logic redo looks good, until I can reproduce the gimmick api(next month), this branch will be merge into develop once (https://github.com/XVs32/kcauto_custom/pull/74).

Current issue:

  1. kcauto does not seems to be able to catch the port/api_event_object/api_m_flag2 api (when KC3 does get it), I will have to wait for next month to try again
  2. port/api_event_object/api_m_flag2 does not tell which gimmick is sloved, when this api is catched, kcauto will have to check what map kcauto headed to