charinfo-ex 0.0.1
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.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +20 -0
- package/charinfo-ex-0.0.1.tgz +0 -0
- package/lib/CharInfoEx.d.ts +125 -0
- package/lib/CharInfoEx.js +298 -0
- package/lib/CharInfoOffset.d.ts +120 -0
- package/lib/CharInfoOffset.js +134 -0
- package/lib/Helpers.d.ts +1 -0
- package/lib/Helpers.js +16 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +9 -0
- package/other/CharInfoEx.hexpat +140 -0
- package/package.json +28 -0
- package/src/CharInfoEx.ts +310 -0
- package/src/CharInfoOffset.ts +132 -0
- package/src/Helpers.ts +17 -0
- package/src/index.ts +3 -0
- package/tsconfig.json +18 -0
package/CHANGELOG.md
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 McSpazzy
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# charinfo-ex
|
|
2
|
+
|
|
3
|
+
** Parses TL:LTD CharInfoEx data **
|
|
4
|
+
|
|
5
|
+
## Example
|
|
6
|
+
|
|
7
|
+
### Read
|
|
8
|
+
|
|
9
|
+
From Save File
|
|
10
|
+
```js
|
|
11
|
+
import fs from 'fs';
|
|
12
|
+
import { CharInfoEx } from '../src/index';
|
|
13
|
+
|
|
14
|
+
var data = fs.readFileSync('./test/mii.sav');
|
|
15
|
+
var act = CharInfoEx.FromSaveFileArrayBuffer(data.buffer, 1);
|
|
16
|
+
console.log(act.toJson());
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Special thanks to arian who gave me the hexpat to start off with.
|
|
Binary file
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export declare class CharInfoEx {
|
|
2
|
+
constructor();
|
|
3
|
+
private static bytesToUuidV4;
|
|
4
|
+
static FromSaveFileArrayBuffer(saveBuffer: ArrayBufferLike): CharInfoEx[];
|
|
5
|
+
static FromSaveFileArrayBuffer(saveBuffer: ArrayBufferLike, index: number): CharInfoEx;
|
|
6
|
+
static FromSaveFileArrayBuffer(saveBuffer: ArrayBufferLike, indexes: number[]): CharInfoEx[];
|
|
7
|
+
static FromArrayLike(arrayLike: Iterable<number>): CharInfoEx;
|
|
8
|
+
static FromArrayBuffer(buffer: ArrayBufferLike): CharInfoEx;
|
|
9
|
+
toJson(pretty?: boolean): string;
|
|
10
|
+
uuidv4: string;
|
|
11
|
+
name: string;
|
|
12
|
+
fontRegion: number;
|
|
13
|
+
gender: number;
|
|
14
|
+
height: number;
|
|
15
|
+
build: number;
|
|
16
|
+
regionMove: number;
|
|
17
|
+
faceFlags: number;
|
|
18
|
+
facelineType: number;
|
|
19
|
+
facelineColor: number;
|
|
20
|
+
wrinkleLower: number;
|
|
21
|
+
wrinkleLowerScale: number;
|
|
22
|
+
wrinkleLowerAspect: number;
|
|
23
|
+
wrinkleLowerX: number;
|
|
24
|
+
wrinkleLowerY: number;
|
|
25
|
+
wrinkleUpper: number;
|
|
26
|
+
wrinkleUpperScale: number;
|
|
27
|
+
wrinkleUpperAspect: number;
|
|
28
|
+
wrinkleUpperX: number;
|
|
29
|
+
wrinkleUpperY: number;
|
|
30
|
+
makeup0: number;
|
|
31
|
+
makeup0Color: number;
|
|
32
|
+
makeup0Scale: number;
|
|
33
|
+
makeup0Aspect: number;
|
|
34
|
+
makeup0X: number;
|
|
35
|
+
makeup0Y: number;
|
|
36
|
+
makeup1: number;
|
|
37
|
+
makeup1Color: number;
|
|
38
|
+
makeup1Scale: number;
|
|
39
|
+
makeup1Aspect: number;
|
|
40
|
+
makeup1X: number;
|
|
41
|
+
makeup1Y: number;
|
|
42
|
+
hairType: number;
|
|
43
|
+
hairColor0: number;
|
|
44
|
+
hairColor1: number;
|
|
45
|
+
hairTypeFront: number;
|
|
46
|
+
hairTypeBack: number;
|
|
47
|
+
hairStyle: number;
|
|
48
|
+
earType: number;
|
|
49
|
+
earScale: number;
|
|
50
|
+
earY: number;
|
|
51
|
+
eyeType: number;
|
|
52
|
+
eyeColor: number;
|
|
53
|
+
eyeScale: number;
|
|
54
|
+
eyeAspect: number;
|
|
55
|
+
eyeRotate: number;
|
|
56
|
+
eyeX: number;
|
|
57
|
+
eyeY: number;
|
|
58
|
+
eyeShadowColor: number;
|
|
59
|
+
eyeHighlightType: number;
|
|
60
|
+
eyeHighlightScale: number;
|
|
61
|
+
eyeHighlightAspect: number;
|
|
62
|
+
eyeHighlightRotate: number;
|
|
63
|
+
eyeHighlightX: number;
|
|
64
|
+
eyeHighlightY: number;
|
|
65
|
+
eyelashUpperType: number;
|
|
66
|
+
eyelashUpperScale: number;
|
|
67
|
+
eyelashUpperAspect: number;
|
|
68
|
+
eyelashUpperRotate: number;
|
|
69
|
+
eyelashUpperX: number;
|
|
70
|
+
eyelashUpperY: number;
|
|
71
|
+
eyelashLowerType: number;
|
|
72
|
+
eyelashLowerScale: number;
|
|
73
|
+
eyelashLowerAspect: number;
|
|
74
|
+
eyelashLowerRotate: number;
|
|
75
|
+
eyelashLowerX: number;
|
|
76
|
+
eyelashLowerY: number;
|
|
77
|
+
eyeLidUpperType: number;
|
|
78
|
+
eyeLidUpperScale: number;
|
|
79
|
+
eyeLidUpperAspect: number;
|
|
80
|
+
eyeLidUpperRotate: number;
|
|
81
|
+
eyeLidUpperX: number;
|
|
82
|
+
eyeLidUpperY: number;
|
|
83
|
+
eyelidLowerType: number;
|
|
84
|
+
eyelidLowerScale: number;
|
|
85
|
+
eyelidLowerAspect: number;
|
|
86
|
+
eyelidLowerRotate: number;
|
|
87
|
+
eyelidLowerX: number;
|
|
88
|
+
eyelidLowerY: number;
|
|
89
|
+
eyebrowType: number;
|
|
90
|
+
eyebrowColor: number;
|
|
91
|
+
eyebrowScale: number;
|
|
92
|
+
eyebrowAspect: number;
|
|
93
|
+
eyebrowRotate: number;
|
|
94
|
+
eyebrowX: number;
|
|
95
|
+
eyebrowY: number;
|
|
96
|
+
noseType: number;
|
|
97
|
+
noseScale: number;
|
|
98
|
+
noseY: number;
|
|
99
|
+
mouthType: number;
|
|
100
|
+
mouthColor: number;
|
|
101
|
+
mouthScale: number;
|
|
102
|
+
mouthAspect: number;
|
|
103
|
+
mouthRotate: number;
|
|
104
|
+
mouthY: number;
|
|
105
|
+
beardType: number;
|
|
106
|
+
beardColor: number;
|
|
107
|
+
beardShortType: number;
|
|
108
|
+
beardShortColor: number;
|
|
109
|
+
mustacheType: number;
|
|
110
|
+
mustacheColor: number;
|
|
111
|
+
mustacheScale: number;
|
|
112
|
+
mustacheAspect: number;
|
|
113
|
+
mustacheY: number;
|
|
114
|
+
glassType1: number;
|
|
115
|
+
glassColor1: number;
|
|
116
|
+
glassScale: number;
|
|
117
|
+
glassAspect: number;
|
|
118
|
+
glassY: number;
|
|
119
|
+
glassType2: number;
|
|
120
|
+
glassColor2: number;
|
|
121
|
+
moleScale: number;
|
|
122
|
+
moleX: number;
|
|
123
|
+
moleY: number;
|
|
124
|
+
unkDefault45: number;
|
|
125
|
+
}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CharInfoEx = void 0;
|
|
4
|
+
const CharInfoOffset_1 = require("./CharInfoOffset");
|
|
5
|
+
const Helpers_1 = require("./Helpers");
|
|
6
|
+
class CharInfoEx {
|
|
7
|
+
constructor() { }
|
|
8
|
+
static bytesToUuidV4(bytes) {
|
|
9
|
+
const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
10
|
+
return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20, 32)}`;
|
|
11
|
+
}
|
|
12
|
+
static FromSaveFileArrayBuffer(saveBuffer, index = undefined) {
|
|
13
|
+
var infoExHash = 2283577978;
|
|
14
|
+
var data = new DataView(saveBuffer);
|
|
15
|
+
var dataOffset = data.getUint32(0x8, true);
|
|
16
|
+
var offset = 0x28;
|
|
17
|
+
var exPosition = 0;
|
|
18
|
+
while (offset < dataOffset) {
|
|
19
|
+
var hash = data.getUint32(offset, true);
|
|
20
|
+
offset += 4;
|
|
21
|
+
var currentOffset = data.getUint32(offset, true);
|
|
22
|
+
offset += 4;
|
|
23
|
+
if (hash === infoExHash) {
|
|
24
|
+
exPosition = currentOffset;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
var entryPositionCount = data.getUint32(exPosition, true);
|
|
28
|
+
exPosition += 4;
|
|
29
|
+
const charArray = [];
|
|
30
|
+
for (let index = 0; index < 2; index++) {
|
|
31
|
+
const len = data.getUint32(exPosition, true);
|
|
32
|
+
exPosition += 4;
|
|
33
|
+
const charInfo = CharInfoEx.FromArrayBuffer(saveBuffer.slice(exPosition, exPosition + len));
|
|
34
|
+
exPosition += len;
|
|
35
|
+
charArray.push(charInfo);
|
|
36
|
+
}
|
|
37
|
+
if (!index) {
|
|
38
|
+
return charArray;
|
|
39
|
+
}
|
|
40
|
+
if (Array.isArray(index)) {
|
|
41
|
+
return index.map((v) => charArray[v - 1]);
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return charArray[index - 1];
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
static FromArrayLike(arrayLike) {
|
|
48
|
+
var data = Uint8Array.from(arrayLike);
|
|
49
|
+
return CharInfoEx.FromArrayBuffer(data.buffer);
|
|
50
|
+
}
|
|
51
|
+
static FromArrayBuffer(buffer) {
|
|
52
|
+
const charItem = new CharInfoEx();
|
|
53
|
+
const dataView = new DataView(buffer);
|
|
54
|
+
const u8 = (offset) => dataView.getUint8(offset);
|
|
55
|
+
const u16 = (offset) => dataView.getUint16(offset, true);
|
|
56
|
+
const idBytes = new Uint8Array(buffer, CharInfoOffset_1.CharInfoOffset.createId1, 16);
|
|
57
|
+
charItem.uuidv4 = CharInfoEx.bytesToUuidV4(idBytes);
|
|
58
|
+
charItem.name = (0, Helpers_1.getStringUTF16NullTerminated)(dataView, CharInfoOffset_1.CharInfoOffset.name, 11);
|
|
59
|
+
charItem.fontRegion = u8(CharInfoOffset_1.CharInfoOffset.fontRegion);
|
|
60
|
+
charItem.gender = u8(CharInfoOffset_1.CharInfoOffset.gender);
|
|
61
|
+
charItem.height = u8(CharInfoOffset_1.CharInfoOffset.height);
|
|
62
|
+
charItem.build = u8(CharInfoOffset_1.CharInfoOffset.build);
|
|
63
|
+
charItem.regionMove = u8(CharInfoOffset_1.CharInfoOffset.regionMove);
|
|
64
|
+
charItem.faceFlags = u8(CharInfoOffset_1.CharInfoOffset.faceFlags);
|
|
65
|
+
charItem.facelineType = u8(CharInfoOffset_1.CharInfoOffset.facelineType);
|
|
66
|
+
charItem.facelineColor = u8(CharInfoOffset_1.CharInfoOffset.facelineColor);
|
|
67
|
+
charItem.wrinkleLower = u8(CharInfoOffset_1.CharInfoOffset.wrinkleLower);
|
|
68
|
+
charItem.wrinkleLowerScale = u8(CharInfoOffset_1.CharInfoOffset.wrinkleLowerScale);
|
|
69
|
+
charItem.wrinkleLowerAspect = u8(CharInfoOffset_1.CharInfoOffset.wrinkleLowerAspect);
|
|
70
|
+
charItem.wrinkleLowerX = u8(CharInfoOffset_1.CharInfoOffset.wrinkleLowerX);
|
|
71
|
+
charItem.wrinkleLowerY = u8(CharInfoOffset_1.CharInfoOffset.wrinkleLowerY);
|
|
72
|
+
charItem.wrinkleUpper = u8(CharInfoOffset_1.CharInfoOffset.wrinkleUpper);
|
|
73
|
+
charItem.wrinkleUpperScale = u8(CharInfoOffset_1.CharInfoOffset.wrinkleUpperScale);
|
|
74
|
+
charItem.wrinkleUpperAspect = u8(CharInfoOffset_1.CharInfoOffset.wrinkleUpperAspect);
|
|
75
|
+
charItem.wrinkleUpperX = u8(CharInfoOffset_1.CharInfoOffset.wrinkleUpperX);
|
|
76
|
+
charItem.wrinkleUpperY = u8(CharInfoOffset_1.CharInfoOffset.wrinkleUpperY);
|
|
77
|
+
charItem.makeup0 = u8(CharInfoOffset_1.CharInfoOffset.makeup0);
|
|
78
|
+
charItem.makeup0Color = u8(CharInfoOffset_1.CharInfoOffset.makeup0Color);
|
|
79
|
+
charItem.makeup0Scale = u8(CharInfoOffset_1.CharInfoOffset.makeup0Scale);
|
|
80
|
+
charItem.makeup0Aspect = u8(CharInfoOffset_1.CharInfoOffset.makeup0Aspect);
|
|
81
|
+
charItem.makeup0X = u8(CharInfoOffset_1.CharInfoOffset.makeup0X);
|
|
82
|
+
charItem.makeup0Y = u8(CharInfoOffset_1.CharInfoOffset.makeup0Y);
|
|
83
|
+
charItem.makeup1 = u8(CharInfoOffset_1.CharInfoOffset.makeup1);
|
|
84
|
+
charItem.makeup1Color = u8(CharInfoOffset_1.CharInfoOffset.makeup1Color);
|
|
85
|
+
charItem.makeup1Scale = u8(CharInfoOffset_1.CharInfoOffset.makeup1Scale);
|
|
86
|
+
charItem.makeup1Aspect = u8(CharInfoOffset_1.CharInfoOffset.makeup1Aspect);
|
|
87
|
+
charItem.makeup1X = u8(CharInfoOffset_1.CharInfoOffset.makeup1X);
|
|
88
|
+
charItem.makeup1Y = u8(CharInfoOffset_1.CharInfoOffset.makeup1Y);
|
|
89
|
+
charItem.hairType = u16(CharInfoOffset_1.CharInfoOffset.hairType);
|
|
90
|
+
charItem.hairColor0 = u8(CharInfoOffset_1.CharInfoOffset.hairColor0);
|
|
91
|
+
charItem.hairColor1 = u8(CharInfoOffset_1.CharInfoOffset.hairColor1);
|
|
92
|
+
charItem.hairTypeFront = u8(CharInfoOffset_1.CharInfoOffset.hairTypeFront);
|
|
93
|
+
charItem.hairTypeBack = u8(CharInfoOffset_1.CharInfoOffset.hairTypeBack);
|
|
94
|
+
charItem.hairStyle = u8(CharInfoOffset_1.CharInfoOffset.hairStyle);
|
|
95
|
+
charItem.earType = u8(CharInfoOffset_1.CharInfoOffset.earType);
|
|
96
|
+
charItem.earScale = u8(CharInfoOffset_1.CharInfoOffset.earScale);
|
|
97
|
+
charItem.earY = u8(CharInfoOffset_1.CharInfoOffset.earY);
|
|
98
|
+
charItem.eyeType = u8(CharInfoOffset_1.CharInfoOffset.eyeType);
|
|
99
|
+
charItem.eyeColor = u8(CharInfoOffset_1.CharInfoOffset.eyeColor);
|
|
100
|
+
charItem.eyeScale = u8(CharInfoOffset_1.CharInfoOffset.eyeScale);
|
|
101
|
+
charItem.eyeAspect = u8(CharInfoOffset_1.CharInfoOffset.eyeAspect);
|
|
102
|
+
charItem.eyeRotate = u8(CharInfoOffset_1.CharInfoOffset.eyeRotate);
|
|
103
|
+
charItem.eyeX = u8(CharInfoOffset_1.CharInfoOffset.eyeX);
|
|
104
|
+
charItem.eyeY = u8(CharInfoOffset_1.CharInfoOffset.eyeY);
|
|
105
|
+
charItem.eyeShadowColor = u8(CharInfoOffset_1.CharInfoOffset.eyeShadowColor);
|
|
106
|
+
charItem.eyeHighlightType = u8(CharInfoOffset_1.CharInfoOffset.eyeHighlightType);
|
|
107
|
+
charItem.eyeHighlightScale = u8(CharInfoOffset_1.CharInfoOffset.eyeHighlightScale);
|
|
108
|
+
charItem.eyeHighlightAspect = u8(CharInfoOffset_1.CharInfoOffset.eyeHighlightAspect);
|
|
109
|
+
charItem.eyeHighlightRotate = u8(CharInfoOffset_1.CharInfoOffset.eyeHighlightRotate);
|
|
110
|
+
charItem.eyeHighlightX = u8(CharInfoOffset_1.CharInfoOffset.eyeHighlightX);
|
|
111
|
+
charItem.eyeHighlightY = u8(CharInfoOffset_1.CharInfoOffset.eyeHighlightY);
|
|
112
|
+
charItem.eyelashUpperType = u8(CharInfoOffset_1.CharInfoOffset.eyelashUpperType);
|
|
113
|
+
charItem.eyelashUpperScale = u8(CharInfoOffset_1.CharInfoOffset.eyelashUpperScale);
|
|
114
|
+
charItem.eyelashUpperAspect = u8(CharInfoOffset_1.CharInfoOffset.eyelashUpperAspect);
|
|
115
|
+
charItem.eyelashUpperRotate = u8(CharInfoOffset_1.CharInfoOffset.eyelashUpperRotate);
|
|
116
|
+
charItem.eyelashUpperX = u8(CharInfoOffset_1.CharInfoOffset.eyelashUpperX);
|
|
117
|
+
charItem.eyelashUpperY = u8(CharInfoOffset_1.CharInfoOffset.eyelashUpperY);
|
|
118
|
+
charItem.eyelashLowerType = u8(CharInfoOffset_1.CharInfoOffset.eyelashLowerType);
|
|
119
|
+
charItem.eyelashLowerScale = u8(CharInfoOffset_1.CharInfoOffset.eyelashLowerScale);
|
|
120
|
+
charItem.eyelashLowerAspect = u8(CharInfoOffset_1.CharInfoOffset.eyelashLowerAspect);
|
|
121
|
+
charItem.eyelashLowerRotate = u8(CharInfoOffset_1.CharInfoOffset.eyelashLowerRotate);
|
|
122
|
+
charItem.eyelashLowerX = u8(CharInfoOffset_1.CharInfoOffset.eyelashLowerX);
|
|
123
|
+
charItem.eyelashLowerY = u8(CharInfoOffset_1.CharInfoOffset.eyelashLowerY);
|
|
124
|
+
charItem.eyeLidUpperType = u8(CharInfoOffset_1.CharInfoOffset.eyeLidUpperType);
|
|
125
|
+
charItem.eyeLidUpperScale = u8(CharInfoOffset_1.CharInfoOffset.eyeLidUpperScale);
|
|
126
|
+
charItem.eyeLidUpperAspect = u8(CharInfoOffset_1.CharInfoOffset.eyeLidUpperAspect);
|
|
127
|
+
charItem.eyeLidUpperRotate = u8(CharInfoOffset_1.CharInfoOffset.eyeLidUpperRotate);
|
|
128
|
+
charItem.eyeLidUpperX = u8(CharInfoOffset_1.CharInfoOffset.eyeLidUpperX);
|
|
129
|
+
charItem.eyeLidUpperY = u8(CharInfoOffset_1.CharInfoOffset.eyeLidUpperY);
|
|
130
|
+
charItem.eyelidLowerType = u8(CharInfoOffset_1.CharInfoOffset.eyelidLowerType);
|
|
131
|
+
charItem.eyelidLowerScale = u8(CharInfoOffset_1.CharInfoOffset.eyelidLowerScale);
|
|
132
|
+
charItem.eyelidLowerAspect = u8(CharInfoOffset_1.CharInfoOffset.eyelidLowerAspect);
|
|
133
|
+
charItem.eyelidLowerRotate = u8(CharInfoOffset_1.CharInfoOffset.eyelidLowerRotate);
|
|
134
|
+
charItem.eyelidLowerX = u8(CharInfoOffset_1.CharInfoOffset.eyelidLowerX);
|
|
135
|
+
charItem.eyelidLowerY = u8(CharInfoOffset_1.CharInfoOffset.eyelidLowerY);
|
|
136
|
+
charItem.eyebrowType = u8(CharInfoOffset_1.CharInfoOffset.eyebrowType);
|
|
137
|
+
charItem.eyebrowColor = u8(CharInfoOffset_1.CharInfoOffset.eyebrowColor);
|
|
138
|
+
charItem.eyebrowScale = u8(CharInfoOffset_1.CharInfoOffset.eyebrowScale);
|
|
139
|
+
charItem.eyebrowAspect = u8(CharInfoOffset_1.CharInfoOffset.eyebrowAspect);
|
|
140
|
+
charItem.eyebrowRotate = u8(CharInfoOffset_1.CharInfoOffset.eyebrowRotate);
|
|
141
|
+
charItem.eyebrowX = u8(CharInfoOffset_1.CharInfoOffset.eyebrowX);
|
|
142
|
+
charItem.eyebrowY = u8(CharInfoOffset_1.CharInfoOffset.eyebrowY);
|
|
143
|
+
charItem.noseType = u8(CharInfoOffset_1.CharInfoOffset.noseType);
|
|
144
|
+
charItem.noseScale = u8(CharInfoOffset_1.CharInfoOffset.noseScale);
|
|
145
|
+
charItem.noseY = u8(CharInfoOffset_1.CharInfoOffset.noseY);
|
|
146
|
+
charItem.mouthType = u8(CharInfoOffset_1.CharInfoOffset.mouthType);
|
|
147
|
+
charItem.mouthColor = u8(CharInfoOffset_1.CharInfoOffset.mouthColor);
|
|
148
|
+
charItem.mouthScale = u8(CharInfoOffset_1.CharInfoOffset.mouthScale);
|
|
149
|
+
charItem.mouthAspect = u8(CharInfoOffset_1.CharInfoOffset.mouthAspect);
|
|
150
|
+
charItem.mouthRotate = u8(CharInfoOffset_1.CharInfoOffset.mouthRotate);
|
|
151
|
+
charItem.mouthY = u8(CharInfoOffset_1.CharInfoOffset.mouthY);
|
|
152
|
+
charItem.beardType = u8(CharInfoOffset_1.CharInfoOffset.beardType);
|
|
153
|
+
charItem.beardColor = u8(CharInfoOffset_1.CharInfoOffset.beardColor);
|
|
154
|
+
charItem.beardShortType = u8(CharInfoOffset_1.CharInfoOffset.beardShortType);
|
|
155
|
+
charItem.beardShortColor = u8(CharInfoOffset_1.CharInfoOffset.beardShortColor);
|
|
156
|
+
charItem.mustacheType = u8(CharInfoOffset_1.CharInfoOffset.mustacheType);
|
|
157
|
+
charItem.mustacheColor = u8(CharInfoOffset_1.CharInfoOffset.mustacheColor);
|
|
158
|
+
charItem.mustacheScale = u8(CharInfoOffset_1.CharInfoOffset.mustacheScale);
|
|
159
|
+
charItem.mustacheAspect = u8(CharInfoOffset_1.CharInfoOffset.mustacheAspect);
|
|
160
|
+
charItem.mustacheY = u8(CharInfoOffset_1.CharInfoOffset.mustacheY);
|
|
161
|
+
charItem.glassType1 = u8(CharInfoOffset_1.CharInfoOffset.glassType1);
|
|
162
|
+
charItem.glassColor1 = u8(CharInfoOffset_1.CharInfoOffset.glassColor1);
|
|
163
|
+
charItem.glassScale = u8(CharInfoOffset_1.CharInfoOffset.glassScale);
|
|
164
|
+
charItem.glassAspect = u8(CharInfoOffset_1.CharInfoOffset.glassAspect);
|
|
165
|
+
charItem.glassY = u8(CharInfoOffset_1.CharInfoOffset.glassY);
|
|
166
|
+
charItem.glassType2 = u8(CharInfoOffset_1.CharInfoOffset.glassType2);
|
|
167
|
+
charItem.glassColor2 = u8(CharInfoOffset_1.CharInfoOffset.glassColor2);
|
|
168
|
+
charItem.moleScale = u8(CharInfoOffset_1.CharInfoOffset.moleScale);
|
|
169
|
+
charItem.moleX = u8(CharInfoOffset_1.CharInfoOffset.moleX);
|
|
170
|
+
charItem.moleY = u8(CharInfoOffset_1.CharInfoOffset.moleY);
|
|
171
|
+
charItem.unkDefault45 = u8(CharInfoOffset_1.CharInfoOffset.unkDefault45);
|
|
172
|
+
return charItem;
|
|
173
|
+
}
|
|
174
|
+
toJson(pretty = true) {
|
|
175
|
+
if (pretty) {
|
|
176
|
+
return JSON.stringify(this, null, 4);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
return JSON.stringify(this);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
uuidv4 = "";
|
|
183
|
+
name = ""; // utf16 - 11 char
|
|
184
|
+
fontRegion = 0;
|
|
185
|
+
gender = 0; // u8
|
|
186
|
+
height = 0; // u8
|
|
187
|
+
build = 0; // u8
|
|
188
|
+
regionMove = 0; // u8
|
|
189
|
+
faceFlags = 0; // u8
|
|
190
|
+
facelineType = 0; // u8
|
|
191
|
+
facelineColor = 0; // u8
|
|
192
|
+
wrinkleLower = 0; // u8
|
|
193
|
+
wrinkleLowerScale = 0; // u8
|
|
194
|
+
wrinkleLowerAspect = 0; // u8
|
|
195
|
+
wrinkleLowerX = 0; // u8
|
|
196
|
+
wrinkleLowerY = 0; // u8
|
|
197
|
+
wrinkleUpper = 0; // u8
|
|
198
|
+
wrinkleUpperScale = 0; // u8
|
|
199
|
+
wrinkleUpperAspect = 0; // u8
|
|
200
|
+
wrinkleUpperX = 0; // u8
|
|
201
|
+
wrinkleUpperY = 0; // u8
|
|
202
|
+
makeup0 = 0; // u8
|
|
203
|
+
makeup0Color = 0; // u8
|
|
204
|
+
makeup0Scale = 0; // u8
|
|
205
|
+
makeup0Aspect = 0; // u8
|
|
206
|
+
makeup0X = 0; // u8
|
|
207
|
+
makeup0Y = 0; // u8
|
|
208
|
+
makeup1 = 0; // u8
|
|
209
|
+
makeup1Color = 0; // u8
|
|
210
|
+
makeup1Scale = 0; // u8
|
|
211
|
+
makeup1Aspect = 0; // u8
|
|
212
|
+
makeup1X = 0; // u8
|
|
213
|
+
makeup1Y = 0; // u8
|
|
214
|
+
hairType = 0; // u16
|
|
215
|
+
hairColor0 = 0; // u8
|
|
216
|
+
hairColor1 = 0; // u8
|
|
217
|
+
hairTypeFront = 0; // u8
|
|
218
|
+
hairTypeBack = 0; // u8
|
|
219
|
+
hairStyle = 0; // u8
|
|
220
|
+
earType = 0; // u8
|
|
221
|
+
earScale = 0; // u8
|
|
222
|
+
earY = 0; // u8
|
|
223
|
+
eyeType = 0; // u8
|
|
224
|
+
eyeColor = 0; // u8
|
|
225
|
+
eyeScale = 0; // u8
|
|
226
|
+
eyeAspect = 0; // u8
|
|
227
|
+
eyeRotate = 0; // u8
|
|
228
|
+
eyeX = 0; // u8
|
|
229
|
+
eyeY = 0; // u8
|
|
230
|
+
eyeShadowColor = 0; // u8
|
|
231
|
+
eyeHighlightType = 0; // u8
|
|
232
|
+
eyeHighlightScale = 0; // u8
|
|
233
|
+
eyeHighlightAspect = 0; // u8
|
|
234
|
+
eyeHighlightRotate = 0; // u8
|
|
235
|
+
eyeHighlightX = 0; // u8
|
|
236
|
+
eyeHighlightY = 0; // u8
|
|
237
|
+
eyelashUpperType = 0; // u8
|
|
238
|
+
eyelashUpperScale = 0; // u8
|
|
239
|
+
eyelashUpperAspect = 0; // u8
|
|
240
|
+
eyelashUpperRotate = 0; // u8
|
|
241
|
+
eyelashUpperX = 0; // u8
|
|
242
|
+
eyelashUpperY = 0; // u8
|
|
243
|
+
eyelashLowerType = 0; // u8
|
|
244
|
+
eyelashLowerScale = 0; // u8
|
|
245
|
+
eyelashLowerAspect = 0; // u8
|
|
246
|
+
eyelashLowerRotate = 0; // u8
|
|
247
|
+
eyelashLowerX = 0; // u8
|
|
248
|
+
eyelashLowerY = 0; // u8
|
|
249
|
+
eyeLidUpperType = 0; // u8
|
|
250
|
+
eyeLidUpperScale = 0; // u8
|
|
251
|
+
eyeLidUpperAspect = 0; // u8
|
|
252
|
+
eyeLidUpperRotate = 0; // u8
|
|
253
|
+
eyeLidUpperX = 0; // u8
|
|
254
|
+
eyeLidUpperY = 0; // u8
|
|
255
|
+
eyelidLowerType = 0; // u8
|
|
256
|
+
eyelidLowerScale = 0; // u8
|
|
257
|
+
eyelidLowerAspect = 0; // u8
|
|
258
|
+
eyelidLowerRotate = 0; // u8
|
|
259
|
+
eyelidLowerX = 0; // u8
|
|
260
|
+
eyelidLowerY = 0; // u8
|
|
261
|
+
eyebrowType = 0; // u8
|
|
262
|
+
eyebrowColor = 0; // u8
|
|
263
|
+
eyebrowScale = 0; // u8
|
|
264
|
+
eyebrowAspect = 0; // u8
|
|
265
|
+
eyebrowRotate = 0; // u8
|
|
266
|
+
eyebrowX = 0; // u8
|
|
267
|
+
eyebrowY = 0; // u8
|
|
268
|
+
noseType = 0; // u8
|
|
269
|
+
noseScale = 0; // u8
|
|
270
|
+
noseY = 0; // u8
|
|
271
|
+
mouthType = 0; // u8
|
|
272
|
+
mouthColor = 0; // u8
|
|
273
|
+
mouthScale = 0; // u8
|
|
274
|
+
mouthAspect = 0; // u8
|
|
275
|
+
mouthRotate = 0; // u8
|
|
276
|
+
mouthY = 0; // u8
|
|
277
|
+
beardType = 0; // u8
|
|
278
|
+
beardColor = 0; // u8
|
|
279
|
+
beardShortType = 0; // u8
|
|
280
|
+
beardShortColor = 0; // u8
|
|
281
|
+
mustacheType = 0; // u8
|
|
282
|
+
mustacheColor = 0; // u8
|
|
283
|
+
mustacheScale = 0; // u8
|
|
284
|
+
mustacheAspect = 0; // u8
|
|
285
|
+
mustacheY = 0; // u8
|
|
286
|
+
glassType1 = 0; // u8
|
|
287
|
+
glassColor1 = 0; // u8
|
|
288
|
+
glassScale = 0; // u8
|
|
289
|
+
glassAspect = 0; // u8
|
|
290
|
+
glassY = 0; // u8
|
|
291
|
+
glassType2 = 0; // u8
|
|
292
|
+
glassColor2 = 0; // u8
|
|
293
|
+
moleScale = 0; // u8
|
|
294
|
+
moleX = 0; // u8
|
|
295
|
+
moleY = 0; // u8
|
|
296
|
+
unkDefault45 = 0; // u8
|
|
297
|
+
}
|
|
298
|
+
exports.CharInfoEx = CharInfoEx;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export declare enum CharInfoOffset {
|
|
2
|
+
createId1 = 0,//s32
|
|
3
|
+
createId2 = 4,//s32
|
|
4
|
+
createId3 = 8,//s32
|
|
5
|
+
createId4 = 12,//s32
|
|
6
|
+
name = 16,// utf16 - 11 char, 22 bytes
|
|
7
|
+
fontRegion = 38,
|
|
8
|
+
gender = 39,// u8
|
|
9
|
+
height = 40,// u8
|
|
10
|
+
build = 41,// u8
|
|
11
|
+
regionMove = 42,// u8
|
|
12
|
+
faceFlags = 43,// u8 bitflags
|
|
13
|
+
facelineType = 44,// u8
|
|
14
|
+
facelineColor = 45,// u8
|
|
15
|
+
wrinkleLower = 46,// u8
|
|
16
|
+
wrinkleLowerScale = 47,// u8
|
|
17
|
+
wrinkleLowerAspect = 48,// u8
|
|
18
|
+
wrinkleLowerX = 49,// u8
|
|
19
|
+
wrinkleLowerY = 50,// u8
|
|
20
|
+
wrinkleUpper = 51,// u8
|
|
21
|
+
wrinkleUpperScale = 52,// u8
|
|
22
|
+
wrinkleUpperAspect = 53,// u8
|
|
23
|
+
wrinkleUpperX = 54,// u8
|
|
24
|
+
wrinkleUpperY = 55,// u8
|
|
25
|
+
makeup0 = 56,// u8
|
|
26
|
+
makeup0Color = 57,// u8
|
|
27
|
+
makeup0Scale = 58,// u8
|
|
28
|
+
makeup0Aspect = 59,// u8
|
|
29
|
+
makeup0X = 60,// u8
|
|
30
|
+
makeup0Y = 61,// u8
|
|
31
|
+
makeup1 = 62,// u8
|
|
32
|
+
makeup1Color = 63,// u8
|
|
33
|
+
makeup1Scale = 64,// u8
|
|
34
|
+
makeup1Aspect = 65,// u8
|
|
35
|
+
makeup1X = 66,// u8
|
|
36
|
+
makeup1Y = 67,// u8
|
|
37
|
+
hairType = 68,// u16
|
|
38
|
+
hairColor0 = 70,// u8
|
|
39
|
+
hairColor1 = 71,// u8
|
|
40
|
+
hairTypeFront = 72,// u8
|
|
41
|
+
hairTypeBack = 73,// u8
|
|
42
|
+
hairStyle = 74,// u8 bitflag
|
|
43
|
+
earType = 75,// u8
|
|
44
|
+
earScale = 76,// u8
|
|
45
|
+
earY = 77,// u8
|
|
46
|
+
eyeType = 78,// u8
|
|
47
|
+
eyeColor = 79,// u8
|
|
48
|
+
eyeScale = 80,// u8
|
|
49
|
+
eyeAspect = 81,// u8
|
|
50
|
+
eyeRotate = 82,// u8
|
|
51
|
+
eyeX = 83,// u8
|
|
52
|
+
eyeY = 84,// u8
|
|
53
|
+
eyeShadowColor = 85,// u8
|
|
54
|
+
eyeHighlightType = 86,// u8
|
|
55
|
+
eyeHighlightScale = 87,// u8
|
|
56
|
+
eyeHighlightAspect = 88,// u8
|
|
57
|
+
eyeHighlightRotate = 89,// u8
|
|
58
|
+
eyeHighlightX = 90,// u8
|
|
59
|
+
eyeHighlightY = 91,// u8
|
|
60
|
+
eyelashUpperType = 92,// u8
|
|
61
|
+
eyelashUpperScale = 93,// u8
|
|
62
|
+
eyelashUpperAspect = 94,// u8
|
|
63
|
+
eyelashUpperRotate = 95,// u8
|
|
64
|
+
eyelashUpperX = 96,// u8
|
|
65
|
+
eyelashUpperY = 97,// u8
|
|
66
|
+
eyelashLowerType = 98,// u8
|
|
67
|
+
eyelashLowerScale = 99,// u8
|
|
68
|
+
eyelashLowerAspect = 100,// u8
|
|
69
|
+
eyelashLowerRotate = 101,// u8
|
|
70
|
+
eyelashLowerX = 102,// u8
|
|
71
|
+
eyelashLowerY = 103,// u8
|
|
72
|
+
eyeLidUpperType = 104,// u8
|
|
73
|
+
eyeLidUpperScale = 105,// u8
|
|
74
|
+
eyeLidUpperAspect = 106,// u8
|
|
75
|
+
eyeLidUpperRotate = 107,// u8
|
|
76
|
+
eyeLidUpperX = 108,// u8
|
|
77
|
+
eyeLidUpperY = 109,// u8
|
|
78
|
+
eyelidLowerType = 110,// u8
|
|
79
|
+
eyelidLowerScale = 111,// u8
|
|
80
|
+
eyelidLowerAspect = 112,// u8
|
|
81
|
+
eyelidLowerRotate = 113,// u8
|
|
82
|
+
eyelidLowerX = 114,// u8
|
|
83
|
+
eyelidLowerY = 115,// u8
|
|
84
|
+
eyebrowType = 116,// u8
|
|
85
|
+
eyebrowColor = 117,// u8
|
|
86
|
+
eyebrowScale = 118,// u8
|
|
87
|
+
eyebrowAspect = 119,// u8
|
|
88
|
+
eyebrowRotate = 120,// u8
|
|
89
|
+
eyebrowX = 121,// u8
|
|
90
|
+
eyebrowY = 122,// u8
|
|
91
|
+
noseType = 123,// u8
|
|
92
|
+
noseScale = 124,// u8
|
|
93
|
+
noseY = 125,// u8
|
|
94
|
+
mouthType = 126,// u8
|
|
95
|
+
mouthColor = 127,// u8
|
|
96
|
+
mouthScale = 128,// u8
|
|
97
|
+
mouthAspect = 129,// u8
|
|
98
|
+
mouthRotate = 130,// u8
|
|
99
|
+
mouthY = 131,// u8
|
|
100
|
+
beardType = 132,// u8
|
|
101
|
+
beardColor = 133,// u8
|
|
102
|
+
beardShortType = 134,// u8
|
|
103
|
+
beardShortColor = 135,// u8
|
|
104
|
+
mustacheType = 136,// u8
|
|
105
|
+
mustacheColor = 137,// u8
|
|
106
|
+
mustacheScale = 138,// u8
|
|
107
|
+
mustacheAspect = 139,// u8
|
|
108
|
+
mustacheY = 140,// u8
|
|
109
|
+
glassType1 = 141,// u8
|
|
110
|
+
glassColor1 = 142,// u8
|
|
111
|
+
glassScale = 143,// u8
|
|
112
|
+
glassAspect = 144,// u8
|
|
113
|
+
glassY = 145,// u8
|
|
114
|
+
glassType2 = 146,// u8
|
|
115
|
+
glassColor2 = 147,// u8
|
|
116
|
+
moleScale = 148,// u8
|
|
117
|
+
moleX = 149,// u8
|
|
118
|
+
moleY = 150,// u8
|
|
119
|
+
unkDefault45 = 151
|
|
120
|
+
}
|