diff --git a/FlatBuffers/SV/Personal/Personal/Wrapper/PersonalInfo9SV.cs b/FlatBuffers/SV/Personal/Personal/Wrapper/PersonalInfo9SV.cs
index 78d65f5d..9a6589b2 100644
--- a/FlatBuffers/SV/Personal/Personal/Wrapper/PersonalInfo9SV.cs
+++ b/FlatBuffers/SV/Personal/Personal/Wrapper/PersonalInfo9SV.cs
@@ -1,7 +1,7 @@
namespace pkNX.Structures.FlatBuffers.SV;
///
-/// Personal Info class with values from the games.
+/// Personal Info class with values from the games.
///
public sealed class PersonalInfo9SV(PersonalInfo fb) : IPersonalInfo
{
diff --git a/FlatBuffers/SV/Trinity/Archive/TrinityFileSystemManager.cs b/FlatBuffers/SV/Trinity/Archive/TrinityFileSystemManager.cs
index 1181f0b5..c8fa96af 100644
--- a/FlatBuffers/SV/Trinity/Archive/TrinityFileSystemManager.cs
+++ b/FlatBuffers/SV/Trinity/Archive/TrinityFileSystemManager.cs
@@ -56,22 +56,27 @@ public byte[] GetData(ulong offset, ulong length)
return Reader.ReadBytes((int)length);
}
+ public void GetData(ulong offset, ulong length, Span data)
+ {
+ Reader.BaseStream.Seek((long)offset, SeekOrigin.Begin);
+ _ = Reader.Read(data[..(int)length]);
+ }
+
public TrinityPak GetPak(int index)
{
var data = GetPakData(index);
return TrinityPak.Serializer.Parse(data, FlatBufferDeserializationOption.GreedyMutable);
}
+ public ulong GetPakHash(int index) => FnvHash.HashFnv1a_64(GetPackPath(index));
+ public ulong GetPakLength(int index) => FileData.FileInfos[index].FileSize;
+ public ulong GetPakOffset(ulong hash) => Meta.GetFileOffset(hash);
+
public byte[] GetPakData(int index)
{
- var path = GetPackPath(index);
- var hash = FnvHash.HashFnv1a_64(path);
- var offset = Meta.GetFileOffset(hash);
- var info = FileData.FileInfos[index];
- var size = info.FileSize;
-
- //Debug.WriteLine($"Found {index} at 0x{offset:X12}, Size={info.FileSize:X}, SubFileCount={info.FileCount}");
-
+ var size = GetPakLength(index);
+ var hash = GetPakHash(index);
+ var offset = GetPakOffset(hash);
return GetData(offset, size);
}
@@ -80,7 +85,7 @@ public byte[] GetPackedFile(ulong hash)
var index = FileData.GetSubFileIndex(hash);
var pak = GetPak((int)index);
var file = pak.GetFileData(hash);
- return file.GetUncompressedData();
+ return file.Decompress();
}
public byte[] GetPackedFile(string path) => GetPackedFile(FnvHash.HashFnv1a_64(path));
diff --git a/FlatBuffers/SV/Trinity/Archive/TrinityPak.cs b/FlatBuffers/SV/Trinity/Archive/TrinityPak.cs
index b5314f56..bd9b9d9d 100644
--- a/FlatBuffers/SV/Trinity/Archive/TrinityPak.cs
+++ b/FlatBuffers/SV/Trinity/Archive/TrinityPak.cs
@@ -1,5 +1,6 @@
using System.Diagnostics;
using pkNX.Containers;
+using System.IO.Compression; // Added for Zlib support
namespace pkNX.Structures.FlatBuffers.SV.Trinity;
@@ -34,17 +35,39 @@ private int BinarySearch(ulong hash)
public partial class TrinityPakFileData
{
- public byte[] GetUncompressedData() => CompressionType switch
- { // TODO: What specific ID is zlib?
- 3 => Oodle.Decompress(Data.Span, (long)UncompressedSize)!, // Oodle
- 0xFF => Data.ToArray(), // Uncompressed
+ public byte[] Decompress() => CompressionType switch
+ {
+ DataCompressionType.None => Data.ToArray(), // Uncompressed
+ DataCompressionType.Zlib => Zlib.Decompress(Data.Span, (int)UncompressedSize),
+ DataCompressionType.Lz4 => LZ4.Decode(Data.Span, (int)UncompressedSize),
+ >= DataCompressionType.OodleKraken and <= DataCompressionType.OodleHydra => Oodle.Decompress(Data.Span, (long)UncompressedSize)!, // Oodle
_ => throw new ArgumentException($"Unknown compression type {CompressionType}"),
};
- public ReadOnlySpan GetUncompressedDataReadOnly() => CompressionType switch
- { // TODO: What specific ID is zlib?
- 3 => Oodle.Decompress(Data.Span, (long)UncompressedSize)!, // Oodle
- 0xFF => Data.ToArray(), // Uncompressed
- _ => throw new ArgumentException($"Unknown compression type {CompressionType}"),
+ public void DecompressTo(Span result)
+ {
+ if (CompressionType == DataCompressionType.None)
+ Data.Span.CopyTo(result); // Uncompressed
+ else if (CompressionType == DataCompressionType.Zlib)
+ Zlib.Decompress(Data.Span, result);
+ else if (CompressionType == DataCompressionType.Lz4)
+ LZ4.Decode(Data.Span, result);
+ else if (CompressionType is >= DataCompressionType.OodleKraken and <= DataCompressionType.OodleHydra)
+ Oodle.TryDecompress(Data.Span, result, out _);
+ else
+ throw new ArgumentException($"Unknown compression type {CompressionType}");
+ }
+
+ public static ReadOnlySpan Compress(ReadOnlySpan data, DataCompressionType type, OodleCompressionLevel level = OodleCompressionLevel.Optimal2) => type switch
+ {
+ DataCompressionType.None => data,
+ DataCompressionType.Zlib => Zlib.Compress(data),
+ DataCompressionType.Lz4 => LZ4.Encode(data),
+ DataCompressionType.OodleKraken => Oodle.Compress(data, out _, OodleFormat.Kraken, level),
+ DataCompressionType.OodleLeviathan => Oodle.Compress(data, out _, OodleFormat.Leviathan, level),
+ DataCompressionType.OodleMermaid => Oodle.Compress(data, out _, OodleFormat.Mermaid, level),
+ DataCompressionType.OodleSelkie => Oodle.Compress(data, out _, OodleFormat.Selkie, level),
+ DataCompressionType.OodleHydra => Oodle.Compress(data, out _, OodleFormat.Hydra, level),
+ _ => throw new NotImplementedException($"Compression type {type} is not implemented."),
};
}
diff --git a/FlatBuffers/SV/Trinity/Archive/TrinityPakExtractor.cs b/FlatBuffers/SV/Trinity/Archive/TrinityPakExtractor.cs
index 46518e2a..6e8cc14e 100644
--- a/FlatBuffers/SV/Trinity/Archive/TrinityPakExtractor.cs
+++ b/FlatBuffers/SV/Trinity/Archive/TrinityPakExtractor.cs
@@ -1,5 +1,5 @@
using pkNX.Containers;
-using static System.Buffers.Binary.BinaryPrimitives;
+using System.Buffers;
namespace pkNX.Structures.FlatBuffers.SV.Trinity;
@@ -8,44 +8,69 @@ public static class TrinityPakExtractor
public const string DumpArchiveExtracted = "extracted";
private const string DumpArchivePak = "paks";
- public static void DumpArchives(string pathRomFS, string outbasedir)
+ public static void DumpArchives(string pathRomFS, string dirRootDump)
{
var pathFs = Path.Combine(pathRomFS, "arc", "data.trpfs");
var pathFd = Path.Combine(pathRomFS, "arc", "data.trpfd");
var reader = new TrinityFileSystemManager(pathFs, pathFd);
- Extract(outbasedir, reader);
+ Extract(dirRootDump, reader);
reader.Dispose();
}
- private static void Extract(string outbasedir, TrinityFileSystemManager manager)
+ private static void Extract(string dirRoot, TrinityFileSystemManager manager)
{
- var outpakdir = Path.Combine(outbasedir, DumpArchivePak);
- var outexdir = Path.Combine(outbasedir, DumpArchiveExtracted);
- Directory.CreateDirectory(outbasedir);
- Directory.CreateDirectory(outpakdir);
- Directory.CreateDirectory(outexdir);
+ Directory.CreateDirectory(dirRoot);
+
+ var dirPak = Path.Combine(dirRoot, DumpArchivePak);
+ Directory.CreateDirectory(dirPak);
+
+ var dirExtract = Path.Combine(dirRoot, DumpArchiveExtracted);
+ Directory.CreateDirectory(dirExtract);
var count = manager.FileCount;
for (var i = 0; i < count; i++)
- ExportArc(manager, i, outpakdir, outexdir);
+ ExportArc(manager, i, dirPak, dirExtract);
}
- private static void ExportArc(TrinityFileSystemManager reader, int packIndex, string outpakdir, string outexdir)
+ private static void ExportArc(TrinityFileSystemManager reader, int packIndex, string dirPak, string dirExtract)
{
- var packFilePath = reader.GetPackPath(packIndex);
- var outpakpath = Path.Combine(outpakdir, packFilePath);
- var dirName = Path.GetDirectoryName(outpakpath);
+ var pool = ArrayPool.Shared;
+ var hash = reader.GetPakHash(packIndex);
+ var length = reader.GetPakLength(packIndex);
+ var offset = reader.GetPakOffset(hash);
+ var rent = pool.Rent((int)length);
+ var data = rent.AsMemory(0, (int)length);
+ try
+ {
+ reader.GetData(offset, length, data.Span);
+ var packFilePath = reader.GetPackPath(packIndex);
+ ExportPackFile(data.Span, dirPak, packFilePath);
+ ExportPackExtract(data, dirExtract, packFilePath);
+ }
+ finally
+ {
+ data.Span.Clear();
+ pool.Return(rent);
+ }
+ }
+
+ private static void ExportPackFile(ReadOnlySpan data, string dir, string pakFilePath)
+ {
+ var fileName = Path.Combine(dir, pakFilePath);
+ var dirName = Path.GetDirectoryName(fileName);
if (string.IsNullOrEmpty(dirName))
- throw new Exception($"{outpakpath} directory name is null");
+ throw new Exception($"{fileName} directory name is null");
Directory.CreateDirectory(dirName);
- var data = reader.GetPakData(packIndex);
- File.WriteAllBytes(outpakpath, data);
+ File.WriteAllBytes(fileName, data);
+ }
- var outexpakdir = Path.Combine(outexdir, packFilePath);
- Directory.CreateDirectory(outexpakdir);
- var trpak = FlatBufferConverter.DeserializeFrom(data);
- ExtractPack(trpak, outexpakdir);
+ private static void ExportPackExtract(Memory data, string dir, string pakFilePath)
+ {
+ var folder = Path.Combine(dir, pakFilePath);
+ Directory.CreateDirectory(folder);
+ var obj = FlatBufferConverter.DeserializeFrom(data);
+ ExtractPack(obj, folder);
}
private static void ExtractPack(TrinityPak trpak, string outexpakdir)
@@ -54,33 +79,28 @@ private static void ExtractPack(TrinityPak trpak, string outexpakdir)
WriteFile(trpak.Files[i], trpak.Hashes[i], outexpakdir, i);
}
- private static void WriteFile(TrinityPakFileData file, ulong hash, string outexpakdir, int fileIndex)
+ private static void WriteFile(TrinityPakFileData file, ulong hash, string dir, int fileIndex)
{
- var decompressed = file.GetUncompressedDataReadOnly();
- var ext = GuessExtension(decompressed);
+ if (file.CompressionType is DataCompressionType.None)
+ {
+ WriteFile(file.Data.Span, hash, dir, fileIndex);
+ return;
+ }
- var filepath = Path.Combine(outexpakdir, $"{fileIndex:0000} - {hash:X16}.{ext}");
- //Debug.WriteLine($" * File, CompressionType={file.CompressionType}, CompressedSize={file.Data.Length:X}, UncompressedSize={file.UncompressedSize}, Field_00={file.Field_00}, Field_01={file.Field_01}");
-
- using var fs = File.Create(filepath);
- fs.Write(decompressed);
+ var pool = ArrayPool.Shared;
+ var length = (int)file.UncompressedSize;
+ var rent = pool.Rent(length);
+ var decompressed = rent.AsSpan(0, length);
+ file.DecompressTo(decompressed);
+ WriteFile(decompressed, hash, dir, fileIndex);
+ decompressed.Clear();
+ pool.Return(rent);
}
- private static string GuessExtension(ReadOnlySpan data)
+ private static void WriteFile(ReadOnlySpan decompressed, ulong hash, string dir, int fileIndex)
{
- const string defaultExtension = "bin";
- if (data.Length < 8)
- return defaultExtension;
- var u32 = ReadUInt32LittleEndian(data);
- if (ReadUInt32LittleEndian(data[4..8]) == 0x53424642)
- return "bfbs";
- return u32 switch
- {
- AHTB.Magic => "ahtb",
- 0x43524153 => "sarc",
- 0x58544E42 => "bntx",
- 0x63726173 => "sarc",
- _ => defaultExtension,
- };
+ var ext = TrinityUtil.GuessExtension(decompressed);
+ var filepath = Path.Combine(dir, $"{fileIndex:0000} - {hash:X16}.{ext}");
+ File.WriteAllBytes(filepath, decompressed);
}
}
diff --git a/FlatBuffers/SV/Trinity/Scene/SceneDumper.cs b/FlatBuffers/SV/Trinity/Scene/SceneDumper.cs
index 733c45a1..e64c7dee 100644
--- a/FlatBuffers/SV/Trinity/Scene/SceneDumper.cs
+++ b/FlatBuffers/SV/Trinity/Scene/SceneDumper.cs
@@ -259,8 +259,8 @@ private static void DumpParticleComponent(Memory data, TextWriter tw, int
{
var props = FlatBufferConverter.DeserializeFrom(data);
Write(tw, depth, $"{nameof(props.ParticleFile)}: {props.ParticleFile}");
- Write(tw, depth, $"{nameof(props.ParticleName)}: {props.ParticleName}");
- Write(tw, depth, $"{nameof(props.ParticleParent)}: {props.ParticleParent}");
+ Write(tw, depth, $"{nameof(props.ParticleName)}: {props.ParticleName} ({FnvHash.HashFnv1a_64(props.ParticleName):X16})");
+ Write(tw, depth, $"{nameof(props.ParticleParent)}: {props.ParticleParent} ({FnvHash.HashFnv1a_64(props.ParticleParent):X16})");
}
private static void DumpCollisionComponent(Memory data, TextWriter tw, int depth)
@@ -321,7 +321,7 @@ private static void DumpObjectSwitcher(Memory data, TextWriter tw, int dep
private static void DumpObjectTemplate(Memory data, TextWriter tw, int depth)
{
var props = FlatBufferConverter.DeserializeFrom(data);
- Write(tw, depth, $"{nameof(props.ObjectTemplateName)}: {props.ObjectTemplateName}");
+ Write(tw, depth, $"{nameof(props.ObjectTemplateName)}: {props.ObjectTemplateName} ({FnvHash.HashFnv1a_64(props.ObjectTemplateName):X16})");
Write(tw, depth, $"{nameof(props.ObjectTemplatePath)}: {props.ObjectTemplatePath}");
Write(tw, depth, $"{nameof(props.ObjectTemplateExtra)}: {props.ObjectTemplateExtra}");
Write(tw, depth, $"{nameof(props.Field03)}: {props.Field03}");
@@ -331,7 +331,7 @@ private static void DumpObjectTemplate(Memory data, TextWriter tw, int dep
private static void DumpScenePoint(Memory data, TextWriter tw, int depth)
{
var props = FlatBufferConverter.DeserializeFrom(data);
- Write(tw, depth, $"{nameof(props.Name)}: {props.Name}");
+ Write(tw, depth, $"{nameof(props.Name)}: {props.Name} ({FnvHash.HashFnv1a_64(props.Name):X16})");
Write(tw, depth, $"{nameof(props.Position)}: {props.Position}");
Write(tw, depth, $"{nameof(props.Field02)}: {props.Field02}");
}
@@ -339,7 +339,7 @@ private static void DumpScenePoint(Memory data, TextWriter tw, int depth)
private static void DumpSceneObject(Memory data, TextWriter tw, int depth)
{
var props = FlatBufferConverter.DeserializeFrom(data);
- Write(tw, depth, $"{nameof(props.ObjectName)}: {props.ObjectName}");
+ Write(tw, depth, $"{nameof(props.ObjectName)}: {props.ObjectName} ({FnvHash.HashFnv1a_64(props.ObjectName):X16})");
Write(tw, depth, $"{nameof(props.ObjectPosition)}:");
Dump(props.ObjectPosition, tw, depth + 1);
Write(tw, depth, $"{nameof(props.Field02)}: {props.Field02}");
diff --git a/FlatBuffers/SV/Trinity/Schemas/TrinityPak.fbs b/FlatBuffers/SV/Trinity/Schemas/TrinityPak.fbs
index 7c0af30a..841b6d92 100644
--- a/FlatBuffers/SV/Trinity/Schemas/TrinityPak.fbs
+++ b/FlatBuffers/SV/Trinity/Schemas/TrinityPak.fbs
@@ -1,9 +1,10 @@
namespace pkNX.Structures.FlatBuffers.SV.Trinity;
attribute "fs_serializer";
-enum CompressionType : ushort
+enum DataCompressionType : byte
{
- None = 0,
+ None = -1,
+ Invalid = 0,
Zlib = 1,
Lz4 = 2,
OodleKraken = 3,
@@ -15,8 +16,8 @@ enum CompressionType : ushort
table TrinityPakFileData {
Field_00:uint;
- CompressionType:ubyte;
- Field_02:ubyte;
+ CompressionType:DataCompressionType;
+ CompressionLevel:ubyte;
UncompressedSize:ulong;
Data:[ubyte] (required);
}
diff --git a/FlatBuffers/ZA/Battle/Schemas/BattleSetting.fbs b/FlatBuffers/ZA/Battle/Schemas/BattleSetting.fbs
new file mode 100644
index 00000000..6867d9bd
--- /dev/null
+++ b/FlatBuffers/ZA/Battle/Schemas/BattleSetting.fbs
@@ -0,0 +1,57 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_vector";
+attribute "fs_serializer";
+attribute "fs_valueStruct";
+attribute "fs_nonVirtual";
+attribute "fs_unsafeStructVector";
+
+struct StealthRockDamageRatio {
+ DemonType_1:int;
+ DemonType_1_2:int;
+ DemonType_1_4:int;
+ DemonType_1_8:int;
+ DemonType_1_16:int;
+ DemonType_1_32:int;
+ DemonType_2:int;
+ DemonType_4:int;
+ DemonType_8:int;
+ DemonType_16:int;
+ DemonType_32:int;
+}
+
+struct DamagePerTypeAff {
+ PerType_1_8:int;
+ PerType_1_4:int;
+ PerType_1_2:int;
+ PerType_1:int;
+ PerType_2:int;
+ PerType_4:int;
+ PerType_8:int;
+}
+
+table BattleSetting (fs_serializer) {
+ Damage_Per_Mega_Aura:int;
+ Damage_Per_Random_Amplitude:int;
+ Damage_Per_Trainer_Battle:int;
+ Damage_Per_Wild_Battle:int;
+ Damage_Per_Weather_Advantage:int;
+ Damage_Per_Weather_Disadvantage:int;
+ Damage_Per_Critical:int;
+ Damage_Per_Critical_Plus:int;
+ Damage_Per_Type_Match:int;
+ Damage_Per_Type_Match_Plus:int;
+ Damage_Per_Mamoru_Through_Plus:int;
+ Damage_Per_Type_Aff:DamagePerTypeAff;
+ Damage_Per_Type_Aff_Plus:DamagePerTypeAff;
+ Damage_Per_Mega_Type_Aff:DamagePerTypeAff;
+ Damage_Per_Mega_Type_Aff_Plus:DamagePerTypeAff;
+ Reflector_Damage_Cut_Ratio:int;
+ Hikarinokabe_Damage_Cut_Ratio:int;
+ Needle_Guard_Damage_Demon:int;
+ Stealth_Rock_Damage_Demon:StealthRockDamageRatio;
+ Stealth_Rock_Damage_Demon_Plus:StealthRockDamageRatio;
+ Critical_Rank_Ratio:[int] (required);
+}
+
+root_type BattleSetting;
diff --git a/FlatBuffers/ZA/Battle/Schemas/LockonDesc.fbs b/FlatBuffers/ZA/Battle/Schemas/LockonDesc.fbs
new file mode 100644
index 00000000..4ccc1299
--- /dev/null
+++ b/FlatBuffers/ZA/Battle/Schemas/LockonDesc.fbs
@@ -0,0 +1,27 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+struct LockonDescRange {
+ Width:float;
+ Top:float;
+ Bottom:float;
+ Near:float;
+ Far:float;
+}
+
+struct LockonDescRangePreset {
+ Enter:LockonDescRange;
+ Change:LockonDescRange;
+ Leave:LockonDescRange;
+}
+
+table LockonDesc (fs_serializer) {
+ Presets:[LockonDescRangePreset] (required);
+ ReticleRange:float;
+ UpdateCycle:ubyte;
+ Target:ulong;
+ UnlockDelay:float;
+}
+
+root_type LockonDesc;
diff --git a/FlatBuffers/ZA/Battle/Schemas/PlayerDamage.fbs b/FlatBuffers/ZA/Battle/Schemas/PlayerDamage.fbs
new file mode 100644
index 00000000..c904d17c
--- /dev/null
+++ b/FlatBuffers/ZA/Battle/Schemas/PlayerDamage.fbs
@@ -0,0 +1,28 @@
+include "Shared/DevID.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+struct WazaDamage {
+ WazaPower:uint;
+ Damage:uint;
+}
+
+struct PokemonDamageRatio {
+ TotalPower:uint;
+ Ratio:float;
+}
+
+table MegaPokemonRatio {
+ DevNo:DevID;
+ Ratio:float;
+}
+
+table PlayerDamage (fs_serializer) {
+ Move:[WazaDamage] (required);
+ PokemonRatio:[PokemonDamageRatio] (required);
+ MegaPokemon:[MegaPokemonRatio] (required);
+}
+
+root_type PlayerDamage;
diff --git a/FlatBuffers/ZA/Battle/pkNX.Structures.FlatBuffers.ZA.Battle.csproj b/FlatBuffers/ZA/Battle/pkNX.Structures.FlatBuffers.ZA.Battle.csproj
new file mode 100644
index 00000000..6b512ec9
--- /dev/null
+++ b/FlatBuffers/ZA/Battle/pkNX.Structures.FlatBuffers.ZA.Battle.csproj
@@ -0,0 +1 @@
+
diff --git a/FlatBuffers/ZA/Directory.Build.props b/FlatBuffers/ZA/Directory.Build.props
new file mode 100644
index 00000000..16b126ef
--- /dev/null
+++ b/FlatBuffers/ZA/Directory.Build.props
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+ ..\..\pkNX.Structures.FlatBuffers\Schemas\
+
+
+
+
+
+
+
+
+ ..\Shared\Schemas\
+
+
+
+
+
+
+
+
+
diff --git a/FlatBuffers/ZA/Item/Schemas/Enums/ItemType.fbs b/FlatBuffers/ZA/Item/Schemas/Enums/ItemType.fbs
new file mode 100644
index 00000000..82d677a5
--- /dev/null
+++ b/FlatBuffers/ZA/Item/Schemas/Enums/ItemType.fbs
@@ -0,0 +1,14 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum ItemType : int {
+ ITEMTYPE_0 = 0,
+ ITEMTYPE_1 = 1,
+ ITEMTYPE_2 = 2,
+ ITEMTYPE_3 = 3,
+ ITEMTYPE_4 = 4,
+ ITEMTYPE_5 = 5,
+ ITEMTYPE_6 = 6,
+ ITEMTYPE_7 = 7,
+ ITEMTYPE_8 = 8,
+ ITEMTYPE_9 = 9,
+}
diff --git a/FlatBuffers/ZA/Item/Schemas/FieldWazaGimmickPrivateDBArray.fbs b/FlatBuffers/ZA/Item/Schemas/FieldWazaGimmickPrivateDBArray.fbs
new file mode 100644
index 00000000..b0280475
--- /dev/null
+++ b/FlatBuffers/ZA/Item/Schemas/FieldWazaGimmickPrivateDBArray.fbs
@@ -0,0 +1,33 @@
+include "Shared/ActivationConditionParam.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table ExtensionParam {
+ PokemonPopId:string (required);
+ ItemPopId:string;
+ QuestId:string;
+ WarpParamId:string;
+ ImpactAroundId:string;
+}
+
+table FieldWazaGimmickPrivate {
+ GroupId:string;
+ ObjectName:[string] (required);
+ GimmickId:string;
+ RepopInterval:int;
+ RepopOffset:int;
+ Spawner:bool;
+ Extension:ExtensionParam (required);
+ ActivationConditionParamList:[ActivationConditionParam];
+}
+
+table FieldWazaGimmickPrivateDB {
+ Table:[FieldWazaGimmickPrivate] (required);
+}
+
+table FieldWazaGimmickPrivateDBArray (fs_serializer) {
+ Table:[FieldWazaGimmickPrivateDB] (required);
+}
+
+root_type FieldWazaGimmickPrivateDBArray;
diff --git a/FlatBuffers/ZA/Item/Schemas/HudLineupArray.fbs b/FlatBuffers/ZA/Item/Schemas/HudLineupArray.fbs
new file mode 100644
index 00000000..90400024
--- /dev/null
+++ b/FlatBuffers/ZA/Item/Schemas/HudLineupArray.fbs
@@ -0,0 +1,21 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table HudInventory {
+ Field00:uint;
+ Items:[uint] (required);
+}
+
+table HudLineup {
+ Name:string (required);
+ Field01:uint;
+ Field02:uint;
+ Inventory:[HudInventory] (required);
+}
+
+table HudLineupArray (fs_serializer) {
+ Table:[HudLineup] (required);
+}
+
+root_type HudLineupArray;
diff --git a/FlatBuffers/ZA/Item/Schemas/ItemDataArray.fbs b/FlatBuffers/ZA/Item/Schemas/ItemDataArray.fbs
new file mode 100644
index 00000000..cca8dd1f
--- /dev/null
+++ b/FlatBuffers/ZA/Item/Schemas/ItemDataArray.fbs
@@ -0,0 +1,64 @@
+include "Shared/WazaID.fbs";
+include "Enums/ItemType.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table ItemData {
+ Id:int (key);
+ ItemType:ItemType;
+ InternalName:string (required);
+ IconName:string (required);
+ Price:int;
+ Pocket:int;
+ SlotMaxNum:int;
+ SortNum:int;
+ PriceMegaShard:int;
+ PriceColorfulScrew:int;
+ CanNotHold:bool;
+ MachineWaza:WazaID;
+ MachineIndex:int;
+ WorkRecvSleep:bool;
+ WorkRecvPoison:bool;
+ WorkRecvBurn:bool;
+ WorkRecvFreeze:bool;
+ WorkRecvParalyze:bool;
+ WorkRecvConfuse:bool;
+ WorkRecvMero:bool;
+ WorkAttack:int;
+ WorkDefense:int;
+ WorkSpAttack:int;
+ WorkSpDefense:int;
+ WorkSpeed:int;
+ WorkAccuracy:int;
+ WorkCritical:int;
+ WorkEffectGuard:int;
+ MintNature:int;
+ WorkRecvPower:int;
+ HealPercentage:int;
+ WorkRevival:int;
+ RevivePercentage:int;
+ ExpPointGain:int;
+ MaxUseLevel:int; // 100 for Rare Candy, otherwise 0
+ WorkFriendly1:int;
+ WorkFriendly2:int;
+ WorkFriendly3:int;
+ WorkEvolutional:bool;
+ WorkFormChange:bool;
+ WorkStatusHp:int;
+ WorkStatusAtk:int;
+ WorkStatusDef:int;
+ WorkStatusSpd:int;
+ WorkStatusSAtk:int;
+ WorkStatusSDef:int;
+ EquipPower:int;
+ AutoHealPriority:int;
+ CanUseInBattle:bool;
+ SwapIntoId:int; // only used for Pebble -> Zygardite
+}
+
+table ItemDataArray (fs_serializer) {
+ Table:[ItemData] (required);
+}
+
+root_type ItemDataArray;
diff --git a/FlatBuffers/ZA/Item/Schemas/ItemTableDataDBArray.fbs b/FlatBuffers/ZA/Item/Schemas/ItemTableDataDBArray.fbs
new file mode 100644
index 00000000..2c897b3b
--- /dev/null
+++ b/FlatBuffers/ZA/Item/Schemas/ItemTableDataDBArray.fbs
@@ -0,0 +1,27 @@
+include "Shared/ActivationCondition.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table ItemLotteryData {
+ ItemId:string (required);
+ Weight:int;
+ MaxCount:int;
+ Type:int;
+ ActivationConditionArray:[ActivationCondition];
+}
+
+table ItemTableData {
+ Id:string (required);
+ ItemLotteryDataList:[ItemLotteryData] (required);
+}
+
+table ItemTableDataDB {
+ Data:[ItemTableData] (required);
+}
+
+table ItemTableDataDBArray (fs_serializer) {
+ Table:[ItemTableDataDB] (required);
+}
+
+root_type ItemTableDataDBArray;
diff --git a/FlatBuffers/ZA/Item/Schemas/RandomPopItemSpawnerDataDBArray.fbs b/FlatBuffers/ZA/Item/Schemas/RandomPopItemSpawnerDataDBArray.fbs
new file mode 100644
index 00000000..8c4bc0ca
--- /dev/null
+++ b/FlatBuffers/ZA/Item/Schemas/RandomPopItemSpawnerDataDBArray.fbs
@@ -0,0 +1,35 @@
+include "Shared/ActivationCondition.fbs";
+include "Shared/AppearanceInfo.fbs";
+include "Shared/CoolTimeInfo.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table RandomPopItemTableInfo {
+ TableId:string (required);
+ TableInfoActivationConditionArray:[ActivationCondition];
+}
+
+table AppearanceSpawnerObjectInfo {
+ ObjectName:string (required);
+ CreateScenePath:string;
+ AppearanceInfoData:AppearanceInfo;
+}
+
+table RandomPopItemSpawnerData {
+ Id:string (required);
+ AppearanceSpawnerObjectInfoList:[AppearanceSpawnerObjectInfo] (required);
+ CoolTime:CoolTimeInfo;
+ ActivationConditionArray:[ActivationCondition] (required);
+ TableInfoList:[RandomPopItemTableInfo] (required);
+}
+
+table RandomPopItemSpawnerDataDB {
+ Table:[RandomPopItemSpawnerData] (required);
+}
+
+table RandomPopItemSpawnerDataDBArray (fs_serializer) {
+ Table:[RandomPopItemSpawnerDataDB] (required);
+}
+
+root_type RandomPopItemSpawnerDataDBArray;
diff --git a/FlatBuffers/ZA/Item/Schemas/ShopLineupArray.fbs b/FlatBuffers/ZA/Item/Schemas/ShopLineupArray.fbs
new file mode 100644
index 00000000..005d6b4a
--- /dev/null
+++ b/FlatBuffers/ZA/Item/Schemas/ShopLineupArray.fbs
@@ -0,0 +1,33 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table ShopLineupArray (fs_serializer) {
+ Table:[ShopLineup] (required);
+}
+
+table ShopLineup {
+ Name:string (required);
+ Inventory:[ShopInventory] (required);
+}
+
+table ShopInventory {
+ Item:uint;
+ DisplayIndex:uint;
+ Conditions:[ShopInventoryCondition] (required);
+}
+
+table ShopInventoryCondition {
+ Table:[ShopInventoryConditionHolder] (required);
+}
+
+table ShopInventoryConditionHolder {
+ Table:[ShopInventoryAppearConditionsHolder] (required);
+}
+
+table ShopInventoryAppearConditionsHolder {
+ Condition:string;
+ Comparison:uint;
+ Arguments:[string];
+}
+
+root_type ShopLineupArray;
diff --git a/FlatBuffers/ZA/Item/Schemas/ZARewardItemDataArray.fbs b/FlatBuffers/ZA/Item/Schemas/ZARewardItemDataArray.fbs
new file mode 100644
index 00000000..964682ab
--- /dev/null
+++ b/FlatBuffers/ZA/Item/Schemas/ZARewardItemDataArray.fbs
@@ -0,0 +1,22 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table ZARewardItem {
+ ItemID:string (required);
+ Quantity:uint;
+ Weight:uint;
+}
+
+table ZARewardItemData {
+ ID:string (required);
+ MinWinStreak:uint;
+ MaxWinStreak:uint;
+ Field03:byte;
+ RewardItem:[ZARewardItem] (required);
+}
+
+table ZARewardItemDataArray (fs_serializer) {
+ Table:[ZARewardItemData] (required);
+}
+
+root_type ZARewardItemDataArray;
diff --git a/FlatBuffers/ZA/Item/pkNX.Structures.FlatBuffers.ZA.Item.csproj b/FlatBuffers/ZA/Item/pkNX.Structures.FlatBuffers.ZA.Item.csproj
new file mode 100644
index 00000000..35e3d842
--- /dev/null
+++ b/FlatBuffers/ZA/Item/pkNX.Structures.FlatBuffers.ZA.Item.csproj
@@ -0,0 +1,2 @@
+
+
diff --git a/FlatBuffers/ZA/Misc/Schemas/DressUpDataArray.fbs b/FlatBuffers/ZA/Misc/Schemas/DressUpDataArray.fbs
new file mode 100644
index 00000000..e456c42a
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/DressUpDataArray.fbs
@@ -0,0 +1,25 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table DressUpData {
+ MagicValue:uint;
+ Name:string (required);
+ Field02:uint;
+ Field03:string (required);
+ Field04:uint;
+ Field05:uint;
+ Color1:string (required); // color
+ Color2:string (required); // color
+ Flag08:bool;
+ Field09:uint;
+ Field10:uint;
+ Field11:string; // not required
+ Flag12:bool;
+}
+
+table DressUpDataArray (fs_serializer) {
+ Table:[DressUpData] (required);
+}
+
+root_type DressUpDataArray;
diff --git a/FlatBuffers/ZA/Misc/Schemas/DressUpEnsembleDataArray.fbs b/FlatBuffers/ZA/Misc/Schemas/DressUpEnsembleDataArray.fbs
new file mode 100644
index 00000000..885f17d9
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/DressUpEnsembleDataArray.fbs
@@ -0,0 +1,23 @@
+include "Shared/ActivationCondition.fbs";
+include "Shared/ActivationConditionElement.fbs";
+include "Shared/ActivationConditionParam.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table DressUpEnsemble {
+ MagicValue:uint;
+ Condition:[ActivationCondition] (required);
+}
+
+table DressUpEnsembleData {
+ MagicValue:uint;
+ Ensemble:[DressUpEnsemble] (required);
+}
+
+table DressUpEnsembleDataArray (fs_serializer) {
+ Table:[DressUpEnsembleData] (required);
+}
+
+root_type DressUpEnsembleDataArray;
\ No newline at end of file
diff --git a/FlatBuffers/ZA/Misc/Schemas/DressUpGroupDataArray.fbs b/FlatBuffers/ZA/Misc/Schemas/DressUpGroupDataArray.fbs
new file mode 100644
index 00000000..138c963f
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/DressUpGroupDataArray.fbs
@@ -0,0 +1,15 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table DressUpGroupData {
+ Name:string (required);
+ Value:uint;
+ Group:string (required);
+}
+
+table DressUpGroupDataArray (fs_serializer) {
+ Table:[DressUpGroupData] (required);
+}
+
+root_type DressUpGroupDataArray;
diff --git a/FlatBuffers/ZA/Misc/Schemas/EventConst.fbs b/FlatBuffers/ZA/Misc/Schemas/EventConst.fbs
new file mode 100644
index 00000000..c40a86e9
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/EventConst.fbs
@@ -0,0 +1,14 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table EventConst {
+ Name:string (required);
+ Value:string (required);
+}
+
+table EventConstArray (fs_serializer) {
+ Table:[EventConst] (required);
+}
+
+root_type EventConstArray;
diff --git a/FlatBuffers/ZA/Misc/Schemas/EventControl.fbs b/FlatBuffers/ZA/Misc/Schemas/EventControl.fbs
new file mode 100644
index 00000000..9501435a
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/EventControl.fbs
@@ -0,0 +1,36 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table EventControl {
+ Name:string (required);
+ Field01:uint;
+ Field02:bool;
+ Field03:bool;
+ Field04:bool; // unused?
+ Field05:bool;
+ Field06:bool;
+ Field07:bool;
+ Field08:string;
+ Field09:bool; // unused?
+ Field10:bool; // unused?
+ Field11:bool;
+ Field12:string;
+ Field13:bool;
+ Field14:bool;
+ Field15:bool;
+ Field16:bool;
+ Field17:bool;
+ Field18:string;
+ Field19:string;
+ Field20:bool;
+ Field21:bool;
+ Field22:bool;
+ Field23:bool;
+}
+
+table EventControlArray (fs_serializer) {
+ Table:[EventControl] (required);
+}
+
+root_type EventControlArray;
diff --git a/FlatBuffers/ZA/Misc/Schemas/EventLabel.fbs b/FlatBuffers/ZA/Misc/Schemas/EventLabel.fbs
new file mode 100644
index 00000000..36eb6d2b
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/EventLabel.fbs
@@ -0,0 +1,13 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table EventLabel {
+ Name:string (required);
+}
+
+table EventLabelArray (fs_serializer) {
+ Table:[EventLabel] (required);
+}
+
+root_type EventLabelArray;
diff --git a/FlatBuffers/ZA/Misc/Schemas/FieldWeatherTable.fbs b/FlatBuffers/ZA/Misc/Schemas/FieldWeatherTable.fbs
new file mode 100644
index 00000000..7ede3619
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/FieldWeatherTable.fbs
@@ -0,0 +1,100 @@
+include "FieldWeatherType.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+enum FieldClimateType : int
+{
+ None = -1,
+ Normal = 0,
+ Cold = 1,
+ Hot = 2,
+}
+
+enum StringForStruct : int
+{
+ NONE = -1,
+ weather_table_main = 0,
+ desert = 1,
+ snowy = 2,
+ room = 3,
+}
+
+struct WeatherTimeZone {
+ From:float;
+ To:float;
+}
+
+table WeatherSoundParam {
+ SoundStateEventName:string;
+ SoundRTPCValue:float;
+}
+
+table WeatherSoundTable {
+ Sunny:WeatherSoundParam;
+ Cloudy:WeatherSoundParam;
+ Rain:WeatherSoundParam;
+ Storm:WeatherSoundParam;
+ Mist:WeatherSoundParam;
+ ClearSunny:WeatherSoundParam;
+ Rainbow:WeatherSoundParam;
+}
+
+struct WeatherReplace {
+ OrgWeather:FieldWeatherType;
+ ReplaceWeather:FieldWeatherType;
+ ValidTimeZone:[WeatherTimeZone:3];
+}
+
+struct FieldWeatherDefine {
+ Type:FieldWeatherType;
+ Prob:int;
+}
+
+struct FieldWeatherDefineSub {
+ MainWeather:FieldWeatherType;
+ SubWeather:[FieldWeatherDefine:9];
+}
+
+struct FieldWeatherSpecialTransition {
+ Type:FieldWeatherType;
+ TransitionFrom:FieldWeatherType;
+ TransitionTo:FieldWeatherType;
+ MinDuration:int;
+ MaxDuration:int;
+}
+
+struct FieldWeatherStructSub {
+ Tag:StringForStruct;
+ Climate:FieldClimateType;
+ MinDuration:int;
+ MaxDuration:int;
+ OutdoorWeatherTable:StringForStruct;
+ Weather:[FieldWeatherDefineSub:11];
+ SpecialTransition:[FieldWeatherSpecialTransition:4];
+}
+
+struct FieldWeatherStructSubList {
+ List:[FieldWeatherStructSub:8];
+}
+
+struct FieldWeatherStructMain {
+ Tag:StringForStruct;
+ Climate:FieldClimateType;
+ MinDuration:int;
+ MaxDuration:int;
+ Weather:[FieldWeatherDefine:9];
+ SpecialTransition:[FieldWeatherSpecialTransition:4];
+ Replace:[WeatherReplace:4];
+}
+
+table FieldWeatherTable (fs_serializer) {
+ TransitionSpan:float;
+ TransitionSpanForFix:float;
+ Main:FieldWeatherStructMain;
+ Sub:FieldWeatherStructSubList;
+ Sound:WeatherSoundTable;
+}
+
+root_type FieldWeatherTable;
diff --git a/FlatBuffers/ZA/Misc/Schemas/FieldWeatherType.fbs b/FlatBuffers/ZA/Misc/Schemas/FieldWeatherType.fbs
new file mode 100644
index 00000000..d7dfc01b
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/FieldWeatherType.fbs
@@ -0,0 +1,19 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum FieldWeatherType : int
+{
+ None = -1,
+ Sunny = 0,
+ Cloudy = 1,
+ Rain = 2,
+ Storm = 3,
+ Snow = 4,
+ SnowStorm = 5,
+ DiamondDust = 6,
+ SandStorm = 7,
+ Mist = 8,
+ ClearSunny = 9,
+ Rainbow = 10,
+ Count = 11,
+ RainToSunny = 12,
+}
diff --git a/FlatBuffers/ZA/Misc/Schemas/HairMakeDataArray.fbs b/FlatBuffers/ZA/Misc/Schemas/HairMakeDataArray.fbs
new file mode 100644
index 00000000..9e3346e4
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/HairMakeDataArray.fbs
@@ -0,0 +1,21 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table HairMakeData {
+ Value:uint;
+ Resource:string (required);
+ Type:uint;
+ Bool03:bool;
+ Color:string;
+ Name:string;
+ SortOrder:uint;
+ Pattern1:int;
+ Pattern2:int;
+}
+
+table HairMakeDataArray (fs_serializer) {
+ Table:[HairMakeData] (required);
+}
+
+root_type HairMakeDataArray;
diff --git a/FlatBuffers/ZA/Misc/Schemas/TitleArray.fbs b/FlatBuffers/ZA/Misc/Schemas/TitleArray.fbs
new file mode 100644
index 00000000..2add3897
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/TitleArray.fbs
@@ -0,0 +1,29 @@
+include "Shared/ActivationConditionElement.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table Medal {
+ Name:string;
+ Requirement:[ActivationConditionElement];
+}
+
+table Title {
+ Index:uint;
+ Name:string (required);
+ Text:string (required);
+ Count:string;
+ Complete:string;
+ Type:uint;
+ Requirement:[ActivationConditionElement] (required);
+ Bronze:Medal;
+ Silver:Medal;
+ Gold:Medal;
+}
+
+table TitleArray (fs_serializer) {
+ Table:[Title] (required);
+}
+
+root_type TitleArray;
diff --git a/FlatBuffers/ZA/Misc/Schemas/TitleCountArray.fbs b/FlatBuffers/ZA/Misc/Schemas/TitleCountArray.fbs
new file mode 100644
index 00000000..9bdedc88
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/TitleCountArray.fbs
@@ -0,0 +1,17 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table TitleCount {
+ Index:string (required);
+ Type1:uint;
+ Type2:int;
+ Type3:uint;
+ Flag4:bool;
+}
+
+table TitleCountArray (fs_serializer) {
+ Table:[TitleCount] (required);
+}
+
+root_type TitleCountArray;
diff --git a/FlatBuffers/ZA/Misc/Schemas/WeatherHappeningParamArray.fbs b/FlatBuffers/ZA/Misc/Schemas/WeatherHappeningParamArray.fbs
new file mode 100644
index 00000000..46f82395
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/Schemas/WeatherHappeningParamArray.fbs
@@ -0,0 +1,38 @@
+include "FieldWeatherType.fbs";
+include "Math/PackedVec3f.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+struct TimeZone {
+ From:int;
+ To:int;
+}
+
+table WeatherHappeningParam {
+ Name:string;
+ TemplatePath:string;
+ SceneName:string;
+ PrevWeather0:FieldWeatherType;
+ PrevWeather1:FieldWeatherType;
+ PrevWeather2:FieldWeatherType;
+ CurWeather0:FieldWeatherType;
+ CurWeather1:FieldWeatherType;
+ CurWeather2:FieldWeatherType;
+ TimeZone0:TimeZone;
+ TimeZone1:TimeZone;
+ TimeZone2:TimeZone;
+ Prob:int;
+ MinDuration:int;
+ MaxDuration:int;
+ FollowCamera:bool;
+ Offset:PackedVec3f;
+ FollowSun:bool;
+}
+
+table WeatherHappeningParamArray (fs_serializer) {
+ Table:[WeatherHappeningParam] (required);
+}
+
+root_type WeatherHappeningParamArray;
diff --git a/FlatBuffers/ZA/Misc/pkNX.Structures.FlatBuffers.ZA.Misc.csproj b/FlatBuffers/ZA/Misc/pkNX.Structures.FlatBuffers.ZA.Misc.csproj
new file mode 100644
index 00000000..46d17945
--- /dev/null
+++ b/FlatBuffers/ZA/Misc/pkNX.Structures.FlatBuffers.ZA.Misc.csproj
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/FlatBuffers/ZA/Personal/Dumpers/PersonalDumper9a.cs b/FlatBuffers/ZA/Personal/Dumpers/PersonalDumper9a.cs
new file mode 100644
index 00000000..dca092aa
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Dumpers/PersonalDumper9a.cs
@@ -0,0 +1,379 @@
+using pkNX.Containers;
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+public class PersonalDumper9a
+{
+ public const bool HasAbilities = true;
+
+ public required IReadOnlyList Abilities { private get; init; }
+ public required IReadOnlyList Types { private get; init; }
+ public required IReadOnlyList Items { private get; init; }
+ public required IReadOnlyList Colors { private get; init; }
+ public required IReadOnlyList EggGroups { private get; init; }
+ public required IReadOnlyList ExpGroups { private get; init; }
+ public required IReadOnlyList Moves { protected get; init; }
+ public required IReadOnlyList Species { private get; init; }
+ public required IReadOnlyList ZukanA { private get; init; }
+ public required IReadOnlyList ZukanB { private get; init; }
+ public required AHTB ZukanAHTB { private get; init; }
+
+ public static ReadOnlySpan TMIndexes => PersonalInfo9ZA.TMIndexes;
+
+ private static readonly string[] AbilitySuffix = [" (1)", " (2)", " (H)"];
+
+ public IReadOnlyList> MoveSpeciesLearn { get; private set; } = [];
+
+ public readonly PersonalDumperSettings Settings = new();
+
+ public List Dump(PersonalTable9ZA table)
+ {
+ var lines = new List();
+ var ml = new List[Moves.Count];
+ for (int i = 0; i < ml.Length; i++)
+ ml[i] = [];
+ MoveSpeciesLearn = ml;
+
+ for (ushort species = 0; species <= table.MaxSpeciesID; species++)
+ {
+ var pi = table[species];
+ var specInternal = SpeciesConverterZA.GetInternal9(species);
+ for (byte form = 0; form < pi.FormCount; form++)
+ AddDump(lines, table, specInternal, species, form);
+ }
+ return lines;
+ }
+
+ private string GetSpeciesName(ushort internalIndex) => Species[internalIndex];
+
+ public void AddDump(List lines, PersonalTable9ZA table, ushort speciesInternal, ushort species, byte form)
+ {
+ var index = table.GetFormIndex(species, form);
+ var entry = table[index];
+ string name = GetSpeciesName(speciesInternal);
+ if (form != 0)
+ name += $"-{form}";
+ name += $" #{entry.DexIndex:000}";
+ AddDump(lines, entry, index, name, speciesInternal, form);
+ }
+
+ private void AddDump(List lines, PersonalInfo9ZA pi, int entry, string name, ushort speciesInternal, byte form)
+ {
+ if (pi is { IsPresentInGame: false })
+ return;
+
+ var specName = GetSpeciesName(speciesInternal);
+ var specCode = pi.FormCount > 1 ? $"{specName}-{form}" : $"{specName}";
+
+ if (Settings.Stats)
+ AddPersonalLines(lines, pi, entry, name, specCode);
+
+ if (pi.SpeciesClassMajor is not 0 || pi.SpeciesClassMinor is not 0)
+ {
+ var classification = pi.SpeciesClassMajor is not 0 && pi.SpeciesClassMinor is 0 ? $"Classifications: {GetClassificationDisplayNameMajor(pi.SpeciesClassMajor)}"
+ : pi.SpeciesClassMinor is not 0 && pi.SpeciesClassMajor is 0 ? $"Classifications: {GetClassificationDisplayNameMinor(pi.SpeciesClassMinor, speciesInternal)}"
+ : $"Classifications: {GetClassificationDisplayNameMajor(pi.SpeciesClassMajor)} / {GetClassificationDisplayNameMinor(pi.SpeciesClassMinor, speciesInternal)}";
+
+ lines.Add(classification);
+ }
+
+ lines.Add($"Alpha Move: {Moves[pi.AlphaMove]}");
+ if (!pi.FB.TechnicalMachine.Contains(pi.AlphaMove))
+ lines.Add("ALPHA MOVE NOT IN TM LIST");
+ if (Settings.Learn)
+ AddLearnsets(pi.FB, lines, specCode);
+ if (Settings.Evo)
+ AddEvolutions(pi.FB, lines);
+ if (Settings.Dex)
+ AddZukan(lines, ZukanA, speciesInternal, form);
+
+ lines.Add("");
+ }
+
+ private void AddZukan(List lines, IReadOnlyList zukanA, ushort speciesInternal, byte form)
+ {
+ if (speciesInternal >= Species.Count)
+ return;
+ var hash = FnvHash.HashFnv1a_64($"ZKN_COMMENT_A_{speciesInternal:000}_{form:000}"); // no need to check for B, only one version
+ var line = ZukanAHTB.GetString(hash, zukanA);
+ lines.Add(line.Replace("\\n", " "));
+ }
+
+ private void AddLearnsets(PersonalInfo fb, List lines, string specCode)
+ {
+ var learn = fb.Learnset;
+ lines.Add("Level Up Moves:");
+ foreach (var x in learn)
+ {
+ var move = x.Move;
+ var level = x.Level switch
+ {
+ -3 => "EVO",
+ -2 => "RELEARN",
+ _ => $"{x.Level:00}",
+ };
+ lines.Add($"- [{level}] {Moves[move]} {{{x.LevelPlus}}}");
+ MoveSpeciesLearn[move].Add(specCode);
+ }
+
+ if (TMIndexes.Length != 0)
+ {
+ var tmMoveIDs = fb.TechnicalMachine;
+ if (tmMoveIDs.Count != 0)
+ {
+ lines.Add("TM Learn:");
+ foreach (var move in tmMoveIDs.OrderBy(z => TMIndexes.IndexOf(z)))
+ {
+ var tmID = TMIndexes.IndexOf(move);
+ if (tmID < 0)
+ continue;
+ lines.Add($"- [TM{tmID+1:000}] {Moves[move]}");
+ MoveSpeciesLearn[move].Add(specCode);
+ }
+ }
+ }
+
+ {
+ var egg = fb.EggMoves;
+ if (egg.Count != 0)
+ {
+ lines.Add("Egg Moves:");
+ foreach (var move in egg)
+ {
+ lines.Add($"- {Moves[move]}");
+ MoveSpeciesLearn[move].Add(specCode);
+ }
+ }
+ }
+ {
+ var tmMoveIDs = fb.ReminderMoves;
+ if (tmMoveIDs.Count != 0)
+ {
+ lines.Add("Reminder:");
+ foreach (var move in tmMoveIDs)
+ {
+ lines.Add($"- {Moves[move]}");
+ MoveSpeciesLearn[move].Add(specCode);
+ }
+ }
+ }
+ }
+
+ private void AddEvolutions(PersonalInfo fb, List lines)
+ {
+ var evo = fb.Evolutions;
+ if (evo.Count == 0)
+ return;
+
+ foreach (var z in evo)
+ {
+ if (z.Reserved3 != 0 || z.Reserved4 != 0 || z.Reserved5 != 0)
+ throw new Exception("Reserved fields not 0");
+
+ var method = (EvolutionType)z.Method;
+ string arg = GetArgTypeDisplayValue(method, z.Argument);
+ var line = $"Evolves into {GetSpeciesName(z.SpeciesInternal)}-{z.Form} @ lv{z.Level} ({method}) [{arg}]";
+ lines.Add(line);
+ }
+ }
+
+ private string GetArgTypeDisplayValue(EvolutionType type, ushort value)
+ {
+ if (type.IsPlibUseItemType())
+ {
+ var item = Plib9.PlibToItem[value];
+ return Items[item];
+ }
+ var argType = type.GetArgType();
+ return GetArgTypeDisplayValue(argType, value);
+ }
+
+ private string GetArgTypeDisplayValue(EvolutionTypeArgumentType argType, ushort value) => argType switch
+ {
+ EvolutionTypeArgumentType.Level => value.ToString(),
+ EvolutionTypeArgumentType.NoArg => value.ToString(),
+ EvolutionTypeArgumentType.Items => Items[value],
+ EvolutionTypeArgumentType.Moves => Moves[value],
+ EvolutionTypeArgumentType.Species => GetSpeciesName(value),
+ EvolutionTypeArgumentType.Type => Types[value],
+ EvolutionTypeArgumentType.Stat => value.ToString(),
+ EvolutionTypeArgumentType.Version => value.ToString(),
+ _ => throw new ArgumentOutOfRangeException(nameof(argType), argType, null),
+ };
+
+ private string GetClassificationDisplayNameMajor(byte classification) => classification switch
+ {
+ (byte)SpeciesClassificationMajor.Legend => "Legendary",
+ (byte)SpeciesClassificationMajor.SubLegend => "Sub-Legendary",
+ (byte)SpeciesClassificationMajor.Mythical => "Mythical",
+ _ => throw new ArgumentOutOfRangeException(nameof(classification), classification, null),
+ };
+
+ private string GetClassificationDisplayNameMinor(uint classification, ushort species) => classification switch
+ {
+ (ushort)SpeciesClassificationMinor.UltraBeast => "Ultra Beast",
+ (ushort)SpeciesClassificationMinor.ParadoxPast => "Paradox (Past)",
+ (ushort)SpeciesClassificationMinor.ParadoxFuture => "Paradox (Future)",
+ (ushort)SpeciesClassificationMinor.SpecialBattleForm when species is 0382 or 0383 => "Primal Reversion",
+ (ushort)SpeciesClassificationMinor.SpecialBattleForm => "Mega Evolution",
+ _ => throw new ArgumentOutOfRangeException(nameof(classification), classification, null),
+ };
+
+ private void AddPersonalLines(List lines, IPersonalInfo pi, int entry, string name, string specCode)
+ {
+ lines.Add("======");
+ lines.Add($"{entry:000} - {name} (Stage: {pi.EvoStage})");
+ lines.Add("======");
+ if (pi is IPersonalMisc_SWSH { IsPresentInGame: false })
+ lines.Add("Present: No");
+ lines.Add($"Base Stats: {pi.HP}.{pi.ATK}.{pi.DEF}.{pi.SPA}.{pi.SPD}.{pi.SPE} (BST: {pi.GetBaseStatTotal()})");
+ lines.Add($"EV Yield: {pi.EV_HP}.{pi.EV_ATK}.{pi.EV_DEF}.{pi.EV_SPA}.{pi.EV_SPD}.{pi.EV_SPE}");
+ lines.Add($"Gender Ratio: {pi.Gender}");
+ lines.Add($"Catch Rate: {pi.CatchRate}");
+
+ if (HasAbilities)
+ {
+ var abils = new int[pi.GetNumAbilities()];
+ pi.GetAbilities(abils);
+ var msg = string.Join(" | ", abils.Select((z, j) => Abilities[z] + AbilitySuffix[j]));
+ lines.Add($"Abilities: {msg}");
+ }
+
+ lines.Add(string.Format(pi.Type1 != pi.Type2
+ ? "Type: {0} / {1}"
+ : "Type: {0}", Types[(int)pi.Type1], Types[(int)pi.Type2]));
+
+ lines.Add($"EXP Group: {ExpGroups[pi.EXPGrowth]}");
+ lines.Add(string.Format(pi.EggGroup1 != pi.EggGroup2
+ ? "Egg Group: {0} / {1}"
+ : "Egg Group: {0}", EggGroups[pi.EggGroup1], EggGroups[pi.EggGroup2]));
+ lines.Add($"Height: {(decimal)pi.Height / 100:00.00}m, Weight: {(decimal)pi.Weight / 10:000.0}kg, Color: {Colors[pi.Color]}");
+ }
+}
+
+public static class Plib9
+{
+ public static bool IsPlibUseItemType(this EvolutionType method) => method switch
+ {
+ EvolutionType.UseItem => true,
+ EvolutionType.UseItemMale => true,
+ EvolutionType.UseItemFemale => true,
+ EvolutionType.LevelUpHeldItemDay => true,
+ EvolutionType.LevelUpHeldItemNight => true,
+ //EvolutionType.UseItemWormhole => true,
+ //EvolutionType.UseItemFullMoon => true,
+ _ => false,
+ };
+
+ // plib_item_conversion_array
+ // inverted {a,b} => {b,a} so we can get the item ID from plib evo arg.
+
+ public static readonly Dictionary PlibToItem = new()
+ {
+ { 0001, 0080 }, // Sun Stone
+ { 0002, 0081 }, // Moon Stone
+ { 0003, 0082 }, // Fire Stone
+ { 0004, 0083 }, // Thunder Stone
+ { 0005, 0084 }, // Water Stone
+ { 0006, 0085 }, // Leaf Stone
+ { 0007, 0107 }, // Shiny Stone
+ { 0008, 0108 }, // Dusk Stone
+ { 0009, 0110 }, // Oval Stone
+ { 0010, 1779 }, // Griseous Core
+ { 0011, 0000 },
+ { 0012, 0000 },
+ { 0013, 0000 },
+ { 0014, 0000 },
+ { 0015, 0229 }, // Everstone
+ { 0016, 0236 }, // Light Ball
+ { 0017, 0000 },
+ { 0018, 0000 },
+ { 0019, 0280 }, // Destiny Knot
+ { 0020, 0289 }, // Power Bracer
+ { 0021, 0290 }, // Power Belt
+ { 0022, 0291 }, // Power Lens
+ { 0023, 0292 }, // Power Band
+ { 0024, 0293 }, // Power Anklet
+ { 0025, 0294 }, // Power Weight
+ { 0026, 0298 }, // Flame Plate
+ { 0027, 0299 }, // Splash Plate
+ { 0028, 0300 }, // Zap Plate
+ { 0029, 0301 }, // Meadow Plate
+ { 0030, 0302 }, // Icicle Plate
+ { 0031, 0303 }, // Fist Plate
+ { 0032, 0304 }, // Toxic Plate
+ { 0033, 0305 }, // Earth Plate
+ { 0034, 0306 }, // Sky Plate
+ { 0035, 0307 }, // Mind Plate
+ { 0036, 0308 }, // Insect Plate
+ { 0037, 0309 }, // Stone Plate
+ { 0038, 0310 }, // Spooky Plate
+ { 0039, 0311 }, // Draco Plate
+ { 0040, 0312 }, // Dread Plate
+ { 0041, 0313 }, // Iron Plate
+ { 0042, 0000 },
+ { 0043, 0000 },
+ { 0044, 0000 },
+ { 0045, 0000 },
+ { 0046, 0000 },
+ { 0047, 0000 },
+ { 0048, 0000 },
+ { 0049, 0326 }, // Razor Claw
+ { 0050, 0327 }, // Razor Fang
+ { 0051, 0644 }, // Pixie Plate
+ { 0052, 0849 }, // Ice Stone
+ { 0053, 0000 },
+ { 0054, 0000 },
+ { 0055, 0000 },
+ { 0056, 0000 },
+ { 0057, 0000 },
+ { 0058, 0000 },
+ { 0059, 0000 },
+ { 0060, 0000 },
+ { 0061, 0000 },
+ { 0062, 0000 },
+ { 0063, 0000 },
+ { 0064, 0000 },
+ { 0065, 0000 },
+ { 0066, 0000 },
+ { 0067, 0000 },
+ { 0068, 0000 },
+ { 0069, 0000 },
+ { 0070, 1103 }, // Rusted Sword
+ { 0071, 1104 }, // Rusted Shield
+ { 0072, 1109 }, // Strawberry Sweet
+ { 0073, 1110 }, // Love Sweet
+ { 0074, 1111 }, // Berry Sweet
+ { 0075, 1112 }, // Clover Sweet
+ { 0076, 1113 }, // Flower Sweet
+ { 0077, 1114 }, // Star Sweet
+ { 0078, 1115 }, // Ribbon Sweet
+ { 0079, 1116 }, // Sweet Apple
+ { 0080, 1117 }, // Tart Apple
+ { 0081, 1253 }, // Cracked Pot
+ { 0082, 1254 }, // Chipped Pot
+ { 0083, 1582 }, // Galarica Cuff
+ { 0084, 1592 }, // Galarica Wreath
+ { 0085, 2344 }, // Auspicious Armor
+ { 0086, 1861 }, // Malicious Armor
+ { 0087, 2345 }, // Leader’s Crest
+ { 0088, 1857 }, // Scroll of Darkness
+ { 0089, 1858 }, // Scroll of Waters
+ { 0090, 0000 },
+ { 0091, 0000 },
+ { 0092, 0218 }, // Soothe Bell
+ { 0093, 0109 }, // Dawn Stone
+ { 0094, 2403 }, // Unremarkable Teacup
+ { 0095, 2404 }, // Masterpiece Teacup
+ { 0096, 2402 }, // Syrupy Apple
+ { 0111, 0537 }, // Prism Scale
+ { 0112, 0325 }, // Reaper Cloth
+ { 0113, 0252 }, // Upgrade
+ { 0114, 0324 }, // Dubious Disc
+ { 0115, 0322 }, // Electirizer
+ { 0116, 0323 }, // Magmarizer
+ { 0117, 0321 }, // Protector
+ { 0118, 0235 }, // Dragon Scale
+ { 0119, 2482 }, // Metal Alloy
+ };
+}
diff --git a/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoDex.cs b/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoDex.cs
new file mode 100644
index 00000000..96fb17e0
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoDex.cs
@@ -0,0 +1,3 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+public partial class PersonalInfoDex;
diff --git a/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoEvolution.cs b/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoEvolution.cs
new file mode 100644
index 00000000..bb1eb174
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoEvolution.cs
@@ -0,0 +1,3 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+public partial class PersonalInfoEvolution;
diff --git a/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoGender.cs b/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoGender.cs
new file mode 100644
index 00000000..d0a74baf
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoGender.cs
@@ -0,0 +1,24 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+public partial class PersonalInfoGender
+{
+ public const int RatioMagicMale = 0;
+ public const int RatioMagicFemale = 254;
+ public const int RatioMagicGenderless = 255;
+ public byte RatioMagicEquivalent() => Group switch
+ {
+ 0 => Ratio switch
+ {
+ 12 => 0x1F, // 12.5%
+ 25 => 0x3F, // 25%
+ 50 => 0x7F, // 50%
+ 75 => 0xBF, // 75%
+ 89 => 0xE1, // 87.5%
+ _ => throw new ArgumentOutOfRangeException(nameof(Ratio)),
+ },
+ SexGroup.MALE => RatioMagicMale,
+ SexGroup.FEMALE => RatioMagicFemale,
+ SexGroup.UNKNOWN => RatioMagicGenderless,
+ _ => throw new ArgumentOutOfRangeException(nameof(Group)),
+ };
+}
diff --git a/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoStats.cs b/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoStats.cs
new file mode 100644
index 00000000..41cfe709
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Personal/Types/PersonalInfoStats.cs
@@ -0,0 +1,6 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+public partial class PersonalInfoStats
+{
+ public ushort U16() => (ushort)((HP & 0b11) | ((ATK & 0b11) << 2) | ((DEF & 0b11) << 4) | ((SPE & 0b11) << 6) | ((SPA & 0b11) << 8) | ((SPD & 0b11) << 10));
+}
diff --git a/FlatBuffers/ZA/Personal/Personal/Wrapper/PersonalInfo9ZA.cs b/FlatBuffers/ZA/Personal/Personal/Wrapper/PersonalInfo9ZA.cs
new file mode 100644
index 00000000..687eeb03
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Personal/Wrapper/PersonalInfo9ZA.cs
@@ -0,0 +1,148 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+///
+/// Personal Info class with values from the games.
+///
+public sealed class PersonalInfo9ZA(PersonalInfo fb) : IPersonalInfo
+{
+ public PersonalInfo FB { get; } = fb;
+
+ public int HP { get => FB.Base.HP; set => FB.Base.HP = (byte)value; }
+ public int ATK { get => FB.Base.ATK; set => FB.Base.ATK = (byte)value; }
+ public int DEF { get => FB.Base.DEF; set => FB.Base.DEF = (byte)value; }
+ public int SPE { get => FB.Base.SPE; set => FB.Base.SPE = (byte)value; }
+ public int SPA { get => FB.Base.SPA; set => FB.Base.SPA = (byte)value; }
+ public int SPD { get => FB.Base.SPD; set => FB.Base.SPD = (byte)value; }
+ public Types Type1 { get => (Types)FB.Type1; set => FB.Type1 = (byte)value; }
+ public Types Type2 { get => (Types)FB.Type2; set => FB.Type2 = (byte)value; }
+ public int Ability1 { get => FB.Ability1; set => FB.Ability1 = (ushort)value; }
+ public int Ability2 { get => FB.Ability2; set => FB.Ability2 = (ushort)value; }
+ public int AbilityH { get => FB.AbilityH; set => FB.AbilityH = (ushort)value; }
+ public int CatchRate { get => FB.CatchRate; set => FB.CatchRate = (byte)value; }
+ public int EvoStage { get => FB.EvoStage; set => FB.EvoStage = (byte)value; }
+ public int EV_HP { get => FB.EVYield.HP; set => FB.EVYield.HP = (byte)value; }
+ public int EV_ATK { get => FB.EVYield.ATK; set => FB.EVYield.ATK = (byte)value; }
+ public int EV_DEF { get => FB.EVYield.DEF; set => FB.EVYield.DEF = (byte)value; }
+ public int EV_SPE { get => FB.EVYield.SPE; set => FB.EVYield.SPE = (byte)value; }
+ public int EV_SPA { get => FB.EVYield.SPA; set => FB.EVYield.SPA = (byte)value; }
+ public int EV_SPD { get => FB.EVYield.SPD; set => FB.EVYield.SPD = (byte)value; }
+ public byte GenderGroup { get => (byte)FB.Gender.Group; set => FB.Gender.Group = (SexGroup)value; }
+ public byte GenderRatio { get => FB.Gender.Ratio; set => FB.Gender.Ratio = value; }
+ public int Gender
+ {
+ get => FB.Gender.RatioMagicEquivalent();
+ set { }
+ }
+
+ public int BaseFriendship { get => FB.BaseFriendship; set => FB.BaseFriendship = (byte)value; }
+ public int EXPGrowth { get => FB.EXPGrowth; set => FB.EXPGrowth = (byte)value; }
+ public int EggGroup1 { get => FB.EggGroup1; set => FB.EggGroup1 = (byte)value; }
+ public int EggGroup2 { get => FB.EggGroup2; set => FB.EggGroup2 = (byte)value; }
+ public int Color { get => FB.Info.Color; set => FB.Info.Color = (byte)value; }
+ public bool IsPresentInGame { get => FB.IsPresentInGame; set => FB.IsPresentInGame = value; }
+ public int Height { get => FB.Info.Height; set => FB.Info.Height = (ushort)value; }
+ public int Weight { get => FB.Info.Weight; set => FB.Info.Weight = (ushort)value; }
+ public byte DebutVersion { get => FB.Info.DebutVersion; set => FB.Info.DebutVersion = value; }
+ public byte SpeciesClassMajor { get => FB.Info.SpeciesClassMajor; set => FB.Info.SpeciesClassMajor = value; }
+ public uint SpeciesClassMinor { get => FB.Info.SpeciesClassMinor; set => FB.Info.SpeciesClassMinor = value; }
+
+ public ushort HatchedSpecies { get => SpeciesConverterZA.GetNational9(FB.Hatch.SpeciesInternal); set => FB.Hatch.SpeciesInternal = SpeciesConverterZA.GetInternal9(value); }
+ public ushort LocalFormIndex { get => FB.Hatch.Form; set => FB.Hatch.Form = value; }
+ public bool RegionalFlags { get => FB.Hatch.RegionalFlags == 1; set => FB.Hatch.RegionalFlags = value ? (ushort)1 : (ushort)0; }
+ public ushort EverstoneForm { get => FB.Hatch.EverstoneForm; set => FB.Hatch.EverstoneForm = value; }
+
+ public ushort Form { get => FB.Info.Form; set => FB.Info.Form = value; }
+
+ public ushort DexIndex
+ {
+ get => FB.Dex;
+ set => FB.Dex = value;
+ }
+
+ public int Item1 { get => 0; set { } }
+ public int Item2 { get => 0; set { } }
+ public int Item3 { get => 0; set { } }
+ public int BaseEXP { get => 0; set { } }
+ public int EscapeRate { get => 0; set { } }
+ public int FormSprite { get => 0; set { } }
+ public int FormStatsIndex { get; set; }
+ public byte FormCount { get; set; } = 1;
+
+ public int BST => FB.Base.HP + FB.Base.ATK + FB.Base.DEF + FB.Base.SPE + FB.Base.SPA + FB.Base.SPD;
+ public ushort AlphaMove { get; set; }
+
+ public void Write(BinaryWriter bw)
+ {
+ bw.Write(FB.Base.HP);
+ bw.Write(FB.Base.ATK);
+ bw.Write(FB.Base.DEF);
+ bw.Write(FB.Base.SPE);
+ bw.Write(FB.Base.SPA);
+ bw.Write(FB.Base.SPD);
+ bw.Write(FB.Type1);
+ bw.Write(FB.Type2);
+ bw.Write(FB.CatchRate);
+ bw.Write(FB.EvoStage);
+ bw.Write(FB.EVYield.U16());
+ bw.Write(FB.Gender.RatioMagicEquivalent());
+ bw.Write(FB.HatchCycles);
+ bw.Write(FB.BaseFriendship);
+ bw.Write(FB.EXPGrowth);
+ bw.Write(FB.EggGroup1);
+ bw.Write(FB.EggGroup2);
+ bw.Write(FB.Ability1);
+ bw.Write(FB.Ability2);
+ bw.Write(FB.AbilityH);
+ bw.Write((ushort)FormStatsIndex);
+ bw.Write(FormCount);
+ bw.Write(FB.Info.Color);
+ bw.Write(FB.IsPresentInGame);
+
+ bw.Write((byte)0);
+ bw.Write((ushort)DexIndex);
+ bw.Write(FB.Info.Height);
+ bw.Write(FB.Info.Weight);
+ bw.Write(SpeciesConverterZA.GetNational9(FB.Hatch.SpeciesInternal));
+ bw.Write(FB.Hatch.Form);
+ bw.Write(FB.Hatch.RegionalFlags);
+ bw.Write(FB.Hatch.EverstoneForm);
+ // 0x2C
+
+ // TMs
+ byte[] tmFlags = new byte[0x1E];
+ if (IsPresentInGame)
+ {
+ foreach (ushort tm in FB.TechnicalMachine)
+ {
+ // Get the index within TMIndexes, then set the bitflag within tmFlags
+ var bitIndex = TMIndexes.IndexOf(tm);
+ if (bitIndex < 0)
+ continue;
+ tmFlags[bitIndex / 8] |= (byte)(1 << (bitIndex % 8));
+ }
+ }
+ bw.Write(tmFlags);
+ bw.Write((ushort)0); // align 0x50
+ bw.Write(GetEXP(BST, FB.EvoStage, FB.BaseEXPAddend));
+ bw.Write(AlphaMove); // align
+ }
+
+ private static ushort GetEXP(int bst, byte evoStage, short add)
+ => (ushort)(Math.Ceiling(bst * (1 + (3 * evoStage)) / 20d) + add);
+
+ public static ReadOnlySpan TMIndexes =>
+ [
+ // Bit Index order
+ 029, 337, 473, 249, 046, 347, 092, 086, 812, 280,
+ 339, 157, 058, 424, 423, 113, 182, 612, 408, 583,
+ 422, 332, 009, 008, 242, 412, 129, 091, 007, 014,
+ 115, 104, 034, 400, 203, 317, 446, 126, 435, 331,
+ 352, 202, 019, 063, 282, 341, 097, 120, 196, 315,
+ 219, 414, 188, 434, 416, 038, 261, 442, 428, 248,
+ 421, 053, 094, 076, 444, 521, 085, 257, 089, 250,
+ 304, 083, 057, 247, 406, 710, 398, 523, 542, 334,
+ 404, 369, 417, 430, 164, 528, 231, 191, 390, 399,
+ 174, 605, 200, 018, 269, 056, 377, 127, 118, 441,
+ 527, 411, 526, 394, 059, 087, 370,
+ ];
+}
diff --git a/FlatBuffers/ZA/Personal/Personal/Wrapper/PersonalTable9ZA.cs b/FlatBuffers/ZA/Personal/Personal/Wrapper/PersonalTable9ZA.cs
new file mode 100644
index 00000000..ab49abf9
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Personal/Wrapper/PersonalTable9ZA.cs
@@ -0,0 +1,123 @@
+using System.Collections;
+using pkNX.Containers;
+using FlatSharp;
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+///
+/// Personal Table storing used in .
+///
+public sealed class PersonalTable9ZA : IPersonalTable, IPersonalTable
+{
+ public PersonalInfo9ZA[] Table { get; }
+ private const ushort MaxSpecies = Legal.MaxSpeciesID_9a;
+ public int MaxSpeciesID => MaxSpecies;
+
+ private readonly IFileContainer File;
+ public PersonalTable Root { get; }
+
+ public PersonalTable9ZA(IFileContainer file)
+ {
+ File = file;
+ Root = PersonalTable.Serializer.Parse(file[0], FlatBufferDeserializationOption.GreedyMutable);
+
+ var baseForms = new PersonalInfo9ZA[MaxSpecies + 1];
+ var formTable = new List();
+
+ var formGrouped = Root.Table
+ .GroupBy(x => x.Info.SpeciesNational)
+ .OrderBy(x => x.Key).ToArray();
+
+ for (int i = 0; i <= MaxSpecies; i++)
+ {
+ var item = formGrouped[i];
+ var forms = item.ToArray();
+
+ baseForms[i] = GetObj(forms[0], forms, MaxSpecies, formTable);
+ for (int f = 1; f < forms.Length; f++)
+ formTable.Add(GetObj(forms[f], forms, MaxSpecies, formTable, f));
+ }
+
+ Table = [.. baseForms, .. formTable];
+ }
+
+ private static PersonalInfo9ZA GetObj(PersonalInfo e, ICollection forms, ushort max, ICollection formTable, int f = 0)
+ {
+ return new PersonalInfo9ZA(e)
+ {
+ FormCount = (byte)forms.Count,
+ FormStatsIndex = (f != 0 ? 0 : forms.Count == 1 ? 0 : max + formTable.Count + 1),
+ };
+ }
+
+ public void Save()
+ {
+ var pool = System.Buffers.ArrayPool.Shared;
+ var serializer = PersonalTable.Serializer;
+ var size = serializer.GetMaxSize(Root);
+ var arr = pool.Rent(size);
+ var len = serializer.Write(arr, Root);
+ var data = arr.AsSpan(0, len).ToArray();
+ pool.Return(arr);
+ File[0] = data;
+ }
+
+ public PersonalInfo9ZA this[int index] => Table[(uint)index < Table.Length ? index : 0];
+ public PersonalInfo9ZA this[ushort species, byte form] => Table[GetFormIndex(species, form)];
+ public PersonalInfo9ZA GetFormEntry(ushort species, byte form) => Table[GetFormIndex(species, form)];
+
+ public int GetFormIndex(ushort species, byte form)
+ {
+ if ((uint)species <= MaxSpecies)
+ return Table[species].FormIndex(species, form);
+ return 0;
+ }
+
+ public bool IsSpeciesInGame(ushort species)
+ {
+ if ((uint)species > MaxSpecies)
+ return false;
+
+ var form0 = Table[species];
+ if (form0.IsPresentInGame)
+ return true;
+
+ var fc = form0.FormCount;
+ for (byte i = 1; i < fc; i++)
+ {
+ var entry = GetFormEntry(species, i);
+ if (entry.IsPresentInGame)
+ return true;
+ }
+ return false;
+ }
+
+ public bool IsPresentInGame(ushort species, byte form)
+ {
+ if ((uint)species > MaxSpecies)
+ return false;
+
+ var form0 = Table[species];
+ if (form == 0)
+ return form0.IsPresentInGame;
+ if (!form0.HasForm(form))
+ return false;
+
+ var entry = GetFormEntry(species, form);
+ return entry.IsPresentInGame;
+ }
+
+ IPersonalInfo[] IPersonalTable.Table => Table;
+ IPersonalInfo IPersonalTable.this[int index] => this[index];
+ IPersonalInfo IPersonalTable.this[ushort species, byte form] => this[species, form];
+ IPersonalInfo IPersonalTable.GetFormEntry(ushort species, byte form) => GetFormEntry(species, form);
+
+ public byte[] Write()
+ {
+ using var ms = new MemoryStream();
+ using var bw = new BinaryWriter(ms);
+ foreach (var entry in Table)
+ entry.Write(bw);
+ return ms.ToArray();
+ }
+}
diff --git a/FlatBuffers/ZA/Personal/Schemas/PersonalInfoDetail.fbs b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoDetail.fbs
new file mode 100644
index 00000000..0a2daf13
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoDetail.fbs
@@ -0,0 +1,30 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_valueStruct";
+
+enum SpeciesClassificationMajor : ubyte {
+ None = 0,
+ Legend = 1,
+ SubLegend = 2,
+ Mythical = 3,
+}
+
+enum SpeciesClassificationMinor : uint {
+ None = 0,
+ UltraBeast = 1,
+ ParadoxPast = 2,
+ ParadoxFuture = 4,
+ SpecialBattleForm = 8,
+}
+
+struct PersonalInfoDetail { // give me a class, not struct.
+ SpeciesInternal : ushort;
+ Form : ushort;
+ SpeciesNational : ushort;
+ Color : ubyte ;
+ BodyType : ubyte ;
+ Height : ushort;
+ Weight : ushort;
+ DebutVersion : ubyte ;
+ SpeciesClassMajor : ubyte ;
+ SpeciesClassMinor : uint ;
+}
diff --git a/FlatBuffers/ZA/Personal/Schemas/PersonalInfoEvolution.fbs b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoEvolution.fbs
new file mode 100644
index 00000000..f0969322
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoEvolution.fbs
@@ -0,0 +1,13 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_valueStruct";
+
+struct PersonalInfoEvolution { // give me a class, not struct.
+ Level:ushort;
+ Method:ushort;
+ Argument:ushort;
+ Reserved3:ushort;
+ Reserved4:ushort;
+ Reserved5:ushort;
+ SpeciesInternal:ushort;
+ Form:ushort;
+}
diff --git a/FlatBuffers/ZA/Personal/Schemas/PersonalInfoGender.fbs b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoGender.fbs
new file mode 100644
index 00000000..2368f1d6
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoGender.fbs
@@ -0,0 +1,14 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_valueStruct";
+
+enum SexGroup : ubyte {
+ BOTH = 0,
+ MALE = 1,
+ FEMALE = 2,
+ UNKNOWN = 3,
+}
+
+struct PersonalInfoGender { // give me a class, not struct.
+ Group:SexGroup = BOTH;
+ Ratio:ubyte; // {rand(100) < value} => gender.
+}
diff --git a/FlatBuffers/ZA/Personal/Schemas/PersonalInfoHatch.fbs b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoHatch.fbs
new file mode 100644
index 00000000..60bb71c4
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoHatch.fbs
@@ -0,0 +1,9 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_valueStruct";
+
+struct PersonalInfoHatch { // give me a class, not struct.
+ SpeciesInternal:ushort;
+ Form:ushort;
+ RegionalFlags:ushort;
+ EverstoneForm:ushort;
+}
diff --git a/FlatBuffers/ZA/Personal/Schemas/PersonalInfoMove.fbs b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoMove.fbs
new file mode 100644
index 00000000..378c7e7b
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoMove.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_valueStruct";
+
+struct PersonalInfoMove { // give me a class, not struct.
+ Move:ushort;
+ Level:byte;
+ LevelPlus:byte;
+}
diff --git a/FlatBuffers/ZA/Personal/Schemas/PersonalInfoStats.fbs b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoStats.fbs
new file mode 100644
index 00000000..9d048492
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Schemas/PersonalInfoStats.fbs
@@ -0,0 +1,11 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_valueStruct";
+
+struct PersonalInfoStats { // give me a class, not struct.
+ HP :ubyte;
+ ATK:ubyte;
+ DEF:ubyte;
+ SPA:ubyte;
+ SPD:ubyte;
+ SPE:ubyte;
+}
diff --git a/FlatBuffers/ZA/Personal/Schemas/PersonalTable.fbs b/FlatBuffers/ZA/Personal/Schemas/PersonalTable.fbs
new file mode 100644
index 00000000..48d43bb9
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/Schemas/PersonalTable.fbs
@@ -0,0 +1,47 @@
+include "PersonalInfoDetail.fbs";
+include "PersonalInfoEvolution.fbs";
+include "PersonalInfoGender.fbs";
+include "PersonalInfoHatch.fbs";
+include "PersonalInfoMove.fbs";
+include "PersonalInfoStats.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table PersonalInfo {
+ Info:PersonalInfoDetail (required);
+ IsPresentInGame:bool;
+ Dex:ushort; // No need to group. Changed from SV.
+ // Dex:PersonalInfoDex; // not required
+ // KitakamiDex:ushort; // NOT USED IN DATA
+ // BlueberryDex:ushort; // NOT USED IN DATA
+ Type1:ubyte;
+ Type2:ubyte;
+ Ability1:ushort;
+ Ability2:ushort;
+ AbilityH:ushort;
+ EXPGrowth:ubyte;
+ CatchRate:ubyte;
+ Gender:PersonalInfoGender (required);
+ EggGroup1:ubyte;
+ EggGroup2:ubyte;
+ Hatch:PersonalInfoHatch (required);
+ HatchCycles:ubyte;
+ BaseFriendship:ubyte;
+ BaseEXPAddend:short;
+ EvoStage:ubyte;
+ IsTypeChangeDisallowed:bool; // Silvally, Arceus (and Sylveon in 1.0.0, fixed)
+ EVYield:PersonalInfoStats (required);
+ Base:PersonalInfoStats (required);
+ Evolutions:[PersonalInfoEvolution] (required);
+ TechnicalMachine:[ushort] (required);
+ EggMoves:[ushort] (required);
+ ReminderMoves:[ushort] (required);
+ Learnset:[PersonalInfoMove] (required);
+}
+
+table PersonalTable (fs_serializer) {
+ Table:[PersonalInfo] (required);
+}
+
+root_type PersonalTable;
diff --git a/FlatBuffers/ZA/Personal/pkNX.Structures.FlatBuffers.ZA.Personal.csproj b/FlatBuffers/ZA/Personal/pkNX.Structures.FlatBuffers.ZA.Personal.csproj
new file mode 100644
index 00000000..35e3d842
--- /dev/null
+++ b/FlatBuffers/ZA/Personal/pkNX.Structures.FlatBuffers.ZA.Personal.csproj
@@ -0,0 +1,2 @@
+
+
diff --git a/FlatBuffers/ZA/Shared/Gen9/PokeData/ParamSet.cs b/FlatBuffers/ZA/Shared/Gen9/PokeData/ParamSet.cs
new file mode 100644
index 00000000..638a70f3
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Gen9/PokeData/ParamSet.cs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+public partial class ParamSet
+{
+ public string SlashSeparated() => $"{HP}/{ATK}/{DEF}/{SPA}/{SPD}/{SPE}";
+
+ public int[] ToArray() => [HP, ATK, DEF, SPA, SPD, SPE];
+}
diff --git a/FlatBuffers/ZA/Shared/Gen9/PokeData/PokeDataBattle.cs b/FlatBuffers/ZA/Shared/Gen9/PokeData/PokeDataBattle.cs
new file mode 100644
index 00000000..666c6b73
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Gen9/PokeData/PokeDataBattle.cs
@@ -0,0 +1,26 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+public partial class PokeDataBattle
+{
+ public void SerializePKHeX(BinaryWriter bw, sbyte captureLv)
+ {
+ // flag BallId if not none
+ if (BallId != BallID.BALL_NULL)
+ throw new ArgumentOutOfRangeException(nameof(BallId), BallId, $"No {nameof(BallId)} allowed!");
+
+ ushort species = SpeciesConverterZA.GetNational9((ushort)DevId);
+ byte form = species switch
+ {
+ //(ushort)Species.Vivillon or (ushort)Species.Spewpa or (ushort)Species.Scatterbug => 30,
+ (ushort)Species.Minior when FormId < 7 => (byte)(FormId + 7),
+ _ => (byte)FormId,
+ };
+
+ bw.Write(species);
+ bw.Write(form);
+ bw.Write((byte)Sex);
+ bw.Write((byte)Tokusei);
+ bw.Write((byte)RareType);
+ bw.Write((byte)captureLv);
+ }
+}
diff --git a/FlatBuffers/ZA/Shared/Gen9/SpeciesConverterZA.cs b/FlatBuffers/ZA/Shared/Gen9/SpeciesConverterZA.cs
new file mode 100644
index 00000000..277760a8
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Gen9/SpeciesConverterZA.cs
@@ -0,0 +1,88 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+///
+/// does not match National Dex ID.
+///
+public static class SpeciesConverterZA
+{
+ public static T[] GetRearrangedAsNational(T[] specNames)
+ {
+ var result = new T[specNames.Length];
+ for (ushort indexInternal = 0; indexInternal < specNames.Length; indexInternal++)
+ {
+ var indexNational = GetNational9(indexInternal);
+ if (indexNational >= specNames.Length) continue;
+ result[indexNational] = specNames[indexInternal];
+ }
+ return result;
+ }
+
+ ///
+ /// Converts a National Dex ID to Generation 9 internal species ID.
+ ///
+ /// National Dex ID
+ /// Generation 9 species ID.
+ public static ushort GetInternal9(ushort species)
+ {
+ var shift = species - FirstUnalignedNational9;
+ var table = Table9NationalToInternal;
+ if ((uint)shift >= table.Length)
+ return species;
+ return (ushort)(species + table[shift]);
+ }
+
+ ///
+ /// Converts a Generation 9 internal species ID to National Dex ID.
+ ///
+ /// Generation 9 species ID.
+ /// National Dex ID.
+ public static ushort GetNational9(ushort raw)
+ {
+ var table = Table9InternalToNational;
+ var shift = raw - FirstUnalignedInternal9;
+ if ((uint)shift >= table.Length)
+ return raw;
+ return (ushort)(raw + table[shift]);
+ }
+
+ private const int FirstUnalignedNational9 = 917;
+ private const int FirstUnalignedInternal9 = FirstUnalignedNational9;
+
+ ///
+ /// Difference of National Dex IDs (index) and the associated Gen9 Species IDs (value)
+ ///
+ private static ReadOnlySpan Table9NationalToInternal =>
+ [
+ 001, 001, 001,
+ 001, 033, 033, 033, 021, 021, 044, 044, 007, 007,
+ 007, 029, 031, 031, 031, 068, 068, 068, 002, 002,
+ 017, 017, 030, 030, 024, 024, 028, 028, 058, 058,
+ 012, -13, -13, -31, -31, -29, -29, 043, 043, 043,
+ -31, -31, -03, -30, -30, -23, -23, -14, -24, -03,
+ -03, -47, -47, -12, -27, -27, -44, -46, -26, 031,
+ 029, -53, -65, 025, -06, -03, -07, -04, -04, -08,
+ -04, 001, -03, -03, -06, -04, -47, -47, -47, -23,
+ -23, -05, -07, -09, -07, -20, -13, -09, -09, -29,
+ -23, 001, 012, 012, 000, 000, 000, -06, 005, -06,
+ -03, -03, -02, -04, -03, -03,
+ ];
+
+ ///
+ /// Difference of Gen9 Species IDs (index) and the associated National Dex IDs (value)
+ ///
+ private static ReadOnlySpan Table9InternalToNational =>
+ [
+ 065, -01, -01,
+ -01, -01, 031, 031, 047, 047, 029, 029, 053, 031,
+ 031, 046, 044, 030, 030, -07, -07, -07, 013, 013,
+ -02, -02, 023, 023, 024, -21, -21, 027, 027, 047,
+ 047, 047, 026, 014, -33, -33, -33, -17, -17, 003,
+ -29, 012, -12, -31, -31, -31, 003, 003, -24, -24,
+ -44, -44, -30, -30, -28, -28, 023, 023, 006, 007,
+ 029, 008, 003, 004, 004, 020, 004, 023, 006, 003,
+ 003, 004, -01, 013, 009, 007, 005, 007, 009, 009,
+ -43, -43, -43, -68, -68, -68, -58, -58, -25, -29,
+ -31, 006, -01, 006, 000, 000, 000, 003, 003, 004,
+ 002, 003, 003, -05, -12, -12,
+ ];
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Entity/CollisionShape.fbs b/FlatBuffers/ZA/Shared/Schemas/Entity/CollisionShape.fbs
new file mode 100644
index 00000000..5d6d9a9a
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Entity/CollisionShape.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum CollisionShape : int {
+ NONE = 0,
+ SPHERE = 1,
+ BOX = 2,
+ CAPSULE = 3,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Entity/ComparisonOperatorType.fbs b/FlatBuffers/ZA/Shared/Schemas/Entity/ComparisonOperatorType.fbs
new file mode 100644
index 00000000..ba4ed7ca
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Entity/ComparisonOperatorType.fbs
@@ -0,0 +1,10 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum ComparisonOperatorType : int {
+ EQUAL = 0,
+ NOT_EQUAL = 1,
+ GREATER_THAN = 2,
+ GREATER_THAN_EQUAL = 3,
+ LESS_THAN = 4,
+ LESS_THAN_EQUAL = 5,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Entity/ConditionSimpleAutoBattleHecklerAreaArray.fbs b/FlatBuffers/ZA/Shared/Schemas/Entity/ConditionSimpleAutoBattleHecklerAreaArray.fbs
new file mode 100644
index 00000000..0156ffa5
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Entity/ConditionSimpleAutoBattleHecklerAreaArray.fbs
@@ -0,0 +1,14 @@
+include "PokemonTriggerID.fbs";
+include "ComparisonOperatorType.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table ConditionSimpleAutoBattleHecklerAreaArray (fs_serializer) {
+ Table:[ConditionSimpleAutoBattleHecklerArea] (required);
+}
+
+table ConditionSimpleAutoBattleHecklerArea {
+ TriggerID:PokemonTriggerID;
+ ComparisonOperatorType:ComparisonOperatorType;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Entity/OwnerInfo.fbs b/FlatBuffers/ZA/Shared/Schemas/Entity/OwnerInfo.fbs
new file mode 100644
index 00000000..7bf5c7da
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Entity/OwnerInfo.fbs
@@ -0,0 +1,12 @@
+include "../Shared/SexType.fbs";
+include "../Shared/LangType.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table OwnerInfo {
+ TrainerId:int;
+ Sex:SexType;
+ LangId:LangType;
+ Name:string (required);
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Entity/ParamSet.fbs b/FlatBuffers/ZA/Shared/Schemas/Entity/ParamSet.fbs
new file mode 100644
index 00000000..2af04ff1
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Entity/ParamSet.fbs
@@ -0,0 +1,11 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table ParamSet {
+ HP:int;
+ ATK:int;
+ DEF:int;
+ SPA:int;
+ SPD:int;
+ SPE:int;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Entity/PokeObjArray.fbs b/FlatBuffers/ZA/Shared/Schemas/Entity/PokeObjArray.fbs
new file mode 100644
index 00000000..a2de4f0d
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Entity/PokeObjArray.fbs
@@ -0,0 +1,61 @@
+include "../Shared/DevID.fbs";
+include "Math/Vec3f.fbs";
+include "CollisionShape.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table GrassCollision {
+ OffsetY:float;
+ Radius:float;
+}
+
+table CGemParam {
+ Pos:Vec3f (required);
+ Rot:Vec3f (required);
+ Scale:Vec3f (required);
+}
+
+table PokeParameter {
+ ReachDistance:float;
+ AcceleStartDistance:float;
+ DeceleStartDistance:float;
+ MoveAccele:float;
+ RotationSpeed:float;
+ MinWaterDepthThreshold:float;
+ MaxWaterDepthThreshold:float;
+ MinAltitudeThreshold:float;
+ MaxAltitudeThreshold:float;
+}
+
+table NamedFlatBuffer {
+ FileName:string (required);
+}
+
+table CharaCollision {
+ Shape:CollisionShape = NONE;
+ Pos:Vec3f (required);
+ Radius:float;
+}
+
+table BodyCollision {
+ Shape:CollisionShape = NONE;
+ Pos:Vec3f (required);
+ Radius:float;
+}
+
+table PokeObj {
+ DevId:DevID = DEV_NULL;
+ Body:BodyCollision;
+ Chara:CharaCollision;
+ Grass:GrassCollision;
+ FlatBuffer:NamedFlatBuffer;
+ GemParam:CGemParam;
+ Poke:PokeParameter;
+}
+
+table PokeObjArray (fs_serializer) {
+ Table:[PokeObj] (required);
+}
+
+root_type PokeObjArray;
diff --git a/FlatBuffers/ZA/Shared/Schemas/Entity/PokemonTriggerID.fbs b/FlatBuffers/ZA/Shared/Schemas/Entity/PokemonTriggerID.fbs
new file mode 100644
index 00000000..89e8baaf
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Entity/PokemonTriggerID.fbs
@@ -0,0 +1,1005 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum PokemonTriggerID : int {
+ NONE = 0,
+ JUDGE_THROUGH = 1,
+ DUMMY_2 = 2,
+ DUMMY_3 = 3,
+ DUMMY_4 = 4,
+ DUMMY_5 = 5,
+ DUMMY_6 = 6,
+ DUMMY_7 = 7,
+ DUMMY_8 = 8,
+ DUMMY_9 = 9,
+ PATCH_0_EQUAL_EATING_EMOTION = 10,
+ PATCH_0_NOT_EATING_EMOTION = 11,
+ PATCH_0_EQUAL_RESTING_EMOTION = 12,
+ PATCH_0_NOT_RESTING_EMOTION = 13,
+ PATCH_0_EQUAL_SLEEPING_EMOTION = 14,
+ PATCH_0_NOT_SLEEPING_EMOTION = 15,
+ PATCH_0_EQUAL_EATING2_EMOTION = 16,
+ PATCH_0_NOT_EATING2_EMOTION = 17,
+ DUMMY_18 = 18,
+ DUMMY_19 = 19,
+ DUMMY_20 = 20,
+ DUMMY_21 = 21,
+ DUMMY_22 = 22,
+ DUMMY_23 = 23,
+ DUMMY_24 = 24,
+ DUMMY_25 = 25,
+ DUMMY_26 = 26,
+ DUMMY_27 = 27,
+ DUMMY_28 = 28,
+ DUMMY_29 = 29,
+ DUMMY_30 = 30,
+ DUMMY_31 = 31,
+ DUMMY_32 = 32,
+ DUMMY_33 = 33,
+ DUMMY_34 = 34,
+ DUMMY_35 = 35,
+ DUMMY_36 = 36,
+ DUMMY_37 = 37,
+ DUMMY_38 = 38,
+ DUMMY_39 = 39,
+ DUMMY_40 = 40,
+ DUMMY_41 = 41,
+ DUMMY_42 = 42,
+ DUMMY_43 = 43,
+ DUMMY_44 = 44,
+ DUMMY_45 = 45,
+ DUMMY_46 = 46,
+ DUMMY_47 = 47,
+ DUMMY_48 = 48,
+ DUMMY_49 = 49,
+ EQUAL_BOSS = 50,
+ NOT_BOSS = 51,
+ DUMMY_52 = 52,
+ EQUAL_SUBORDINATE = 53,
+ NOT_SUBORDINATE = 54,
+ DUMMY_55 = 55,
+ EQUAL_SUN = 56,
+ NOT_SUN = 57,
+ DUMMY_58 = 58,
+ EQUAL_MOON = 59,
+ NOT_MOON = 60,
+ DUMMY_61 = 61,
+ EQUAL_RARE = 62,
+ NOT_RARE = 63,
+ DUMMY_64 = 64,
+ EQUAL_OUTSIDE_TERRITORY = 65,
+ NOT_OUTSIDE_TERRITORY = 66,
+ DUMMY_67 = 67,
+ EQUAL_MOVE_THREE_POINT_3 = 68,
+ EQUAL_MOVE_THREE_POINT_2 = 69,
+ EQUAL_MOVE_THREE_POINT_1 = 70,
+ EQUAL_MOVE_THREE_POINT_0 = 71,
+ EQUAL_INSIDE_HOMERANGE = 72,
+ NOT_INSIDE_HOMERANGE = 73,
+ DUMMY_74 = 74,
+ EQUAL_MOVE_TERRITORY = 75,
+ NOT_MOVE_TERRITORY = 76,
+ DUMMY_77 = 77,
+ EQUAL_BATTLE_HECKLER_AREA = 78,
+ NOT_BATTLE_HECKLER_AREA = 79,
+ DUMMY_80 = 80,
+ EQUAL_SIMPLE_AUTO_BATTLE_HECKLER_AREA = 81,
+ NOT_SIMPLE_AUTO_BATTLE_HECKLER_AREA = 82,
+ DUMMY_83 = 83,
+ EQUAL_BATTLE_HECKLER_AREA_NEAR_RANGE = 84,
+ NOT_BATTLE_HECKLER_AREA_NEAR_RANGE = 85,
+ DUMMY_86 = 86,
+ DUMMY_87 = 87,
+ DUMMY_88 = 88,
+ DUMMY_89 = 89,
+ DUMMY_90 = 90,
+ DUMMY_91 = 91,
+ DUMMY_92 = 92,
+ DUMMY_93 = 93,
+ DUMMY_94 = 94,
+ DUMMY_95 = 95,
+ DUMMY_96 = 96,
+ DUMMY_97 = 97,
+ DUMMY_98 = 98,
+ DUMMY_99 = 99,
+ EQUAL_ACTIONPOINT_TREE_BRANCH = 100,
+ EQUAL_ACTIONPOINT_TREE_TRUNK = 101,
+ EQUAL_ACTIONPOINT_TREE_ROOT = 102,
+ EQUAL_ACTIONPOINT_CLIMBING_PATH_PACHIRISU = 103,
+ EQUAL_ACTIONPOINT_TREE_HANGING = 104,
+ EQUAL_ACTIONPOINT_ROOF = 105,
+ EQUAL_ACTIONPOINT_BUSHES = 106,
+ EQUAL_ACTIONPOINT_TORCH = 107,
+ EQUAL_ACTIONPOINT_TREE_BRANCH_LARGE = 108,
+ EQUAL_ACTIONPOINT_ROCK_CLIFF = 109,
+ EQUAL_ACTIONPOINT_TREE_CLIMBING_END_PACHIRISU = 110,
+ EQUAL_ACTIONPOINT_TREE_CLIMBING_END_AYEAYE2 = 111,
+ EQUAL_ACTIONPOINT_CLIMBING_PATH_AYEAYE2 = 112,
+ EQUAL_ACTIONPOINT_HANGING_APPLIN = 113,
+ EQUAL_ACTIONPOINT_TREE_CLIMBING_START_PACHIRISU = 114,
+ EQUAL_ACTIONPOINT_TREE_CLIMBING_START_AYEAYE2 = 115,
+ DUMMY_116 = 116,
+ DUMMY_117 = 117,
+ DUMMY_118 = 118,
+ DUMMY_119 = 119,
+ EQUAL_ATTRIBUTE_GRASSATTR = 120,
+ EQUAL_ATTRIBUTE_WATERATTR = 121,
+ EQUAL_ATTRIBUTE_LAND = 122,
+ EQUAL_ATTRIBUTE_UNDERWATER = 123,
+ EQUAL_ATTRIBUTE_SUNNY = 124,
+ EQUAL_ATTRIBUTE_SHADE = 125,
+ EQUAL_ATTRIBUTE_WATERSIDE = 126,
+ EQUAL_ATTRIBUTE_WATERSURFACE = 127,
+ EQUAL_ATTRIBUTE_SANDYBEACH = 128,
+ EQUAL_ATTRIBUTE_TREE = 129,
+ EQUAL_ATTRIBUTE_UNDERTREE = 130,
+ EQUAL_ATTRIBUTE_FLOWER = 131,
+ EQUAL_ATTRIBUTE_INLAND = 132,
+ EQUAL_ATTRIBUTE_FRESHWATERSIDE = 133,
+ EQUAL_ATTRIBUTE_SOIL = 134,
+ EQUAL_ATTRIBUTE_LANDSIDE = 135,
+ EQUAL_ATTRIBUTE_GRASSLAND = 136,
+ EQUAL_ATTRIBUTE_FRESHWATER = 137,
+ EQUAL_ATTRIBUTE_PERFECTLYSHADEAREA = 138,
+ EQUAL_ATTRIBUTE_ALMOSTSHADEAREA = 139,
+ EQUAL_ATTRIBUTE_WATERINGPLACE = 140,
+ EQUAL_ATTRIBUTE_GREENGRASS = 141,
+ EQUAL_ATTRIBUTE_DEADLEAF = 142,
+ EQUAL_ATTRIBUTE_SNOW = 143,
+ EQUAL_ATTRIBUTE_DESERT = 144,
+ EQUAL_ATTRIBUTE_SAND = 145,
+ EQUAL_ATTRIBUTE_MUD = 146,
+ EQUAL_ATTRIBUTE_BOTTOM = 147,
+ EQUAL_ATTRIBUTE_FORD = 148,
+ EQUAL_ATTRIBUTE_DIG = 149,
+ EQUAL_ATTRIBUTE_SNOW2 = 150,
+ EQUAL_ATTRIBUTE_AIR = 151,
+ DUMMY_152 = 152,
+ DUMMY_153 = 153,
+ DUMMY_154 = 154,
+ DUMMY_155 = 155,
+ DUMMY_156 = 156,
+ DUMMY_157 = 157,
+ DUMMY_158 = 158,
+ DUMMY_159 = 159,
+ EQUAL_STATE_ON_THE_GROUND = 160,
+ EQUAL_STATE_IN_THE_WATER = 161,
+ EQUAL_STATE_IN_THE_AIR = 162,
+ EQUAL_STATE_ON_THE_TREE = 163,
+ NOT_STATE_GROUND = 164,
+ NOT_STATE_IN_THE_WATER = 165,
+ NOT_STATE_IN_THE_AIR = 166,
+ NOT_STATE_ON_THE_TREE = 167,
+ DUMMY_168 = 168,
+ DUMMY_169 = 169,
+ EQUAL_STATE_KEGANI_NUSHI = 170,
+ NOT_STATE_KEGANI_NUSHI = 171,
+ EQUAL_STATE_MIMIZU_NUSHI = 172,
+ NOT_STATE_MIMIZU_NUSHI = 173,
+ EQUAL_STATE_BOOL2_NUSHI = 174,
+ NOT_STATE_BOOL2_NUSHI = 175,
+ EQUAL_STATE_MIMIZU_NUSHI_GROUND_WAIT = 176,
+ NOT_STATE_MIMIZU_NUSHI_GROUND_WAIT = 177,
+ EQUAL_STATE_MIMIZU_NUSHI_GROUND_FACE_WAIT = 178,
+ NOT_STATE_MIMIZU_NUSHI_GROUND_FACE_WAIT = 179,
+ EQUAL_TIMEZONE_MORNING = 180,
+ EQUAL_TIMEZONE_NOON = 181,
+ EQUAL_TIMEZONE_EVENING = 182,
+ EQUAL_TIMEZONE_NIGHT = 183,
+ EQUAL_TIMEZONE_MID_NIGHT = 184,
+ EQUAL_TIMEZONE_MORNING_NOON = 185,
+ EQUAL_TIMEZONE_MORNING_EVENING = 186,
+ EQUAL_TIMEZONE_NIGHT_MID_NIGHT = 187,
+ NOT_TIMEZONE_MORNING = 188,
+ NOT_TIMEZONE_NOON = 189,
+ NOT_TIMEZONE_EVENING = 190,
+ NOT_TIMEZONE_NIGHT = 191,
+ NOT_TIMEZONE_MID_NIGHT = 192,
+ NOT_TIMEZONE_MORNING_NOON = 193,
+ NOT_TIMEZONE_MORNING_EVENING = 194,
+ NOT_TIMEZONE_NIGHT_MID_NIGHT = 195,
+ DUMMY_196 = 196,
+ DUMMY_197 = 197,
+ DUMMY_198 = 198,
+ DUMMY_199 = 199,
+ EQUAL_WEATHER_SUNNY = 200,
+ EQUAL_WEATHER_CLOUDY = 201,
+ EQUAL_WEATHER_RAIN = 202,
+ EQUAL_WEATHER_STORM = 203,
+ EQUAL_WEATHER_SNOW = 204,
+ EQUAL_WEATHER_SNOW_STORM = 205,
+ EQUAL_WEATHER_DIAMOND_DUST = 206,
+ EQUAL_WEATHER_SAND_STORM = 207,
+ EQUAL_WEATHER_MIST = 208,
+ EQUAL_WEATHER_RAIN_STORM = 209,
+ EQUAL_WEATHER_SNOW_SNOW_STORM = 210,
+ EQUAL_WEATHER_STORM_SNOW_STORM_SAND_STORM = 211,
+ NOT_WEATHER_SUNNY = 212,
+ NOT_WEATHER_CLOUDY = 213,
+ NOT_WEATHER_RAIN = 214,
+ NOT_WEATHER_STORM = 215,
+ NOT_WEATHER_SNOW = 216,
+ NOT_WEATHER_SNOW_STORM = 217,
+ NOT_WEATHER_DIAMOND_DUST = 218,
+ NOT_WEATHER_SAND_STORM = 219,
+ NOT_WEATHER_MIST = 220,
+ NOT_WEATHER_RAIN_STORM = 221,
+ NOT_WEATHER_SNOW_SNOW_STORM = 222,
+ NOT_WEATHER_STORM_SNOW_STORM_SAND_STORM = 223,
+ DUMMY_224 = 224,
+ DUMMY_225 = 225,
+ DUMMY_226 = 226,
+ DUMMY_227 = 227,
+ DUMMY_228 = 228,
+ DUMMY_229 = 229,
+ EQUAL_TARGET_PLAYER = 230,
+ EQUAL_TARGET_POKEMON = 231,
+ NOT_TARGET_PLAYER = 232,
+ NOT_TARGET_POKEMON = 233,
+ DUMMY_234 = 234,
+ DUMMY_235 = 235,
+ DUMMY_236 = 236,
+ DUMMY_237 = 237,
+ DUMMY_238 = 238,
+ DUMMY_239 = 239,
+ EQUAL_HUNGER_0 = 240,
+ EQUAL_HUNGER_100 = 241,
+ EQUAL_FATIGUE_0 = 242,
+ EQUAL_FATIGUE_100 = 243,
+ EQUAL_SLEEPINESS_0 = 244,
+ EQUAL_SLEEPINESS_100 = 245,
+ NOT_HUNGER_0 = 246,
+ NOT_HUNGER_100 = 247,
+ NOT_FATIGUE_0 = 248,
+ NOT_FATIGUE_100 = 249,
+ NOT_SLEEPINESS_0 = 250,
+ NOT_SLEEPINESS_100 = 251,
+ DUMMY_252 = 252,
+ DUMMY_253 = 253,
+ DUMMY_254 = 254,
+ DUMMY_255 = 255,
+ DUMMY_256 = 256,
+ DUMMY_257 = 257,
+ DUMMY_258 = 258,
+ DUMMY_259 = 259,
+ DUMMY_260 = 260,
+ DUMMY_261 = 261,
+ DUMMY_262 = 262,
+ DUMMY_263 = 263,
+ DUMMY_264 = 264,
+ DUMMY_265 = 265,
+ DUMMY_266 = 266,
+ DUMMY_267 = 267,
+ DUMMY_268 = 268,
+ DUMMY_269 = 269,
+ EQUAL_STAMINA_0 = 270,
+ EQUAL_STAMINA_100 = 271,
+ NOT_STAMINA_0 = 272,
+ NOT_STAMINA_100 = 273,
+ DUMMY_274 = 274,
+ DUMMY_275 = 275,
+ DUMMY_276 = 276,
+ DUMMY_277 = 277,
+ DUMMY_278 = 278,
+ DUMMY_279 = 279,
+ EQUAL_TIMER_SHORT = 280,
+ EQUAL_TIMER_MEDIUM = 281,
+ EQUAL_TIMER_LONG = 282,
+ GREATER_THAN_EQUAL_TIMER_SHORT = 283,
+ GREATER_THAN_EQUAL_TIMER_MEDIUM = 284,
+ GREATER_THAN_EQUAL_TIMER_LONG = 285,
+ GREATER_TIMER_SHORT = 286,
+ GREATER_TIMER_MEDIUM = 287,
+ GREATER_TIMER_LONG = 288,
+ LESS_THAN_EQUAL_TIMER_SHORT = 289,
+ LESS_THAN_EQUAL_TIMER_MEDIUM = 290,
+ LESS_THAN_EQUAL_TIMER_LONG = 291,
+ LESS_TIMER_SHORT = 292,
+ LESS_TIMER_MEDIUM = 293,
+ LESS_TIMER_LONG = 294,
+ DUMMY_295 = 295,
+ DUMMY_296 = 296,
+ DUMMY_297 = 297,
+ DUMMY_298 = 298,
+ DUMMY_299 = 299,
+ DUMMY_300 = 300,
+ DUMMY_301 = 301,
+ DUMMY_302 = 302,
+ DUMMY_303 = 303,
+ GREATER_THAN_TIMER_20f = 304,
+ GREATER_THAN_TIMER_38f = 305,
+ GREATER_THAN_TIMER_50f = 306,
+ GREATER_THAN_TIMER_56f = 307,
+ GREATER_THAN_TIMER_80f = 308,
+ GREATER_THAN_TIMER_100f = 309,
+ GREATER_TIMER_100 = 310,
+ GREATER_TIMER_10 = 311,
+ GREATER_TIMER_20 = 312,
+ GREATER_TIMER_30 = 313,
+ LESS_TIMER_100 = 314,
+ LESS_TIMER_10 = 315,
+ LESS_TIMER_20 = 316,
+ LESS_TIMER_30 = 317,
+ GREATER_THAN_TIMER_5 = 318,
+ GREATER_THAN_TIMER_10 = 319,
+ EQUAL_PREBIOUS_ACTION_ID205 = 320,
+ EQUAL_PREBIOUS_ACTION_ID3272 = 321,
+ EQUAL_PREBIOUS_ACTION_ID3273 = 322,
+ EQUAL_PREBIOUS_ACTION_ID3281 = 323,
+ EQUAL_PREBIOUS_ACTION_ID3282 = 324,
+ EQUAL_PREBIOUS_ACTION_ID1933 = 325,
+ EQUAL_PREBIOUS_ACTION_ID2441 = 326,
+ EQUAL_PREBIOUS_ACTION_ID1965 = 327,
+ EQUAL_PREBIOUS_ACTION_ID1967 = 328,
+ EQUAL_PREBIOUS_ACTION_ID3287 = 329,
+ EQUAL_PREBIOUS_ACTION_ID3288 = 330,
+ EQUAL_PREBIOUS_ACTION_ID204 = 331,
+ EQUAL_PREBIOUS_ACTION_ID2752 = 332,
+ EQUAL_PREBIOUS_ACTION_ID206 = 333,
+ EQUAL_PREBIOUS_ACTION_ID910 = 334,
+ EQUAL_PREBIOUS_ACTION_ID911 = 335,
+ EQUAL_PREBIOUS_ACTION_ID2364 = 336,
+ EQUAL_PREBIOUS_ACTION_ID2370 = 337,
+ EQUAL_PREBIOUS_ACTION_ID3271 = 338,
+ DUMMY_339 = 339,
+ DUMMY_340 = 340,
+ DUMMY_341 = 341,
+ DUMMY_342 = 342,
+ DUMMY_343 = 343,
+ DUMMY_344 = 344,
+ DUMMY_345 = 345,
+ DUMMY_346 = 346,
+ DUMMY_347 = 347,
+ DUMMY_348 = 348,
+ DUMMY_349 = 349,
+ EQUAL_LOOP_0 = 350,
+ EQUAL_LOOP_1 = 351,
+ EQUAL_LOOP_2 = 352,
+ EQUAL_LOOP_3 = 353,
+ DUMMY_354 = 354,
+ DUMMY_355 = 355,
+ DUMMY_356 = 356,
+ DUMMY_357 = 357,
+ DUMMY_358 = 358,
+ DUMMY_359 = 359,
+ DUMMY_360 = 360,
+ DUMMY_361 = 361,
+ DUMMY_362 = 362,
+ DUMMY_363 = 363,
+ DUMMY_364 = 364,
+ DUMMY_365 = 365,
+ DUMMY_366 = 366,
+ DUMMY_367 = 367,
+ DUMMY_368 = 368,
+ DUMMY_369 = 369,
+ EQUAL_DISTANCE_NEAREST = 370,
+ EQUAL_DISTANCE_NEARRANGE = 371,
+ EQUAL_DISTANCE_MIDDLERANGE = 372,
+ EQUAL_DISTANCE_FARRANGE = 373,
+ EQUAL_DISTANCE_GENERALRANGE = 374,
+ EQUAL_DISTANCE_PERCEPT = 375,
+ GREATER_THAN_EQUAL_DISTANCE_NEAREST = 376,
+ GREATER_THAN_EQUAL_DISTANCE_NEARRANGE = 377,
+ GREATER_THAN_EQUAL_DISTANCE_MIDDLERANGE = 378,
+ GREATER_THAN_EQUAL_DISTANCE_FARRANGE = 379,
+ GREATER_THAN_EQUAL_DISTANCE_GENERALRANGE = 380,
+ GREATER_THAN_EQUAL_DISTANCE_PERCEPT = 381,
+ GREATER_DISTANCE_NEAREST = 382,
+ GREATER_DISTANCE_NEARRANGE = 383,
+ GREATER_DISTANCE_MIDDLERANGE = 384,
+ GREATER_DISTANCE_FARRANGE = 385,
+ GREATER_DISTANCE_GENERALRANGE = 386,
+ GREATER_DISTANCE_PERCEPT = 387,
+ LESS_THAN_EQUAL_DISTANCE_NEAREST = 388,
+ LESS_THAN_EQUAL_DISTANCE_NEARRANGE = 389,
+ LESS_THAN_EQUAL_DISTANCE_MIDDLERANGE = 390,
+ LESS_THAN_EQUAL_DISTANCE_FARRANGE = 391,
+ LESS_THAN_EQUAL_DISTANCE_GENERALRANGE = 392,
+ LESS_THAN_EQUAL_DISTANCE_PERCEPT = 393,
+ LESS_DISTANCE_NEAREST = 394,
+ LESS_DISTANCE_NEARRANGE = 395,
+ LESS_DISTANCE_MIDDLERANGE = 396,
+ LESS_DISTANCE_FARRANGE = 397,
+ LESS_DISTANCE_GENERALRANGE = 398,
+ LESS_DISTANCE_PERCEPT = 399,
+ DUMMY_400 = 400,
+ DUMMY_401 = 401,
+ DUMMY_402 = 402,
+ DUMMY_403 = 403,
+ DUMMY_404 = 404,
+ DUMMY_405 = 405,
+ DUMMY_406 = 406,
+ DUMMY_407 = 407,
+ DUMMY_408 = 408,
+ DUMMY_409 = 409,
+ EQUAL_DISTANCE_5 = 410,
+ GREATER_DISTANCE_5 = 411,
+ DUMMY_412 = 412,
+ DUMMY_413 = 413,
+ DUMMY_414 = 414,
+ DUMMY_415 = 415,
+ DUMMY_416 = 416,
+ DUMMY_417 = 417,
+ DUMMY_418 = 418,
+ DUMMY_419 = 419,
+ CONDITION_PLAYER_STATE_STAND_BY = 420,
+ PATCH_0_CONDITION_PLAYER_SQUAT = 421,
+ DUMMY_422 = 422,
+ DUMMY_423 = 423,
+ DUMMY_424 = 424,
+ DUMMY_425 = 425,
+ DUMMY_426 = 426,
+ DUMMY_427 = 427,
+ DUMMY_428 = 428,
+ DUMMY_429 = 429,
+ CONDITION_PLAYER_STATE_STAND_BY_5sec = 430,
+ CONDITION_PLAYER_STATE_STAND_BY_GREATER_THAN_EQUAL_5sec = 431,
+ CONDITION_PLAYER_STATE_STAND_BY_10sec = 432,
+ CONDITION_PLAYER_STATE_STAND_BY_GREATER_THAN_EQUAL_10sec = 433,
+ DUMMY_434 = 434,
+ DUMMY_435 = 435,
+ DUMMY_436 = 436,
+ DUMMY_437 = 437,
+ DUMMY_438 = 438,
+ DUMMY_439 = 439,
+ DUMMY_440 = 440,
+ DUMMY_441 = 441,
+ DUMMY_442 = 442,
+ DUMMY_443 = 443,
+ DUMMY_444 = 444,
+ DUMMY_445 = 445,
+ DUMMY_446 = 446,
+ DUMMY_447 = 447,
+ DUMMY_448 = 448,
+ DUMMY_449 = 449,
+ DUMMY_450 = 450,
+ DUMMY_451 = 451,
+ DUMMY_452 = 452,
+ DUMMY_453 = 453,
+ DUMMY_454 = 454,
+ DUMMY_455 = 455,
+ DUMMY_456 = 456,
+ DUMMY_457 = 457,
+ DUMMY_458 = 458,
+ DUMMY_459 = 459,
+ DUMMY_460 = 460,
+ DUMMY_461 = 461,
+ DUMMY_462 = 462,
+ DUMMY_463 = 463,
+ DUMMY_464 = 464,
+ DUMMY_465 = 465,
+ DUMMY_466 = 466,
+ DUMMY_467 = 467,
+ DUMMY_468 = 468,
+ DUMMY_469 = 469,
+ DUMMY_470 = 470,
+ DUMMY_471 = 471,
+ DUMMY_472 = 472,
+ DUMMY_473 = 473,
+ DUMMY_474 = 474,
+ DUMMY_475 = 475,
+ DUMMY_476 = 476,
+ DUMMY_477 = 477,
+ DUMMY_478 = 478,
+ DUMMY_479 = 479,
+ DUMMY_480 = 480,
+ DUMMY_481 = 481,
+ DUMMY_482 = 482,
+ DUMMY_483 = 483,
+ DUMMY_484 = 484,
+ DUMMY_485 = 485,
+ DUMMY_486 = 486,
+ DUMMY_487 = 487,
+ DUMMY_488 = 488,
+ DUMMY_489 = 489,
+ DUMMY_490 = 490,
+ DUMMY_491 = 491,
+ DUMMY_492 = 492,
+ DUMMY_493 = 493,
+ DUMMY_494 = 494,
+ DUMMY_495 = 495,
+ DUMMY_496 = 496,
+ DUMMY_497 = 497,
+ DUMMY_498 = 498,
+ DUMMY_499 = 499,
+ FOUND_ACTIONPOINT_TREE_BRANCH = 500,
+ FOUND_ACTIONPOINT_TREE_TRUNK = 501,
+ FOUND_ACTIONPOINT_TREE_ROOT = 502,
+ FOUND_ACTIONPOINT_CLIMBING_PATH_PACHIRISU = 503,
+ FOUND_ACTIONPOINT_TREE_HANGING = 504,
+ FOUND_ACTIONPOINT_ROOF = 505,
+ FOUND_ACTIONPOINT_BUSHES = 506,
+ FOUND_ACTIONPOINT_TORCH = 507,
+ FOUND_ACTIONPOINT_TREE_BRANCH_LARGE = 508,
+ FOUND_ACTIONPOINT_ROCK_CLIFF = 509,
+ FOUND_ACTIONPOINT_TREE_CLIMBING_END_PACHIRISU = 510,
+ FOUND_ACTIONPOINT_TREE_CLIMBING_END_AYEAYE2 = 511,
+ FOUND_ACTIONPOINT_CLIMBING_PATH_AYEAYE2 = 512,
+ FOUND_ACTIONPOINT_HANGING_APPLIN = 513,
+ FOUND_ACTIONPOINT_CLIMBING_PATH_START_PACHIRISU = 514,
+ FOUND_ACTIONPOINT_CLIMBING_PATH_START_AYEAYE2 = 515,
+ DUMMY_516 = 516,
+ DUMMY_517 = 517,
+ DUMMY_518 = 518,
+ DUMMY_519 = 519,
+ FOUND_ATTRIBUTE_GRASSATTR = 520,
+ FOUND_ATTRIBUTE_WATERATTR = 521,
+ FOUND_ATTRIBUTE_LAND = 522,
+ FOUND_ATTRIBUTE_UNDERWATER = 523,
+ FOUND_ATTRIBUTE_SUNNY = 524,
+ FOUND_ATTRIBUTE_SHADE = 525,
+ FOUND_ATTRIBUTE_WATERSIDE = 526,
+ FOUND_ATTRIBUTE_WATERSURFACE = 527,
+ FOUND_ATTRIBUTE_SANDYBEACH = 528,
+ FOUND_ATTRIBUTE_TREE = 529,
+ FOUND_ATTRIBUTE_UNDERTREE = 530,
+ FOUND_ATTRIBUTE_FLOWER = 531,
+ FOUND_ATTRIBUTE_INLAND = 532,
+ FOUND_ATTRIBUTE_FRESHWATERSIDE = 533,
+ FOUND_ATTRIBUTE_SOIL = 534,
+ FOUND_ATTRIBUTE_LANDSIDE = 535,
+ FOUND_ATTRIBUTE_GRASSLAND = 536,
+ FOUND_ATTRIBUTE_FRESHWATER = 537,
+ FOUND_ATTRIBUTE_PERFECTLYSHADEAREA = 538,
+ FOUND_ATTRIBUTE_ALMOSTSHADEAREA = 539,
+ FOUND_ATTRIBUTE_WATERINGPLACE = 540,
+ FOUND_ATTRIBUTE_GREENGRASS = 541,
+ FOUND_ATTRIBUTE_DEADLEAF = 542,
+ FOUND_ATTRIBUTE_SNOW = 543,
+ FOUND_ATTRIBUTE_DESERT = 544,
+ FOUND_ATTRIBUTE_SAND = 545,
+ FOUND_ATTRIBUTE_MUD = 546,
+ FOUND_ATTRIBUTE_BOTTOM = 547,
+ FOUND_ATTRIBUTE_FORD = 548,
+ FOUND_ATTRIBUTE_DIG = 549,
+ FOUND_ATTRIBUTE_SNOW2 = 550,
+ FOUND_ATTRIBUTE_AIR = 551,
+ FOUND_ATTRIBUTE_WATER_DEPTH_05 = 552,
+ FOUND_ATTRIBUTE_WATER_DEPTH_10 = 553,
+ FOUND_ATTRIBUTE_WATER_DEPTH_15 = 554,
+ FOUND_ATTRIBUTE_WATER_DEPTH_20 = 555,
+ FOUND_ATTRIBUTE_WATER_DEPTH_25 = 556,
+ DUMMY_557 = 557,
+ DUMMY_558 = 558,
+ DUMMY_559 = 559,
+ FOUND_POINT_NEAREST_BOTTOM_SWIM = 560,
+ FOUND_POINT_NEAREST_OFFSET_SWIM = 561,
+ FOUND_POINT_KEEP_BOTTOM_SWIM = 562,
+ FOUND_POINT_NEAREST_LAND_INLAND = 563,
+ FOUND_POINT_NEAREST_OFFSET_LEVITATION = 564,
+ FOUND_POINT_NEAREST_OFFSET_OFFING = 565,
+ FOUND_POINT_NEAREST_OFFSET_WATER_DEPTH_05 = 566,
+ FOUND_POINT_NEAREST_OFFSET_WATER_DEPTH_10 = 567,
+ FOUND_POINT_NEAREST_OFFSET_WATER_DEPTH_15 = 568,
+ FOUND_POINT_NEAREST_OFFSET_WATER_DEPTH_20 = 569,
+ FOUND_POINT_NEAREST_OFFSET_WATER_DEPTH_25 = 570,
+ FOUND_POINT_NEAREST_MIDDLE_ALTITUDE_WATER_SURFACE = 571,
+ FOUND_GPDISTANSE_LAND_LAND = 572,
+ FOUND_POINT_FAR_RANGE_MIDDLE_ALTITUDE_WATER_SURFACE = 573,
+ DUMMY_574 = 574,
+ DUMMY_575 = 575,
+ DUMMY_576 = 576,
+ DUMMY_577 = 577,
+ DUMMY_578 = 578,
+ DUMMY_579 = 579,
+ DUMMY_580 = 580,
+ DUMMY_581 = 581,
+ DUMMY_582 = 582,
+ DUMMY_583 = 583,
+ DUMMY_584 = 584,
+ DUMMY_585 = 585,
+ DUMMY_586 = 586,
+ DUMMY_587 = 587,
+ DUMMY_588 = 588,
+ DUMMY_589 = 589,
+ DUMMY_590 = 590,
+ DUMMY_591 = 591,
+ DUMMY_592 = 592,
+ DUMMY_593 = 593,
+ DUMMY_594 = 594,
+ DUMMY_595 = 595,
+ DUMMY_596 = 596,
+ DUMMY_597 = 597,
+ DUMMY_598 = 598,
+ DUMMY_599 = 599,
+ DUMMY_600 = 600,
+ DUMMY_601 = 601,
+ DUMMY_602 = 602,
+ DUMMY_603 = 603,
+ DUMMY_604 = 604,
+ DUMMY_605 = 605,
+ DUMMY_606 = 606,
+ DUMMY_607 = 607,
+ DUMMY_608 = 608,
+ DUMMY_609 = 609,
+ DUMMY_610 = 610,
+ DUMMY_611 = 611,
+ DUMMY_612 = 612,
+ DUMMY_613 = 613,
+ DUMMY_614 = 614,
+ DUMMY_615 = 615,
+ DUMMY_616 = 616,
+ DUMMY_617 = 617,
+ DUMMY_618 = 618,
+ DUMMY_619 = 619,
+ DUMMY_620 = 620,
+ DUMMY_621 = 621,
+ DUMMY_622 = 622,
+ DUMMY_623 = 623,
+ DUMMY_624 = 624,
+ DUMMY_625 = 625,
+ DUMMY_626 = 626,
+ DUMMY_627 = 627,
+ DUMMY_628 = 628,
+ DUMMY_629 = 629,
+ DUMMY_630 = 630,
+ DUMMY_631 = 631,
+ DUMMY_632 = 632,
+ DUMMY_633 = 633,
+ DUMMY_634 = 634,
+ DUMMY_635 = 635,
+ DUMMY_636 = 636,
+ DUMMY_637 = 637,
+ DUMMY_638 = 638,
+ DUMMY_639 = 639,
+ DUMMY_640 = 640,
+ DUMMY_641 = 641,
+ DUMMY_642 = 642,
+ DUMMY_643 = 643,
+ DUMMY_644 = 644,
+ DUMMY_645 = 645,
+ DUMMY_646 = 646,
+ DUMMY_647 = 647,
+ DUMMY_648 = 648,
+ DUMMY_649 = 649,
+ DUMMY_650 = 650,
+ DUMMY_651 = 651,
+ DUMMY_652 = 652,
+ DUMMY_653 = 653,
+ DUMMY_654 = 654,
+ DUMMY_655 = 655,
+ DUMMY_656 = 656,
+ DUMMY_657 = 657,
+ DUMMY_658 = 658,
+ DUMMY_659 = 659,
+ DUMMY_660 = 660,
+ DUMMY_661 = 661,
+ DUMMY_662 = 662,
+ DUMMY_663 = 663,
+ DUMMY_664 = 664,
+ DUMMY_665 = 665,
+ DUMMY_666 = 666,
+ DUMMY_667 = 667,
+ DUMMY_668 = 668,
+ DUMMY_669 = 669,
+ DUMMY_670 = 670,
+ DUMMY_671 = 671,
+ DUMMY_672 = 672,
+ DUMMY_673 = 673,
+ DUMMY_674 = 674,
+ DUMMY_675 = 675,
+ DUMMY_676 = 676,
+ DUMMY_677 = 677,
+ DUMMY_678 = 678,
+ DUMMY_679 = 679,
+ DUMMY_680 = 680,
+ DUMMY_681 = 681,
+ DUMMY_682 = 682,
+ DUMMY_683 = 683,
+ DUMMY_684 = 684,
+ DUMMY_685 = 685,
+ DUMMY_686 = 686,
+ DUMMY_687 = 687,
+ DUMMY_688 = 688,
+ DUMMY_689 = 689,
+ DUMMY_690 = 690,
+ DUMMY_691 = 691,
+ DUMMY_692 = 692,
+ DUMMY_693 = 693,
+ DUMMY_694 = 694,
+ DUMMY_695 = 695,
+ DUMMY_696 = 696,
+ DUMMY_697 = 697,
+ DUMMY_698 = 698,
+ DUMMY_699 = 699,
+ DUMMY_700 = 700,
+ DUMMY_701 = 701,
+ DUMMY_702 = 702,
+ DUMMY_703 = 703,
+ DUMMY_704 = 704,
+ DUMMY_705 = 705,
+ DUMMY_706 = 706,
+ DUMMY_707 = 707,
+ DUMMY_708 = 708,
+ DUMMY_709 = 709,
+ DUMMY_710 = 710,
+ DUMMY_711 = 711,
+ DUMMY_712 = 712,
+ DUMMY_713 = 713,
+ DUMMY_714 = 714,
+ DUMMY_715 = 715,
+ DUMMY_716 = 716,
+ DUMMY_717 = 717,
+ DUMMY_718 = 718,
+ DUMMY_719 = 719,
+ DUMMY_720 = 720,
+ DUMMY_721 = 721,
+ DUMMY_722 = 722,
+ DUMMY_723 = 723,
+ DUMMY_724 = 724,
+ DUMMY_725 = 725,
+ DUMMY_726 = 726,
+ DUMMY_727 = 727,
+ DUMMY_728 = 728,
+ DUMMY_729 = 729,
+ DUMMY_730 = 730,
+ DUMMY_731 = 731,
+ DUMMY_732 = 732,
+ DUMMY_733 = 733,
+ DUMMY_734 = 734,
+ DUMMY_735 = 735,
+ DUMMY_736 = 736,
+ DUMMY_737 = 737,
+ DUMMY_738 = 738,
+ DUMMY_739 = 739,
+ DUMMY_740 = 740,
+ DUMMY_741 = 741,
+ DUMMY_742 = 742,
+ DUMMY_743 = 743,
+ DUMMY_744 = 744,
+ DUMMY_745 = 745,
+ DUMMY_746 = 746,
+ DUMMY_747 = 747,
+ DUMMY_748 = 748,
+ DUMMY_749 = 749,
+ DUMMY_750 = 750,
+ DUMMY_751 = 751,
+ DUMMY_752 = 752,
+ DUMMY_753 = 753,
+ DUMMY_754 = 754,
+ DUMMY_755 = 755,
+ DUMMY_756 = 756,
+ DUMMY_757 = 757,
+ DUMMY_758 = 758,
+ DUMMY_759 = 759,
+ DUMMY_760 = 760,
+ DUMMY_761 = 761,
+ DUMMY_762 = 762,
+ DUMMY_763 = 763,
+ DUMMY_764 = 764,
+ DUMMY_765 = 765,
+ DUMMY_766 = 766,
+ DUMMY_767 = 767,
+ DUMMY_768 = 768,
+ DUMMY_769 = 769,
+ DUMMY_770 = 770,
+ DUMMY_771 = 771,
+ DUMMY_772 = 772,
+ DUMMY_773 = 773,
+ DUMMY_774 = 774,
+ DUMMY_775 = 775,
+ DUMMY_776 = 776,
+ DUMMY_777 = 777,
+ DUMMY_778 = 778,
+ DUMMY_779 = 779,
+ DUMMY_780 = 780,
+ DUMMY_781 = 781,
+ DUMMY_782 = 782,
+ DUMMY_783 = 783,
+ DUMMY_784 = 784,
+ DUMMY_785 = 785,
+ DUMMY_786 = 786,
+ DUMMY_787 = 787,
+ DUMMY_788 = 788,
+ DUMMY_789 = 789,
+ DUMMY_790 = 790,
+ DUMMY_791 = 791,
+ DUMMY_792 = 792,
+ DUMMY_793 = 793,
+ DUMMY_794 = 794,
+ DUMMY_795 = 795,
+ DUMMY_796 = 796,
+ DUMMY_797 = 797,
+ DUMMY_798 = 798,
+ DUMMY_799 = 799,
+ DUMMY_800 = 800,
+ DUMMY_801 = 801,
+ DUMMY_802 = 802,
+ DUMMY_803 = 803,
+ DUMMY_804 = 804,
+ DUMMY_805 = 805,
+ DUMMY_806 = 806,
+ DUMMY_807 = 807,
+ DUMMY_808 = 808,
+ DUMMY_809 = 809,
+ DUMMY_810 = 810,
+ DUMMY_811 = 811,
+ DUMMY_812 = 812,
+ DUMMY_813 = 813,
+ DUMMY_814 = 814,
+ DUMMY_815 = 815,
+ DUMMY_816 = 816,
+ DUMMY_817 = 817,
+ DUMMY_818 = 818,
+ DUMMY_819 = 819,
+ DUMMY_820 = 820,
+ DUMMY_821 = 821,
+ DUMMY_822 = 822,
+ DUMMY_823 = 823,
+ DUMMY_824 = 824,
+ DUMMY_825 = 825,
+ DUMMY_826 = 826,
+ DUMMY_827 = 827,
+ DUMMY_828 = 828,
+ DUMMY_829 = 829,
+ DUMMY_830 = 830,
+ DUMMY_831 = 831,
+ DUMMY_832 = 832,
+ DUMMY_833 = 833,
+ DUMMY_834 = 834,
+ DUMMY_835 = 835,
+ DUMMY_836 = 836,
+ DUMMY_837 = 837,
+ DUMMY_838 = 838,
+ DUMMY_839 = 839,
+ DUMMY_840 = 840,
+ DUMMY_841 = 841,
+ DUMMY_842 = 842,
+ DUMMY_843 = 843,
+ DUMMY_844 = 844,
+ DUMMY_845 = 845,
+ DUMMY_846 = 846,
+ DUMMY_847 = 847,
+ DUMMY_848 = 848,
+ DUMMY_849 = 849,
+ DUMMY_850 = 850,
+ DUMMY_851 = 851,
+ DUMMY_852 = 852,
+ DUMMY_853 = 853,
+ DUMMY_854 = 854,
+ DUMMY_855 = 855,
+ DUMMY_856 = 856,
+ DUMMY_857 = 857,
+ DUMMY_858 = 858,
+ DUMMY_859 = 859,
+ DUMMY_860 = 860,
+ DUMMY_861 = 861,
+ DUMMY_862 = 862,
+ DUMMY_863 = 863,
+ DUMMY_864 = 864,
+ DUMMY_865 = 865,
+ DUMMY_866 = 866,
+ DUMMY_867 = 867,
+ DUMMY_868 = 868,
+ DUMMY_869 = 869,
+ DUMMY_870 = 870,
+ DUMMY_871 = 871,
+ DUMMY_872 = 872,
+ DUMMY_873 = 873,
+ DUMMY_874 = 874,
+ DUMMY_875 = 875,
+ DUMMY_876 = 876,
+ DUMMY_877 = 877,
+ DUMMY_878 = 878,
+ DUMMY_879 = 879,
+ DUMMY_880 = 880,
+ DUMMY_881 = 881,
+ DUMMY_882 = 882,
+ DUMMY_883 = 883,
+ DUMMY_884 = 884,
+ DUMMY_885 = 885,
+ DUMMY_886 = 886,
+ DUMMY_887 = 887,
+ DUMMY_888 = 888,
+ DUMMY_889 = 889,
+ DUMMY_890 = 890,
+ DUMMY_891 = 891,
+ DUMMY_892 = 892,
+ DUMMY_893 = 893,
+ DUMMY_894 = 894,
+ DUMMY_895 = 895,
+ DUMMY_896 = 896,
+ DUMMY_897 = 897,
+ DUMMY_898 = 898,
+ DUMMY_899 = 899,
+ DUMMY_900 = 900,
+ DUMMY_901 = 901,
+ DUMMY_902 = 902,
+ DUMMY_903 = 903,
+ DUMMY_904 = 904,
+ DUMMY_905 = 905,
+ DUMMY_906 = 906,
+ DUMMY_907 = 907,
+ DUMMY_908 = 908,
+ DUMMY_909 = 909,
+ DUMMY_910 = 910,
+ DUMMY_911 = 911,
+ DUMMY_912 = 912,
+ DUMMY_913 = 913,
+ DUMMY_914 = 914,
+ DUMMY_915 = 915,
+ DUMMY_916 = 916,
+ DUMMY_917 = 917,
+ DUMMY_918 = 918,
+ DUMMY_919 = 919,
+ DUMMY_920 = 920,
+ DUMMY_921 = 921,
+ DUMMY_922 = 922,
+ DUMMY_923 = 923,
+ DUMMY_924 = 924,
+ DUMMY_925 = 925,
+ DUMMY_926 = 926,
+ DUMMY_927 = 927,
+ DUMMY_928 = 928,
+ DUMMY_929 = 929,
+ DUMMY_930 = 930,
+ DUMMY_931 = 931,
+ DUMMY_932 = 932,
+ DUMMY_933 = 933,
+ DUMMY_934 = 934,
+ DUMMY_935 = 935,
+ DUMMY_936 = 936,
+ DUMMY_937 = 937,
+ DUMMY_938 = 938,
+ DUMMY_939 = 939,
+ DUMMY_940 = 940,
+ DUMMY_941 = 941,
+ DUMMY_942 = 942,
+ DUMMY_943 = 943,
+ DUMMY_944 = 944,
+ DUMMY_945 = 945,
+ DUMMY_946 = 946,
+ DUMMY_947 = 947,
+ DUMMY_948 = 948,
+ DUMMY_949 = 949,
+ DUMMY_950 = 950,
+ DUMMY_951 = 951,
+ DUMMY_952 = 952,
+ DUMMY_953 = 953,
+ DUMMY_954 = 954,
+ DUMMY_955 = 955,
+ DUMMY_956 = 956,
+ DUMMY_957 = 957,
+ DUMMY_958 = 958,
+ DUMMY_959 = 959,
+ DUMMY_960 = 960,
+ DUMMY_961 = 961,
+ DUMMY_962 = 962,
+ DUMMY_963 = 963,
+ DUMMY_964 = 964,
+ DUMMY_965 = 965,
+ DUMMY_966 = 966,
+ DUMMY_967 = 967,
+ DUMMY_968 = 968,
+ DUMMY_969 = 969,
+ DUMMY_970 = 970,
+ DUMMY_971 = 971,
+ DUMMY_972 = 972,
+ DUMMY_973 = 973,
+ DUMMY_974 = 974,
+ DUMMY_975 = 975,
+ DUMMY_976 = 976,
+ DUMMY_977 = 977,
+ DUMMY_978 = 978,
+ DUMMY_979 = 979,
+ DUMMY_980 = 980,
+ DUMMY_981 = 981,
+ DUMMY_982 = 982,
+ DUMMY_983 = 983,
+ DUMMY_984 = 984,
+ DUMMY_985 = 985,
+ DUMMY_986 = 986,
+ DUMMY_987 = 987,
+ DUMMY_988 = 988,
+ DUMMY_989 = 989,
+ DUMMY_990 = 990,
+ DUMMY_991 = 991,
+ DUMMY_992 = 992,
+ DUMMY_993 = 993,
+ DUMMY_994 = 994,
+ DUMMY_995 = 995,
+ DUMMY_996 = 996,
+ DUMMY_997 = 997,
+ DUMMY_998 = 998,
+ DUMMY_999 = 999,
+ DUMMY_1000 = 1000,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Entity/PokemonUniquePathData.fbs b/FlatBuffers/ZA/Shared/Schemas/Entity/PokemonUniquePathData.fbs
new file mode 100644
index 00000000..d5943be9
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Entity/PokemonUniquePathData.fbs
@@ -0,0 +1,1105 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table PokemonUniquePathData (fs_serializer) {
+ Path000:string (required);
+ Path001:string (required);
+ Path002:string (required);
+ Path003:string (required);
+ Path004:string (required);
+ Path005:string (required);
+ Path006:string (required);
+ Path007:string (required);
+ Path008:string (required);
+ Path009:string (required);
+ Path010:string (required);
+ Path011:string (required);
+ Path012:string (required);
+ Path013:string (required);
+ Path014:string (required);
+ Path015:string (required);
+ Path016:string (required);
+ Path017:string (required);
+ Path018:string (required);
+ Path019:string (required);
+ Path020:string (required);
+ Path021:string (required);
+ Path022:string (required);
+ Path023:string (required);
+ Path024:string (required);
+ Path025:string (required);
+ Path026:string (required);
+ Path027:string (required);
+ Path028:string (required);
+ Path029:string (required);
+ Path030:string (required);
+ Path031:string (required);
+ Path032:string (required);
+ Path033:string (required);
+ Path034:string (required);
+ Path035:string (required);
+ Path036:string (required);
+ Path037:string (required);
+ Path038:string (required);
+ Path039:string (required);
+ Path040:string (required);
+ Path041:string (required);
+ Path042:string (required);
+ Path043:string (required);
+ Path044:string (required);
+ Path045:string (required);
+ Path046:string (required);
+ Path047:string (required);
+ Path048:string (required);
+ Path049:string (required);
+ Path050:string (required);
+ Path051:string (required);
+ Path052:string (required);
+ Path053:string (required);
+ Path054:string (required);
+ Path055:string (required);
+ Path056:string (required);
+ Path057:string (required);
+ Path058:string (required);
+ Path059:string (required);
+ Path060:string (required);
+ Path061:string (required);
+ Path062:string (required);
+ Path063:string (required);
+ Path064:string (required);
+ Path065:string (required);
+ Path066:string (required);
+ Path067:string (required);
+ Path068:string (required);
+ Path069:string (required);
+ Path070:string (required);
+ Path071:string (required);
+ Path072:string (required);
+ Path073:string (required);
+ Path074:string (required);
+ Path075:string (required);
+ Path076:string (required);
+ Path077:string (required);
+ Path078:string (required);
+ Path079:string (required);
+ Path080:string (required);
+ Path081:string (required);
+ Path082:string (required);
+ Path083:string (required);
+ Path084:string (required);
+ Path085:string (required);
+ Path086:string (required);
+ Path087:string (required);
+ Path088:string (required);
+ Path089:string (required);
+ Path090:string (required);
+ Path091:string (required);
+ Path092:string (required);
+ Path093:string (required);
+ Path094:string (required);
+ Path095:string (required);
+ Path096:string (required);
+ Path097:string (required);
+ Path098:string (required);
+ Path099:string (required);
+ Path100:string (required);
+ Path101:string (required);
+ Path102:string (required);
+ Path103:string (required);
+ Path104:string (required);
+ Path105:string (required);
+ Path106:string (required);
+ Path107:string (required);
+ Path108:string (required);
+ Path109:string (required);
+ Path110:string (required);
+ Path111:string (required);
+ Path112:string (required);
+ Path113:string (required);
+ Path114:string (required);
+ Path115:string (required);
+ Path116:string (required);
+ Path117:string (required);
+ Path118:string (required);
+ Path119:string (required);
+ Path120:string (required);
+ Path121:string (required);
+ Path122:string (required);
+ Path123:string (required);
+ Path124:string (required);
+ Path125:string (required);
+ Path126:string (required);
+ Path127:string (required);
+ Path128:string (required);
+ Path129:string (required);
+ Path130:string (required);
+ Path131:string (required);
+ Path132:string (required);
+ Path133:string (required);
+ Path134:string (required);
+ Path135:string (required);
+ Path136:string (required);
+ Path137:string (required);
+ Path138:string (required);
+ Path139:string (required);
+ Path140:string (required);
+ Path141:string (required);
+ Path142:string (required);
+ Path143:string (required);
+ Path144:string (required);
+ Path145:string (required);
+ Path146:string (required);
+ Path147:string (required);
+ Path148:string (required);
+ Path149:string (required);
+ Path150:string (required);
+ Path151:string (required);
+ Path152:string (required);
+ Path153:string (required);
+ Path154:string (required);
+ Path155:string (required);
+ Path156:string (required);
+ Path157:string (required);
+ Path158:string (required);
+ Path159:string (required);
+ Path160:string (required);
+ Path161:string (required);
+ Path162:string (required);
+ Path163:string (required);
+ Path164:string (required);
+ Path165:string (required);
+ Path166:string (required);
+ Path167:string (required);
+ Path168:string (required);
+ Path169:string (required);
+ Path170:string (required);
+ Path171:string (required);
+ Path172:string (required);
+ Path173:string (required);
+ Path174:string (required);
+ Path175:string (required);
+ Path176:string (required);
+ Path177:string (required);
+ Path178:string (required);
+ Path179:string (required);
+ Path180:string (required);
+ Path181:string (required);
+ Path182:string (required);
+ Path183:string (required);
+ Path184:string (required);
+ Path185:string (required);
+ Path186:string (required);
+ Path187:string (required);
+ Path188:string (required);
+ Path189:string (required);
+ Path190:string (required);
+ Path191:string (required);
+ Path192:string (required);
+ Path193:string (required);
+ Path194:string (required);
+ Path195:string (required);
+ Path196:string (required);
+ Path197:string (required);
+ Path198:string (required);
+ Path199:string (required);
+ Path200:string (required);
+ Path201:string (required);
+ Path202:string (required);
+ Path203:string (required);
+ Path204:string (required);
+ Path205:string (required);
+ Path206:string (required);
+ Path207:string (required);
+ Path208:string (required);
+ Path209:string (required);
+ Path210:string (required);
+ Path211:string (required);
+ Path212:string (required);
+ Path213:string (required);
+ Path214:string (required);
+ Path215:string (required);
+ Path216:string (required);
+ Path217:string (required);
+ Path218:string (required);
+ Path219:string (required);
+ Path220:string (required);
+ Path221:string (required);
+ Path222:string (required);
+ Path223:string (required);
+ Path224:string (required);
+ Path225:string (required);
+ Path226:string (required);
+ Path227:string (required);
+ Path228:string (required);
+ Path229:string (required);
+ Path230:string (required);
+ Path231:string (required);
+ Path232:string (required);
+ Path233:string (required);
+ Path234:string (required);
+ Path235:string (required);
+ Path236:string (required);
+ Path237:string (required);
+ Path238:string (required);
+ Path239:string (required);
+ Path240:string (required);
+ Path241:string (required);
+ Path242:string (required);
+ Path243:string (required);
+ Path244:string (required);
+ Path245:string (required);
+ Path246:string (required);
+ Path247:string (required);
+ Path248:string (required);
+ Path249:string (required);
+ Path250:string (required);
+ Path251:string (required);
+ Path252:string (required);
+ Path253:string (required);
+ Path254:string (required);
+ Path255:string (required);
+ Path256:string (required);
+ Path257:string (required);
+ Path258:string (required);
+ Path259:string (required);
+ Path260:string (required);
+ Path261:string (required);
+ Path262:string (required);
+ Path263:string (required);
+ Path264:string (required);
+ Path265:string (required);
+ Path266:string (required);
+ Path267:string (required);
+ Path268:string (required);
+ Path269:string (required);
+ Path270:string (required);
+ Path271:string (required);
+ Path272:string (required);
+ Path273:string (required);
+ Path274:string (required);
+ Path275:string (required);
+ Path276:string (required);
+ Path277:string (required);
+ Path278:string (required);
+ Path279:string (required);
+ Path280:string (required);
+ Path281:string (required);
+ Path282:string (required);
+ Path283:string (required);
+ Path284:string (required);
+ Path285:string (required);
+ Path286:string (required);
+ Path287:string (required);
+ Path288:string (required);
+ Path289:string (required);
+ Path290:string (required);
+ Path291:string (required);
+ Path292:string (required);
+ Path293:string (required);
+ Path294:string (required);
+ Path295:string (required);
+ Path296:string (required);
+ Path297:string (required);
+ Path298:string (required);
+ Path299:string (required);
+ Path300:string (required);
+ Path301:string (required);
+ Path302:string (required);
+ Path303:string (required);
+ Path304:string (required);
+ Path305:string (required);
+ Path306:string (required);
+ Path307:string (required);
+ Path308:string (required);
+ Path309:string (required);
+ Path310:string (required);
+ Path311:string (required);
+ Path312:string (required);
+ Path313:string (required);
+ Path314:string (required);
+ Path315:string (required);
+ Path316:string (required);
+ Path317:string (required);
+ Path318:string (required);
+ Path319:string (required);
+ Path320:string (required);
+ Path321:string (required);
+ Path322:string (required);
+ Path323:string (required);
+ Path324:string (required);
+ Path325:string (required);
+ Path326:string (required);
+ Path327:string (required);
+ Path328:string (required);
+ Path329:string (required);
+ Path330:string (required);
+ Path331:string (required);
+ Path332:string (required);
+ Path333:string (required);
+ Path334:string (required);
+ Path335:string (required);
+ Path336:string (required);
+ Path337:string (required);
+ Path338:string (required);
+ Path339:string (required);
+ Path340:string (required);
+ Path341:string (required);
+ Path342:string (required);
+ Path343:string (required);
+ Path344:string (required);
+ Path345:string (required);
+ Path346:string (required);
+ Path347:string (required);
+ Path348:string (required);
+ Path349:string (required);
+ Path350:string (required);
+ Path351:string (required);
+ Path352:string (required);
+ Path353:string (required);
+ Path354:string (required);
+ Path355:string (required);
+ Path356:string (required);
+ Path357:string (required);
+ Path358:string (required);
+ Path359:string (required);
+ Path360:string (required);
+ Path361:string (required);
+ Path362:string (required);
+ Path363:string (required);
+ Path364:string (required);
+ Path365:string (required);
+ Path366:string (required);
+ Path367:string (required);
+ Path368:string (required);
+ Path369:string (required);
+ Path370:string (required);
+ Path371:string (required);
+ Path372:string (required);
+ Path373:string (required);
+ Path374:string (required);
+ Path375:string (required);
+ Path376:string (required);
+ Path377:string (required);
+ Path378:string (required);
+ Path379:string (required);
+ Path380:string (required);
+ Path381:string (required);
+ Path382:string (required);
+ Path383:string (required);
+ Path384:string (required);
+ Path385:string (required);
+ Path386:string (required);
+ Path387:string (required);
+ Path388:string (required);
+ Path389:string (required);
+ Path390:string (required);
+ Path391:string (required);
+ Path392:string (required);
+ Path393:string (required);
+ Path394:string (required);
+ Path395:string (required);
+ Path396:string (required);
+ Path397:string (required);
+ Path398:string (required);
+ Path399:string (required);
+ Path400:string (required);
+ Path401:string (required);
+ Path402:string (required);
+ Path403:string (required);
+ Path404:string (required);
+ Path405:string (required);
+ Path406:string (required);
+ Path407:string (required);
+ Path408:string (required);
+ Path409:string (required);
+ Path410:string (required);
+ Path411:string (required);
+ Path412:string (required);
+ Path413:string (required);
+ Path414:string (required);
+ Path415:string (required);
+ Path416:string (required);
+ Path417:string (required);
+ Path418:string (required);
+ Path419:string (required);
+ Path420:string (required);
+ Path421:string (required);
+ Path422:string (required);
+ Path423:string (required);
+ Path424:string (required);
+ Path425:string (required);
+ Path426:string (required);
+ Path427:string (required);
+ Path428:string (required);
+ Path429:string (required);
+ Path430:string (required);
+ Path431:string (required);
+ Path432:string (required);
+ Path433:string (required);
+ Path434:string (required);
+ Path435:string (required);
+ Path436:string (required);
+ Path437:string (required);
+ Path438:string (required);
+ Path439:string (required);
+ Path440:string (required);
+ Path441:string (required);
+ Path442:string (required);
+ Path443:string (required);
+ Path444:string (required);
+ Path445:string (required);
+ Path446:string (required);
+ Path447:string (required);
+ Path448:string (required);
+ Path449:string (required);
+ Path450:string (required);
+ Path451:string (required);
+ Path452:string (required);
+ Path453:string (required);
+ Path454:string (required);
+ Path455:string (required);
+ Path456:string (required);
+ Path457:string (required);
+ Path458:string (required);
+ Path459:string (required);
+ Path460:string (required);
+ Path461:string (required);
+ Path462:string (required);
+ Path463:string (required);
+ Path464:string (required);
+ Path465:string (required);
+ Path466:string (required);
+ Path467:string (required);
+ Path468:string (required);
+ Path469:string (required);
+ Path470:string (required);
+ Path471:string (required);
+ Path472:string (required);
+ Path473:string (required);
+ Path474:string (required);
+ Path475:string (required);
+ Path476:string (required);
+ Path477:string (required);
+ Path478:string (required);
+ Path479:string (required);
+ Path480:string (required);
+ Path481:string (required);
+ Path482:string (required);
+ Path483:string (required);
+ Path484:string (required);
+ Path485:string (required);
+ Path486:string (required);
+ Path487:string (required);
+ Path488:string (required);
+ Path489:string (required);
+ Path490:string (required);
+ Path491:string (required);
+ Path492:string (required);
+ Path493:string (required);
+ Path494:string (required);
+ Path495:string (required);
+ Path496:string (required);
+ Path497:string (required);
+ Path498:string (required);
+ Path499:string (required);
+ Path500:string (required);
+ Path501:string (required);
+ Path502:string (required);
+ Path503:string (required);
+ Path504:string (required);
+ Path505:string (required);
+ Path506:string (required);
+ Path507:string (required);
+ Path508:string (required);
+ Path509:string (required);
+ Path510:string (required);
+ Path511:string (required);
+ Path512:string (required);
+ Path513:string (required);
+ Path514:string (required);
+ Path515:string (required);
+ Path516:string (required);
+ Path517:string (required);
+ Path518:string (required);
+ Path519:string (required);
+ Path520:string (required);
+ Path521:string (required);
+ Path522:string (required);
+ Path523:string (required);
+ Path524:string (required);
+ Path525:string (required);
+ Path526:string (required);
+ Path527:string (required);
+ Path528:string (required);
+ Path529:string (required);
+ Path530:string (required);
+ Path531:string (required);
+ Path532:string (required);
+ Path533:string (required);
+ Path534:string (required);
+ Path535:string (required);
+ Path536:string (required);
+ Path537:string (required);
+ Path538:string (required);
+ Path539:string (required);
+ Path540:string (required);
+ Path541:string (required);
+ Path542:string (required);
+ Path543:string (required);
+ Path544:string (required);
+ Path545:string (required);
+ Path546:string (required);
+ Path547:string (required);
+ Path548:string (required);
+ Path549:string (required);
+ Path550:string (required);
+ Path551:string (required);
+ Path552:string (required);
+ Path553:string (required);
+ Path554:string (required);
+ Path555:string (required);
+ Path556:string (required);
+ Path557:string (required);
+ Path558:string (required);
+ Path559:string (required);
+ Path560:string (required);
+ Path561:string (required);
+ Path562:string (required);
+ Path563:string (required);
+ Path564:string (required);
+ Path565:string (required);
+ Path566:string (required);
+ Path567:string (required);
+ Path568:string (required);
+ Path569:string (required);
+ Path570:string (required);
+ Path571:string (required);
+ Path572:string (required);
+ Path573:string (required);
+ Path574:string (required);
+ Path575:string (required);
+ Path576:string (required);
+ Path577:string (required);
+ Path578:string (required);
+ Path579:string (required);
+ Path580:string (required);
+ Path581:string (required);
+ Path582:string (required);
+ Path583:string (required);
+ Path584:string (required);
+ Path585:string (required);
+ Path586:string (required);
+ Path587:string (required);
+ Path588:string (required);
+ Path589:string (required);
+ Path590:string (required);
+ Path591:string (required);
+ Path592:string (required);
+ Path593:string (required);
+ Path594:string (required);
+ Path595:string (required);
+ Path596:string (required);
+ Path597:string (required);
+ Path598:string (required);
+ Path599:string (required);
+ Path600:string (required);
+ Path601:string (required);
+ Path602:string (required);
+ Path603:string (required);
+ Path604:string (required);
+ Path605:string (required);
+ Path606:string (required);
+ Path607:string (required);
+ Path608:string (required);
+ Path609:string (required);
+ Path610:string (required);
+ Path611:string (required);
+ Path612:string (required);
+ Path613:string (required);
+ Path614:string (required);
+ Path615:string (required);
+ Path616:string (required);
+ Path617:string (required);
+ Path618:string (required);
+ Path619:string (required);
+ Path620:string (required);
+ Path621:string (required);
+ Path622:string (required);
+ Path623:string (required);
+ Path624:string (required);
+ Path625:string (required);
+ Path626:string (required);
+ Path627:string (required);
+ Path628:string (required);
+ Path629:string (required);
+ Path630:string (required);
+ Path631:string (required);
+ Path632:string (required);
+ Path633:string (required);
+ Path634:string (required);
+ Path635:string (required);
+ Path636:string (required);
+ Path637:string (required);
+ Path638:string (required);
+ Path639:string (required);
+ Path640:string (required);
+ Path641:string (required);
+ Path642:string (required);
+ Path643:string (required);
+ Path644:string (required);
+ Path645:string (required);
+ Path646:string (required);
+ Path647:string (required);
+ Path648:string (required);
+ Path649:string (required);
+ Path650:string (required);
+ Path651:string (required);
+ Path652:string (required);
+ Path653:string (required);
+ Path654:string (required);
+ Path655:string (required);
+ Path656:string (required);
+ Path657:string (required);
+ Path658:string (required);
+ Path659:string (required);
+ Path660:string (required);
+ Path661:string (required);
+ Path662:string (required);
+ Path663:string (required);
+ Path664:string (required);
+ Path665:string (required);
+ Path666:string (required);
+ Path667:string (required);
+ Path668:string (required);
+ Path669:string (required);
+ Path670:string (required);
+ Path671:string (required);
+ Path672:string (required);
+ Path673:string (required);
+ Path674:string (required);
+ Path675:string (required);
+ Path676:string (required);
+ Path677:string (required);
+ Path678:string (required);
+ Path679:string (required);
+ Path680:string (required);
+ Path681:string (required);
+ Path682:string (required);
+ Path683:string (required);
+ Path684:string (required);
+ Path685:string (required);
+ Path686:string (required);
+ Path687:string (required);
+ Path688:string (required);
+ Path689:string (required);
+ Path690:string (required);
+ Path691:string (required);
+ Path692:string (required);
+ Path693:string (required);
+ Path694:string (required);
+ Path695:string (required);
+ Path696:string (required);
+ Path697:string (required);
+ Path698:string (required);
+ Path699:string (required);
+ Path700:string (required);
+ Path701:string (required);
+ Path702:string (required);
+ Path703:string (required);
+ Path704:string (required);
+ Path705:string (required);
+ Path706:string (required);
+ Path707:string (required);
+ Path708:string (required);
+ Path709:string (required);
+ Path710:string (required);
+ Path711:string (required);
+ Path712:string (required);
+ Path713:string (required);
+ Path714:string (required);
+ Path715:string (required);
+ Path716:string (required);
+ Path717:string (required);
+ Path718:string (required);
+ Path719:string (required);
+ Path720:string (required);
+ Path721:string (required);
+ Path722:string (required);
+ Path723:string (required);
+ Path724:string (required);
+ Path725:string (required);
+ Path726:string (required);
+ Path727:string (required);
+ Path728:string (required);
+ Path729:string (required);
+ Path730:string (required);
+ Path731:string (required);
+ Path732:string (required);
+ Path733:string (required);
+ Path734:string (required);
+ Path735:string (required);
+ Path736:string (required);
+ Path737:string (required);
+ Path738:string (required);
+ Path739:string (required);
+ Path740:string (required);
+ Path741:string (required);
+ Path742:string (required);
+ Path743:string (required);
+ Path744:string (required);
+ Path745:string (required);
+ Path746:string (required);
+ Path747:string (required);
+ Path748:string (required);
+ Path749:string (required);
+ Path750:string (required);
+ Path751:string (required);
+ Path752:string (required);
+ Path753:string (required);
+ Path754:string (required);
+ Path755:string (required);
+ Path756:string (required);
+ Path757:string (required);
+ Path758:string (required);
+ Path759:string (required);
+ Path760:string (required);
+ Path761:string (required);
+ Path762:string (required);
+ Path763:string (required);
+ Path764:string (required);
+ Path765:string (required);
+ Path766:string (required);
+ Path767:string (required);
+ Path768:string (required);
+ Path769:string (required);
+ Path770:string (required);
+ Path771:string (required);
+ Path772:string (required);
+ Path773:string (required);
+ Path774:string (required);
+ Path775:string (required);
+ Path776:string (required);
+ Path777:string (required);
+ Path778:string (required);
+ Path779:string (required);
+ Path780:string (required);
+ Path781:string (required);
+ Path782:string (required);
+ Path783:string (required);
+ Path784:string (required);
+ Path785:string (required);
+ Path786:string (required);
+ Path787:string (required);
+ Path788:string (required);
+ Path789:string (required);
+ Path790:string (required);
+ Path791:string (required);
+ Path792:string (required);
+ Path793:string (required);
+ Path794:string (required);
+ Path795:string (required);
+ Path796:string (required);
+ Path797:string (required);
+ Path798:string (required);
+ Path799:string (required);
+ Path800:string (required);
+ Path801:string (required);
+ Path802:string (required);
+ Path803:string (required);
+ Path804:string (required);
+ Path805:string (required);
+ Path806:string (required);
+ Path807:string (required);
+ Path808:string (required);
+ Path809:string (required);
+ Path810:string (required);
+ Path811:string (required);
+ Path812:string (required);
+ Path813:string (required);
+ Path814:string (required);
+ Path815:string (required);
+ Path816:string (required);
+ Path817:string (required);
+ Path818:string (required);
+ Path819:string (required);
+ Path820:string (required);
+ Path821:string (required);
+ Path822:string (required);
+ Path823:string (required);
+ Path824:string (required);
+ Path825:string (required);
+ Path826:string (required);
+ Path827:string (required);
+ Path828:string (required);
+ Path829:string (required);
+ Path830:string (required);
+ Path831:string (required);
+ Path832:string (required);
+ Path833:string (required);
+ Path834:string (required);
+ Path835:string (required);
+ Path836:string (required);
+ Path837:string (required);
+ Path838:string (required);
+ Path839:string (required);
+ Path840:string (required);
+ Path841:string (required);
+ Path842:string (required);
+ Path843:string (required);
+ Path844:string (required);
+ Path845:string (required);
+ Path846:string (required);
+ Path847:string (required);
+ Path848:string (required);
+ Path849:string (required);
+ Path850:string (required);
+ Path851:string (required);
+ Path852:string (required);
+ Path853:string (required);
+ Path854:string (required);
+ Path855:string (required);
+ Path856:string (required);
+ Path857:string (required);
+ Path858:string (required);
+ Path859:string (required);
+ Path860:string (required);
+ Path861:string (required);
+ Path862:string (required);
+ Path863:string (required);
+ Path864:string (required);
+ Path865:string (required);
+ Path866:string (required);
+ Path867:string (required);
+ Path868:string (required);
+ Path869:string (required);
+ Path870:string (required);
+ Path871:string (required);
+ Path872:string (required);
+ Path873:string (required);
+ Path874:string (required);
+ Path875:string (required);
+ Path876:string (required);
+ Path877:string (required);
+ Path878:string (required);
+ Path879:string (required);
+ Path880:string (required);
+ Path881:string (required);
+ Path882:string (required);
+ Path883:string (required);
+ Path884:string (required);
+ Path885:string (required);
+ Path886:string (required);
+ Path887:string (required);
+ Path888:string (required);
+ Path889:string (required);
+ Path890:string (required);
+ Path891:string (required);
+ Path892:string (required);
+ Path893:string (required);
+ Path894:string (required);
+ Path895:string (required);
+ Path896:string (required);
+ Path897:string (required);
+ Path898:string (required);
+ Path899:string (required);
+ Path900:string (required);
+ Path901:string (required);
+ Path902:string (required);
+ Path903:string (required);
+ Path904:string (required);
+ Path905:string (required);
+ Path906:string (required);
+ Path907:string (required);
+ Path908:string (required);
+ Path909:string (required);
+ Path910:string (required);
+ Path911:string (required);
+ Path912:string (required);
+ Path913:string (required);
+ Path914:string (required);
+ Path915:string (required);
+ Path916:string (required);
+ Path917:string (required);
+ Path918:string (required);
+ Path919:string (required);
+ Path920:string (required);
+ Path921:string (required);
+ Path922:string (required);
+ Path923:string (required);
+ Path924:string (required);
+ Path925:string (required);
+ Path926:string (required);
+ Path927:string (required);
+ Path928:string (required);
+ Path929:string (required);
+ Path930:string (required);
+ Path931:string (required);
+ Path932:string (required);
+ Path933:string (required);
+ Path934:string (required);
+ Path935:string (required);
+ Path936:string (required);
+ Path937:string (required);
+ Path938:string (required);
+ Path939:string (required);
+ Path940:string (required);
+ Path941:string (required);
+ Path942:string (required);
+ Path943:string (required);
+ Path944:string (required);
+ Path945:string (required);
+ Path946:string (required);
+ Path947:string (required);
+ Path948:string (required);
+ Path949:string (required);
+ Path950:string (required);
+ Path951:string (required);
+ Path952:string (required);
+ Path953:string (required);
+ Path954:string (required);
+ Path955:string (required);
+ Path956:string (required);
+ Path957:string (required);
+ Path958:string (required);
+ Path959:string (required);
+ Path960:string (required);
+ Path961:string (required);
+ Path962:string (required);
+ Path963:string (required);
+ Path964:string (required);
+ Path965:string (required);
+ Path966:string (required);
+ Path967:string (required);
+ Path968:string (required);
+ Path969:string (required);
+ Path970:string (required);
+ Path971:string (required);
+ Path972:string (required);
+ Path973:string (required);
+ Path974:string (required);
+ Path975:string (required);
+ Path976:string (required);
+ Path977:string (required);
+ Path978:string (required);
+ Path979:string (required);
+ Path980:string (required);
+ Path981:string (required);
+ Path982:string (required);
+ Path983:string (required);
+ Path984:string (required);
+ Path985:string (required);
+ Path986:string (required);
+ Path987:string (required);
+ Path988:string (required);
+ Path989:string (required);
+ Path990:string (required);
+ Path991:string (required);
+ Path992:string (required);
+ Path993:string (required);
+ Path994:string (required);
+ Path995:string (required);
+ Path996:string (required);
+ Path997:string (required);
+ Path998:string (required);
+ Path999:string (required);
+ Path1000:string;
+ Path1001:string;
+ Path1002:string;
+ Path1003:string;
+ Path1004:string;
+ Path1005:string;
+ Path1006:string;
+ Path1007:string;
+ Path1008:string;
+ Path1009:string;
+ Path1010:string;
+ Path1011:string;
+ Path1012:string;
+ Path1013:string;
+ Path1014:string;
+ Path1015:string;
+ Path1016:string;
+ Path1017:string;
+ Path1018:string;
+ Path1019:string;
+ Path1020:string;
+ Path1021:string;
+ Path1022:string;
+ Path1023:string;
+ Path1024:string;
+ Path1025:string;
+ Path1026:string;
+ Path1027:string;
+ Path1028:string;
+ Path1029:string;
+ Path1030:string;
+ Path1031:string;
+ Path1032:string;
+ Path1033:string;
+ Path1034:string;
+ Path1035:string;
+ Path1036:string;
+ Path1037:string;
+ Path1038:string;
+ Path1039:string;
+ Path1040:string;
+ Path1041:string;
+ Path1042:string;
+ Path1043:string;
+ Path1044:string;
+ Path1045:string;
+ Path1046:string;
+ Path1047:string;
+ Path1048:string;
+ Path1049:string;
+ Path1050:string;
+ Path1051:string;
+ Path1052:string;
+ Path1053:string;
+ Path1054:string;
+ Path1055:string;
+ Path1056:string;
+ Path1057:string;
+ Path1058:string;
+ Path1059:string;
+ Path1060:string;
+ Path1061:string;
+ Path1062:string;
+ Path1063:string;
+ Path1064:string;
+ Path1065:string;
+ Path1066:string;
+ Path1067:string;
+ Path1068:string;
+ Path1069:string;
+ Path1070:string;
+ Path1071:string;
+ Path1072:string;
+ Path1073:string;
+ Path1074:string;
+ Path1075:string;
+ Path1076:string;
+ Path1077:string;
+ Path1078:string;
+ Path1079:string;
+ Path1080:string;
+ Path1081:string;
+ Path1082:string;
+ Path1083:string;
+ Path1084:string;
+ Path1085:string;
+ Path1086:string;
+ Path1087:string;
+ Path1088:string;
+ Path1089:string;
+ Path1090:string;
+ Path1091:string;
+ Path1092:string;
+ Path1093:string;
+ Path1094:string;
+ Path1095:string;
+ Path1096:string;
+ Path1097:string;
+ Path1098:string;
+ Path1099:string;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Misc/CaptureBallData.fbs b/FlatBuffers/ZA/Shared/Schemas/Misc/CaptureBallData.fbs
new file mode 100644
index 00000000..7664b635
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Misc/CaptureBallData.fbs
@@ -0,0 +1,35 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+struct TimerBallData {
+ Count:uint;
+ Ratio:float;
+}
+
+table CaptureBallData (fs_serializer) {
+ Poke:float;
+ Great:float;
+ Ultra:float;
+ Net:float;
+ Repeat:float;
+ Timer:[TimerBallData];
+ Nest:float;
+ Luxury:float;
+ Heal:float;
+ Dive:float;
+ Quick:float;
+ Dusk:float;
+ Premier:float;
+ Beast:float;
+ Dream:float;
+ Fast:float;
+ Friend:float;
+ Heavy:[float];
+ Moon:float;
+ Love:float;
+ Lure:float;
+ Level:[float];
+}
+
+root_type CaptureBallData;
diff --git a/FlatBuffers/ZA/Shared/Schemas/Misc/CaptureData.fbs b/FlatBuffers/ZA/Shared/Schemas/Misc/CaptureData.fbs
new file mode 100644
index 00000000..3efa747b
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Misc/CaptureData.fbs
@@ -0,0 +1,40 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table CaptureSick {
+ Koori:float;
+ Nemuri:float;
+ Doku:float;
+ Yakedo:float;
+ Mahi:float;
+}
+
+table CaptureBackStrike {
+ Cowardice:float;
+ NotCowardice:float;
+}
+
+table CaptureAiState {
+ Normal:float;
+ NotAware:float;
+ Eating:float;
+ Sleeping:float;
+ Resting:float;
+}
+
+table CaptureData (fs_serializer) {
+ Sick:CaptureSick;
+ Rare:float;
+ BackStrike:CaptureBackStrike;
+ Cowardice:CaptureAiState;
+ NotCowardice:CaptureAiState;
+ Chance:float;
+ Oyabun:float;
+ OyabunChance:float;
+ Coef:float;
+ backStrikeAngle:int;
+ backStrikeHeight:int;
+}
+
+root_type CaptureData;
diff --git a/FlatBuffers/ZA/Shared/Schemas/Misc/CaptureZARankData.fbs b/FlatBuffers/ZA/Shared/Schemas/Misc/CaptureZARankData.fbs
new file mode 100644
index 00000000..24f094a0
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Misc/CaptureZARankData.fbs
@@ -0,0 +1,32 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+attribute "fs_valueStruct";
+attribute "fs_nonVirtual";
+
+table CaptureZARankData (fs_serializer) {
+ LevelThreshold:ZARankLevelThreshold (required);
+ ZRank:ZARankArray (required);
+ YRank:ZARankArray (required);
+ XRank:ZARankArray (required);
+ WRank:ZARankArray (required);
+ VRank:ZARankArray (required);
+ GRank:ZARankArray (required);
+ FRank:ZARankArray (required);
+ ERank:ZARankArray (required);
+ DRank:ZARankArray (required);
+ CRank:ZARankArray (required);
+ BRank:ZARankArray (required);
+ ARank:ZARankArray (required);
+ InfRank:ZARankArray (required);
+}
+
+struct ZARankLevelThreshold {
+ Level:[int:10] (fs_nonVirtual);
+}
+
+struct ZARankArray {
+ Ratio:[float:10] (fs_nonVirtual);
+}
+
+root_type CaptureZARankData;
diff --git a/FlatBuffers/ZA/Shared/Schemas/Misc/MegaEvoArray.fbs b/FlatBuffers/ZA/Shared/Schemas/Misc/MegaEvoArray.fbs
new file mode 100644
index 00000000..131a5086
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Misc/MegaEvoArray.fbs
@@ -0,0 +1,21 @@
+include "../Shared/DevID.fbs";
+include "../Shared/ItemID.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table MegaEvo {
+ Species:DevID;
+ Item:ItemID;
+ FromForm:uint;
+ ToForm:uint;
+ Type:string (required);
+ Short:string (required);
+}
+
+table MegaEvoArray (fs_serializer) {
+ Table:[MegaEvo] (required);
+}
+
+root_type MegaEvoArray;
diff --git a/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataBattle.fbs b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataBattle.fbs
new file mode 100644
index 00000000..03c22de0
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataBattle.fbs
@@ -0,0 +1,34 @@
+include "../Shared/DevID.fbs";
+include "../Shared/SexType.fbs";
+include "../Shared/ItemID.fbs";
+include "../Shared/SeikakuType.fbs";
+include "../Shared/TokuseiType.fbs";
+include "../Shared/TalentType.fbs";
+include "../Shared/RareType.fbs";
+include "../Shared/SizeType.fbs";
+include "../Shared/BallID.fbs";
+
+include "../PokeData/WazaSetBattle.fbs";
+include "../Entity/ParamSet.fbs";
+include "../Shared/WazaType.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table PokeDataBattle {
+ DevId:DevID;
+ FormId:short;
+ Sex:SexType;
+ Item:ItemID;
+ Level:int;
+ BallId:BallID;
+ Waza1:WazaSetBattle (required);
+ Waza2:WazaSetBattle (required);
+ Waza3:WazaSetBattle (required);
+ Waza4:WazaSetBattle (required);
+ Seikaku:SeikakuType;
+ Tokusei:TokuseiType;
+ TalentValue:ParamSet (required);
+ EffortValue:ParamSet (required);
+ RareType:RareType;
+ ScaleValue:short;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataDLCGift.fbs b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataDLCGift.fbs
new file mode 100644
index 00000000..e4a2662e
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataDLCGift.fbs
@@ -0,0 +1,43 @@
+include "../Shared/DevID.fbs";
+include "../Shared/SexType.fbs";
+include "../Shared/ItemID.fbs";
+include "../Shared/SeikakuType.fbs";
+include "../Shared/TokuseiType.fbs";
+include "../Shared/TalentType.fbs";
+include "../Shared/RareType.fbs";
+include "../Shared/SizeType.fbs";
+include "../Shared/BallID.fbs";
+include "../Shared/RibbonType.fbs";
+
+include "../Entity/ParamSet.fbs";
+include "../PokeData/WazaSet.fbs";
+include "../Shared/WazaType.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table PokeDataDLCGift {
+ DevId:DevID = DEV_NULL;
+ FormId:short;
+ Level:int;
+ Sex:SexType;
+ Tokusei:TokuseiType;
+ RareType:RareType;
+ ScaleType:SizeType;
+ ScaleValue:short;
+ TalentType:TalentType;
+ TalentVnum:byte;
+ TalentValue:ParamSet;
+ EffortValue:ParamSet;
+ Item:ItemID = ITEMID_NONE;
+ Seikaku:SeikakuType;
+ SeikakuHosei:SeikakuType;
+ WazaType:WazaType;
+ Waza1:WazaSet;
+ Waza2:WazaSet;
+ Waza3:WazaSet;
+ Waza4:WazaSet;
+ BallId:BallID;
+ UseNickName:bool;
+ NicknameLabel:ulong;
+ ParentSex:SexType;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataEventBattle.fbs b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataEventBattle.fbs
new file mode 100644
index 00000000..ddb388ea
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataEventBattle.fbs
@@ -0,0 +1,41 @@
+include "../Shared/DevID.fbs";
+include "../Shared/SexType.fbs";
+include "../Shared/ItemID.fbs";
+include "../Shared/SeikakuType.fbs";
+include "../Shared/TokuseiType.fbs";
+include "../Shared/TalentType.fbs";
+include "../Shared/RareType.fbs";
+include "../Shared/SizeType.fbs";
+include "../Shared/RibbonType.fbs";
+
+include "../PokeData/WazaSet.fbs";
+include "../Entity/ParamSet.fbs";
+include "../Shared/WazaType.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table PokeDataEventBattle {
+ DevId:DevID = DEV_NULL;
+ FormId:short;
+ Sex:SexType;
+ Level:int;
+ RareType:RareType;
+ TalentType:TalentType;
+ TalentVnum:byte;
+ TalentValue:ParamSet (required);
+ EffortValue:ParamSet (required);
+ Item:ItemID = ITEMID_NONE;
+ DropItem:ItemID = ITEMID_NONE;
+ DropItemNum:byte;
+ Seikaku:SeikakuType;
+ SeikakuHosei:SeikakuType;
+ Tokusei:TokuseiType;
+ WazaType:WazaType;
+ Waza1:WazaSet (required);
+ Waza2:WazaSet (required);
+ Waza3:WazaSet (required);
+ Waza4:WazaSet (required);
+ ScaleType:SizeType;
+ ScaleValue:short;
+ SetRibbon:RibbonType;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataFull.fbs b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataFull.fbs
new file mode 100644
index 00000000..c4b58d0d
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataFull.fbs
@@ -0,0 +1,64 @@
+include "../Shared/DevID.fbs";
+include "../Shared/SexType.fbs";
+include "../Shared/ItemID.fbs";
+include "../Shared/SeikakuType.fbs";
+include "../Shared/TokuseiType.fbs";
+include "../Shared/TalentType.fbs";
+include "../Shared/RareType.fbs";
+include "../Shared/SizeType.fbs";
+
+include "../Entity/ParamSet.fbs";
+include "../Shared/LangType.fbs";
+include "../Shared/BallID.fbs";
+include "../Shared/RibbonType.fbs";
+include "../Shared/PokeMemoType.fbs";
+include "../Shared/WazaType.fbs";
+include "../PokeData/WazaSet.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table PokeDataFull {
+ DevId:DevID = DEV_NULL;
+ FormId:short;
+ Item:ItemID = ITEMID_NONE;
+ Level:int;
+ Sex:SexType;
+ Seikaku:SeikakuType;
+ SeikakuHosei:SeikakuType;
+ Tokusei:TokuseiType;
+ RareType:RareType;
+ RareTryCount:int;
+ TalentType:TalentType;
+ TalentValue:ParamSet;
+ TalentVnum:byte;
+ EffortValue:ParamSet;
+ Friendship:int;
+ ScaleType:SizeType;
+ ScaleValue:short;
+ SetPersonalRand:bool;
+ PersonalRand:ulong;
+ SetRandSeed:bool;
+ RandSeed:ulong;
+ WazaType:WazaType;
+ Waza1:WazaSet;
+ Waza2:WazaSet;
+ Waza3:WazaSet;
+ Waza4:WazaSet;
+ UseNickName:bool;
+ NicknameLabel:ulong;
+ ParentNameLabel:ulong;
+ ParentSex:SexType;
+ ParentLangId:LangType;
+ ParentMemoryCode:int;
+ ParentMemoryData:int;
+ ParentMemoryFeel:int;
+ ParentMemoryLevel:int;
+ LangId:LangType;
+ BallId:BallID;
+ SetRibbon:RibbonType;
+ EventFlg:bool;
+ WazaConfirmLevel:byte;
+ PokeMemo:PokeMemoType;
+ PokeMemoPlace:int;
+ TrainerId:long;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataSymbol.fbs b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataSymbol.fbs
new file mode 100644
index 00000000..10ad70e2
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataSymbol.fbs
@@ -0,0 +1,31 @@
+include "../Shared/DevID.fbs";
+include "../Shared/SexType.fbs";
+include "../Shared/RareType.fbs";
+include "../Shared/TalentType.fbs";
+include "../Shared/TokuseiType.fbs";
+include "../Shared/SizeType.fbs";
+
+include "../PokeData/WazaSet.fbs";
+include "../Entity/ParamSet.fbs";
+include "../Shared/WazaType.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table PokeDataSymbol {
+ DevId:DevID = DEV_NULL;
+ FormId:short;
+ Level:int;
+ Sex:SexType;
+ RareType:RareType;
+ TalentType:TalentType;
+ TalentValue:ParamSet (required);
+ TalentVNum:byte;
+ WazaType:WazaType;
+ Waza1:WazaSet (required);
+ Waza2:WazaSet (required);
+ Waza3:WazaSet (required);
+ Waza4:WazaSet (required);
+ TokuseiIndex:TokuseiType;
+ ScaleType:SizeType;
+ ScaleValue:short;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataTrade.fbs b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataTrade.fbs
new file mode 100644
index 00000000..c39edc66
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/PokeData/PokeDataTrade.fbs
@@ -0,0 +1,45 @@
+include "../Shared/DevID.fbs";
+include "../Shared/SexType.fbs";
+include "../Shared/ItemID.fbs";
+include "../Shared/SeikakuType.fbs";
+include "../Shared/TokuseiType.fbs";
+include "../Shared/TalentType.fbs";
+include "../Shared/RareType.fbs";
+include "../Shared/SizeType.fbs";
+include "../Shared/BallID.fbs";
+include "../Shared/RibbonType.fbs";
+
+include "../Entity/ParamSet.fbs";
+include "../PokeData/WazaSet.fbs";
+include "../Shared/WazaType.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table PokeDataTrade {
+ DevId:DevID = DEV_NULL;
+ FormId:short;
+ Level:int;
+ Sex:SexType;
+ Tokusei:TokuseiType;
+ RareType:RareType;
+ ScaleType:SizeType;
+ ScaleValue:short;
+ TalentType:TalentType;
+ TalentVnum:byte;
+ TalentValue:ParamSet;
+ EffortValue:ParamSet;
+ Item:ItemID = ITEMID_NONE;
+ Seikaku:SeikakuType;
+ SeikakuHosei:SeikakuType;
+ WazaType:WazaType;
+ Waza1:WazaSet;
+ Waza2:WazaSet;
+ Waza3:WazaSet;
+ Waza4:WazaSet;
+ BallId:BallID;
+ UseNickName:bool;
+ NicknameLabel:ulong;
+ ParentNameLabel:ulong;
+ TrainerId:long;
+ ParentSex:SexType;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/PokeData/WazaSet.fbs b/FlatBuffers/ZA/Shared/Schemas/PokeData/WazaSet.fbs
new file mode 100644
index 00000000..ff4cb92a
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/PokeData/WazaSet.fbs
@@ -0,0 +1,9 @@
+include "../Shared/WazaID.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table WazaSet {
+ WazaId:WazaID;
+ PointUp:byte;
+ IsPlusWaza:bool;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/PokeData/WazaSetBattle.fbs b/FlatBuffers/ZA/Shared/Schemas/PokeData/WazaSetBattle.fbs
new file mode 100644
index 00000000..e70b592d
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/PokeData/WazaSetBattle.fbs
@@ -0,0 +1,8 @@
+include "../Shared/WazaID.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table WazaSetBattle {
+ WazaId:WazaID;
+ IsPlusWaza:bool;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/ActivationCondition.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/ActivationCondition.fbs
new file mode 100644
index 00000000..e155c84e
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/ActivationCondition.fbs
@@ -0,0 +1,9 @@
+include "../Shared/ActivationConditionElement.fbs";
+include "../Shared/TriggerCommand.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table ActivationCondition {
+ Element:[ActivationConditionElement];
+ Triggers:[TriggerCommand];
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/ActivationConditionElement.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/ActivationConditionElement.fbs
new file mode 100644
index 00000000..da7245e5
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/ActivationConditionElement.fbs
@@ -0,0 +1,7 @@
+include "../Shared/ActivationConditionParam.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table ActivationConditionElement {
+ Param:[ActivationConditionParam];
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/ActivationConditionParam.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/ActivationConditionParam.fbs
new file mode 100644
index 00000000..f51f082c
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/ActivationConditionParam.fbs
@@ -0,0 +1,7 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table ActivationConditionParam {
+ Condition:string (required);
+ Op:int;
+ Param:[string]; // not required; null instead of count:0
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/AppearanceInfo.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/AppearanceInfo.fbs
new file mode 100644
index 00000000..b70b8df6
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/AppearanceInfo.fbs
@@ -0,0 +1,6 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table AppearanceInfo {
+ MinCount:int;
+ MaxCount:int;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/BallID.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/BallID.fbs
new file mode 100644
index 00000000..c08c4245
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/BallID.fbs
@@ -0,0 +1,43 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum BallID : ubyte
+{
+ BALL_NULL = 0,
+ MASUTAABOORU = 1,
+ HAIPAABOORU = 2,
+ SUUPAABOORU = 3,
+ MONSUTAABOORU = 4,
+ SAFARIBOORU = 5,
+ NETTOBOORU = 6,
+ DAIBUBOORU = 7,
+ NESUTOBOORU = 8,
+ RIPIITOBOORU = 9,
+ TAIMAABOORU = 10,
+ GOOZYASUBOORU = 11,
+ PUREMIABOORU = 12,
+ DAAKUBOORU = 13,
+ HIIRUBOORU = 14,
+ KUIKKUBOORU = 15,
+ PURESYASUBOORU = 16,
+ SUPIIDOBOORU = 17,
+ REBERUBOORU = 18,
+ RUAABOORU = 19,
+ HEBIIBOORU = 20,
+ RABURABUBOORU = 21,
+ HURENDOBOORU = 22,
+ MUUNBOORU = 23,
+ KONPEBOORU = 24,
+ DORIIMUBOORU = 25,
+ URUTORABOORU = 26,
+ SUTORENZIBOORU = 27,
+ MONSUTAABOORU_HA = 28,
+ SUUPAABOORU_HA = 29,
+ HAIPAABOORU_HA = 30,
+ HUHEZAABOORU = 31,
+ UINGUBOORU = 32,
+ ZIHETOBOORU = 33,
+ HEBIIBOORU_HA = 34,
+ MEGATONBOORU = 35,
+ GIGANTOBOORU = 36,
+ ORIZINBOORU = 37,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/BattleType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/BattleType.fbs
new file mode 100644
index 00000000..0ea2d8ec
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/BattleType.fbs
@@ -0,0 +1,7 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum BattleType : int {
+ SINGLE = 0,
+ DOUBLE = 1,
+ MULTI = 2,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/ClerkType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/ClerkType.fbs
new file mode 100644
index 00000000..073f77a8
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/ClerkType.fbs
@@ -0,0 +1,6 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum ClerkType : int {
+ CLERK = 0,
+ NO_CLERK = 1,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/CondEnum.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/CondEnum.fbs
new file mode 100644
index 00000000..0555e1e5
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/CondEnum.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum CondEnum : int {
+ NONE = 0,
+ SYSTEM_FLAG = 1,
+ SCENARIO = 2,
+ GYMBADGENUM = 3,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/CoolTimeInfo.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/CoolTimeInfo.fbs
new file mode 100644
index 00000000..b9ce07a7
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/CoolTimeInfo.fbs
@@ -0,0 +1,5 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table CoolTimeInfo {
+ Time:float;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/DataType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/DataType.fbs
new file mode 100644
index 00000000..ab00dddf
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/DataType.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum DataType : int {
+ NORMAL = 0,
+ ITEM = 1,
+ WAZA = 2,
+ MULTI = 3,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/DevID.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/DevID.fbs
new file mode 100644
index 00000000..0cdb5d70
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/DevID.fbs
@@ -0,0 +1,1031 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+/// Internal Species ID (not National Dex ID)
+enum DevID : ushort {
+ DEV_NULL = 0,
+ DEV_HUSIGIDANE = 1,
+ DEV_HUSIGISOU = 2,
+ DEV_HUSIGIBANA = 3,
+ DEV_HITOKAGE = 4,
+ DEV_RIZAADO = 5,
+ DEV_RIZAADON = 6,
+ DEV_ZENIGAME = 7,
+ DEV_KAMEERU = 8,
+ DEV_KAMEKKUSU = 9,
+ DEV_KYATAPII = 10,
+ DEV_TORANSERU = 11,
+ DEV_BATAHURII = 12,
+ DEV_BIIDORU = 13,
+ DEV_KOKUUN = 14,
+ DEV_SUPIAA = 15,
+ DEV_POPPO = 16,
+ DEV_PIZYON = 17,
+ DEV_PIZYOTTO = 18,
+ DEV_KORATTA = 19,
+ DEV_RATTA = 20,
+ DEV_ONISUZUME = 21,
+ DEV_ONIDORIRU = 22,
+ DEV_AABO = 23,
+ DEV_AABOKKU = 24,
+ DEV_PIKATYUU = 25,
+ DEV_RAITYUU = 26,
+ DEV_SANDO = 27,
+ DEV_SANDOPAN = 28,
+ DEV_NIDORAN_F = 29,
+ DEV_NIDORIINA = 30,
+ DEV_NIDOKUIN = 31,
+ DEV_NIDORAN_M = 32,
+ DEV_NIDORIINO = 33,
+ DEV_NIDOKINGU = 34,
+ DEV_PIPPI = 35,
+ DEV_PIKUSII = 36,
+ DEV_ROKON = 37,
+ DEV_KYUUKON = 38,
+ DEV_PURIN = 39,
+ DEV_PUKURIN = 40,
+ DEV_ZUBATTO = 41,
+ DEV_GORUBATTO = 42,
+ DEV_NAZONOKUSA = 43,
+ DEV_KUSAIHANA = 44,
+ DEV_RAHURESIA = 45,
+ DEV_PARASU = 46,
+ DEV_PARASEKUTO = 47,
+ DEV_KONPAN = 48,
+ DEV_MORUFON = 49,
+ DEV_DHIGUDA = 50,
+ DEV_DAGUTORIO = 51,
+ DEV_NYAASU = 52,
+ DEV_PERUSIAN = 53,
+ DEV_KODAKKU = 54,
+ DEV_GORUDAKKU = 55,
+ DEV_MANKII = 56,
+ DEV_OKORIZARU = 57,
+ DEV_GAADHI = 58,
+ DEV_UINDHI = 59,
+ DEV_NYOROMO = 60,
+ DEV_NYOROZO = 61,
+ DEV_NYOROBON = 62,
+ DEV_KEESHI = 63,
+ DEV_YUNGERAA = 64,
+ DEV_HUUDHIN = 65,
+ DEV_WANRIKII = 66,
+ DEV_GOORIKII = 67,
+ DEV_KAIRIKII = 68,
+ DEV_MADATUBOMI = 69,
+ DEV_UTUDON = 70,
+ DEV_UTUBOTTO = 71,
+ DEV_MENOKURAGE = 72,
+ DEV_DOKUKURAGE = 73,
+ DEV_ISITUBUTE = 74,
+ DEV_GOROON = 75,
+ DEV_GOROONYA = 76,
+ DEV_PONIITA = 77,
+ DEV_GYAROPPU = 78,
+ DEV_YADON = 79,
+ DEV_YADORAN = 80,
+ DEV_KOIRU = 81,
+ DEV_REAKOIRU = 82,
+ DEV_KAMONEGI = 83,
+ DEV_DOODOO = 84,
+ DEV_DOODORIO = 85,
+ DEV_PAUWAU = 86,
+ DEV_ZYUGON = 87,
+ DEV_BETOBETAA = 88,
+ DEV_BETOBETON = 89,
+ DEV_SHERUDAA = 90,
+ DEV_PARUSHEN = 91,
+ DEV_GOOSU = 92,
+ DEV_GOOSUTO = 93,
+ DEV_GENGAA = 94,
+ DEV_IWAAKU = 95,
+ DEV_SURIIPU = 96,
+ DEV_SURIIPAA = 97,
+ DEV_KURABU = 98,
+ DEV_KINGURAA = 99,
+ DEV_BIRIRIDAMA = 100,
+ DEV_MARUMAIN = 101,
+ DEV_TAMATAMA = 102,
+ DEV_NASSII = 103,
+ DEV_KARAKARA = 104,
+ DEV_GARAGARA = 105,
+ DEV_SAWAMURAA = 106,
+ DEV_EBIWARAA = 107,
+ DEV_BERORINGA = 108,
+ DEV_DOGAASU = 109,
+ DEV_MATADOGASU = 110,
+ DEV_SAIHOON = 111,
+ DEV_SAIDON = 112,
+ DEV_RAKKII = 113,
+ DEV_MONZYARA = 114,
+ DEV_GARUURA = 115,
+ DEV_TATTUU = 116,
+ DEV_SIIDORA = 117,
+ DEV_TOSAKINTO = 118,
+ DEV_AZUMAOU = 119,
+ DEV_HITODEMAN = 120,
+ DEV_SUTAAMII = 121,
+ DEV_BARIYAADO = 122,
+ DEV_SUTORAIKU = 123,
+ DEV_RUUZYURA = 124,
+ DEV_EREBUU = 125,
+ DEV_BUUBAA = 126,
+ DEV_KAIROSU = 127,
+ DEV_KENTAROSU = 128,
+ DEV_KOIKINGU = 129,
+ DEV_GYARADOSU = 130,
+ DEV_RAPURASU = 131,
+ DEV_METAMON = 132,
+ DEV_IIBUI = 133,
+ DEV_SYAWAAZU = 134,
+ DEV_SANDAASU = 135,
+ DEV_BUUSUTAA = 136,
+ DEV_PORIGON = 137,
+ DEV_OMUNAITO = 138,
+ DEV_OMUSUTAA = 139,
+ DEV_KABUTO = 140,
+ DEV_KABUTOPUSU = 141,
+ DEV_PUTERA = 142,
+ DEV_KABIGON = 143,
+ DEV_HURIIZAA = 144,
+ DEV_SANDAA = 145,
+ DEV_FAIYAA = 146,
+ DEV_MINIRYUU = 147,
+ DEV_HAKURYUU = 148,
+ DEV_KAIRYUU = 149,
+ DEV_MYUUTUU = 150,
+ DEV_MYUU = 151,
+ DEV_TIKORIITA = 152,
+ DEV_BEIRIIHU = 153,
+ DEV_MEGANIUMU = 154,
+ DEV_HINOARASI = 155,
+ DEV_MAGUMARASI = 156,
+ DEV_BAKUHUUN = 157,
+ DEV_WANINOKO = 158,
+ DEV_ARIGEITU = 159,
+ DEV_OODAIRU = 160,
+ DEV_OTATI = 161,
+ DEV_OOTATI = 162,
+ DEV_HOOHOO = 163,
+ DEV_YORUNOZUKU = 164,
+ DEV_REDHIBA = 165,
+ DEV_REDHIAN = 166,
+ DEV_ITOMARU = 167,
+ DEV_ARIADOSU = 168,
+ DEV_KUROBATTO = 169,
+ DEV_TYONTII = 170,
+ DEV_RANTAAN = 171,
+ DEV_PITYUU = 172,
+ DEV_PHI = 173,
+ DEV_PUPURIN = 174,
+ DEV_TOGEPII = 175,
+ DEV_TOGETIKKU = 176,
+ DEV_NEITHI = 177,
+ DEV_NEITHIO = 178,
+ DEV_MERIIPU = 179,
+ DEV_MOKOKO = 180,
+ DEV_DENRYUU = 181,
+ DEV_KIREIHANA = 182,
+ DEV_MARIRU = 183,
+ DEV_MARIRURI = 184,
+ DEV_USOKKII = 185,
+ DEV_NYOROTONO = 186,
+ DEV_HANEKKO = 187,
+ DEV_POPOKKO = 188,
+ DEV_WATAKKO = 189,
+ DEV_EIPAMU = 190,
+ DEV_HIMANATTU = 191,
+ DEV_KIMAWARI = 192,
+ DEV_YANYANMA = 193,
+ DEV_UPAA = 194,
+ DEV_NUOO = 195,
+ DEV_EEFI = 196,
+ DEV_BURAKKII = 197,
+ DEV_YAMIKARASU = 198,
+ DEV_YADOKINGU = 199,
+ DEV_MUUMA = 200,
+ DEV_ANNOON = 201,
+ DEV_SOONANSU = 202,
+ DEV_KIRINRIKI = 203,
+ DEV_KUNUGIDAMA = 204,
+ DEV_FORETOSU = 205,
+ DEV_NOKOTTI = 206,
+ DEV_GURAIGAA = 207,
+ DEV_HAGANEERU = 208,
+ DEV_BURUU = 209,
+ DEV_GURANBURU = 210,
+ DEV_HARIISEN = 211,
+ DEV_HASSAMU = 212,
+ DEV_TUBOTUBO = 213,
+ DEV_HERAKUROSU = 214,
+ DEV_NYUURA = 215,
+ DEV_HIMEGUMA = 216,
+ DEV_RINGUMA = 217,
+ DEV_MAGUMAGGU = 218,
+ DEV_MAGUKARUGO = 219,
+ DEV_URIMUU = 220,
+ DEV_INOMUU = 221,
+ DEV_SANIIGO = 222,
+ DEV_TEPPOUO = 223,
+ DEV_OKUTAN = 224,
+ DEV_DERIBAADO = 225,
+ DEV_MANTAIN = 226,
+ DEV_EAAMUDO = 227,
+ DEV_DERUBIRU = 228,
+ DEV_HERUGAA = 229,
+ DEV_KINGUDORA = 230,
+ DEV_GOMAZOU = 231,
+ DEV_DONFAN = 232,
+ DEV_PORIGON2 = 233,
+ DEV_ODOSISI = 234,
+ DEV_DOOBURU = 235,
+ DEV_BARUKII = 236,
+ DEV_KAPOERAA = 237,
+ DEV_MUTYUURU = 238,
+ DEV_EREKIDDO = 239,
+ DEV_BUBHI = 240,
+ DEV_MIRUTANKU = 241,
+ DEV_HAPINASU = 242,
+ DEV_RAIKOU = 243,
+ DEV_ENTEI = 244,
+ DEV_SUIKUN = 245,
+ DEV_YOOGIRASU = 246,
+ DEV_SANAGIRASU = 247,
+ DEV_BANGIRASU = 248,
+ DEV_RUGIA = 249,
+ DEV_HOUOU = 250,
+ DEV_SEREBHI = 251,
+ DEV_KIMORI = 252,
+ DEV_ZYUPUTORU = 253,
+ DEV_ZYUKAIN = 254,
+ DEV_ATYAMO = 255,
+ DEV_WAKASYAMO = 256,
+ DEV_BASYAAMO = 257,
+ DEV_MIZUGOROU = 258,
+ DEV_NUMAKUROO = 259,
+ DEV_RAGURAAZI = 260,
+ DEV_POTIENA = 261,
+ DEV_GURAENA = 262,
+ DEV_ZIGUZAGUMA = 263,
+ DEV_MASSUGUMA = 264,
+ DEV_KEMUSSO = 265,
+ DEV_KARASARISU = 266,
+ DEV_AGEHANTO = 267,
+ DEV_MAYURUDO = 268,
+ DEV_DOKUKEIRU = 269,
+ DEV_HASUBOO = 270,
+ DEV_HASUBURERO = 271,
+ DEV_RUNPAPPA = 272,
+ DEV_TANEBOO = 273,
+ DEV_KONOHANA = 274,
+ DEV_DAATENGU = 275,
+ DEV_SUBAME = 276,
+ DEV_OOSUBAME = 277,
+ DEV_KYAMOME = 278,
+ DEV_PERIPPAA = 279,
+ DEV_RARUTOSU = 280,
+ DEV_KIRURIA = 281,
+ DEV_SAANAITO = 282,
+ DEV_AMETAMA = 283,
+ DEV_AMEMOOSU = 284,
+ DEV_KINOKOKO = 285,
+ DEV_KINOGASSA = 286,
+ DEV_NAMAKERO = 287,
+ DEV_YARUKIMONO = 288,
+ DEV_KEKKINGU = 289,
+ DEV_TUTININ = 290,
+ DEV_TEKKANIN = 291,
+ DEV_NUKENIN = 292,
+ DEV_GONYONYO = 293,
+ DEV_DOGOOMU = 294,
+ DEV_BAKUONGU = 295,
+ DEV_MAKUNOSITA = 296,
+ DEV_HARITEYAMA = 297,
+ DEV_RURIRI = 298,
+ DEV_NOZUPASU = 299,
+ DEV_ENEKO = 300,
+ DEV_ENEKORORO = 301,
+ DEV_YAMIRAMI = 302,
+ DEV_KUTIITO = 303,
+ DEV_KOKODORA = 304,
+ DEV_KODORA = 305,
+ DEV_BOSUGODORA = 306,
+ DEV_ASANAN = 307,
+ DEV_TYAAREMU = 308,
+ DEV_RAKURAI = 309,
+ DEV_RAIBORUTO = 310,
+ DEV_PURASURU = 311,
+ DEV_MAINAN = 312,
+ DEV_BARUBIITO = 313,
+ DEV_IRUMIIZE = 314,
+ DEV_ROZERIA = 315,
+ DEV_GOKURIN = 316,
+ DEV_MARUNOOMU = 317,
+ DEV_KIBANIA = 318,
+ DEV_SAMEHADAA = 319,
+ DEV_HOERUKO = 320,
+ DEV_HOERUOO = 321,
+ DEV_DONMERU = 322,
+ DEV_BAKUUDA = 323,
+ DEV_KOOTASU = 324,
+ DEV_BANEBUU = 325,
+ DEV_BUUPIGGU = 326,
+ DEV_PATTIIRU = 327,
+ DEV_NAKKURAA = 328,
+ DEV_BIBURAABA = 329,
+ DEV_HURAIGON = 330,
+ DEV_SABONEA = 331,
+ DEV_NOKUTASU = 332,
+ DEV_TIRUTTO = 333,
+ DEV_TIRUTARISU = 334,
+ DEV_ZANGUUSU = 335,
+ DEV_HABUNEEKU = 336,
+ DEV_RUNATOON = 337,
+ DEV_SORUROKKU = 338,
+ DEV_DOZYOTTI = 339,
+ DEV_NAMAZUN = 340,
+ DEV_HEIGANI = 341,
+ DEV_SIZARIGAA = 342,
+ DEV_YAZIRON = 343,
+ DEV_NENDOORU = 344,
+ DEV_RIRIIRA = 345,
+ DEV_YUREIDORU = 346,
+ DEV_ANOPUSU = 347,
+ DEV_AAMARUDO = 348,
+ DEV_HINBASU = 349,
+ DEV_MIROKAROSU = 350,
+ DEV_POWARUN = 351,
+ DEV_KAKUREON = 352,
+ DEV_KAGEBOUZU = 353,
+ DEV_ZYUPETTA = 354,
+ DEV_YOMAWARU = 355,
+ DEV_SAMAYOORU = 356,
+ DEV_TOROPIUSU = 357,
+ DEV_TIRIIN = 358,
+ DEV_ABUSORU = 359,
+ DEV_SOONANO = 360,
+ DEV_YUKIWARASI = 361,
+ DEV_ONIGOORI = 362,
+ DEV_TAMAZARASI = 363,
+ DEV_TODOGURAA = 364,
+ DEV_TODOZERUGA = 365,
+ DEV_PAARURU = 366,
+ DEV_HANTEERU = 367,
+ DEV_SAKURABISU = 368,
+ DEV_ZIIRANSU = 369,
+ DEV_RABUKASU = 370,
+ DEV_TATUBEI = 371,
+ DEV_KOMORUU = 372,
+ DEV_BOOMANDA = 373,
+ DEV_DANBARU = 374,
+ DEV_METANGU = 375,
+ DEV_METAGUROSU = 376,
+ DEV_REZIROKKU = 377,
+ DEV_REZIAISU = 378,
+ DEV_REZISUTIRU = 379,
+ DEV_RATHIASU = 380,
+ DEV_RATHIOSU = 381,
+ DEV_KAIOOGA = 382,
+ DEV_GURAADON = 383,
+ DEV_REKKUUZA = 384,
+ DEV_ZIRAATI = 385,
+ DEV_DEOKISISU = 386,
+ DEV_NAETORU = 387,
+ DEV_HAYASIGAME = 388,
+ DEV_DODAITOSU = 389,
+ DEV_HIKOZARU = 390,
+ DEV_MOUKAZARU = 391,
+ DEV_GOUKAZARU = 392,
+ DEV_POTTYAMA = 393,
+ DEV_POTTAISI = 394,
+ DEV_ENPERUTO = 395,
+ DEV_MUKKURU = 396,
+ DEV_MUKUBAADO = 397,
+ DEV_MUKUHOOKU = 398,
+ DEV_BIPPA = 399,
+ DEV_BIIDARU = 400,
+ DEV_KOROBOOSI = 401,
+ DEV_KOROTOKKU = 402,
+ DEV_KORINKU = 403,
+ DEV_RUKUSIO = 404,
+ DEV_RENTORAA = 405,
+ DEV_SUBOMII = 406,
+ DEV_ROZUREIDO = 407,
+ DEV_ZUGAIDOSU = 408,
+ DEV_RAMUPARUDO = 409,
+ DEV_TATETOPUSU = 410,
+ DEV_TORIDEPUSU = 411,
+ DEV_MINOMUTTI = 412,
+ DEV_MINOMADAMU = 413,
+ DEV_GAAMEIRU = 414,
+ DEV_MITUHANII = 415,
+ DEV_BIIKUIN = 416,
+ DEV_PATIRISU = 417,
+ DEV_BUIZERU = 418,
+ DEV_HUROOZERU = 419,
+ DEV_THERINBO = 420,
+ DEV_THERIMU = 421,
+ DEV_KARANAKUSI = 422,
+ DEV_TORITODON = 423,
+ DEV_ETEBOOSU = 424,
+ DEV_HUWANTE = 425,
+ DEV_HUWARAIDO = 426,
+ DEV_MIMIRORU = 427,
+ DEV_MIMIROPPU = 428,
+ DEV_MUUMAAZI = 429,
+ DEV_DONKARASU = 430,
+ DEV_NYARUMAA = 431,
+ DEV_BUNYATTO = 432,
+ DEV_RIISYAN = 433,
+ DEV_SUKANPUU = 434,
+ DEV_SUKATANKU = 435,
+ DEV_DOOMIRAA = 436,
+ DEV_DOOTAKUN = 437,
+ DEV_USOHATI = 438,
+ DEV_MANENE = 439,
+ DEV_PINPUKU = 440,
+ DEV_PERAPPU = 441,
+ DEV_MIKARUGE = 442,
+ DEV_HUKAMARU = 443,
+ DEV_GABAITO = 444,
+ DEV_GABURIASU = 445,
+ DEV_GONBE = 446,
+ DEV_RIORU = 447,
+ DEV_RUKARIO = 448,
+ DEV_HIPOPOTASU = 449,
+ DEV_KABARUDON = 450,
+ DEV_SUKORUPI = 451,
+ DEV_DORAPION = 452,
+ DEV_GUREGGURU = 453,
+ DEV_DOKUROGGU = 454,
+ DEV_MASUKIPPA = 455,
+ DEV_KEIKOUO = 456,
+ DEV_NEORANTO = 457,
+ DEV_TAMANTA = 458,
+ DEV_YUKIKABURI = 459,
+ DEV_YUKINOOO = 460,
+ DEV_MANYUURA = 461,
+ DEV_ZIBAKOIRU = 462,
+ DEV_BEROBERUTO = 463,
+ DEV_DOSAIDON = 464,
+ DEV_MOZYANBO = 465,
+ DEV_EREKIBURU = 466,
+ DEV_BUUBAAN = 467,
+ DEV_TOGEKISSU = 468,
+ DEV_MEGAYANMA = 469,
+ DEV_RIIFIA = 470,
+ DEV_GUREISIA = 471,
+ DEV_GURAION = 472,
+ DEV_MANMUU = 473,
+ DEV_PORIGONz = 474,
+ DEV_ERUREIDO = 475,
+ DEV_DAINOOZU = 476,
+ DEV_YONOWAARU = 477,
+ DEV_YUKIMENOKO = 478,
+ DEV_ROTOMU = 479,
+ DEV_YUKUSII = 480,
+ DEV_EMURITTO = 481,
+ DEV_AGUNOMU = 482,
+ DEV_DHIARUGA = 483,
+ DEV_PARUKIA = 484,
+ DEV_HIIDORAN = 485,
+ DEV_REZIGIGASU = 486,
+ DEV_GIRATHINA = 487,
+ DEV_KURESERIA = 488,
+ DEV_FIONE = 489,
+ DEV_MANAFI = 490,
+ DEV_DAAKURAI = 491,
+ DEV_SHEIMI = 492,
+ DEV_ARUSEUSU = 493,
+ DEV_BIKUTHINI = 494,
+ DEV_TUTAAZYA = 495,
+ DEV_ZYANOBII = 496,
+ DEV_ZYAROODA = 497,
+ DEV_POKABU = 498,
+ DEV_TYAOBUU = 499,
+ DEV_ENBUOO = 500,
+ DEV_MIZYUMARU = 501,
+ DEV_HUTATIMARU = 502,
+ DEV_DAIKENKI = 503,
+ DEV_MINEZUMI = 504,
+ DEV_MIRUHOGGU = 505,
+ DEV_YOOTERII = 506,
+ DEV_HAADERIA = 507,
+ DEV_MUURANDO = 508,
+ DEV_TYORONEKO = 509,
+ DEV_REPARUDASU = 510,
+ DEV_YANAPPU = 511,
+ DEV_YANAKKII = 512,
+ DEV_BAOPPU = 513,
+ DEV_BAOKKII = 514,
+ DEV_HIYAPPU = 515,
+ DEV_HIYAKKII = 516,
+ DEV_MUNNA = 517,
+ DEV_MUSYAANA = 518,
+ DEV_MAMEPATO = 519,
+ DEV_HATOOBOO = 520,
+ DEV_KENHOROU = 521,
+ DEV_SIMAMA = 522,
+ DEV_ZEBURAIKA = 523,
+ DEV_DANGORO = 524,
+ DEV_GANTORU = 525,
+ DEV_GIGAIASU = 526,
+ DEV_KOROMORI = 527,
+ DEV_KOKOROMORI = 528,
+ DEV_MOGURYUU = 529,
+ DEV_DORYUUZU = 530,
+ DEV_TABUNNE = 531,
+ DEV_DOKKORAA = 532,
+ DEV_DOTEKKOTU = 533,
+ DEV_ROOBUSIN = 534,
+ DEV_OTAMARO = 535,
+ DEV_GAMAGARU = 536,
+ DEV_GAMAGEROGE = 537,
+ DEV_NAGEKI = 538,
+ DEV_DAGEKI = 539,
+ DEV_KURUMIRU = 540,
+ DEV_KURUMAYU = 541,
+ DEV_HAHAKOMORI = 542,
+ DEV_HUSIDE = 543,
+ DEV_HOIIGA = 544,
+ DEV_PENDORAA = 545,
+ DEV_MONMEN = 546,
+ DEV_ERUHUUN = 547,
+ DEV_TYURINE = 548,
+ DEV_DOREDHIA = 549,
+ DEV_BASURAO = 550,
+ DEV_MEGUROKO = 551,
+ DEV_WARUBIRU = 552,
+ DEV_WARUBIARU = 553,
+ DEV_DARUMAKKA = 554,
+ DEV_HIHIDARUMA = 555,
+ DEV_MARAKATTI = 556,
+ DEV_ISIZUMAI = 557,
+ DEV_IWAPARESU = 558,
+ DEV_ZURUGGU = 559,
+ DEV_ZURUZUKIN = 560,
+ DEV_SINBORAA = 561,
+ DEV_DESUMASU = 562,
+ DEV_DESUKAAN = 563,
+ DEV_PUROTOOGA = 564,
+ DEV_ABAGOORA = 565,
+ DEV_AAKEN = 566,
+ DEV_AAKEOSU = 567,
+ DEV_YABUKURON = 568,
+ DEV_DASUTODASU = 569,
+ DEV_ZOROA = 570,
+ DEV_ZOROAAKU = 571,
+ DEV_TIRAAMHI = 572,
+ DEV_TIRATIINO = 573,
+ DEV_GOTIMU = 574,
+ DEV_GOTIMIRU = 575,
+ DEV_GOTIRUZERU = 576,
+ DEV_YUNIRAN = 577,
+ DEV_DABURAN = 578,
+ DEV_RANKURUSU = 579,
+ DEV_KOARUHII = 580,
+ DEV_SUWANNA = 581,
+ DEV_BANIPUTTI = 582,
+ DEV_BANIRITTI = 583,
+ DEV_BAIBANIRA = 584,
+ DEV_SIKIZIKA = 585,
+ DEV_MEBUKIZIKA = 586,
+ DEV_EMONGA = 587,
+ DEV_KABURUMO = 588,
+ DEV_SYUBARUGO = 589,
+ DEV_TAMAGETAKE = 590,
+ DEV_MOROBARERU = 591,
+ DEV_PURURIRU = 592,
+ DEV_BURUNGERU = 593,
+ DEV_MAMANBOU = 594,
+ DEV_BATYURU = 595,
+ DEV_DENTYURA = 596,
+ DEV_TESSIIDO = 597,
+ DEV_NATTOREI = 598,
+ DEV_GIARU = 599,
+ DEV_GIGIARU = 600,
+ DEV_GIGIGIARU = 601,
+ DEV_SIBISIRASU = 602,
+ DEV_SIBIBIIRU = 603,
+ DEV_SIBIRUDON = 604,
+ DEV_RIGUREE = 605,
+ DEV_OOBEMU = 606,
+ DEV_HITOMOSI = 607,
+ DEV_RANPURAA = 608,
+ DEV_SYANDERA = 609,
+ DEV_KIBAGO = 610,
+ DEV_ONONDO = 611,
+ DEV_ONONOKUSU = 612,
+ DEV_KUMASYUN = 613,
+ DEV_TUNBEAA = 614,
+ DEV_HURIIZIO = 615,
+ DEV_TYOBOMAKI = 616,
+ DEV_AGIRUDAA = 617,
+ DEV_MAGGYO = 618,
+ DEV_KOZYOHUU = 619,
+ DEV_KOZYONDO = 620,
+ DEV_KURIMUGAN = 621,
+ DEV_GOBITTO = 622,
+ DEV_GORUUGU = 623,
+ DEV_KOMATANA = 624,
+ DEV_KIRIKIZAN = 625,
+ DEV_BAHHURON = 626,
+ DEV_WASIBON = 627,
+ DEV_WHOOGURU = 628,
+ DEV_BARUTYAI = 629,
+ DEV_BARUZIINA = 630,
+ DEV_KUITARAN = 631,
+ DEV_AIANTO = 632,
+ DEV_MONOZU = 633,
+ DEV_ZIHEDDO = 634,
+ DEV_SAZANDORA = 635,
+ DEV_MERARUBA = 636,
+ DEV_URUGAMOSU = 637,
+ DEV_KOBARUON = 638,
+ DEV_TERAKION = 639,
+ DEV_BIRIZION = 640,
+ DEV_TORUNEROSU = 641,
+ DEV_BORUTOROSU = 642,
+ DEV_RESIRAMU = 643,
+ DEV_ZEKUROMU = 644,
+ DEV_RANDOROSU = 645,
+ DEV_KYUREMU = 646,
+ DEV_KERUDHIO = 647,
+ DEV_MEROETTA = 648,
+ DEV_GENOSEKUTO = 649,
+ DEV_HARIMARON = 650,
+ DEV_HARIBOOGU = 651,
+ DEV_BURIGARON = 652,
+ DEV_FOKKO = 653,
+ DEV_TEERUNAA = 654,
+ DEV_MAFOKUSII = 655,
+ DEV_KEROMATU = 656,
+ DEV_GEKOGASIRA = 657,
+ DEV_GEKKOUGA = 658,
+ DEV_HORUBII = 659,
+ DEV_HORUUDO = 660,
+ DEV_YAYAKOMA = 661,
+ DEV_HINOYAKOMA = 662,
+ DEV_FAIAROO = 663,
+ DEV_KOHUKIMUSI = 664,
+ DEV_KOHUURAI = 665,
+ DEV_BIBIYON = 666,
+ DEV_SISIKO = 667,
+ DEV_KAENZISI = 668,
+ DEV_HURABEBE = 669,
+ DEV_HURAETTE = 670,
+ DEV_HURAAJESU = 671,
+ DEV_MHEEKURU = 672,
+ DEV_GOOGOOTO = 673,
+ DEV_YANTYAMU = 674,
+ DEV_GORONDA = 675,
+ DEV_TORIMIAN = 676,
+ DEV_NYASUPAA = 677,
+ DEV_NYAONIKUSU = 678,
+ DEV_HITOTUKI = 679,
+ DEV_NIDANGIRU = 680,
+ DEV_GIRUGARUDO = 681,
+ DEV_SYUSYUPU = 682,
+ DEV_HUREHUWAN = 683,
+ DEV_PEROPPAHU = 684,
+ DEV_PERORIIMU = 685,
+ DEV_MAAIIKA = 686,
+ DEV_KARAMANERO = 687,
+ DEV_KAMETETE = 688,
+ DEV_GAMENODESU = 689,
+ DEV_KUZUMOO = 690,
+ DEV_DORAMIDORO = 691,
+ DEV_UDEPPOU = 692,
+ DEV_BUROSUTAA = 693,
+ DEV_ERIKITERU = 694,
+ DEV_EREZAADO = 695,
+ DEV_TIGORASU = 696,
+ DEV_GATIGORASU = 697,
+ DEV_AMARUSU = 698,
+ DEV_AMARURUGA = 699,
+ DEV_NINFIA = 700,
+ DEV_RUTYABURU = 701,
+ DEV_DEDENNE = 702,
+ DEV_MERESII = 703,
+ DEV_NUMERA = 704,
+ DEV_NUMEIRU = 705,
+ DEV_NUMERUGON = 706,
+ DEV_KUREHFI = 707,
+ DEV_BOKUREE = 708,
+ DEV_OOROTTO = 709,
+ DEV_BAKETTYA = 710,
+ DEV_PANPUZIN = 711,
+ DEV_KATIKOORU = 712,
+ DEV_KUREBEESU = 713,
+ DEV_ONBATTO = 714,
+ DEV_ONBAAN = 715,
+ DEV_ZERUNEASU = 716,
+ DEV_IBERUTARU = 717,
+ DEV_ZIGARUDE = 718,
+ DEV_DHIANSII = 719,
+ DEV_HUUPA = 720,
+ DEV_BORUKENION = 721,
+ DEV_MOKUROO = 722,
+ DEV_HUKUSUROO = 723,
+ DEV_ZYUNAIPAA = 724,
+ DEV_NYABII = 725,
+ DEV_NYAHIITO = 726,
+ DEV_GAOGAEN = 727,
+ DEV_ASIMARI = 728,
+ DEV_OSYAMARI = 729,
+ DEV_ASIREENU = 730,
+ DEV_TUTUKERA = 731,
+ DEV_KERARAPPA = 732,
+ DEV_DODEKABASI = 733,
+ DEV_YANGUUSU = 734,
+ DEV_DEKAGUUSU = 735,
+ DEV_AGOZIMUSI = 736,
+ DEV_DENDIMUSI = 737,
+ DEV_KUWAGANON = 738,
+ DEV_MAKENKANI = 739,
+ DEV_KEKENKANI = 740,
+ DEV_ODORIDORI = 741,
+ DEV_ABURII = 742,
+ DEV_ABURIBON = 743,
+ DEV_IWANKO = 744,
+ DEV_RUGARUGAN = 745,
+ DEV_YOWASI = 746,
+ DEV_HIDOIDE = 747,
+ DEV_DOHIDOIDE = 748,
+ DEV_DOROBANKO = 749,
+ DEV_BANBADORO = 750,
+ DEV_SIZUKUMO = 751,
+ DEV_ONISIZUKUMO = 752,
+ DEV_KARIKIRI = 753,
+ DEV_RARANTESU = 754,
+ DEV_NEMASYU = 755,
+ DEV_MASHEEDO = 756,
+ DEV_YATOUMORI = 757,
+ DEV_ENNYUUTO = 758,
+ DEV_NUIKOGUMA = 759,
+ DEV_KITERUGUMA = 760,
+ DEV_AMAKAZI = 761,
+ DEV_AMAMAIKO = 762,
+ DEV_AMAAZYO = 763,
+ DEV_KYUWAWAA = 764,
+ DEV_YAREYUUTAN = 765,
+ DEV_NAGETUKESARU = 766,
+ DEV_KOSOKUMUSI = 767,
+ DEV_GUSOKUMUSYA = 768,
+ DEV_SUNABHA = 769,
+ DEV_SIRODESUNA = 770,
+ DEV_NAMAKOBUSI = 771,
+ DEV_TAIPUNURU = 772,
+ DEV_SIRUVHADHI = 773,
+ DEV_METENO = 774,
+ DEV_NEKKOARA = 775,
+ DEV_BAKUGAMESU = 776,
+ DEV_TOGEDEMARU = 777,
+ DEV_MIMIKKYU = 778,
+ DEV_HAGIGISIRI = 779,
+ DEV_ZIZIIRON = 780,
+ DEV_DADARIN = 781,
+ DEV_ZYARAKO = 782,
+ DEV_ZYARANGO = 783,
+ DEV_ZYARARANGA = 784,
+ DEV_KAPUKOKEKO = 785,
+ DEV_KAPUTETEHU = 786,
+ DEV_KAPUBURURU = 787,
+ DEV_KAPUREHIRE = 788,
+ DEV_KOSUMOGGU = 789,
+ DEV_KOSUMOUMU = 790,
+ DEV_SORUGAREO = 791,
+ DEV_RUNAAARA = 792,
+ DEV_UTUROIDO = 793,
+ DEV_MASSIBUUN = 794,
+ DEV_FEROOTHE = 795,
+ DEV_DENZYUMOKU = 796,
+ DEV_TEKKAGUYA = 797,
+ DEV_KAMITURUGI = 798,
+ DEV_AKUZIKINGU = 799,
+ DEV_NEKUROZUMA = 800,
+ DEV_MAGIANA = 801,
+ DEV_MAASYADOO = 802,
+ DEV_BEBENOMU = 803,
+ DEV_AAGOYON = 804,
+ DEV_TUNDETUNDE = 805,
+ DEV_ZUGADOON = 806,
+ DEV_ZERAORA = 807,
+ DEV_MERUTAN = 808,
+ DEV_MERUMETARU = 809,
+ DEV_SARUNORI = 810,
+ DEV_BATINKII = 811,
+ DEV_GORIRANDAA = 812,
+ DEV_HIBANII = 813,
+ DEV_RABIHUTTO = 814,
+ DEV_EESUBAAN = 815,
+ DEV_MESSON = 816,
+ DEV_ZIMEREON = 817,
+ DEV_INTEREON = 818,
+ DEV_HOSIGARISU = 819,
+ DEV_YOKUBARISU = 820,
+ DEV_KOKOGARA = 821,
+ DEV_AOGARASU = 822,
+ DEV_AAMAAGAA = 823,
+ DEV_SATTIMUSI = 824,
+ DEV_REDOOMUSI = 825,
+ DEV_IORUBU = 826,
+ DEV_KUSUNE = 827,
+ DEV_FOKUSURAI = 828,
+ DEV_HIMENKA = 829,
+ DEV_WATASIRAGA = 830,
+ DEV_UURUU = 831,
+ DEV_BAIUURUU = 832,
+ DEV_KAMUKAME = 833,
+ DEV_KAZIRIGAME = 834,
+ DEV_WANPATI = 835,
+ DEV_PARUSUWAN = 836,
+ DEV_TANDON = 837,
+ DEV_TOROGGON = 838,
+ DEV_SEKITANZAN = 839,
+ DEV_KAZITTYU = 840,
+ DEV_APPURYUU = 841,
+ DEV_TARUPPURU = 842,
+ DEV_SUNAHEBI = 843,
+ DEV_SADAIZYA = 844,
+ DEV_UUU = 845,
+ DEV_SASIKAMASU = 846,
+ DEV_KAMASUZYOO = 847,
+ DEV_EREZUN = 848,
+ DEV_SUTORINDAA = 849,
+ DEV_YAKUDE = 850,
+ DEV_MARUYAKUDE = 851,
+ DEV_TATAKKO = 852,
+ DEV_OTOSUPASU = 853,
+ DEV_YABATYA = 854,
+ DEV_POTTODESU = 855,
+ DEV_MIBURIMU = 856,
+ DEV_TEBURIMU = 857,
+ DEV_BURIMUON = 858,
+ DEV_BEROBAA = 859,
+ DEV_GIMOO = 860,
+ DEV_OORONGE = 861,
+ DEV_TATIHUSAGUMA = 862,
+ DEV_NYAIKINGU = 863,
+ DEV_SANIGOON = 864,
+ DEV_NEGIGANAITO = 865,
+ DEV_BARIKOORU = 866,
+ DEV_DESUBAAN = 867,
+ DEV_MAHOMIRU = 868,
+ DEV_MAHOIPPU = 869,
+ DEV_TAIREETU = 870,
+ DEV_BATINUNI = 871,
+ DEV_YUKIHAMI = 872,
+ DEV_MOSUNOU = 873,
+ DEV_ISIHENZIN = 874,
+ DEV_KOORIPPO = 875,
+ DEV_IESSAN = 876,
+ DEV_MORUPEKO = 877,
+ DEV_ZOUDOU = 878,
+ DEV_DAIOUDOU = 879,
+ DEV_PATTIRAGON = 880,
+ DEV_PATTIRUDON = 881,
+ DEV_UONORAGON = 882,
+ DEV_UOTIRUDON = 883,
+ DEV_ZYURARUDON = 884,
+ DEV_DORAMESIYA = 885,
+ DEV_DORONTI = 886,
+ DEV_DORAPARUTO = 887,
+ DEV_ZASIAN = 888,
+ DEV_ZAMAZENTA = 889,
+ DEV_MUGENDAINA = 890,
+ DEV_AAMAA1 = 891,
+ DEV_AAMAA2 = 892,
+ DEV_m23 = 893,
+ DEV_REDEN = 894,
+ DEV_REDORA = 895,
+ DEV_HAKUBA = 896,
+ DEV_KOKUBA = 897,
+ DEV_KURAUN = 898,
+ DEV_ODOSISI2 = 899,
+ DEV_SUTORAIKU2 = 900,
+ DEV_HIMEGUMA3 = 901,
+ DEV_rBASURAO2 = 902,
+ DEV_rNYUURA2 = 903,
+ DEV_rHARISEN2 = 904,
+ DEV_FEATOROSU = 905,
+ DEV_NEKO1 = 906,
+ DEV_NEKO2 = 907,
+ DEV_NEKO3 = 908,
+ DEV_WANI1 = 909,
+ DEV_WANI2 = 910,
+ DEV_WANI3 = 911,
+ DEV_KAMO1 = 912,
+ DEV_KAMO2 = 913,
+ DEV_KAMO3 = 914,
+ DEV_BUTA1 = 915,
+ DEV_BUTA2 = 916,
+ DEV_NOKOTTI2 = 917,
+ DEV_KUMO1 = 918,
+ DEV_KUMO2 = 919,
+ DEV_BATTA1 = 920,
+ DEV_BATTA2 = 921,
+ DEV_SUKARABE1 = 922,
+ DEV_SUKARABE2 = 923,
+ DEV_OBAKEINU1 = 924,
+ DEV_OBAKEINU2 = 925,
+ DEV_DATYOU1 = 926,
+ DEV_DATYOU2 = 927,
+ DEV_KIRINRIKI2 = 928,
+ DEV_UMIDHIGUDA = 929,
+ DEV_UMITORIO = 930,
+ DEV_OYAKATA = 931,
+ DEV_MERURUUSA = 932,
+ DEV_IRUKA1 = 933,
+ DEV_IRUKA2 = 934,
+ DEV_ORIIBU1 = 935,
+ DEV_ORIIBU2 = 936,
+ DEV_ORIIBU3 = 937,
+ DEV_HABANERO1 = 938,
+ DEV_HABANERO2 = 939,
+ DEV_KAERU1 = 940,
+ DEV_KAERU2 = 941,
+ DEV_ENZIN1 = 942,
+ DEV_ENZIN2 = 943,
+ DEV_MIMIZU = 944,
+ DEV_NEZUMI1 = 945,
+ DEV_NEZUMI2 = 946,
+ DEV_OKAKUZIRA1 = 947,
+ DEV_OKAKUZIRA2 = 948,
+ DEV_KOORIDORA1 = 949,
+ DEV_KOORIDORA2 = 950,
+ DEV_KOORIDORA3 = 951,
+ DEV_SUSIDORA = 952,
+ DEV_BAIKU = 953,
+ DEV_MAAMOTTO1 = 954,
+ DEV_MAAMOTTO2 = 955,
+ DEV_MAAMOTTO3 = 956,
+ DEV_MIZUDORI1 = 957,
+ DEV_MIZUDORI2 = 958,
+ DEV_KOUNOTORI = 959,
+ DEV_INKO = 960,
+ DEV_HURAMINGO = 961,
+ DEV_KEGANI = 962,
+ DEV_GANEN1 = 963,
+ DEV_GANEN2 = 964,
+ DEV_GANEN3 = 965,
+ DEV_KARUKAN1 = 966,
+ DEV_KARUKAN2 = 967,
+ DEV_AIAI1 = 968,
+ DEV_AIAI2 = 969,
+ DEV_PANINU1 = 970,
+ DEV_PANINU2 = 971,
+ DEV_MASUTHIHU1 = 972,
+ DEV_MASUTHIHU2 = 973,
+ DEV_TANBURU1 = 974,
+ DEV_TANBURU2 = 975,
+ DEV_KOIN1 = 976,
+ DEV_KOIN2 = 977,
+ DEV_ADONFAN = 978,
+ DEV_AMOROBARERU = 979,
+ DEV_AKETUBAN = 980,
+ DEV_AREAKOIRU = 981,
+ DEV_APURIN = 982,
+ DEV_AMUUMA = 983,
+ DEV_AURUGAMOSU = 984,
+ DEV_AAAAA = 985,
+ DEV_BDONFAN = 986,
+ DEV_BKETUBAN = 987,
+ DEV_BURUGAMOSU = 988,
+ DEV_BHARITEYAMA = 989,
+ DEV_BSAZANDORA = 990,
+ DEV_BBANGIRASU = 991,
+ DEV_BKOORI = 992,
+ DEV_BBBBB = 993,
+ DEV_ZYUNDEN1 = 994,
+ DEV_ZYUNDEN2 = 995,
+ DEV_ZYUNDEN3 = 996,
+ DEV_ZYUNDEN4 = 997,
+ DEV_AIGUANA = 998,
+ DEV_BIGUANA = 999,
+ DEV_FEARII1 = 1000,
+ DEV_FEARII2 = 1001,
+ DEV_FEARII3 = 1002,
+ DEV_HINOKO1 = 1003,
+ DEV_HINOKO2A = 1004,
+ DEV_HINOKO2B = 1005,
+ DEV_OKAKINGU = 1006,
+ DEV_OKAGYARADOSU = 1007,
+ DEV_KOMATANA3 = 1008,
+ DEV_rUPAA2 = 1009,
+ DEV_MANKII3 = 1010,
+ DEV_KAMENONI = 1011,
+ DEV_KAZITTYU2 = 1012,
+ DEV_KAZITTYU3 = 1013,
+ DEV_DOKUINU = 1014,
+ DEV_DOKUZARU = 1015,
+ DEV_DOKUKIZI = 1016,
+ DEV_AENTEI = 1017,
+ DEV_ARAIKOU = 1018,
+ DEV_BKOBARUON = 1019,
+ DEV_BTERAKION = 1020,
+ DEV_KODAIGAME = 1021,
+ DEV_DOKUTAROU = 1022,
+ DEV_ZYURARUDO2 = 1023,
+ DEV_MATCHA1 = 1024,
+ DEV_MATCHA2 = 1025,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/HoldItem.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/HoldItem.fbs
new file mode 100644
index 00000000..034416d9
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/HoldItem.fbs
@@ -0,0 +1,5 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table HoldItem {
+ ItemId:int;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/ItemID.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/ItemID.fbs
new file mode 100644
index 00000000..7a1affed
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/ItemID.fbs
@@ -0,0 +1,571 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum ItemID : int
+{
+ ITEMID_NONE = 0,
+ ITEMID_MASUTAABOORU = 1,
+ ITEMID_HAIPAABOORU = 2,
+ ITEMID_SUUPAABOORU = 3,
+ ITEMID_MONSUTAABOORU = 4,
+ ITEMID_SAFARIBOORU = 5,
+ ITEMID_NETTOBOORU = 6,
+ ITEMID_DAIBUBOORU = 7,
+ ITEMID_NESUTOBOORU = 8,
+ ITEMID_RIPIITOBOORU = 9,
+ ITEMID_TAIMAABOORU = 10,
+ ITEMID_GOOZYASUBOORU = 11,
+ ITEMID_PUREMIABOORU = 12,
+ ITEMID_DAAKUBOORU = 13,
+ ITEMID_HIIRUBOORU = 14,
+ ITEMID_KUIKKUBOORU = 15,
+ ITEMID_PURESYASUBOORU = 16,
+ ITEMID_KIZUGUSURI = 17,
+ ITEMID_DOKUKESI = 18,
+ ITEMID_YAKEDONAOSI = 19,
+ ITEMID_KOORINAOSI = 20,
+ ITEMID_NEMUKEZAMASI = 21,
+ ITEMID_MAHINAOSI = 22,
+ ITEMID_KAIHUKUNOKUSURI = 23,
+ ITEMID_MANTANNOKUSURI = 24,
+ ITEMID_SUGOIKIZUGUSURI = 25,
+ ITEMID_IIKIZUGUSURI = 26,
+ ITEMID_NANDEMONAOSI = 27,
+ ITEMID_GENKINOKAKERA = 28,
+ ITEMID_GENKINOKATAMARI = 29,
+ ITEMID_OISIIMIZU = 30,
+ ITEMID_SAIKOSOODA = 31,
+ ITEMID_MIKKUSUORE = 32,
+ ITEMID_MOOMOOMIRUKU = 33,
+ ITEMID_MAKKUSUAPPU = 45,
+ ITEMID_TAURIN = 46,
+ ITEMID_BUROMUHEKISIN = 47,
+ ITEMID_INDOMETASIN = 48,
+ ITEMID_RIZOTIUMU = 49,
+ ITEMID_HUSIGINAAME = 50,
+ ITEMID_KITOSAN = 52,
+ ITEMID_EFEKUTOGAADO = 55,
+ ITEMID_KURITHIKATTO = 56,
+ ITEMID_PURASUPAWAA = 57,
+ ITEMID_DHIFENDAA = 58,
+ ITEMID_SUPIIDAA = 59,
+ ITEMID_YOKUATAARU = 60,
+ ITEMID_SUPESYARUAPPU = 61,
+ ITEMID_SUPESYARUGAADO = 62,
+ ITEMID_SIRUBAASUPUREE = 76,
+ ITEMID_GOORUDOSUPUREE = 77,
+ ITEMID_MUSIYOKESUPUREE = 79,
+ ITEMID_TAIYOUNOISI = 80,
+ ITEMID_TUKINOISI = 81,
+ ITEMID_HONOONOISI = 82,
+ ITEMID_KAMINARINOISI = 83,
+ ITEMID_MIZUNOISI = 84,
+ ITEMID_RIIHUNOISI = 85,
+ ITEMID_TIISANAKINOKO = 86,
+ ITEMID_SINZYU = 88,
+ ITEMID_OOKINASINZYU = 89,
+ ITEMID_KINNOTAMA = 92,
+ ITEMID_HIMITUNOKOHAKU = 103,
+ ITEMID_HIKARINOISI = 107,
+ ITEMID_YAMINOISI = 108,
+ ITEMID_MEZAMEISI = 109,
+ ITEMID_KURABONOMI = 149,
+ ITEMID_KAGONOMI = 150,
+ ITEMID_MOMONNOMI = 151,
+ ITEMID_TIIGONOMI = 152,
+ ITEMID_NANASINOMI = 153,
+ ITEMID_ORENNOMI = 155,
+ ITEMID_KIINOMI = 156,
+ ITEMID_RAMUNOMI = 157,
+ ITEMID_OBONNOMI = 158,
+ ITEMID_FIRANOMI = 159,
+ ITEMID_UINOMI = 160,
+ ITEMID_MAGONOMI = 161,
+ ITEMID_BANZINOMI = 162,
+ ITEMID_IANOMI = 163,
+ ITEMID_ZAROKUNOMI = 169,
+ ITEMID_NEKOBUNOMI = 170,
+ ITEMID_TAPORUNOMI = 171,
+ ITEMID_ROMENOMI = 172,
+ ITEMID_UBUNOMI = 173,
+ ITEMID_MATOMANOMI = 174,
+ ITEMID_OKKANOMI = 184,
+ ITEMID_ITOKENOMI = 185,
+ ITEMID_SOKUNONOMI = 186,
+ ITEMID_RINDONOMI = 187,
+ ITEMID_YATHENOMI = 188,
+ ITEMID_YOPUNOMI = 189,
+ ITEMID_BIAANOMI = 190,
+ ITEMID_SYUKANOMI = 191,
+ ITEMID_BAKOUNOMI = 192,
+ ITEMID_UTANNOMI = 193,
+ ITEMID_TANGANOMI = 194,
+ ITEMID_YOROGINOMI = 195,
+ ITEMID_KASIBUNOMI = 196,
+ ITEMID_HABANNOMI = 197,
+ ITEMID_NAMONOMI = 198,
+ ITEMID_RIRIBANOMI = 199,
+ ITEMID_HOZUNOMI = 200,
+ ITEMID_TIIRANOMI = 201,
+ ITEMID_RYUGANOMI = 202,
+ ITEMID_KAMURANOMI = 203,
+ ITEMID_YATAPINOMI = 204,
+ ITEMID_ZUANOMI = 205,
+ ITEMID_SANNOMI = 206,
+ ITEMID_SUTAANOMI = 207,
+ ITEMID_MIKURUNOMI = 209,
+ ITEMID_IBANNOMI = 210,
+ ITEMID_HIKARINOKONA = 213,
+ ITEMID_SIROIHAABU = 214,
+ ITEMID_SENSEINOTUME = 217,
+ ITEMID_YASURAGINOSUZU = 218,
+ ITEMID_MENTARUHAABU = 219,
+ ITEMID_KODAWARIHATIMAKI = 220,
+ ITEMID_OUZYANOSIRUSI = 221,
+ ITEMID_GINNOKONA = 222,
+ ITEMID_OMAMORIKOBAN = 223,
+ ITEMID_KOKORONOSIZUKU = 225,
+ ITEMID_KIAINOHATIMAKI = 230,
+ ITEMID_SIAWASETAMAGO = 231,
+ ITEMID_PINTORENZU = 232,
+ ITEMID_METARUKOOTO = 233,
+ ITEMID_TABENOKOSI = 234,
+ ITEMID_DENKIDAMA = 236,
+ ITEMID_YAWARAKAISUNA = 237,
+ ITEMID_KATAIISI = 238,
+ ITEMID_KISEKINOTANE = 239,
+ ITEMID_KUROIMEGANE = 240,
+ ITEMID_KUROOBI = 241,
+ ITEMID_ZISYAKU = 242,
+ ITEMID_SINPINOSIZUKU = 243,
+ ITEMID_SURUDOIKUTIBASI = 244,
+ ITEMID_DOKUBARI = 245,
+ ITEMID_TOKENAIKOORI = 246,
+ ITEMID_NOROINOOHUDA = 247,
+ ITEMID_MAGATTASUPUUN = 248,
+ ITEMID_MOKUTAN = 249,
+ ITEMID_RYUUNOKIBA = 250,
+ ITEMID_SIRUKUNOSUKAAHU = 251,
+ ITEMID_KAIGARANOSUZU = 253,
+ ITEMID_KOUKAKURENZU = 265,
+ ITEMID_TIKARANOHATIMAKI = 266,
+ ITEMID_MONOSIRIMEGANE = 267,
+ ITEMID_TATUZINNOOBI = 268,
+ ITEMID_INOTINOTAMA = 270,
+ ITEMID_PAWAHURUHAABU = 271,
+ ITEMID_KIAINOTASUKI = 275,
+ ITEMID_METORONOOMU = 277,
+ ITEMID_KUROITEKKYUU = 278,
+ ITEMID_KOUKOUNOSIPPO = 279,
+ ITEMID_AKAIITO = 280,
+ ITEMID_KUROIHEDORO = 281,
+ ITEMID_TUMETAIIWA = 282,
+ ITEMID_SARASARAIWA = 283,
+ ITEMID_ATUIIWA = 284,
+ ITEMID_SIMETTAIWA = 285,
+ ITEMID_NEBARINOKAGIDUME = 286,
+ ITEMID_KODAWARISUKAAHU = 287,
+ ITEMID_KUTTUKIBARI = 288,
+ ITEMID_PAWAARISUTO = 289,
+ ITEMID_PAWAABERUTO = 290,
+ ITEMID_PAWAARENZU = 291,
+ ITEMID_PAWAABANDO = 292,
+ ITEMID_PAWAAANKURU = 293,
+ ITEMID_PAWAAUEITO = 294,
+ ITEMID_KIREINANUKEGARA = 295,
+ ITEMID_OOKINANEKKO = 296,
+ ITEMID_KODAWARIMEGANE = 297,
+ ITEMID_WAZAMASIN01 = 328,
+ ITEMID_WAZAMASIN02 = 329,
+ ITEMID_WAZAMASIN03 = 330,
+ ITEMID_WAZAMASIN04 = 331,
+ ITEMID_WAZAMASIN05 = 332,
+ ITEMID_WAZAMASIN06 = 333,
+ ITEMID_WAZAMASIN07 = 334,
+ ITEMID_WAZAMASIN08 = 335,
+ ITEMID_WAZAMASIN09 = 336,
+ ITEMID_WAZAMASIN10 = 337,
+ ITEMID_WAZAMASIN11 = 338,
+ ITEMID_WAZAMASIN12 = 339,
+ ITEMID_WAZAMASIN13 = 340,
+ ITEMID_WAZAMASIN14 = 341,
+ ITEMID_WAZAMASIN15 = 342,
+ ITEMID_WAZAMASIN16 = 343,
+ ITEMID_WAZAMASIN17 = 344,
+ ITEMID_WAZAMASIN18 = 345,
+ ITEMID_WAZAMASIN19 = 346,
+ ITEMID_WAZAMASIN20 = 347,
+ ITEMID_WAZAMASIN21 = 348,
+ ITEMID_WAZAMASIN22 = 349,
+ ITEMID_WAZAMASIN23 = 350,
+ ITEMID_WAZAMASIN24 = 351,
+ ITEMID_WAZAMASIN25 = 352,
+ ITEMID_WAZAMASIN26 = 353,
+ ITEMID_WAZAMASIN27 = 354,
+ ITEMID_WAZAMASIN28 = 355,
+ ITEMID_WAZAMASIN29 = 356,
+ ITEMID_WAZAMASIN30 = 357,
+ ITEMID_WAZAMASIN31 = 358,
+ ITEMID_WAZAMASIN32 = 359,
+ ITEMID_WAZAMASIN33 = 360,
+ ITEMID_WAZAMASIN34 = 361,
+ ITEMID_WAZAMASIN35 = 362,
+ ITEMID_WAZAMASIN36 = 363,
+ ITEMID_WAZAMASIN37 = 364,
+ ITEMID_WAZAMASIN38 = 365,
+ ITEMID_WAZAMASIN39 = 366,
+ ITEMID_WAZAMASIN40 = 367,
+ ITEMID_WAZAMASIN41 = 368,
+ ITEMID_WAZAMASIN42 = 369,
+ ITEMID_WAZAMASIN43 = 370,
+ ITEMID_WAZAMASIN44 = 371,
+ ITEMID_WAZAMASIN45 = 372,
+ ITEMID_WAZAMASIN46 = 373,
+ ITEMID_WAZAMASIN47 = 374,
+ ITEMID_WAZAMASIN48 = 375,
+ ITEMID_WAZAMASIN49 = 376,
+ ITEMID_WAZAMASIN50 = 377,
+ ITEMID_WAZAMASIN51 = 378,
+ ITEMID_WAZAMASIN52 = 379,
+ ITEMID_WAZAMASIN53 = 380,
+ ITEMID_WAZAMASIN54 = 381,
+ ITEMID_WAZAMASIN55 = 382,
+ ITEMID_WAZAMASIN56 = 383,
+ ITEMID_WAZAMASIN57 = 384,
+ ITEMID_WAZAMASIN58 = 385,
+ ITEMID_WAZAMASIN59 = 386,
+ ITEMID_WAZAMASIN60 = 387,
+ ITEMID_WAZAMASIN61 = 388,
+ ITEMID_WAZAMASIN62 = 389,
+ ITEMID_WAZAMASIN63 = 390,
+ ITEMID_WAZAMASIN64 = 391,
+ ITEMID_WAZAMASIN65 = 392,
+ ITEMID_WAZAMASIN66 = 393,
+ ITEMID_WAZAMASIN67 = 394,
+ ITEMID_WAZAMASIN68 = 395,
+ ITEMID_WAZAMASIN69 = 396,
+ ITEMID_WAZAMASIN70 = 397,
+ ITEMID_WAZAMASIN71 = 398,
+ ITEMID_WAZAMASIN72 = 399,
+ ITEMID_WAZAMASIN73 = 400,
+ ITEMID_WAZAMASIN74 = 401,
+ ITEMID_WAZAMASIN75 = 402,
+ ITEMID_WAZAMASIN76 = 403,
+ ITEMID_WAZAMASIN77 = 404,
+ ITEMID_WAZAMASIN78 = 405,
+ ITEMID_WAZAMASIN79 = 406,
+ ITEMID_WAZAMASIN80 = 407,
+ ITEMID_WAZAMASIN81 = 408,
+ ITEMID_WAZAMASIN82 = 409,
+ ITEMID_WAZAMASIN83 = 410,
+ ITEMID_WAZAMASIN84 = 411,
+ ITEMID_WAZAMASIN85 = 412,
+ ITEMID_WAZAMASIN86 = 413,
+ ITEMID_WAZAMASIN87 = 414,
+ ITEMID_WAZAMASIN88 = 415,
+ ITEMID_WAZAMASIN89 = 416,
+ ITEMID_WAZAMASIN90 = 417,
+ ITEMID_WAZAMASIN91 = 418,
+ ITEMID_WAZAMASIN92 = 419,
+ ITEMID_SUPIIDOBOORU = 492,
+ ITEMID_REBERUBOORU = 493,
+ ITEMID_RUAABOORU = 494,
+ ITEMID_HEBIIBOORU = 495,
+ ITEMID_RABURABUBOORU = 496,
+ ITEMID_HURENDOBOORU = 497,
+ ITEMID_MUUNBOORU = 498,
+ ITEMID_KONPEBOORU = 499,
+ ITEMID_SINKANOKISEKI = 538,
+ ITEMID_KARUISI = 539,
+ ITEMID_GOTUGOTUMETTO = 540,
+ ITEMID_HUUSEN = 541,
+ ITEMID_REDDOKAADO = 542,
+ ITEMID_NERAINOMATO = 543,
+ ITEMID_SIMETUKEBANDO = 544,
+ ITEMID_KYUUKON = 545,
+ ITEMID_ZYUUDENTI = 546,
+ ITEMID_DASSYUTUBOTAN = 547,
+ ITEMID_NOOMARUZYUERU = 564,
+ ITEMID_TAIRYOKUNOHANE = 565,
+ ITEMID_KINRYOKUNOHANE = 566,
+ ITEMID_TEIKOUNOHANE = 567,
+ ITEMID_TIRYOKUNOHANE = 568,
+ ITEMID_SEISINNOHANE = 569,
+ ITEMID_SYUNPATUNOHANE = 570,
+ ITEMID_KIREINAHANE = 571,
+ ITEMID_DORIIMUBOORU = 576,
+ ITEMID_DEKAIKINNOTAMA = 581,
+ ITEMID_ODANGOSINZYU = 582,
+ ITEMID_WAZAMASIN93 = 618,
+ ITEMID_WAZAMASIN94 = 619,
+ ITEMID_WAZAMASIN95 = 620,
+ ITEMID_HIKARUOMAMORI = 632,
+ ITEMID_ZYAKUTENHOKEN = 639,
+ ITEMID_TOTUGEKITYOKKI = 640,
+ ITEMID_TOKUSEIKAPUSERU = 645,
+ ITEMID_HOIPPUPOPPU = 646,
+ ITEMID_NIOIBUKURO = 647,
+ ITEMID_HIKARIGOKE = 648,
+ ITEMID_YUKIDAMA = 649,
+ ITEMID_BOUZINGOOGURU = 650,
+ ITEMID_GENGANAITO = 656,
+ ITEMID_SAANAITONAITO = 657,
+ ITEMID_DENRYUUNAITO = 658,
+ ITEMID_HUSIGIBANAITO = 659,
+ ITEMID_RIZAADONAITOx = 660,
+ ITEMID_KAMEKKUSUNAITO = 661,
+ ITEMID_MYUUTUNAITOx = 662,
+ ITEMID_MYUUTUNAITOy = 663,
+ ITEMID_BASYAAMONAITO = 664,
+ ITEMID_TYAAREMUNAITO = 665,
+ ITEMID_HERUGANAITO = 666,
+ ITEMID_BOSUGODORANAITO = 667,
+ ITEMID_ZYUPETTANAITO = 668,
+ ITEMID_BANGIRASUNAITO = 669,
+ ITEMID_HASSAMUNAITO = 670,
+ ITEMID_KAIROSUNAITO = 671,
+ ITEMID_PUTERANAITO = 672,
+ ITEMID_RUKARIONAITO = 673,
+ ITEMID_YUKINOONAITO = 674,
+ ITEMID_GARUURANAITO = 675,
+ ITEMID_GYARADOSUNAITO = 676,
+ ITEMID_ABUSORUNAITO = 677,
+ ITEMID_RIZAADONAITOy = 678,
+ ITEMID_HUUDHINAITO = 679,
+ ITEMID_HERAKUROSUNAITO = 680,
+ ITEMID_KUTIITONAITO = 681,
+ ITEMID_RAIBORUTONAITO = 682,
+ ITEMID_GABURIASUNAITO = 683,
+ ITEMID_RATHIASUNAITO = 684,
+ ITEMID_RATHIOSUNAITO = 685,
+ ITEMID_ROZERUNOMI = 686,
+ ITEMID_WAZAMASIN96 = 690,
+ ITEMID_WAZAMASIN97 = 691,
+ ITEMID_WAZAMASIN98 = 692,
+ ITEMID_WAZAMASIN99 = 693,
+ ITEMID_EREBEETANOKII = 700,
+ ITEMID_MIAREGARETTO = 708,
+ ITEMID_AGONOKASEKI = 710,
+ ITEMID_HIRENOKASEKI = 711,
+ ITEMID_RAGURAAZINAITO = 752,
+ ITEMID_ZYUKAINNAITO = 753,
+ ITEMID_YAMIRAMINAITO = 754,
+ ITEMID_TIRUTARISUNAITO = 755,
+ ITEMID_ERUREIDONAITO = 756,
+ ITEMID_TABUNNENAITO = 757,
+ ITEMID_METAGUROSUNAITO = 758,
+ ITEMID_SAMEHADANAITO = 759,
+ ITEMID_YADORANNAITO = 760,
+ ITEMID_HAGANEERUNAITO = 761,
+ ITEMID_PIZYOTTONAITO = 762,
+ ITEMID_ONIGOORINAITO = 763,
+ ITEMID_DHIANSINAITO = 764,
+ ITEMID_IMASIMENOTUBO = 765,
+ ITEMID_BAKUUDANAITO = 767,
+ ITEMID_MIMIROPPUNAITO = 768,
+ ITEMID_BOOMANDANAITO = 769,
+ ITEMID_SUPIANAITO = 770,
+ ITEMID_GINNOOUKAN = 795,
+ ITEMID_KINNOOUKAN = 796,
+ ITEMID_BIBIRIDAMA = 846,
+ ITEMID_ZIGARUDEKYUUBU = 847,
+ ITEMID_KOORINOISI = 849,
+ ITEMID_URUTORABOORU = 851,
+ ITEMID_GURANDOKOOTO = 879,
+ ITEMID_BOUGOPATTO = 880,
+ ITEMID_EREKISIIDO = 881,
+ ITEMID_SAIKOSIIDO = 882,
+ ITEMID_MISUTOSIIDO = 883,
+ ITEMID_GURASUSIIDO = 884,
+ ITEMID_NODOAME = 1118,
+ ITEMID_DASSYUTUPAKKU = 1119,
+ ITEMID_ATUZOKOBUUTU = 1120,
+ ITEMID_KARABURIHOKEN = 1121,
+ ITEMID_RUUMUSAABISU = 1122,
+ ITEMID_BANNOUGASA = 1123,
+ ITEMID_KEIKENTIAME_1 = 1124,
+ ITEMID_KEIKENTIAME_2 = 1125,
+ ITEMID_KEIKENTIAME_3 = 1126,
+ ITEMID_KEIKENTIAME_4 = 1127,
+ ITEMID_KEIKENTIAME_5 = 1128,
+ ITEMID_SAMISIGARIMINTO = 1231,
+ ITEMID_IZIPPARIMINTO = 1232,
+ ITEMID_YANTYAMINTO = 1233,
+ ITEMID_YUKANMINTO = 1234,
+ ITEMID_ZUBUTOIMINTO = 1235,
+ ITEMID_WANPAKUMINTO = 1236,
+ ITEMID_NOUTENKIMINTO = 1237,
+ ITEMID_NONKIMINTO = 1238,
+ ITEMID_HIKAEMEMINTO = 1239,
+ ITEMID_OTTORIMINTO = 1240,
+ ITEMID_UKKARIMINTO = 1241,
+ ITEMID_REISEIMINTO = 1242,
+ ITEMID_ODAYAKAMINTO = 1243,
+ ITEMID_OTONASIIMINTO = 1244,
+ ITEMID_SINTYOUMINTO = 1245,
+ ITEMID_NAMAIKIMINTO = 1246,
+ ITEMID_OKUBYOUMINTO = 1247,
+ ITEMID_SEKKTIMINTO = 1248,
+ ITEMID_YOUKIMINTO = 1249,
+ ITEMID_MUJYAKIMINTO = 1250,
+ ITEMID_MAZIMEMINTO = 1251,
+ ITEMID_GARANATUBURESU = 1582,
+ ITEMID_AKASINOOMAMORI = 1589,
+ ITEMID_GARANATURIISU = 1592,
+ ITEMID_TOKUSEIPATTI = 1606,
+ ITEMID_SENTOUBAFFA1 = 1881,
+ ITEMID_SENTOUBAFFA2 = 1882,
+ ITEMID_SENTOUBAFFA3 = 1883,
+ ITEMID_SENTOUBAFFA4 = 1884,
+ ITEMID_SENTOUBAFFA5 = 1885,
+ ITEMID_SENTOUBAFFA6 = 1886,
+ ITEMID_WAZAMASIN100 = 2160,
+ ITEMID_WAZAMASIN101 = 2161,
+ ITEMID_WAZAMASIN102 = 2162,
+ ITEMID_WAZAMASIN103 = 2163,
+ ITEMID_WAZAMASIN104 = 2164,
+ ITEMID_WAZAMASIN105 = 2165,
+ ITEMID_WAZAMASIN106 = 2166,
+ ITEMID_WAZAMASIN107 = 2167,
+ ITEMID_WAZAMASIN108 = 2168,
+ ITEMID_WAZAMASIN109 = 2169,
+ ITEMID_WAZAMASIN110 = 2170,
+ ITEMID_WAZAMASIN111 = 2171,
+ ITEMID_WAZAMASIN112 = 2172,
+ ITEMID_WAZAMASIN113 = 2173,
+ ITEMID_WAZAMASIN114 = 2174,
+ ITEMID_WAZAMASIN115 = 2175,
+ ITEMID_WAZAMASIN116 = 2176,
+ ITEMID_WAZAMASIN117 = 2177,
+ ITEMID_WAZAMASIN118 = 2178,
+ ITEMID_WAZAMASIN119 = 2179,
+ ITEMID_WAZAMASIN120 = 2180,
+ ITEMID_WAZAMASIN121 = 2181,
+ ITEMID_WAZAMASIN122 = 2182,
+ ITEMID_WAZAMASIN123 = 2183,
+ ITEMID_WAZAMASIN124 = 2184,
+ ITEMID_WAZAMASIN125 = 2185,
+ ITEMID_WAZAMASIN126 = 2186,
+ ITEMID_WAZAMASIN127 = 2187,
+ ITEMID_WAZAMASIN128 = 2188,
+ ITEMID_WAZAMASIN129 = 2189,
+ ITEMID_WAZAMASIN130 = 2190,
+ ITEMID_WAZAMASIN131 = 2191,
+ ITEMID_WAZAMASIN132 = 2192,
+ ITEMID_WAZAMASIN133 = 2193,
+ ITEMID_WAZAMASIN134 = 2194,
+ ITEMID_WAZAMASIN135 = 2195,
+ ITEMID_WAZAMASIN136 = 2196,
+ ITEMID_WAZAMASIN137 = 2197,
+ ITEMID_WAZAMASIN138 = 2198,
+ ITEMID_WAZAMASIN139 = 2199,
+ ITEMID_WAZAMASIN140 = 2200,
+ ITEMID_WAZAMASIN141 = 2201,
+ ITEMID_WAZAMASIN142 = 2202,
+ ITEMID_WAZAMASIN143 = 2203,
+ ITEMID_WAZAMASIN144 = 2204,
+ ITEMID_WAZAMASIN145 = 2205,
+ ITEMID_WAZAMASIN146 = 2206,
+ ITEMID_WAZAMASIN147 = 2207,
+ ITEMID_WAZAMASIN148 = 2208,
+ ITEMID_WAZAMASIN149 = 2209,
+ ITEMID_WAZAMASIN150 = 2210,
+ ITEMID_WAZAMASIN151 = 2211,
+ ITEMID_WAZAMASIN152 = 2212,
+ ITEMID_WAZAMASIN153 = 2213,
+ ITEMID_WAZAMASIN154 = 2214,
+ ITEMID_WAZAMASIN155 = 2215,
+ ITEMID_WAZAMASIN156 = 2216,
+ ITEMID_WAZAMASIN157 = 2217,
+ ITEMID_WAZAMASIN158 = 2218,
+ ITEMID_WAZAMASIN159 = 2219,
+ ITEMID_WAZAMASIN160 = 2220,
+ ITEMID_WAZAMASIN161 = 2221,
+ ITEMID_WAZAMASIN162 = 2222,
+ ITEMID_WAZAMASIN163 = 2223,
+ ITEMID_WAZAMASIN164 = 2224,
+ ITEMID_WAZAMASIN165 = 2225,
+ ITEMID_WAZAMASIN166 = 2226,
+ ITEMID_WAZAMASIN167 = 2227,
+ ITEMID_WAZAMASIN168 = 2228,
+ ITEMID_WAZAMASIN169 = 2229,
+ ITEMID_WAZAMASIN170 = 2230,
+ ITEMID_WAZAMASIN171 = 2231,
+ ITEMID_YOUSEINOHANE = 2401,
+ ITEMID_KAIDENNOTANE = 2558,
+ ITEMID_PIKUSINAITO = 2559,
+ ITEMID_UTUBOTTONAITO = 2560,
+ ITEMID_STAAMIINAITO = 2561,
+ ITEMID_KAIRYUNAITO = 2562,
+ ITEMID_MEGANIUMUNAITO = 2563,
+ ITEMID_OODAIRUNAITO = 2564,
+ ITEMID_EAAMUDONAITO = 2565,
+ ITEMID_YUKIMENOKONAITO = 2566,
+ ITEMID_HIIDORANAITO = 2567,
+ ITEMID_DAAKURANAITO = 2568,
+ ITEMID_ENBUONAITO = 2569,
+ ITEMID_DORYUUZUNAITO = 2570,
+ ITEMID_PENDORANAITO = 2571,
+ ITEMID_ZURUZUKINAITO = 2572,
+ ITEMID_SIBIRUDONAITO = 2573,
+ ITEMID_SYANDERANAITO = 2574,
+ ITEMID_BURIGARONAITO = 2575,
+ ITEMID_MAFOKUSINAITO = 2576,
+ ITEMID_GEKKOUGANAITO = 2577,
+ ITEMID_KAENZISINAITO = 2578,
+ ITEMID_HURAETTENAITO = 2579,
+ ITEMID_KARAMANERONAITO = 2580,
+ ITEMID_GAMENODESUNAITO = 2581,
+ ITEMID_DORAMIDORONAITO = 2582,
+ ITEMID_RUTYABURUNAITO = 2583,
+ ITEMID_ZIGARUDENAITO = 2584,
+ ITEMID_ZIZIIRONAITO = 2585,
+ ITEMID_ZERAORANAITO = 2586,
+ ITEMID_TAIREETUNAITO = 2587,
+ ITEMID_202GOUSITUNOKAGI = 2588,
+ ITEMID_SUGOIMIAREGARETTO = 2589,
+ ITEMID_RABONOKAADOKIIA = 2590,
+ ITEMID_RABONOKAADOKIIB = 2591,
+ ITEMID_RABONOKAADOKIIC = 2592,
+ ITEMID_RABONOKAADOKIIM = 2593,
+ ITEMID_RABONOKAADOKIIX = 2594,
+ ITEMID_ISHIKORO = 2595,
+ ITEMID_OMOIDENOYUBIWA = 2596,
+ ITEMID_SAINIRINONUI = 2597,
+ ITEMID_OISHIIGOMI = 2598,
+ ITEMID_GENKINOKOEDA = 2599,
+ ITEMID_DEURONOWASUREMONO = 2600,
+ ITEMID_DAIZINAMONO14 = 2601,
+ ITEMID_DAIZINAMONO15 = 2602,
+ ITEMID_DAIZINAMONO16 = 2603,
+ ITEMID_DAIZINAMONO17 = 2604,
+ ITEMID_DAIZINAMONO18 = 2605,
+ ITEMID_DAIZINAMONO19 = 2606,
+ ITEMID_DAIZINAMONO20 = 2607,
+ ITEMID_DAIZINAMONO21 = 2608,
+ ITEMID_DAIZINAMONO22 = 2609,
+ ITEMID_DAIZINAMONO23 = 2610,
+ ITEMID_DAIZINAMONO24 = 2611,
+ ITEMID_DAIZINAMONO25 = 2612,
+ ITEMID_DAIZINAMONO26 = 2613,
+ ITEMID_DAIZINAMONO27 = 2614,
+ ITEMID_DAIZINAMONO28 = 2615,
+ ITEMID_DAIZINAMONO29 = 2616,
+ ITEMID_DAIZINAMONO30 = 2617,
+ ITEMID_MEGAKAKERA = 2618,
+ ITEMID_OMAMORISOZAI = 2619,
+ ITEMID_AKANOKANARYINUI1 = 2620,
+ ITEMID_AKANOKANARYINUI2 = 2621,
+ ITEMID_AKANOKANARYINUI3 = 2622,
+ ITEMID_KINNOKANARYINUI1 = 2623,
+ ITEMID_KINNOKANARYINUI2 = 2624,
+ ITEMID_KINNOKANARYINUI3 = 2625,
+ ITEMID_PINKUNOKANARYINUI1 = 2626,
+ ITEMID_PINKUNOKANARYINUI2 = 2627,
+ ITEMID_PINKUNOKANARYINUI3 = 2628,
+ ITEMID_MIDORINOKANARYINUI1 = 2629,
+ ITEMID_MIDORINOKANARYINUI2 = 2630,
+ ITEMID_MIDORINOKANARYINUI3 = 2631,
+ ITEMID_AONOKANARYINUI1 = 2632,
+ ITEMID_AONOKANARYINUI2 = 2633,
+ ITEMID_AONOKANARYINUI3 = 2634,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/LangType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/LangType.fbs
new file mode 100644
index 00000000..e5096279
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/LangType.fbs
@@ -0,0 +1,14 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum LangType : int {
+ ROM_LANG = 0,
+ JAPAN = 1,
+ ENGLISH = 2,
+ FRANCE = 3,
+ ITALY = 4,
+ GERMANY = 5,
+ SPAIN = 6,
+ KOREA = 7,
+ SIMPLIFIED_CHINESE = 8,
+ TRADITIONAL_CHINESE = 9,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/MahoippuViewID.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/MahoippuViewID.fbs
new file mode 100644
index 00000000..85fd7ed6
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/MahoippuViewID.fbs
@@ -0,0 +1,11 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum MahoippuViewID : int {
+ STRAWBERRY = 0,
+ BERRY = 1,
+ HEART = 2,
+ STAR = 3,
+ CLOVER = 4,
+ FLOWER = 5,
+ RIBBON = 6,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/MoveType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/MoveType.fbs
new file mode 100644
index 00000000..d03c4f53
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/MoveType.fbs
@@ -0,0 +1,23 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum MoveType : byte {
+ Normal = 0,
+ Kakutou = 1,
+ Hikou = 2,
+ Doku = 3,
+ Jimen = 4,
+ Iwa = 5,
+ Mushi = 6,
+ Ghost = 7,
+ Hagane = 8,
+ Honoo = 9,
+ Mizu = 10,
+ Kusa = 11,
+ Denki = 12,
+ Esper = 13,
+ Koori = 14,
+ Dragon = 15,
+ Aku = 16,
+ Fairy = 17,
+ Null = 18,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/PayType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/PayType.fbs
new file mode 100644
index 00000000..b16cb9a9
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/PayType.fbs
@@ -0,0 +1,7 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum PayType : int {
+ OKOZUKAI = 0,
+ LP = 1,
+ BP = 2,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/PokeMemoType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/PokeMemoType.fbs
new file mode 100644
index 00000000..23083a9b
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/PokeMemoType.fbs
@@ -0,0 +1,14 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum PokeMemoType : byte { NONE = 0,
+ Capture = 1,
+ EventGet = 2,
+ EventCapture = 3,
+ InnerTrade = 4,
+ NetTrade = 5,
+ EggHatch = 6,
+ Bank = 7,
+ MysteryGift = 8,
+ EggTakenFirst = 9,
+ EggTakenTrade = 10,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/RareType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/RareType.fbs
new file mode 100644
index 00000000..9a41fc7d
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/RareType.fbs
@@ -0,0 +1,6 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum RareType : int { DEFAULT = 0,
+ NO_RARE = 1,
+ RARE = 2,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/RibbonType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/RibbonType.fbs
new file mode 100644
index 00000000..60b5e9dc
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/RibbonType.fbs
@@ -0,0 +1,116 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum RibbonType : int
+{ NONE = 0,
+ CAROS_CHAMP = 1,
+ HOUEN_CHAMP = 2,
+ SINOU_CHAMP = 3,
+ KAWAIGARI = 4,
+ TRAINING = 5,
+ SUPER_BATTLE = 6,
+ MASTER_BATTLE = 7,
+ GANBA = 8,
+ SYAKKIRI = 9,
+ DOKKIRI = 10,
+ SYONBORI = 11,
+ UKKARI = 12,
+ SUKKIRI = 13,
+ GUSSURI = 14,
+ NIKKORI = 15,
+ GORGEOUS = 16,
+ ROYAL = 17,
+ GORGEOUS_ROYAL = 18,
+ BROMIDE = 19,
+ ASHIATO = 20,
+ RECORD = 21,
+ LEGEND = 22,
+ COUNTRY = 23,
+ NATIONAL = 24,
+ EARTH = 25,
+ WORLD = 26,
+ CLASSIC = 27,
+ PREMIERE = 28,
+ EVENT = 29,
+ BIRTHDAY = 30,
+ SPECIAL = 31,
+ MEMORIAL = 32,
+ WISH = 33,
+ BATTLE_CHAMP = 34,
+ AREA_CHAMP = 35,
+ NATIONAL_CHAMP = 36,
+ WORLD_CHAMP = 37,
+ LUMPING_CONTEST = 38,
+ LUMPING_TOWER = 39,
+ SANGO_CHAMP = 40,
+ CONTEST_STAR = 41,
+ STYLE_MASTER = 42,
+ BEAUTIFUL_MASTER = 43,
+ CUTE_MASTER = 44,
+ CLEVER_MASTER = 45,
+ STRONG_MASTER = 46,
+ NIJI_CROWN = 47,
+ NIJI_ROYAL = 48,
+ NIJI_BTLTOWER = 49,
+ NIJI_MASTER = 50,
+ ORION_GARAL = 51,
+ ORION_MASTER_TOWER = 52,
+ ORION_MASTER_RANK = 53,
+ ORION_NOON = 54,
+ ORION_MIDNIGHT = 55,
+ ORION_TWILIGHT = 56,
+ ORION_DAYBREAK = 57,
+ ORION_CLOUDY_WEATHER = 58,
+ ORION_RAIN = 59,
+ ORION_THUNDER = 60,
+ ORION_SNOWFALL = 61,
+ ORION_HEAVY_SONWFALL = 62,
+ ORION_DRYING = 63,
+ ORION_SAND_DUST = 64,
+ ORION_DENSE_FOG = 65,
+ ORION_FATE = 66,
+ ORION_FISH = 67,
+ ORION_CURRY = 68,
+ ORION_SOMETIMES = 69,
+ ORION_NOTLOOKING = 70,
+ ORION_NAUGHTINESS = 71,
+ ORION_CAREFREE = 72,
+ ORION_TENSION = 73,
+ ORION_EXPECTATION = 74,
+ ORION_CHARISMA = 75,
+ ORION_CALM = 76,
+ ORION_PASSION = 77,
+ ORION_CARELESSNESS = 78,
+ ORION_EUPHORIA = 79,
+ ORION_FURY = 80,
+ ORION_SMILE = 81,
+ ORION_SAD = 82,
+ ORION_GOOD_CONDITION = 83,
+ ORION_EMERGENCY = 84,
+ ORION_REASON = 85,
+ ORION_INSTINCT = 86,
+ ORION_CUNNING = 87,
+ ORION_STRENGTH = 88,
+ ORION_WEAK = 89,
+ ORION_UPSET = 90,
+ ORION_ELEVATION = 91,
+ ORION_FATIGUE = 92,
+ ORION_CONFIDENCE = 93,
+ ORION_DISTRUST = 94,
+ ORION_ARTLESSNESS = 95,
+ ORION_IMPURITY = 96,
+ ORION_VIM = 97,
+ ORION_SLUMP = 98,
+ PIONEER = 99,
+ TWINKLE_STAR = 100,
+ TITAN_PALDEA_CHAMP = 101,
+ TITAN_HUGE = 102,
+ TITAN_TINY = 103,
+ TITAN_PICKING_UP_THINGS = 104,
+ TITAN_PARTNER = 105,
+ TITAN_GOURM = 106,
+ TITAN_ONE_CHANCE_IN_A_MILLION = 107,
+ TITAN_OYABUN = 108,
+ TITAN_STRONGEST = 109,
+ TITAN_NUSHI = 110,
+ SUDACHI_PARTNER = 111,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/SeikakuType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/SeikakuType.fbs
new file mode 100644
index 00000000..7f8e3cfa
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/SeikakuType.fbs
@@ -0,0 +1,30 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum SeikakuType : int
+{ DEFAULT = 0,
+ GANBARIYA = 1,
+ SAMISIGARIYA = 2,
+ YUUKAN = 3,
+ IJIPPARI = 4,
+ YANTYA = 5,
+ ZUBUTOI = 6,
+ SUNAO = 7,
+ NONKI = 8,
+ WANPAKU = 9,
+ NOUTENKI = 10,
+ OKUBYOU = 11,
+ SEKKATI = 12,
+ MAJIME = 13,
+ YOUKI = 14,
+ MUJYAKI = 15,
+ HIKAEME = 16,
+ OTTORI = 17,
+ REISEI = 18,
+ TEREYA = 19,
+ UKKARIYA = 20,
+ ODAYAKA = 21,
+ OTONASII = 22,
+ NAMAIKI = 23,
+ SINNTYOU = 24,
+ KIMAGURE = 25,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/SellType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/SellType.fbs
new file mode 100644
index 00000000..6d0665de
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/SellType.fbs
@@ -0,0 +1,6 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum SellType : int {
+ SELL_BUY = 0,
+ BUY_ONLY = 1,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/Sex.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/Sex.fbs
new file mode 100644
index 00000000..47e23d44
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/Sex.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+/// Actual Gender
+enum Sex : int {
+ MALE = 0,
+ FEMALE = 1,
+ UNKNOWN = 2,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/SexType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/SexType.fbs
new file mode 100644
index 00000000..f5da13d6
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/SexType.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+/// Gender Spec
+enum SexType : int {
+ DEFAULT = 0,
+ MALE = 1,
+ FEMALE = 2,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/ShopKind.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/ShopKind.fbs
new file mode 100644
index 00000000..f9853397
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/ShopKind.fbs
@@ -0,0 +1,22 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum ShopKind : int {
+ NONE = 0,
+ FRIENDLYSHOP = 1,
+ RESTAURANT = 2,
+ HAIRMAKE = 3,
+ WAZAMACHINEMACHINE = 4,
+ DRESSUP = 5,
+ LUXURYRESTAURANT = 6,
+ DELIBIRD = 7,
+ DELICATESSEN = 8,
+ DRUG_STORE = 9,
+ KANZUME = 10,
+ BAKERY = 11,
+ SUPERMARKET = 12,
+ KOUBAI = 13,
+ PICNIC = 14,
+ SYOUTEN = 15,
+ BBKOUBAI = 16,
+ BBZIHANKI = 17,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/SizeType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/SizeType.fbs
new file mode 100644
index 00000000..b7e25f58
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/SizeType.fbs
@@ -0,0 +1,11 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum SizeType : int {
+ RANDOM = 0,
+ XS = 1,
+ S = 2,
+ M = 3,
+ L = 4,
+ XL = 5,
+ VALUE = 6,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/TalentType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/TalentType.fbs
new file mode 100644
index 00000000..8dc8a005
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/TalentType.fbs
@@ -0,0 +1,7 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum TalentType : int {
+ RANDOM = 0,
+ V_NUM = 1,
+ VALUE = 2,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/TokuseiID.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/TokuseiID.fbs
new file mode 100644
index 00000000..f63bfa2b
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/TokuseiID.fbs
@@ -0,0 +1,311 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum TokuseiID : ushort {
+ TOKUSEI_NULL = 0,
+ TOKUSEI_AKUSYUU = 1,
+ TOKUSEI_AMEHURASI = 2,
+ TOKUSEI_KASOKU = 3,
+ TOKUSEI_KABUTOAAMAA = 4,
+ TOKUSEI_GANZYOU = 5,
+ TOKUSEI_SIMERIKE = 6,
+ TOKUSEI_ZYUUNAN = 7,
+ TOKUSEI_SUNAGAKURE = 8,
+ TOKUSEI_SEIDENKI = 9,
+ TOKUSEI_TIKUDEN = 10,
+ TOKUSEI_TYOSUI = 11,
+ TOKUSEI_DONKAN = 12,
+ TOKUSEI_NOOTENKI = 13,
+ TOKUSEI_HUKUGAN = 14,
+ TOKUSEI_HUMIN = 15,
+ TOKUSEI_HENSYOKU = 16,
+ TOKUSEI_MENEKI = 17,
+ TOKUSEI_MORAIBI = 18,
+ TOKUSEI_RINPUN = 19,
+ TOKUSEI_MAIPEESU = 20,
+ TOKUSEI_KYUUBAN = 21,
+ TOKUSEI_IKAKU = 22,
+ TOKUSEI_KAGEHUMI = 23,
+ TOKUSEI_SAMEHADA = 24,
+ TOKUSEI_HUSIGINAMAMORI = 25,
+ TOKUSEI_HUYUU = 26,
+ TOKUSEI_HOUSI = 27,
+ TOKUSEI_SINKURO = 28,
+ TOKUSEI_KURIABODHI = 29,
+ TOKUSEI_SIZENKAIHUKU = 30,
+ TOKUSEI_HIRAISIN = 31,
+ TOKUSEI_TENNOMEGUMI = 32,
+ TOKUSEI_SUISUI = 33,
+ TOKUSEI_YOURYOKUSO = 34,
+ TOKUSEI_HAKKOU = 35,
+ TOKUSEI_TOREESU = 36,
+ TOKUSEI_TIKARAMOTI = 37,
+ TOKUSEI_DOKUNOTOGE = 38,
+ TOKUSEI_SEISINRYOKU = 39,
+ TOKUSEI_MAGUMANOYOROI = 40,
+ TOKUSEI_MIZUNOBEERU = 41,
+ TOKUSEI_ZIRYOKU = 42,
+ TOKUSEI_BOUON = 43,
+ TOKUSEI_AMEUKEZARA = 44,
+ TOKUSEI_SUNAOKOSI = 45,
+ TOKUSEI_PURESSYAA = 46,
+ TOKUSEI_ATUISIBOU = 47,
+ TOKUSEI_HAYAOKI = 48,
+ TOKUSEI_HONOONOKARADA = 49,
+ TOKUSEI_NIGEASI = 50,
+ TOKUSEI_SURUDOIME = 51,
+ TOKUSEI_KAIRIKIBASAMI = 52,
+ TOKUSEI_MONOHIROI = 53,
+ TOKUSEI_NAMAKE = 54,
+ TOKUSEI_HARIKIRI = 55,
+ TOKUSEI_MEROMEROBODHI = 56,
+ TOKUSEI_PURASU = 57,
+ TOKUSEI_MAINASU = 58,
+ TOKUSEI_TENKIYA = 59,
+ TOKUSEI_NENTYAKU = 60,
+ TOKUSEI_DAPPI = 61,
+ TOKUSEI_KONZYOU = 62,
+ TOKUSEI_HUSIGINAUROKO = 63,
+ TOKUSEI_HEDOROEKI = 64,
+ TOKUSEI_SINRYOKU = 65,
+ TOKUSEI_MOUKA = 66,
+ TOKUSEI_GEKIRYUU = 67,
+ TOKUSEI_MUSINOSIRASE = 68,
+ TOKUSEI_ISIATAMA = 69,
+ TOKUSEI_HIDERI = 70,
+ TOKUSEI_ARIZIGOKU = 71,
+ TOKUSEI_YARUKI = 72,
+ TOKUSEI_SIROIKEMURI = 73,
+ TOKUSEI_YOGAPAWAA = 74,
+ TOKUSEI_SHERUAAMAA = 75,
+ TOKUSEI_EAROKKU = 76,
+ TOKUSEI_TIDORIASI = 77,
+ TOKUSEI_DENKIENZIN = 78,
+ TOKUSEI_TOUSOUSIN = 79,
+ TOKUSEI_HUKUTUNOKOKORO = 80,
+ TOKUSEI_YUKIGAKURE = 81,
+ TOKUSEI_KUISINBOU = 82,
+ TOKUSEI_IKARINOTUBO = 83,
+ TOKUSEI_KARUWAZA = 84,
+ TOKUSEI_TAINETU = 85,
+ TOKUSEI_TANZYUN = 86,
+ TOKUSEI_KANSOUHADA = 87,
+ TOKUSEI_DAUNROODO = 88,
+ TOKUSEI_TETUNOKOBUSI = 89,
+ TOKUSEI_POIZUNHIIRU = 90,
+ TOKUSEI_TEKIOURYOKU = 91,
+ TOKUSEI_SUKIRURINKU = 92,
+ TOKUSEI_URUOIBODHI = 93,
+ TOKUSEI_SANPAWAA = 94,
+ TOKUSEI_HAYAASI = 95,
+ TOKUSEI_NOOMARUSUKIN = 96,
+ TOKUSEI_SUNAIPAA = 97,
+ TOKUSEI_MAZIKKUGAADO = 98,
+ TOKUSEI_NOOGAADO = 99,
+ TOKUSEI_ATODASI = 100,
+ TOKUSEI_TEKUNISYAN = 101,
+ TOKUSEI_RIIHUGAADO = 102,
+ TOKUSEI_BUKIYOU = 103,
+ TOKUSEI_KATAYABURI = 104,
+ TOKUSEI_KYOUUN = 105,
+ TOKUSEI_YUUBAKU = 106,
+ TOKUSEI_KIKENYOTI = 107,
+ TOKUSEI_YOTIMU = 108,
+ TOKUSEI_TENNEN = 109,
+ TOKUSEI_IROMEGANE = 110,
+ TOKUSEI_FIRUTAA = 111,
+ TOKUSEI_SUROOSUTAATO = 112,
+ TOKUSEI_KIMOTTAMA = 113,
+ TOKUSEI_YOBIMIZU = 114,
+ TOKUSEI_AISUBODHI = 115,
+ TOKUSEI_HAADOROKKU = 116,
+ TOKUSEI_YUKIHURASI = 117,
+ TOKUSEI_MITUATUME = 118,
+ TOKUSEI_OMITOOSI = 119,
+ TOKUSEI_SUTEMI = 120,
+ TOKUSEI_MARUTITAIPU = 121,
+ TOKUSEI_HURAWAAGIHUTO = 122,
+ TOKUSEI_NAITOMEA = 123,
+ TOKUSEI_WARUITEGUSE = 124,
+ TOKUSEI_TIKARAZUKU = 125,
+ TOKUSEI_AMANOZYAKU = 126,
+ TOKUSEI_KINTYOUKAN = 127,
+ TOKUSEI_MAKENKI = 128,
+ TOKUSEI_YOWAKI = 129,
+ TOKUSEI_NOROWAREBODHI = 130,
+ TOKUSEI_IYASINOKOKORO = 131,
+ TOKUSEI_HURENDOGAADO = 132,
+ TOKUSEI_KUDAKERUYOROI = 133,
+ TOKUSEI_HEVHIMETARU = 134,
+ TOKUSEI_RAITOMETARU = 135,
+ TOKUSEI_MARUTISUKEIRU = 136,
+ TOKUSEI_DOKUBOUSOU = 137,
+ TOKUSEI_NETUBOUSOU = 138,
+ TOKUSEI_SYUUKAKU = 139,
+ TOKUSEI_TEREPASII = 140,
+ TOKUSEI_MURAKKE = 141,
+ TOKUSEI_BOUZIN = 142,
+ TOKUSEI_DOKUSYU = 143,
+ TOKUSEI_SAISEIRYOKU = 144,
+ TOKUSEI_HATOMUNE = 145,
+ TOKUSEI_SUNAKAKI = 146,
+ TOKUSEI_MIRAKURUSUKIN = 147,
+ TOKUSEI_ANARAIZU = 148,
+ TOKUSEI_IRYUUZYON = 149,
+ TOKUSEI_KAWARIMONO = 150,
+ TOKUSEI_SURINUKE = 151,
+ TOKUSEI_MIIRA = 152,
+ TOKUSEI_ZISINKAZYOU = 153,
+ TOKUSEI_SEIGINOKOKORO = 154,
+ TOKUSEI_BIBIRI = 155,
+ TOKUSEI_MAZIKKUMIRAA = 156,
+ TOKUSEI_SOUSYOKU = 157,
+ TOKUSEI_ITAZURAGOKORO = 158,
+ TOKUSEI_SUNANOTIKARA = 159,
+ TOKUSEI_TETUNOTOGE = 160,
+ TOKUSEI_DARUMAMOODO = 161,
+ TOKUSEI_SYOURINOHOSI = 162,
+ TOKUSEI_TAABOBUREIZU = 163,
+ TOKUSEI_TERABORUTEEZI = 164,
+ TOKUSEI_AROMABEERU = 165,
+ TOKUSEI_HURAWAABEERU = 166,
+ TOKUSEI_HOOBUKURO = 167,
+ TOKUSEI_HENGENZIZAI = 168,
+ TOKUSEI_FAAKOOTO = 169,
+ TOKUSEI_MAZISYAN = 170,
+ TOKUSEI_BOUDAN = 171,
+ TOKUSEI_KATIKI = 172,
+ TOKUSEI_GANZYOUAGO = 173,
+ TOKUSEI_HURIIZUSUKIN = 174,
+ TOKUSEI_SUIITOBEERU = 175,
+ TOKUSEI_BATORUSUITTI = 176,
+ TOKUSEI_HAYATENOTUBASA = 177,
+ TOKUSEI_MEGARANTYAA = 178,
+ TOKUSEI_KUSANOKEGAWA = 179,
+ TOKUSEI_KYOUSEI = 180,
+ TOKUSEI_KATAITUME = 181,
+ TOKUSEI_FEARIISUKIN = 182,
+ TOKUSEI_NUMENUME = 183,
+ TOKUSEI_SUKAISUKIN = 184,
+ TOKUSEI_OYAKOAI = 185,
+ TOKUSEI_DAAKUOORA = 186,
+ TOKUSEI_FEARIIOORA = 187,
+ TOKUSEI_OORABUREIKU = 188,
+ TOKUSEI_HAZIMARINOUMI = 189,
+ TOKUSEI_OWARINODAITI = 190,
+ TOKUSEI_DERUTASUTORIIMU = 191,
+ TOKUSEI_ZIKYUURYOKU = 192,
+ TOKUSEI_NIGEGOSI = 193,
+ TOKUSEI_KIKIKAIHI = 194,
+ TOKUSEI_MIZUGATAME = 195,
+ TOKUSEI_HITODENASI = 196,
+ TOKUSEI_RIMITTOSIIRUDO = 197,
+ TOKUSEI_HARIKOMI = 198,
+ TOKUSEI_SUIHOU = 199,
+ TOKUSEI_HAGANETUKAI = 200,
+ TOKUSEI_GYAKUZYOU = 201,
+ TOKUSEI_YUKIKAKI = 202,
+ TOKUSEI_ENKAKU = 203,
+ TOKUSEI_URUOIBOISU = 204,
+ TOKUSEI_HIIRINGUSIHUTO = 205,
+ TOKUSEI_EREKISUKIN = 206,
+ TOKUSEI_SAAHUTEERU = 207,
+ TOKUSEI_GYOGUN = 208,
+ TOKUSEI_BAKENOKAWA = 209,
+ TOKUSEI_KIZUNAHENGE = 210,
+ TOKUSEI_SUWAAMUTHENZI = 211,
+ TOKUSEI_HUSYOKU = 212,
+ TOKUSEI_ZETTAINEMURI = 213,
+ TOKUSEI_ZYOOUNOIGEN = 214,
+ TOKUSEI_TOBIDASUNAKAMI = 215,
+ TOKUSEI_ODORIKO = 216,
+ TOKUSEI_BATTERII = 217,
+ TOKUSEI_MOHUMOHU = 218,
+ TOKUSEI_BIBIDDOBODHI = 219,
+ TOKUSEI_SOURUHAATO = 220,
+ TOKUSEI_KAARIIHEAA = 221,
+ TOKUSEI_RESIIBAA = 222,
+ TOKUSEI_KAGAKUNOTIKARA = 223,
+ TOKUSEI_BIISUTOBUUSUTO = 224,
+ TOKUSEI_arSISUTEMU = 225,
+ TOKUSEI_EREKIMEIKAA = 226,
+ TOKUSEI_SAIKOMEIKAA = 227,
+ TOKUSEI_MISUTOMEIKAA = 228,
+ TOKUSEI_GURASUMEIKAA = 229,
+ TOKUSEI_METARUPUROTEKUTO = 230,
+ TOKUSEI_FANTOMUGAADO = 231,
+ TOKUSEI_PURIZUMUAAMAA = 232,
+ TOKUSEI_BUREINFOOSU = 233,
+ TOKUSEI_HUTOUNOTURUGI = 234,
+ TOKUSEI_HUKUTUNOTATE = 235,
+ TOKUSEI_RIBERO = 236,
+ TOKUSEI_TAMAHIROI = 237,
+ TOKUSEI_WATAGE = 238,
+ TOKUSEI_SUKURYUUOBIRE = 239,
+ TOKUSEI_MIRAAAAMAA = 240,
+ TOKUSEI_UNOMISAIRU = 241,
+ TOKUSEI_SUZIGANEIRI = 242,
+ TOKUSEI_ZYOUKIKIKAN = 243,
+ TOKUSEI_PANKUROKKU = 244,
+ TOKUSEI_SUNAHAKI = 245,
+ TOKUSEI_KOORINORINPUN = 246,
+ TOKUSEI_ZYUKUSEI = 247,
+ TOKUSEI_AISUFEISU = 248,
+ TOKUSEI_PAWAASUPOTTO = 249,
+ TOKUSEI_GITAI = 250,
+ TOKUSEI_BARIAHURII = 251,
+ TOKUSEI_HAGANENOSEISIN = 252,
+ TOKUSEI_HOROBINOBODHI = 253,
+ TOKUSEI_SAMAYOUTAMASII = 254,
+ TOKUSEI_GORIMUTYUU = 255,
+ TOKUSEI_KAGAKUHENKAGASU = 256,
+ TOKUSEI_PASUTERUBEERU = 257,
+ TOKUSEI_HARAPEKOSUITTI = 258,
+ TOKUSEI_KUIKKUDOROU = 259,
+ TOKUSEI_HUKASINOKOBUSI = 260,
+ TOKUSEI_KIMYOUNAKUSURI = 261,
+ TOKUSEI_TORANZISUTA = 262,
+ TOKUSEI_RYUUNOAGITO = 263,
+ TOKUSEI_SIRONOINANAKI = 264,
+ TOKUSEI_KURONOINANAKI = 265,
+ TOKUSEI_ZINBAITTAISIRO = 266,
+ TOKUSEI_ZINBAITTAIKURO = 267,
+ TOKUSEI_TORENAINIOI = 268,
+ TOKUSEI_KOBOREDANE = 269,
+ TOKUSEI_NETUKOUKAN = 270,
+ TOKUSEI_IKARINOKOURA = 271,
+ TOKUSEI_KIYOMENOSIO = 272,
+ TOKUSEI_KONGARIBODHI = 273,
+ TOKUSEI_KAZENORI = 274,
+ TOKUSEI_BANKEN = 275,
+ TOKUSEI_IWAHAKOBI = 276,
+ TOKUSEI_HUURYOKUDENKI = 277,
+ TOKUSEI_MAITHITHENZI = 278,
+ TOKUSEI_SIREITOU = 279,
+ TOKUSEI_DENKINIKAERU = 280,
+ TOKUSEI_KODAIKASSEI = 281,
+ TOKUSEI_KWOOKUTYAAZI = 282,
+ TOKUSEI_OUGONNOKARADA = 283,
+ TOKUSEI_WAZAWAINOUTUWA = 284,
+ TOKUSEI_WAZAWAINOTURUGI = 285,
+ TOKUSEI_WAZAWAINOOHUDA = 286,
+ TOKUSEI_WAZAWAINOTAMA = 287,
+ TOKUSEI_HIHIIRONOKODOU = 288,
+ TOKUSEI_HADORONENZIN = 289,
+ TOKUSEI_BINZYOU = 290,
+ TOKUSEI_HANSUU = 291,
+ TOKUSEI_KIREAZI = 292,
+ TOKUSEI_SOUDAISYOU = 293,
+ TOKUSEI_KYOUEN = 294,
+ TOKUSEI_DOKUGESYOU = 295,
+ TOKUSEI_TEIRUAAMAA = 296,
+ TOKUSEI_DOSYOKU = 297,
+ TOKUSEI_KINSINOTIKARA = 298,
+ TOKUSEI_MOTENASHINOKOKORO = 299,
+ TOKUSEI_HISUINOHITOMI = 300,
+ TOKUSEI_KAMENNOSHINKAMIDORI = 301,
+ TOKUSEI_KAMENNOSHINKAKAMADO = 302,
+ TOKUSEI_KAMENNOSHINKAIDO = 303,
+ TOKUSEI_KAMENNOOSHINKAISHIZUE = 304,
+ TOKUSEI_KUSARIEN = 305,
+ TOKUSEI_KANRONAMITUAME = 306,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/TokuseiType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/TokuseiType.fbs
new file mode 100644
index 00000000..8db7cf45
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/TokuseiType.fbs
@@ -0,0 +1,9 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum TokuseiType : int {
+ RANDOM_12 = 0,
+ RANDOM_123 = 1,
+ SET_1 = 2,
+ SET_2 = 3,
+ SET_3 = 4,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/TriggerCommand.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/TriggerCommand.fbs
new file mode 100644
index 00000000..61a5f8fb
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/TriggerCommand.fbs
@@ -0,0 +1,10 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table TriggerCommandElement {
+ Command:int;
+ Param:[string];
+}
+
+table TriggerCommand {
+ Element:[TriggerCommandElement];
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/TriggerTable.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/TriggerTable.fbs
new file mode 100644
index 00000000..81c72041
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/TriggerTable.fbs
@@ -0,0 +1,21 @@
+include "../Shared/ActivationCondition.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table TriggerCondition {
+ Condition:uint;
+ Param:[string];
+ Activators:[ActivationCondition];
+}
+
+table Trigger {
+ Start:TriggerCondition;
+}
+
+table TriggerTable (fs_serializer) {
+ Table:[Trigger];
+}
+
+root_type TriggerTable;
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/WazaID.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/WazaID.fbs
new file mode 100644
index 00000000..e47b672a
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/WazaID.fbs
@@ -0,0 +1,925 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum WazaID : ushort {
+ WAZA_NULL = 0,
+ WAZA_HATAKU = 1,
+ WAZA_KARATETYOPPU = 2,
+ WAZA_OUHUKUBINTA = 3,
+ WAZA_RENZOKUPANTI = 4,
+ WAZA_MEGATONPANTI = 5,
+ WAZA_NEKONIKOBAN = 6,
+ WAZA_HONOONOPANTI = 7,
+ WAZA_REITOUPANTI = 8,
+ WAZA_KAMINARIPANTI = 9,
+ WAZA_HIKKAKU = 10,
+ WAZA_HASAMU = 11,
+ WAZA_HASAMIGIROTIN = 12,
+ WAZA_KAMAITATI = 13,
+ WAZA_TURUGINOMAI = 14,
+ WAZA_IAIGIRI = 15,
+ WAZA_KAZEOKOSI = 16,
+ WAZA_TUBASADEUTU = 17,
+ WAZA_HUKITOBASI = 18,
+ WAZA_SORAWOTOBU = 19,
+ WAZA_SIMETUKERU = 20,
+ WAZA_TATAKITUKERU = 21,
+ WAZA_TURUNOMUTI = 22,
+ WAZA_HUMITUKE = 23,
+ WAZA_NIDOGERI = 24,
+ WAZA_MEGATONKIKKU = 25,
+ WAZA_TOBIGERI = 26,
+ WAZA_MAWASIGERI = 27,
+ WAZA_SUNAKAKE = 28,
+ WAZA_ZUTUKI = 29,
+ WAZA_TUNODETUKU = 30,
+ WAZA_MIDAREDUKI = 31,
+ WAZA_TUNODORIRU = 32,
+ WAZA_TAIATARI = 33,
+ WAZA_NOSIKAKARI = 34,
+ WAZA_MAKITUKU = 35,
+ WAZA_TOSSIN = 36,
+ WAZA_ABARERU = 37,
+ WAZA_SUTEMITAKKURU = 38,
+ WAZA_SIPPOWOHURU = 39,
+ WAZA_DOKUBARI = 40,
+ WAZA_DABURUNIIDORU = 41,
+ WAZA_MISAIRUBARI = 42,
+ WAZA_NIRAMITUKERU = 43,
+ WAZA_KAMITUKU = 44,
+ WAZA_NAKIGOE = 45,
+ WAZA_HOERU = 46,
+ WAZA_UTAU = 47,
+ WAZA_TYOUONPA = 48,
+ WAZA_SONIKKUBUUMU = 49,
+ WAZA_KANASIBARI = 50,
+ WAZA_YOUKAIEKI = 51,
+ WAZA_HINOKO = 52,
+ WAZA_KAENHOUSYA = 53,
+ WAZA_SIROIKIRI = 54,
+ WAZA_MIZUDEPPOU = 55,
+ WAZA_HAIDOROPONPU = 56,
+ WAZA_NAMINORI = 57,
+ WAZA_REITOUBIIMU = 58,
+ WAZA_HUBUKI = 59,
+ WAZA_SAIKEKOUSEN = 60,
+ WAZA_BABURUKOUSEN = 61,
+ WAZA_OORORABIIMU = 62,
+ WAZA_HAKAIKOUSEN = 63,
+ WAZA_TUTUKU = 64,
+ WAZA_DORIRUKUTIBASI = 65,
+ WAZA_ZIGOKUGURUMA = 66,
+ WAZA_KETAGURI = 67,
+ WAZA_KAUNTAA = 68,
+ WAZA_TIKYUUNAGE = 69,
+ WAZA_KAIRIKI = 70,
+ WAZA_SUITORU = 71,
+ WAZA_MEGADOREIN = 72,
+ WAZA_YADORIGINOTANE = 73,
+ WAZA_SEITYOU = 74,
+ WAZA_HAPPAKATTAA = 75,
+ WAZA_SOORAABIIMU = 76,
+ WAZA_DOKUNOKONA = 77,
+ WAZA_SIBIREGONA = 78,
+ WAZA_NEMURIGONA = 79,
+ WAZA_HANABIRANOMAI = 80,
+ WAZA_ITOWOHAKU = 81,
+ WAZA_RYUUNOIKARI = 82,
+ WAZA_HONOONOUZU = 83,
+ WAZA_DENKISYOKKU = 84,
+ WAZA_10MANBORUTO = 85,
+ WAZA_DENZIHA = 86,
+ WAZA_KAMINARI = 87,
+ WAZA_IWAOTOSI = 88,
+ WAZA_ZISIN = 89,
+ WAZA_ZIWARE = 90,
+ WAZA_ANAWOHORU = 91,
+ WAZA_DOKUDOKU = 92,
+ WAZA_NENRIKI = 93,
+ WAZA_SAIKOKINESISU = 94,
+ WAZA_SAIMINZYUTU = 95,
+ WAZA_YOGANOPOOZU = 96,
+ WAZA_KOUSOKUIDOU = 97,
+ WAZA_DENKOUSEKKA = 98,
+ WAZA_IKARI = 99,
+ WAZA_TEREPOOTO = 100,
+ WAZA_NAITOHEDDO = 101,
+ WAZA_MONOMANE = 102,
+ WAZA_IYANAOTO = 103,
+ WAZA_KAGEBUNSIN = 104,
+ WAZA_ZIKOSAISEI = 105,
+ WAZA_KATAKUNARU = 106,
+ WAZA_TIISAKUNARU = 107,
+ WAZA_ENMAKU = 108,
+ WAZA_AYASIIHIKARI = 109,
+ WAZA_KARANIKOMORU = 110,
+ WAZA_MARUKUNARU = 111,
+ WAZA_BARIAA = 112,
+ WAZA_HIKARINOKABE = 113,
+ WAZA_KUROIKIRI = 114,
+ WAZA_RIHUREKUTAA = 115,
+ WAZA_KIAIDAME = 116,
+ WAZA_GAMAN = 117,
+ WAZA_YUBIWOHURU = 118,
+ WAZA_OUMUGAESI = 119,
+ WAZA_ZIBAKU = 120,
+ WAZA_TAMAGOBAKUDAN = 121,
+ WAZA_SITADENAMERU = 122,
+ WAZA_SUMOGGU = 123,
+ WAZA_HEDOROKOUGEKI = 124,
+ WAZA_HONEKONBOU = 125,
+ WAZA_DAIMONZI = 126,
+ WAZA_TAKINOBORI = 127,
+ WAZA_KARADEHASAMU = 128,
+ WAZA_SUPIIDOSUTAA = 129,
+ WAZA_ROKETTOZUTUKI = 130,
+ WAZA_TOGEKYANON = 131,
+ WAZA_KARAMITUKU = 132,
+ WAZA_DOWASURE = 133,
+ WAZA_SUPUUNMAGE = 134,
+ WAZA_TAMAGOUMI = 135,
+ WAZA_TOBIHIZAGERI = 136,
+ WAZA_HEBINIRAMI = 137,
+ WAZA_YUMEKUI = 138,
+ WAZA_DOKUGASU = 139,
+ WAZA_TAMANAGE = 140,
+ WAZA_KYUUKETU = 141,
+ WAZA_AKUMANOKISSU = 142,
+ WAZA_GODDOBAADO = 143,
+ WAZA_HENSIN = 144,
+ WAZA_AWA = 145,
+ WAZA_PIYOPIYOPANTI = 146,
+ WAZA_KINOKONOHOUSI = 147,
+ WAZA_HURASSYU = 148,
+ WAZA_SAIKOWHEEBU = 149,
+ WAZA_HANERU = 150,
+ WAZA_TOKERU = 151,
+ WAZA_KURABUHANMAA = 152,
+ WAZA_DAIBAKUHATU = 153,
+ WAZA_MIDAREHIKKAKI = 154,
+ WAZA_HONEBUUMERAN = 155,
+ WAZA_NEMURU = 156,
+ WAZA_IWANADARE = 157,
+ WAZA_HISSATUMAEBA = 158,
+ WAZA_KAKUBARU = 159,
+ WAZA_TEKUSUTYAA = 160,
+ WAZA_TORAIATAKKU = 161,
+ WAZA_IKARINOMAEBA = 162,
+ WAZA_KIRISAKU = 163,
+ WAZA_MIGAWARI = 164,
+ WAZA_WARUAGAKI = 165,
+ WAZA_SUKETTI = 166,
+ WAZA_TORIPURUKIKKU = 167,
+ WAZA_DOROBOU = 168,
+ WAZA_KUMONOSU = 169,
+ WAZA_KOKORONOME = 170,
+ WAZA_AKUMU = 171,
+ WAZA_KAENGURUMA = 172,
+ WAZA_IBIKI = 173,
+ WAZA_NOROI = 174,
+ WAZA_ZITABATA = 175,
+ WAZA_TEKUSUTYAA2 = 176,
+ WAZA_EAROBURASUTO = 177,
+ WAZA_WATAHOUSI = 178,
+ WAZA_KISIKAISEI = 179,
+ WAZA_URAMI = 180,
+ WAZA_KONAYUKI = 181,
+ WAZA_MAMORU = 182,
+ WAZA_MAHHAPANTI = 183,
+ WAZA_KOWAIKAO = 184,
+ WAZA_DAMASIUTI = 185,
+ WAZA_TENSINOKISSU = 186,
+ WAZA_HARADAIKO = 187,
+ WAZA_HEDOROBAKUDAN = 188,
+ WAZA_DOROKAKE = 189,
+ WAZA_OKUTANHOU = 190,
+ WAZA_MAKIBISI = 191,
+ WAZA_DENZIHOU = 192,
+ WAZA_MIYABURU = 193,
+ WAZA_MITIDURE = 194,
+ WAZA_HOROBINOUTA = 195,
+ WAZA_KOGOERUKAZE = 196,
+ WAZA_MIKIRI = 197,
+ WAZA_BOONRASSYU = 198,
+ WAZA_ROKKUON = 199,
+ WAZA_GEKIRIN = 200,
+ WAZA_SUNAARASI = 201,
+ WAZA_GIGADOREIN = 202,
+ WAZA_KORAERU = 203,
+ WAZA_AMAERU = 204,
+ WAZA_KOROGARU = 205,
+ WAZA_MINEUTI = 206,
+ WAZA_IBARU = 207,
+ WAZA_MIRUKUNOMI = 208,
+ WAZA_SUPAAKU = 209,
+ WAZA_RENZOKUGIRI = 210,
+ WAZA_HAGANENOTUBASA = 211,
+ WAZA_KUROIMANAZASI = 212,
+ WAZA_MEROMERO = 213,
+ WAZA_NEGOTO = 214,
+ WAZA_IYASINOSUZU = 215,
+ WAZA_ONGAESI = 216,
+ WAZA_PUREZENTO = 217,
+ WAZA_YATUATARI = 218,
+ WAZA_SINPINOMAMORI = 219,
+ WAZA_ITAMIWAKE = 220,
+ WAZA_SEINARUHONOO = 221,
+ WAZA_MAGUNITYUUDO = 222,
+ WAZA_BAKURETUPANTI = 223,
+ WAZA_MEGAHOON = 224,
+ WAZA_RYUUNOIBUKI = 225,
+ WAZA_BATONTATTI = 226,
+ WAZA_ANKOORU = 227,
+ WAZA_OIUTI = 228,
+ WAZA_KOUSOKUSUPIN = 229,
+ WAZA_AMAIKAORI = 230,
+ WAZA_AIANTEERU = 231,
+ WAZA_METARUKUROO = 232,
+ WAZA_ATEMINAGE = 233,
+ WAZA_ASANOHIZASI = 234,
+ WAZA_KOUGOUSEI = 235,
+ WAZA_TUKINOHIKARI = 236,
+ WAZA_MEZAMERUPAWAA = 237,
+ WAZA_KUROSUTYOPPU = 238,
+ WAZA_TATUMAKI = 239,
+ WAZA_AMAGOI = 240,
+ WAZA_NIHONBARE = 241,
+ WAZA_KAMIKUDAKU = 242,
+ WAZA_MIRAAKOOTO = 243,
+ WAZA_ZIKOANZI = 244,
+ WAZA_SINSOKU = 245,
+ WAZA_GENSINOTIKARA = 246,
+ WAZA_SYADOOBOORU = 247,
+ WAZA_MIRAIYOTI = 248,
+ WAZA_IWAKUDAKI = 249,
+ WAZA_UZUSIO = 250,
+ WAZA_HUKURODATAKI = 251,
+ WAZA_NEKODAMASI = 252,
+ WAZA_SAWAGU = 253,
+ WAZA_TAKUWAERU = 254,
+ WAZA_HAKIDASU = 255,
+ WAZA_NOMIKOMU = 256,
+ WAZA_NEPPUU = 257,
+ WAZA_ARARE = 258,
+ WAZA_ITYAMON = 259,
+ WAZA_ODATERU = 260,
+ WAZA_ONIBI = 261,
+ WAZA_OKIMIYAGE = 262,
+ WAZA_KARAGENKI = 263,
+ WAZA_KIAIPANTI = 264,
+ WAZA_KITUKE = 265,
+ WAZA_KONOYUBITOMARE = 266,
+ WAZA_SIZENNOTIKARA = 267,
+ WAZA_ZYUUDEN = 268,
+ WAZA_TYOUHATU = 269,
+ WAZA_TEDASUKE = 270,
+ WAZA_TORIKKU = 271,
+ WAZA_NARIKIRI = 272,
+ WAZA_NEGAIGOTO = 273,
+ WAZA_NEKONOTE = 274,
+ WAZA_NEWOHARU = 275,
+ WAZA_BAKADIKARA = 276,
+ WAZA_MAZIKKUKOOTO = 277,
+ WAZA_RISAIKURU = 278,
+ WAZA_RIBENZI = 279,
+ WAZA_KAWARAWARI = 280,
+ WAZA_AKUBI = 281,
+ WAZA_HATAKIOTOSU = 282,
+ WAZA_GAMUSYARA = 283,
+ WAZA_HUNKA = 284,
+ WAZA_SUKIRUSUWAPPU = 285,
+ WAZA_HUUIN = 286,
+ WAZA_RIHURESSYU = 287,
+ WAZA_ONNEN = 288,
+ WAZA_YOKODORI = 289,
+ WAZA_HIMITUNOTIKARA = 290,
+ WAZA_DAIBINGU = 291,
+ WAZA_TUPPARI = 292,
+ WAZA_HOGOSYOKU = 293,
+ WAZA_HOTARUBI = 294,
+ WAZA_RASUTAAPAAZI = 295,
+ WAZA_MISUTOBOORU = 296,
+ WAZA_FEZAADANSU = 297,
+ WAZA_HURAHURADANSU = 298,
+ WAZA_BUREIZUKIKKU = 299,
+ WAZA_DOROASOBI = 300,
+ WAZA_AISUBOORU = 301,
+ WAZA_NIIDORUAAMU = 302,
+ WAZA_NAMAKERU = 303,
+ WAZA_HAIPAABOISU = 304,
+ WAZA_DOKUDOKUNOKIBA = 305,
+ WAZA_BUREIKUKUROO = 306,
+ WAZA_BURASUTOBAAN = 307,
+ WAZA_HAIDOROKANON = 308,
+ WAZA_KOMETTOPANTI = 309,
+ WAZA_ODOROKASU = 310,
+ WAZA_WHEZAABOORU = 311,
+ WAZA_AROMASERAPII = 312,
+ WAZA_USONAKI = 313,
+ WAZA_EAKATTAA = 314,
+ WAZA_OOBAAHIITO = 315,
+ WAZA_KAGIWAKERU = 316,
+ WAZA_GANSEKIHUUZI = 317,
+ WAZA_GINIRONOKAZE = 318,
+ WAZA_KINZOKUON = 319,
+ WAZA_KUSABUE = 320,
+ WAZA_KUSUGURU = 321,
+ WAZA_KOSUMOPAWAA = 322,
+ WAZA_SIOHUKI = 323,
+ WAZA_SIGUNARUBIIMU = 324,
+ WAZA_SYADOOPANTI = 325,
+ WAZA_ZINTUURIKI = 326,
+ WAZA_SUKAIAPPAA = 327,
+ WAZA_SUNAZIGOKU = 328,
+ WAZA_ZETTAIREIDO = 329,
+ WAZA_DAKURYUU = 330,
+ WAZA_TANEMASINGAN = 331,
+ WAZA_TUBAMEGAESI = 332,
+ WAZA_TURARABARI = 333,
+ WAZA_TEPPEKI = 334,
+ WAZA_TOOSENBOU = 335,
+ WAZA_TOOBOE = 336,
+ WAZA_DORAGONKUROO = 337,
+ WAZA_HAADOPURANTO = 338,
+ WAZA_BIRUDOAPPU = 339,
+ WAZA_TOBIHANERU = 340,
+ WAZA_MADDOSYOTTO = 341,
+ WAZA_POIZUNTEERU = 342,
+ WAZA_HOSIGARU = 343,
+ WAZA_BORUTEKKAA = 344,
+ WAZA_MAZIKARURIIHU = 345,
+ WAZA_MIZUASOBI = 346,
+ WAZA_MEISOU = 347,
+ WAZA_RIIHUBUREEDO = 348,
+ WAZA_RYUUNOMAI = 349,
+ WAZA_ROKKUBURASUTO = 350,
+ WAZA_DENGEKIHA = 351,
+ WAZA_MIZUNOHADOU = 352,
+ WAZA_HAMETUNONEGAI = 353,
+ WAZA_SAIKOBUUSUTO = 354,
+ WAZA_HANEYASUME = 355,
+ WAZA_ZYUURYOKU = 356,
+ WAZA_MIRAKURUAI = 357,
+ WAZA_MEZAMASIBINTA = 358,
+ WAZA_AAMUHANMAA = 359,
+ WAZA_ZYAIROBOORU = 360,
+ WAZA_IYASINONEGAI = 361,
+ WAZA_SIOMIZU = 362,
+ WAZA_SIZENNOMEGUMI = 363,
+ WAZA_FEINTO = 364,
+ WAZA_TUIBAMU = 365,
+ WAZA_OIKAZE = 366,
+ WAZA_TUBOWOTUKU = 367,
+ WAZA_METARUBAASUTO = 368,
+ WAZA_TONBOGAERI = 369,
+ WAZA_INFAITO = 370,
+ WAZA_SIPPEGAESI = 371,
+ WAZA_DAMEOSI = 372,
+ WAZA_SASIOSAE = 373,
+ WAZA_NAGETUKERU = 374,
+ WAZA_SAIKOSIHUTO = 375,
+ WAZA_KIRIHUDA = 376,
+ WAZA_KAIHUKUHUUZI = 377,
+ WAZA_SIBORITORU = 378,
+ WAZA_PAWAATORIKKU = 379,
+ WAZA_IEKI = 380,
+ WAZA_OMAZINAI = 381,
+ WAZA_SAKIDORI = 382,
+ WAZA_MANEKKO = 383,
+ WAZA_PAWAASUWAPPU = 384,
+ WAZA_GAADOSUWAPPU = 385,
+ WAZA_OSIOKI = 386,
+ WAZA_TOTTEOKI = 387,
+ WAZA_NAYAMINOTANE = 388,
+ WAZA_HUIUTI = 389,
+ WAZA_DOKUBISI = 390,
+ WAZA_HAATOSUWAPPU = 391,
+ WAZA_AKUARINGU = 392,
+ WAZA_DENZIHUYUU = 393,
+ WAZA_HUREADORAIBU = 394,
+ WAZA_HAKKEI = 395,
+ WAZA_HADOUDAN = 396,
+ WAZA_ROKKUKATTO = 397,
+ WAZA_DOKUDUKI = 398,
+ WAZA_AKUNOHADOU = 399,
+ WAZA_TUZIGIRI = 400,
+ WAZA_AKUATEERU = 401,
+ WAZA_TANEBAKUDAN = 402,
+ WAZA_EASURASSYU = 403,
+ WAZA_SIZAAKUROSU = 404,
+ WAZA_MUSINOSAZAMEKI = 405,
+ WAZA_RYUUNOHADOU = 406,
+ WAZA_DORAGONDAIBU = 407,
+ WAZA_PAWAAJEMU = 408,
+ WAZA_DOREINPANTI = 409,
+ WAZA_SINKUUHA = 410,
+ WAZA_KIAIDAMA = 411,
+ WAZA_ENAZIIBOORU = 412,
+ WAZA_BUREIBUBAADO = 413,
+ WAZA_DAITINOTIKARA = 414,
+ WAZA_SURIKAE = 415,
+ WAZA_GIGAINPAKUTO = 416,
+ WAZA_WARUDAKUMI = 417,
+ WAZA_BARETTOPANTI = 418,
+ WAZA_YUKINADARE = 419,
+ WAZA_KOORINOTUBUTE = 420,
+ WAZA_SYADOOKUROO = 421,
+ WAZA_KAMINARINOKIBA = 422,
+ WAZA_KOORINOKIBA = 423,
+ WAZA_HONOONOKIBA = 424,
+ WAZA_KAGEUTI = 425,
+ WAZA_DOROBAKUDAN = 426,
+ WAZA_SAIKOKATTAA = 427,
+ WAZA_SINENNOZUTUKI = 428,
+ WAZA_MIRAASYOTTO = 429,
+ WAZA_RASUTAAKANON = 430,
+ WAZA_ROKKUKURAIMU = 431,
+ WAZA_KIRIBARAI = 432,
+ WAZA_TORIKKURUUMU = 433,
+ WAZA_RYUUSEIGUN = 434,
+ WAZA_HOUDEN = 435,
+ WAZA_HUNEN = 436,
+ WAZA_RIIHUSUTOOMU = 437,
+ WAZA_PAWAAWHIPPU = 438,
+ WAZA_GANSEKIHOU = 439,
+ WAZA_KUROSUPOIZUN = 440,
+ WAZA_DASUTOSYUUTO = 441,
+ WAZA_AIANHEDDO = 442,
+ WAZA_MAGUNETTOBOMU = 443,
+ WAZA_SUTOONEZZI = 444,
+ WAZA_YUUWAKU = 445,
+ WAZA_SUTERUSUROKKU = 446,
+ WAZA_KUSAMUSUBI = 447,
+ WAZA_OSYABERI = 448,
+ WAZA_SABAKINOTUBUTE = 449,
+ WAZA_MUSIKUI = 450,
+ WAZA_TYAAZIBIIMU = 451,
+ WAZA_UDDOHANMAA = 452,
+ WAZA_AKUAJETTO = 453,
+ WAZA_KOUGEKISIREI = 454,
+ WAZA_BOUGYOSIREI = 455,
+ WAZA_KAIHUKUSIREI = 456,
+ WAZA_MOROHANOZUTUKI = 457,
+ WAZA_DABURUATAKKU = 458,
+ WAZA_TOKINOHOUKOU = 459,
+ WAZA_AKUUSETUDAN = 460,
+ WAZA_MIKADUKINOMAI = 461,
+ WAZA_NIGIRITUBUSU = 462,
+ WAZA_MAGUMASUTOOMU = 463,
+ WAZA_DAAKUHOORU = 464,
+ WAZA_SIIDOHUREA = 465,
+ WAZA_AYASIIKAZE = 466,
+ WAZA_SYADOODAIBU = 467,
+ WAZA_TUMETOGI = 468,
+ WAZA_WAIDOGAADO = 469,
+ WAZA_GAADOSHEA = 470,
+ WAZA_PAWAASHEA = 471,
+ WAZA_WANDAARUUMU = 472,
+ WAZA_SAIKOSYOKKU = 473,
+ WAZA_BENOMUSYOKKU = 474,
+ WAZA_BODHIPAAZI = 475,
+ WAZA_IKARINOKONA = 476,
+ WAZA_TEREKINESISU = 477,
+ WAZA_MAZIKKURUUMU = 478,
+ WAZA_UTIOTOSU = 479,
+ WAZA_YAMAARASI = 480,
+ WAZA_HAZIKERUHONOO = 481,
+ WAZA_HEDOROWHEEBU = 482,
+ WAZA_TYOUNOMAI = 483,
+ WAZA_HEBIIBONBAA = 484,
+ WAZA_SINKURONOIZU = 485,
+ WAZA_EREKIBOORU = 486,
+ WAZA_MIZUBITASI = 487,
+ WAZA_NITOROTYAAZI = 488,
+ WAZA_TOGUROWOMAKU = 489,
+ WAZA_ROOKIKKU = 490,
+ WAZA_ASIDDOBOMU = 491,
+ WAZA_IKASAMA = 492,
+ WAZA_SINPURUBIIMU = 493,
+ WAZA_NAKAMADUKURI = 494,
+ WAZA_OSAKINIDOUZO = 495,
+ WAZA_RINSYOU = 496,
+ WAZA_EKOOBOISU = 497,
+ WAZA_NASIKUZUSI = 498,
+ WAZA_KURIASUMOGGU = 499,
+ WAZA_ASISUTOPAWAA = 500,
+ WAZA_FASUTOGAADO = 501,
+ WAZA_SAIDOTHENZI = 502,
+ WAZA_NETTOU = 503,
+ WAZA_KARAWOYABURU = 504,
+ WAZA_IYASINOHADOU = 505,
+ WAZA_TATARIME = 506,
+ WAZA_HURIIFOORU = 507,
+ WAZA_GIATHENZI = 508,
+ WAZA_TOMOENAGE = 509,
+ WAZA_YAKITUKUSU = 510,
+ WAZA_SAKIOKURI = 511,
+ WAZA_AKUROBATTO = 512,
+ WAZA_MIRAATAIPU = 513,
+ WAZA_KATAKIUTI = 514,
+ WAZA_INOTIGAKE = 515,
+ WAZA_GIHUTOPASU = 516,
+ WAZA_RENGOKU = 517,
+ WAZA_MIZUNOTIKAI = 518,
+ WAZA_HONOONOTIKAI = 519,
+ WAZA_KUSANOTIKAI = 520,
+ WAZA_BORUTOTHENZI = 521,
+ WAZA_MUSINOTEIKOU = 522,
+ WAZA_ZINARASI = 523,
+ WAZA_KOORINOIBUKI = 524,
+ WAZA_DORAGONTEERU = 525,
+ WAZA_HURUITATERU = 526,
+ WAZA_EREKINETTO = 527,
+ WAZA_WAIRUDOBORUTO = 528,
+ WAZA_DORIRURAINAA = 529,
+ WAZA_DABURUTYOPPU = 530,
+ WAZA_HAATOSUTANPU = 531,
+ WAZA_UDDOHOON = 532,
+ WAZA_SEINARUTURUGI = 533,
+ WAZA_SHERUBUREEDO = 534,
+ WAZA_HIITOSUTANPU = 535,
+ WAZA_GURASUMIKISAA = 536,
+ WAZA_HAADOROORAA = 537,
+ WAZA_KOTTONGAADO = 538,
+ WAZA_NAITOBAASUTO = 539,
+ WAZA_SAIKOBUREIKU = 540,
+ WAZA_SUIIPUBINTA = 541,
+ WAZA_BOUHUU = 542,
+ WAZA_AHUROBUREIKU = 543,
+ WAZA_GIASOOSAA = 544,
+ WAZA_KAENDAN = 545,
+ WAZA_TEKUNOBASUTAA = 546,
+ WAZA_INISIENOUTA = 547,
+ WAZA_SINPINOTURUGI = 548,
+ WAZA_KOGOERUSEKAI = 549,
+ WAZA_RAIGEKI = 550,
+ WAZA_AOIHONOO = 551,
+ WAZA_HONOONOMAI = 552,
+ WAZA_HURIIZUBORUTO = 553,
+ WAZA_KOORUDOHUREA = 554,
+ WAZA_BAAKUAUTO = 555,
+ WAZA_TURARAOTOSI = 556,
+ WAZA_vJENEREETO = 557,
+ WAZA_KUROSUHUREIMU = 558,
+ WAZA_KUROSUSANDAA = 559,
+ WAZA_HURAINGUPURESU = 560,
+ WAZA_TATAMIGAESI = 561,
+ WAZA_GEPPU = 562,
+ WAZA_TAGAYASU = 563,
+ WAZA_NEBANEBANETTO = 564,
+ WAZA_TODOMEBARI = 565,
+ WAZA_GOOSUTODAIBU = 566,
+ WAZA_HAROWHIN = 567,
+ WAZA_OTAKEBI = 568,
+ WAZA_PURAZUMASYAWAA = 569,
+ WAZA_PARABORATYAAZI = 570,
+ WAZA_MORINONOROI = 571,
+ WAZA_HANAHUBUKI = 572,
+ WAZA_HURIIZUDORAI = 573,
+ WAZA_TYAAMUBOISU = 574,
+ WAZA_SUTEZERIHU = 575,
+ WAZA_HIKKURIKAESU = 576,
+ WAZA_DOREINKISSU = 577,
+ WAZA_TORIKKUGAADO = 578,
+ WAZA_HURAWAAGAADO = 579,
+ WAZA_GURASUFIIRUDO = 580,
+ WAZA_MISUTOFIIRUDO = 581,
+ WAZA_SOUDEN = 582,
+ WAZA_ZYARETUKU = 583,
+ WAZA_YOUSEINOKAZE = 584,
+ WAZA_MUUNFOOSU = 585,
+ WAZA_BAKUONPA = 586,
+ WAZA_FEARIIROKKU = 587,
+ WAZA_KINGUSIIRUDO = 588,
+ WAZA_NAKAYOKUSURU = 589,
+ WAZA_NAISYOBANASI = 590,
+ WAZA_DAIYASUTOOMU = 591,
+ WAZA_SUTIIMUBAASUTO = 592,
+ WAZA_IZIGENHOORU = 593,
+ WAZA_MIZUSYURIKEN = 594,
+ WAZA_MAZIKARUHUREIMU = 595,
+ WAZA_NIIDORUGAADO = 596,
+ WAZA_AROMAMISUTO = 597,
+ WAZA_KAIDENPA = 598,
+ WAZA_BENOMUTORAPPU = 599,
+ WAZA_HUNZIN = 600,
+ WAZA_ZIOKONTOROORU = 601,
+ WAZA_ZIBASOUSA = 602,
+ WAZA_HAPPIITAIMU = 603,
+ WAZA_EREKIFIIRUDO = 604,
+ WAZA_MAZIKARUSYAIN = 605,
+ WAZA_OIWAI = 606,
+ WAZA_TEWOTUNAGU = 607,
+ WAZA_TUBURANAHITOMI = 608,
+ WAZA_HOPPESURISURI = 609,
+ WAZA_TEKAGEN = 610,
+ WAZA_MATOWARITUKU = 611,
+ WAZA_GUROUPANTI = 612,
+ WAZA_DESUUINGU = 613,
+ WAZA_SAUZANAROO = 614,
+ WAZA_SAUZANWHEEBU = 615,
+ WAZA_GURANDOFOOSU = 616,
+ WAZA_HAMETUNOHIKARI = 617,
+ WAZA_KONGENNOHADOU = 618,
+ WAZA_DANGAINOTURUGI = 619,
+ WAZA_GARYOUTENSEI = 620,
+ WAZA_IZIGENRASSYU = 621,
+ WAZA_URUTORADASSYUATAKKU = 622,
+ WAZA_NOOMARUZENRYOKU = 623,
+ WAZA_ZENRYOKUMUSOUGEKIRETUKEN = 624,
+ WAZA_KAKUTOUZENRYOKU = 625,
+ WAZA_FAINARUDAIBUKURASSYU = 626,
+ WAZA_HIKOUZENRYOKU = 627,
+ WAZA_ASIDDOPOIZUNDERIITO = 628,
+ WAZA_DOKUZENRYOKU = 629,
+ WAZA_RAIZINGURANDOOOBAA = 630,
+ WAZA_ZIMENZENRYOKU = 631,
+ WAZA_WAARUZUENDOFOORU = 632,
+ WAZA_IWAZENRYOKU = 633,
+ WAZA_ZETTAIHOSYOKUKAITENZAN = 634,
+ WAZA_MUSIZENRYOKU = 635,
+ WAZA_MUGENANYAHENOIZANAI = 636,
+ WAZA_GOOSUTOZENRYOKU = 637,
+ WAZA_TYOUZETURASENRENGEKI = 638,
+ WAZA_HAGANEZENRYOKU = 639,
+ WAZA_DAINAMIKKUHURUHUREIMU = 640,
+ WAZA_HONOOZENRYOKU = 641,
+ WAZA_SUUPAAAKUATORUNEEDO = 642,
+ WAZA_MIZUZENRYOKU = 643,
+ WAZA_BURUUMUSYAINEKUSUTORA = 644,
+ WAZA_KUSAZENRYOKU = 645,
+ WAZA_SUPAAKINGUGIGABORUTO = 646,
+ WAZA_DENKIZENRYOKU = 647,
+ WAZA_MAKISIMAMUSAIBUREIKAA = 648,
+ WAZA_ESUPAAZENRYOKU = 649,
+ WAZA_REIZINGUZIOHURIIZU = 650,
+ WAZA_KOORIZENRYOKU = 651,
+ WAZA_ARUTHIMETTODORAGONBAAN = 652,
+ WAZA_DORAGONZENRYOKU = 653,
+ WAZA_BURAKKUHOORUIKURIPUSU = 654,
+ WAZA_AKUZENRYOKU = 655,
+ WAZA_RABURIISUTAAINPAKUTO = 656,
+ WAZA_FEARIIZENRYOKU = 657,
+ WAZA_HISSATUNOPIKATYUUTO = 658,
+ WAZA_SUNAATUME = 659,
+ WAZA_DEAIGASIRA = 660,
+ WAZA_TOOTIKA = 661,
+ WAZA_KAGENUI = 662,
+ WAZA_ddRARIATTO = 663,
+ WAZA_UTAKATANOARIA = 664,
+ WAZA_AISUHANMAA = 665,
+ WAZA_HURAWAAHIIRU = 666,
+ WAZA_10MANBARIKI = 667,
+ WAZA_TIKARAWOSUITORU = 668,
+ WAZA_SOORAABUREEDO = 669,
+ WAZA_KONOHA = 670,
+ WAZA_SUPOTTORAITO = 671,
+ WAZA_DOKUNOITO = 672,
+ WAZA_TOGISUMASU = 673,
+ WAZA_ASISUTOGIA = 674,
+ WAZA_ZIGOKUDUKI = 675,
+ WAZA_KAHUNDANGO = 676,
+ WAZA_ANKAASYOTTO = 677,
+ WAZA_SAIKOFIIRUDO = 678,
+ WAZA_TOBIKAKARU = 679,
+ WAZA_HONOONOMUTI = 680,
+ WAZA_TUKEAGARU = 681,
+ WAZA_MOETUKIRU = 682,
+ WAZA_SUPIIDOSUWAPPU = 683,
+ WAZA_SUMAATOHOON = 684,
+ WAZA_ZYOUKA = 685,
+ WAZA_MEZAMERUDANSU = 686,
+ WAZA_KOAPANISSYAA = 687,
+ WAZA_TOROPIKARUKIKKU = 688,
+ WAZA_SAIHAI = 689,
+ WAZA_KUTIBASIKYANON = 690,
+ WAZA_SUKEIRUNOIZU = 691,
+ WAZA_DORAGONHANMAA = 692,
+ WAZA_BUNMAWASU = 693,
+ WAZA_OORORABEERU = 694,
+ WAZA_SYADOOAROOZUSUTORAIKU = 695,
+ WAZA_HAIPAADAAKUKURASSYAA = 696,
+ WAZA_WADATUMINOSINFONIA = 697,
+ WAZA_GAADHIANDEAROORA = 698,
+ WAZA_SITISEIDAKKONTAI = 699,
+ WAZA_RAITONINGUSAAHURAIDO = 700,
+ WAZA_HONKIWODASUKOUGEKI = 701,
+ WAZA_NAINEBORUBUUSUTO = 702,
+ WAZA_ORIZINZUSUUPAANOVHA = 703,
+ WAZA_TORAPPUSHERU = 704,
+ WAZA_HURUURUKANON = 705,
+ WAZA_SAIKOFANGU = 706,
+ WAZA_ZIDANDA = 707,
+ WAZA_SYADOOBOON = 708,
+ WAZA_AKUSERUROKKU = 709,
+ WAZA_AKUABUREIKU = 710,
+ WAZA_PURIZUMUREEZAA = 711,
+ WAZA_SYADOOSUTIIRU = 712,
+ WAZA_METEODORAIBU = 713,
+ WAZA_SYADOOREI = 714,
+ WAZA_NAMIDAME = 715,
+ WAZA_BIRIBIRITIKUTIKU = 716,
+ WAZA_SIZENNOIKARI = 717,
+ WAZA_MARUTIATAKKU = 718,
+ WAZA_1000MANBORUTO = 719,
+ WAZA_BIKKURIHEDDO = 720,
+ WAZA_PURAZUMAFISUTO = 721,
+ WAZA_FOTONGEIZAA = 722,
+ WAZA_TENKOGASUMETUBOUNOHIKARI = 723,
+ WAZA_SANSYAINSUMASSYAA = 724,
+ WAZA_MUUNRAITOBURASUTAA = 725,
+ WAZA_POKABOKAHURENDOTAIMU = 726,
+ WAZA_RAZIARUEZZISUTOOMU = 727,
+ WAZA_BUREIZINGUSOURUBIITO = 728,
+ WAZA_BATIBATIAKUSERU = 729,
+ WAZA_ZABUZABUSAAHU = 730,
+ WAZA_HUWAHUWAFOORU = 731,
+ WAZA_PIKAPIKASANDAA = 732,
+ WAZA_IKIIKIBABURU = 733,
+ WAZA_BIRIBIRIEREKI = 734,
+ WAZA_MERAMERABAAN = 735,
+ WAZA_DOBADOBAOORA = 736,
+ WAZA_WARUWARUZOON = 737,
+ WAZA_SUKUSUKUBONBAA = 738,
+ WAZA_KOTIKOTIHUROSUTO = 739,
+ WAZA_KIRAKIRASUTOOMU = 740,
+ WAZA_BUIBUIBUREIKU = 741,
+ WAZA_DABURUPANTHAA = 742,
+ WAZA_DAIWHOORU = 743,
+ WAZA_DAIMAKKUSUHOU = 744,
+ WAZA_NERAIUTI = 745,
+ WAZA_KURAITUKU = 746,
+ WAZA_HOOBARU = 747,
+ WAZA_HAISUINOZIN = 748,
+ WAZA_TAARUSYOTTO = 749,
+ WAZA_MAHOUNOKONA = 750,
+ WAZA_DORAGONAROO = 751,
+ WAZA_OTYAKAI = 752,
+ WAZA_TAKOGATAME = 753,
+ WAZA_DENGEKIKUTIBASI = 754,
+ WAZA_ERAGAMI = 755,
+ WAZA_KOOTOTHENZI = 756,
+ WAZA_DAIBAAN = 757,
+ WAZA_DAIWAAMU = 758,
+ WAZA_DAISANDAA = 759,
+ WAZA_DAIATAKKU = 760,
+ WAZA_DAINAKKURU = 761,
+ WAZA_DAIHOROU = 762,
+ WAZA_DAIAISU = 763,
+ WAZA_DAIASIDDO = 764,
+ WAZA_DAISUTORIIMU = 765,
+ WAZA_DAIJETTO = 766,
+ WAZA_DAIFEARII = 767,
+ WAZA_DAIDORAGUUN = 768,
+ WAZA_DAISAIKO = 769,
+ WAZA_DAIROKKU = 770,
+ WAZA_DAIAASU = 771,
+ WAZA_DAIAAKU = 772,
+ WAZA_DAISOUGEN = 773,
+ WAZA_DAISUTIRU = 774,
+ WAZA_SOURUBIITO = 775,
+ WAZA_BODHIPURESU = 776,
+ WAZA_DEKOREESYON = 777,
+ WAZA_DORAMUATAKKU = 778,
+ WAZA_TORABASAMI = 779,
+ WAZA_KAENBOORU = 780,
+ WAZA_KYOZYUUZAN = 781,
+ WAZA_KYOZYUUDAN = 782,
+ WAZA_OORAGURUMA = 783,
+ WAZA_WAIDOBUREIKAA = 784,
+ WAZA_EDADUKI = 785,
+ WAZA_OOBAADORAIBU = 786,
+ WAZA_RINGOSAN = 787,
+ WAZA_NYUUTON = 788,
+ WAZA_SOURUKURASSYU = 789,
+ WAZA_WANDAASUTIIMU = 790,
+ WAZA_INOTINOSIZUKU = 791,
+ WAZA_BUROKKINGU = 792,
+ WAZA_DOGEZATUKI = 793,
+ WAZA_SUTAAASARUTO = 794,
+ WAZA_MUGENDAIBIIMU = 795,
+ WAZA_TETTEIKOUSEN = 796,
+ WAZA_WAIDOFOOSU = 797,
+ WAZA_AIANROORAA = 798,
+ WAZA_SUKEIRUSYOTTO = 799,
+ WAZA_METEOBIIMU = 800,
+ WAZA_SHERUAAMUZU = 801,
+ WAZA_MISUTOBAASUTO = 802,
+ WAZA_GURASUSURAIDAA = 803,
+ WAZA_RAIZINGUBORUTO = 804,
+ WAZA_DAITINOHADOU = 805,
+ WAZA_HAIYORUITIGEKI = 806,
+ WAZA_SITTONOHONOO = 807,
+ WAZA_UPPUNBARASI = 808,
+ WAZA_PORUTAAGAISUTO = 809,
+ WAZA_HUSYOKUGASU = 810,
+ WAZA_KOOTINGU = 811,
+ WAZA_KUIKKUTAAN = 812,
+ WAZA_TORIPURUAKUSERU = 813,
+ WAZA_DABURUUINGU = 814,
+ WAZA_NESSANODAITI = 815,
+ WAZA_ZYANGURUHIIRU = 816,
+ WAZA_ANKOKUKYOUDA = 817,
+ WAZA_SUIRYUURENDA = 818,
+ WAZA_SANDAAPURIZUN = 819,
+ WAZA_DORAGONENAZII = 820,
+ WAZA_ITETUKUSISEN = 821,
+ WAZA_MOEAGARUIKARI = 822,
+ WAZA_RAIMEIGERI = 823,
+ WAZA_BURIZAADORANSU = 824,
+ WAZA_ASUTORARUBITTO = 825,
+ WAZA_BUKIMINAZYUMON = 826,
+ WAZA_FEITARUKUROO = 827,
+ WAZA_BARIAARASSYU = 828,
+ WAZA_PAWAASIHUTO = 829,
+ WAZA_GANSEKIAKKUSU = 830,
+ WAZA_HARUNOARASI = 831,
+ WAZA_SINPINOTIKARA = 832,
+ WAZA_DAIHUNGEKI = 833,
+ WAZA_WHEEBUTAKKURU = 834,
+ WAZA_KUROROBURASUTO = 835,
+ WAZA_HYOUZANOROSI = 836,
+ WAZA_SYOURINOMAI = 837,
+ WAZA_BUTIKAMASI = 838,
+ WAZA_DOKUBARISENBON = 839,
+ WAZA_OORAUINGU = 840,
+ WAZA_URAMITURAMI = 841,
+ WAZA_TATEKOMORU = 842,
+ WAZA_3BONNOYA = 843,
+ WAZA_HYAKKIYAKOU = 844,
+ WAZA_HIKENTIENAMI = 845,
+ WAZA_KOGARASIARASI = 846,
+ WAZA_KAMINARIARASI = 847,
+ WAZA_NESSANOARASI = 848,
+ WAZA_MIKADUKINOINORI = 849,
+ WAZA_BUREIBUTYAAZI = 850,
+ WAZA_TERABAASUTO = 851,
+ WAZA_SUREDDOTORAPPU = 852,
+ WAZA_KAKATOOTOSI = 853,
+ WAZA_OHAKAMAIRI = 854,
+ WAZA_RUMINAKORIZYON = 855,
+ WAZA_ITTYOUAGARI = 856,
+ WAZA_JETTOPANTI = 857,
+ WAZA_HABANEROEKISU = 858,
+ WAZA_HOIIRUSUPIN = 859,
+ WAZA_NEZUMIZAN = 860,
+ WAZA_AISUSUPINAA = 861,
+ WAZA_KYOKENTOTUGEKI = 862,
+ WAZA_SAIKINOINORI = 863,
+ WAZA_SIODUKE = 864,
+ WAZA_TORIPURUDAIBU = 865,
+ WAZA_KARUKANSUPIN = 866,
+ WAZA_UTUSIE = 867,
+ WAZA_MIWOKEZURU = 868,
+ WAZA_DOGEZAN = 869,
+ WAZA_TORIKKUHURAWAA = 870,
+ WAZA_HUREASONGU = 871,
+ WAZA_AKUASUTEPPU = 872,
+ WAZA_REIZINGUBURU = 873,
+ WAZA_GOORUDORASSYU = 874,
+ WAZA_SAIKOBUREIDO = 875,
+ WAZA_HAIDOROSUTIIMU = 876,
+ WAZA_KATASUTOROFII = 877,
+ WAZA_AKUSERUBUREIKU = 878,
+ WAZA_INAZUMADORAIBU = 879,
+ WAZA_SIPPOKIRI = 880,
+ WAZA_SAMUIGYAGU = 881,
+ WAZA_OKATADUKE = 882,
+ WAZA_YUKIGESIKI = 883,
+ WAZA_TOBITUKU = 884,
+ WAZA_KUSAWAKE = 885,
+ WAZA_HIYAMIZU = 886,
+ WAZA_HAIPAADORIRU = 887,
+ WAZA_TUINBIIMU = 888,
+ WAZA_HUNDONOKOBUSI = 889,
+ WAZA_AAMAAKYANON = 890,
+ WAZA_MUNENNOTURUGI = 891,
+ WAZA_DENKOUSOUGEKI = 892,
+ WAZA_GIGAHANMAA = 893,
+ WAZA_HOUHUKU = 894,
+ WAZA_AKUAKATTAA = 895,
+ WAZA_MOOBIRUKOUGEKI = 896,
+ WAZA_MOOBIRUKOUGEKI2 = 897,
+ WAZA_MOOBIRUKOUGEKI3 = 898,
+ WAZA_MOOBIRUKOUGEKI4 = 899,
+ WAZA_MOOBIRUKOUGEKI5 = 900,
+ WAZA_BURADDOMUN = 901,
+ WAZA_SHAKASHAKAHO = 902,
+ WAZA_MITSUAMEKOTO = 903,
+ WAZA_ONIKANABOO = 904,
+ WAZA_TYOUDENGIHOU = 905,
+ WAZA_TERAKURASUTAA = 906,
+ WAZA_KIMAGUREEZAA = 907,
+ WAZA_KAZANNOFURIRU = 908,
+ WAZA_SEITENHEKIREKI = 909,
+ WAZA_ROKKUKUREIMOA = 910,
+ WAZA_METARUSXYOOTERU = 911,
+ WAZA_HAADOPURESU = 912,
+ WAZA_WOOKURAI = 913,
+ WAZA_TENSHINOSOPURANO = 914,
+ WAZA_YAKETUPATI = 915,
+ WAZA_INAZUMADAIBU = 916,
+ WAZA_SAIKONOIZU = 917,
+ WAZA_HAYATEGAESHI = 918,
+ WAZA_KUSARIENN = 919,
+ WAZA_MUNIKISUHIKARI = 920,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/WazaList.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/WazaList.fbs
new file mode 100644
index 00000000..74ee1713
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/WazaList.fbs
@@ -0,0 +1,10 @@
+include "../Shared/WazaID.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table WazaList {
+ Waza1:WazaID;
+ Waza2:WazaID;
+ Waza3:WazaID;
+ Waza4:WazaID;
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/WazaType.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/WazaType.fbs
new file mode 100644
index 00000000..b3f826ea
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/WazaType.fbs
@@ -0,0 +1,6 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum WazaType : int {
+ DEFAULT = 0,
+ MANUAL = 1,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/ZARank.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/ZARank.fbs
new file mode 100644
index 00000000..3e6ef669
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/ZARank.fbs
@@ -0,0 +1,32 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum ZARank : byte {
+ NONE = 0,
+ Z = 1,
+ Y = 2,
+ X = 3,
+ W = 4,
+ V = 5,
+ U = 6,
+ T = 7,
+ S = 8,
+ R = 9,
+ Q = 10,
+ P = 11,
+ O = 12,
+ N = 13,
+ M = 14,
+ L = 15,
+ K = 16,
+ J = 17,
+ I = 18,
+ H = 19,
+ G = 20,
+ F = 21,
+ E = 22,
+ D = 23,
+ C = 24,
+ B = 25,
+ A = 26,
+ Infinite = 27,
+}
diff --git a/FlatBuffers/ZA/Shared/Schemas/Shared/ZoneInfo.fbs b/FlatBuffers/ZA/Shared/Schemas/Shared/ZoneInfo.fbs
new file mode 100644
index 00000000..65cceb9d
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/Schemas/Shared/ZoneInfo.fbs
@@ -0,0 +1,6 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table ZoneInfo {
+ ZoneId:string;
+ VariationId:string;
+}
diff --git a/FlatBuffers/ZA/Shared/pkNX.Structures.FlatBuffers.ZA.Shared.csproj b/FlatBuffers/ZA/Shared/pkNX.Structures.FlatBuffers.ZA.Shared.csproj
new file mode 100644
index 00000000..35e3d842
--- /dev/null
+++ b/FlatBuffers/ZA/Shared/pkNX.Structures.FlatBuffers.ZA.Shared.csproj
@@ -0,0 +1,2 @@
+
+
diff --git a/FlatBuffers/ZA/Trainers/Schemas/MedalRateDefeatBonusArray.fbs b/FlatBuffers/ZA/Trainers/Schemas/MedalRateDefeatBonusArray.fbs
new file mode 100644
index 00000000..0020477c
--- /dev/null
+++ b/FlatBuffers/ZA/Trainers/Schemas/MedalRateDefeatBonusArray.fbs
@@ -0,0 +1,13 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table MedalRateDefeatBonus {
+ NumTrainersDefeated:uint;
+ Multiplier:float;
+}
+
+table MedalRateDefeatBonusArray (fs_serializer) {
+ Table:[MedalRateDefeatBonus] (required);
+}
+
+root_type MedalRateDefeatBonusArray;
diff --git a/FlatBuffers/ZA/Trainers/Schemas/NpcAssetDataDBArray.fbs b/FlatBuffers/ZA/Trainers/Schemas/NpcAssetDataDBArray.fbs
new file mode 100644
index 00000000..f221f3e8
--- /dev/null
+++ b/FlatBuffers/ZA/Trainers/Schemas/NpcAssetDataDBArray.fbs
@@ -0,0 +1,22 @@
+include "Shared/ActivationCondition.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table NpcInfo {
+ ObjectTemplateId:int;
+ Name:string;
+ Gender:uint;
+ ActivationConditionArray:[ActivationCondition];
+}
+
+table NpcAssetData {
+ AssetId:string (required);
+ NpcInfoList:[NpcInfo] (required);
+}
+
+table NpcAssetDataDBArray (fs_serializer) {
+ Table:[NpcAssetData] (required);
+}
+
+root_type NpcAssetDataDBArray;
diff --git a/FlatBuffers/ZA/Trainers/Schemas/TrDataMainArray.fbs b/FlatBuffers/ZA/Trainers/Schemas/TrDataMainArray.fbs
new file mode 100644
index 00000000..1c1e3c94
--- /dev/null
+++ b/FlatBuffers/ZA/Trainers/Schemas/TrDataMainArray.fbs
@@ -0,0 +1,42 @@
+include "PokeData/PokeDataBattle.fbs";
+include "Shared/BattleType.fbs";
+include "Shared/DataType.fbs";
+include "Shared/ZARank.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table TrDataMain {
+ TrId:string (required);
+ TrType:ulong;
+ TrType2:ulong;
+ ZARank:ZARank;
+ MoneyRate:ubyte;
+ MegEvolution:bool;
+ LastHandMega:bool;
+ Poke1:PokeDataBattle (required);
+ Poke2:PokeDataBattle (required);
+ Poke3:PokeDataBattle (required);
+ Poke4:PokeDataBattle (required);
+ Poke5:PokeDataBattle (required);
+ Poke6:PokeDataBattle (required);
+ AiBasic:bool;
+ AiHigh:bool;
+ AiExpert:bool;
+ AiDouble:bool;
+ AiRaid:bool;
+ AiWeak:bool;
+ AiItem:bool;
+ AiChange:bool;
+ ViewHorizontalAngle:float;
+ ViewVerticalAngle:float;
+ ViewRange:float;
+ HearingRange:float;
+}
+
+table TrDataMainArray (fs_serializer) {
+ Table:[TrDataMain] (required);
+}
+
+root_type TrDataMainArray;
diff --git a/FlatBuffers/ZA/Trainers/Schemas/TrainerBattleDataGlobal.fbs b/FlatBuffers/ZA/Trainers/Schemas/TrainerBattleDataGlobal.fbs
new file mode 100644
index 00000000..657cf3c9
--- /dev/null
+++ b/FlatBuffers/ZA/Trainers/Schemas/TrainerBattleDataGlobal.fbs
@@ -0,0 +1,38 @@
+include "Shared/ActivationCondition.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table TrainerBattleDetail {
+ Type:string (required);
+ ActivationConditionArray:[ActivationCondition] (required);
+}
+
+table TrainerBattleData {
+ Type:string (required);
+ TrainerBattleID:string;
+ NPCAssetID:string;
+ Field03:string;
+ Field04:string;
+ Field05:string;
+ Field06:string;
+ Field07:string;
+ Field08:string;
+ Field09:string;
+ Field10:string;
+ Field11:string;
+ Field12:string;
+ Field13:uint;
+ TrainerLoseText:string;
+ Field15:string;
+ Field16:string;
+ Field17:string;
+ Field18:string;
+ Field19:[TrainerBattleDetail] (required);
+}
+
+table TrainerBattleGlobalDBArray (fs_serializer) {
+ Table:[TrainerBattleData] (required);
+}
+
+root_type TrainerBattleGlobalDBArray;
diff --git a/FlatBuffers/ZA/Trainers/Schemas/TrainerBodySize.fbs b/FlatBuffers/ZA/Trainers/Schemas/TrainerBodySize.fbs
new file mode 100644
index 00000000..e48b2009
--- /dev/null
+++ b/FlatBuffers/ZA/Trainers/Schemas/TrainerBodySize.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum TrainerBodySize : int {
+ S = 0,
+ M = 1,
+ L = 2,
+ LL = 3,
+}
diff --git a/FlatBuffers/ZA/Trainers/Schemas/TrainerCategory.fbs b/FlatBuffers/ZA/Trainers/Schemas/TrainerCategory.fbs
new file mode 100644
index 00000000..3e5b5c7f
--- /dev/null
+++ b/FlatBuffers/ZA/Trainers/Schemas/TrainerCategory.fbs
@@ -0,0 +1,6 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum TrainerCategory : byte {
+ NORMAL = 0,
+ GYM_LEADER = 1,
+}
diff --git a/FlatBuffers/ZA/Trainers/Schemas/TrainerEnvArray.fbs b/FlatBuffers/ZA/Trainers/Schemas/TrainerEnvArray.fbs
new file mode 100644
index 00000000..c2bcc7ad
--- /dev/null
+++ b/FlatBuffers/ZA/Trainers/Schemas/TrainerEnvArray.fbs
@@ -0,0 +1,88 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+enum CheckCategory : int
+{
+ TurnCheck = 0,
+ PokemonCheck = 1,
+ FirstDamage = 2,
+ HpCheck = 3,
+ WazaCheck = 4,
+ TurnEndCheck = 5,
+ WazaAdvantageCheck = 6,
+ WazaNoneCheck = 7,
+ WazaCriticalCheck = 8,
+ WeatherCheck = 9,
+ StartCheck = 10,
+ SelectActionCheck = 11,
+ PokemonIDCheck = 12,
+ UseItem = 13,
+ ChengeGem = 14,
+ TurnEndAndGemStartCheck = 15,
+ TurnEndAndPokemonDownCheck = 16,
+ TurnEndAndHpCheck = 17,
+ TurnEndAndWazaAdvantageCheck = 18,
+ TurnEndAndTurnCount = 19,
+ WazaDisadvantageCheck = 20,
+ WazaAdvantageAttackCheck = 21,
+}
+
+enum TalkRankEffect : uint
+{
+ None = 0,
+ Attack = 1,
+ Defence = 2,
+ SpAttack = 3,
+ SpDefence = 4,
+ Agility = 5,
+ Hit = 6,
+ Avoid = 7,
+ CriticalRaito = 8,
+ Multi5 = 9,
+ Attack_SpAttack = 11,
+ Defence_SpDefence = 12,
+ Attack2 = 13,
+ SpAttack2 = 14,
+}
+
+table TalkData {
+ EventName:string (required);
+ Category:CheckCategory;
+ ValueA:int;
+ ValueB:int;
+ ValueC:int;
+ RankEffect:TalkRankEffect;
+}
+
+table TrainerEnv {
+ TrEnvId:string (required);
+ TalkData1:TalkData (required);
+ TalkData2:TalkData (required);
+ TalkData3:TalkData (required);
+ TalkData4:TalkData (required);
+ TalkData5:TalkData (required);
+ TalkData6:TalkData (required);
+ TalkData7:TalkData (required);
+ TalkData8:TalkData (required);
+ TalkData9:TalkData (required);
+ TalkData10:TalkData (required);
+ TalkData11:TalkData;
+ TalkData12:TalkData;
+ TalkData13:TalkData;
+ TalkData14:TalkData;
+ TalkData15:TalkData;
+ IntroTml:string (required);
+ ThrowTml:string (required);
+ CameraObjectName:string (required);
+ LoseTml:string (required);
+ IntroObjectName:string (required);
+ LoseObjectName:string (required);
+ BgmEventName:string (required);
+}
+
+table TrainerEnvArray (fs_serializer) {
+ Table:[TrainerEnv] (required);
+}
+
+root_type TrainerEnvArray;
diff --git a/FlatBuffers/ZA/Trainers/Schemas/TrainerTypeArray.fbs b/FlatBuffers/ZA/Trainers/Schemas/TrainerTypeArray.fbs
new file mode 100644
index 00000000..a5c2cc4b
--- /dev/null
+++ b/FlatBuffers/ZA/Trainers/Schemas/TrainerTypeArray.fbs
@@ -0,0 +1,28 @@
+include "Shared/Sex.fbs";
+include "TrainerCategory.fbs";
+include "TrainerBodySize.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table TrainerType {
+ NameLabel:string (required);
+ MsgLabel:string (required);
+ Sex:Sex;
+ Category:TrainerCategory;
+ IntroTml:string (required);
+ ThrowTml:string (required);
+ CameraObjectName:string (required);
+ LoseTml:string (required);
+ IntroObjectName:string (required);
+ LoseObjectName:string (required);
+ BGMEventName:string (required);
+ TrainerBodySize:TrainerBodySize;
+}
+
+table TrainerTypeArray (fs_serializer) {
+ Table:[TrainerType] (required);
+}
+
+root_type TrainerTypeArray;
diff --git a/FlatBuffers/ZA/Trainers/pkNX.Structures.FlatBuffers.ZA.Trainers.csproj b/FlatBuffers/ZA/Trainers/pkNX.Structures.FlatBuffers.ZA.Trainers.csproj
new file mode 100644
index 00000000..35e3d842
--- /dev/null
+++ b/FlatBuffers/ZA/Trainers/pkNX.Structures.FlatBuffers.ZA.Trainers.csproj
@@ -0,0 +1,2 @@
+
+
diff --git a/FlatBuffers/ZA/Trinity/Archive/TrinityFileDescriptors.cs b/FlatBuffers/ZA/Trinity/Archive/TrinityFileDescriptors.cs
new file mode 100644
index 00000000..a7cabd87
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Archive/TrinityFileDescriptors.cs
@@ -0,0 +1,38 @@
+using System.Diagnostics;
+
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+
+public partial class TrinityFileDescriptors
+{
+ public ulong GetSubFileIndex(ulong hash)
+ {
+ var index = BinarySearch(hash);
+ Debug.Assert((uint)index < SubFileHashes.Count);
+ return SubFileInfos[index].Index;
+ }
+
+ public bool GetHasSubFile(ulong hash)
+ {
+ var index = BinarySearch(hash);
+ return index >= 0;
+ }
+
+ private int BinarySearch(ulong hash)
+ {
+ var arr = SubFileHashes;
+ var lo = 0;
+ var hi = arr.Count - 1;
+ while (lo <= hi)
+ {
+ var mid = lo + (hi - lo >> 1);
+ var midVal = arr[mid];
+ if (midVal < hash)
+ lo = mid + 1;
+ else if (midVal > hash)
+ hi = mid - 1;
+ else
+ return mid;
+ }
+ return -1;
+ }
+}
diff --git a/FlatBuffers/ZA/Trinity/Archive/TrinityFileSystemManager.cs b/FlatBuffers/ZA/Trinity/Archive/TrinityFileSystemManager.cs
new file mode 100644
index 00000000..80d10ff0
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Archive/TrinityFileSystemManager.cs
@@ -0,0 +1,99 @@
+using System.Diagnostics;
+using FlatSharp;
+using pkNX.Containers;
+
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+
+///
+/// Wrapper object that extracts raw data from a Trinity Pack Filesystem file.
+///
+public sealed class TrinityFileSystemManager : IDisposable, IFileInternal
+{
+ private readonly BinaryReader Reader;
+ private readonly TrinityFileDescriptors FileData;
+ private readonly TrinityFileSystemMetadata Meta;
+ public const ulong MAGIC_ONEPACK = 0x004B4341_50454E4F; // ONEPACK\x00
+
+ public TrinityFileSystemManager(string pathFs, string pathFd)
+ {
+ var trpfs = File.OpenRead(pathFs); // DO NOT DISPOSE UNTIL THIS OBJECT IS DISPOSED
+ var br = new BinaryReader(trpfs);
+ var totalLength = br.BaseStream.Length;
+
+ // Read the trpfs meta -- check the file header first.
+ var magic = br.ReadUInt64();
+ Debug.Assert(magic == MAGIC_ONEPACK);
+
+ // Locate the meta FlatBuffer
+ var ofsMetaFB = br.ReadInt64();
+ br.BaseStream.Seek(ofsMetaFB, SeekOrigin.Begin);
+
+ // Extract the meta FlatBuffer
+ var dataMetaFB = br.ReadBytes((int)(totalLength - ofsMetaFB));
+ var meta = TrinityFileSystemMetadata.Serializer.Parse(dataMetaFB, FlatBufferDeserializationOption.GreedyMutable);
+
+ // Read the trpfd
+ var dataFd = File.ReadAllBytes(pathFd);
+ var fd = TrinityFileDescriptors.Serializer.Parse(dataFd, FlatBufferDeserializationOption.GreedyMutable);
+ Debug.Assert(meta.FileHashes.Count == fd.FileInfos.Count);
+
+ Reader = br;
+ FileData = fd;
+ Meta = meta;
+ }
+
+ public void Dispose()
+ {
+ Reader.Dispose();
+ }
+
+ public int FileCount => FileData.FilePaths.Count;
+ public string GetPackPath(int packIndex) => FileData.FilePaths[packIndex];
+
+ public byte[] GetData(ulong offset, ulong length)
+ {
+ Reader.BaseStream.Seek((long)offset, SeekOrigin.Begin);
+ return Reader.ReadBytes((int)length);
+ }
+
+ public void GetData(ulong offset, ulong length, Span data)
+ {
+ Reader.BaseStream.Seek((long)offset, SeekOrigin.Begin);
+ _ = Reader.Read(data[..(int)length]);
+ }
+
+ public TrinityPak GetPak(int index)
+ {
+ var data = GetPakData(index);
+ return TrinityPak.Serializer.Parse(data, FlatBufferDeserializationOption.GreedyMutable);
+ }
+
+ public ulong GetPakHash(int index) => FnvHash.HashFnv1a_64(GetPackPath(index));
+ public ulong GetPakLength(int index) => FileData.FileInfos[index].FileSize;
+ public ulong GetPakOffset(ulong hash) => Meta.GetFileOffset(hash);
+
+ public byte[] GetPakData(int index)
+ {
+ var size = GetPakLength(index);
+ var hash = GetPakHash(index);
+ var offset = GetPakOffset(hash);
+ return GetData(offset, size);
+ }
+
+ public byte[] GetPackedFile(ulong hash)
+ {
+ var index = FileData.GetSubFileIndex(hash);
+ var pak = GetPak((int)index);
+ var file = pak.GetFileData(hash);
+ return file.Decompress();
+ }
+
+ public byte[] GetPackedFile(string path) => GetPackedFile(FnvHash.HashFnv1a_64(path));
+ public bool HasFile(string path) => HasFile(FnvHash.HashFnv1a_64(path));
+ public bool HasFile(ulong hash)
+ {
+ if (Meta.HasFile(hash))
+ return true;
+ return FileData.GetHasSubFile(hash);
+ }
+}
diff --git a/FlatBuffers/ZA/Trinity/Archive/TrinityFileSystemMetadata.cs b/FlatBuffers/ZA/Trinity/Archive/TrinityFileSystemMetadata.cs
new file mode 100644
index 00000000..7d17092a
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Archive/TrinityFileSystemMetadata.cs
@@ -0,0 +1,33 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+
+public partial class TrinityFileSystemMetadata
+{
+ public ulong GetFileOffset(ulong hashFnv)
+ {
+ var index = BinarySearch(hashFnv);
+ if (index < 0)
+ throw new ArgumentException(null, nameof(hashFnv));
+ return FileOffsets[index];
+ }
+
+ public bool HasFile(ulong hashFnv) => BinarySearch(hashFnv) >= 0;
+
+ private int BinarySearch(ulong hash)
+ {
+ var arr = FileHashes;
+ var lo = 0;
+ var hi = arr.Count - 1;
+ while (lo <= hi)
+ {
+ var mid = lo + (hi - lo >> 1);
+ var midVal = arr[mid];
+ if (midVal < hash)
+ lo = mid + 1;
+ else if (midVal > hash)
+ hi = mid - 1;
+ else
+ return mid;
+ }
+ return -1;
+ }
+}
diff --git a/FlatBuffers/ZA/Trinity/Archive/TrinityPak.cs b/FlatBuffers/ZA/Trinity/Archive/TrinityPak.cs
new file mode 100644
index 00000000..571d55c5
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Archive/TrinityPak.cs
@@ -0,0 +1,72 @@
+using pkNX.Containers;
+using System.Diagnostics;
+
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+
+public partial class TrinityPak
+{
+ public TrinityPakFileData GetFileData(ulong hash)
+ {
+ var index = BinarySearch(hash);
+ Debug.Assert((uint)index < Hashes.Count);
+ return Files[index];
+ }
+
+ private int BinarySearch(ulong hash)
+ {
+ var arr = Hashes;
+ var lo = 0;
+ var hi = arr.Count - 1;
+ while (lo <= hi)
+ {
+ var mid = lo + (hi - lo >> 1);
+ var midVal = arr[mid];
+ if (midVal < hash)
+ lo = mid + 1;
+ else if (midVal > hash)
+ hi = mid - 1;
+ else
+ return mid;
+ }
+ return -1;
+ }
+}
+
+public partial class TrinityPakFileData
+{
+ public byte[] Decompress() => CompressionType switch
+ {
+ DataCompressionType.None => Data.ToArray(), // Uncompressed
+ DataCompressionType.Zlib => Zlib.Decompress(Data.Span, (int)UncompressedSize),
+ DataCompressionType.Lz4 => LZ4.Decode(Data.Span, (int)UncompressedSize),
+ >= DataCompressionType.OodleKraken and <= DataCompressionType.OodleHydra => Oodle.Decompress(Data.Span, (long)UncompressedSize)!, // Oodle
+ _ => throw new ArgumentException($"Unknown compression type {CompressionType}"),
+ };
+
+ public void DecompressTo(Span result)
+ {
+ if (CompressionType == DataCompressionType.None)
+ Data.Span.CopyTo(result); // Uncompressed
+ else if (CompressionType == DataCompressionType.Zlib)
+ Zlib.Decompress(Data.Span, result);
+ else if (CompressionType == DataCompressionType.Lz4)
+ LZ4.Decode(Data.Span, result);
+ else if (CompressionType is >= DataCompressionType.OodleKraken and <= DataCompressionType.OodleHydra)
+ Oodle.TryDecompress(Data.Span, result, out _);
+ else
+ throw new ArgumentException($"Unknown compression type {CompressionType}");
+ }
+
+ public static ReadOnlySpan Compress(ReadOnlySpan data, DataCompressionType type, OodleCompressionLevel level = OodleCompressionLevel.Optimal2) => type switch
+ {
+ DataCompressionType.None => data,
+ DataCompressionType.Zlib => Zlib.Compress(data),
+ DataCompressionType.Lz4 => LZ4.Encode(data),
+ DataCompressionType.OodleKraken => Oodle.Compress(data, out _, OodleFormat.Kraken, level),
+ DataCompressionType.OodleLeviathan => Oodle.Compress(data, out _, OodleFormat.Leviathan, level),
+ DataCompressionType.OodleMermaid => Oodle.Compress(data, out _, OodleFormat.Mermaid, level),
+ DataCompressionType.OodleSelkie => Oodle.Compress(data, out _, OodleFormat.Selkie, level),
+ DataCompressionType.OodleHydra => Oodle.Compress(data, out _, OodleFormat.Hydra, level),
+ _ => throw new NotImplementedException($"Compression type {type} is not implemented."),
+ };
+}
diff --git a/FlatBuffers/ZA/Trinity/Archive/TrinityPakExtractor.cs b/FlatBuffers/ZA/Trinity/Archive/TrinityPakExtractor.cs
new file mode 100644
index 00000000..ba0fe648
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Archive/TrinityPakExtractor.cs
@@ -0,0 +1,106 @@
+using System.Buffers;
+using pkNX.Containers;
+
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+
+public static class TrinityPakExtractor
+{
+ public const string DumpArchiveExtracted = "extracted";
+ private const string DumpArchivePak = "paks";
+
+ public static void DumpArchives(string pathRomFS, string dirRootDump)
+ {
+ var pathFs = Path.Combine(pathRomFS, "arc", "data.trpfs");
+ var pathFd = Path.Combine(pathRomFS, "arc", "data.trpfd");
+ var reader = new TrinityFileSystemManager(pathFs, pathFd);
+ Extract(dirRootDump, reader);
+ reader.Dispose();
+ }
+
+ private static void Extract(string dirRoot, TrinityFileSystemManager manager)
+ {
+ Directory.CreateDirectory(dirRoot);
+
+ var dirPak = Path.Combine(dirRoot, DumpArchivePak);
+ Directory.CreateDirectory(dirPak);
+
+ var dirExtract = Path.Combine(dirRoot, DumpArchiveExtracted);
+ Directory.CreateDirectory(dirExtract);
+
+ var count = manager.FileCount;
+ for (var i = 0; i < count; i++)
+ ExportArc(manager, i, dirPak, dirExtract);
+ }
+
+ private static void ExportArc(TrinityFileSystemManager reader, int packIndex, string dirPak, string dirExtract)
+ {
+ var pool = ArrayPool.Shared;
+ var hash = reader.GetPakHash(packIndex);
+ var length = reader.GetPakLength(packIndex);
+ var offset = reader.GetPakOffset(hash);
+ var rent = pool.Rent((int)length);
+ var data = rent.AsMemory(0, (int)length);
+ try
+ {
+ reader.GetData(offset, length, data.Span);
+ var packFilePath = reader.GetPackPath(packIndex);
+ ExportPackFile(data.Span, dirPak, packFilePath);
+ ExportPackExtract(data, dirExtract, packFilePath);
+ }
+ finally
+ {
+ data.Span.Clear();
+ pool.Return(rent);
+ }
+ }
+
+ private static void ExportPackFile(ReadOnlySpan data, string dir, string pakFilePath)
+ {
+ var fileName = Path.Combine(dir, pakFilePath);
+ var dirName = Path.GetDirectoryName(fileName);
+ if (string.IsNullOrEmpty(dirName))
+ throw new Exception($"{fileName} directory name is null");
+ Directory.CreateDirectory(dirName);
+
+ File.WriteAllBytes(fileName, data);
+ }
+
+ private static void ExportPackExtract(Memory data, string dir, string pakFilePath)
+ {
+ var folder = Path.Combine(dir, pakFilePath);
+ Directory.CreateDirectory(folder);
+ var obj = FlatBufferConverter.DeserializeFrom(data);
+ ExtractPack(obj, folder);
+ }
+
+ private static void ExtractPack(TrinityPak trpak, string dir)
+ {
+ for (var i = 0; i < trpak.Files.Count; i++)
+ WriteFile(trpak.Files[i], trpak.Hashes[i], dir, i);
+ }
+
+ private static void WriteFile(TrinityPakFileData file, ulong hash, string dir, int fileIndex)
+ {
+ if (file.CompressionType is DataCompressionType.None)
+ {
+ WriteFile(file.Data.Span, hash, dir, fileIndex);
+ return;
+ }
+
+ var pool = ArrayPool.Shared;
+ var length = (int)file.UncompressedSize;
+ var rent = pool.Rent(length);
+ var decompressed = rent.AsSpan(0, length);
+ file.DecompressTo(decompressed);
+ WriteFile(decompressed, hash, dir, fileIndex);
+ decompressed.Clear();
+ pool.Return(rent);
+ }
+
+ private static void WriteFile(ReadOnlySpan decompressed, ulong hash, string dir, int fileIndex)
+ {
+ var ext = TrinityUtil.GuessExtension(decompressed);
+ var filepath = Path.Combine(dir, $"{fileIndex:0000} - {hash:X16}.{ext}");
+ File.WriteAllBytes(filepath, decompressed);
+ }
+}
diff --git a/FlatBuffers/ZA/Trinity/Scene/SceneDumper.cs b/FlatBuffers/ZA/Trinity/Scene/SceneDumper.cs
new file mode 100644
index 00000000..07f7e45c
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Scene/SceneDumper.cs
@@ -0,0 +1,526 @@
+using pkNX.Containers;
+
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+
+public static class SceneDumper
+{
+ private const char PadChar = '\t';
+ private static void Write(TextWriter tw, int depth, string str) => tw.WriteLine(new string(PadChar, depth) + str);
+
+ public static string Bucket { get; set; } = "";
+ public static string BucketError { get; set; } = "";
+ public static bool ThrowOnUnknownType { get; set; } = false;
+
+ public static TrinitySceneObjectTemplate Dump(string path) => Dump(path, Console.Out);
+
+ public static TrinitySceneObjectTemplate Dump(string path, TextWriter tw)
+ {
+ var data = File.ReadAllBytes(path);
+ var scene = FlatBufferConverter.DeserializeFrom(data);
+ Dump(scene, tw);
+ return scene;
+ }
+
+ private static void Dump(TrinitySceneObjectTemplate scene, TextWriter tw)
+ {
+ const int depth = 0;
+ Dump(scene, tw, depth);
+ foreach (var obj in scene.Objects)
+ Dump(obj, tw, depth + 1);
+ }
+
+ private static void Dump(TrinitySceneObjectTemplateEntry scene, TextWriter tw, int depth)
+ {
+ Dump(scene.Data, scene.Type, tw, depth);
+ Dump(scene.SubObjects, tw, depth);
+ }
+
+ private static void Dump(IList arr, TextWriter tw, int depth)
+ {
+ foreach (var obj in arr)
+ {
+ Dump(obj.Data, obj.Type, tw, depth + 1);
+ Dump(obj.SubObjects, tw, depth + 1);
+ }
+ }
+
+ private static void Dump(TrinitySceneObjectTemplate scene, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(scene.ObjectTemplateName)}: {scene.ObjectTemplateName} ({FnvHash.HashFnv1a_64(scene.ObjectTemplateName):X16})");
+ Write(tw, depth, $"{nameof(scene.Field02)}: {scene.Field02}");
+ Write(tw, depth, $"{nameof(scene.Field03)}: {scene.Field03}");
+ Dump(scene.Field05, tw, depth, nameof(scene.Field05));
+ Write(tw, depth, $"{nameof(scene.Objects)}: {scene.Objects.Count}");
+ }
+
+ private static void AddToBucket(Span data, string type, string bucket)
+ {
+ var hash = FnvHash.HashFnv1a_64(data);
+ var dir = Path.Combine(bucket, type);
+ var path = Path.Combine(dir, hash.ToString("X16"));
+ Directory.CreateDirectory(dir);
+ File.WriteAllBytes(path, data.ToArray());
+ }
+
+ private static void Dump(Memory data, string type, TextWriter tw, int depth)
+ {
+ const string UnknownType = "Unknown Type";
+ Write(tw, depth++, type);
+ try
+ {
+ switch (type)
+ {
+ case "SubScene": DumpSubScene(data, tw, depth); break;
+ case "trinity_PropertySheet": DumpPropertySheet(data, tw, depth); break;
+ case "trinity_SceneObject": DumpSceneObject(data, tw, depth); break;
+ case "trinity_ScenePoint": DumpScenePoint(data, tw, depth); break;
+ case "trinity_ObjectTemplate": DumpObjectTemplate(data, tw, depth); break;
+ case "trinity_ScriptComponent": DumpScriptComponent(data, tw, depth); break;
+ case "trinity_ObjectSwitcher": DumpObjectSwitcher(data, tw, depth); break;
+ case "trinity_ModelComponent": DumpModelComponent(data, tw, depth); break;
+ case "trinity_CollisionComponent": DumpCollisionComponent(data, tw, depth); break;
+ case "trinity_ParticleComponent": DumpParticleComponent(data, tw, depth); break;
+ case "trinity_GroundPlaceComponent": DumpGroundPlaceComponent(data, tw, depth); break;
+ case "ti_AIPerceptualComponent": DumpTIAIPerceptualComponent(data, tw, depth); break;
+ case "ti_ModelDitherFadeComponent": DumpTIModelDitherFadeComponent(data, tw, depth); break;
+ case "ti_DynamicExclusionComponent": DumpTIDynamicExclusionComponent(data, tw, depth); break;
+ case "trinity_CollisionEventTriggerComponent": DumpCollisionEventTriggerComponent(data, tw, depth); break;
+ case "trinity_EnvironmentParameter": DumpTrinityEnvironmentParameter(data, tw, depth); break;
+ case "trinity_OverrideSensorData": DumpTrinityOverrideSensorData(data, tw, depth); break;
+ case "trinity_PlacementRegistry": DumpPlacementRegistry(data, tw, depth); break;
+ default:
+ if (ThrowOnUnknownType)
+ throw new ArgumentOutOfRangeException(nameof(type), type, null);
+ Write(tw, depth, $"{UnknownType}: {type}");
+ break;
+ }
+ }
+ catch (Exception ex) when (!ex.Message.StartsWith(UnknownType))
+ {
+ Write(tw, depth, $"Error Parsing ({ex.GetType().Name}): {ex.Message}");
+ if (BucketError.Length != 0)
+ AddToBucket(data.Span, type, BucketError);
+ }
+ if (Bucket.Length != 0)
+ AddToBucket(data.Span, type, Bucket);
+ }
+
+ private static void DumpPlacementRegistry(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ var entry = props.Entry;
+ Write(tw, depth, $"{entry.Kind}:");
+
+ switch (entry.Kind)
+ {
+ case PlacementEntry.ItemKind.PlacementObjectArray: DumpPlacementObjectArray(entry.PlacementObjectArray, tw, depth); break;
+ case PlacementEntry.ItemKind.PlacementObjectTemplateArray: DumpPlacementObjectTemplateArray(entry.PlacementObjectTemplateArray, tw, depth); break;
+ case PlacementEntry.ItemKind.PlacementPositionArray: DumpPlacementPositionArray(entry.PlacementPositionArray, tw, depth); break;
+ case PlacementEntry.ItemKind.PlacementSpawnerArray: DumpPlacementSpawnerArray(entry.PlacementSpawnerArray, tw, depth); break;
+ default: throw new ArgumentException(nameof(entry));
+ }
+ }
+
+ private static void DumpPlacementObjectArray(PlacementObjectArray value, TextWriter tw, int depth)
+ {
+ var array = value.Table;
+ Write(tw, depth, $"{nameof(array.Count)}: {array.Count}");
+ depth++;
+ foreach (var entry in array)
+ {
+ Write(tw, depth, $"{nameof(entry.Name)}: {entry.Name} ({FnvHash.HashFnv1a_64(entry.Name):X16})");
+ Write(tw, depth, $"{nameof(entry.Type)}: {entry.Type}");
+ Write(tw, depth, $"{nameof(entry.File)}: {entry.File}");
+ }
+ }
+
+ private static void DumpPlacementObjectTemplateArray(PlacementObjectTemplateArray value, TextWriter tw, int depth)
+ {
+ var array = value.Table;
+ Write(tw, depth, $"{nameof(array.Count)}: {array.Count}");
+ depth++;
+ foreach (var entry in array)
+ {
+ Write(tw, depth, $"{nameof(entry.Name)}: {entry.Name} ({FnvHash.HashFnv1a_64(entry.Name):X16})");
+ Write(tw, depth, $"{nameof(entry.Path)}: {entry.Path}");
+ }
+ }
+
+ private static void DumpPlacementPositionArray(PlacementPositionArray value, TextWriter tw, int depth)
+ {
+ var array = value.Table;
+ Write(tw, depth, $"{nameof(array.Count)}: {array.Count}");
+ depth++;
+ foreach (var entry in array)
+ {
+ Write(tw, depth, $"{nameof(entry.Name)}: {entry.Name} ({FnvHash.HashFnv1a_64(entry.Name):X16})");
+ Write(tw, depth, $"{nameof(entry.Position)}: {entry.Position}");
+ Write(tw, depth, $"{nameof(entry.Rotation)}: {entry.Rotation}");
+ if (entry.Arguments is null)
+ Write(tw, depth, "Arguments: null");
+ else
+ Write(tw, depth, $"Arguments: [{string.Join(",", entry.Arguments.Select(GetFormattedArg))}]");
+ }
+ }
+
+ private static void DumpPlacementSpawnerArray(PlacementSpawnerArray value, TextWriter tw, int depth)
+ {
+ var array = value.Table;
+ Write(tw, depth, $"{nameof(array.Count)}: {array.Count}");
+ depth++;
+ foreach (var entry in array)
+ {
+ Write(tw, depth, $"{nameof(entry.Name)}: {entry.Name} ({FnvHash.HashFnv1a_64(entry.Name):X16})");
+ Write(tw, depth, $"{nameof(entry.Scene)}: {entry.Scene}");
+ Write(tw, depth, $"Arguments: {entry.Arguments?.Count}");
+ if (entry.Arguments is null)
+ continue;
+ for (var i = 0; i < entry.Arguments.Count; i++)
+ {
+ var arg = entry.Arguments[i];
+ Write(tw, depth, $"Arg[{i}]:");
+ DumpPlacementRule(tw, depth + 1, arg);
+ }
+ }
+ }
+
+ private static void DumpPlacementRule(TextWriter tw, int depth, PlacementLogic logic)
+ {
+ Write(tw, depth, $"{nameof(logic.Name)}: {logic.Name}");
+ if (logic.Expression is null)
+ return;
+ Write(tw, depth, $"{nameof(logic.Expression)}:");
+ Write(tw, depth + 1, logic.Expression);
+ }
+
+ private static void Write(TextWriter tw, int depth, LogicExpression exp)
+ {
+ if (exp.Root is { } root)
+ {
+ Write(tw, depth, $"{nameof(exp.Root)}:");
+ Write(tw, depth + 1, root);
+ }
+ }
+
+ private static void Write(TextWriter tw, int depth, ExpressionNode node)
+ {
+ Write(tw, depth, $"{node.Kind}:");
+ switch (node.Kind)
+ {
+ case ExpressionNode.ItemKind.ExpressionLeaf:
+ var leaf = node.ExpressionLeaf;
+ Write(tw, depth, $"{nameof(leaf.ConditionName)}: {leaf.ConditionName}");
+ Write(tw, depth, $"{nameof(leaf.Op)}: {leaf.Op}");
+ if (leaf.Arguments is null)
+ Write(tw, depth, "Arguments: null");
+ else
+ Write(tw, depth, $"Arguments: [{string.Join(",", leaf.Arguments.Select(GetFormattedArg))}]");
+
+ break;
+ case ExpressionNode.ItemKind.ExpressionBranch:
+ var branch = node.ExpressionBranch;
+ Write(tw, depth, $"{nameof(branch.Operand)}: {branch.Operand}");
+ if (branch.Left is { } left)
+ {
+ Write(tw, depth, $"{nameof(branch.Left)}:");
+ Write(tw, depth + 1, left);
+ }
+ if (branch.Right is { } right)
+ {
+ Write(tw, depth, $"{nameof(branch.Right)}:");
+ Write(tw, depth + 1, right);
+ }
+
+ break;
+ default:
+ throw new ArgumentException(nameof(node));
+ }
+ }
+
+ private static string GetFormattedArg(string? arg)
+ {
+ if (arg is null)
+ return string.Empty;
+ return $"\"{arg}\"";
+ }
+
+ private static void DumpTrinityOverrideSensorData(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Field00)}: {props.Field00}");
+ Write(tw, depth, $"{nameof(props.Field01)}: {props.Field01}");
+ Write(tw, depth, $"{nameof(props.Field02)}: {props.Field02}");
+ Write(tw, depth, $"{nameof(props.Field03)}: {props.Field03}");
+ }
+
+ private static void DumpTrinityEnvironmentParameter(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Field00)}: {props.Field00}");
+ Write(tw, depth, $"{nameof(props.Field01)}: {props.Field01}");
+ }
+
+ private static void DumpCollisionEventTriggerComponent(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Field00)}: {props.Field00}");
+ Write(tw, depth, $"{nameof(props.Field01)}: {props.Field01}");
+ Write(tw, depth, $"{nameof(props.Field02)}: {props.Field02}");
+ Write(tw, depth, $"{nameof(props.Field03)}: {props.Field03}");
+ Write(tw, depth, $"{nameof(props.Field04)}: {props.Field04}");
+ Write(tw, depth, $"{nameof(props.Field05)}: {props.Field05}");
+ }
+
+ private static void DumpTIDynamicExclusionComponent(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Field00)}: {props.Field00}");
+ }
+
+ private static void DumpTIModelDitherFadeComponent(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Field00)}: {props.Field00}");
+ Write(tw, depth, $"{nameof(props.Field01)}: {props.Field01}");
+ Write(tw, depth, $"{nameof(props.Field02)}: {props.Field02}");
+ Write(tw, depth, $"{nameof(props.Field03)}: {props.Field03}");
+ Write(tw, depth, $"{nameof(props.Field04)}: {props.Field04}");
+ }
+
+ private static void DumpTIAIPerceptualComponent(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Value)}: {props.Value}");
+ }
+
+ private static void DumpGroundPlaceComponent(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Index)}: {props.Index}");
+ }
+
+ private static void DumpParticleComponent(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.ParticleFile)}: {props.ParticleFile}");
+ Write(tw, depth, $"{nameof(props.ParticleName)}: {props.ParticleName}");
+ Write(tw, depth, $"{nameof(props.ParticleParent)}: {props.ParticleParent}");
+ }
+
+ private static void DumpCollisionComponent(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ var shape = props.Component.CollisionComponent.Shape;
+ Write(tw, depth, $"{nameof(props.Component.CollisionComponent.Shape)}: {shape.Kind}");
+ Write(tw, depth, $"v3f: {GetV4F(props.Component.CollisionComponent.Field08)}");
+ depth++;
+ switch (shape.Kind)
+ {
+ case CollisionUnion.ItemKind.Sphere: DumpCollision(shape.Sphere, tw, depth); break;
+ case CollisionUnion.ItemKind.Box: DumpCollision(shape.Box, tw, depth); break;
+ case CollisionUnion.ItemKind.Capsule: DumpCollision(shape.Capsule, tw, depth); break;
+ case CollisionUnion.ItemKind.Havok: DumpCollision(shape.Havok, tw, depth); break;
+ default: throw new ArgumentException(nameof(shape));
+ }
+ }
+
+ private static void DumpModelComponent(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Field00)}: {props.Field00}");
+ Write(tw, depth, $"{nameof(props.Field01)}: {props.Field01}");
+ Write(tw, depth, $"{nameof(props.Field02)}: {props.Field02}");
+ Write(tw, depth, $"{nameof(props.Field03)}: {props.Field03}");
+ Write(tw, depth, $"{nameof(props.Field05)}: {props.Field05}");
+ Write(tw, depth, $"{nameof(props.Field06)}: {props.Field06}");
+ Write(tw, depth, $"{nameof(props.Field07)}: {props.Field07}");
+ Write(tw, depth, $"{nameof(props.Field19)}: {props.Field19}");
+ Write(tw, depth, $"{nameof(props.Field20)}: {props.Field20}");
+ Write(tw, depth, $"{nameof(props.Field21)}: {props.Field21}");
+ Write(tw, depth, $"{nameof(props.Field22)}: {props.Field22}");
+ }
+
+ private static void DumpScriptComponent(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.ScriptFileName)}: {props.ScriptFileName}");
+ Write(tw, depth, $"{nameof(props.ScriptFileNameHash)}: {props.ScriptFileNameHash}");
+ Write(tw, depth, $"{nameof(props.ScriptFileClass)}: {props.ScriptFileClass}");
+ }
+
+ private static void DumpSubScene(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Field00)}: {props.Field00}");
+ Write(tw, depth, $"{nameof(props.Field01)}: {props.Field01}");
+ }
+
+ private static void DumpObjectSwitcher(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Field00)}: {props.Field00}");
+ Write(tw, depth, $"{nameof(props.Field01)}: {props.Field01}");
+ }
+
+ private static void DumpObjectTemplate(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.ObjectTemplateName)}: {props.ObjectTemplateName} ({FnvHash.HashFnv1a_64(props.ObjectTemplateName):X16})");
+ Write(tw, depth, $"{nameof(props.ObjectTemplatePath)}: {props.ObjectTemplatePath}");
+ Write(tw, depth, $"{nameof(props.ObjectTemplateExtra)}: {props.ObjectTemplateExtra}");
+ Write(tw, depth, $"{nameof(props.Field03)}: {props.Field03}");
+ Dump(props.Data, props.Type, tw, ++depth);
+ }
+
+ private static void DumpScenePoint(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Name)}: {props.Name}");
+ Write(tw, depth, $"{nameof(props.Position)}: {props.Position}");
+ Write(tw, depth, $"{nameof(props.Field02)}: {props.Field02}");
+ }
+
+ private static void DumpSceneObject(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Name)}: {props.Name} ({FnvHash.HashFnv1a_64(props.Name):X16})");
+ Write(tw, depth, $"{nameof(props.Position)}:");
+ Dump(props.Position, tw, depth + 1);
+ Write(tw, depth, $"{nameof(props.Field02)}: {props.Field02}");
+ Write(tw, depth, $"{nameof(props.ApplySRT)}: {props.ApplySRT}");
+ Write(tw, depth, $"{nameof(props.Field04)}: {props.Field04}");
+ Write(tw, depth, $"{nameof(props.Field05)}: {props.Field05}");
+ Write(tw, depth, $"{nameof(props.Field06)}: {props.Field06}");
+ Write(tw, depth, $"{nameof(props.Field07)}: {props.Field07}");
+ if (props.Field08 is not null)
+ Dump(props.Field08, tw, depth, nameof(props.Field08));
+ }
+
+ private static void DumpCollision(Sphere shape, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(shape.Transform)}: {GetV3F(shape.Transform)}");
+ Write(tw, depth, $"{nameof(shape.Radius)}: {shape.Radius}");
+ }
+
+ private static void DumpCollision(Box shape, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(shape.Size)}: {GetV3F(shape.Size)}");
+ Write(tw, depth, $"{nameof(shape.Rotation)}: {GetV3F(shape.Rotation)}");
+ Write(tw, depth, $"{nameof(shape.Transform)}: {GetV3F(shape.Transform)}");
+ }
+
+ private static void DumpCollision(Capsule shape, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(shape.Height)}: {shape.Height}");
+ Write(tw, depth, $"{nameof(shape.Radius)}: {shape.Radius}");
+ Write(tw, depth, $"{nameof(shape.Rotation)}: {GetV3F(shape.Rotation)}");
+ Write(tw, depth, $"{nameof(shape.Transform)}: {GetV3F(shape.Transform)}");
+ }
+
+ private static void DumpCollision(Havok shape, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(shape.TrcolFilePath)}: {shape.TrcolFilePath}");
+ Write(tw, depth, $"{nameof(shape.Scale)}: {GetV3F(shape.Scale)}");
+ Write(tw, depth, $"{nameof(shape.Rotation)}: {GetV3F(shape.Rotation)}");
+ Write(tw, depth, $"{nameof(shape.Transform)}: {GetV3F(shape.Transform)}");
+ }
+
+ private static string GetV3F(Vec3f props) => $"({props.X}, {props.Y}, {props.Z})";
+ private static string GetV3F(PackedVec3f props) => $"({props.X}, {props.Y}, {props.Z})";
+ private static string GetV4F(Vec4f props) => $"({props.X}, {props.Y}, {props.Z} @ {props.W})";
+
+ private static void Dump(IList arr, TextWriter tw, int depth, string name)
+ {
+ Write(tw, depth, $"{name}:");
+ for (var i = 0; i < arr.Count; i++)
+ Write(tw, depth + 1, $"[{i}]: {arr[i]}");
+ }
+
+ private static void Dump(SRT p, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(p.Scale)}: {p.Scale}");
+ Write(tw, depth, $"{nameof(p.Rotation)}: {p.Rotation}");
+ Write(tw, depth, $"{nameof(p.Translation)}: {p.Translation}");
+ }
+
+ private static void DumpPropertySheet(Memory data, TextWriter tw, int depth)
+ {
+ var props = FlatBufferConverter.DeserializeFrom(data);
+ Write(tw, depth, $"{nameof(props.Name)}: {props.Name} ({FnvHash.HashFnv1a_64(props.Name):X16})");
+ if (!string.IsNullOrWhiteSpace(props.Extra))
+ Write(tw, depth, $"{nameof(props.Extra)}: {props.Extra}");
+ foreach (var p in props.Properties)
+ {
+ foreach (var f in p.Fields)
+ Dump(f, tw, depth + 1);
+ }
+ }
+
+ private static void Dump(TrinityPropertySheetField f, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(f.Name)}: {f.Name}");
+ //Write(tw, depth, $"{nameof(f.Data.Discriminator)}: {f.Data.Discriminator}");
+ Dump(f.Data, tw, depth);
+ }
+
+ private static void Dump(TrinityPropertySheetValue v, TextWriter tw, int depth)
+ {
+ switch (v.Discriminator)
+ {
+ case 1: Dump(v.Item1, tw, depth); break;
+ case 2: Dump(v.Item2, tw, depth); break;
+ case 3: Dump(v.Item3, tw, depth); break;
+ case 4: Dump(v.Item4, tw, depth); break;
+ case 5: Dump(v.Item5, tw, depth); break;
+ case 6: Dump(v.Item6, tw, depth); break;
+ case 7: Dump(v.Item7, tw, depth); break;
+ case 8: Dump(v.Item8, tw, depth); break;
+ case 9: Dump(v.Item9, tw, depth); break;
+ default: throw new ArgumentOutOfRangeException(nameof(v.Discriminator), v.Discriminator, null);
+ }
+ }
+
+ private static void Dump(TrinityPropertySheetField1 item, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(item.Value)}: {item.Value}");
+ //Write(tw, depth, $"{nameof(item.FieldType)}: {item.FieldType}");
+ }
+
+ private static void Dump(TrinityPropertySheetField2 item, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(item.Value)}: {item.Value}");
+ //Write(tw, depth, $"{nameof(item.FieldType)}: {item.FieldType}");
+ }
+
+ private static void Dump(TrinityPropertySheetFieldStringValue item, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(item.Value)}: {item.Value}");
+ }
+
+ private static void Dump(TrinityPropertySheetField4 item, TextWriter tw, int depth) =>
+ Write(tw, depth, $"UNDOCUMENTED {nameof(TrinityPropertySheetField4)}");
+
+ private static void Dump(TrinityPropertySheetField5 item, TextWriter tw, int depth) =>
+ Write(tw, depth, $"UNDOCUMENTED {nameof(TrinityPropertySheetField5)}");
+
+ private static void Dump(TrinityPropertySheetField6 item, TextWriter tw, int depth) =>
+ Write(tw, depth, $"UNDOCUMENTED {nameof(TrinityPropertySheetField6)}");
+
+ private static void Dump(TrinityPropertySheetFieldEnumName item, TextWriter tw, int depth)
+ {
+ Write(tw, depth, $"{nameof(item.Enum)}: {item.Enum}");
+ Write(tw, depth, $"{nameof(item.Value)}: {item.Value}");
+ }
+
+ private static void Dump(TrinityPropertySheetObjectArray item, TextWriter tw, int depth)
+ {
+ foreach (var obj in item.Value)
+ Dump(obj, tw, depth + 1);
+ }
+
+ private static void Dump(TrinityPropertySheetObject item, TextWriter tw, int depth)
+ {
+ foreach (var f in item.Fields)
+ Dump(f, tw, depth + 1);
+ }
+}
diff --git a/FlatBuffers/ZA/Trinity/Schemas/LogicExpression.fbs b/FlatBuffers/ZA/Trinity/Schemas/LogicExpression.fbs
new file mode 100644
index 00000000..3d3d91ba
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/LogicExpression.fbs
@@ -0,0 +1,34 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+// same as ActivationConditionParam
+table ExpressionLeaf {
+ ConditionName:string;
+ Op:int;
+ Arguments:[string];
+}
+
+enum ExpressionBranchOperand: int {
+ And = 0,
+ Or = 1
+}
+
+union ExpressionNode {
+ ExpressionLeaf,
+ ExpressionBranch
+}
+
+table ExpressionBranch {
+ Operand:ExpressionBranchOperand;
+ LeftCondition:ExpressionNode;
+ Left:ExpressionNode;
+ RightCondition:ExpressionNode;
+ Right:ExpressionNode;
+}
+
+table LogicExpression (fs_serializer) {
+ Root:ExpressionNode;
+}
+
+root_type LogicExpression;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/PlacementRegistry.fbs b/FlatBuffers/ZA/Trinity/Schemas/PlacementRegistry.fbs
new file mode 100644
index 00000000..781066ec
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/PlacementRegistry.fbs
@@ -0,0 +1,64 @@
+include "LogicExpression.fbs";
+include "Math/PackedVec3f.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table PlacementLogic {
+ Name:string;
+ Expression:LogicExpression;
+}
+
+table PlacementSpawner {
+ Name:string;
+ Scene:string;
+ Arguments:[PlacementLogic];
+}
+
+table PlacementPosition {
+ Name:string;
+ Position:PackedVec3f;
+ Rotation:PackedVec3f;
+ Arguments:[string];
+}
+
+table PlacementObjectTemplate {
+ Name:string;
+ Path:string;
+}
+
+table PlacementObject {
+ Name:string;
+ Type:string;
+ File:string;
+}
+
+table PlacementSpawnerArray {
+ Table:[PlacementSpawner] (required);
+}
+
+table PlacementPositionArray {
+ Table:[PlacementPosition] (required);
+}
+
+table PlacementObjectTemplateArray {
+ Table:[PlacementObjectTemplate] (required);
+}
+
+table PlacementObjectArray {
+ Table:[PlacementObject] (required);
+}
+
+union PlacementEntry {
+ PlacementObjectArray,
+ PlacementObjectTemplateArray,
+ PlacementPositionArray,
+ PlacementSpawnerArray
+}
+
+table PlacementRegistry (fs_serializer) {
+ Entry:PlacementEntry (required);
+}
+
+root_type PlacementRegistry;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TIAIPerceptualComponent.fbs b/FlatBuffers/ZA/Trinity/Schemas/TIAIPerceptualComponent.fbs
new file mode 100644
index 00000000..4be59352
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TIAIPerceptualComponent.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TIAIPerceptualComponent (fs_serializer) {
+ Value:byte; // not a bool
+}
+
+root_type TIAIPerceptualComponent;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TIDynamicExclusionComponent.fbs b/FlatBuffers/ZA/Trinity/Schemas/TIDynamicExclusionComponent.fbs
new file mode 100644
index 00000000..aeca74d3
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TIDynamicExclusionComponent.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TIDynamicExclusionComponent (fs_serializer) {
+ Field_00:byte;
+}
+
+root_type TIDynamicExclusionComponent;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TIModelDitherFadeComponent.fbs b/FlatBuffers/ZA/Trinity/Schemas/TIModelDitherFadeComponent.fbs
new file mode 100644
index 00000000..af25aa1b
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TIModelDitherFadeComponent.fbs
@@ -0,0 +1,12 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TIModelDitherFadeComponent (fs_serializer) {
+ Field_00:byte; //unknown
+ Field_01:float;
+ Field_02:float;
+ Field_03:float;
+ Field_04:float;
+}
+
+root_type TIModelDitherFadeComponent;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityComponent.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityComponent.fbs
new file mode 100644
index 00000000..4bdd5e5d
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityComponent.fbs
@@ -0,0 +1,57 @@
+include "Math/Vec4f.fbs";
+include "Math/PackedVec3f.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table Sphere {
+ Transform:PackedVec3f (required);
+ Radius:float;
+}
+
+table Box {
+ // Just a box. No TrcolFilePath.
+ Transform:PackedVec3f (required);
+ Size:PackedVec3f (required);
+ Rotation:PackedVec3f (required);
+}
+
+table Capsule {
+ Transform:PackedVec3f (required);
+ Radius:float;
+ Height:float;
+ Rotation:PackedVec3f (required);
+}
+
+table Havok {
+ TrcolFilePath:string (required);
+ Transform:PackedVec3f (required);
+ Rotation:PackedVec3f (required);
+ Scale:PackedVec3f (required);
+}
+
+union CollisionUnion {Sphere, Box, Capsule, Havok}
+
+table CollisionComponent (fs_serializer) {
+ Shape:CollisionUnion (required);
+ // field 01 is the object ptr for ^
+ Field_02:uint; //unknown
+ Field_03:bool;
+ Field_04:bool; //unknown
+ Field_05:bool; //unknown
+ Field_06:uint;
+ Field_07:bool; //unknown
+ Field_08:Vec4f (required);
+ Field_09:string (required);
+ Field_0A:bool;
+ Field_0B:bool;
+ Field_0C:bool;
+}
+
+union ComponentUnion {CollisionComponent}
+
+table TrinityComponent (fs_serializer) {
+ Component:ComponentUnion (required);
+}
+
+root_type TrinityComponent;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityEnvironmentParameter.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityEnvironmentParameter.fbs
new file mode 100644
index 00000000..5d09363b
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityEnvironmentParameter.fbs
@@ -0,0 +1,9 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinityEnvironmentParameter (fs_serializer) {
+ Field_00:string (required);
+ Field_01:float;
+}
+
+root_type TrinityEnvironmentParameter;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityFileDescriptors.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityFileDescriptors.fbs
new file mode 100644
index 00000000..058cdb0e
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityFileDescriptors.fbs
@@ -0,0 +1,23 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinityFileDescriptorSubFileUnknown {
+ Field_00:uint; // TODO
+}
+
+table TrinityFileDescriptorSubFileInfo {
+ Index:ulong;
+ SubInfo:TrinityFileDescriptorSubFileUnknown (required);
+}
+
+table TrinityFileDescriptorInfo {
+ FileSize:ulong;
+ FileCount:ulong;
+}
+
+table TrinityFileDescriptors (fs_serializer:"Progressive") {
+ SubFileHashes:[ulong] (required);
+ FilePaths:[string] (required);
+ SubFileInfos:[TrinityFileDescriptorSubFileInfo] (required);
+ FileInfos:[TrinityFileDescriptorInfo] (required);
+}
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityFileSystemMetadata.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityFileSystemMetadata.fbs
new file mode 100644
index 00000000..f6d1385e
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityFileSystemMetadata.fbs
@@ -0,0 +1,9 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinityFileSystemMetadata (fs_serializer:"Progressive") {
+ FileHashes:[ulong] (required);
+ FileOffsets:[ulong] (required);
+}
+
+root_type TrinityFileSystemMetadata;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityGroundPlaceComponent.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityGroundPlaceComponent.fbs
new file mode 100644
index 00000000..00fd7860
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityGroundPlaceComponent.fbs
@@ -0,0 +1,8 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinityGroundPlaceComponent (fs_serializer) {
+ Index:uint;
+}
+
+root_type TrinityGroundPlaceComponent;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityModelComponent.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityModelComponent.fbs
new file mode 100644
index 00000000..d0ed9927
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityModelComponent.fbs
@@ -0,0 +1,30 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinityModelComponent (fs_serializer) {
+ Field_00:string (required);
+ Field_01:string (required);
+ Field_02:string (required);
+ Field_03:string (required);
+ Field_04:ubyte; // unknown
+ Field_05:float;
+ Field_06:float;
+ Field_07:float;
+ Field_08:ubyte; // unknown
+ Field_09:ubyte; // unknown
+ Field_10:ubyte; // unknown
+ Field_11:ubyte; // unknown
+ Field_12:ubyte; // unknown
+ Field_13:ubyte; // unknown
+ Field_14:ubyte; // unknown
+ Field_15:ubyte; // unknown
+ Field_16:ubyte; // unknown
+ Field_17:ubyte; // unknown
+ Field_18:ubyte; // unknown
+ Field_19:string (required);
+ Field_20:string (required);
+ Field_21:bool;
+ Field_22:string (required);
+}
+
+root_type TrinityModelComponent;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityOverrideSensorData.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityOverrideSensorData.fbs
new file mode 100644
index 00000000..c46c133a
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityOverrideSensorData.fbs
@@ -0,0 +1,11 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinityOverrideSensorData (fs_serializer) {
+ Field_00:float;
+ Field_01:float;
+ Field_02:float;
+ Field_03:float;
+}
+
+root_type TrinityOverrideSensorData;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityPak.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityPak.fbs
new file mode 100644
index 00000000..42768588
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityPak.fbs
@@ -0,0 +1,28 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+enum DataCompressionType : byte
+{
+ None = -1,
+ Invalid = 0,
+ Zlib = 1,
+ Lz4 = 2,
+ OodleKraken = 3,
+ OodleLeviathan = 4,
+ OodleMermaid = 5,
+ OodleSelkie = 6,
+ OodleHydra = 7,
+}
+
+table TrinityPakFileData {
+ Field_00:uint;
+ CompressionType:DataCompressionType;
+ CompressionLevel:ubyte;
+ UncompressedSize:ulong;
+ Data:[ubyte] (required);
+}
+
+table TrinityPak (fs_serializer:"Lazy") {
+ Hashes:[ulong] (required);
+ Files:[TrinityPakFileData] (required);
+}
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityParticleComponent.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityParticleComponent.fbs
new file mode 100644
index 00000000..9d1a6656
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityParticleComponent.fbs
@@ -0,0 +1,12 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinityParticleComponent (fs_serializer) {
+ ParticleFile:string (required);
+ Field_01:string (required);
+ Field_02:bool;
+ ParticleName:string (required);
+ ParticleParent:string (required);
+}
+
+root_type TrinityParticleComponent;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityPropertySheet.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityPropertySheet.fbs
new file mode 100644
index 00000000..fbafa342
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityPropertySheet.fbs
@@ -0,0 +1,40 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinityPropertySheetField1 { Value:ulong; FieldType:byte; }
+table TrinityPropertySheetField2 { Value:uint; FieldType:byte; }
+table TrinityPropertySheetFieldStringValue { Value:string (required); }
+table TrinityPropertySheetField4 { }
+table TrinityPropertySheetField5 { }
+table TrinityPropertySheetField6 { }
+table TrinityPropertySheetFieldEnumName { Enum:string (required); Value:uint; }
+
+ /// Recursive!
+table TrinityPropertySheetObject { Fields:[TrinityPropertySheetField] (required); }
+
+union TrinityPropertySheetValue {
+ TrinityPropertySheetField1,
+ TrinityPropertySheetField2,
+ TrinityPropertySheetFieldStringValue,
+ TrinityPropertySheetField4,
+ TrinityPropertySheetField5,
+ TrinityPropertySheetField6,
+ TrinityPropertySheetFieldEnumName,
+ TrinityPropertySheetObjectArray,
+ TrinityPropertySheetObject
+}
+
+table TrinityPropertySheetObjectArray { Value:[TrinityPropertySheetValue] (required); }
+
+table TrinityPropertySheetField {
+ Name:string (required);
+ Data:TrinityPropertySheetValue (required);
+}
+
+table TrinityPropertySheet (fs_serializer) {
+ Name:string (required);
+ Extra:string (required);
+ Properties:[TrinityPropertySheetObject] (required);
+}
+
+root_type TrinityPropertySheet;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinitySceneObject.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinitySceneObject.fbs
new file mode 100644
index 00000000..e45d4969
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinitySceneObject.fbs
@@ -0,0 +1,50 @@
+include "Math/PackedVec3f.fbs";
+include "Geometry/SRT.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table SubScene (fs_serializer) {
+ Field_00:string (required);
+ Field_01:string (required);
+}
+
+table TrinityCollisionEventTriggerComponent (fs_serializer) {
+ Field_00:string (required);
+ Field_01:string (required);
+ Field_02:byte; // unknown
+ Field_03:uint; // unknown
+ Field_04:string (required);
+ Field_05:string (required);
+}
+
+table TrinityObjectSwitcher (fs_serializer) {
+ Field_00:string (required);
+ Field_01:string (required);
+}
+
+table TrinityScriptComponent (fs_serializer) {
+ ScriptFileName:string (required);
+ ScriptFileNameHash:string (required);
+ Field_02:uint;
+ Field_03:uint;
+ Field_04:uint;
+ ScriptFileClass:string (required);
+}
+
+table TrinityScene07 {
+}
+
+table TrinitySceneObject (fs_serializer) {
+ Name:string (required);
+ Position:SRT (required);
+ Field_02:bool;
+ ApplySRT:bool;
+ Field_04:string (required);
+ Field_05:bool;
+ Field_06:byte;
+ Field_07:[TrinityScene07] (required);
+ Field_08:[string];
+}
+
+root_type TrinitySceneObject;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinitySceneObjectTemplate.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinitySceneObjectTemplate.fbs
new file mode 100644
index 00000000..76555701
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinitySceneObjectTemplate.fbs
@@ -0,0 +1,29 @@
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinitySceneObjectTemplateData (fs_serializer) {
+ ObjectTemplateName:string (required);
+ ObjectTemplateExtra:string (required);
+ ObjectTemplatePath:string (required);
+ Field_03:ubyte;
+ Type:string (required);
+ Data:[ubyte] (required);
+}
+
+table TrinitySceneObjectTemplateEntry {
+ Type:string (required);
+ Data:[ubyte] (required);
+ SubObjects:[TrinitySceneObjectTemplateEntry] (required); // Recursive !
+}
+
+table TrinitySceneObjectTemplate (fs_serializer) {
+ ObjectTemplateName:string (required);
+ ObjectTemplateExtra:string;
+ Field_02:uint;
+ Field_03:uint;
+ Objects:[TrinitySceneObjectTemplateEntry] (required);
+ Field_05:[string] (required);
+ Field_06:ubyte;
+}
+
+root_type TrinitySceneObjectTemplate;
diff --git a/FlatBuffers/ZA/Trinity/Schemas/TrinityScenePoint.fbs b/FlatBuffers/ZA/Trinity/Schemas/TrinityScenePoint.fbs
new file mode 100644
index 00000000..0b519b04
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/Schemas/TrinityScenePoint.fbs
@@ -0,0 +1,12 @@
+include "Math/PackedVec3f.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA.Trinity;
+attribute "fs_serializer";
+
+table TrinityScenePoint (fs_serializer) {
+ Name:string (required);
+ Position:PackedVec3f (required);
+ Field_02:ubyte;
+}
+
+root_type TrinityScenePoint;
diff --git a/FlatBuffers/ZA/Trinity/pkNX.Structures.FlatBuffers.ZA.Trinity.csproj b/FlatBuffers/ZA/Trinity/pkNX.Structures.FlatBuffers.ZA.Trinity.csproj
new file mode 100644
index 00000000..51a0cc4d
--- /dev/null
+++ b/FlatBuffers/ZA/Trinity/pkNX.Structures.FlatBuffers.ZA.Trinity.csproj
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/FlatBuffers/ZA/Waza/Schemas/PersonalWazaParamDBArray.fbs b/FlatBuffers/ZA/Waza/Schemas/PersonalWazaParamDBArray.fbs
new file mode 100644
index 00000000..05f251b7
--- /dev/null
+++ b/FlatBuffers/ZA/Waza/Schemas/PersonalWazaParamDBArray.fbs
@@ -0,0 +1,55 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table PersonalWazaParam {
+ WazaID:uint;
+ ExtentionType:ubyte;
+ Type:ubyte;
+ Category:ubyte;
+ DamageType:ubyte;
+ Power:ubyte;
+ CriticalRank:ubyte;
+ HpRecoverRatio:byte;
+ ShrinkPer:ubyte;
+ SickParam_SickID:ushort;
+ SickParam_Per:ubyte;
+ SickParam_SickCont:ubyte;
+ SickParam_SickTurnMin:ubyte;
+ SickParam_SickTurnMax:ubyte;
+ RankEffect_0_Type:ubyte;
+ RankEffect_0_Value:byte;
+ RankEffect_0_Per:ubyte;
+ RankEffect_1_Type:ubyte;
+ RankEffect_1_Value:byte;
+ RankEffect_1_Per:ubyte;
+ RankEffect_2_Type:ubyte;
+ RankEffect_2_Value:byte;
+ RankEffect_2_Per:ubyte;
+ DamageRecoverRatio:byte;
+ DamageDrainRatio:byte;
+ IsGuard:bool;
+ IsAvoidByFloat:bool;
+ IsTouch:bool;
+ IsCut:bool;
+ IsWind:bool;
+ CanThroughMigawari:bool;
+ CanMeltFrozen:bool;
+ IsHpRecover:bool;
+ IsKaihukuHuuziEnable:bool;
+ IsYubiWoHuruPermit:bool;
+ IsSick:bool;
+ IsMamoruEnable:bool;
+ CantKill:bool;
+ ValueEffectRatio:byte;
+}
+
+table PersonalWazaParamDB {
+ Table:[PersonalWazaParam] (required);
+}
+
+table PersonalWazaParamDBArray (fs_serializer) {
+ Table:[PersonalWazaParamDB] (required);
+}
+
+root_type PersonalWazaParamDBArray;
diff --git a/FlatBuffers/ZA/Waza/Schemas/TokuseiArray.fbs b/FlatBuffers/ZA/Waza/Schemas/TokuseiArray.fbs
new file mode 100644
index 00000000..0c677f2a
--- /dev/null
+++ b/FlatBuffers/ZA/Waza/Schemas/TokuseiArray.fbs
@@ -0,0 +1,20 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table Tokusei {
+ DisabledByNeutralizingGas:bool; // Can be suppressed by Neutralizing Gas if != CantSuppress
+ FailRolePlay:bool; // Includes Doodle
+ NoReceiver:bool; // Includes Power of Alchemy
+ NoEntrain:bool;
+ NoTrace:bool;
+ FailSkillSwap:bool; // Includes Wandering Spirit
+ CantSuppress:bool; // Can't be suppressed by Gastro Acid
+ Breakable:bool; // Can be disabled by Mold Breaker
+ NoTransform:bool; // Disable if user is Transformed
+}
+
+table TokuseiTable (fs_serializer) {
+ Table:[Tokusei] (required);
+}
+
+root_type TokuseiTable;
diff --git a/FlatBuffers/ZA/Waza/Schemas/Waza.fbs b/FlatBuffers/ZA/Waza/Schemas/Waza.fbs
new file mode 100644
index 00000000..bd6f23bb
--- /dev/null
+++ b/FlatBuffers/ZA/Waza/Schemas/Waza.fbs
@@ -0,0 +1,97 @@
+include "WazaInflict.fbs";
+include "WazaAffinity.fbs";
+include "WazaEntityStat.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table Waza {
+ MoveID:ushort;
+ CanUseMove:bool;
+ Type:ubyte;
+ Quality:ubyte;
+ Category:ubyte;
+ Power:ubyte;
+ Accuracy:ubyte;
+ PP:ubyte;
+ Priority:byte;
+ HitMax:ubyte;
+ HitMin:ubyte;
+ Inflict:WazaInflict (required);
+ CritStage:ubyte;
+ Flinch:ubyte;
+ EffectSequence:ushort;
+ Recoil:byte; // % of damage converted to Damage Self points (negative)
+
+ // compared to S/V, this used to be just one property
+ SelfHeal:byte; // % of HP of self to change (+/-)
+ DamageHeal:ubyte; // % of damage converted to Heal Self points (positive)
+
+ RawTarget:ubyte;
+ StatAmps:WazaEntityStat (required);
+ Affinity:WazaAffinity = None;
+ Flag_MakesContact:bool;
+ Flag_Charge:bool;
+ Flag_Recharge:bool;
+ Flag_Protect:bool;
+ Flag_Reflectable:bool;
+ Flag_Snatch:bool;
+ Flag_Mirror:bool;
+ Flag_Punch:bool;
+ Flag_Sound:bool;
+ Flag_Dance:bool;
+ Flag_Gravity:bool;
+ Flag_Defrost:bool;
+ Flag_DistanceTriple:bool;
+ Flag_Heal:bool;
+ Flag_IgnoreSubstitute:bool;
+ Flag_FailSkyBattle:bool;
+ Flag_AnimateAlly:bool;
+ Flag_Metronome:bool;
+ Flag_FailEncore:bool;
+ Flag_FailMeFirst:bool;
+ Flag_FutureAttack:bool;
+ Flag_Pressure:bool;
+ Flag_Combo:bool;
+ Flag_NoSleepTalk:bool;
+ Flag_NoAssist:bool;
+ Flag_FailCopycat:bool;
+ Flag_FailMimic:bool;
+ Flag_FailInstruct:bool;
+ Flag_Powder:bool;
+ Flag_Bite:bool;
+ Flag_Bullet:bool;
+ Flag_NoMultiHit:bool;
+ Flag_NoEffectiveness:bool;
+ Flag_SheerForce:bool;
+ Flag_Slicing:bool;
+ Flag_Wind:bool;
+
+ // adjust names +1 compared to S/V due to above split property
+ Unknown_57:bool;
+ Unknown_58:bool;
+ Unknown_59:bool;
+ Unknown_60:bool;
+ Unknown_61:bool;
+
+ // not used by any move
+ Unused_62:bool;
+ Unused_63:bool;
+ Unused_64:bool;
+ Unused_65:bool;
+ Unused_66:bool;
+ Unused_67:bool;
+ Unused_68:bool;
+ Unused_69:bool;
+ Unused_70:bool;
+ Unused_71:bool;
+
+ Flag_CantUseTwice:bool;
+ // sketch used by S/V, not set by any as the NoSketch was added in S/V DLC 2.
+}
+
+table WazaTable (fs_serializer) {
+ Table:[Waza] (required);
+}
+
+root_type WazaTable;
diff --git a/FlatBuffers/ZA/Waza/Schemas/WazaAffinity.fbs b/FlatBuffers/ZA/Waza/Schemas/WazaAffinity.fbs
new file mode 100644
index 00000000..f60f7e6c
--- /dev/null
+++ b/FlatBuffers/ZA/Waza/Schemas/WazaAffinity.fbs
@@ -0,0 +1,10 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum WazaAffinity : byte {
+ None = 0,
+ Support = 3,
+ Self = 4,
+ Attack = 5,
+ Strong = 6,
+ Shuriken = 7,
+}
diff --git a/FlatBuffers/ZA/Waza/Schemas/WazaEntityStat.fbs b/FlatBuffers/ZA/Waza/Schemas/WazaEntityStat.fbs
new file mode 100644
index 00000000..646433f7
--- /dev/null
+++ b/FlatBuffers/ZA/Waza/Schemas/WazaEntityStat.fbs
@@ -0,0 +1,14 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_valueStruct";
+
+struct WazaEntityStat (fs_valueStruct) {
+ Stat1:byte;
+ Stat2:byte;
+ Stat3:byte;
+ Stat1Stage:byte;
+ Stat2Stage:byte;
+ Stat3Stage:byte;
+ Stat1Percent:ubyte;
+ Stat2Percent:ubyte;
+ Stat3Percent:ubyte;
+}
diff --git a/FlatBuffers/ZA/Waza/Schemas/WazaInflict.fbs b/FlatBuffers/ZA/Waza/Schemas/WazaInflict.fbs
new file mode 100644
index 00000000..f7256f03
--- /dev/null
+++ b/FlatBuffers/ZA/Waza/Schemas/WazaInflict.fbs
@@ -0,0 +1,10 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_valueStruct";
+
+struct WazaInflict (fs_valueStruct) {
+ Value:ushort;
+ Chance:ubyte;
+ Turn1:ubyte;
+ Turn2:ubyte;
+ Turn3:ubyte;
+}
diff --git a/FlatBuffers/ZA/Waza/Schemas/WazaParamDBArray.fbs b/FlatBuffers/ZA/Waza/Schemas/WazaParamDBArray.fbs
new file mode 100644
index 00000000..9866cd44
--- /dev/null
+++ b/FlatBuffers/ZA/Waza/Schemas/WazaParamDBArray.fbs
@@ -0,0 +1,51 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table WazaParam {
+ WazaId:int;
+ ChargeFrame:int;
+ AttackLoopFrame:int;
+ SpawnOrigin:int;
+ SpawnLocator:string;
+ SpawnOffsetX:float;
+ SpawnOffsetY:float;
+ SpawnOffsetZ:float;
+ ShotDirection:int;
+ CorrectTargetType:int;
+ ImpactMotionSpeed:float;
+ PlayWazaMoveType:int;
+ WazaRangeMin:float;
+ WazaRangeMax:float;
+ HeightTolerance:float;
+ EffectiveRange:float;
+ MinShootNum:int;
+ MaxShootNum:int;
+ HitPer:int;
+ WazaRecastTime:float;
+ EffectTime:float;
+ EffectValue:int;
+ AddMegaPowerValue:float;
+ PlayedMotionSpeed:float;
+ OverwriteBulletId1:int;
+ ReplaceBulletId1:int;
+ OverwriteBulletId2:int;
+ ReplaceBulletId2:int;
+ OverwriteBulletId3:int;
+ ReplaceBulletId3:int;
+ OverwriteBulletId4:int;
+ ReplaceBulletId4:int;
+ OverwriteBulletId5:int;
+ ReplaceBulletId5:int;
+ BulletCorrectScale:float;
+}
+
+table WazaParamDB {
+ Table:[WazaParam] (required);
+}
+
+table WazaParamDBArray (fs_serializer) {
+ Table:[WazaParamDB] (required);
+}
+
+root_type WazaParamDBArray;
diff --git a/FlatBuffers/ZA/Waza/pkNX.Structures.FlatBuffers.ZA.Waza.csproj b/FlatBuffers/ZA/Waza/pkNX.Structures.FlatBuffers.ZA.Waza.csproj
new file mode 100644
index 00000000..35e3d842
--- /dev/null
+++ b/FlatBuffers/ZA/Waza/pkNX.Structures.FlatBuffers.ZA.Waza.csproj
@@ -0,0 +1,2 @@
+
+
diff --git a/FlatBuffers/ZA/World/Schemas/Area/AreaConfig.fbs b/FlatBuffers/ZA/World/Schemas/Area/AreaConfig.fbs
new file mode 100644
index 00000000..c85952dc
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/AreaConfig.fbs
@@ -0,0 +1,9 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table AreaConfig (fs_serializer) {
+ BattleZoneCheckRadius:float;
+}
+
+root_type AreaConfig;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/AreaLayer.fbs b/FlatBuffers/ZA/World/Schemas/Area/AreaLayer.fbs
new file mode 100644
index 00000000..522c181f
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/AreaLayer.fbs
@@ -0,0 +1,12 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum AreaLayer : int {
+ Scene = 0,
+ MainArea = 1,
+ SubArea = 2,
+ Location1 = 3,
+ Location2 = 4,
+ Location3 = 5,
+ BattleZone = 6,
+ WildZone = 7,
+}
diff --git a/FlatBuffers/ZA/World/Schemas/Area/AreaType.fbs b/FlatBuffers/ZA/World/Schemas/Area/AreaType.fbs
new file mode 100644
index 00000000..ec5d3c0c
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/AreaType.fbs
@@ -0,0 +1,9 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+enum AreaType : int {
+ Default = 0,
+ Field = 1,
+ Town = 2,
+ Cave = 3,
+ Room = 4,
+}
diff --git a/FlatBuffers/ZA/World/Schemas/Area/CacheOption.fbs b/FlatBuffers/ZA/World/Schemas/Area/CacheOption.fbs
new file mode 100644
index 00000000..b0e8e872
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/CacheOption.fbs
@@ -0,0 +1,6 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table CacheOption {
+ CacheableScene:bool;
+ CacheDeleteScene:bool;
+}
diff --git a/FlatBuffers/ZA/World/Schemas/Area/DungeonMapUIDataArray.fbs b/FlatBuffers/ZA/World/Schemas/Area/DungeonMapUIDataArray.fbs
new file mode 100644
index 00000000..3cee9fb3
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/DungeonMapUIDataArray.fbs
@@ -0,0 +1,16 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table DungeonMapUIData {
+ Field00:uint;
+ Field01:uint;
+ Field02:string (required);
+ Field03:float;
+ //Field04:[ulong]; // dunno what this is, might be object[]?
+}
+
+table DungeonMapUIDataArray (fs_serializer) {
+ Table:[DungeonMapUIData] (required);
+}
+
+root_type DungeonMapUIDataArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldAreaInfo.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldAreaInfo.fbs
new file mode 100644
index 00000000..b7c4db47
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldAreaInfo.fbs
@@ -0,0 +1,37 @@
+include "AreaType.fbs";
+include "Math/PackedVec3f.fbs";
+include "FieldShadowInfo.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table FieldAreaInfo {
+ AreaName:string (required);
+ ScenePath:string;
+ AreaCategory:string (required);
+ IsSafety:bool;
+ IsInteriorCamera:bool;
+ IsTimerSuspend:bool;
+ IsImportantArea:bool;
+ IsRoom:bool;
+ CanRide:bool;
+ ProhibitReadyBallThrow:bool;
+ ProhibitPartnerPutout:bool;
+ IsOptimizeWaterLight:bool;
+ DefaultStartPosition:PackedVec3f;
+ DefaultStartYaw:float;
+ Music:string;
+ SoundEffect:string;
+ LightFile_p1:string;
+ LightFile_p2:string;
+ LightFile_p3:string;
+ WeatherTable:string;
+ AreaType:AreaType;
+ ShadowPresetName:string;
+ ShadowInfo:FieldShadowInfo;
+ MainAreaName:string;
+ SubAreaName:string;
+ LocationName:string;
+ FastTravelFlagId:string;
+ SubAreaReachedFlgId:string;
+ MapId:string;
+}
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldBattleZoneArray.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldBattleZoneArray.fbs
new file mode 100644
index 00000000..c3201c87
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldBattleZoneArray.fbs
@@ -0,0 +1,17 @@
+include "FieldAreaInfo.fbs";
+include "AreaLayer.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table FieldBattleZoneArray (fs_serializer) {
+ Table:[FieldBattleZone] (required);
+}
+
+table FieldBattleZone {
+ AreaInfo:FieldAreaInfo (required);
+ Layer:AreaLayer;
+ ZoneID:string (required);
+}
+
+root_type FieldBattleZoneArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldConfig.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldConfig.fbs
new file mode 100644
index 00000000..33a63b83
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldConfig.fbs
@@ -0,0 +1,26 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table FieldSpawnerConfig {
+ IsSkipSpawnByDiffYLimitMinEnable:bool;
+ IsSkipSpawnByDiffYLimitMaxEnable:bool;
+ SkipSpawnByDiffYLimitMin:float;
+ SkipSpawnByDiffYLimitMax:float;
+}
+
+table FieldNightVisibleControllerConfig {
+ NightBeginTimeInHour:float;
+ NightEndTimeInHour:float;
+}
+
+table FieldConfig (fs_serializer) {
+ SystemSceneLoadTimeoutSeconds:float;
+ MapChangeTimeoutSeconds:float;
+ UnLoadWaitFrame:int;
+ AllocatableSizeThreshold:int;
+ NightVisibleControllerConfig:FieldNightVisibleControllerConfig (required);
+ SpawnerConfig:FieldSpawnerConfig (required);
+}
+
+root_type FieldConfig;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldDataConfigArray.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldDataConfigArray.fbs
new file mode 100644
index 00000000..d78aac58
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldDataConfigArray.fbs
@@ -0,0 +1,79 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+enum FieldDataType : int
+{
+ Area = 0,
+ ShadowPreset = 1,
+ JumpPoint = 2,
+ EnvironmentTable = 3,
+ TimePreset = 4,
+ TimeZone = 5,
+ WeatherTable = 6,
+ WindTable = 7,
+ Config = 8,
+ EncountData = 9,
+ PokemonSpawner = 10,
+ WazaGimmickPrivateTable = 11,
+ WazaGimmickPublicTable = 12,
+ AreaCategory = 13,
+ WazaGimmickPokemonSpawner = 14,
+ TrafficNpcSpawner = 17,
+ NpcGroupData = 18,
+ NpcObjectTemplateData = 19,
+ RandomPopItemSpawner = 20,
+ SceneSection = 21,
+ MapReplace = 22,
+ GroundEffectConfig = 23,
+ GroundEffect = 24,
+ ZoneData = 25,
+ ItemTableData = 26,
+ ItemSpawner = 27,
+ BattleArea = 28,
+ WazaGimmickItemSpawner = 29,
+ EggHatchData = 30,
+ DistantViewEffectConfig = 31,
+ DistantViewEffect = 32,
+ WeatherHappening = 33,
+ WeatherScheduleTable = 34,
+ WazagimmickSpawner = 35,
+ ItemBallObjectTemplateData = 37,
+ WazaAttribute = 38,
+ Vignette = 39,
+ NpcAssetData = 40,
+ PlacementNpcSpawner = 41,
+ SpawnerTransformData = 42,
+ ItemTypeData = 43,
+ GetMedalCountData = 44,
+ OyabunSettingData = 45,
+ BattleZoneLotteryData = 46,
+ ImapBakeSceneData = 47,
+ ImapOverrideBakeSceneData = 48,
+ ImapOverrideBakeAshibaGimmickData = 49,
+ ZaTrainerSpawner = 50,
+ ZaTrainerData = 51,
+ NpcPokemonGroupData = 52,
+ ZaTrainerTableData = 53,
+ LightOverrideFlagWorkData = 54,
+ SpawnPointGroundCheck = 55,
+ SpawnPointNearCheck = 56,
+ OyabunWazaData = 57,
+ AreaConfig = 58,
+}
+
+table FieldDataInfo {
+ Type:FieldDataType;
+ Category:string;
+ BasePath:string;
+}
+
+table FieldDataConfig {
+ Info:FieldDataInfo (required);
+}
+
+table FieldDataConfigArray (fs_serializer) {
+ Table:[FieldDataConfig] (required);
+}
+
+root_type FieldDataConfigArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldLocationArray.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldLocationArray.fbs
new file mode 100644
index 00000000..a6d16dba
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldLocationArray.fbs
@@ -0,0 +1,16 @@
+include "FieldAreaInfo.fbs";
+include "AreaLayer.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table FieldLocationArray (fs_serializer) {
+ Table:[FieldLocation] (required);
+}
+
+table FieldLocation {
+ AreaInfo:FieldAreaInfo (required);
+ Layer:AreaLayer;
+}
+
+root_type FieldLocationArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldMainAreaArray.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldMainAreaArray.fbs
new file mode 100644
index 00000000..d4d08085
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldMainAreaArray.fbs
@@ -0,0 +1,16 @@
+include "FieldAreaInfo.fbs";
+include "AreaLayer.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table FieldMainAreaArray (fs_serializer) {
+ Table:[FieldMainArea] (required);
+}
+
+table FieldMainArea {
+ AreaInfo:FieldAreaInfo (required);
+ Layer:AreaLayer;
+}
+
+root_type FieldMainAreaArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldPlayer.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldPlayer.fbs
new file mode 100644
index 00000000..c4725efd
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldPlayer.fbs
@@ -0,0 +1,259 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table FacialParameter {
+ AutoBlinkIntervalMin:float;
+ AutoBlinkIntervalMax:float;
+}
+
+table AerialKinesisParameter {
+ Accel:float;
+ Friction:float;
+ SelfSpeedMax:float;
+ BackwardAngle:float;
+ GripAngle:float;
+}
+
+enum Easing : int
+{
+ InSine = 0,
+ OutSine = 1,
+ InOutSin = 2,
+ InQuad = 3,
+ OutQuad = 4,
+ InOutQuad = 5,
+ InCubic = 6,
+ OutCubic = 7,
+ InOutCubic = 8,
+ InQuart = 9,
+ OutQuart = 10,
+ InOutQuart = 11,
+ InQuint = 12,
+ OutQuint = 13,
+ InOutQuint = 14,
+ InExpo = 15,
+ OutExpo = 16,
+ InOutExpo = 17,
+ InCirc = 18,
+ OutCirc = 19,
+ InOutCirc = 20,
+ InBack = 21,
+ OutBack = 22,
+ InOutBack = 23,
+ InElastic = 24,
+ OutElastic = 25,
+ InOutElastic = 26,
+ InBounce = 27,
+ OutBounce = 28,
+ InOutBounce = 29,
+ Linear = 30,
+}
+table TotterParameter {
+ Interval:float;
+ Height:float;
+ DistanceMax:float;
+ BackDistance:float;
+}
+
+table SwimKinesisParameter {
+ SelfSpeedMax:float;
+ Accel:float;
+ Friction:float;
+ MinGripAngle:float;
+ MaxGripAngle:float;
+}
+
+table SquatKinesisParameter {
+ SpeedFixed:float;
+ SlipFriction:float;
+ GripFactor:float;
+}
+
+table SlidingKinesisParameter {
+ Friction:float;
+ SlipFriction:float;
+ InitVelocityRate:float;
+ BreakDecrease:float;
+ BreakIncrease:float;
+}
+
+table SlideDropParameter {
+ ForwardDirFactor:float;
+ BackwardDirFactor:float;
+ UpwardDirFactor:float;
+ BackwardTime:float;
+ LeanFactor:float;
+}
+
+table SlideDropKinesisParameter {
+ ForwardGripFactor:float;
+ BackwardGripFactor:float;
+ Accel:float;
+ Friction:float;
+ SpeedMax:float;
+ CurveAngle:float;
+ SpeedUpInputThreshold:float;
+ SideInputTolerance:float;
+ SideMaxVelocityRate:float;
+ SideFriction:float;
+ SpeedUpRate:float;
+ SpeedDownRate:float;
+ ForwardSideAccel:float;
+ BackwardSideAccel:float;
+}
+
+table SelfieParameter {
+ MaxFactor:float;
+ RotAngleMax:float;
+}
+
+table PlayerUniqueParameter {
+ IdlingIntervalMin:float;
+ IdlingIntervalMax:float;
+ FacialIdlingCountMin:int;
+ FacialIdlingCountMax:int;
+ RunFacialIntervalMin:float;
+ RunFacialIntervalMax:float;
+ RunMouthIntervalMin:float;
+ RunMouthIntervalMax:float;
+ SlideDropLeanAngle:float;
+ SlideDropFwdAngle:float;
+ SquatRate:float;
+ RideChangeCheckHeight:float;
+ RideChangeBottomOffset:float;
+ RideChangeRadiusScale:float;
+ HiddenMargin:float;
+}
+
+table MoveParameter {
+ PitchFactor:float;
+ LeanAngle:float;
+ LeanFactor:float;
+ RotationFactor:float;
+ ReverseSpeedFactor:float;
+ ReverseTurnAngle:float;
+ ReverseFrictionFactor:float;
+ LightLandingHeight:float;
+ HeavyLandingHeight:float;
+ DynamicsResetCount:int;
+ SpinCount:int;
+ SpinMaxSpeed:float;
+ SpinMaxAnimationSpeed:float;
+ SpinInterpolation:float;
+ SlideDropToleranceTime:float;
+ StopToleranceTime:float;
+ TurnStickDiffThreashold:float;
+ SliderModeRate:float;
+ BallThrowFrictionFactor:float;
+ BallThrowBackFrictionFactor:float;
+ UnlandablePushVelocity:float;
+}
+
+table LadderParameter {
+ LowerCorrectRate:float;
+ UpperCorrectRate:float;
+ UpperLaunchAngle:float;
+ LowerLaunchAngle:float;
+ UpperForwardAngle:float;
+ LowerForwardAngle:float;
+}
+
+table InputParameter {
+ StickTolerance:float;
+ SpinThreshold:float;
+}
+
+table GroundParameter {
+ SlideDropThreshold:float;
+ VerticalMargin:float;
+ WallHitAngle:float;
+ WaterDraftLine:float;
+ WaterSurfaceMargin:float;
+ WaterWithstandLine:float;
+ UnderWaterThreshold:float;
+ ShallowWaterThreshold:float;
+ AcceptableRadiusRate:float;
+}
+
+table GroundKinesisParameter {
+ FirstSpeedMax:float;
+ SecondSpeedMax:float;
+ SlowSpeedMax:float;
+ FirstAccel:float;
+ SecondAccel:float;
+ SlowAccel:float;
+ Friction:float;
+ SlipFriction:float;
+ SlipFrictionExp:float;
+ MaxGripFactor:float;
+ MinGripFactor:float;
+ RunStickThreshold:float;
+}
+
+table GravityParameter {
+ Accel:float;
+ SpeedMax:float;
+}
+
+table GlideKinesisParameter {
+ SelfSpeedMax:float;
+ Accel:float;
+ Friction:float;
+ MinGripAngle:float;
+ MaxGripAngle:float;
+ GravityRate:float;
+ FlareSpeedMax:float;
+}
+
+table FloatationParameter {
+ Floatage:float;
+ Dumping:float;
+ SpeedMax:float;
+ SurfaceDumpingRate:float;
+}
+
+table FlightKinesisParameter {
+ Accel:float;
+ PitchMaxUpAngle:float;
+ PitchMaxDownAngle:float;
+ PitchMaxTotalAngle:float;
+ YawAngleSpeed:float;
+ PitchAngleSpeed:float;
+ PitchUpSpeedRate:float;
+ PitchDownSpeedRate:float;
+ PitchStableSpeedRate:float;
+ PitchBaseAngle:float;
+ RollMaxAngle:float;
+ RollFactor:float;
+ UpAccelRate:float;
+ DownAccelRate:float;
+ MaxSpeed:float;
+ MaxDiveSpeed:float;
+ PitchUpSpeedThreshold:float;
+ PitchRateExp:float;
+ ReadyScale:float;
+ FaintThreshold:float;
+ AirRegist:float;
+}
+
+table FieldPlayer (fs_serializer) {
+ Gravity:GravityParameter (required);
+ Input:InputParameter (required);
+ Move:MoveParameter (required);
+ Totter:TotterParameter (required);
+ Ground:GroundParameter (required);
+ SlideDrop:SlideDropParameter (required);
+ Ladder:LadderParameter (required);
+ Facial:FacialParameter (required);
+ Unique:PlayerUniqueParameter (required);
+ GroundKinesis:GroundKinesisParameter (required);
+ AerialKinesis:AerialKinesisParameter (required);
+ SlideDropKinesis:SlideDropKinesisParameter (required);
+ SquatKinesis:SquatKinesisParameter (required);
+ SlidingKinesis:SlidingKinesisParameter (required);
+ Selfie:SelfieParameter (required);
+ Floatation:FloatationParameter (required);
+}
+
+root_type FieldPlayer;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldSceneAreaArray.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldSceneAreaArray.fbs
new file mode 100644
index 00000000..85bd4799
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldSceneAreaArray.fbs
@@ -0,0 +1,20 @@
+include "FieldAreaInfo.fbs";
+include "AreaLayer.fbs";
+include "CacheOption.fbs";
+include "StreamingConfig.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table FieldSceneAreaArray (fs_serializer) {
+ Table:[FieldSceneArea] (required);
+}
+
+table FieldSceneArea {
+ AreaInfo:FieldAreaInfo (required);
+ Layer:AreaLayer;
+ AreaCacheOption:CacheOption;
+ AreaStreamingConfig:StreamingConfig;
+}
+
+root_type FieldSceneAreaArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldShadowInfo.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldShadowInfo.fbs
new file mode 100644
index 00000000..b36e949b
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldShadowInfo.fbs
@@ -0,0 +1,7 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+struct FieldShadowInfo {
+ ShadowClipHeightOffset:float;
+ ShadowClipHeightMinOffset:float;
+ ShadowClipFadeWidth:float;
+}
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldSubArea.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldSubArea.fbs
new file mode 100644
index 00000000..b9ec1d93
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldSubArea.fbs
@@ -0,0 +1,16 @@
+include "FieldAreaInfo.fbs";
+include "AreaLayer.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table FieldSubAreaArray (fs_serializer) {
+ Table:[FieldSubArea] (required);
+}
+
+table FieldSubArea {
+ AreaInfo:FieldAreaInfo (required);
+ Layer:AreaLayer;
+}
+
+root_type FieldSubAreaArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/FieldWildZoneArray.fbs b/FlatBuffers/ZA/World/Schemas/Area/FieldWildZoneArray.fbs
new file mode 100644
index 00000000..b1661e69
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/FieldWildZoneArray.fbs
@@ -0,0 +1,17 @@
+include "FieldAreaInfo.fbs";
+include "AreaLayer.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table FieldWildZoneArray (fs_serializer) {
+ Table:[FieldWildZone] (required);
+}
+
+table FieldWildZone {
+ AreaInfo:FieldAreaInfo (required);
+ Layer:AreaLayer;
+ ZoneID:string (required);
+}
+
+root_type FieldWildZoneArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/OyabunSetting.fbs b/FlatBuffers/ZA/World/Schemas/Area/OyabunSetting.fbs
new file mode 100644
index 00000000..975005bb
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/OyabunSetting.fbs
@@ -0,0 +1,10 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table OyabunSetting (fs_serializer) {
+ MaxTalentValueCount:byte;
+ StrengthenValue:short;
+}
+
+root_type OyabunSetting;
diff --git a/FlatBuffers/ZA/World/Schemas/Area/StreamingConfig.fbs b/FlatBuffers/ZA/World/Schemas/Area/StreamingConfig.fbs
new file mode 100644
index 00000000..19852c6f
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Area/StreamingConfig.fbs
@@ -0,0 +1,10 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table StreamingConfig {
+ GridRealizeOffset:float;
+ GridUnrealizeOffset:float;
+ OverrideSensorRealizeOffset:float;
+ OverrideSensorUnrealizeOffset:float;
+ ConditionalRealizeOffset:float;
+ ConditionalUnrealizeOffset:float;
+}
diff --git a/FlatBuffers/ZA/World/Schemas/Encount/EncountDataDBArray.fbs b/FlatBuffers/ZA/World/Schemas/Encount/EncountDataDBArray.fbs
new file mode 100644
index 00000000..fb2fd1b2
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Encount/EncountDataDBArray.fbs
@@ -0,0 +1,47 @@
+include "Entity/ParamSet.fbs";
+include "Shared/ActivationCondition.fbs";
+include "Shared/DevID.fbs";
+include "Shared/HoldItem.fbs";
+include "Shared/WazaList.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+table ItemDropInfo {
+ ItemTableId:string;
+ DropConditionList:[int] (required);
+ DropProbability:uint;
+ MinCount:uint;
+ MaxCount:uint;
+}
+
+table EncountData {
+ Id:string (required);
+ DevNo:DevID;
+ MinLevel:int;
+ MaxLevel:int;
+ Sex:int;
+ FormNo:int;
+ Rare:int;
+ Tokusei:int;
+ Seikaku:int;
+ TalentScale:int;
+ TalentVNum:int;
+ OyabunProbability:float;
+ OyabunAdditionalLevel:int;
+ ActivationConditionArray:[ActivationCondition]; // not required
+ TalentValue:ParamSet (required);
+ StrengthenValue:ParamSet; // not required
+ Moves:WazaList; // not required
+ Item:HoldItem; // not required
+ ItemDropInfoList:[ItemDropInfo]; // not required
+}
+
+table EncountDataDB {
+ Table:[EncountData] (required);
+}
+
+table EncountDataDBArray (fs_serializer) {
+ Table:[EncountDataDB] (required);
+}
+
+root_type EncountDataDBArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Encount/PokemonDataDBArray.fbs b/FlatBuffers/ZA/World/Schemas/Encount/PokemonDataDBArray.fbs
new file mode 100644
index 00000000..a605a000
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Encount/PokemonDataDBArray.fbs
@@ -0,0 +1,39 @@
+include "Entity/ParamSet.fbs";
+include "Shared/ActivationCondition.fbs";
+include "Shared/DevID.fbs";
+include "Shared/HoldItem.fbs";
+include "Shared/WazaList.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table PokemonData {
+ Id:string (required);
+ DevNo:DevID;
+ MinLevel:int;
+ MaxLevel:int;
+ Sex:int;
+ FormNo:int;
+ Rare:int;
+ Tokusei:int;
+ Seikaku:int;
+ TalentScale:int;
+ TalentVNum:int;
+ OyabunProbability:float;
+ OyabunAdditionalLevel:int;
+ ActivationConditionArray:[ActivationCondition]; // not required; null instead of count:0
+ TalentValue:ParamSet (required);
+ Moves:WazaList; // not required
+ Item:HoldItem; // not required
+}
+
+table PokemonDataDB {
+ Table:[PokemonData] (required);
+}
+
+table PokemonDataDBArray (fs_serializer) {
+ Table:[PokemonDataDB] (required);
+}
+
+root_type PokemonDataDBArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Encount/PokemonDropItemTableDataDBArray.fbs b/FlatBuffers/ZA/World/Schemas/Encount/PokemonDropItemTableDataDBArray.fbs
new file mode 100644
index 00000000..22453209
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Encount/PokemonDropItemTableDataDBArray.fbs
@@ -0,0 +1,30 @@
+include "Shared/ActivationCondition.fbs";
+include "Shared/ActivationConditionElement.fbs";
+include "Shared/ActivationConditionParam.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table PokemonDropItemTableData {
+ Id:string (required);
+ ItemLotteryDataList:[ItemLotteryData];
+}
+
+table ItemLotteryData {
+ ItemId:string (required);
+ Weight:int;
+ MaxCount:int;
+ Type:int;
+ ActivationConditionArray:[ActivationCondition];
+}
+
+table PokemonDropItemTableDataDB {
+ Data:[PokemonDropItemTableData] (required);
+}
+
+table PokemonDropItemTableDataDBArray (fs_serializer) {
+ Table:[PokemonDropItemTableDataDB] (required);
+}
+
+root_type PokemonDropItemTableDataDBArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Oyabun/OyabunWazaDB.fbs b/FlatBuffers/ZA/World/Schemas/Oyabun/OyabunWazaDB.fbs
new file mode 100644
index 00000000..ad234a3a
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Oyabun/OyabunWazaDB.fbs
@@ -0,0 +1,19 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table FormTable {
+ FormNo:ushort;
+ WazaNo:ushort;
+}
+
+table OyabunWaza {
+ DevNo:ushort;
+ FormTableList:[FormTable] (required);
+}
+
+table OyabunWazaDB (fs_serializer) {
+ Table:[OyabunWaza] (required);
+}
+
+root_type OyabunWazaDB;
diff --git a/FlatBuffers/ZA/World/Schemas/Spawner/PokemonSpawnerDataDBArray.fbs b/FlatBuffers/ZA/World/Schemas/Spawner/PokemonSpawnerDataDBArray.fbs
new file mode 100644
index 00000000..9449b043
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Spawner/PokemonSpawnerDataDBArray.fbs
@@ -0,0 +1,76 @@
+include "Shared/ActivationCondition.fbs";
+include "Shared/AppearanceInfo.fbs";
+include "Shared/ZoneInfo.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table AiInfo {
+ ActionId:int;
+ PointName:string;
+}
+
+table PokemonCoolTimeInfo {
+ Condition:int;
+ Time:float;
+}
+
+table RepopProbability {
+ AfterCaptured:int;
+ AfterDefeated:int;
+}
+
+table EncountDataAiInfo {
+ ActionId:int;
+ PointName:string;
+ ActorName:string;
+ CreateIgnoreFlagList:[int];
+ Homerange:float;
+ PopActionId:int;
+}
+
+table EncountDataInfo {
+ EncountDataId:string;
+ Weight:int;
+ MaxCount:int;
+ AdditionalLevel:int;
+ TagList:[string];
+ ShowMapIcon:int;
+ AppearedTimeCondition:int;
+ AppearedWeatherCondition:int;
+ Ai:EncountDataAiInfo;
+ ActivationConditionList:[ActivationCondition];
+ ActivationConditionForUiList:[ActivationCondition];
+ Repop:RepopProbability;
+}
+
+table PokemonAppearanceSpawnerObjectInfo {
+ ObjectName:string (required);
+ CreateScenePath:string (required);
+ DungeonName:string;
+ AdditionalFlagList:[int];
+ BattleAreaId:string;
+ TagList:[string];
+ Zone:ZoneInfo;
+ Ai:AiInfo;
+ Appearance:AppearanceInfo (required);
+}
+
+table PokemonSpawnerData {
+ Id:string (required);
+ AppearanceSpawnerObjectInfoList:[PokemonAppearanceSpawnerObjectInfo] (required);
+ ActivationConditionList:[ActivationCondition] (required);
+ ActivationConditionForUiList:[ActivationCondition];
+ CoolTime:PokemonCoolTimeInfo (required);
+ EncountDataInfoList:[EncountDataInfo] (required);
+}
+
+table PokemonSpawnerDataDB {
+ Table:[PokemonSpawnerData] (required);
+}
+
+table PokemonSpawnerDataDBArray (fs_serializer) {
+ Table:[PokemonSpawnerDataDB] (required);
+}
+
+root_type PokemonSpawnerDataDBArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Spawner/SpawnerDataDBArray.fbs b/FlatBuffers/ZA/World/Schemas/Spawner/SpawnerDataDBArray.fbs
new file mode 100644
index 00000000..8df74b63
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Spawner/SpawnerDataDBArray.fbs
@@ -0,0 +1,49 @@
+include "Shared/AppearanceInfo.fbs";
+include "Shared/CoolTimeInfo.fbs";
+include "Shared/ZoneInfo.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table TableInfoActivationConditionParam {
+ Condition:string;
+ Op:int;
+ Param:[string];
+}
+
+table TableInfoActivationConditionElement {
+ Param:[TableInfoActivationConditionParam] (required);
+}
+
+table TableInfoActivationCondition {
+ Element:[TableInfoActivationConditionElement] (required);
+}
+
+table TableInfo {
+ TableId:string;
+ ActivationCondition:[TableInfoActivationCondition] (required);
+}
+
+table AppearanceSpawnerObjectInfo {
+ ObjectName:string (required);
+ CreateScenePath:string;
+ Zone:ZoneInfo;
+ Appearance:AppearanceInfo;
+}
+
+table SpawnerData {
+ Id:string (required);
+ CoolTime:CoolTimeInfo;
+ TableInfoList:[TableInfo] (required);
+ AppearanceSpawnerObjectInfoList:[AppearanceSpawnerObjectInfo];
+}
+
+table SpawnerDataDB {
+ Table:[SpawnerData] (required);
+}
+
+table SpawnerDataDBArray (fs_serializer) {
+ Table:[SpawnerDataDB] (required);
+}
+
+root_type SpawnerDataDBArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Spawner/SpawnerTransformDataDBArray.fbs b/FlatBuffers/ZA/World/Schemas/Spawner/SpawnerTransformDataDBArray.fbs
new file mode 100644
index 00000000..7074ae3f
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Spawner/SpawnerTransformDataDBArray.fbs
@@ -0,0 +1,21 @@
+include "Math/PackedVec3f.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table SpawnerTransformData {
+ Name:string;
+ Position:PackedVec3f;
+ Rotation:PackedVec3f;
+ AttachTransformEnable:bool;
+}
+
+table SpawnerTransformDataDB {
+ Table:[SpawnerTransformData] (required);
+}
+
+table SpawnerTransformDataDBArray (fs_serializer) {
+ Table:[SpawnerTransformDataDB] (required);
+}
+
+root_type SpawnerTransformDataDBArray;
diff --git a/FlatBuffers/ZA/World/Schemas/Spawner/WazaGimmickSpawnerDataDBArray.fbs b/FlatBuffers/ZA/World/Schemas/Spawner/WazaGimmickSpawnerDataDBArray.fbs
new file mode 100644
index 00000000..36bfca1d
--- /dev/null
+++ b/FlatBuffers/ZA/World/Schemas/Spawner/WazaGimmickSpawnerDataDBArray.fbs
@@ -0,0 +1,45 @@
+include "Shared/ActivationCondition.fbs";
+include "Shared/AppearanceInfo.fbs";
+include "Shared/CoolTimeInfo.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+attribute "fs_serializer";
+
+table SpawnWazaGimmickInfo {
+ PrivateId:string;
+ Weight:int;
+ MaxCount:int;
+ ActivationConditionList:[ActivationCondition];
+}
+
+table WazaGimmickAiInfo {
+ ActionId:int;
+ PointName:string;
+}
+
+table WazaGimmickAppearanceSpawnerObjectInfo {
+ ObjectName:string;
+ CreateScenePath:string;
+ AdditionalFlagList:[int];
+ TagList:[string];
+ Ai:WazaGimmickAiInfo;
+ Appearance:AppearanceInfo;
+}
+
+table WazaGimmickSpawnerData {
+ Id:string (required);
+ AppearanceSpawnerObjectInfoList:[WazaGimmickAppearanceSpawnerObjectInfo];
+ ActivationConditionList:[ActivationCondition];
+ CoolTime:CoolTimeInfo;
+ SpawnWazaGimmickInfoList:[SpawnWazaGimmickInfo];
+}
+
+table WazaGimmickSpawnerDataDB {
+ Table:[WazaGimmickSpawnerData] (required);
+}
+
+table WazaGimmickSpawnerDataDBArray (fs_serializer) {
+ Table:[WazaGimmickSpawnerDataDB] (required);
+}
+
+root_type WazaGimmickSpawnerDataDBArray;
diff --git a/FlatBuffers/ZA/World/World/IAreaLayer.cs b/FlatBuffers/ZA/World/World/IAreaLayer.cs
new file mode 100644
index 00000000..2a0ebd82
--- /dev/null
+++ b/FlatBuffers/ZA/World/World/IAreaLayer.cs
@@ -0,0 +1,20 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+public interface IAreaLayer
+{
+ AreaLayer Layer { get; }
+ FieldAreaInfo AreaInfo { get; }
+}
+
+partial class FieldLocation : IAreaLayer;
+partial class FieldSubArea : IAreaLayer;
+partial class FieldMainArea : IAreaLayer;
+partial class FieldSceneArea : IAreaLayer;
+
+partial class FieldBattleZone : IAreaLayer, IZoneLayer;
+partial class FieldWildZone : IAreaLayer, IZoneLayer;
+
+public interface IZoneLayer
+{
+ string? ZoneID { get; }
+}
diff --git a/FlatBuffers/ZA/World/pkNX.Structures.FlatBuffers.ZA.World.csproj b/FlatBuffers/ZA/World/pkNX.Structures.FlatBuffers.ZA.World.csproj
new file mode 100644
index 00000000..6b512ec9
--- /dev/null
+++ b/FlatBuffers/ZA/World/pkNX.Structures.FlatBuffers.ZA.World.csproj
@@ -0,0 +1 @@
+
diff --git a/FlatBuffers/ZA/Zukan/Schemas/PokedexBlackListMainArray.fbs b/FlatBuffers/ZA/Zukan/Schemas/PokedexBlackListMainArray.fbs
new file mode 100644
index 00000000..20983adc
--- /dev/null
+++ b/FlatBuffers/ZA/Zukan/Schemas/PokedexBlackListMainArray.fbs
@@ -0,0 +1,14 @@
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_serializer";
+
+table PokedexBlackListMain {
+ DevNo:short;
+ FormNo:short;
+}
+
+table PokedexBlackListMainArray (fs_serializer) {
+ Table:[PokedexBlackListMain] (required);
+}
+
+root_type PokedexBlackListMainArray;
diff --git a/FlatBuffers/ZA/Zukan/Schemas/RankBattleRewardArray.fbs b/FlatBuffers/ZA/Zukan/Schemas/RankBattleRewardArray.fbs
new file mode 100644
index 00000000..480bb490
--- /dev/null
+++ b/FlatBuffers/ZA/Zukan/Schemas/RankBattleRewardArray.fbs
@@ -0,0 +1,39 @@
+include "Shared/ItemID.fbs";
+
+namespace pkNX.Structures.FlatBuffers.ZA;
+
+attribute "fs_vector";
+attribute "fs_serializer";
+attribute "fs_valueStruct";
+attribute "fs_nonVirtual";
+attribute "fs_unsafeStructVector";
+
+enum RankedPlacement : byte {
+ Rank1st = 0,
+ Rank2nd = 1,
+ Rank3rd = 2,
+ Rank4th = 3,
+}
+
+struct RankBattleRewardItem {
+ Item:ItemID;
+ Count:ushort;
+}
+
+table RankBattleReward {
+ Rank:RankedPlacement;
+ LotteryWeight:ushort;
+ Money:uint;
+ Item1:RankBattleRewardItem (required);
+ Item2:RankBattleRewardItem (required);
+ Item3:RankBattleRewardItem (required);
+ Item4:RankBattleRewardItem (required);
+ Item5:RankBattleRewardItem (required);
+ Item6:RankBattleRewardItem (required);
+}
+
+table RankBattleRewardArray (fs_serializer) {
+ Table:[RankBattleReward] (required);
+}
+
+root_type RankBattleRewardArray;
diff --git a/FlatBuffers/ZA/Zukan/pkNX.Structures.FlatBuffers.ZA.Zukan.csproj b/FlatBuffers/ZA/Zukan/pkNX.Structures.FlatBuffers.ZA.Zukan.csproj
new file mode 100644
index 00000000..35e3d842
--- /dev/null
+++ b/FlatBuffers/ZA/Zukan/pkNX.Structures.FlatBuffers.ZA.Zukan.csproj
@@ -0,0 +1,2 @@
+
+
diff --git a/FlatBuffers/pkNX.Structures.FlatBuffers.Reflection/ReflectionDumpSchema.cs b/FlatBuffers/pkNX.Structures.FlatBuffers.Reflection/ReflectionDumpSchema.cs
index af56d491..97298f63 100644
--- a/FlatBuffers/pkNX.Structures.FlatBuffers.Reflection/ReflectionDumpSchema.cs
+++ b/FlatBuffers/pkNX.Structures.FlatBuffers.Reflection/ReflectionDumpSchema.cs
@@ -41,7 +41,7 @@ public static void DumpSchema(Memory data, TextWriter fbs, TextWriter cs,
public static void DumpSchema(Schema schema, TextWriter fbs, TextWriter cs, SchemaDumpSettings settings)
{
- WriteHeaderFBS(schema, fbs, settings.FileNamespace);
+ WriteHeaderFBS(schema, fbs, settings.FileNamespace, settings);
WriteHeaderCS(schema, cs, settings.FileNamespace);
DumpObjects(schema, fbs, cs, settings.StripNamespace);
@@ -51,7 +51,7 @@ public static void DumpSchema(Schema schema, TextWriter fbs, TextWriter cs, Sche
fbs.WriteLine($"root_type {x};");
}
- private static void WriteHeaderFBS(Schema schema, TextWriter fbs, ReadOnlySpan fileNameSpace)
+ private static void WriteHeaderFBS(Schema schema, TextWriter fbs, ReadOnlySpan fileNameSpace, SchemaDumpSettings settings)
{
fbs.WriteLine($"namespace {fileNameSpace};");
fbs.WriteLine();
@@ -60,6 +60,9 @@ private static void WriteHeaderFBS(Schema schema, TextWriter fbs, ReadOnlySpan $"{{ R: {R}, G: {G}, B: {B} }}";
+ public readonly override string ToString() => $"{{ R: {R}, G: {G}, B: {B} }}";
}
diff --git a/FlatBuffers/pkNX.Structures.FlatBuffers/FlatBufferConverter.cs b/FlatBuffers/pkNX.Structures.FlatBuffers/FlatBufferConverter.cs
index 50d6f0a2..4316db16 100644
--- a/FlatBuffers/pkNX.Structures.FlatBuffers/FlatBufferConverter.cs
+++ b/FlatBuffers/pkNX.Structures.FlatBuffers/FlatBufferConverter.cs
@@ -6,7 +6,7 @@ namespace pkNX.Structures.FlatBuffers;
public static class FlatBufferConverter
{
- public static T[] DeserializeFrom(string[] files)
+ public static T[] DeserializeFrom(ReadOnlySpan files)
where T : class, IFlatBufferSerializable
{
var result = new T[files.Length];
@@ -19,7 +19,6 @@ public static T[] DeserializeFrom(string[] files)
}
public static T DeserializeFrom(string path) where T : class, IFlatBufferSerializable => DeserializeFrom(path, GreedyMutable);
- public static T DeserializeFrom(byte[] data) where T : class, IFlatBufferSerializable => DeserializeFrom(data, GreedyMutable);
public static T DeserializeFrom(Memory data) where T : class, IFlatBufferSerializable => DeserializeFrom(data, GreedyMutable);
public static T DeserializeFrom(string path, FlatBufferDeserializationOption opt)
@@ -29,16 +28,6 @@ public static T DeserializeFrom(string path, FlatBufferDeserializationOption
return DeserializeFrom(data, opt);
}
- public static T DeserializeFrom(byte[] data, FlatBufferDeserializationOption opt)
- where T : class, IFlatBufferSerializable => opt switch
- {
- Lazy => T.LazySerializer.Parse(data),
- Progressive => T.ProgressiveSerializer.Parse(data),
- Greedy => T.GreedySerializer.Parse(data),
- GreedyMutable => T.GreedyMutableSerializer.Parse(data),
- _ => throw new ArgumentOutOfRangeException(nameof(opt), opt, null),
- };
-
public static T DeserializeFrom(Memory data, FlatBufferDeserializationOption opt)
where T : class, IFlatBufferSerializable => opt switch
{
diff --git a/FlatBuffers/pkNX.Structures.FlatBuffers/Math/PackedVec3f.cs b/FlatBuffers/pkNX.Structures.FlatBuffers/Math/PackedVec3f.cs
index 67aa4398..a5bb50c2 100644
--- a/FlatBuffers/pkNX.Structures.FlatBuffers/Math/PackedVec3f.cs
+++ b/FlatBuffers/pkNX.Structures.FlatBuffers/Math/PackedVec3f.cs
@@ -26,6 +26,7 @@ public PackedVec3f(float x = 0, float y = 0, float z = 0)
public readonly float Dot(PackedVec3f other) => (X * other.X) + (Y * other.Y) + (Z * other.Z);
public readonly PackedVec3f Cross(PackedVec3f other) => new((Y * other.Z) - (Z * other.Y), (Z * other.X) - (X * other.Z), (X * other.Y) - (Y * other.X));
public readonly float DistanceTo(PackedVec3f other) => (this - other).Magnitude();
+ public readonly float DistanceTo(float x, float z) => new PackedVec3f(x, 0, z).DistanceTo(new PackedVec3f(X, 0, Z));
public readonly float DistanceToSqr(PackedVec3f other) => (this - other).MagnitudeSqr();
public readonly PackedVec3f Lerp(PackedVec3f other, float t) => this + ((other - this) * t);
@@ -38,6 +39,7 @@ public PackedVec3f(float x = 0, float y = 0, float z = 0)
public readonly override string ToString() => $"V3f({X}, {Y}, {Z})";
public readonly string ToTriple() => $"({X}, {Y}, {Z})";
+ public readonly string ToShortString() => $"({X:F2}, {Y:F2}, {Z:F2})";
public readonly bool Equals(PackedVec3f other)
{
diff --git a/FlatBuffers/pkNX.Structures.FlatBuffers/Schemas/Geometry/SRT.fbs b/FlatBuffers/pkNX.Structures.FlatBuffers/Schemas/Geometry/SRT.fbs
new file mode 100644
index 00000000..55d79361
--- /dev/null
+++ b/FlatBuffers/pkNX.Structures.FlatBuffers/Schemas/Geometry/SRT.fbs
@@ -0,0 +1,9 @@
+include "../Math/math.fbs";
+
+namespace pkNX.Structures.FlatBuffers;
+
+table SRT {
+ Scale:PackedVec3f (required);
+ Rotation:PackedVec3f (required);
+ Translation:PackedVec3f (required);
+}
diff --git a/FlatBuffers/pkNX.Structures.FlatBuffers/Util/FlatDumper.cs b/FlatBuffers/pkNX.Structures.FlatBuffers/Util/FlatDumper.cs
index c8435aff..7a414359 100644
--- a/FlatBuffers/pkNX.Structures.FlatBuffers/Util/FlatDumper.cs
+++ b/FlatBuffers/pkNX.Structures.FlatBuffers/Util/FlatDumper.cs
@@ -10,7 +10,7 @@ public static class FlatDumper
return GetTable(data, sel);
}
- public static string GetTable(byte[] data, Func> sel) where T1 : class, IFlatBufferSerializable where T2 : notnull
+ public static string GetTable(Memory data, Func> sel) where T1 : class, IFlatBufferSerializable where T2 : notnull
{
var obj = FlatBufferConverter.DeserializeFrom(data);
var table = sel(obj);
diff --git a/pkNX.Containers/FileMitm.cs b/pkNX.Containers/FileMitm.cs
index 4c27c888..7e455a06 100644
--- a/pkNX.Containers/FileMitm.cs
+++ b/pkNX.Containers/FileMitm.cs
@@ -22,7 +22,7 @@ public static byte[] ReadAllBytes(string path)
return File.ReadAllBytes(path);
}
- public static void WriteAllBytes(string path, byte[] data)
+ public static void WriteAllBytes(string path, ReadOnlySpan data)
{
if (string.IsNullOrWhiteSpace(path))
throw new FileNotFoundException("Invalid filename.");
diff --git a/pkNX.Containers/FolderContainer.cs b/pkNX.Containers/FolderContainer.cs
index 91848ee8..a623f632 100644
--- a/pkNX.Containers/FolderContainer.cs
+++ b/pkNX.Containers/FolderContainer.cs
@@ -51,14 +51,22 @@ public void AddFiles(IEnumerable files)
AddFile(f);
}
- public byte[]? GetFileData(string file)
+ public bool TryGetFileData(string file, out ReadOnlySpan data)
{
+ data = [];
var index = GetFileIndex(file);
if (index < 0)
- return null;
+ return false;
string path = Paths[index];
- var data = Data[index] ??= FileMitm.ReadAllBytes(path);
- return (byte[])data.Clone();
+ data = Data[index] ??= FileMitm.ReadAllBytes(path);
+ return true;
+ }
+
+ public ReadOnlySpan GetFileData(string file)
+ {
+ if (TryGetFileData(file, out var data))
+ return data;
+ throw new ArgumentException($"File not found: {file}", nameof(file));
}
public byte[] GetFileData(int index)
diff --git a/pkNX.Containers/Mini/MiniUtil.cs b/pkNX.Containers/Mini/MiniUtil.cs
index 83bc40b3..a84119b3 100644
--- a/pkNX.Containers/Mini/MiniUtil.cs
+++ b/pkNX.Containers/Mini/MiniUtil.cs
@@ -153,3 +153,114 @@ public static string GetIsMini(byte[] data)
catch { return string.Empty; }
}
}
+
+///
+/// Utility class for writing BinLinker files.
+///
+public static class BinLinkerWriter
+{
+ public static byte[] Compress(T[] arr, ReadOnlySpan ident, Func sel, int padTo = 0)
+ {
+ // Convert th
+ var result = new byte[arr.Length][];
+ for (int i = 0; i < arr.Length; i++)
+ result[i] = sel(arr[i]);
+ return Write16(result, ident, padTo);
+ }
+
+ ///
+ /// Writes to a new file with the given identifier.
+ ///
+ /// Data to write
+ /// Identifier for the file
+ /// Padding size for each file
+ /// Writeable byte array
+ public static byte[] Write32(byte[][] data, ReadOnlySpan identifier, int padTo = 4)
+ {
+ using var ms = new MemoryStream(4096);
+ using var bw = new BinaryWriter(ms);
+
+ bw.Write(identifier[..2]);
+ bw.Write((ushort)data.Length);
+ const int start = 0;
+
+ // Preallocate the offset map
+ int count = data.Length;
+ int dataOffset = 4 + ((count + 1) * sizeof(uint));
+ for (int i = 0; i < count; i++)
+ bw.Write((uint)0);
+ bw.Write((uint)0);
+
+ // Write each file, then update the offset map
+ for (int i = 0; i < count; i++)
+ {
+ // Write File Offset
+ var fileOffset = bw.BaseStream.Length - start;
+ bw.Seek(start + 4 + (i * sizeof(uint)), SeekOrigin.Begin);
+ bw.Write((uint)fileOffset);
+ // Write File to Stream
+ bw.Seek(0, SeekOrigin.End);
+ bw.Write(data[i]);
+ if (padTo != 0)
+ {
+ while ((ms.Position - start) % padTo != 0)
+ bw.Write((byte)0);
+ }
+ }
+
+ // Cap the File
+ {
+ var fileOffset = bw.BaseStream.Length - start;
+ bw.Seek(start + 4 + (count * sizeof(uint)), SeekOrigin.Begin);
+ bw.Write((uint)fileOffset);
+ }
+
+ // Return the byte array
+ return ms.ToArray();
+ }
+
+ ///
+ public static byte[] Write16(byte[][] data, ReadOnlySpan identifier, int padTo = 2)
+ {
+ using var ms = new MemoryStream(4096);
+ using var bw = new BinaryWriter(ms);
+ const int start = 0;
+
+ bw.Write(identifier[..2]);
+ bw.Write((ushort)data.Length);
+
+ // Preallocate the offset map
+ int count = data.Length;
+ int dataOffset = 4 + ((count + 1) * sizeof(ushort));
+ for (int i = 0; i < count; i++)
+ bw.Write((ushort)0);
+ bw.Write((ushort)0);
+
+ // Write each file, then update the offset map
+ for (int i = 0; i < count; i++)
+ {
+ // Write File Offset
+ var fileOffset = bw.BaseStream.Length - start;
+ bw.Seek(start + 4 + (i * sizeof(ushort)), SeekOrigin.Begin);
+ bw.Write((ushort)fileOffset);
+ // Write File to Stream
+ bw.Seek(0, SeekOrigin.End);
+ bw.Write(data[i]);
+ if (padTo != 0)
+ {
+ while ((ms.Position - start) % padTo != 0)
+ bw.Write((byte)0);
+ }
+ }
+
+ // Cap the File
+ {
+ var fileOffset = bw.BaseStream.Length - start;
+ bw.Seek(start + 4 + (count * sizeof(ushort)), SeekOrigin.Begin);
+ bw.Write((ushort)fileOffset);
+ }
+
+ // Return the byte array
+ return ms.ToArray();
+ }
+}
diff --git a/pkNX.Containers/Misc/AHTB.cs b/pkNX.Containers/Misc/AHTB.cs
index ce495cc5..035bd23f 100644
--- a/pkNX.Containers/Misc/AHTB.cs
+++ b/pkNX.Containers/Misc/AHTB.cs
@@ -1,9 +1,10 @@
-using pkNX.Containers.VFS;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
+using pkNX.Containers.VFS;
+using static System.Buffers.Binary.BinaryPrimitives;
namespace pkNX.Containers;
@@ -14,18 +15,37 @@ namespace pkNX.Containers;
[Serializable]
public class AHTB : IBinarySerializable
{
- public AHTBEntry[] Entries { get; private set; } = null!;
+ ///
+ /// Indexed list of entries in this AHTB.
+ ///
+ public List Entries { get; } = [];
+
public const uint Magic = 0x42544841; // AHTB
- public int Count => Entries.Length;
+ public int Count => Entries.Count;
- public static bool IsAHTB(byte[] data) => BitConverter.ToUInt32(data, 0) == Magic;
+ ///
+ /// Determines whether the specified data begins with the predefined magic number.
+ ///
+ /// A read-only span of bytes to check.
+ /// if the first four bytes of match the magic number; otherwise, .
+ public static bool IsAHTB(ReadOnlySpan data) => ReadUInt32LittleEndian(data) == Magic;
- public AHTB(byte[] table)
+ public AHTB(ReadOnlySpan table)
{
- using var ms = new MemoryStream(table);
- using var br = new BinaryReader(ms);
- Read(br);
+ var magic = ReadUInt32LittleEndian(table);
+ Debug.Assert(magic == Magic);
+
+ var count = ReadInt32LittleEndian(table.Slice(4, 4));
+ Entries.EnsureCapacity(count);
+
+ int offset = 8;
+ for (int i = 0; i < count; i++)
+ {
+ var span = table[offset..];
+ Entries.Add(AHTBEntry.Read(span, out var used));
+ offset += used;
+ }
}
public AHTB(Stream table)
@@ -36,43 +56,41 @@ public AHTB(Stream table)
public AHTB(Dictionary source)
{
- Entries = new AHTBEntry[source.Count];
- int i = 0;
+ Entries.EnsureCapacity(source.Count);
foreach (var entry in source)
- {
- Entries[i] = new AHTBEntry(entry.Key, (ushort)entry.Value.Length, entry.Value);
- ++i;
- }
+ Entries.Add(new AHTBEntry(entry.Key, entry.Value));
}
public void Read(BinaryReader br)
{
var magic = br.ReadUInt32();
Debug.Assert(magic == Magic);
- var count = br.ReadUInt32();
- Entries = new AHTBEntry[count];
+ var count = br.ReadInt32();
+ Entries.EnsureCapacity(count);
+
for (int i = 0; i < count; i++)
- {
- var e = new AHTBEntry(br);
- Entries[i] = e;
- }
+ Entries.Add(new AHTBEntry(br));
+ }
+
+ public byte[] Write()
+ {
+ using var ms = new MemoryStream();
+ using var bw = new BinaryWriter(ms);
+ Write(bw);
+ return ms.ToArray();
}
public void Write(BinaryWriter bw)
{
- bw.Write((uint)Magic);
- bw.Write((uint)Entries.Length);
+ bw.Write(Magic);
+ bw.Write(Entries.Count);
foreach (var entry in Entries)
entry.Write(bw);
}
- public int GetIndex(ulong hash)
- {
- return Array.FindIndex(Entries, z => z.Hash == hash);
- }
-
+ public int GetIndex(ulong hash) => Entries.FindIndex(z => z.Hash == hash);
public int GetIndex(string value) => GetIndex(FnvHash.HashFnv1a_64(value));
public IEnumerable Summary => Entries.Select((z, i) => $"{i:0000}|{z}");
@@ -85,4 +103,48 @@ public int GetIndex(ulong hash)
map[entry.Hash] = entry.Name;
return map;
}
+
+ public Dictionary ToDictionary(ReadOnlySpan resource)
+ {
+ var count = Math.Min(resource.Length, Entries.Count);
+ var map = new Dictionary(count);
+ for (int i = 0; i < count; i++)
+ {
+ var value = resource[i];
+ var hash = Entries[i].Hash;
+ map[hash] = value;
+ }
+ return map;
+ }
+
+ public Dictionary ToIndexedDictionary(ReadOnlySpan value)
+ {
+ var map = new Dictionary();
+ for (var i = 0; i < value.Length; i++)
+ map[Entries[i].Name] = (value[i], i);
+ return map;
+ }
+
+ public string[] MergeFlat(ReadOnlySpan lines)
+ {
+ var detailed = new string[Count];
+ for (int i = 0; i < lines.Length; i++)
+ {
+ var entry = Entries[i];
+ var hash = entry.Hash;
+ var name = entry.Name;
+ var line = lines[i];
+ detailed[i] = $"{i:000}\t{hash:X16}\t{name}\t{line}";
+ }
+ return detailed;
+ }
+
+ public string GetString(ulong hash, IReadOnlyList text, string fallback = "NO TEXT FOUND")
+ {
+ var entries = Entries;
+ var index = entries.FindIndex(z => z.Hash == hash);
+ if (index == -1)
+ return fallback;
+ return text[index];
+ }
}
diff --git a/pkNX.Containers/Misc/AHTBEntry.cs b/pkNX.Containers/Misc/AHTBEntry.cs
index cf7d6e12..2d83a2ca 100644
--- a/pkNX.Containers/Misc/AHTBEntry.cs
+++ b/pkNX.Containers/Misc/AHTBEntry.cs
@@ -1,26 +1,56 @@
+using System;
using System.IO;
+using static System.Buffers.Binary.BinaryPrimitives;
namespace pkNX.Containers;
-public class AHTBEntry(ulong hash, ushort namelen, string name)
+///
+/// An entry in an AHTB.
+///
+public sealed record AHTBEntry
{
- public ulong Hash = hash;
- public ushort NameLength = namelen;
- public string Name = name;
+ public ulong Hash { get; set; } // fnv1a_64 hash of Name
+ public string Name { get; set; } // u16 length + utf8 bytes + \0
- public AHTBEntry(BinaryReader br) : this(br.ReadUInt64(), br.ReadUInt16(), br.ReadStringBytesUntil(0))
+ public static AHTBEntry Read(ReadOnlySpan data, out int used)
{
+ var Hash = ReadUInt64LittleEndian(data[..8]);
+ var length = ReadUInt16LittleEndian(data.Slice(8, 2));
+ var Name = System.Text.Encoding.UTF8.GetString(data.Slice(10, length - 1));
+ used = 10 + length;
+ return new AHTBEntry(Hash, Name);
+ }
+
+ public AHTBEntry(BinaryReader br)
+ {
+ Hash = br.ReadUInt64();
+ var length = br.ReadUInt16();
+ Span nameBytes = stackalloc byte[length];
+ _ = br.Read(nameBytes);
+ Name = System.Text.Encoding.UTF8.GetString(nameBytes[..^1]);
//Debug.Assert(FnvHash.HashFnv1a_64(Name) == Hash);
//Debug.Assert(Name.Length + 1 == NameLength); // Always null terminated
}
+ public AHTBEntry(ulong hash, string name)
+ {
+ Hash = hash;
+ Name = name;
+ //Debug.Assert(FnvHash.HashFnv1a_64(Name) == Hash);
+ }
+
public void Write(BinaryWriter bw)
{
bw.Write((ulong)Hash);
- bw.Write((ushort)(Name.Length + 1));
- bw.Write(Name);
+ var data = System.Text.Encoding.UTF8.GetBytes(Name);
+ bw.Write((ushort)(data.Length + 1)); // +1 for null terminator
+ bw.Write(data);
bw.Write((byte)0); // \0 terminator
}
+ public static ulong GetHash(ReadOnlySpan name) => FnvHash.HashFnv1a_64(name);
+ public ulong Update(string name) => Hash = GetHash(Name = name);
+ public ulong Update() => Hash = GetHash(Name);
+
public override string ToString() => $"0x{Hash:X16}|{Name}";
}
diff --git a/pkNX.Containers/Misc/BinaryRWExtensions.cs b/pkNX.Containers/Misc/BinaryRWExtensions.cs
deleted file mode 100644
index 5d8dd215..00000000
--- a/pkNX.Containers/Misc/BinaryRWExtensions.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-using System.Diagnostics;
-using System.IO;
-using System.Runtime.InteropServices;
-using System.Text;
-
-namespace pkNX.Containers;
-
-public static class BinaryRWExtensions
-{
- public static T ReadStruct(this BinaryReader br) where T : struct
- {
- var bytes = br.ReadBytes(Marshal.SizeOf());
- return bytes.ToStructure();
- }
-
- public static T[] ReadStructArray(this BinaryReader br, uint count) where T : struct
- {
- Debug.Assert(count < 1000); // pls no
- var arr = new T[count];
- for (int i = 0; i < arr.Length; i++)
- arr[i] = br.ReadStruct();
- return arr;
- }
-
- public static string ReadNXString(this BinaryReader br)
- {
- var length = br.ReadUInt16();
- var bytes = br.ReadBytes(length);
- var str = Encoding.ASCII.GetString(bytes);
- br.ReadByte(); // \0
- if (br.BaseStream.Position % 2 != 0)
- br.ReadByte(); // fix align
- return str;
- }
-
- public static string ReadStringBytesUntil(this BinaryReader br, byte end = 0)
- {
- StringBuilder str = new();
- byte b;
- while ((b = br.ReadByte()) != end)
- str.Append((char)b);
- return str.ToString();
- }
-}
diff --git a/pkNX.Containers/Misc/GFPack.cs b/pkNX.Containers/Misc/GFPack.cs
index 605d2985..ab7a172d 100644
--- a/pkNX.Containers/Misc/GFPack.cs
+++ b/pkNX.Containers/Misc/GFPack.cs
@@ -39,6 +39,13 @@ public GFPack(byte[] data)
ReadPack(br);
}
+ public GFPack(ReadOnlySpan data)
+ {
+ using var ms = new MemoryStream(data.ToArray());
+ using var br = new BinaryReader(ms);
+ ReadPack(br);
+ }
+
public GFPack(BinaryReader br) => ReadPack(br);
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
@@ -221,37 +228,31 @@ public byte[] Write()
return ms.ToArray();
}
- private static byte[] Decompress(byte[] encryptedData, int decryptedLength, CompressionType type)
+ private static byte[] Decompress(byte[] encryptedData, int decryptedLength, CompressionType type) => type switch
{
- return type switch
- {
- CompressionType.None => encryptedData,
- CompressionType.Zlib => throw new NotSupportedException(nameof(CompressionType.Zlib)), // not implemented
- CompressionType.Lz4 => LZ4.Decode(encryptedData, decryptedLength),
- CompressionType.OodleKraken => Oodle.Decompress(encryptedData, decryptedLength)!,
- CompressionType.OodleLeviathan => Oodle.Decompress(encryptedData, decryptedLength)!,
- CompressionType.OodleMermaid => Oodle.Decompress(encryptedData, decryptedLength)!,
- CompressionType.OodleSelkie => Oodle.Decompress(encryptedData, decryptedLength)!,
- CompressionType.OodleHydra => Oodle.Decompress(encryptedData, decryptedLength)!,
- _ => throw new ArgumentOutOfRangeException(nameof(type)),
- };
- }
+ CompressionType.None => encryptedData,
+ CompressionType.Zlib => Zlib.Decompress(encryptedData, decryptedLength),
+ CompressionType.Lz4 => LZ4.Decode(encryptedData, decryptedLength),
+ CompressionType.OodleKraken => Oodle.Decompress(encryptedData, decryptedLength)!,
+ CompressionType.OodleLeviathan => Oodle.Decompress(encryptedData, decryptedLength)!,
+ CompressionType.OodleMermaid => Oodle.Decompress(encryptedData, decryptedLength)!,
+ CompressionType.OodleSelkie => Oodle.Decompress(encryptedData, decryptedLength)!,
+ CompressionType.OodleHydra => Oodle.Decompress(encryptedData, decryptedLength)!,
+ _ => throw new ArgumentOutOfRangeException(nameof(type)),
+ };
- private static byte[] Compress(byte[] decryptedData, CompressionType type)
+ private static byte[] Compress(byte[] decryptedData, CompressionType type) => type switch
{
- return type switch
- {
- CompressionType.None => decryptedData,
- CompressionType.Zlib => throw new NotSupportedException(nameof(CompressionType.Zlib)), // not implemented
- CompressionType.Lz4 => LZ4.Encode(decryptedData),
- CompressionType.OodleKraken => Oodle.Compress(decryptedData, out _, OodleFormat.Kraken).ToArray(),
- CompressionType.OodleLeviathan => Oodle.Compress(decryptedData, out _, OodleFormat.Leviathan).ToArray(),
- CompressionType.OodleMermaid => Oodle.Compress(decryptedData, out _, OodleFormat.Mermaid).ToArray(),
- CompressionType.OodleSelkie => Oodle.Compress(decryptedData, out _, OodleFormat.Selkie).ToArray(),
- CompressionType.OodleHydra => Oodle.Compress(decryptedData, out _, OodleFormat.Hydra).ToArray(),
- _ => throw new ArgumentOutOfRangeException(nameof(type)),
- };
- }
+ CompressionType.None => decryptedData,
+ CompressionType.Zlib => Zlib.Compress(decryptedData),
+ CompressionType.Lz4 => LZ4.Encode(decryptedData),
+ CompressionType.OodleKraken => Oodle.Compress(decryptedData, out _, OodleFormat.Kraken).ToArray(),
+ CompressionType.OodleLeviathan => Oodle.Compress(decryptedData, out _, OodleFormat.Leviathan).ToArray(),
+ CompressionType.OodleMermaid => Oodle.Compress(decryptedData, out _, OodleFormat.Mermaid).ToArray(),
+ CompressionType.OodleSelkie => Oodle.Compress(decryptedData, out _, OodleFormat.Selkie).ToArray(),
+ CompressionType.OodleHydra => Oodle.Compress(decryptedData, out _, OodleFormat.Hydra).ToArray(),
+ _ => throw new ArgumentOutOfRangeException(nameof(type)),
+ };
public void CancelEdits()
{
@@ -425,21 +426,21 @@ public class FileHashIndex
public bool IsMatch(string fileName) => FnvHash.HashFnv1a_64(fileName) == HashFnv1aPathFileName;
}
-[StructLayout(LayoutKind.Sequential)]
+[StructLayout(LayoutKind.Explicit)]
public class FileData
{
public const int SIZE = 0x18;
- public ushort Level = 9; // quality?
- public CompressionType Type;
- public int SizeDecompressed;
- public int SizeCompressed;
- public int Padding = 0xCC;
- public int OffsetPacked;
- public uint unused;
+ [FieldOffset(0x00)] public ushort Level = 9; // quality?
+ [FieldOffset(0x02)] public CompressionType Type;
+ [FieldOffset(0x04)] public int SizeDecompressed;
+ [FieldOffset(0x08)] public int SizeCompressed;
+ [FieldOffset(0x0C)] public int Padding = 0xCC;
+ [FieldOffset(0x10)] public int OffsetPacked;
+ [FieldOffset(0x14)] public uint unused;
}
-public enum CompressionType : ushort
+public enum CompressionType : byte
{
None = 0,
Zlib = 1,
diff --git a/pkNX.Containers/Misc/Oodle.cs b/pkNX.Containers/Misc/Oodle.cs
index f8a29ab9..c9ec36af 100644
--- a/pkNX.Containers/Misc/Oodle.cs
+++ b/pkNX.Containers/Misc/Oodle.cs
@@ -30,33 +30,66 @@ public static class Oodle
///
/// Oodle64 Compression Method
///
- [DllImport(OodleLibraryPath)]
+ [DllImport(OodleLibraryPath, CallingConvention = CallingConvention.Cdecl)]
private static extern long OodleLZ_Compress(OodleFormat format, ref byte buffer, long bufferSize, ref byte result, OodleCompressionLevel level,
long opts = 0, long context = 0, long unused = 0, long scratch = 0, long scratch_size = 0);
///
- /// Decompresses a span of Oodle Compressed bytes (Requires Oodle DLL)
+ /// Decompresses compressed data into a newly allocated array. Returns null on failure.
///
/// Input Compressed Data
/// Decompressed Size
/// Resulting Array if success, otherwise null.
public static byte[]? Decompress(ReadOnlySpan input, long decompressedLength)
{
- var result = new byte[decompressedLength];
- return Decompress(input, result);
- }
+ if (decompressedLength is < 0 or > int.MaxValue)
+ throw new ArgumentOutOfRangeException(nameof(decompressedLength));
+ if (decompressedLength == 0)
+ return [];
- private static byte[]? Decompress(ReadOnlySpan input, byte[] result)
- {
- var dest = result.AsSpan();
- long decodedSize = OodleLZ_Decompress(ref MemoryMarshal.GetReference(input), input.Length, ref MemoryMarshal.GetReference(dest), result.Length);
- if (decodedSize == 0)
- return null; // failed
- return result;
+ var result = new byte[(int)decompressedLength];
+ return DecompressInternal(input, result) ? result : null;
}
///
- /// Compresses a span of bytes to Oodle Compressed bytes (Requires Oodle DLL)
+ /// Try to decompress into a caller-provided destination buffer.
+ ///
+ /// Compressed data.
+ /// Destination buffer (must be large enough).
+ /// Actual decompressed size on success.
+ public static bool TryDecompress(ReadOnlySpan input, Span destination, out int bytesWritten)
+ {
+ bytesWritten = 0;
+
+ if (destination.Length == 0)
+ return input.Length == 0;
+
+ if (input.Length == 0)
+ return false;
+
+ ref byte src = ref MemoryMarshal.GetReference(input);
+ ref byte dst = ref MemoryMarshal.GetReference(destination);
+
+ long decoded = OodleLZ_Decompress(
+ ref src,
+ input.Length,
+ ref dst,
+ destination.Length,
+ OodleFuzzSafe.Yes,
+ OodleCheckCrc.No,
+ OodleVerbosity.None,
+ 0, 0, 0, 0, 0, 0,
+ OodleThreadPhase.Unthreaded);
+
+ if (decoded <= 0 || decoded > destination.Length)
+ return false;
+
+ bytesWritten = (int)decoded;
+ return true;
+ }
+
+ ///
+ /// Compresses data and returns a Span over the allocated buffer (aligned length).
///
/// Input Decompressed Data
/// Actual Compressed Data size
@@ -66,31 +99,123 @@ public static class Oodle
public static Span Compress(ReadOnlySpan input, out int compressedSize,
OodleFormat format = OodleFormat.Kraken, OodleCompressionLevel level = OodleCompressionLevel.Optimal2)
{
- var maxSize = GetCompressedBufferSizeNeeded(input.Length);
- var result = new byte[maxSize].AsSpan();
- return Compress(input, result, out compressedSize, format, level);
+ if (input.Length == 0)
+ {
+ compressedSize = 0;
+ return Span.Empty;
+ }
+
+ int maxSize = GetMaxCompressedSize(input.Length);
+ var buffer = new byte[maxSize];
+ var span = buffer.AsSpan();
+ return CompressInternal(input, span, out compressedSize, format, level);
}
- private static Span Compress(ReadOnlySpan input, Span result, out int compressedSize, OodleFormat format, OodleCompressionLevel level)
+ ///
+ /// Try to compress into a caller-provided destination buffer.
+ ///
+ /// Uncompressed data.
+ /// Destination buffer (size must be at least GetMaxCompressedSize(input.Length)).
+ /// Exact compressed byte size (without alignment padding).
+ /// Format.
+ /// Compression level.
+ /// Slice (including alignment padding) on success.
+ /// True on success.
+ public static bool TryCompress(ReadOnlySpan input, Span destination, out int compressedSize,
+ out Span compressedSlice,
+ OodleFormat format = OodleFormat.Kraken,
+ OodleCompressionLevel level = OodleCompressionLevel.Optimal2)
{
- var encodedSize = OodleLZ_Compress(format, ref MemoryMarshal.GetReference(input), input.Length, ref MemoryMarshal.GetReference(result), level);
+ compressedSize = 0;
+ compressedSlice = default;
- // Oodle's compressed result leaves data after the "compressed length" return index.
- // Return an aligned span (ensuring length is a multiple of 4).
- // Retaining these unused bytes matches the behavior observed in New Pokémon Snap DRPF files.
- compressedSize = (int)encodedSize;
- var align = (compressedSize + 3) & ~3;
- return result[..align];
+ if (input.Length == 0)
+ {
+ compressedSlice = destination[..0];
+ return true;
+ }
+
+ if (destination.Length < GetMaxCompressedSize(input.Length))
+ return false;
+
+ ref byte src = ref MemoryMarshal.GetReference(input);
+ ref byte dst = ref MemoryMarshal.GetReference(destination);
+
+ long encoded = OodleLZ_Compress(format, ref src, input.Length, ref dst, level);
+ if (encoded <= 0 || encoded > destination.Length)
+ return false;
+
+ compressedSize = (int)encoded;
+ int aligned = Align4(compressedSize);
+ if (aligned > destination.Length)
+ return false;
+
+ compressedSlice = destination[..aligned];
+ return true;
}
+ private static bool DecompressInternal(ReadOnlySpan input, Span destination)
+ {
+ if (destination.Length == 0)
+ return input.Length == 0;
+
+ if (input.Length == 0)
+ return false;
+
+ ref byte src = ref MemoryMarshal.GetReference(input);
+ ref byte dst = ref MemoryMarshal.GetReference(destination);
+
+ long decoded = OodleLZ_Decompress(
+ ref src,
+ input.Length,
+ ref dst,
+ destination.Length,
+ OodleFuzzSafe.Yes,
+ OodleCheckCrc.No,
+ OodleVerbosity.None,
+ 0, 0, 0, 0, 0, 0,
+ OodleThreadPhase.Unthreaded);
+
+ return decoded > 0 && decoded <= destination.Length;
+ }
+
+ private static Span CompressInternal(ReadOnlySpan input, Span destination, out int compressedSize,
+ OodleFormat format, OodleCompressionLevel level)
+ {
+ if (input.Length == 0)
+ {
+ compressedSize = 0;
+ return destination[..0];
+ }
+
+ ref byte src = ref MemoryMarshal.GetReference(input);
+ ref byte dst = ref MemoryMarshal.GetReference(destination);
+
+ long encoded = OodleLZ_Compress(format, ref src, input.Length, ref dst, level);
+ if (encoded <= 0)
+ {
+ compressedSize = 0;
+ return Span.Empty;
+ }
+
+ compressedSize = (int)encoded;
+ int aligned = Align4(compressedSize);
+ return destination[..aligned];
+ }
+
+ private static int Align4(int value) => (value + 3) & ~3;
+
///
/// Gets the dimension required to compress the data.
///
- ///
- ///
- private static long GetCompressedBufferSizeNeeded(long inputSize)
+ public static int GetMaxCompressedSize(int inputSize)
{
- return inputSize + (274 * ((inputSize + 0x3FFFF) / 0x40000));
+ if (inputSize < 0)
+ throw new ArgumentOutOfRangeException(nameof(inputSize));
+ long val = inputSize + (274L * ((inputSize + 0x3FFFFL) / 0x40000L));
+ if (val > int.MaxValue)
+ throw new ArgumentOutOfRangeException(nameof(inputSize), "Computed size exceeds supported range.");
+ return (int)val;
}
}
diff --git a/pkNX.Containers/Misc/StructConverter.cs b/pkNX.Containers/Misc/StructConverter.cs
index e5059ea5..54bdfa6e 100644
--- a/pkNX.Containers/Misc/StructConverter.cs
+++ b/pkNX.Containers/Misc/StructConverter.cs
@@ -5,13 +5,6 @@ namespace pkNX.Containers;
internal static class StructConverter
{
- public static T ToStructure(this byte[] bytes) where T : struct
- {
- var handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
- try { return (T)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(T))!; }
- finally { handle.Free(); }
- }
-
public static T ToClass(this byte[] bytes) where T : class
{
var handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
@@ -30,16 +23,4 @@ internal static class StructConverter
Marshal.FreeHGlobal(ptr);
return arr;
}
-
- public static byte[] ToBytes(this T obj) where T : struct
- {
- int size = Marshal.SizeOf(obj);
- byte[] arr = new byte[size];
-
- IntPtr ptr = Marshal.AllocHGlobal(size);
- Marshal.StructureToPtr(obj, ptr, true);
- Marshal.Copy(ptr, arr, 0, size);
- Marshal.FreeHGlobal(ptr);
- return arr;
- }
}
diff --git a/pkNX.Containers/Misc/Zlib.cs b/pkNX.Containers/Misc/Zlib.cs
new file mode 100644
index 00000000..29207d09
--- /dev/null
+++ b/pkNX.Containers/Misc/Zlib.cs
@@ -0,0 +1,109 @@
+using System;
+using System.IO;
+using System.IO.Compression;
+
+namespace pkNX.Containers;
+
+public static class Zlib
+{
+ // Helper: Zlib Decompression
+ public static byte[] Decompress(ReadOnlySpan compressed, int expectedLength)
+ {
+ if (expectedLength == 0)
+ return [];
+
+ // Copy span to array for MemoryStream
+ using var ms = new MemoryStream(compressed.ToArray(), writable: false);
+ using var zs = new ZLibStream(ms, CompressionMode.Decompress, leaveOpen: true);
+ var result = new byte[expectedLength];
+ int offset = 0;
+ while (offset < expectedLength)
+ {
+ int read = zs.Read(result, offset, expectedLength - offset);
+ if (read == 0)
+ break; // stream ended early
+ offset += read;
+ }
+ if (offset != expectedLength)
+ {
+ // If actual output shorter than expected, trim (avoid throwing to stay resilient)
+ if (offset == 0)
+ throw new InvalidDataException("Zlib decompression produced no data.");
+ if (offset < expectedLength)
+ Array.Resize(ref result, offset);
+ }
+ return result;
+ }
+
+ // Overload: Decompress into a caller-provided destination span, return bytes written
+ public static int Decompress(ReadOnlySpan compressed, Span destination)
+ {
+ if (compressed.Length == 0)
+ return 0;
+
+ using var ms = new MemoryStream(compressed.ToArray(), writable: false);
+ using var zs = new ZLibStream(ms, CompressionMode.Decompress, leaveOpen: true);
+ int total = 0;
+ while (total < destination.Length)
+ {
+ int read = zs.Read(destination[total..]);
+ if (read == 0)
+ break;
+ total += read;
+ }
+
+ // If there is more data to decompress but destination is full, signal buffer too small.
+ if (total == destination.Length)
+ {
+ Span probe = stackalloc byte[1];
+ int more = zs.Read(probe);
+ if (more > 0)
+ throw new ArgumentException("Destination buffer too small for decompressed data.", nameof(destination));
+ }
+
+ return total;
+ }
+
+ // Helper: Zlib Compression
+
+ public static byte[] Compress(ReadOnlySpan data)
+ {
+ if (data.Length == 0)
+ return [];
+ using var ms = new MemoryStream();
+ using (var zs = new ZLibStream(ms, CompressionLevel.SmallestSize, leaveOpen: true))
+ zs.Write(data);
+ return ms.ToArray();
+ }
+
+ // Overload: Compress into a caller-provided destination span, return bytes written
+ public static int Compress(ReadOnlySpan data, Span destination, CompressionLevel level = CompressionLevel.SmallestSize)
+ {
+ if (data.Length == 0)
+ return 0;
+
+ using var ms = new MemoryStream();
+ using (var zs = new ZLibStream(ms, level, leaveOpen: true))
+ {
+ zs.Write(data);
+ }
+
+ // Copy resulting compressed bytes into destination
+ int written = (int)ms.Length;
+ if (written > destination.Length)
+ throw new ArgumentException("Destination buffer too small for compressed data.", nameof(destination));
+
+ if (ms.TryGetBuffer(out var segment))
+ {
+ segment.AsSpan(0, written).CopyTo(destination);
+ }
+ else
+ {
+ // Fallback if underlying buffer isn't directly accessible
+ var arr = ms.ToArray();
+ arr.AsSpan().CopyTo(destination);
+ }
+
+ return written;
+ }
+}
diff --git a/pkNX.Containers/NX/NSO.cs b/pkNX.Containers/NX/NSO.cs
index a93c7d4b..762bb4c0 100644
--- a/pkNX.Containers/NX/NSO.cs
+++ b/pkNX.Containers/NX/NSO.cs
@@ -1,3 +1,4 @@
+using System;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
@@ -61,11 +62,7 @@ public static byte[] GetDecompressedSegment(BinaryReader br, SegmentHeader h, in
return LZ4.Decode(data, h.DecompressedSize);
}
- public static byte[] Hash(byte[] data)
- {
- using var method = SHA256.Create();
- return method.ComputeHash(data);
- }
+ public static byte[] Hash(ReadOnlySpan data) => SHA256.HashData(data);
private void Decompress()
{
diff --git a/pkNX.Containers/Trinity/TrinityUtil.cs b/pkNX.Containers/Trinity/TrinityUtil.cs
new file mode 100644
index 00000000..a488ce83
--- /dev/null
+++ b/pkNX.Containers/Trinity/TrinityUtil.cs
@@ -0,0 +1,25 @@
+using System;
+using static System.Buffers.Binary.BinaryPrimitives;
+
+namespace pkNX.Containers;
+
+public static class TrinityUtil
+{
+ public static string GuessExtension(ReadOnlySpan data)
+ {
+ const string defaultExtension = "bin";
+ if (data.Length < 8)
+ return defaultExtension;
+ var u32 = ReadUInt32LittleEndian(data);
+ if (ReadUInt32LittleEndian(data[4..8]) == 0x53424642)
+ return "bfbs";
+ return u32 switch
+ {
+ AHTB.Magic => "ahtb",
+ 0x43524153 => "sarc",
+ 0x58544E42 => "bntx",
+ 0x63726173 => "sarc",
+ _ => defaultExtension,
+ };
+ }
+}
diff --git a/pkNX.Game/Editors/DataCache.cs b/pkNX.Game/Editors/DataCache.cs
index 13bbf7db..92f2d37d 100644
--- a/pkNX.Game/Editors/DataCache.cs
+++ b/pkNX.Game/Editors/DataCache.cs
@@ -11,7 +11,7 @@ public class DataCache(IList cache) : IDataEditor
where T : class
{
public IFileContainer Data { protected get; set; } = null!;
- public Func Create { private get; set; } = null!;
+ public Func, T> Create { private get; set; } = null!;
public Func Write { protected get; set; } = null!;
public DataCache(IFileContainer f) : this(new T[f.Count]) => Data = f;
@@ -90,10 +90,10 @@ public class TableCache
where TTable : class, IFlatBufferSerializable
where TData : class
{
- public IFileContainer File { get; private set; }
- public TTable Root { get; private set; }
- public IList Table { get; private set; }
- public DataCache Cache { get; private set; }
+ public IFileContainer File { get; }
+ public TTable Root { get; }
+ public IList Table { get; }
+ public DataCache Cache { get; }
public TableCache(IFileContainer f, Func> sel)
{
diff --git a/pkNX.Game/Editors/TMEditorGG.cs b/pkNX.Game/Editors/TMEditorGG.cs
index ca903da2..2bd0022c 100644
--- a/pkNX.Game/Editors/TMEditorGG.cs
+++ b/pkNX.Game/Editors/TMEditorGG.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Linq;
using pkNX.Containers;
using pkNX.Structures;
@@ -41,4 +41,4 @@ public void SetMoves(ushort[] finalMoves)
public bool Valid => Offset > 0;
public byte[] Write() => NSO.Write();
-}
\ No newline at end of file
+}
diff --git a/pkNX.Game/Editors/TypeChartEditor.cs b/pkNX.Game/Editors/TypeChartEditor.cs
index 21b6377e..a9d0ec2c 100644
--- a/pkNX.Game/Editors/TypeChartEditor.cs
+++ b/pkNX.Game/Editors/TypeChartEditor.cs
@@ -4,9 +4,9 @@
namespace pkNX.Game;
-public class TypeChartEditor(byte[] data)
+public class TypeChartEditor(Memory Raw)
{
- public byte[] Data = data;
+ public Span Data => Raw.Span;
public int Width => (int)Math.Sqrt(Data.Length);
public int Height => (int)Math.Sqrt(Data.Length);
@@ -20,18 +20,15 @@ public void Randomize()
}
}
- private static byte GetEffectiveness(int rv)
+ private static byte GetEffectiveness(int rv) => rv switch
{
- return rv switch
- {
- < 2 => (byte)TypeEffectiveness.Immune, // 2%
- < 19 => (byte)TypeEffectiveness.NotVery, // 17%
- < 36 => (byte)TypeEffectiveness.Super, // 17%
- _ => (byte)TypeEffectiveness.Normal,
- };
- }
+ < 2 => (byte)TypeEffectiveness.Immune, // 2%
+ < 19 => (byte)TypeEffectiveness.NotVery, // 17%
+ < 36 => (byte)TypeEffectiveness.Super, // 17%
+ _ => (byte)TypeEffectiveness.Normal,
+ };
- private static readonly uint[] Colors =
+ private static ReadOnlySpan Colors =>
[
0xFF000000,
0, // unused
@@ -42,7 +39,7 @@ private static byte GetEffectiveness(int rv)
0xFF008000,
];
- public static byte[] GetTypeChartImageData(int itemsize, int itemsPerRow, byte[] vals, out int width, out int height)
+ public static byte[] GetTypeChartImageData(int itemsize, int itemsPerRow, ReadOnlySpan vals, out int width, out int height)
{
width = itemsize * itemsPerRow;
height = itemsize * vals.Length / itemsPerRow;
diff --git a/pkNX.Game/File/GameFileMapping.cs b/pkNX.Game/File/GameFileMapping.cs
index 53621b5c..64dc86ad 100644
--- a/pkNX.Game/File/GameFileMapping.cs
+++ b/pkNX.Game/File/GameFileMapping.cs
@@ -66,6 +66,7 @@ internal void SaveAll()
SW or SH or SWSH => FilesSWSH,
PLA => FilesPLA,
SL or VL or SV => FilesSV,
+ ZA => FilesZA,
_ => throw new ArgumentOutOfRangeException(nameof(game), game, null),
};
@@ -435,4 +436,16 @@ internal void SaveAll()
// new(EncounterTableTrade , SingleFile, "bin", "script_event_data", "field_trade.bin"), // Incorrect?
];
#endregion
+ #region Gen9a
+
+ ///
+ /// Scarlet & Violet
+ ///
+ private static readonly GameFileReference[] FilesZA =
+ [
+ new(DataTrpfd, SingleFile, "arc", "data.trpfd"),
+ new(DataTrpfs, SingleFile, "arc", "data.trpfs"),
+ ];
+
+ #endregion
}
diff --git a/pkNX.Game/GameLocation.cs b/pkNX.Game/GameLocation.cs
index 79437955..ff6ec339 100644
--- a/pkNX.Game/GameLocation.cs
+++ b/pkNX.Game/GameLocation.cs
@@ -48,7 +48,7 @@ public static (GameLocation?, GameLoadResult) GetGame(string? dir, GameVersion g
if (romfs == null)
{
- string selectedDir = Path.GetFileName(dir) ?? string.Empty;
+ string selectedDir = Path.GetFileName(dir);
if (selectedDir.StartsWith("rom"))
return (null, GameLoadResult.RomfsSelected);
@@ -61,8 +61,8 @@ public static (GameLocation?, GameLoadResult) GetGame(string? dir, GameVersion g
var result = GameLoadResult.Success;
- if (exefs == null) // Add exefs not found result, but don't mark as failure
- result |= GameLoadResult.ExefsNotFound;
+ if (exefs == null)
+ result = GameLoadResult.ExefsNotFound;
return (new GameLocation(romfs, exefs, game), result);
}
@@ -73,12 +73,6 @@ private static GameVersion GetGameFromPath(string romfs, string? exefs)
return GetGameFromCount(files.Length, romfs, exefs);
}
- private const int FILECOUNT_XY = 271;
- private const int FILECOUNT_ORASDEMO = 301;
- private const int FILECOUNT_ORAS = 299;
- private const int FILECOUNT_SMDEMO = 239;
- private const int FILECOUNT_SM = 311;
- private const int FILECOUNT_USUM = 333;
private const int FILECOUNT_GG = 27818;
private const int FILECOUNT_SWSH = 41702;
private const int FILECOUNT_SWSH_110 = 41951; // Ver. 1.1.0 (Galarian Slowpoke)
@@ -94,82 +88,55 @@ private static GameVersion GetGameFromPath(string romfs, string? exefs)
private const int FILECOUNT_SV_130 = 27; // Ver. 1.3.0 (Paradox x2 Bad Egg fix)
private const int FILECOUNT_SV_201 = 28; // Ver. 2.0.1 (Teal Mask)
private const int FILECOUNT_SV_300 = 30; // Ver. 3.0.0 (Indigo Disk)
+ private const int FILECOUNT_ZA_100 = 22; // Ver. 1.0.0
+ private const int FILECOUNT_ZA_102 = 21; // Ver. 1.0.2
- private static GameVersion GetGameFromCount(int fileCount, string romfs, string? exefs)
+ private static ulong GetTitleID(string? exefs)
{
- string GetTitleID() => BitConverter.ToUInt64(File.ReadAllBytes(Path.Combine(exefs, "main.npdm")), 0x290).ToString("X16");
-
- switch (fileCount)
- {
- case FILECOUNT_XY: return GameVersion.XY;
- case FILECOUNT_ORASDEMO: return GameVersion.ORASDEMO;
- case FILECOUNT_ORAS: return GameVersion.ORAS;
- case FILECOUNT_SMDEMO: return GameVersion.SMDEMO;
- case FILECOUNT_SM:
- {
- var encdata = Path.Combine(romfs, "a", "0", "8", "2");
- if (File.Exists(encdata) && new FileInfo(encdata).Length != 0)
- return GameVersion.SN;
- return GameVersion.MN;
- }
-
- case FILECOUNT_USUM:
- {
- var encdata = Path.Combine(romfs, "a", "0", "8", "2");
- if (File.Exists(encdata) && new FileInfo(encdata).Length != 0)
- return GameVersion.US;
- return GameVersion.UM;
- }
-
- case FILECOUNT_GG:
- {
- bool eevee = Directory.Exists(Path.Combine(romfs, "bin", "movies", "EEVEE_GO"));
- if (eevee)
- return GameVersion.GE;
- return GameVersion.GP;
- }
-
- case FILECOUNT_SWSH:
- case FILECOUNT_SWSH_110:
- case FILECOUNT_SWSH_120:
- case FILECOUNT_SWSH_130:
- case FILECOUNT_SWSH_132:
- {
- if (exefs == null)
- return GameVersion.SWSH;
-
- return GetTitleID() switch
- {
- "0100ABF008968000" => GameVersion.SW,
- "01008DB008C2C000" => GameVersion.SH,
- _ => GameVersion.SWSH, // can't figure out Title ID, default to SWSH so that wild editor prompts for version selection
- };
- }
-
- case FILECOUNT_LA or FILECOUNT_LA_101 or FILECOUNT_LA_110:
- return GameVersion.PLA;
-
- case FILECOUNT_SV:
- case FILECOUNT_SV_101:
- case FILECOUNT_SV_120:
- case FILECOUNT_SV_130:
- case FILECOUNT_SV_201:
- case FILECOUNT_SV_300:
- {
- if (exefs == null)
- return GameVersion.SV;
-
- return GetTitleID() switch
- {
- // todo sv
- "0100ABF008968000" => GameVersion.SL,
- "01008DB008C2C000" => GameVersion.VL,
- _ => GameVersion.SV, // can't figure out Title ID, default to SWSH so that wild editor prompts for version selection
- };
- }
-
- default:
- return GameVersion.Invalid;
- }
+ if (exefs is null)
+ return 0;
+ var main = File.ReadAllBytes(Path.Combine(exefs, "main.npdm"));
+ var slice = main.AsSpan(0x290, 8);
+ return System.Buffers.Binary.BinaryPrimitives.ReadUInt64LittleEndian(slice);
}
+
+ private static GameVersion GetGameFromCount(int fileCount, string romfs, string? exefs) => fileCount switch
+ {
+ FILECOUNT_GG
+ => DetectGen7b(romfs),
+
+ FILECOUNT_SWSH or FILECOUNT_SWSH_110 or FILECOUNT_SWSH_120 or FILECOUNT_SWSH_130 or FILECOUNT_SWSH_132
+ => DetectGen8(exefs),
+
+ FILECOUNT_LA or FILECOUNT_LA_101 or FILECOUNT_LA_110
+ => GameVersion.PLA,
+
+ FILECOUNT_SV or FILECOUNT_SV_101 or FILECOUNT_SV_120 or FILECOUNT_SV_130 or FILECOUNT_SV_201 or FILECOUNT_SV_300
+ => DetectGen9(exefs),
+
+ FILECOUNT_ZA_100 or FILECOUNT_ZA_102
+ => GameVersion.ZA,
+
+ _ => GameVersion.Invalid
+ };
+
+ private static GameVersion DetectGen7b(string romfs)
+ {
+ bool eevee = Directory.Exists(Path.Combine(romfs, "bin", "movies", "EEVEE_GO"));
+ return eevee ? GameVersion.GE : GameVersion.GP;
+ }
+
+ private static GameVersion DetectGen8(string? exefs) => GetTitleID(exefs) switch
+ {
+ 0x0100ABF008968000 => GameVersion.SW,
+ 0x01008DB008C2C000 => GameVersion.SH,
+ _ => GameVersion.SWSH, // can't figure out Title ID, default to SW/SH
+ };
+
+ private static GameVersion DetectGen9(string? exefs) => GetTitleID(exefs) switch
+ {
+ 0x0100ABF008968000 => GameVersion.SL,
+ 0x01008DB008C2C000 => GameVersion.VL,
+ _ => GameVersion.SV, // can't figure out Title ID, default to SV
+ };
}
diff --git a/pkNX.Game/GameManager.cs b/pkNX.Game/GameManager.cs
index 09e6684f..4541360e 100644
--- a/pkNX.Game/GameManager.cs
+++ b/pkNX.Game/GameManager.cs
@@ -113,6 +113,7 @@ public FolderContainer GetFilteredFolder(GameFile type, Func? filt
SW or SH or SWSH => new GameManagerSWSH(loc, language),
PLA => new GameManagerPLA(loc, language),
SL or VL or SV => new GameManagerSV(loc, language),
+ ZA => new GameManager9a(loc, language),
_ => throw new ArgumentException(nameof(loc.Game)),
};
}
diff --git a/pkNX.Game/GameManager9a.cs b/pkNX.Game/GameManager9a.cs
new file mode 100644
index 00000000..4d4d4217
--- /dev/null
+++ b/pkNX.Game/GameManager9a.cs
@@ -0,0 +1,102 @@
+using System;
+using System.IO;
+using pkNX.Containers;
+using pkNX.Structures.FlatBuffers.SV.Trinity;
+
+namespace pkNX.Game;
+
+public sealed class GameManager9a : GameManager, IFileInternal, IDisposable
+{
+ private readonly TrinityFileSystemManager Manager;
+ private string PathNPDM => Path.Combine(PathExeFS, "main.npdm");
+ private string TitleID => BitConverter.ToUInt64(File.ReadAllBytes(PathNPDM), 0x290).ToString("X16");
+
+ public GameManager9a(GameLocation rom, int language) : base(rom, language)
+ {
+ // TODO: Use GameFileMapping?
+
+ // Open the trpfs
+ var pathTrpfs = Path.Combine(PathRomFS, "arc/data.trpfs");
+ var pathTrpfd = Path.Combine(PathRomFS, "arc/data.trpfd");
+ Manager = new TrinityFileSystemManager(pathTrpfs, pathTrpfd);
+ }
+
+ public bool HasFile(string path) => Manager.HasFile(path);
+ public bool HasFile(ulong hash) => Manager.HasFile(hash);
+ public byte[] GetPackedFile(string path) => Manager.GetPackedFile(path);
+ public byte[] GetPackedFile(ulong hash) => Manager.GetPackedFile(hash);
+
+ ///
+ /// Generally useful game data that can be used by multiple editors.
+ ///
+ public GameData Data { get; private set; } = null!;
+
+ protected override void SetMitm()
+ {
+ var basePath = Path.GetDirectoryName(ROM.RomFS);
+ if (basePath is null)
+ throw new InvalidDataException("Invalid ROMFS path.");
+ var tid = ROM.ExeFS != null ? TitleID : "0100A3D008C5C000"; // no way to differentiate without exefs, so default to Scarlet
+ var redirect = Path.Combine(basePath, tid);
+ FileMitm.SetRedirect(basePath, redirect);
+ }
+
+ public override void Initialize()
+ {
+ base.Initialize();
+
+ // initialize gametext
+ //ResetText();
+
+ // initialize common structures
+ //var personal = GetFilteredFolder(GameFile.PersonalStats, z => Path.GetFileNameWithoutExtension(z) == "personal_total");
+ //var learn = this[GameFile.Learnsets][0];
+ //var splitLearn = learn.Split(0x104);
+ //Learn = new FakeContainer(splitLearn);
+
+ //var move = this[GameFile.MoveStats];
+ //((FolderContainer)move).Initialize();
+ Data = new GameData
+ {
+ //MoveData = new DataCache(move)
+ //{
+ // Create = FlatBufferConverter.DeserializeFrom,
+ // Write = z => FlatBufferConverter.SerializeFrom((Waza8)z),
+ //},
+ //LevelUpData = new DataCache(Learn)
+ //{
+ // Create = z => new Learnset8(z),
+ // Write = z => z.Write(),
+ //},
+
+ // folders
+ //PersonalData = new PersonalTable8SWSH(personal[0]),
+ //EvolutionData = new DataCache(GetFilteredFolder(GameFile.Evolutions))
+ //{
+ // Create = data => new EvolutionSet8(data),
+ // Write = evo => evo.Write(),
+ //},
+ };
+ }
+
+ public void ResetMoves() => GetFilteredFolder(GameFile.MoveStats);
+
+ public void ResetText()
+ {
+ GetFilteredFolder(GameFile.GameText, z => Path.GetExtension(z) == ".dat");
+ }
+
+ protected override void Terminate()
+ {
+ // Store Personal Data back in the file. Let the container detect if it is modified.
+ //var personal = this[GameFile.PersonalStats];
+ //personal[0] = Data.PersonalData.Table.SelectMany(z => ((IPersonalInfoBin)z).Write()).ToArray();
+ //var learn = this[GameFile.Learnsets];
+ //learn[0] = Learn.Files.SelectMany(z => z).ToArray();
+ }
+
+ public void Dispose()
+ {
+ Manager.Dispose();
+ }
+}
diff --git a/pkNX.Game/GameManagerGG.cs b/pkNX.Game/GameManagerGG.cs
index face934e..928490c1 100644
--- a/pkNX.Game/GameManagerGG.cs
+++ b/pkNX.Game/GameManagerGG.cs
@@ -1,3 +1,4 @@
+using System;
using System.IO;
using System.Linq;
using pkNX.Containers;
@@ -20,8 +21,7 @@ public class GameManagerGG(GameLocation rom, int language) : GameManager(rom, la
protected override void SetMitm()
{
var basePath = Path.GetDirectoryName(ROM.RomFS);
- if (basePath is null)
- throw new InvalidDataException("Invalid RomFS path.");
+ ArgumentNullException.ThrowIfNull(basePath);
// unlike SWSH, LGPE has a unique opening movie in romfs to differentiate between versions
bool eevee = Directory.Exists(Path.Combine(PathRomFS, "bin", "movies", "EEVEE_GO"));
ActualGame = eevee ? GameVersion.GE : GameVersion.GP;
@@ -55,12 +55,12 @@ public override void Initialize()
PersonalData = new PersonalTable7GG(personal[0]),
MegaEvolutionData = new DataCache(GetFilteredFolder(GameFile.MegaEvolutions))
{
- Create = MegaEvolutionSet.ReadArray,
+ Create = z => MegaEvolutionSet.ReadArray(z.Span),
Write = MegaEvolutionSet.WriteArray,
},
EvolutionData = new DataCache(GetFilteredFolder(GameFile.Evolutions))
{
- Create = data => new EvolutionSet7(data),
+ Create = data => new EvolutionSet7(data.Span),
Write = evo => evo.Write(),
},
};
diff --git a/pkNX.Game/GameManagerSV.cs b/pkNX.Game/GameManagerSV.cs
index 84b1a207..cc71de1d 100644
--- a/pkNX.Game/GameManagerSV.cs
+++ b/pkNX.Game/GameManagerSV.cs
@@ -5,7 +5,7 @@
namespace pkNX.Game;
-public class GameManagerSV : GameManager, IFileInternal, IDisposable
+public sealed class GameManagerSV : GameManager, IFileInternal, IDisposable
{
private readonly TrinityFileSystemManager Manager;
private string PathNPDM => Path.Combine(PathExeFS, "main.npdm");
@@ -29,7 +29,7 @@ public GameManagerSV(GameLocation rom, int language) : base(rom, language)
///
/// Generally useful game data that can be used by multiple editors.
///
- public GameData Data { get; protected set; } = null!;
+ public GameData Data { get; private set; } = null!;
protected override void SetMitm()
{
diff --git a/pkNX.Game/GameManagerSWSH.cs b/pkNX.Game/GameManagerSWSH.cs
index 97cc8dfa..c2d729d6 100644
--- a/pkNX.Game/GameManagerSWSH.cs
+++ b/pkNX.Game/GameManagerSWSH.cs
@@ -23,8 +23,7 @@ public class GameManagerSWSH(GameLocation rom, int language) : GameManager(rom,
protected override void SetMitm()
{
var basePath = Path.GetDirectoryName(ROM.RomFS);
- if (basePath is null)
- throw new InvalidDataException("Invalid ROMFS path.");
+ ArgumentNullException.ThrowIfNull(basePath);
var tid = ROM.ExeFS != null ? TitleID : "0100ABF008968000"; // no way to differentiate without exefs, so default to Sword
var redirect = Path.Combine(basePath, tid);
FileMitm.SetRedirect(basePath, redirect);
@@ -49,12 +48,12 @@ public override void Initialize()
{
MoveData = new DataCache(move)
{
- Create = bytes => (IMove)FlatBufferConverter.DeserializeFrom(bytes),
+ Create = FlatBufferConverter.DeserializeFrom,
Write = z => ((Waza)z).SerializeFrom(),
},
LevelUpData = new DataCache(Learn)
{
- Create = z => new Learnset8(z),
+ Create = z => new Learnset8(z.Span),
Write = z => z.Write(),
},
@@ -62,7 +61,7 @@ public override void Initialize()
PersonalData = new PersonalTable8SWSH(personal[0]),
EvolutionData = new DataCache(GetFilteredFolder(GameFile.Evolutions))
{
- Create = data => new EvolutionSet8(data),
+ Create = data => new EvolutionSet8(data.Span),
Write = evo => evo.Write(),
},
};
diff --git a/pkNX.Game/Text/TextManager.cs b/pkNX.Game/Text/TextManager.cs
index eb321cac..63efbed1 100644
--- a/pkNX.Game/Text/TextManager.cs
+++ b/pkNX.Game/Text/TextManager.cs
@@ -15,7 +15,7 @@ public class TextManager(GameVersion game, TextConfig? config = null)
public void ClearCache() => Cache.Clear();
- internal string[] GetStrings(byte[] data, bool remap = false)
+ internal string[] GetStrings(ReadOnlySpan data, bool remap = false)
{
var txt = new TextFile(data, Config, remap);
return txt.Lines;
@@ -30,9 +30,9 @@ internal string[] GetStrings(TextName file, IFileContainer textFile, bool remap
if (info == null)
throw new ArgumentException($"Unknown {nameof(TextName)} provided.", file.ToString());
- byte[] data;
+ ReadOnlySpan data;
if (textFile is FolderContainer c)
- data = c.GetFileData(info.FileName) ?? throw new ArgumentException($"File not found: {info.FileName}", nameof(textFile));
+ data = c.GetFileData(info.FileName);
else
data = textFile[info.Index];
diff --git a/pkNX.Game/Text/TextMapping.cs b/pkNX.Game/Text/TextMapping.cs
index 7331fc1c..4357b739 100644
--- a/pkNX.Game/Text/TextMapping.cs
+++ b/pkNX.Game/Text/TextMapping.cs
@@ -18,6 +18,7 @@ public static class TextMapping
SW or SH or SWSH => MapSWSH,
PLA => MapPLA,
SL or VL or SV => MapSV,
+ ZA => MapZA,
_ => throw new System.ArgumentOutOfRangeException($"No text mapping for {game}"),
};
@@ -219,4 +220,30 @@ public static class TextMapping
new("ribbon.dat", RibbonMark),
new("poke_memory_feeling.dat", MemoryFeelings),
];
+
+ private static readonly TextReference[] MapZA =
+ [
+ new("iteminfo.dat", ItemFlavor),
+ new("itemname.dat", ItemNames),
+ new("monsname.dat", SpeciesNames),
+ new("place_name_indirect.dat", metlist_00000),
+ new("place_name_spe.dat", metlist_30000),
+ new("place_name_out.dat", metlist_40000),
+ new("place_name_per.dat", metlist_60000),
+ new("seikaku.dat", Natures),
+ new("tokusei.dat", AbilityNames),
+ new("tokuseiinfo.dat", AbilityFlavor),
+ new("trname.dat", TrainerNames),
+ new("trtype.dat", TrainerClasses),
+ new("trmsg.dat", TrainerText),
+ new("typename.dat", TypeNames),
+ new("wazainfo.dat", MoveFlavor),
+ new("wazaname.dat", MoveNames),
+ new("zkn_form.dat", Forms),
+ new("zkn_type.dat", SpeciesClassifications),
+ new("zukan_comment_A.dat", PokedexEntry1),
+ new("zukan_comment_B.dat", PokedexEntry2),
+ new("ribbon.dat", RibbonMark),
+ new("poke_memory_feeling.dat", MemoryFeelings),
+ ];
}
diff --git a/pkNX.Randomization/Randomizers/FormRandomizer.cs b/pkNX.Randomization/Randomizers/FormRandomizer.cs
index 8d238aef..6902dfab 100644
--- a/pkNX.Randomization/Randomizers/FormRandomizer.cs
+++ b/pkNX.Randomization/Randomizers/FormRandomizer.cs
@@ -27,10 +27,10 @@ public int GetRandomForm(int species, bool mega, bool fuse, int generation, IPer
return (Species)species switch
{
Pikachu or Slowbro when generation >= 8 => GetValidForm(species, generation, t),
- Unown or Deerling or Sawsbuck => 31, // pure random -- todo sv see if this behavior changed
+ Unown or Deerling or Sawsbuck => 31, // pure random
Greninja when !mega => 0, // treat Ash-Greninja as a Mega
- Scatterbug or Spewpa or Vivillon => 30, // save file specific -- todo sv see if this behavior changed
- Zygarde when generation >= 7 => Util.Random.Next(4), // skip Complete Forme
+ Scatterbug or Spewpa or Vivillon => 30, // save file specific
+ Zygarde when generation >= 7 => Util.Random.Next(4), // skip Complete Form
Minior => Util.Random.Next(7), // skip Core Forms
_ when !mega && Legal.BattleMegas.Contains(species) => 0,
diff --git a/pkNX.Randomization/Randomizers/MoveRandomizer.cs b/pkNX.Randomization/Randomizers/MoveRandomizer.cs
index d7747611..03955f02 100644
--- a/pkNX.Randomization/Randomizers/MoveRandomizer.cs
+++ b/pkNX.Randomization/Randomizers/MoveRandomizer.cs
@@ -25,7 +25,7 @@ public MoveRandomizer(GameInfo config, IReadOnlyList moves, IPersonalTabl
public override void Execute() => throw new Exception("Shouldn't be called.");
- public static readonly int[] FixedDamageMoves = [49, 82];
+ public static ReadOnlySpan FixedDamageMoves => [49, 82];
public void Initialize(MovesetRandSettings settings, int[] bannedMoves)
{
@@ -41,8 +41,6 @@ public void Initialize(MovesetRandSettings settings, int[] bannedMoves)
var all = Enumerable.Range(1, Config.MaxMoveID - 1);
var moves = all.Except(banned);
- if (MoveData[0] is Move8Fake)
- moves = moves.Where(z => ((Move8Fake)MoveData[z]).CanUseMove);
RandMove = new GenericRandomizer(moves.ToArray());
}
diff --git a/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs b/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs
index bfd07e74..4f36bd7a 100644
--- a/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs
+++ b/pkNX.Randomization/Randomizers/Personal/PersonalRandomizer.cs
@@ -380,8 +380,8 @@ private void RandomizeTypeTutors(IMovesInfo_v1 z, int species)
t[i] = Rand.Next(100) < Settings.LearnTypeTutorPercent;
// Make sure Rayquaza can learn Dragon Ascent.
- if (!Game.XY && species == (int)Species.Rayquaza)
- t[7] = true;
+ //if (!Game.XY && species == (int)Species.Rayquaza)
+ // t[7] = true;
z.TypeTutors = t;
}
diff --git a/pkNX.Structures/CodePattern.cs b/pkNX.Structures/CodePattern.cs
index 2e89913d..8b215b5d 100644
--- a/pkNX.Structures/CodePattern.cs
+++ b/pkNX.Structures/CodePattern.cs
@@ -1,5 +1,4 @@
using System;
-using System.Diagnostics;
namespace pkNX.Structures;
@@ -13,67 +12,12 @@ public static class CodePattern
/// Starting offset to look from
/// Amount of entries to look through
/// Index the pattern occurs at; if not found, returns -1.
- public static int IndexOfBytes(byte[] array, byte[] pattern, int startIndex = 0, int length = -1)
+ public static int IndexOfBytes(ReadOnlySpan array, ReadOnlySpan pattern, int startIndex = 0, int length = -1)
{
- int len = pattern.Length;
- int endIndex = length > 0
- ? startIndex + length
- : array.Length - len - startIndex;
-
- endIndex = Math.Min(array.Length - pattern.Length, endIndex);
-
- int i = startIndex;
- int j = 0;
- while (true)
- {
- if (pattern[j] != array[i + j])
- {
- if (++i == endIndex)
- return -1;
- j = 0;
- }
- else if (++j == len)
- {
- return i;
- }
- }
- }
-
- ///
- /// Finds a provided within the supplied .
- ///
- /// Array to look in
- /// Pattern to look for
- /// Wildcard byte to be ignored, incrementally as bitflags.
- /// Starting offset to look from
- /// Amount of entries to look through
- /// Index the pattern occurs at; if not found, returns -1.
- public static int IndexOfPattern(byte[] array, byte[] pattern, ulong wildCard, int startIndex = 0, int length = -1)
- {
- Debug.Assert(pattern.Length <= 8*sizeof(ulong));
-
- int len = pattern.Length;
- int endIndex = length > 0
- ? startIndex + length
- : array.Length - len - startIndex;
-
- endIndex = Math.Min(array.Length - pattern.Length, endIndex);
-
- int i = startIndex;
- int j = 0;
- while (true)
- {
- if (pattern[j] != array[i + j] && ((wildCard >> j) & 1) == 0)
- {
- if (++i == endIndex)
- return -1;
- j = 0;
- }
- else if (++j == len)
- {
- return i;
- }
- }
+ var span = array[startIndex..];
+ if (length > 0 && length < span.Length)
+ span = span[..length];
+ return span.IndexOf(pattern) + startIndex;
}
///
diff --git a/pkNX.Structures/EggMove/EggMoves2.cs b/pkNX.Structures/EggMove/EggMoves2.cs
deleted file mode 100644
index 508b5a6b..00000000
--- a/pkNX.Structures/EggMove/EggMoves2.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-using System.Linq;
-
-namespace pkNX.Structures;
-
-public sealed class EggMoves2 : EggMoves
-{
- private EggMoves2(byte[] data) : base(data.Select(i => (int)i).ToArray()) { }
-
- public static EggMoves[] GetArray(byte[] data, int count)
- {
- int[] ptrs = new int[count + 1];
- int baseOffset = (data[1] << 8 | data[0]) - (count * 2);
- for (int i = 1; i < ptrs.Length; i++)
- {
- var ofs = (i - 1) * 2;
- ptrs[i] = (data[ofs + 1] << 8 | data[ofs]) - baseOffset;
- }
-
- EggMoves[] entries = new EggMoves[count + 1];
- entries[0] = new EggMoves2([]);
- for (int i = 1; i < entries.Length; i++)
- entries[i] = new EggMoves2(data.Skip(ptrs[i]).TakeWhile(b => b != 0xFF).ToArray());
-
- return entries;
- }
-}
diff --git a/pkNX.Structures/EggMove/EggMoves6.cs b/pkNX.Structures/EggMove/EggMoves6.cs
deleted file mode 100644
index bd825279..00000000
--- a/pkNX.Structures/EggMove/EggMoves6.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using System;
-
-namespace pkNX.Structures;
-
-public sealed class EggMoves6 : EggMoves
-{
- private static readonly EggMoves6 None = new([]);
-
- private EggMoves6(int[] moves) : base(moves) { }
-
- private static EggMoves6 Get(byte[] data)
- {
- if (data.Length < 2 || data.Length % 2 != 0)
- return None;
-
- int count = BitConverter.ToInt16(data, 0);
- var moves = new int[count];
- for (int i = 0; i < moves.Length; i++)
- moves[i] = BitConverter.ToInt16(data, 2 + (i * 2));
- return new EggMoves6(moves);
- }
-
- public static EggMoves6[] GetArray(byte[][] entries)
- {
- EggMoves6[] data = new EggMoves6[entries.Length];
- for (int i = 0; i < data.Length; i++)
- data[i] = Get(entries[i]);
- return data;
- }
-}
diff --git a/pkNX.Structures/Encounter/EncounterStatic.cs b/pkNX.Structures/Encounter/EncounterStatic.cs
index 27913301..1b60cadd 100644
--- a/pkNX.Structures/Encounter/EncounterStatic.cs
+++ b/pkNX.Structures/Encounter/EncounterStatic.cs
@@ -1,11 +1,12 @@
+using System;
using System.Linq;
namespace pkNX.Structures;
-public abstract class EncounterStatic(byte[] data)
+public abstract class EncounterStatic(Memory raw)
{
- protected readonly byte[] Data = data;
- public virtual byte[] Write() => (byte[])Data.Clone();
+ protected Span Data => raw.Span;
+ public virtual byte[] Write() => Data.ToArray();
public abstract Species Species { get; set; }
public virtual int HeldItem { get; set; }
diff --git a/pkNX.Structures/Encounter/Gen6/EncounterGift6AO.cs b/pkNX.Structures/Encounter/Gen6/EncounterGift6AO.cs
deleted file mode 100644
index 65fbf951..00000000
--- a/pkNX.Structures/Encounter/Gen6/EncounterGift6AO.cs
+++ /dev/null
@@ -1,46 +0,0 @@
-using System;
-
-namespace pkNX.Structures;
-
-public class EncounterGift6AO(byte[] data) : EncounterGift(data)
-{
- public const int SIZE = 0x24;
- public EncounterGift6AO() : this(new byte[SIZE]) { }
-
- public override Species Species { get => (Species)BitConverter.ToUInt16(Data, 0x00); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x00); }
- public int Unk02 { get => BitConverter.ToUInt16(Data, 0x02); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x02); }
- public override int Form { get => Data[0x04]; set => Data[0x04] = (byte)value; }
- public override int Level { get => Data[0x05]; set => Data[0x05] = (byte)value; }
- public override int Ability { get => (sbyte)Data[0x06]; set => Data[0x06] = (byte)value; }
- public override Nature Nature { get => (Nature)Data[0x07]; set => Data[0x07] = (byte)value; }
- public override Shiny Shiny { get => (Shiny)Data[0x08]; set => Data[0x08] = (byte)value; }
-
- // padding?
- public int Unk09 { get => Data[0x09]; set => Data[0x09] = (byte)value; }
- public int Unk0A { get => Data[0x0A]; set => Data[0x0A] = (byte)value; }
- public int Unk0B { get => Data[0x0B]; set => Data[0x0B] = (byte)value; }
-
- public override int HeldItem { get => BitConverter.ToUInt16(Data, 0x0C); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0C); }
- public override FixedGender Gender { get => (FixedGender)Data[0x10]; set => Data[0x10] = (byte)value; }
-
- // padding?
- public int Unk11 { get => (sbyte)Data[0x11]; set => Data[0x11] = (byte)value; }
- public short MetLocation { get => BitConverter.ToInt16(Data, 0x12); set => BitConverter.GetBytes(value).CopyTo(Data, 0x12); }
- public int Move { get => BitConverter.ToUInt16(Data, 0x14); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x14); }
-
- public override int IV_HP { get => (sbyte)Data[0x16]; set => Data[0x16] = (byte)value; }
- public override int IV_ATK { get => (sbyte)Data[0x17]; set => Data[0x17] = (byte)value; }
- public override int IV_DEF { get => (sbyte)Data[0x18]; set => Data[0x18] = (byte)value; }
- public override int IV_SPA { get => (sbyte)Data[0x19]; set => Data[0x19] = (byte)value; }
- public override int IV_SPD { get => (sbyte)Data[0x1A]; set => Data[0x1A] = (byte)value; }
- public override int IV_SPE { get => (sbyte)Data[0x1B]; set => Data[0x1B] = (byte)value; }
-
- public int CNT_Cool { get => (sbyte)Data[0x1C]; set => Data[0x1C] = (byte)value; }
- public int CNT_Beauty { get => (sbyte)Data[0x1D]; set => Data[0x1D] = (byte)value; }
- public int CNT_Cute { get => (sbyte)Data[0x1E]; set => Data[0x1E] = (byte)value; }
- public int CNT_Smart { get => (sbyte)Data[0x1F]; set => Data[0x1F] = (byte)value; }
- public int CNT_Tough { get => (sbyte)Data[0x20]; set => Data[0x20] = (byte)value; }
- public int CNT_Sheen { get => (sbyte)Data[0x21]; set => Data[0x21] = (byte)value; }
-
- public int Unk22 { get => (sbyte)Data[0x22]; set => Data[0x22] = (byte)value; }
-}
diff --git a/pkNX.Structures/Encounter/Gen6/EncounterGift6XY.cs b/pkNX.Structures/Encounter/Gen6/EncounterGift6XY.cs
deleted file mode 100644
index 132dc9d1..00000000
--- a/pkNX.Structures/Encounter/Gen6/EncounterGift6XY.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-using System;
-
-namespace pkNX.Structures;
-
-public class EncounterGift6XY(byte[] data) : EncounterGift(data)
-{
- public const int SIZE = 0x18;
- public EncounterGift6XY() : this(new byte[SIZE]) { }
-
- public override Species Species { get => (Species)BitConverter.ToUInt16(Data, 0x00); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x00); }
- public int Unk_02 { get => BitConverter.ToUInt16(Data, 0x02); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x02); }
- public override int Form { get => Data[0x04]; set => Data[0x04] = (byte) value; }
- public override int Level { get => Data[0x05]; set => Data[0x05] = (byte)value; }
- public override int Ability { get => (sbyte)Data[0x06]; set => Data[0x06] = (byte)value; }
- public override Nature Nature { get => (Nature)Data[0x07]; set => Data[0x07] = (byte)value; }
- public override Shiny Shiny { get => (Shiny)Data[0x08]; set => Data[0x08] = (byte)value; }
-
- // padding
- public int Unk_09 { get => Data[0x09]; set => Data[0x09] = (byte)value; }
- public int Unk_0A { get => Data[0x0A]; set => Data[0x0A] = (byte)value; }
- public int Unk_0B { get => Data[0x0B]; set => Data[0x0B] = (byte)value; }
-
- public override int HeldItem { get => BitConverter.ToUInt16(Data, 0x0C); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0C); }
- public override FixedGender Gender { get => (FixedGender)Data[0x10]; set => Data[0x10] = (byte)value; }
-
- public override int IV_HP { get => (sbyte)Data[0x11]; set => Data[0x11] = (byte)value; }
- public override int IV_ATK { get => (sbyte)Data[0x12]; set => Data[0x12] = (byte)value; }
- public override int IV_DEF { get => (sbyte)Data[0x13]; set => Data[0x13] = (byte)value; }
- public override int IV_SPA { get => (sbyte)Data[0x14]; set => Data[0x14] = (byte)value; }
- public override int IV_SPD { get => (sbyte)Data[0x15]; set => Data[0x15] = (byte)value; }
- public override int IV_SPE { get => (sbyte)Data[0x16]; set => Data[0x16] = (byte)value; }
-
- // padding
- public int Unk_17 { get => (sbyte)Data[0x17]; set => Data[0x17] = (byte)value; }
-}
diff --git a/pkNX.Structures/Encounter/Gen6/EncounterStatic6.cs b/pkNX.Structures/Encounter/Gen6/EncounterStatic6.cs
deleted file mode 100644
index f6facc92..00000000
--- a/pkNX.Structures/Encounter/Gen6/EncounterStatic6.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using System;
-
-namespace pkNX.Structures.Encounter;
-
-public sealed class EncounterStatic6(byte[] data) : EncounterStatic(data)
-{
- private const int SIZE = 0xC;
- public EncounterStatic6() : this(new byte[SIZE]) { }
-
- public override Species Species { get => (Species)BitConverter.ToUInt16(Data, 0x0); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0); }
- public override int Form { get => Data[0x2]; set => Data[0x2] = (byte)value; }
- public override int Level { get => Data[0x3]; set => Data[0x3] = (byte)value; }
-
- public override int HeldItem
- {
- get => Math.Max(0, (int)BitConverter.ToInt16(Data, 0x4));
- set => BitConverter.GetBytes((short)(value <= 0 ? -1 : value)).CopyTo(Data, 0x4);
- }
-
- public override Shiny Shiny
- {
- get => (Shiny)(Data[0x6] & 3);
- set => Data[0x6] = (byte)((Data[0x6] & ~3) | ((byte)value & 3));
- }
-
- public override FixedGender Gender
- {
- get => (FixedGender)((Data[0x6] & 0x0C) >> 2);
- set => Data[0x6] = (byte)((Data[0x6] & ~0xC) | (((byte)value & 3) << 2));
- }
-
- public override int Ability
- {
- get => (Data[0x6] & 0x70) >> 4;
- set => Data[0x6] = (byte)((Data[0x6] & ~0x70) | ((value & 7) << 4));
- }
-
- public override bool IV3
- {
- get => (Data[0x7] & 1) >> 0 == 1;
- set => Data[0x7] = (byte)((Data[0x7] & ~1) | (value ? 1 : 0));
- }
-
- public bool IV3_1
- {
- get => (Data[0x7] & 2) >> 1 == 1;
- set => Data[0x7] = (byte)((Data[0x7] & ~2) | (value ? 2 : 0));
- }
-}
diff --git a/pkNX.Structures/Encounter/Gen7/EncounterGift7.cs b/pkNX.Structures/Encounter/Gen7/EncounterGift7.cs
deleted file mode 100644
index 26c9f09e..00000000
--- a/pkNX.Structures/Encounter/Gen7/EncounterGift7.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System;
-
-namespace pkNX.Structures;
-
-public class EncounterGift7(byte[] data) : EncounterGift(data)
-{
- public const int SIZE = 0x14;
- public EncounterGift7() : this(new byte[SIZE]) { }
-
- public override Species Species { get => (Species)BitConverter.ToUInt16(Data, 0x0); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0); }
- public override int Form { get => Data[0x2]; set => Data[0x2] = (byte)value; }
- public override int Level { get => Data[0x3]; set => Data[0x3] = (byte)value; }
-
- public override Shiny Shiny { get => (Shiny)Data[0x4]; set => Data[0x4] = (byte)value; }
- public override FixedGender Gender { get => (FixedGender)Data[0x5]; set => Data[0x5] = (byte)value; }
- public override int Ability { get => (sbyte)Data[0x6]; set => Data[0x6] = (byte)value; }
- public override Nature Nature { get => (Nature)Data[0x7]; set => Data[0x7] = (byte)value; }
-
- public override int HeldItem { get => BitConverter.ToUInt16(Data, 0x8); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x8); }
-
- public bool IsEgg { get => Data[0xA] == 1; set => Data[0xA] = value ? (byte)1 : (byte)0; }
-
- public int SpecialMove { get => BitConverter.ToUInt16(Data, 0xC); set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0xC); }
-
- public override bool IV3 => (sbyte)Data[0xE] < 0 && (sbyte)Data[0xE] + 1 == -3;
- public override int IV_HP { get; set; } = -1;
- public override int IV_ATK { get; set; } = -1;
- public override int IV_DEF { get; set; } = -1;
- public override int IV_SPE { get; set; } = -1;
- public override int IV_SPA { get; set; } = -1;
- public override int IV_SPD { get; set; } = -1;
-}
diff --git a/pkNX.Structures/Encounter/Gen7/EncounterStatic7.cs b/pkNX.Structures/Encounter/Gen7/EncounterStatic7.cs
deleted file mode 100644
index 3c56dde1..00000000
--- a/pkNX.Structures/Encounter/Gen7/EncounterStatic7.cs
+++ /dev/null
@@ -1,133 +0,0 @@
-using System;
-
-namespace pkNX.Structures;
-
-public sealed class EncounterStatic7(byte[] data) : EncounterStatic(data)
-{
- public const int SIZE = 0x38;
- public EncounterStatic7() : this(new byte[SIZE]) { }
-
- public override Species Species
- {
- get => (Species)BitConverter.ToUInt16(Data, 0x0);
- set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x0);
- }
-
- public override int Form
- {
- get => Data[0x2];
- set => Data[0x2] = (byte)value;
- }
-
- public override int Level
- {
- get => Data[0x3];
- set => Data[0x3] = (byte)value;
- }
-
- public override int HeldItem
- {
- get => Math.Max(0, (int)BitConverter.ToInt16(Data, 0x4));
- set => BitConverter.GetBytes((short)(value <= 0 ? -1 : value)).CopyTo(Data, 0x4);
- }
-
- public override Shiny Shiny
- {
- get => (Shiny) (Data[0x6] & 3);
- set => Data[0x6] = (byte)((Data[0x6] & ~3) | ((byte)value & 3));
- }
-
- public override FixedGender Gender
- {
- get => (FixedGender)((Data[0x6] & 0x0C) >> 2);
- set => Data[0x6] = (byte)((Data[0x6] & ~0xC) | (((byte)value & 3) << 2));
- }
-
- public override int Ability
- {
- get => (Data[0x6] & 0x70) >> 4;
- set => Data[0x6] = (byte)((Data[0x6] & ~0x70) | ((value & 7) << 4));
- }
-
- public bool Unk7_0
- {
- get => (Data[0x7] & 1) >> 0 == 1;
- set => Data[0x7] = (byte)((Data[0x7] & ~1) | (value ? 1 : 0));
- }
-
- public bool Unk7_1
- {
- get => (Data[0x7] & 2) >> 1 == 1;
- set => Data[0x7] = (byte)((Data[0x7] & ~2) | (value ? 2 : 0));
- }
-
- public int Map
- {
- get => BitConverter.ToInt16(Data, 0x8) - 1;
- set => BitConverter.GetBytes((short)(value + 1)).CopyTo(Data, 0x8);
- }
-
- public override int[] RelearnMoves
- {
- get =>
- [
- BitConverter.ToUInt16(Data, 0xC),
- BitConverter.ToUInt16(Data, 0xE),
- BitConverter.ToUInt16(Data, 0x10),
- BitConverter.ToUInt16(Data, 0x12),
- ];
- set
- {
- if (value.Length != 4)
- return;
- for (int i = 0; i < 4; i++)
- BitConverter.GetBytes((ushort)value[i]).CopyTo(Data, 0xC + (i * 2));
- }
- }
-
- public override Nature Nature
- {
- get => (Nature)Data[0x14];
- set => Data[0x14] = (byte)value;
- }
-
- public override int IV_HP { get => (sbyte)Data[0x15]; set => Data[0x15] = (byte)value; }
- public override int IV_ATK { get => (sbyte)Data[0x16]; set => Data[0x16] = (byte)value; }
- public override int IV_DEF { get => (sbyte)Data[0x17]; set => Data[0x17] = (byte)value; }
- public override int IV_SPA { get => (sbyte)Data[0x18]; set => Data[0x18] = (byte)value; }
- public override int IV_SPD { get => (sbyte)Data[0x19]; set => Data[0x19] = (byte)value; }
- public override int IV_SPE { get => (sbyte)Data[0x1A]; set => Data[0x1A] = (byte)value; }
-
- public override int EV_HP { get => (sbyte)Data[0x1B]; set => Data[0x1B] = (byte)value; }
- public override int EV_ATK { get => (sbyte)Data[0x1C]; set => Data[0x1C] = (byte)value; }
- public override int EV_DEF { get => (sbyte)Data[0x1D]; set => Data[0x1D] = (byte)value; }
- public override int EV_SPA { get => (sbyte)Data[0x1E]; set => Data[0x1E] = (byte)value; }
- public override int EV_SPD { get => (sbyte)Data[0x1F]; set => Data[0x1F] = (byte)value; }
- public override int EV_SPE { get => (sbyte)Data[0x20]; set => Data[0x20] = (byte)value; }
-
- public int Aura
- {
- get => Data[0x25];
- set => Data[0x25] = (byte)value;
- }
-
- public int Allies
- {
- get => Data[0x27];
- set => Data[0x27] = (byte)value;
- }
-
- public int Ally1
- {
- get => Data[0x28];
- set => Data[0x28] = (byte)value;
- }
-
- public int Ally2
- {
- get => Data[0x2C];
- set => Data[0x2C] = (byte)value;
- }
-
- public override bool IV3 => (sbyte)Data[0x15] < 0 && (sbyte)Data[0x15] + 1 == -3;
-}
diff --git a/pkNX.Structures/Encounter/Gen7/EncounterStatic7b.cs b/pkNX.Structures/Encounter/Gen7/EncounterStatic7b.cs
index 602b9e30..c675dd70 100644
--- a/pkNX.Structures/Encounter/Gen7/EncounterStatic7b.cs
+++ b/pkNX.Structures/Encounter/Gen7/EncounterStatic7b.cs
@@ -1,20 +1,15 @@
using System;
+using static System.Buffers.Binary.BinaryPrimitives;
namespace pkNX.Structures;
-public sealed class EncounterStatic7b(byte[] data) : EncounterStatic(data)
+public sealed class EncounterStatic7b(Memory raw) : EncounterStatic(raw)
{
public const int SIZE = 0x40;
public EncounterStatic7b() : this(new byte[SIZE]) { }
- public ulong Hash => BitConverter.ToUInt64(Data, 0);
-
- public override Species Species
- {
- get => (Species)BitConverter.ToUInt16(Data, 0x08);
- set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x08);
- }
-
+ public ulong Hash { get => ReadUInt64LittleEndian(Data); set => WriteUInt64LittleEndian(Data, value); }
+ public override Species Species { get => (Species)ReadUInt16LittleEndian(Data[0x08..]); set => WriteUInt16LittleEndian(Data[0x08..], (ushort)value); }
public override int Form { get => Data[0x0A]; set => Data[0x0A] = (byte)value; }
public override int Level { get => Data[0x0B]; set => Data[0x0B] = (byte)value; }
@@ -33,47 +28,39 @@ public override Species Species
public override Nature Nature { get => (Nature)Data[0x0E]; set => Data[0x0E] = (byte)value; } // 25 = random (sets the nature rand to 1)
public override int Ability { get => Data[0x0F]; set => Data[0x0F] = (byte)value; }
- public uint[] Ptrs // 0x10-0x1F -- are these text line references?
- {
- get =>
- [
- BitConverter.ToUInt32(Data, 0x10),
- BitConverter.ToUInt32(Data, 0x14),
- BitConverter.ToUInt32(Data, 0x18),
- BitConverter.ToUInt32(Data, 0x1C),
- ];
- set { }
- }
+ // 0x10-0x1F -- are these text line references?
+ public uint Ptr0 { get => ReadUInt32LittleEndian(Data[0x10..]); set => WriteUInt32LittleEndian(Data[0x10..], value); }
+ public uint Ptr1 { get => ReadUInt32LittleEndian(Data[0x14..]); set => WriteUInt32LittleEndian(Data[0x14..], value); }
+ public uint Ptr2 { get => ReadUInt32LittleEndian(Data[0x18..]); set => WriteUInt32LittleEndian(Data[0x18..], value); }
+ public uint Ptr3 { get => ReadUInt32LittleEndian(Data[0x1C..]); set => WriteUInt32LittleEndian(Data[0x1C..], value); }
+
+ public ushort RelearnMove1 { get => ReadUInt16LittleEndian(Data[0x20..]); set => WriteUInt16LittleEndian(Data[0x20..], value); }
+ public ushort RelearnMove2 { get => ReadUInt16LittleEndian(Data[0x22..]); set => WriteUInt16LittleEndian(Data[0x22..], value); }
+ public ushort RelearnMove3 { get => ReadUInt16LittleEndian(Data[0x24..]); set => WriteUInt16LittleEndian(Data[0x24..], value); }
+ public ushort RelearnMove4 { get => ReadUInt16LittleEndian(Data[0x26..]); set => WriteUInt16LittleEndian(Data[0x26..], value); }
public override int[] RelearnMoves // 0x20-0x27 -- these are actually just moves
{
get =>
[
- BitConverter.ToUInt16(Data, 0x20),
- BitConverter.ToUInt16(Data, 0x22),
- BitConverter.ToUInt16(Data, 0x24),
- BitConverter.ToUInt16(Data, 0x26),
+ RelearnMove1,
+ RelearnMove2,
+ RelearnMove3,
+ RelearnMove4
];
set
{
if (value.Length != 4)
return;
- for (int i = 0; i < 4; i++)
- BitConverter.GetBytes((ushort)value[i]).CopyTo(Data, 0x20 + (i * 2));
+ RelearnMove1 = (ushort)value[0];
+ RelearnMove2 = (ushort)value[1];
+ RelearnMove3 = (ushort)value[2];
+ RelearnMove4 = (ushort)value[3];
}
}
- public int V1
- {
- get => BitConverter.ToInt16(Data, 0x28);
- set => BitConverter.GetBytes((short)value).CopyTo(Data, 0x28);
- }
-
- public int V2
- {
- get => BitConverter.ToInt16(Data, 0x2A);
- set => BitConverter.GetBytes((short)value).CopyTo(Data, 0x2A);
- }
+ public ushort V1 { get => ReadUInt16LittleEndian(Data[0x28..]); set => WriteUInt16LittleEndian(Data[0x28..], value); }
+ public ushort V2 { get => ReadUInt16LittleEndian(Data[0x2A..]); set => WriteUInt16LittleEndian(Data[0x2A..], value); }
// 0x2C-0x31
public override int IV_HP { get => (sbyte)Data[0x2C]; set => Data[0x2C] = (byte)value; }
diff --git a/pkNX.Structures/Evolution/EvolutionSet6.cs b/pkNX.Structures/Evolution/EvolutionSet6.cs
deleted file mode 100644
index 392b1d5a..00000000
--- a/pkNX.Structures/Evolution/EvolutionSet6.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-
-namespace pkNX.Structures;
-
-///
-/// Generation 6 Evolution Branch Entries
-///
-public class EvolutionSet6 : EvolutionSet
-{
- private const int ENTRY_SIZE = 6;
- private const int ENTRY_COUNT = 8;
- public const int SIZE = ENTRY_COUNT * ENTRY_SIZE;
- private static readonly HashSet argEvos = [6, 8, 16, 17, 18, 19, 20, 21, 22, 29, 30, 32, 33, 34];
-
- public EvolutionSet6(byte[] data)
- {
- if (data.Length != SIZE)
- return;
- PossibleEvolutions = data.GetArray(GetEvo, SIZE);
- }
-
- private static EvolutionMethod GetEvo(byte[] data, int offset)
- {
- var method = (EvolutionType)BitConverter.ToUInt16(data, offset + 0);
- var level = (byte)BitConverter.ToUInt16(data, offset + 2);
-
- var evo = new EvolutionMethod
- {
- Method = method,
- Argument = (argEvos.Contains((int)method) ? (byte)0 : level), // Argument is used by both Level argument and Item/Move/etc. Clear if appropriate.
- Species = BitConverter.ToUInt16(data, offset + 4),
- Level = level,
- };
-
- return evo;
- }
-
- public override byte[] Write()
- {
- using var ms = new MemoryStream();
- using var bw = new BinaryWriter(ms);
- foreach (EvolutionMethod evo in PossibleEvolutions)
- {
- bw.Write((ushort)evo.Method);
- bw.Write((ushort)evo.Argument);
- bw.Write((ushort)evo.Species);
- }
- return ms.ToArray();
- }
-}
diff --git a/pkNX.Structures/Evolution/EvolutionType.cs b/pkNX.Structures/Evolution/EvolutionType.cs
index abdc8689..6979ef84 100644
--- a/pkNX.Structures/Evolution/EvolutionType.cs
+++ b/pkNX.Structures/Evolution/EvolutionType.cs
@@ -157,7 +157,7 @@ public static class EvolutionTypeExtensions
LevelUpKnowMoveEC25 => true,
LevelUpRecoilDamageMale => true,
LevelUpRecoilDamageFemale => true,
- Hisui => false, // todo sv
+ Hisui => false,
UseItemFullMoon => false,
UseMoveAgileStyle => false,
diff --git a/pkNX.Structures/Evolution/SeedPokeTable.cs b/pkNX.Structures/Evolution/SeedPokeTable.cs
index f70d5c02..9997551d 100644
--- a/pkNX.Structures/Evolution/SeedPokeTable.cs
+++ b/pkNX.Structures/Evolution/SeedPokeTable.cs
@@ -9,11 +9,11 @@ public sealed class SeedPokeTable
{
private readonly ushort[] Table;
- public SeedPokeTable(byte[] data)
+ public SeedPokeTable(ReadOnlySpan data)
{
Table = new ushort[data.Length/2];
for (int i = 0; i < Table.Length; i++)
- Table[i] = BitConverter.ToUInt16(data, i * 2);
+ Table[i] = BitConverter.ToUInt16(data.Slice(i * 2, 2));
}
public ushort this[int index] => Table[index];
diff --git a/pkNX.Structures/Evolution/ZukanEvolutionTable.cs b/pkNX.Structures/Evolution/ZukanEvolutionTable.cs
index ed42f530..4b590d15 100644
--- a/pkNX.Structures/Evolution/ZukanEvolutionTable.cs
+++ b/pkNX.Structures/Evolution/ZukanEvolutionTable.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Linq;
+using static System.Buffers.Binary.BinaryPrimitives;
namespace pkNX.Structures;
@@ -9,17 +10,17 @@ public sealed class ZukanEvolutionTable
private const int SIZE = 0x14;
private readonly ushort[][] Table;
- public ZukanEvolutionTable(byte[] data)
+ public ZukanEvolutionTable(ReadOnlySpan data)
{
if (data.Length % SIZE != 0)
- throw new ArgumentException(nameof(data) + " length should be a multiple of " + SIZE);
+ throw new ArgumentException($"{nameof(data)} length should be a multiple of {SIZE}");
Table = new ushort[data.Length / SIZE][];
for (int i = 0; i < Table.Length; i++)
{
- var evos = new ushort[(SIZE / 2) - 1];
+ var evos = Table[i] = new ushort[(SIZE / 2) - 1];
for (int j = 0; j < evos.Length; j++)
- evos[i] = BitConverter.ToUInt16(data, (i * SIZE) + (j * 2));
+ evos[i] = ReadUInt16LittleEndian(data.Slice((i * SIZE) + (j * 2), 2));
}
}
diff --git a/pkNX.Structures/GameUtil.cs b/pkNX.Structures/GameUtil.cs
index 7add85d6..27eed47e 100644
--- a/pkNX.Structures/GameUtil.cs
+++ b/pkNX.Structures/GameUtil.cs
@@ -1,5 +1,3 @@
-using System;
-using System.Linq;
using static pkNX.Structures.GameVersion;
namespace pkNX.Structures;
@@ -9,67 +7,6 @@ namespace pkNX.Structures;
///
public static class GameUtil
{
- ///
- /// List of possible values that are stored in PKM data.
- ///
- /// Ordered roughly by most recent games first.
- public static readonly GameVersion[] GameVersions = ((GameVersion[])Enum.GetValues(typeof(GameVersion))).Where(z => z is < RB and > 0).Reverse().ToArray();
-
- ///
- /// Indicates if the value is a value used by the games or is an aggregate indicator.
- ///
- /// Game to check
- public static bool IsValidSavedVersion(this GameVersion game) => game is > 0 and <= RB;
-
- /// Determines the Version Grouping of an input Version ID
- /// Version of which to determine the group
- /// Version Group Identifier or Invalid if type cannot be determined.
- public static GameVersion GetMetLocationVersionGroup(GameVersion Version) => Version switch
- {
- // Side games
- CXD => CXD,
- GO => GO,
-
- // VC Transfers
- RD or BU or YW or GN or GD or SI or C => USUM,
-
- // Gen2 -- PK2
- GS or GSC => GSC,
-
- // Gen3
- R or S => RS,
- E => E,
- FR or LG => FR,
-
- // Gen4
- D or P => DP,
- Pt => Pt,
- HG or SS => HGSS,
-
- // Gen5
- B or W => BW,
- B2 or W2 => B2W2,
-
- // Gen6
- X or Y => XY,
- OR or AS => ORAS,
-
- // Gen7
- SN or MN => SM,
- US or UM => USUM,
- GP or GE => GG,
-
- // Gen8
- SW or SH => SWSH,
- BD or SP => BDSP,
- PLA => PLA,
-
- // Gen9
- SL or VL => SV,
-
- _ => Invalid,
- };
-
///
/// Gets a Version ID from the end of that Generation
///
@@ -136,6 +73,9 @@ public static int GetMaxSpeciesID(this GameVersion game)
return Legal.MaxSpeciesID_8a;
}
+ if (game is ZA)
+ return Legal.MaxSpeciesID_9a;
+
if (Gen9.Contains(game))
{
return Legal.MaxSpeciesID_9;
@@ -203,15 +143,10 @@ public static bool Contains(this GameVersion g1, GameVersion g2)
Gen8 => SWSH.Contains(g2) || PLA.Contains(g2),
SV => g2 is SL or VL,
- Gen9 => SV.Contains(g2),
+ ZA => g2 is ZA,
+ Gen9 => SV.Contains(g2) || ZA.Contains(g2),
_ => false,
};
}
-
- ///
- /// List of possible values within the provided .
- ///
- /// Generation to look within
- public static GameVersion[] GetVersionsInGeneration(int generation) => GameVersions.Where(z => z.GetGeneration() == generation).ToArray();
}
diff --git a/pkNX.Structures/GameVersion.cs b/pkNX.Structures/GameVersion.cs
index 2feca0e1..c038aefe 100644
--- a/pkNX.Structures/GameVersion.cs
+++ b/pkNX.Structures/GameVersion.cs
@@ -230,6 +230,10 @@ public enum GameVersion
///
VL = 51,
+ ///
+ /// Pokémon Legends: (Z-A) (NX)
+ ///
+ ZA = 52,
#endregion
// The following values are not actually stored values in pkm data,
diff --git a/pkNX.Structures/Havok/HavokCollision.cs b/pkNX.Structures/Havok/HavokCollision.cs
index 0d37e1b7..bfc66b45 100644
--- a/pkNX.Structures/Havok/HavokCollision.cs
+++ b/pkNX.Structures/Havok/HavokCollision.cs
@@ -94,24 +94,38 @@ public static AABBTree ParseAABBTree(ReadOnlySpan trcol)
ofs = variantField.Type.AlignUp(ofs + variantField.Offset);
Debug.Assert(variantField.Type.FormatType == FormatType.Pointer);
+
var meshItem = item[ReadInt32LittleEndian(data[(int)ofs..])];
ofs = meshItem.Offset;
- Debug.Assert(meshItem.Type.Name == "hknpCompressedMeshShape");
- Debug.Assert(meshItem.Type.Fields.Count == 5);
- Debug.Assert(meshItem.Type.Fields[0].Name == "data");
- var dataField = meshItem.Type.Fields[0];
- ofs = dataField.Type.AlignUp(ofs + dataField.Offset);
- Debug.Assert(dataField.Type.FormatType == FormatType.Pointer);
+ var simdTreeField = new HavokField();
+ if (meshItem.Type.Name == "hknpCompressedMeshShape")
+ {
+ Debug.Assert(meshItem.Type.Name == "hknpCompressedMeshShape");
+ Debug.Assert(meshItem.Type.Fields.Count == 5);
+ Debug.Assert(meshItem.Type.Fields[0].Name == "data");
- var dataItem = item[ReadInt32LittleEndian(data[(int)ofs..])];
- ofs = dataItem.Offset;
- Debug.Assert(dataItem.Type.Name == "hknpCompressedMeshShapeData");
- Debug.Assert(dataItem.Type.Fields.Count == 4);
- Debug.Assert(dataItem.Type.Fields[1].Name == "simdTree");
+ var dataField = meshItem.Type.Fields[0];
+ ofs = dataField.Type.AlignUp(ofs + dataField.Offset);
+ Debug.Assert(dataField.Type.FormatType == FormatType.Pointer);
+
+ var dataItem = item[ReadInt32LittleEndian(data[(int)ofs..])];
+ ofs = dataItem.Offset;
+ Debug.Assert(dataItem.Type.Name == "hknpCompressedMeshShapeData");
+ Debug.Assert(dataItem.Type.Fields.Count == 4);
+ Debug.Assert(dataItem.Type.Fields[1].Name == "simdTree");
+ simdTreeField = dataItem.Type.Fields[1];
+ ofs = simdTreeField.Type.AlignUp(ofs + simdTreeField.Offset);
+ }
+ else
+ {
+ Debug.Assert(meshItem.Type.Name == "hknpMeshShape");
+ Debug.Assert(meshItem.Type.Fields.Count == 5);
+ Debug.Assert(meshItem.Type.Fields[2].Name == "topLevelTree");
+ simdTreeField = meshItem.Type.Fields[2];
+ ofs = simdTreeField.Type.AlignUp(ofs + simdTreeField.Offset);
+ }
- var simdTreeField = dataItem.Type.Fields[1];
- ofs = simdTreeField.Type.AlignUp(ofs + simdTreeField.Offset);
Debug.Assert(simdTreeField.Type.Name == "hkcdSimdTree");
Debug.Assert(simdTreeField.Type.FormatType == FormatType.Record);
Debug.Assert(simdTreeField.Type.Fields.Count == 2);
@@ -457,6 +471,11 @@ public AABBTree(List nodes)
}
BoundingBoxRectangles = new Rectangle3D[NumBoundingBoxes];
+ ReloadBoundingBoxRectangles();
+ }
+
+ private void ReloadBoundingBoxRectangles()
+ {
var n = 0;
foreach (var node in Nodes)
{
@@ -474,11 +493,117 @@ public AABBTree(List nodes)
}
}
+ public void Scale(float x, float y, float z)
+ {
+ // Non-uniform scale about the origin. Ensure min <= max per axis after scaling.
+ foreach (var node in Nodes)
+ {
+ for (var i = 0; i < hkcdSimdTreeNode.NodeCount; i++)
+ {
+ if (!node.IsBound(i))
+ continue;
+
+ var lx = node.LoX[i] * x; var hx = node.HiX[i] * x;
+ if (lx <= hx) { node.LoX[i] = lx; node.HiX[i] = hx; } else { node.LoX[i] = hx; node.HiX[i] = lx; }
+
+ var ly = node.LoY[i] * y; var hy = node.HiY[i] * y;
+ if (ly <= hy) { node.LoY[i] = ly; node.HiY[i] = hy; } else { node.LoY[i] = hy; node.HiY[i] = ly; }
+
+ var lz = node.LoZ[i] * z; var hz = node.HiZ[i] * z;
+ if (lz <= hz) { node.LoZ[i] = lz; node.HiZ[i] = hz; } else { node.LoZ[i] = hz; node.HiZ[i] = lz; }
+ }
+ }
+ ReloadBoundingBoxRectangles();
+ }
+
+ ///
+ /// Rotate the AABB tree about the origin by Euler angles (X=Pitch, Y=Yaw, Z=Roll) in radians.
+ ///
+ /// X angle in radians
+ /// Y angle in radians
+ /// Z angle in radians
+ public void Rotate(float x, float y, float z)
+ {
+ var rot = Quaternion.CreateFromYawPitchRoll(y, x, z);
+ var rMat = Matrix4x4.CreateFromQuaternion(rot);
+
+ // Absolute value of rotation matrix for extents transform
+ var m11 = MathF.Abs(rMat.M11); var m12 = MathF.Abs(rMat.M12); var m13 = MathF.Abs(rMat.M13);
+ var m21 = MathF.Abs(rMat.M21); var m22 = MathF.Abs(rMat.M22); var m23 = MathF.Abs(rMat.M23);
+ var m31 = MathF.Abs(rMat.M31); var m32 = MathF.Abs(rMat.M32); var m33 = MathF.Abs(rMat.M33);
+
+ foreach (var node in Nodes)
+ {
+ for (var i = 0; i < hkcdSimdTreeNode.NodeCount; i++)
+ {
+ if (!node.IsBound(i))
+ continue;
+
+ var min = new Vector3(node.LoX[i], node.LoY[i], node.LoZ[i]);
+ var max = new Vector3(node.HiX[i], node.HiY[i], node.HiZ[i]);
+
+ var center = (min + max) * 0.5f;
+ var extents = (max - min) * 0.5f;
+
+ var rc = Vector3.Transform(center, rot);
+ var e = new Vector3(
+ (m11 * extents.X) + (m12 * extents.Y) + (m13 * extents.Z),
+ (m21 * extents.X) + (m22 * extents.Y) + (m23 * extents.Z),
+ (m31 * extents.X) + (m32 * extents.Y) + (m33 * extents.Z));
+
+ var newMin = rc - e;
+ var newMax = rc + e;
+
+ node.LoX[i] = newMin.X;
+ node.LoY[i] = newMin.Y;
+ node.LoZ[i] = newMin.Z;
+
+ node.HiX[i] = newMax.X;
+ node.HiY[i] = newMax.Y;
+ node.HiZ[i] = newMax.Z;
+ }
+ }
+
+ ReloadBoundingBoxRectangles();
+ }
+
+ ///
+ /// Translate the AABB tree by the given amounts.
+ ///
+ /// Amount to translate via X axis.
+ /// Amount to translate via Y axis.
+ /// Amount to translate via Z axis.
+ public void Translate(float x, float y, float z)
+ {
+ // Update the collider nodes
+ foreach (var node in Nodes)
+ {
+ for (var i = 0; i < hkcdSimdTreeNode.NodeCount; i++)
+ {
+ if (!node.IsBound(i))
+ continue;
+
+ node.LoX[i] += x;
+ node.LoY[i] += y;
+ node.LoZ[i] += z;
+
+ node.HiX[i] += x;
+ node.HiY[i] += y;
+ node.HiZ[i] += z;
+ }
+ }
+ ReloadBoundingBoxRectangles();
+ }
+
// Official logic for area-containment checks for y intersection between y+1 and y-10000.0
public bool ContainsPoint(float x, float y, float z) => ContainsPointInNode(1, x, y - 10000, y + 1, z);
public bool ContainsPoint(float x, float y, float z, float toleranceX, float toleranceY, float toleranceZ)
=> ContainsPointInNode(1, x, y - 10000, y + 1, z, toleranceX, toleranceY, toleranceZ);
+ public bool ContainsPointDirect(float x, float y, float z) => ContainsPointInNode(1, x, y, y, z);
+ public bool ContainsPointDirect(float x, float y, float z, float toleranceX, float toleranceY, float toleranceZ)
+ => ContainsPointInNode(1, x, y, y, z, toleranceX, toleranceY, toleranceZ);
+
private bool ContainsPointInNode(int nodeIndex, float x, float ly, float hy, float z, float tx = 0f, float ty = 0f, float tz = 0f)
{
if (nodeIndex == 0)
@@ -491,8 +616,8 @@ private bool ContainsPointInNode(int nodeIndex, float x, float ly, float hy, flo
continue;
if (node.LoZ[i] > node.HiZ[i] || !(node.LoZ[i] - tz <= z) || !(node.HiZ[i] + tz >= z))
continue;
- if (node.LoY[i] > node.HiY[i] || !(node.LoY[i] - ty <= hy) || !(node.HiY[i] + ty >= ly))
- continue;
+ //if (node.LoY[i] < node.HiY[i] && (!(node.LoY[i] - ty <= hy) || !(node.HiY[i] + ty >= ly)))
+ // continue;
if (node.IsLeaf)
return true;
if (ContainsPointInNode((int)node.Data[i], x, ly, hy, z, tx, ty, tz))
@@ -501,6 +626,61 @@ private bool ContainsPointInNode(int nodeIndex, float x, float ly, float hy, flo
return false;
}
+ ///
+ /// Attempts to find the floor Y beneath the given point by raycasting downward (y+1 to y-10000).
+ /// Returns true and outputs the highest LoY that is <= y when an intersecting leaf is found.
+ ///
+ public bool TryGetFloorY(float x, float y, float z, out float floorY)
+ {
+ var ly = y - 10000f;
+ var hy = y + 1f;
+ return TryFindFloorYInNode(1, x, ly, hy, z, out floorY);
+ }
+
+ private bool TryFindFloorYInNode(int nodeIndex, float x, float ly, float hy, float z, out float floorY)
+ {
+ floorY = float.NegativeInfinity;
+ if (nodeIndex == 0)
+ return false;
+
+ var node = Nodes[nodeIndex];
+ var found = false;
+ for (var i = 0; i < hkcdSimdTreeNode.NodeCount; i++)
+ {
+ // X / Z slab tests
+ if (node.LoX[i] > node.HiX[i] || !(node.LoX[i] <= x) || !(node.HiX[i] >= x))
+ continue;
+ if (node.LoZ[i] > node.HiZ[i] || !(node.LoZ[i] <= z) || !(node.HiZ[i] >= z))
+ continue;
+ // Y overlap with ray range
+ if (node.LoY[i] > node.HiY[i] || node.LoY[i] > hy || node.HiY[i] < ly)
+ continue;
+
+ if (node.IsLeaf)
+ {
+ var candidate = node.LoY[i];
+ var y0 = hy - 1f; // original y
+ if (candidate <= y0 && candidate > floorY)
+ {
+ floorY = candidate;
+ found = true;
+ }
+ }
+ else
+ {
+ if (TryFindFloorYInNode((int)node.Data[i], x, ly, hy, z, out var childY))
+ {
+ if (childY > floorY)
+ {
+ floorY = childY;
+ }
+ found = true;
+ }
+ }
+ }
+ return found;
+ }
+
public bool ContainedBy(IContainsV3f other) => other.ContainsPoint(BoundingBoxRectangles[0].X, BoundingBoxRectangles[0].Y, BoundingBoxRectangles[0].Z);
}
@@ -602,7 +782,7 @@ private struct HavokTemplateParam
public int IntValue;
public HavokTypeObject TypeValue;
- public bool IsType => Name.StartsWith('t');
+ public readonly bool IsType => Name.StartsWith('t');
}
private struct HavokField
diff --git a/pkNX.Structures/Item/Item.cs b/pkNX.Structures/Item/Item.cs
index 50573225..7b511b7b 100644
--- a/pkNX.Structures/Item/Item.cs
+++ b/pkNX.Structures/Item/Item.cs
@@ -1,150 +1,128 @@
+using System;
using System.ComponentModel;
-using System.Runtime.InteropServices;
+using static System.Buffers.Binary.BinaryPrimitives;
namespace pkNX.Structures;
-[StructLayout(LayoutKind.Sequential)]
+///
+/// Span-backed lazy access Item definition. Properties read/write directly to underlying data.
+///
public class Item
{
- public byte[] Write() => this.ToBytesClass();
- public static Item FromBytes(byte[] data) => data.ToClass- ();
+ private readonly Memory Raw;
+ private Span Data => Raw.Span;
+ public const int SIZE = 0x24; // 36 bytes
+
+ // Category names
private const string Battle = "Battle";
private const string Field = "Field";
private const string Mart = "Mart";
private const string Heal = "Heal";
- #region Structure
- private ushort Price;
+ public Item() : this(new byte[SIZE]) { }
+ private Item(Memory data)
+ {
+ if (data.Length < SIZE)
+ throw new ArgumentException($"Item data must be >= {SIZE} bytes", nameof(data));
+ Raw = data[..SIZE];
+ }
- [Category(Battle)]
- public byte HeldEffect { get; set; }
+ public static Item FromBytes(Memory data) => new(data);
+ public byte[] Write() => Data.ToArray();
- public byte HeldArgument { get; set; }
- public byte NaturalGiftEffect { get; set; }
- public byte FlingEffect { get; set; }
- public byte FlingPower { get; set; }
- public byte NaturalGiftPower { get; set; }
- public ushort Packed { get; set; }
-
- [Category(Field), Description("Routine # to call when used; 0=unusable.")]
- public byte EffectField { get; set; }
-
- [Category(Battle), Description("Routine # to call when used; 0=unusable.")]
- public byte EffectBattle { get; set; } // Battle Type
-
- public byte Unk_0xC { get; set; } // 0 or 1
- public byte Unk_0xD { get; set; } // Classification (0-3 Battle, 4 Balls, 5 Mail)
- private byte Consumable { get; set; }
- public byte SortIndex { get; set; }
- public BattleStatusFlags CureInflict { get; set; } // Bitflags
- private byte Boost0; // Revive 1, Sacred Ash 3, Rare Candy 5, EvoStone 8, upper4 for BoostAtk
- private byte Boost1; // DEF, SPA
- private byte Boost2; // SPD, SPE
- private byte Boost3; // ACC, CRIT PPUpFlags
- public ItemFlags1 FunctionFlags0 { get; set; }
- public ItemFlags2 FunctionFlags1 { get; set; }
-
- [Category(Field), Description("Adds EVs to the HP stat.")]
- public sbyte EVHP { get; set; }
-
- [Category(Field), Description("Adds EVs to the Attack stat.")]
- public sbyte EVATK { get; set; }
-
- [Category(Field), Description("Adds EVs to the Defense stat.")]
- public sbyte EVDEF { get; set; }
-
- [Category(Field), Description("Adds EVs to the Speed stat.")]
- public sbyte EVSPE { get; set; }
-
- [Category(Field), Description("Adds EVs to the Sp. Attack stat.")]
- public sbyte EVSPA { get; set; }
-
- [Category(Field), Description("Adds EVs to the Sp. Defense stat.")]
- public sbyte EVSPD { get; set; }
-
- [Category(Heal), Description("Determines the healing percent, or if a flat value is used."), RefreshProperties(RefreshProperties.All)]
- public Heal HealAmount { get; set; }
-
- [Category(Field), Description("PP to be added to the move's current PP if used.")]
- public byte PPGain { get; set; }
-
- public sbyte Friendship1 { get; set; }
- public sbyte Friendship2 { get; set; }
- public sbyte Friendship3 { get; set; }
- public byte _0x23, _0x24;
+ #region Primitive Field Accessors (inline offsets)
+ private ushort Price { get => ReadUInt16LittleEndian(Data[0x00..]); set => WriteUInt16LittleEndian(Data[0x00..], value); }
+ private ushort Packed { get => ReadUInt16LittleEndian(Data[0x08..]); set => WriteUInt16LittleEndian(Data[0x08..], value); }
+ private byte Boost0 { get => Data[0x11]; set => Data[0x11] = value; }
+ private byte Boost1 { get => Data[0x12]; set => Data[0x12] = value; }
+ private byte Boost2 { get => Data[0x13]; set => Data[0x13] = value; }
+ private byte Boost3 { get => Data[0x14]; set => Data[0x14] = value; }
+ private byte Consumable { get => Data[0x0E]; set => Data[0x0E] = value; }
#endregion
+ #region Structure
+ [Category(Battle)] public byte HeldEffect { get => Data[0x02]; set => Data[0x02] = value; }
+ public byte HeldArgument { get => Data[0x03]; set => Data[0x03] = value; }
+ public byte NaturalGiftEffect { get => Data[0x04]; set => Data[0x04] = value; }
+ public byte FlingEffect { get => Data[0x05]; set => Data[0x05] = value; }
+ public byte FlingPower { get => Data[0x06]; set => Data[0x06] = value; }
+ public byte NaturalGiftPower { get => Data[0x07]; set => Data[0x07] = value; }
+
+ [Category(Field), Description("Routine # to call when used; 0=unusable.")]
+ public byte EffectField { get => Data[0x0A]; set => Data[0x0A] = value; }
+
+ [Category(Battle), Description("Routine # to call when used; 0=unusable.")]
+ public byte EffectBattle { get => Data[0x0B]; set => Data[0x0B] = value; }
+
+ public byte Unk_0xC { get => Data[0x0C]; set => Data[0x0C] = value; }
+ public byte Unk_0xD { get => Data[0x0D]; set => Data[0x0D] = value; }
+ public byte SortIndex { get => Data[0x0F]; set => Data[0x0F] = value; }
+ public BattleStatusFlags CureInflict { get => (BattleStatusFlags)Data[0x10]; set => Data[0x10] = (byte)value; }
+ public ItemFlags1 FunctionFlags0 { get => (ItemFlags1)Data[0x15]; set => Data[0x15] = (byte)value; }
+ public ItemFlags2 FunctionFlags1 { get => (ItemFlags2)Data[0x16]; set => Data[0x16] = (byte)value; }
+
+ [Category(Field), Description("Adds EVs to the HP stat.")]
+ public sbyte EVHP { get => (sbyte)Data[0x17]; set => Data[0x17] = (byte)value; }
+ [Category(Field), Description("Adds EVs to the Attack stat.")]
+ public sbyte EVATK { get => (sbyte)Data[0x18]; set => Data[0x18] = (byte)value; }
+ [Category(Field), Description("Adds EVs to the Defense stat.")]
+ public sbyte EVDEF { get => (sbyte)Data[0x19]; set => Data[0x19] = (byte)value; }
+ [Category(Field), Description("Adds EVs to the Speed stat.")]
+ public sbyte EVSPE { get => (sbyte)Data[0x1A]; set => Data[0x1A] = (byte)value; }
+ [Category(Field), Description("Adds EVs to the Sp. Attack stat.")]
+ public sbyte EVSPA { get => (sbyte)Data[0x1B]; set => Data[0x1B] = (byte)value; }
+ [Category(Field), Description("Adds EVs to the Sp. Defense stat.")]
+ public sbyte EVSPD { get => (sbyte)Data[0x1C]; set => Data[0x1C] = (byte)value; }
+
+ [Category(Heal), Description("Determines the healing percent, or if a flat value is used."), RefreshProperties(RefreshProperties.All)]
+ public Heal HealAmount { get => (Heal)Data[0x1D]; set => Data[0x1D] = (byte)value; }
+
+ [Category(Field), Description("PP to be added to the move's current PP if used.")]
+ public byte PPGain { get => Data[0x1E]; set => Data[0x1E] = value; }
+
+ public sbyte Friendship1 { get => (sbyte)Data[0x1F]; set => Data[0x1F] = (byte)value; }
+ public sbyte Friendship2 { get => (sbyte)Data[0x20]; set => Data[0x20] = (byte)value; }
+ public sbyte Friendship3 { get => (sbyte)Data[0x21]; set => Data[0x21] = (byte)value; }
+ public byte _0x22 { get => Data[0x22]; set => Data[0x22] = value; }
+ public byte _0x23 { get => Data[0x23]; set => Data[0x23] = value; }
+ #endregion
+
+ #region Derived Properties
[Category(Mart), RefreshProperties(RefreshProperties.All)]
public int BuyPrice { get => Price * 10; set => Price = (ushort)(value / 10); }
[Category(Mart), ReadOnly(true)]
public int SellPrice { get => Price * 5; set => Price = (ushort)(value / 5); }
- [Category(Battle)]
- public int NaturalGiftType { get => Packed & 0x1F; set => Packed = (ushort)((NaturalGiftEffect & ~0x1F) | value); }
+ [Category(Battle)] public int NaturalGiftType { get => Packed & 0x1F; set => Packed = (ushort)((NaturalGiftEffect & ~0x1F) | value); }
+ [Category(Battle)] public bool Flag1 { get => ((Packed >> 5) & 1) == 1; set => Packed = (ushort)((Packed & ~(1 << 5)) | ((value ? 1 : 0) << 5)); }
+ [Category(Battle)] public bool Flag2 { get => ((Packed >> 6) & 1) == 1; set => Packed = (ushort)((Packed & ~(1 << 6)) | ((value ? 1 : 0) << 6)); }
+ [Category(Field)] public int PocketField { get => (Packed >> 7) & 0xF; set => Packed = (ushort)((Packed & 0xF87F) | ((value & 0xF) << 7)); }
+ [Category(Battle)] public BattlePocket PocketBattle { get => (BattlePocket)(Packed >> 11); set => Packed = (ushort)((Packed & 0x077F) | (((byte)value & 0x1F) << 11)); }
- [Category(Battle)]
- public bool Flag1 { get => ((Packed >> 5) & 1) == 1; set => Packed = (ushort)((Packed & ~(1 << 5)) | ((value ? 1 : 0) << 5)); }
+ [Category(Field)] public bool Revive { get => ((Boost0 >> 0) & 1) == 0; set => Boost0 = (byte)((Boost0 & ~(1 << 0)) | ((value ? 1 : 0) << 0)); }
+ [Category(Field)] public bool ReviveAll { get => ((Boost0 >> 1) & 1) == 1; set => Boost0 = (byte)((Boost0 & ~(1 << 1)) | ((value ? 1 : 0) << 1)); }
+ [Category(Field)] public bool LevelUp { get => ((Boost0 >> 2) & 1) == 1; set => Boost0 = (byte)((Boost0 & ~(1 << 2)) | ((value ? 1 : 0) << 2)); }
+ [Category(Field)] public bool EvoStone { get => ((Boost0 >> 3) & 1) == 1; set => Boost0 = (byte)((Boost0 & ~(1 << 3)) | ((value ? 1 : 0) << 3)); }
- [Category(Battle)]
- public bool Flag2 { get => ((Packed >> 6) & 1) == 1; set => Packed = (ushort)((Packed & ~(1 << 6)) | ((value ? 1 : 0) << 6)); }
-
- [Category(Field)]
- public int PocketField { get => (Packed >> 7) & 0xF; set => Packed = (ushort)((Packed & 0xF87F) | ((value & 0xF) << 7)); }
-
- [Category(Battle)]
- public BattlePocket PocketBattle { get => (BattlePocket)(Packed >> 11); set => Packed = (ushort)((Packed & 0x077F) | (((byte)value & 0x1F) << 11)); }
-
- [Category(Field)]
- public bool Revive { get => ((Boost0 >> 0) & 1) == 0; set => Boost0 = (byte)((Boost0 & ~(1 << 0)) | ((value ? 1 : 0) << 0)); }
-
- [Category(Field)]
- public bool ReviveAll { get => ((Boost0 >> 1) & 1) == 1; set => Boost0 = (byte)((Boost0 & ~(1 << 1)) | ((value ? 1 : 0) << 1)); }
-
- [Category(Field)]
- public bool LevelUp { get => ((Boost0 >> 2) & 1) == 1; set => Boost0 = (byte)((Boost0 & ~(1 << 2)) | ((value ? 1 : 0) << 2)); }
-
- [Category(Field)]
- public bool EvoStone { get => ((Boost0 >> 3) & 1) == 1; set => Boost0 = (byte)((Boost0 & ~(1 << 3)) | ((value ? 1 : 0) << 3)); }
-
- [Category(Battle)]
- public int BoostATK { get => Boost0 >> 4; set => Boost0 = (byte)((Boost0 & 0xF) | (value << 4)); }
-
- [Category(Battle)]
- public int BoostDEF { get => Boost1 & 0xF; set => Boost1 = (byte)((Boost1 & ~0xF) | (value & 0xF)); }
-
- [Category(Battle)]
- public int BoostSPA { get => Boost1 >> 4; set => Boost1 = (byte)((Boost1 & 0xF) | (value << 4)); }
-
- [Category(Battle)]
- public int BoostSPD { get => Boost2 & 0xF; set => Boost2 = (byte)((Boost2 & ~0xF) | (value & 0xF)); }
-
- [Category(Battle)]
- public int BoostSPE { get => Boost2 >> 4; set => Boost2 = (byte)((Boost2 & 0xF) | (value << 4)); }
-
- [Category(Battle)]
- public int BoostACC { get => Boost3 & 0xF; set => Boost3 = (byte)((Boost3 & ~0xF) | (value & 0xF)); }
-
- [Category(Battle)]
- public int BoostCRIT { get => (Boost3 >> 4) & 3; set => Boost3 = (byte)((Boost3 & ~0x30) | ((value & 3) << 4)); }
-
- [Category(Battle)]
- public int BoostPP1 { get => (Boost3 >> 6) & 1; set => Boost3 = (byte)((Boost3 & 0xBF) | ((value & 1) << 6)); }
-
- [Category(Battle)]
- public int BoostPPMax { get => (Boost3 >> 7) & 1; set => Boost3 = (byte)((Boost3 & 0x7F) | ((value & 1) << 7)); }
+ [Category(Battle)] public int BoostATK { get => Boost0 >> 4; set => Boost0 = (byte)((Boost0 & 0xF) | (value << 4)); }
+ [Category(Battle)] public int BoostDEF { get => Boost1 & 0xF; set => Boost1 = (byte)((Boost1 & ~0xF) | (value & 0xF)); }
+ [Category(Battle)] public int BoostSPA { get => Boost1 >> 4; set => Boost1 = (byte)((Boost1 & 0xF) | (value << 4)); }
+ [Category(Battle)] public int BoostSPD { get => Boost2 & 0xF; set => Boost2 = (byte)((Boost2 & ~0xF) | (value & 0xF)); }
+ [Category(Battle)] public int BoostSPE { get => Boost2 >> 4; set => Boost2 = (byte)((Boost2 & 0xF) | (value << 4)); }
+ [Category(Battle)] public int BoostACC { get => Boost3 & 0xF; set => Boost3 = (byte)((Boost3 & ~0xF) | (value & 0xF)); }
+ [Category(Battle)] public int BoostCRIT { get => (Boost3 >> 4) & 3; set => Boost3 = (byte)((Boost3 & ~0x30) | ((value & 3) << 4)); }
+ [Category(Battle)] public int BoostPP1 { get => (Boost3 >> 6) & 1; set => Boost3 = (byte)((Boost3 & 0xBF) | ((value & 1) << 6)); }
+ [Category(Battle)] public int BoostPPMax { get => (Boost3 >> 7) & 1; set => Boost3 = (byte)((Boost3 & 0x7F) | ((value & 1) << 7)); }
[Category(Heal), Description("Raw value of the Heal enum."), RefreshProperties(RefreshProperties.All)]
- public int HealValue
- {
- get => (int)HealAmount;
- set => HealAmount = (Heal)value;
- }
+ public int HealValue { get => (int)HealAmount; set => HealAmount = (Heal)value; }
[Category(Heal), Description("Item is consumed when used."), RefreshProperties(RefreshProperties.All)]
public bool UseConsume { get => (Consumable & 0xF) != 0; set => Consumable = (byte)((Consumable & 0xF0) | (value ? 1 : 0)); }
[Category(Heal), Description("Item is not consumed when used."), RefreshProperties(RefreshProperties.All)]
public bool UseKeep { get => (Consumable & 0xF0) != 0; set => Consumable = (byte)((Consumable & 0x0F) | (value ? 0x10 : 0)); }
+ #endregion
}
diff --git a/pkNX.Structures/Item/Item8.cs b/pkNX.Structures/Item/Item8.cs
index 220510bb..b2deac72 100644
--- a/pkNX.Structures/Item/Item8.cs
+++ b/pkNX.Structures/Item/Item8.cs
@@ -1,29 +1,21 @@
using System;
+using static System.Buffers.Binary.BinaryPrimitives;
namespace pkNX.Structures;
-public class Item8(int id, byte[] data)
+public class Item8(int id, Memory Raw)
{
+ public Span Data => Raw.Span;
+
private const int SIZE = 0x30;
public readonly int ItemID = id;
- public readonly byte[] Data = data;
-
- public uint Price
- {
- get => BitConverter.ToUInt32(Data, 0x00);
- set => BitConverter.GetBytes(value).CopyTo(Data, 0x00);
- }
-
- public uint PriceWatts
- {
- get => BitConverter.ToUInt32(Data, 0x04);
- set => BitConverter.GetBytes(value).CopyTo(Data, 0x04);
- }
+ public uint Price { get => ReadUInt32LittleEndian(Data); set => WriteUInt32LittleEndian(Data, value); }
+ public uint PriceWatts { get => ReadUInt16LittleEndian(Data[0x04..]); set => WriteUInt32LittleEndian(Data[0x04..], value); }
public uint PriceAlternate // BP, Dynite Ore
{
- get => BitConverter.ToUInt32(Data, 0x08);
- set => BitConverter.GetBytes(value).CopyTo(Data, 0x08);
+ get => ReadUInt16LittleEndian(Data[(0x08)..]);
+ set => WriteUInt32LittleEndian(Data[(0x08)..], value);
}
public PouchID Pouch
@@ -40,8 +32,8 @@ public byte EffectField
public int ItemSprite
{
- get => BitConverter.ToInt16(Data, 0x1A);
- set => BitConverter.GetBytes((ushort)value).CopyTo(Data, 0x1A);
+ get => BitConverter.ToUInt16(Data.Slice(0x1A, 2));
+ set => BitConverter.GetBytes((ushort)value).CopyTo(Data.Slice(0x1A, 2));
}
public GroupIndexType GroupType
@@ -86,40 +78,47 @@ public byte Boost3
set => Data[0x22] = value;
}
- public static Item8[] GetArray(byte[] bin)
+ public static Item8[] GetArray(ReadOnlySpan bin)
{
- int numEntries = BitConverter.ToUInt16(bin, 0);
- int maxEntryIndex = BitConverter.ToUInt16(bin, 4);
- int entriesStart = (int)BitConverter.ToUInt32(bin, 0x40);
+ int numEntries = ReadUInt16LittleEndian(bin);
+ int maxEntryIndex = ReadUInt16LittleEndian(bin[4..]);
+ int entriesStart = ReadInt32LittleEndian(bin[0x40..]);
var result = new Item8[numEntries];
for (var i = 0; i < result.Length; i++)
{
- var entryIndex = BitConverter.ToUInt16(bin, 0x44 + (2 * i));
- if (entryIndex >= maxEntryIndex) { throw new IndexOutOfRangeException(); }
- result[i] = new Item8(i, bin.Slice(entriesStart + (entryIndex * SIZE), SIZE));
+ var entryIndex = ReadUInt16LittleEndian(bin[(0x44 + (2 * i))..]);
+ if (entryIndex >= maxEntryIndex)
+ throw new IndexOutOfRangeException();
+
+ var ofs = entriesStart + (entryIndex * SIZE);
+ result[i] = new Item8(i, bin.Slice(ofs, SIZE).ToArray());
}
return result;
}
- public static byte[] SetArray(Item8[] array, byte[] bin)
+ public static byte[] SetArray(ReadOnlySpan array, ReadOnlySpan bin)
{
- bin = (byte[])bin.Clone();
- if (array.Length != BitConverter.ToInt16(bin, 0))
+ int numEntries = ReadUInt16LittleEndian(bin);
+ if (array.Length != numEntries)
throw new ArgumentException("Incompatible sizes");
- int maxEntryIndex = BitConverter.ToUInt16(bin, 4);
- int entriesStart = (int)BitConverter.ToUInt32(bin, 0x40);
+ var result = bin.ToArray();
+ int maxEntryIndex = ReadUInt16LittleEndian(bin[4..]);
+ int entriesStart = ReadInt32LittleEndian(bin[0x40..]);
for (int i = 0; i < array.Length; i++)
{
- var entryIndex = BitConverter.ToUInt16(bin, 0x44 + (2 * i));
- if (entryIndex >= maxEntryIndex) { throw new IndexOutOfRangeException(); }
+ var entryIndex = ReadUInt16LittleEndian(bin[(0x44 + (2 * i))..]);
+ if (entryIndex >= maxEntryIndex)
+ throw new IndexOutOfRangeException();
var data = array[i].Data;
- data.CopyTo(bin, entriesStart + (entryIndex * SIZE));
+ var ofs = entriesStart + (entryIndex * SIZE);
+ var span = result.AsSpan(ofs, SIZE);
+ data.CopyTo(span);
}
- return bin;
+ return result;
}
public enum PouchID : byte
diff --git a/pkNX.Structures/Item/Item8a.cs b/pkNX.Structures/Item/Item8a.cs
index d8f69eca..ae8266eb 100644
--- a/pkNX.Structures/Item/Item8a.cs
+++ b/pkNX.Structures/Item/Item8a.cs
@@ -1,22 +1,23 @@
using System;
using System.ComponentModel;
+using static System.Buffers.Binary.BinaryPrimitives;
namespace pkNX.Structures;
-public class Item8a(int id, byte[] data)
+public class Item8a(int id, Memory Raw)
{
+ public Span Data => Raw.Span;
private const int SIZE = 0x3C;
public readonly int ItemID = id;
- public readonly byte[] Data = data;
private const string Battle = "Battle";
private const string Field = "Field";
private const string Mart = "Mart";
private const string Heal = "Heal";
- public uint Price { get => BitConverter.ToUInt32(Data, 0x00); set => BitConverter.GetBytes(value).CopyTo(Data, 0x00); }
- public uint PriceWatts { get => BitConverter.ToUInt32(Data, 0x04); set => BitConverter.GetBytes(value).CopyTo(Data, 0x04); }
- public uint MeritPrice { get => BitConverter.ToUInt32(Data, 0x08); set => BitConverter.GetBytes(value).CopyTo(Data, 0x08); }
+ public uint Price { get => ReadUInt32LittleEndian(Data); set => WriteUInt32LittleEndian(Data, value); }
+ public uint PriceWatts { get => ReadUInt16LittleEndian(Data[0x04..]); set => WriteUInt32LittleEndian(Data[0x04..], value); }
+ public uint MeritPrice { get => ReadUInt16LittleEndian(Data[(0x08)..]); set => WriteUInt32LittleEndian(Data[(0x08)..], value); }
public byte BattleEffect { get => Data[0x0C]; set => Data[0x0C] = value; }
public byte BattleArg { get => Data[0x0D]; set => Data[0x0D] = value; }
public byte BerryValue { get => Data[0x0F]; set => Data[0x0F] = value; }
@@ -41,9 +42,9 @@ public ItemFlags8a Unknown
public byte Unk_0x17 { get => Data[0x17]; set => Data[0x17] = value; }
public byte SortIndex { get => Data[0x18]; set => Data[0x18] = value; }
// 0x19 align
- public short ItemSprite { get => BitConverter.ToInt16(Data, 0x1A); set => BitConverter.GetBytes(value).CopyTo(Data, 0x1A); }
- public ushort MaxQuantity { get => BitConverter.ToUInt16(Data, 0x1C); set => BitConverter.GetBytes(value).CopyTo(Data, 0x1C); }
- public ushort Percentage { get => BitConverter.ToUInt16(Data, 0x1E); set => BitConverter.GetBytes(value).CopyTo(Data, 0x1E); }
+ public short ItemSprite { get => ReadInt16LittleEndian(Data[0x1A..]); set => WriteInt16LittleEndian(Data[0x1A..], value); }
+ public ushort MaxQuantity { get => ReadUInt16LittleEndian(Data[0x1C..]); set => WriteUInt16LittleEndian(Data[0x1C..], value); }
+ public ushort Percentage { get => ReadUInt16LittleEndian(Data[(0x1E)..]); set => WriteUInt32LittleEndian(Data[(0x1E)..], value); }
public ItemClass8a ItemGroup { get => (ItemClass8a)Data[0x20]; set => Data[0x20] = (byte)value; }
public byte Variant { get => Data[0x21]; set => Data[0x21] = value; }
// 22 unused
@@ -74,40 +75,47 @@ public ItemFlags8a Unknown
public sbyte StatChangeAmount { get => (sbyte)Data[0x3A]; set => Data[0x3A] = (byte)value; }
// 0x1B unused
- public static Item8a[] GetArray(byte[] bin)
+ public static Item8a[] GetArray(ReadOnlySpan