Skip to content

A .NET library for modding games running on the Telltale Tool engine, providing an API to read and write assets and archives.

License

Notifications You must be signed in to change notification settings

iMrShadow/TelltaleToolKit

Repository files navigation

Nuget License

TelltaleToolKit

TelltaleToolKit is a .NET library created to allow modding games which run on the Telltale Tool game engine.

Table of contents:

Introduction

Telltale Tool is a proprietary game engine, originally created by Telltale Games. The engine was never publicly released which made official modding from very limited to impossible. This library aims to help modders with developing modding tools, plugins and converters, scripting, and more.

Features

  • Open and extract files from .ttarch and .ttarch2 archives.
  • Open, edit, and save file formats (textures, meshes, sounds, and more).
  • Modular and flexible registration system (types, metaclasses, serializers, per-game configs).
  • Create and manage a simple SQLite hash database.
  • Cross-platform: Windows, Linux, Mac (requires .NET 8.0 or later).
  • For more details, check the documentation folder.

Installation

You can install TelltaleToolKit via NuGet Package Manager:

Install-Package TelltaleToolKit

Or add it to your .csproj file:

<PackageReference Include="TelltaleToolKit" Version="0.1.0" />

You must also download the latest database from the data folder. You can use this link.

Usage

using TelltaleToolKit;
using TelltaleToolKit.Serialization.Binary;
using TelltaleToolKit.T3Types.Textures;
using TelltaleToolKit.T3Types.Textures.T3Types;
using TelltaleToolKit.Utility;

// Set up the context from a folder.
TTKContext.Instance().Load("../../../../../data");

// (Recommended) Set the active game for default configuration.
// This is not required, if you only read files.
TTKContext.Instance().SetActiveGame("the-walking-dead-definitive-series-2019");

// Load a Telltale archive. 
using var archive = TTK.Load("WDC_pc_WalkingDead404_txmesh.ttarch2", T3BlowfishKey.Twdc);

// Extract a file from the archive in a stream.
var blob = archive.ExtractFile("obj_backpackClementine400.d3dtx");

// Load the d3dtx from a stream.
var d3dtxObj = TTK.Load<T3Texture>(blob, out MetaStreamConfiguration config);

// Alternatively, load the texture directly from the filesystem.
// Replace the path with a valid one.
// TTK.Load<T3Texture>("obj_backpackClementine400.d3dtx", out config);

// Modify the texture.
d3dtxObj.Name = "My new modified texture!";
d3dtxObj.SurfaceFormat = T3SurfaceFormat.ARGB8;
d3dtxObj.Width = 1024;
d3dtxObj.Height = 1024;

// Save the modified texture on the filesystem.
TTK.Save(d3dtxObj, "new_modified.d3dtx", config);

API Documentation

The API is currently unstable and may change. For now, refer to the source code, inline XML docs.

Supported Games

See the data folder for more information regarding supported games.

License

This project is licensed under the MIT License. See the LICENSE file for more information.

Credits

Thanks to Lucas Saragosa for his outstanding work on TelltaleToolLib, Telltale Inspector and Telltale Editor, which made me understand Telltale's meta system.

Thanks to Luigi Auriemma for their ttarchext, which laid much of the groundwork for .ttarch and .ttarch2 extraction.

Thanks to Pavel Sudakov and Heitor Spectre for their TTG Tools, which provided additional references for .ttarch and .ttarch2 extraction.

Thanks to Bennyboy for their work on Telltale Music Extractor, which contained some additional blowfish keys for demo games.

Thanks to Azil Zogby for his work on TelltaleHydra and TelltaleDevTool.

Thanks to all contributors which worked on the popular C# game engine Stride. The serialization system is inspired from there.

Thanks to Plague for providing version databases for Borderlands 2021 PC and Nintendo Switch.

Thanks to David Matos for introducing me to the Telltale Modding Community.

About

A .NET library for modding games running on the Telltale Tool engine, providing an API to read and write assets and archives.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages