Skip to content

Commit

Permalink
(KnuxTools) Refactor
Browse files Browse the repository at this point in the history
Not sure how much better this is (I've always been bad at writing tool chains, especially AIO ones), but hey at least info that was previously buried in the source is now displayed to the end user.

Also took the time to demote a few formats to Experimental, as some were in Supported that had no business being there (like yeah sure the Megaman X7 SETs wrote fine but they're entirely unknowns, just like the Sonic Storybook Player Motion Tables).
  • Loading branch information
Knuxfan24 committed Nov 22, 2023
1 parent 5e456ce commit c282a5c
Show file tree
Hide file tree
Showing 6 changed files with 1,074 additions and 667 deletions.
22 changes: 18 additions & 4 deletions Experimental_Formats.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
The following formats are only partially supported and have no implementation in the KnuxTools project, either due to missing functionality or just being unfinished.
The following formats are only partially supported, either due to missing functionality or just being unfinished (files consisting almost entirely of unknown values also fall into this category, even if they can be saved in a binary identical fashion to their original versions).

## Alchemy Engine

- [Assets Container (.gfc/gob)](KnuxLib/Engines/Alchemy/AssetsContainer.cs). Has an unknown chunk of data and no way to import or save a new file.

- [Map Collision (.hke)](KnuxLib/Engines/Alchemy/Collision.cs). There is currently a lot of unknown data in this format that would need to be reverse engineered properly for true support of the format. This format also currently lacks any form of Import function and only has a temporary OBJ export solution.

## Engine Black
Expand All @@ -14,18 +16,30 @@ The following formats are only partially supported and have no implementation in

- [Binary Archive (.bin)](KnuxLib/Engines/Flipnic/BinaryArchive.cs). Currently reads and exports data, but doesn't have any functionality for importing or saving, as testing it would be a pain in the ass.

## GODS Engine

- [WAD Archive (.wad)](KnuxLib/Engines/Gods/WAD.cs). Has a few unknown values and no way to import or save a new file. The Wii version has even more unknowns and there are also definitely different versions of this format for different Data Design Interactive games.

## Hedgehog Engine

- [2010 Collision (.orc)](KnuxLib/Engines/Hedgehog/Collision_2010.cs). Only reads about half the format but does have an OBJ exporter that exports the basic collision geometry.

- [Rangers Collision (.btmesh)](KnuxLib/Engines/Hedgehog/Collision_Rangers.cs). Only has a reader that misses the bounding volume hierarchy data for the meshes, also has quite a few unknown values.

- [Scene Effect Collision (.bin.fxcol)](KnuxLib/Engines/Hedgehog/SceneEffectCollision.cs). Has extremely basic reading and writing (which produces binary identical files to the originals), but the actual purpose of the data and their actual structures is yet to be researched.
- [Scene Effect Collision (.fxcol.bin)](KnuxLib/Engines/Hedgehog/SceneEffectCollision.cs). Has extremely basic reading and writing (which produces binary identical files to the originals), but the actual purpose of the data and their actual structures is yet to be researched.

## Nu2 Engine

- [Scenes (.nus/.nux/.gsc)](KnuxLib/Engines/Nu2/Scene.cs) and the chunks that make them up. Most of the GameCube version of this format is handled for reading (with one unknown chunk structure), the Xbox version is missing the Texture Set and Geometry Set chunks and the PlayStation 2 version is missing the Texture Set, Material Set, Geometry Set and SPEC Set chunks. This format also currently lacks any form of Save, Export or Import function.

## Rockman X7 Engine

- [Stage Entity Table (.328f438b/.osd)](KnuxLib/Engines/RockmanX7/StageEntityTable.cs). Entirely functional besides basically every value being an unknown.

## Rockman X8 Engine

- [Stage Entity Table (.31bf570e/.set)](KnuxLib/Engines/RockmanX8/StageEntityTable.cs). Entirely functional besides basically every value being an unknown.

## Sonic Storybook Engine

- [Path Spline (.pth)](KnuxLib/Engines/Storybook/PathSpline.cs). Has reading and writing with a lot of unknown values and basic OBJ exporting.
Expand All @@ -36,14 +50,14 @@ The following formats are only partially supported and have no implementation in

## Sonic World Adventure Wii Engine

- [Path Spline (.path.dat)](KnuxLib/Engines/WorldAdventureWii/PathSpline.cs). Only has reading and writing with a lot of unknowns. Completely lacking an Import or Export (other than generic JSON serialisation) function.
- [Path Spline (.path.dat)](KnuxLib/Engines/WorldAdventureWii/PathSpline.cs). Only has reading and writing with a lot of unknowns. Completely lacking an Import or Export (other than generic JSON serialisation) function, left out of KnuxTools for this reason.

- [Stage Entity Table (.set)](KnuxLib/Engines/WorldAdventureWii/StageEntityTable.cs). Entirely functional besides a lack of proper object parameters names and types, the HSON template sheet I've created only reads things as either a uint or a float, so if something is actually a different data type it won't be parsed correctly.

## Wayforward Engine

- [Collision (.clb)](KnuxLib/Engines/Wayforward/Collision.cs). Reads and writes fine, but Seven Sirens has a massive chunk of Unknown Data added on to the end that is completely alien to me and needs to be properly reverse engineered. Also has a (potentially temporary) OBJ exporter and Assimp importer.

- [Level Binary (.lvb)](KnuxLib/Engines/Wayforward/LevelBinary.cs). Really, REALLY unfinished reading. Honestly this format has pushed me to my limit I hate it.
- [Level Binary (.lvb)](KnuxLib/Engines/Wayforward/LevelBinary.cs). Really, REALLY unfinished reading. Honestly this format has pushed me to my limit I hate it. Left out of KnuxTools because it has next to no functionality in its current state.

- [Mesh (.wf3d/.gpu)](KnuxLib/Engines/Wayforward/Mesh.cs) and the chunks that make them up. This code currently reads MOST of the data (although a lot of chunks have unknown bits that I am yet to successfully read), but a lot of the data is a mystery. This format also has some (slightly messy) unfinished functionality for Saving, Exporting to OBJ (which is intended to be temporary due to it not supporting things I've yet to reverse engineer) and Assimp Importing.
3 changes: 0 additions & 3 deletions KnuxLib/Engines/Alchemy/Collision.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ public Collision(string filepath, bool export = false)
Load(filepath);

if (export)
{
JsonSerialise($@"{Path.GetDirectoryName(filepath)}\{Path.GetFileNameWithoutExtension(filepath)}.alchemy.collision.json", Data);
ExportOBJTemp($@"{Path.GetDirectoryName(filepath)}\{Path.GetFileNameWithoutExtension(filepath)}");
}
}

// Classes for this format.
Expand Down
3 changes: 0 additions & 3 deletions KnuxLib/Engines/Hedgehog/Collision_2010.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@ public Collision_2010(string filepath, bool export = false)
Load(filepath);

if (export)
{
JsonSerialise($@"{Path.GetDirectoryName(filepath)}\{Path.GetFileNameWithoutExtension(filepath)}.hedgehog.collision_2010.json", Data);
ExportOBJ($@"{Path.GetDirectoryName(filepath)}\{Path.GetFileNameWithoutExtension(filepath)}.obj");
}
}

// Classes for this format.
Expand Down
2 changes: 1 addition & 1 deletion KnuxLib/Engines/Wayforward/Mesh.cs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ public void ImportAssimp(string filepath, string wf3dOut, string gpuInject, ulon
/// Exports this mesh to an OBJ.
/// TODO: OBJ won't be suitable for this long term.
/// </summary>
/// <param name="filepath">The directory to export to.</param>
/// <param name="filepath">The OBJ file to export to.</param>
public void ExportOBJTemp(string filepath, string? gpuFile = null)
{
// Set up a GPU file.
Expand Down
Loading

0 comments on commit c282a5c

Please sign in to comment.