Skip to content

Commit 601a6f0

Browse files
committed
Updating README
1 parent 3823a21 commit 601a6f0

File tree

1 file changed

+71
-56
lines changed

1 file changed

+71
-56
lines changed

README.md

Lines changed: 71 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,35 @@ NexusTK Resource Viewer for EPF and related files.
55
## Quickstart
66

77
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:
911

1012
```bash
11-
mvn clean
12-
mvn package
13+
$ mvn clean install
14+
$ (cd tk-viewer; mvn clean package)
1315
```
1416

1517
* Output is stored in `target/`
1618

17-
Run TKViewer with:
19+
### Run TKViewer with:
1820

1921
```bash
20-
java -jar target/TKViewer-*.jar
22+
java -jar tk-viewer/target/tk-viewer*.jar
2123
```
2224

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+
```
2337

2438
## FileReader Classes
2539

@@ -57,44 +71,44 @@ typedef struct {
5771
#### DAT
5872
5973
```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)
6377
6478
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)
6882
```
6983

7084
#### DNA
7185

7286
```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
7589

7690
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)
8397

8498
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)
88102

89103
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)
98112
```
99113
100114
#### DSC
@@ -158,21 +172,21 @@ typedef struct {
158172
#### FRM
159173
160174
```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
163177
```
164178

165179
#### MAP
166180

167181
```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
171185

172186
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)
176190
```
177191
#### PAL (Single)
178192
@@ -199,37 +213,37 @@ int palette_count # numbe
199213
PAL[palette_count] palettes # list of PAL structures
200214

201215
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
208222

209223
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)
215229
} PAL
216230
```
217231

218232
#### TBL (Effects)
219233
```cpp
220-
int effect count (4 bytes) # number of effects in TBL
234+
int effect count (4 bytes) # number of effects in TBL
221235

222236
effect [effect_count] effects # list of effect structures
223237
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
226240
byte[20] unknown # unknown bytes (1)
227241
frame [frame_count] frames # list of frame structures
228242
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)
233247
}
234248
} effect
235249
```
@@ -276,3 +290,4 @@ Huge thank you to everyone who helps figure out NTK file structures:
276290
* rbcastner
277291
* SapMagic
278292
* wattostudios
293+
* mac

0 commit comments

Comments
 (0)