@@ -5,21 +5,35 @@ NexusTK Resource Viewer for EPF and related files.
5
5
## Quickstart
6
6
7
7
IntelliJ is recommended for development, but you should be able to build with
8
- just Maven: (mvn clean; mvn package)
8
+ just Java 8+ and Maven:
9
+
10
+ ### Building TKViewer with Maven:
9
11
10
12
``` bash
11
- mvn clean
12
- mvn package
13
+ $ mvn clean install
14
+ $ (cd tk-viewer ; mvn clean package)
13
15
```
14
16
15
17
* Output is stored in ` target/ `
16
18
17
- Run TKViewer with:
19
+ ### Run TKViewer with:
18
20
19
21
``` bash
20
- java -jar target/TKViewer- * .jar
22
+ java -jar tk-viewer/ target/tk-viewer * .jar
21
23
```
22
24
25
+ ### Building TKPartPicker with Maven:
26
+
27
+ ``` bash
28
+ $ mvn clean install
29
+ $ (cd tk-partpicker; mvn clean package)
30
+ ```
31
+
32
+ ### Run TKPartPicker with:
33
+
34
+ ``` bash
35
+ java -jar tk-viewer/target/tk-partpicker* .jar
36
+ ```
23
37
24
38
## FileReader Classes
25
39
@@ -57,44 +71,44 @@ typedef struct {
57
71
#### DAT
58
72
59
73
```cpp
60
- int file_count (4 bytes) # file count + 1 (decrement for file count)
61
- file[file_count] files ((file_count * file_size) bytes) # list of file structures
62
- byte[] file_data # binary data of all files (head-to-tail)
74
+ int file_count (4 bytes) # file count + 1 (decrement for file count)
75
+ file[file_count] files ((file_count * file_size) bytes) # list of file structures
76
+ byte[] file_data # binary data of all files (head-to-tail)
63
77
64
78
typedef struct {
65
- int data_location (4 bytes) # index of 'file_data' for the start of this file
66
- byte[13] file_name (13 bytes) # the file name (UTF-8 padded - 13 bytes)
67
- } file (17 + size bytes)
79
+ int data_location (4 bytes) # index of 'file_data' for the start of this file
80
+ byte[13] file_name (13 bytes) # the file name (UTF-8 padded - 13 bytes)
81
+ } file (17 + size bytes)
68
82
```
69
83
70
84
#### DNA
71
85
72
86
``` cpp
73
- int mob_count (4 bytes) # number of mobs in file
74
- mob[ mob_count] mobs (mob_count * mob_size bytes) # list of mob structures
87
+ int mob_count (4 bytes) # number of mobs in file
88
+ mob[ mob_count] mobs (mob_count * mob_size bytes) # list of mob structures
75
89
76
90
typedef struct {
77
- int frame_index (4 bytes) # frame index of mob
78
- byte chunk_count (1 byte) # number of chunks in mob
79
- byte unknown1 (1 byte) # unknown id/flag (1)
80
- short palette_index (2 bytes) # palette index of mob
81
- chunk[ chunk_count] chunks (chunk_count * chunk_size bytes) # list of chunk structures
82
- } mob (8 + (chunk_count * chunk_size) bytes)
91
+ int frame_index (4 bytes) # frame index of mob
92
+ byte chunk_count (1 byte) # number of chunks in mob
93
+ byte unknown1 (1 byte) # unknown id/flag (1)
94
+ short palette_index (2 bytes) # palette index of mob
95
+ chunk[ chunk_count] chunks (chunk_count * chunk_size bytes) # list of chunk structures
96
+ } mob (8 + (chunk_count * chunk_size) bytes)
83
97
84
98
typedef struct {
85
- short block_count (2 bytes) # block count of chunk
86
- block[ block_count] blocks (block_count * block_size bytes) # list of block structures
87
- } chunk (2 + (block_count * block_size) bytes)
99
+ short block_count (2 bytes) # block count of chunk
100
+ block[ block_count] blocks (block_count * block_size bytes) # list of block structures
101
+ } chunk (2 + (block_count * block_size) bytes)
88
102
89
103
typedef struct {
90
- short frame_offset (2 bytes) # offset from frame_index in chunk
91
- short duration (2 bytes) # amount of time to play the frame
92
- short unknownId1 (2 bytes) # normally -1, only has real values
93
- in death animations for 2 mobs
94
- byte transparency (1 bytes) # transparency
95
- byte unknownId2 (1 byte) # unknown id/flag (5)
96
- byte unknownId3 (1 byte) # unknown id/flag (5)
97
- } block (9 bytes)
104
+ short frame_offset (2 bytes) # offset from frame_index in chunk
105
+ short duration (2 bytes) # amount of time to play the frame
106
+ short unknownId1 (2 bytes) # normally -1, only has real values
107
+ in death animations for 2 mobs
108
+ byte transparency (1 bytes) # transparency
109
+ byte unknownId2 (1 byte) # unknown id/flag (5)
110
+ byte unknownId3 (1 byte) # unknown id/flag (5)
111
+ } block (9 bytes)
98
112
```
99
113
100
114
#### DSC
@@ -158,21 +172,21 @@ typedef struct {
158
172
#### FRM
159
173
160
174
```cpp
161
- int effect_count (4 bytes) # number of effects in FRM
162
- int[effect_count] palette_index (effect_count * 4 bytes) # list of palette indicies for effects
175
+ int effect_count (4 bytes) # number of effects in FRM
176
+ int[effect_count] palette_index (effect_count * 4 bytes) # list of palette indicies for effects
163
177
```
164
178
165
179
#### MAP
166
180
167
181
``` cpp
168
- short width (2 bytes) # width of the map (in tiles)
169
- short height (2 bytes) # height of the map (in tiles)
170
- tile[ width* height] tiles (width * height * 4 bytes) # list of tile structures
182
+ short width (2 bytes) # width of the map (in tiles)
183
+ short height (2 bytes) # height of the map (in tiles)
184
+ tile[ width* height] tiles (width * height * 4 bytes) # list of tile structures
171
185
172
186
typedef struct {
173
- short ab_tile_id (2 bytes) # ground tile frame index (Tile/Tbl)
174
- short sobj_tile_id (2 bytes) # static object index (TileC/SObjTbl)
175
- } tile (4 bytes)
187
+ short ab_tile_id (2 bytes) # ground tile frame index (Tile/Tbl)
188
+ short sobj_tile_id (2 bytes) # static object index (TileC/SObjTbl)
189
+ } tile (4 bytes)
176
190
```
177
191
#### PAL (Single)
178
192
@@ -199,37 +213,37 @@ int palette_count # numbe
199
213
PAL[palette_count] palettes # list of PAL structures
200
214
201
215
typedef struct {
202
- byte[ 9] header (9 bytes) # DLPalette (literal)
203
- byte[ 15] unknown (15 bytes) # unknown bytes (1)
204
- byte animation_color_count (1 byte) # number of animation colors
205
- byte[ 7] unknown2 (7 bytes) # unknown bytes (2)
206
- short[ animation_color_count] (animation_color_count * 2 bytes) # list of animation colors (short)
207
- color[ 256] palette (1024 bytes) # list of color structures
216
+ byte[ 9] header (9 bytes) # DLPalette (literal)
217
+ byte[ 15] unknown (15 bytes) # unknown bytes (1)
218
+ byte animation_color_count (1 byte) # number of animation colors
219
+ byte[ 7] unknown2 (7 bytes) # unknown bytes (2)
220
+ short[ animation_color_count] (animation_color_count * 2 bytes) # list of animation colors (short)
221
+ color[ 256] palette (1024 bytes) # list of color structures
208
222
209
223
typedef struct {
210
- byte blue (1 byte) # blue value for color
211
- byte green (1 byte) # green value for color
212
- byte red (1 byte) # red value for color
213
- byte alpha (1 byte) # alpha value for color
214
- } color (4 bytes)
224
+ byte red (1 byte) # blue value for color
225
+ byte green (1 byte) # green value for color
226
+ byte blue (1 byte) # red value for color
227
+ byte alpha (1 byte) # alpha value for color
228
+ } color (4 bytes)
215
229
} PAL
216
230
```
217
231
218
232
#### TBL (Effects)
219
233
``` cpp
220
- int effect count (4 bytes) # number of effects in TBL
234
+ int effect count (4 bytes) # number of effects in TBL
221
235
222
236
effect [ effect_count] effects # list of effect structures
223
237
typedef struct {
224
- int effect_index (4 bytes) # effect index
225
- int frame count (4 bytes) # number of sequential frames after effect_index
238
+ int effect_index (4 bytes) # effect index
239
+ int frame count (4 bytes) # number of sequential frames after effect_index
226
240
byte[ 20] unknown # unknown bytes (1)
227
241
frame [ frame_count] frames # list of frame structures
228
242
typedef struct {
229
- int frame index (4 bytes) # start frame index for effect
230
- int frame delay (4 bytes) # delay until next frame (milliseconds)
231
- int pallete number (4 bytes) # palette index to use when renderer
232
- byte[ 4] unknown (4 bytes) # unknown bytes (1)
243
+ int frame index (4 bytes) # start frame index for effect
244
+ int frame delay (4 bytes) # delay until next frame (milliseconds)
245
+ int pallete number (4 bytes) # palette index to use when renderer
246
+ byte[ 4] unknown (4 bytes) # unknown bytes (1)
233
247
}
234
248
} effect
235
249
```
@@ -276,3 +290,4 @@ Huge thank you to everyone who helps figure out NTK file structures:
276
290
* rbcastner
277
291
* SapMagic
278
292
* wattostudios
293
+ * mac
0 commit comments