forked from three-houses-research-team/010-binary-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMapSpawnData_bai.bt
94 lines (87 loc) · 4.13 KB
/
MapSpawnData_bai.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//------------------------------------------------
//--- 010 Editor v9.0.2 Binary Template
//
// File: Starts at 83.bin/ SC00_00.bai
// Authors: TildeHat/DeathChaos
// Version: 1.04
// Purpose: Mapping of dispos files/bai files.
// History
// 1.00 2019-08-05 TildeHat - Start
// 1.01 2019-08-12 TildeHat - Added blocks for other routes
// 1.02 2019-09-15 DeathChaos - Minor revision to name mapping
// 1.03 2019-09-17 DeathChaos - Minor template overhaul
// 1.04 2019-09-17 DeathChaos - Minor Mapping update
//------------------------------------------------
LittleEndian();
#include "3H_BaiArtsEnums.bt"
#include "3H_BaiEnums.bt"
//One entry is 0x2c bytes
//All IDs in this file are +1 from regular list. 0 Seems to be default.
struct File{
struct HEADER{
uint32 Header;
uint32 UnkPointer;
uint32 UnkPointer;
//uint32 BERelativePointer<bgcolor=cRed>;//always at 0x18
//uint32 BLRelativePointer<bgcolor=cBlue>;//This + 0x18
//uint32 GDRelativePointer<bgcolor=cYellow>;//This + 0x18
}header<bgcolor=cGreen>;
struct PTRTable{
uint32 offset<format=hex>;
}Ptrtable[3]<name="Relative offset", bgcolor=cDkRed>;
local int i = 0;
local int j = 0;
for(i = 0; i <3; i++){
FSeek(Ptrtable[i].offset + 24);
struct RouteBlock
{
for(j = 0; j<100;j++)
{
struct CharacterBlocks
{
CharID CharacterID<name="Character ID", comment="+1 From Regular List", bgcolor=cPurple>;
uint16 unknown<name="unknown", fgcolor=cBlack>;
Class ClassID<name="Class",comment="Only usable for enemy and NPC + 1 From regular List",bgcolor=cYellow>;
struct Weapons
{
ItemsBai itemID<name="Item ID 1",comment="Slot 1", bgcolor=cRed>;
ItemsBai itemID<name="Item ID 2",comment="Slot 2", bgcolor=cRed>;
ItemsBai itemID<name="Item ID 3",comment="Slot 3", bgcolor=cRed>;
ItemsBai itemID<name="Item ID 4",comment="Slot 4", bgcolor=cRed>;
ItemsBai itemID<name="Item ID 5",comment="Slot 5", bgcolor=cRed>;
ItemsBai itemID<name="Item ID 6",comment="Slot 6", bgcolor=cRed>;
ItemsBai itemFlags<name="Item flags?",comment="Setting to 2 makes item drop", bgcolor=cGray>;
}weapons<name="Weapons">;
struct Skills
{
AbilityID abilityID<name="Ability ID 1",comment="Slot 1", bgcolor=cBlue>;
AbilityID abilityID<name="Ability ID 2",comment="Slot 2", bgcolor=cBlue>;
AbilityID abilityID<name="Ability ID 3",comment="Slot 3", bgcolor=cBlue>;
AbilityID abilityID<name="Ability ID 4",comment="Slot 4", bgcolor=cBlue>;
AbilityID abilityID<name="Ability ID 5",comment="Slot 5", bgcolor=cBlue>;
}skills<name="Unit Skills">;
ubyte xCoor<name="X coordinate ", bgcolor=cGreen>;
ubyte yCoor<name="Y coordinate ", bgcolor=cGreen>;
Rotation spawnrotation<name="Unit Rotation",comment="Direction Unit is facing (6 = down)", bgcolor=cBlue>;
byte fixedLevel<name="Fixed Level ",comment="Enemy/NPC only", bgcolor=cLtPurple>;
Team allegiance<name="Allegiance byte",comment="0 = Player, 1 = Enemy, 2 = NPC", bgcolor=cLtYellow>;
ScriptSpawn SpawnType<name="Spawn Type",comment="0 = Spawns auto, 1 = Only Spawns from script.", bgcolor=cBlack>;
MovementFlags characterFlags<name="Movement Flags",comment="3 - No movement, 2 - Movement", bgcolor=cGray>;
TrueFalse battallionFlag<name="Has Battalion Enabled", bgcolor=cAqua>;
CommanderStatus IsCommander<name="Commander Flag", bgcolor=cAqua>;
BattalionID Battalion<name="Battalion", bgcolor=cRed>;
ubyte BattalionLv<name="Battalion Level", bgcolor=cRed>;
SpellIDBai Spell<name="Extra Spell 1", bgcolor=cLtBlue>;
SpellIDBai Spell<name="Extra Spell 2", bgcolor=cLtBlue>;
ArtID CombatArt<name="Combat Arts", fgcolor=cBlack>;
Gender UnitGender<name="Unit Gender", fgcolor=cBlack>;
uint32 Padding<name="Padding", bgcolor=cLtGreen>;
}characterblocks<name="Unit Block",read=GetName>;
}
}routeBlock;
}
}file;
string GetName(CharacterBlocks& value)
{
return EnumToString(value.CharacterID);
}