Skip to content

Commit

Permalink
Merge pull request #1 from araguma/latest
Browse files Browse the repository at this point in the history
Latest
  • Loading branch information
araguma authored Aug 1, 2023
2 parents 9c13260 + 9cc949a commit c78d8ca
Show file tree
Hide file tree
Showing 8 changed files with 341 additions and 70 deletions.
209 changes: 193 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Holocure Save Editor is a save editor for the fan game [HoloCure](https://kay-yu

It comes with a `HoloEdit` class that has chainable methods for quick and easy editing as well as a `data` property for more customized editing.

## Use Cases
## Example Use Cases

- You lost your save file like me and don't want to grind the game again
- You want a fast way to switch between different game configurations
Expand All @@ -19,7 +19,13 @@ npm i holocure-save-editor
## Quick Start

```typescript
import HoloEdit from 'holocure-save-editor';
import HoloEdit, {
// Import lists of all possible data ids
achievements,
collabs,
generations,
// ...
} from 'holocure-save-editor';

// Create an editor from a save file
const edit = new HoloEdit('path/to/save_n.dat');
Expand All @@ -36,34 +42,205 @@ edit.data.mobUp = 10;
edit.data.ATK = 1;

// Save the edited save file
// Note: It is recommended that you either run console.log(edit.data) to verify the changes
// or save the edited save file to a different file
edit.save('path/to/output/save_n.dat'); // You can use edit.save() to overwrite the original save file
// Note: It is recommended that you run console.log(edit.data) to verify the
// changes before saving or save the edited save file to another location
edit.save('path/to/output/save_n.dat'); // Or omit path to overwrite
```

## Documentation

### coin(amount)
The `HoloEdit` class provides methods for modifying a HoloCure save file.

### achievement(achievementId, unlocked)
### Constructor

### tear(generationId, amount)
```typescript
constructor(savePath: string)
```

Creates a new `HoloEdit` instance with the specified save file path.

#### Parameters

- `savePath`: The path to the HoloCure save file.

### Method: achievement

```typescript
achievement(achievement: save.Achievement | 'all', unlocked: boolean | 0 | 1): this
```

Sets the unlocked status of an achievement or all achievements.

#### Parameters

- `achievement`: The achievement to modify, or `'all'` to modify all achievements.
- `unlocked`: The new unlocked status of the achievement(s).

#### Returns

The `HoloEdit` instance.

### Method: coin

```typescript
coin(amount: number): this
```

Sets the number of HoloCoins.

#### Parameters

- `amount`: The new number of HoloCoins.

#### Returns

The `HoloEdit` instance.

### gRank(characterId, rank)
### Method: tear

### outfit(outfitId, unlocked)
```typescript
tear(generation: save.Generation | 'all', amount: number): this
```

Sets the number of tears for a generation or all generations.

#### Parameters

- `generation`: The generation to modify, or `'all'` to modify all generations.
- `amount`: The new number of tears.

#### Returns

The `HoloEdit` instance.

### Method: gRank

```typescript
gRank(character: save.Character | 'all', rank: number): this
```

Sets the rank of a character or all characters.

### stage(stageId, unlocked)
#### Parameters

### item(itemId, unlocked)
- `character`: The character to modify, or `'all'` to modify all characters.
- `rank`: The new rank of the character(s).

### weapon(weaponId, unlocked)
#### Returns

### collab(collabId, unlocked)
The `HoloEdit` instance.

### save([savePath])
### Method: outfit

```typescript
outfit(outfit: save.Outfit | 'all', unlocked: boolean): this
```

Sets the unlocked status of an outfit or all outfits.

#### Parameters

- `outfit`: The outfit to modify, or `'all'` to modify all outfits.
- `unlocked`: The new unlocked status of the outfit(s).

#### Returns

The `HoloEdit` instance.

### Method: stage

```typescript
stage(stage: save.Stage | 'all', unlocked: boolean): this
```

Sets the unlocked status of a stage or all stages.

#### Parameters

- `stage`: The stage to modify, or `'all'` to modify all stages.
- `unlocked`: The new unlocked status of the stage(s).

#### Returns

The `HoloEdit` instance.

### Method: item

```typescript
item(item: save.Item | 'all', unlocked: boolean): this
```

Sets the unlocked status of an item or all items.

#### Parameters

- `item`: The item to modify, or `'all'` to modify all items.
- `unlocked`: The new unlocked status of the item(s).

#### Returns

The `HoloEdit` instance.

### Method: weapon

```typescript
weapon(weapon: save.Weapon | 'all', unlocked: boolean): this
```

Sets the unlocked status of a weapon or all weapons.

#### Parameters

- `weapon`: The weapon to modify, or `'all'` to modify all weapons.
- `unlocked`: The new unlocked status of the weapon(s).

#### Returns

The `HoloEdit` instance.

### Method: collab

```typescript
collab(collab: save.Collab | 'all', unlocked: boolean): this
```

Sets the seen status of a collab or all collabs.

#### Parameters

- `collab`: The collab to modify, or `'all'` to modify all collabs.
- `unlocked`: The new seen status of the collab(s).

#### Returns

The `HoloEdit` instance.

### Method: save

```typescript
save(savePath?: string): this
```

Saves the modified data to a file.

#### Parameters

- `savePath`: The path to save the file. If not specified, the original save file will be overwritten.

#### Returns

The `HoloEdit` instance.

## Roadmap

- Support for the upcoming 0.6 version
- More commonly used edit methods
- More commonly used edit methods

## Contribute

```bash
git clone https://github.com/araguma/holocure-save-editor.git
cd holocure-save-editor/
npm i
npm run build
```
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,35 @@
"name": "holocure-save-editor",
"version": "1.0.0",
"description": "Save editor for the fan game HoloCure",
"main": "dist/index.js",
"scripts": {
"build": "npx tsc",
"test": "mocha --require ts-node/register test/**/*spec.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/araguma/holocure-save-editor.git"
},
"keywords": [
"holocure",
"save",
"editor"
],
"author": "araguma",
"license": "MIT",
"bugs": {
"url": "https://github.com/araguma/holocure-save-editor/issues"
"main": "dist/index.js",
"files": [
"dist/",
"README.md"
],
"scripts": {
"build": "npx tsc",
"test": "mocha --require ts-node/register specs/**/*spec.ts"
},
"homepage": "https://github.com/araguma/holocure-save-editor#readme",
"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.5",
"mocha": "^10.2.0",
"ts-node": "^10.9.1",
"typescript": "^5.1.6"
},
"files": [
"dist/",
"README.md"
]
"repository": {
"type": "git",
"url": "git+https://github.com/araguma/holocure-save-editor.git"
},
"bugs": {
"url": "https://github.com/araguma/holocure-save-editor/issues"
},
"homepage": "https://github.com/araguma/holocure-save-editor#readme"
}
Loading

0 comments on commit c78d8ca

Please sign in to comment.