ii.EighthSolitude 0.8.2

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

iiEighthSolitude

iiEighthSolitude is a C# library supporting the modification of files relating to 7th Legion, the 1997 RTS game developed by Vision Software.

Name Read Write Comment
AI ✔ ✔ Plain text
AIO ✔ ✔ Plain text - as AI
BIM ✔ ✔ Graphics
BIN ✔ ✔ Rotation offset tables (paired X/Y, 2560 entries) and exponential lookup (exptab.bin); turret tables use int16, weapon tables use int32
C24 ✔ ✔ Binary - palette (256 colours, 6-bit, 4 bytes/entry)
COL ✔ ✔
DAT ✔ ✔ Binary - palette
DAT ✗ ✗ NU**.DAT
DAT ✔ ✔ Plain text (BUILD.DAT, DEPEND.DAT, VDEPEND.DAT)
DAT ✔ ✔ STUFF.DAT
GP ✗ ✗ Plain text
INI ✔ ✔ Plain text
MAP ✔ ✔ Level/map layers (MAPT/MAPOVL/MAPO/MAPL/MAPC*)
SAV ✗ ✗ Save game
SMP ✔ ✔ Sound effects
TXT ✗ ✗ Plain text
WS1 ✗ ✗
XFD ✔ ✔
XM ✔ ✗

Usage

Instantiate the relevant class and call the Process method passing the filename.

var col = new ColProcessor();
var palette = col.Read(@"D:\Games\7thLegion\GFX\PAL1.COL");

var bim = new BimProcessor { Palette = palette };
foreach (var f in Directory.EnumerateFiles(@"D:\Games\7thLegion\GFX", "*.BIM"))
{
    var images = bim.Read(f);

    foreach (var image in images)
    {
        var n = Path.GetFileNameWithoutExtension(f);
        image.SaveAsPng($@"D:\data\7thLegion\GFX\{n}_" + images.IndexOf(image) + ".png");
    }
}

var rotation = new RotationProcessor { StorageFormat = RotationStorageFormat.Int16 };
var turretOffsets = rotation.Read(
    @"D:\Games\7thLegion\DATA\tox.bin",
    @"D:\Games\7thLegion\DATA\toy.bin");

var weaponRotation = new RotationProcessor { StorageFormat = RotationStorageFormat.Int32 };
var weaponOffsets = weaponRotation.Read(
    @"D:\Games\7thLegion\DATA\w1ox.bin",
    @"D:\Games\7thLegion\DATA\w1oy.bin");

var exponential = new ExponentionalProcessor();
var expTable = exponential.Read(@"D:\Games\7thLegion\DATA\exptab.bin");

var depend = new DependProcessor();
var buildingTree = depend.Read(@"D:\Games\7thLegion\DATA\depend.dat");
var unitUnlocks = depend.ReadMerged(@"D:\Games\7thLegion\DATA\vdepend.dat");
depend.Write(buildingTree, @"D:\data\7thLegion\depend.dat");


var map = new MapProcessor();
var palette = MapProcessor.LoadPalette(@"D:\Games\7thLegion\GFX\PAL2.COL");

// Structured read/write of all seven MAP* layers
var mapData = map.ReadMapData(@"D:\Games\7thLegion\DATA", 1);
mapData.Terrain[MapData.Index(10, 20)] = 100;
map.WriteMapData(mapData, @"D:\data\7thLegion\DATA", 1);

// Full colour render (terrain + overlay/object markers)
var image = map.ReadMap(
    @"D:\Games\7thLegion\DATA\MAPT.001",
    [@"D:\Games\7thLegion\GFX\TILES1.BIM"],
    palette,
    mapOvlPath: @"D:\Games\7thLegion\DATA\MAPOVL.001",
    mapCtPath: @"D:\Games\7thLegion\DATA\MAPCT.001",
    mapCxPath: @"D:\Games\7thLegion\DATA\MAPCX.001",
    mapCyPath: @"D:\Games\7thLegion\DATA\MAPCY.001");
image.SaveAsPng(@"D:\data\7thLegion\map001.png");

// Greyscale heightmap (MAPO, elevation 0-16) and lightmap (MAPL)
map.ReadHeightMap(@"D:\Games\7thLegion\DATA\MAPO.001").SaveAsPng(@"D:\data\7thLegion\height001.png");
map.ReadLightMap(@"D:\Games\7thLegion\DATA\MAPL.001").SaveAsPng(@"D:\data\7thLegion\light001.png");

var missions = new MissionsIniProcessor();
var doc = missions.Read(@"D:\Games\7thLegion\DATA\Missions.ini");
foreach (var mission in doc.Missions)
{
    Console.WriteLine($"{mission.SectionName}: map={mission.Map} howToWin={mission.HowToWinMode}");
}
missions.Write(doc, @"D:\data\7thLegion\Missions.ini");

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/iiEighthSolitude

# Go into the repository
$ cd src

# Build  the app
$ dotnet build

Licencing

iiEighthSolitude is licenced under the MIT License. Full licence details are available in licence.md

iiEighthSolitude includes SharpMod, licenced under MIT

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.8.2 144 9/6/2026
0.8.1 136 8/25/2026
0.8.0 130 8/25/2026