CFGBINManager 1.0.6

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

CFGBINManager v1.0.6

Add it to your project

Use a .NET 8, .NET 9 or .NET 10 project and install CFGBINManager from NuGet:

dotnet add package CFGBINManager --version 1.0.6

Building the library from source requires the .NET 10 SDK.

To use the source directly, add this to your .csproj, adjusting the relative path:

<ItemGroup>
  <ProjectReference Include="../CFGBINManager/src/CFGBINManager/CFGBINManager.csproj" />
</ItemGroup>

Load a file

using CFGBINManager;

string catalogPath = Path.Combine(AppContext.BaseDirectory, "data", "structure.cfg");
var catalog = StructureCatalog.Parse(File.ReadAllText(catalogPath))
    .ForProfile("VictoryRoad");

var document = BinCodec.Read(File.ReadAllBytes("input.cfg.bin"), catalog);

Choose the game name in your catalog. For a catalog without game profiles, omit .ForProfile(...).

To open a CFG instead, replace the last line with:

var document = CfgTextCodec.Read(File.ReadAllText("input.cfg"), catalog);

The original BIN is not needed. A plain text CFG can be loaded directly as T2B. For an exported RDBNP CFG, retain the reconstruction section included in the text file.

Read and change a value

var rows = document.FindRows("CHARA_BASE_INFO");
var row = rows[0]; // Choose an existing row.

string? name = row.GetValue("internalName").AsString();
row.SetValue("internalName", CfgValue.String("example_name"));

Use the entry and field names from your file. You can also address a field by position, keeping its existing value type:

var value = row.Values[0];
row.SetValue(0, CfgValue.Signed(123));

Remove rows

var removed = document.FindRows("NOUN_INFO").Take(10).ToArray();
document.RemoveRows(removed);

When removing a block, include its contained rows. A retained entry cannot keep a direct reference to a removed row.

Save the result

File.WriteAllBytes("edited.cfg.bin", BinCodec.Write(document));
File.WriteAllText("edited.cfg", CfgTextCodec.WriteReadable(document));

Use a different output filename to keep your input intact.

Work without files

string cfg = CfgTextCodec.WriteReadable(document);
var imported = CfgTextCodec.Read(cfg, catalog);
byte[] bin = BinCodec.Write(imported);

GNU General Public License v3.0.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  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.
  • net10.0

    • No dependencies.
  • net8.0

  • net9.0

    • No dependencies.

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.6 94 11/21/2026
1.0.5 95 11/10/2026
1.0.4 104 10/26/2026
1.0.3 94 10/25/2026
1.0.2 100 10/25/2026
1.0.1 95 10/24/2026
1.0.0 102 10/24/2026