From 94ff0d3b530e4f7a7ff9009a59cf2b93e100aca7 Mon Sep 17 00:00:00 2001 From: BlockBuilder57 Date: Sat, 11 May 2019 23:20:11 -0500 Subject: [PATCH] Add more struct ToString()s, show info checkbox, update README --- README.md | 5 + XBC2ModelDecomp/App.xaml.cs | 3 +- XBC2ModelDecomp/FormatTools.cs | 10 +- XBC2ModelDecomp/MainFormTest.xaml | 1 + XBC2ModelDecomp/MainFormTest.xaml.cs | 1 + XBC2ModelDecomp/ModelTools.cs | 8 +- XBC2ModelDecomp/Structs.cs | 280 ++++++++++++++++++++++++++- 7 files changed, 303 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9525d23..a178ee6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # XBC2ModelDecomp A reformatted fork of a [project created by daemon1](https://forum.xentax.com/viewtopic.php?f=16&t=18087) on the XeNTaX forums. All credit to them and to [PredatorCZ/Lukas Cone](https://lukascone.wordpress.com/2018/05/06/xenoblade-chronicles-import-tool/) for publicizing tools to reverse the game's various model formats. Special thanks to Turk645 as well for working on the map formats and for bouncing ideas back and forth with. +## Features +* Dump model meshes, bones, and flexes to XNALara ascii or glTF (but with no bones) +* Dump textures from .wismt +* Dump animations +* Dumps raw files from map files ## Running Simply run the executable, and pick an input file. The only supported filetypes (at the time of writing) are \*.wimdo for models and \*.wismda for maps. An output folder will automatically be selected for the file(s) you choose, but you can override this by picking a output folder manually. Configure your output settings at the bottom and hit Extract. If you are using Blender, it does not natively support the XNALara format; I recommend [johnzero7's plugin.](https://github.com/johnzero7/XNALaraMesh) Many other plugins exist for other modeling tools. ## Compiling diff --git a/XBC2ModelDecomp/App.xaml.cs b/XBC2ModelDecomp/App.xaml.cs index cd1547a..f970ee4 100644 --- a/XBC2ModelDecomp/App.xaml.cs +++ b/XBC2ModelDecomp/App.xaml.cs @@ -27,8 +27,9 @@ public partial class App : Application public static bool ExportTextures; public static bool ExportFlexes; public static bool ExportAnims; - public static bool SaveRawFiles; public static bool ExportOutlines; + public static bool ShowInfo; + public static bool SaveRawFiles; public static int LOD; public static Structs.ExportFormat ExportFormat = Structs.ExportFormat.XNALara; diff --git a/XBC2ModelDecomp/FormatTools.cs b/XBC2ModelDecomp/FormatTools.cs index 6d0c4ea..3a8d349 100644 --- a/XBC2ModelDecomp/FormatTools.cs +++ b/XBC2ModelDecomp/FormatTools.cs @@ -1162,7 +1162,15 @@ public void ReadTextures(Structs.MSRD MSRD, string texturesFolderPath) break; } - string filename = $@"{texturesFolderPath}\{i.ToString("d2")}.{(MSRD.TextureIdsCount == MSRD.FileCount - 2 ? MSRD.TextureNames[MSRD.TextureIds[i]] : DataTextureNames[i])}"; + string filename = $@"{texturesFolderPath}\cool song.mp3.exe"; + try + { + filename = $@"{texturesFolderPath}\{i.ToString("d2")}.{(MSRD.TextureIdsCount == MSRD.FileCount - 2 ? MSRD.TextureNames[MSRD.TextureIds[i]] : DataTextureNames[i])}"; + } + catch + { + filename = $@"{texturesFolderPath}\{i.ToString("d2")}.i couldnt find the filename sorry"; + } FileStream fsTexture; if (TextureTypeArray[i] == 37) diff --git a/XBC2ModelDecomp/MainFormTest.xaml b/XBC2ModelDecomp/MainFormTest.xaml index 52ab0d3..1806e0d 100644 --- a/XBC2ModelDecomp/MainFormTest.xaml +++ b/XBC2ModelDecomp/MainFormTest.xaml @@ -48,6 +48,7 @@