ii.CompleteDestruction 0.9.5

dotnet add package ii.CompleteDestruction --version 0.9.5
                    
NuGet\Install-Package ii.CompleteDestruction -Version 0.9.5
                    
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="ii.CompleteDestruction" Version="0.9.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ii.CompleteDestruction" Version="0.9.5" />
                    
Directory.Packages.props
<PackageReference Include="ii.CompleteDestruction" />
                    
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 ii.CompleteDestruction --version 0.9.5
                    
#r "nuget: ii.CompleteDestruction, 0.9.5"
                    
#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 ii.CompleteDestruction@0.9.5
                    
#: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=ii.CompleteDestruction&version=0.9.5
                    
Install as a Cake Addin
#tool nuget:?package=ii.CompleteDestruction&version=0.9.5
                    
Install as a Cake Tool

iiCompleteDestruction

iiCompleteDestruction is a C# library targetting .NET10 providing basic functions to support modifications to Total Annihilation, the 1997 RTS by Cavedog Entertainment.

Name Read Write Comment
3DO
ALP
BLU
BOS
CCX HPI
COB
CRT TA: Kingdoms
FBI TDF
FNT
GAF
GAO TA: Kingdoms
GAO2 TA: Kingdoms
GP3 HPI
GRY
GUI TDF
HPI
KMP HPI, TA: Kingdoms
LHT
OTA TDF
PCO TA: Kingdoms
PCX
SCC
SCT
SHD
TAF TA: Kingdoms
TDF TDF
TNT
TNT2 〰️ 〰️ TA: Kingdoms
TSF TDF, TA: Kingdoms
UFO HPI

Usage

Install via nuget: https://www.nuget.org/packages/ii.CompleteDestruction

Sample code to use the library is provided below.

  // HPI
  var hpi = new HpiProcessor();
  var files = hpi.Read(@"D:\games\ta\totala1.hpi");
  hpi.Write(@"D:\games\ta\totala1.out", files)


  // FBI, TDF, GUI, OTA
  var extensions = new string[] { ".fbi", ".tdf", ".gui", ".ota" };
  var directoryPath = @"D:\games\ta\extracted";
  foreach (var file in Directory.GetFiles(directoryPath, "*.*", SearchOption.AllDirectories))
  {
      if (extensions.Contains(Path.GetExtension(file).ToLower()))
      { 
          definition = parser.Parse(file);
          Console.WriteLine($"{file} {definition.Blocks.First().SectionName}");
      }
  }


  // PCX
  var extensions = new string[] { ".pcx" };
  var directoryPath = @"D:\games\ta\extracted";
  PcxConverter pcxConverter = new();
  foreach (var file in Directory.GetFiles(directoryPath, "*.*", SearchOption.AllDirectories))
  {
      try
      {
          if (extensions.Contains(Path.GetExtension(file).ToLower()))
          {
              var pcx = pcxConverter.Parse(file);
              var f = Path.GetFileNameWithoutExtension(file);
              pcx.SaveAsBmp($"{f}.bmp");
          }
      }
      catch (Exception ex)
      {
          Console.WriteLine($"Error processing {file}: {ex.Message}");
      }
  }  

Download

Compiled downloads are not available.

Compiling

To clone and run this application, you'll need Git and .NET installed on your computer. From your command line:

# Clone this repository
$ git clone https://github.com/btigi/iiCompleteDestruction

# Go into the repository
$ cd src

# Build  the app
$ dotnet build

Licencing

iiCompleteDestruction is licensed under the MIT license. Full licence details are available in license.md

The HPI related code is largely based on original work by JoeD

The ALP, LHT and SHD related code is based on original work by Rahsennor

References

https://units.tauniverse.com/tutorials/tadesign/tadesign/ta-files.htm

https://en.wikipedia.org/wiki/PCX

https://web.archive.org/web/20070428112624/http://www.whisqu.se/per/docs/graphics57.htm

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows 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
0.9.5 201 12/23/2025
0.9.4 179 12/22/2025
0.9.3 154 12/21/2025
0.9.2 138 12/20/2025
0.9.1 146 12/20/2025
0.9.0 270 12/17/2025
0.8.5 599 12/1/2025
0.8.0 285 11/21/2025