Randhomme.TPToolkitLib 1.0.3

dotnet add package Randhomme.TPToolkitLib --version 1.0.3
                    
NuGet\Install-Package Randhomme.TPToolkitLib -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Randhomme.TPToolkitLib" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Randhomme.TPToolkitLib" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="Randhomme.TPToolkitLib" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Randhomme.TPToolkitLib --version 1.0.3
                    
#r "nuget: Randhomme.TPToolkitLib, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Randhomme.TPToolkitLib@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Randhomme.TPToolkitLib&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=Randhomme.TPToolkitLib&version=1.0.3
                    
Install as a Cake Tool

TPToolkitLib

About

Welcome to TPToolkitLib, a project meant to be used to read and write files from the game Treasure Planet: Battle at Procyon.
It currently supports the following file types : mdb (mesh), msb (mesh scene) and wot (world object).
The library can also read the game strings, and knows about pretty much anything else there is to know about your TPGame folder.

Usage

The best way to get started is by using the "tool" classes. There is a tool class for each file type (mdb, msb and wot).
The tool classes are static, and provide public static methods to read and write files in an easy way.

using TPToolkitLib.Tools;

public static void Main()
{
    // Populate read only lists, available using the static class TPGameTool
    // The lists contain the world objects, the mesh scenes, the meshes (as strings),
    // the game strings, and more
    TPGameTool.LoadTPGameFolder("Path/To/TPGameFolder");

    // Read multiple meshes (.mdb) and combine them into a new 3D file (.glb format recommended)
    // Choose your mdb files, your output file path, the texture directory (not needed)
    // and chose if you want to include the lods
    string[] mdbFilePaths = ["Path/To/ShipLayer1.mdb", "Path/To/ShipLayer2.mdb"];
    string glbFilePath = "Path/To/Ship.glb";
    string textureDirectory = "Path/To/TPGameFolder/BD_Textures";
    bool lods = true;
    XMdbTo1Glb(mdbFilePaths, glbFilePath, textureDirectory, lods);

    // You can then read your 3D file (you can read multiple file at the same time)
    // and generate the mesh files from it
    string[] glbFilePaths = ["Path/To/Ship1.glb", "Path/To/Ship2.glb"];
    string meshDirectory = "Path/To/TPGameFolder/BD_Meshes";
    XGlbToXMdb(glbFilePaths, meshDirectory);

    // Read and write mesh scene files, and even combine mesh scenes into one
    // You can of course access the properties of an MsbScene object to modify it
    string msbFilePath1 = "Path/To/MeshScene1.msb";
    string msbFilePath2 = "Path/To/MeshScene2.msb";
    string[] msbFilePaths = [msbFilePath1, msbFilePath2];
    MsbScene msbScene = MeshSceneFromMsb(msbFilePath1);
    ImportMsbSceneFromMsb(msbScene, msbFilePath2);
    MeshSceneToMsb(msbScene, "Path/To/NewMeshScene.msb");

    // Read and write world object files
    // Access the properties to mofify your world object as you want
    WorldObjectType wot = WorldObjectFromWot("Path/To/WorldObject.wot");
    WorldObjectToWot(wot, "Path/To/NewWorldObject.wot");
}

Main types

Tool classes (static)

  • TPGameTool
  • MdbTool
  • MsbTool
  • WotTool

Data classes

  • MdbMesh
  • MsbScene
  • WorldObjectType

Documentation

You can learn more about the classes and methods available in this library at
https://github.com/Randhomme/TPToolkitLib/wiki

Found a bug ?

Report a bug by opening an issue on the github repository :
https://github.com/Randhomme/TPToolkitLib

Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 5 10/30/2026
1.0.2 71 10/27/2026
1.0.1 83 10/22/2026
1.0.0 81 10/21/2026