Misc fb fixes

This commit is contained in:
Kurt
2023-05-05 23:00:42 -07:00
parent b22ad1977d
commit 410d2c8fc5
6 changed files with 16 additions and 14 deletions

View File

@@ -11,7 +11,12 @@
namespace pkNX.Structures.FlatBuffers.Arceus;
[TypeConverter(typeof(ExpandableObjectConverter))]
public partial class PokeMisc { }
public partial class PokeMisc
{
// lazy set reference for remembering the fetched object
public PokeDropItem? DropTable { get; set; }
public PokeDropItem? AlphaDropTable { get; set; }
}
[TypeConverter(typeof(ExpandableObjectConverter))]
public partial class PokeMiscTable

View File

@@ -1,20 +1,17 @@
include "PokeDropItem.fbs";
namespace pkNX.Structures.FlatBuffers.Arceus;
attribute "fs_serializer";
table PokeMisc {
Species:int;
Form:int;
Field_02:int;
Gender:int; // 0 male/both, 1 female, 2 genderless
ScaleFactor:float = 1; // scale factor when not alpha
AlphaScaleFactor:float = 2; // scale factor when alpha (forced 255)
Field_05:int = 1; // similar scale amplification like Field 6, but not used for levels
OybnLevelIndex:int = 2;
DropTableRef:ulong;
DropTable:PokeDropItem; // not required
AlphaDropTableRef:ulong;
AlphaDropTable:PokeDropItem; // not required
/// "pm0000_00_00"
Value:string (required);

View File

@@ -16,7 +16,7 @@ struct NullableInt32 (fs_valueStruct) {
table PokeModelConfig {
Meta:PokeModelMeta (required);
PathModel:string (required);
PathMeshMaterial:string (required);
PathMeshMaterial:string;
PathConfig:string (required);
Unused:byte; // unused!
Animations:[AnimationConfigStringTuple] (required);

View File

@@ -29,7 +29,7 @@ public static void DumpSchema(Schema schema, string filePath, string dir, Schema
using var fsCS = File.Create(fileCS);
using var cs = new StreamWriter(fsCS);
var fileFBS = Path.Combine(dir, $"{rootName}.cs");
var fileFBS = Path.Combine(dir, $"{rootName}.fbs");
using var fsFBS = File.Create(fileFBS);
using var fbs = new StreamWriter(fsFBS);
@@ -130,7 +130,7 @@ private static void DumpObjectFBS(Schema schema, TextWriter fbs, bool stripNames
fbs.Write(" ");
fbs.Write(field.Name);
fbs.Write(":");
fbs.Write(field.Type.ToFBS(schema, field.Id));
fbs.Write(field.Type.ToFBS(schema, field.Type.Index));
WriteAttributes(fbs, field);

View File

@@ -583,7 +583,7 @@ private void DumpEncount()
private void DumpDLC()
{
Dump<DLCItemGroupArray, DLCItemGroup>("world/data/ui/dlc_item_data/dlc_item_group/dlc_item_group_array.bfbs", z=>z.Table);
Dump<DLCItemGroupArray, DLCItemGroup>("world/data/ui/dlc_item_data/dlc_item_group/dlc_item_group_array.bfbs", z => z.Table);
}
private void DumpJunk()

View File

@@ -780,11 +780,11 @@ public void EditArchiveContents()
addEntryCallback: x => x.AddEntry());
}
[EditorCallable(EditorCategory.Misc, true)]
public void EditPokedexFormStorage()
{
//PopFlat<PokedexRankTable, PokedexRankLevel>(GameFile.DexFormStorage, "Pokedex Form Storage Editor", z => z.Rank.ToString());
}
//[EditorCallable(EditorCategory.Misc, true)]
//public void EditPokedexFormStorage()
//{
// //PopFlat<PokedexRankTable, PokedexRankLevel>(GameFile.DexFormStorage, "Pokedex Form Storage Editor", z => z.Rank.ToString());
//}
[EditorCallable(EditorCategory.Misc, true)]
public void EditPokeDefaultLocator()