static void Main(string[] args) { var fbn = new FbnBinary(@"D:\Modding\Persona 5 EU\Main game\ExtractedClean\ps3\field\f001_001\data\f001_001_00.FBN"); fbn.Save(@"D:\Modding\Persona 5 EU\Main game\ExtractedClean\ps3\field\f001_001\data\f001_001_00 (new).FBN"); var htb = new HtbBinary(@"D:\Programming\Repos\Mod-Compendium\Source\ModCompendium\bin\Debug\Mods\Persona5\FBN testing\Data\field\f001_001\hit\f001_001_00.HTB"); htb.Save(@"D:\Programming\Repos\Mod-Compendium\Source\ModCompendium\bin\Debug\Mods\Persona5\FBN testing\Data\field\f001_001\hit\f001_001_00 (new).HTB"); }
public void LoadObjectPlacement(FbnBinary fbn) { if (fbn.HitTriggers != null) { LoadFieldItems(hitTriggersListBox, fbn.HitTriggers, "Hit trigger {0}", (entry, name) => new SceneNode(name) { Translation = entry.Center, Drawable = new CubePrimitive(sHitTriggerColor.ToVector4()), }, (entry, node) => node.Translation = entry.Center); } if (fbn.Entrances != null) { LoadFieldItems(entrancesListBox, fbn.Entrances, "Entrance {0}", (entry, name) => new SceneNode(name) { Translation = entry.Position, Drawable = new CubePrimitive(sEntranceColor.ToVector4()) }, (entry, node) => node.Translation = entry.Position); } if (fbn.Block8Entries != null) { LoadFieldItems(type8EntriesListBox, fbn.Block8Entries, "Entry {0}", null, null); } if (fbn.Block9Entries != null) { LoadFieldItems(type9EntriesListBox, fbn.Block9Entries, "Entry {0}", (entry, name) => new SceneNode(name) { Translation = entry.Position, Drawable = new CubePrimitive(sBlock9EntryColor.ToVector4()) }, (entry, node) => node.Translation = entry.Position); } if (fbn.Block10Entries != null) { LoadFieldItems(type10EntriesListBox, fbn.Block10Entries, "Entry {0}", null, null); } if (fbn.Block11Entries != null) { LoadFieldItems(type11EntriesListBox, fbn.Block11Entries, "Entry {0}", null, null); } if (fbn.MessageTriggers != null) { // TODO: handle multiple positions LoadFieldItems(msgTriggersListBox, fbn.MessageTriggers, "Message trigger {0}", (entry, name) => new SceneNode(name) { Translation = entry.Positions[0], Drawable = new CubePrimitive(sMessageTriggerColor.ToVector4()) }, (entry, node) => node.Translation = entry.Positions[0]); } if (fbn.Block18Entries != null) { LoadFieldItems(type18EntriesListBox, fbn.Block18Entries, "Entry {0}", (entry, name) => new SceneNode(name) { Translation = entry.Position, Drawable = new CubePrimitive(sBlock18EntryColor.ToVector4()) }, (entry, node) => node.Translation = entry.Position); } if (fbn.Block19Entries != null) { LoadFieldItems(type19EntriesListBox, fbn.Block19Entries, "Entry {0}", (entry, name) => new SceneNode(name) { Translation = entry.Center, Drawable = new CubePrimitive(sBlock19EntryColor.ToVector4()) }, (entry, node) => node.Translation = entry.Center); } if (fbn.Block22Entries != null) { LoadFieldItems(type22EntriesListBox, fbn.Block22Entries, "Entry {0}", (entry, name) => new SceneNode(name) { Translation = entry.Center, Drawable = new CubePrimitive(sBlock22EntryColor.ToVector4()) }, (entry, node) => node.Translation = entry.Center); } }