phigros-save-manager
TypeScript icon, indicating that this package has built-in type declarations

1.0.7 • Public • Published

phigros-save-manager

A simple libaray for modify Phigros cloud save data.

996.icu LICENSE npm


Features

  • Load binary format save files or cloud. Supported version:
    • user: 1 (Latest)
    • settings: 1 (Latest)
    • gameRecord: 1 (Latest)
    • gameKey: 2 (Latest)
    • gameProgress: 3 (Latest)
  • Easly modify save from code.
  • (Re)Create binary save files from code.
  • Download save from cloud.
  • Upload modified save to cloud.
  • Convient shortcuts
    • re8
      • re8: Reset the chapter 8
      • parcialRe8: Reset half of the chapter 8
      • rere8: Unlock all songs in the chapter 8

CLI Usage

phigros-save-manager provides a useful CLI to easily reset chapter 8, backup your cloud save, and other utilities.

You can use the following command to get detialed subcommand explaination.

phigrous-save-manager

Future plans

  • [x] Add support for calculating B19.
  • [ ] Add tests.
  • [x] Migrate old code.

Examples

// Example: re8 (aka clear unlocks in chapter 8)

import { PhigrosSaveManager } from 'phigros-save-manager'

const saveManager = await PhigrosSaveManager.loadCloudSave("<Your Session Token>")
await saveManager.re8().uploadSave()
// Example: Edit in-game currency (money):

import { PhigrosSaveManager } from 'phigros-save-manager'

const saveManager = await PhigrosSaveManager.loadCloudSave("<Your Session Token>")

saveManager.gameProgress.money[0] = 99
saveManager.gameProgress.money[1] = 99
saveManager.gameProgress.money[2] = 99
saveManager.gameProgress.money[3] = 99
saveManager.gameProgress.money[4] = 99

await saveManager.uploadSave()
// Exmaple: Edit 'gameProgress' from binary

import { PhigrosSaveManager, PlayerGameProgress } from "."
import fs from 'fs'

const binary = new PlayerGameProgress(PhigrosSaveManager.decrypt(fs.readFileSync("/path/to/gameProgress")));
binary.money[0] = 99

// You'll need a type because the version number is inserted at here
fs.writeFileSync("/path/to/gameProgress", PhigrosSaveManager.encrypt(binary.save(), 'gameProgress'))

Readme

Keywords

none

Package Sidebar

Install

npm i phigros-save-manager

Weekly Downloads

1

Version

1.0.7

License

Anti-996

Unpacked Size

812 kB

Total Files

31

Last publish

Collaborators

  • qumolama