Skip to content

Using KanColle's main.js in Node.js

Notifications You must be signed in to change notification settings

scp148/kancolle-main

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@kancolle/main

Using KanColle's main.js in Node.js.

npm package

Install

yarn add @kancolle/main

Usage

See src/test.js for some working examples. See dist/api for more functions.

Build

To build files in dist:

# tested with node v20, e.g.
nvm install 20
nvm use 20
# disable ignore-scripts for the following command (to build canvas)
yarn
# this will build dist/main.js, using js-beautify, as it generates shorter file than prettier
yarn build
# this will try loading dist/main.js and running src/test.js on it
yarn test

dist/main.js is the final patched file.

Todo

  • After main.init() a request to version.json will be performed with axios, that won't work due to browser security related issues, more browser simulation is required. Similarly, many functions won't work without api_start2 response. For example, main.ShipLoader.getPath need versions from api_start2.
  • It is better to mock all the things rather than pulling heavy dependencies (like canvas).

About

Using KanColle's main.js in Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.6%
  • Shell 6.4%