-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathp3p_field_npc_tbl.bt
55 lines (49 loc) · 1.47 KB
/
p3p_field_npc_tbl.bt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//------------------------------------------------
//--- 010 Editor v11.0.1 Binary Template
//
// File: AtlusFieldNPCTable_P3P.bt
// Authors: moddaman
// Version: 1.0
// Purpose: Parse Field NPC *_tbl.dat files.
// Category: Persona 3 Portable
// File Mask:
// ID Bytes:
// History:
//------------------------------------------------
#include "types.h"
LittleEndian();
enum<u8> times
{
EarlyMorning = 0,
Morning = 1,
Lunchtime = 2,
Daytime = 3,
AfterSchool = 4,
Evening = 5,
LateNight = 6
};
typedef struct calendarGroup
{
u8 OnMonth <bgcolor=0xFF77FF>;
u8 OnDay <bgcolor=0xDD55DD>;
times OnTime <bgcolor=0xFFFF00>;
u8 Field03 <format=hex, bgcolor=0x00FFFF>;
u32 Field04 <format=hex, bgcolor=0x00FFFF>;
u32 GroupID <comment = "NPC Group to load from *_pck.dat", bgcolor=0x00FF00>;
};
typedef struct calendarArr(u32 size)
{
while (size > 0)
{
calendarGroup CalendarGroup <name = "Group">;
size -= 1;
}
};
typedef struct npcTblDAT
{
u32 GroupsLength <format=hex, name = "Size", comment = "Length of all calendar groups in bytes", bgcolor=0x00BB00>;
u32 TotalGroups <name = "Total Groups", bgcolor=0xFF0000>;
calendarArr LoadDates(TotalGroups) <name = "Calendar Groups", comment = "Changes NPC groups past specified Calendar dates and times">;
u32 DupeBytes[(FileSize() - FTell()) / 4] <name = "Duplicate Bytes", bgcolor=0x0000FF, comment = "Unused, can be ignored">;
};
npcTblDAT FILE;