@d2runewizard/d2s 2.0.44 → 2.0.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +4 -56
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,59 +1,7 @@
1
- ### d2s
1
+ # d2s - D2R Hero Editor fork
2
2
 
3
- ![](https://github.com/dschu012/d2s/workflows/.github/workflows/release.yml/badge.svg)
3
+ A maintained fork of [`@dschu012/d2s`](https://www.npmjs.com/package/@dschu012/d2s/v/2.0.35) focused on **Diablo II Resurrected** save files, used by and battle-tested in the **[D2RuneWizard](https://www.d2runewizard.com/)** ecosystem and its **[Hero Editor for Diablo II Resurrected](https://www.d2runewizard.com/hero-editor)**.
4
4
 
5
- The goal of this project is to create an es6 compliant reader/writer of Diablo II save files. Additionally, the library should be able to consume files generated by nokka's Go implementation [d2s](https://github.com/nokka/d2s), therefore the output of reading a save will closely mirror the Go's output.
6
-
7
- ##### Examples
8
- * [Viewer](https://dschu012.github.io/d2s/) [[Source](docs/index.html)]
9
- * [Editor](https://d2s.dschu012.dev/) [[Source](https://github.com/dschu012/d2s-editor)]
10
-
11
- Using [d2s-ui](https://github.com/dschu012/d2s-ui) for a frontend:
12
- * https://diablo.dannyschumacher.com/#/
13
- * https://resurgence.dannyschumacher.com/#/
14
-
15
- ##### API/General Usage
16
-
17
- ```typescript
18
- /**
19
- * @see constants.bundle.min.js for an already parsed version of 1.13c data
20
- * @param buffers: object of ALL txt files. example: {
21
- * "ItemStatCost.txt": "Stat\tIDt\Send...",
22
- * "string.txt": "WarrivAct1IntroGossip1\t45}Greetings,...",
23
- * ...
24
- * }
25
- * @return constants: constant data required for parsing built from the txt files.
26
- **/
27
- function readConstantData(buffers: any): types.IConstantData
28
-
29
- /**
30
- * @param buffer: Uint8Array representation of the file
31
- * @param constants: constant data used for reading the files. @see readConstantData or constants.bundle.min.js
32
- * @param userConfig: optional configuration. used for if there is a dll edit to allow larger stash sizes. example: {
33
- * extendedStash: true
34
- * }
35
- * @return d2s: the parsed save information
36
- **/
37
- function read(buffer: Uint8Array, constants: types.IConstantData, userConfig?: types.IConfig): Promise<types.ID2S>;
38
-
39
- /**
40
- * @param d2s: the parsed save information
41
- * @param constants: constant data used for reading the files. @see readConstantData or constants.bundle.min.js
42
- * @param userConfig: optional configuration. used for if there is a dll edit to allow larger stash sizes. example: {
43
- * extendedStash: true
44
- * }
45
- * @return buffer: Uint8Array representation of the file
46
- **/
47
- function write(data: types.ID2S, constants: types.IConstantData, userConfig?: types.IConfig): Promise<Uint8Array>;
48
- ```
49
-
50
- ##### Useful Links:
51
- * https://github.com/d07RiV/d07riv.github.io/blob/master/d2r.html (credits to d07riv for reversing the item code on D2R)
52
- * https://github.com/dschu012/D2SLib (c# version of this library)
53
- * https://github.com/nokka/d2s (go d2s parser)
54
- * https://github.com/krisives/d2s-format
55
- * http://paul.siramy.free.fr/d2ref/eng/
56
- * http://user.xmission.com/~trevin/DiabloIIv1.09_File_Format.shtml
57
- * https://github.com/nickshanks/Alkor
58
- * https://github.com/HarpyWar/d2s-character-editor
5
+ This fork keeps the familiar parsing and encoding APIs, while fixing edge cases seen in real D2R saves and adding small helpers that make item and character editing safer.
59
6
 
7
+ > Big thanks to the original project `@dschu012/d2s` for the foundation. This repo tracks upstream where possible and documents any D2R-specific deviations below.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@d2runewizard/d2s",
3
- "version": "2.0.44",
3
+ "version": "2.0.45",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",