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

Report 基地防空戦 compositions? #11

Open
gakada opened this issue Dec 6, 2017 · 11 comments
Open

Report 基地防空戦 compositions? #11

gakada opened this issue Dec 6, 2017 · 11 comments
Labels

Comments

@gakada
Copy link
Contributor

gakada commented Dec 6, 2017

That is, api_destruction_battle from api_req_map/next. Something like this after

this.drop = drop

if (body.api_destruction_battle != null) {
  this.report('/api/report/v2/drop_ship', {
    // undefined quest, enemy, rank
    shipId: -1,
    itemId: -1,
    mapId: drop.mapId,
    cellId: -drop.cellId, // using -drop.cellId instead of drop.cellId to indicate that it's from api_destruction_battle, alternatively, can be an extra flag
    isBoss: drop.isBoss,
    teitokuLv: _teitokuLv,
    mapLv: drop.mapLv,
    enemyShips1: body.api_ship_ke,
    enemyShips2: body.api_ship_ke_combined, // just in case, normally undefined
    enemyFormation: body.api_formation[1]
  })
}

Also, should it be

enemyShips1: null,
enemyShips2: null,

instead of

enemyShips: null,

@KagamiChan
Copy link
Member

KagamiChan commented Dec 6, 2017

Land base raid happens randomly and does not let any ship drop, it is better to record in another collection

On enemyShips you're right, but it does not affect data collecting because we changed the model
https://github.com/poooi/poi-server/blob/master/models/report/drop-ship.es#L14

@KagamiChan
Copy link
Member

Anyway the enemyShips1 and enemyShips2 initialization will be added

But what could air raid data collection serve for?

@gakada
Copy link
Contributor Author

gakada commented Dec 6, 2017

IIRC 長距離空襲戦 (ld_airbattle) also don't drop ships? So it's for enemy patterns only in this case. Like

@KagamiChan
Copy link
Member

Using the same data collection will result in double drop reports in a single battle on certain cells and the drop rate on these cells will never be accurate

@gakada
Copy link
Contributor Author

gakada commented Dec 6, 2017

Yeah, if it's not filtered by an extra flag I mentioned, OR, if without changing the schema, can set cellId to a special value, like -1 or -cellId (that is, negative cellId), for the "AB node".
u

@gakada
Copy link
Contributor Author

gakada commented Mar 21, 2018

@KagamiChan would it be ok for another viewer to implement this? I.e., to report api_destruction_battle enemy compositions in drop_ship collection with a special negative cellId value. I think poi server won't filter those reports, so they will end up in the dump, available for wikis/etc.

@KagamiChan
Copy link
Member

I still prefer creating a separate data collection for this, anyway staff at kcwiki should be informed and involved @Gizeta

@Gizeta
Copy link

Gizeta commented Mar 24, 2018

I don't think it's a good idea to save land base air raid compositions in the DropShipRecord database table, although it doesn't affect the drop statistics. However, you can just post those negative cellId values but filter them on poi-server to save in a new table, such as

record = data.cellId < 0 ? new NewTableForLandBaseAirRaid(data) : new DropShipRecord(data)
record.save()

But, I think it's tricky. Why not create some new API on poi-server for the land base air raid?

@gakada
Copy link
Contributor Author

gakada commented Mar 28, 2018

Well, my argument was that there is already non-drop and composition-only data from corresponding (game) endpoints in DropShipRecord, so this is just another one of those endpoints. Then, it is probably easier to utilize existing code in drop-ship.es, the change is simple if it is the same table, so I made #13.

If it must be a different table, then yeah, extra class/schema/endpoint here and in poi-server (+ available dump, like dropshiprecords.gz).

@KagamiChan
Copy link
Member

KagamiChan commented Apr 17, 2018

poi-server also accepts pull requests for creating new schema and endpoints, you may consider add a new report type, say, BaseAirRaidRecord, for both plugin-report and poi-server

and I'll add the dumping once the data set is available

P.S. Here's some instructions on how to locally test reporter and poi server: https://github.com/poooi/plugin-report/wiki

@gakada
Copy link
Contributor Author

gakada commented Sep 8, 2018

Looking at https://github.com/andanteyk/ElectronicObserver/blob/develop/ElectronicObserver/Other/Information/apilist.txt#L1517 there is more things in api_req_map/next that are kinda required for full info, for example

  • node types, api_color_no/api_event_id/api_event_kind, currently only api_event_id is used for isBoss
  • node events: api_itemget, api_happening
  • various node rewards
  • routing, that is current fleet (ships, stats, equipment) and route taken
  • and then api_destruction_battle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants