Giter VIP home page Giter VIP logo

poi-server's Introduction

poi-server

service status service version

poi server.

Usage

See the wiki.

Development

Prerequists:

  • Node.js 14.x
  • MongoDB v4.2

Other versions are not tested

Setup

  • Install dependencies with npm install
  • copy .env.example to create .env, this contains config file for the server
  • start mongodb, if the db path or port is different, specify them in the .env file
  • start the server by node index.js

poi-server's People

Contributors

dkwingsmt avatar gakada avatar hanzhao avatar kagamichan avatar kochiyaocean avatar magicae avatar natlee avatar sairoutine avatar yukixz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

poi-server's Issues

Suggestion: record own fleet if there is item drop?

For mini-events like the current one, if itemId > 0 in DropShipRecord, add (otherwise optional) ship ids of the own fleet, as well as their equipment ids. Can be used to verify ship and equipment type bonuses for item drop rates.

[RFC] equipment bonus collection

There is a collection for figuring out ship evasion/ASW/LoS stats based on different level values. Similarly, when a ship is equipped with some equipment resulting stats is stats without equipment + equipment stats (visible in api_start2) + unknown bonuses depending on ship and equipment. So a new collection can be used to record ship stats and used equipment on equipment changes to automatically figure out those bonuses.

Available in client code anyway.

Proposal for construct_ship record expansion

根据NGA的这篇文章:
https://bbs.nga.cn/read.php?tid=10007992

建造结果会与剩余建造渠数量相关

以后的可否记录一个新的参数,记录剩余建造渠数量(0~3)?

原文引用:
_“
举例而言:BB池中,ID1为大和,ID2为大和/Bismarck,ID3为武藏/Bismarck,ID4为武藏,ID5为长门/Bismarck
第二步中,剩余0/1/2/3和建造渠时,x随机到1-5的概率分别为3.1%,5%,5.2%,5.4%
第三步中,我们姑且假定得到的随机数z为4
那么在第四步中,就等于将x=1的概率映射到ID5,x=2映射到ID4,...,x=5映射到ID1,x=6映射到ID2,...,x=9映射到ID5,中奖概率提高到了7.1%/9%/9.4%/9.8%

另外由于在高ID段并没有中奖情况(最大中奖ID为空母池54的大凤),概率左移几乎不会减少中奖ID总数,所以可以几乎肯定提高第三步的到的z值只会提高抽到奖的概率。

综合以上,以及主楼分析,可以有以下结论
1.大建首先要满足投入资源满足进入建造池的条件
2.一般情况下剩余建造渠越多,中奖概率越高,这一点不是玄学。相对而言1渠到3渠差异不是太大,0渠和1渠差异相对较显著。
2.1 此条有少数反例,主要是对低保池,低保池ID1和ID2都是矢矧,而低保环境下z恒等于0,故剩余0渠反而能屏蔽掉ID1和ID2的矢矧,略微提高出油概率(15%->15.3%,低保池中一共15个ID是油)
3.在满足1的前提下,投入更多的资源和建造材有利于提高中奖概率

https://bbs.nga.cn/read.php?&tid=10007992”_

[RFC] cell info collection

objectives for adding cell info collection

  • collect information for drawing maps, including cell event and possible route selections (in case of manual selection)
  • collect subtitles of certain event map cells

possible inclusion:

  • air base raid info

This collection WILL NOT include:

  • possible routes, it is better placed in a whole sortie collection

Failed dump

Hello again,

It appears that there was an error during the database dump at 10:59 PM JST yesterday. The dropshiprecords.bson collection was not included in the dump, and has not been updated since that time. Looks like the database dump schedule has stalled as a result.

Kind regards,
Acrone

Incorrect drop-ship reporting from AdmiralRoom

Hello there,

The AdmiralRoom viewer appears to be incorrectly reporting ship-drop data.

Quick summary

Issues observed:

  • enemyShips array has 7 objects instead of 6. [SCREENSHOT1]/[SCREENSHOT2]
  • enemyFormation is not being correctly detected, left as empty string.
  • shipId not provided at all on some reports.

Details

I have been keeping an eye on the 6-5 ship drops and fleet formations encountered on each node. When I did a check tonight I had noticed reports for the boss node (6-5M mapId 65 cellId 13). It was strange to see 'enemyShips' reporting 7 ships instead of the usual 6. I am not aware of any viewers updated to deal with the new abyssal combined fleet mechanic so this appears to be incorrect [SCREENSHOT].

I've checked the origin and all the abnormal enemyShip reports appear to be coming from AdmiralRoom. I found evidence that it is this viewer as it uses the same origin string (HERE).

I've checked all reports from 'AdmiralRoom Reporter v1.0' and found the same enemyShips abnormality for every report [SCREENSHOT].

Reading through your Wiki where you describe how to formulate the JSON payload, for 'enemyShips' you say 'api_ship_ke.slice(1, 7), 0 is always -1 therefore useless'. I suspect they aren't stripping the first ship.

Aside from the the extra -1 value, the enemyShips array appears to be correct however, as you can see in the two screenshots posted above, enemyFormation is not correctly being obtained. It is left empty on submission (I substitute empty strings with '-1'). Also, on some entries there is no shipId provided at all. This can be observed at ObjectIds '57efbdb205d2b8bf6cc9e246', '57efbe4905d2b8bf6cc9e8cc', '57efbed305d2b8bf6cc9eec2' and many more.

I may be totally incorrect, and I apologise if I am, but I am just submitting my findings to you.

Kind regards,
Acrone

remodelitemrecords

Hello there,

Not long ago the database dumps were altered from the single compressed file to separate archives for each collection.

The available archives after the change were listed as:

  • dropshiprecords.gz
  • createshiprecords.gz
  • createitemrecords.gz
  • selectrankrecords.gz
  • passeventrecords.gz
  • quests.gz

What I was wondering was back before the database dump change, the dumps used to have a remodelitemrecords collection for item remodelling reports. Is this not available anymore?

Kind regards

接受自定义的"origin"域,以及CORS支持

正在实现 KC3改 的统计数据发送支持,由于这是个chrome插件,无法自定义UA
故希望能支持自定义 origin 域: 服务端接收数据的时候若这个域已经存在便不再以UA覆盖. 不知是否可行?

此外是否能加一下服务器对CORS的支持? 如链接,最简单的方法就是在response header里设置

Access-Control-Allow-Origin: *

谢谢~

How can I import dumped data with mongostore

I downloaded data createitemrecords.gz, unzipped it to dir /root/data, and tried to use command mongorestore -h localhost -d createitemrecords /root/data to import it. But it returned result like this

2018-10-27T03:58:22.094+0800 I NETWORK [listener] connection accepted from 127.0.0.1:37482 #3 (1 connection now open)
2018-10-27T03:58:22.095+0800 the --db and --collection args should only be used when restoring from a BSON file. Other uses are deprecated and will not exist in the future; use --nsInclude instead
2018-10-27T03:58:22.095+0800 building a list of collections to restore from /root/data dir
2018-10-27T03:58:22.095+0800 don't know what to do with file "/root/data/createitemrecords", skipping...
2018-10-27T03:58:22.096+0800 done

How can I read this data correctly?

Dump File Formats

Hello there. I have a question regarding format of dump files I get from the server. I wanted to analyse drop rates when owning duplication but it is not obvious to me how should I open those files (dropshiprecords in particular) at all. Can someone enlighten me on this? Many thanks.

EDIT: I have figured it all out. Instead of bson, the dump is simply a binary version of json.

Support conditional drops?

That is, drops (or their rates) that depend on conditions, such as if player already has a ship (or how many) or if player already dropped a ship from a node.

For example

  • api_member_id / _teitokuId can be added to DropShipRecord, similarly to SelectRankRecord and PassEventRecord. That can be used to check if it is possible to drop multiple instances of a ship from a node.
  • For a ship X drop, send how many instances of X player currently has. That can be used to reject "X doesn't drop if player already has X". Some problems here:
    • Remodels of X.
    • Generally, the whole ship list state should be submitted with each drop (how it is implemented here), which I'm not suggesting, just as a note.

Proposal for drop_ship record expansion

According to the current specifications, you can see how many ships you drop, but you don't know the probability.
So I suggest that you can get all the ship daughter possession like TsunDB.

Example:
counts:{ shipID: count, ... }

counts:{"1":1,"2":1,"6":1,"7":1,"9":1,"10":1,"12":1,"13":1,"15":1,"16":1,"17":1,"18":1,"20":1,"21":1,"22":1,"23":1,"24":1,"25":1,"26":1,"27":1,"28":1,"29":1,"30":1,"31":1,"32":1,"33":1,"34":1,"35":1,"36":1,"37":1,"38":1,"39":1,"40":1,"41":1,"42":1,"43":1,"44":2,"45":1,"46":1,"47":1,"48":1,"49":1,"50":1,"51":1,"52":1,"53":1,"54":1,"55":1,"56":1,"59":1,"60":1,"61":1,"62":1,"63":1,"64":1,"65":1,"66":1,"67":1,"68":1,"69":1,"70":1,"71":1,"72":1,"74":1,"75":1,"76":1,"77":1,"78":1,"79":1,"80":1,"81":1,"83":1,"84":1,"85":1,"86":1,"87":1,"89":1,"90":1,"91":1,"92":1,"93":1,"95":1,"96":1,"97":1,"98":1,"99":1,"100":1,"101":1,"102":1,"103":3,"110":1,"111":1,"113":1,"114":1,"115":1,"116":1,"120":1,"122":1,"123":1,"124":1,"125":1,"126":1,"127":1,"128":1,"131":1,"132":1,"133":1,"134":1,"135":1,"137":1,"138":1,"139":1,"140":1,"143":1,"153":1,"154":1,"155":1,"161":1,"162":1,"164":1,"165":1,"167":1,"168":1,"169":1,"170":1,"171":1,"174":1,"175":1,"176":1,"181":1,"182":1,"183":1,"184":1,"186":1,"190":1,"191":1,"331":1,"404":1,"405":1,"409":1,"410":1,"413":1,"414":1,"415":1,"421":1,"422":1,"423":1,"424":1,"425":1,"431":1,"432":1,"433":1,"439":1,"440":1,"441":1,"442":1,"443":1,"444":1,"445":1,"448":1,"449":1,"451":2,"452":1,"453":1,"454":1,"455":1,"457":1,"458":1,"459":1,"460":1,"465":1,"471":1,"473":1,"474":1,"475":1,"479":1,"481":1,"484":1,"485":1,"491":1,"492":1,"493":1,"495":1,"511":1,"515":1,"519":1,"520":1,"521":1,"527":1,"528":1,"531":1,"532":1,"534":1,"535":1,"544":1,"549":1,"561":1,"562":1,"571":1,"574":1,"575":1,"581":1,"583":1,"589":1,"590":1,"596":1,"601":1,"613":1,"621":1,"625":1}

统计明石改修成功率

数据:
装备 api_slotitem_id, api_level
明石 api_ship_id, api_lv, api_cond
僚舰 api_ship_id, api_lv, api_cond

previous dumps

Hello there!

It has been a while since I have last bothered you :p

I was just wondering if by any chance you had historical or previous dumps for dropshiprecords, createshiprecords, and createitemrecords that would be available.

I was looking to collate as much poidb data from those three dbs as I could to pull some statistics with the largest sample sizes available. I only have random dumps saved from over the past 1.5 years I have been interacting with podb dumps so I was hoping that there were historical dumps available. It would be a shame if all that data was lost each time the dbs get reset.

Kind regards

Request to use data

Hello poi-server team,

I am writing to you today to make a formal request to use of the data provided via your current poidb dumps.

Over the past few weeks I have been working on a small KanColle site that provides statistics to the english community. While the kcwiki drop page is a fantastic resource, the language barrier is a problem for some so I decided to take up this project.

A few weeks ago I made a request with the poi-statistics team to use some of their data, which was given, however I was later informed of your data dumps and have been wanting to use them directly instead of scraping straight from the kcwiki front end.

For the past few weeks I have been downloading the database dump every few days and making use of the statistics as a result. This was a great help for us english players when Uranami was released as I was able to give them drop results before the kcwiki drop page had updated to display them.

I wanted to ask you directly if it is okay for me to continue to use the data you collect so that I can utilize it and offer statistics for the english community.

If you are interested, you are able to see what I have done so far with my site here. It is still in its early stages, but I am hoping to one day provide to the english community what the kcwiki does for the non-english community.

Kind regards,
Acrone

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.