Skip to content

th3w1zard1/BioWare.NET

Repository files navigation

# BioWare.NET Standalone .NET library for reading, writing, patching, and extracting BioWare game resources. This repository is the standalone home for the former `src/BioWare` subtree from [Andastra](https://github.com/th3w1zard1/Andastra). It packages the BioWare/Odyssey file-format and tooling layer independently so other projects can consume it without taking a dependency on the rest of the Andastra engine/runtime. ## What is included `BioWare.NET` focuses on the reusable library surface: - resource format parsers and serializers - extraction helpers and installation/resource access - TSLPatcher-compatible patching helpers - common value types used by Odyssey/KOTOR tooling - multi-target support for `net9.0` and `net48` Supported format families include: - GFF - 2DA - TLK - ERF / MOD / SAV - RIM - VIS / LYT - TPC / TXI / WAV - NSS / NCS helpers - many additional BioWare-specific resource types ## Installation Once the package has been published to NuGet: ```bash dotnet add package BioWare.NET ``` If you are consuming a prerelease tag, add `--prerelease`. ## Quick examples ### Create and round-trip a 2DA table ```csharp using System.Collections.Generic; using BioWare.Resource.Formats.TwoDA; var table = new TwoDA(new List<string> { "label", "name", "value" }); table.AddRow("0", new Dictionary<string, object> { ["label"] = "0", ["name"] = "first", ["value"] = "100", }); byte[] bytes = table.ToBytes(); TwoDA loaded = TwoDA.FromBytes(bytes); string name = loaded.GetCellString(0, "name"); ``` ### Create and round-trip a GFF structure ```csharp using BioWare.Common; using BioWare.Resource.Formats.GFF; var gff = new GFF(GFFContent.GFF); gff.Root.SetString("tag", "example"); gff.Root.SetResRef("resref", new ResRef("model")); byte[] bytes = GFFAuto.BytesGff(gff, ResourceType.GFF); GFF loaded = GFF.FromBytes(bytes); string tag = loaded.Root.GetString("tag"); ``` ## Building Prerequisites: - .NET 9 SDK or later Build the solution: ```bash dotnet build BioWare.NET.sln -c Release ``` Run tests: ```bash dotnet test BioWare.NET.sln -f net9.0 -c Release ``` Pack the NuGet package locally: ```bash dotnet pack src/BioWare/BioWare.csproj -c Release -p:Version=2.0.0-local ``` ## Repository layout ```text . �%%% src/BioWare/ # library source and NuGet package project �%%% tests/BioWare.Tests/ # NUnit regression tests �%%% .github/workflows/ # CI and NuGet publishing automation �%%% docs/ # release and maintenance documentation ``` ## NuGet publishing NuGet publishing is handled by GitHub Actions. - `ci.yml` validates restore, build, test, and pack on pushes/PRs. - `publish-nuget.yml` publishes tagged releases using `dotnet nuget push`. Create a tag such as `v2.0.0` or `v2.0.0-beta.1` to publish that exact package version. See [docs/RELEASING.md](docs/RELEASING.md) for the full process. ## License This project is licensed under the Business Source License 1.1. See [LICENSE](LICENSE).

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors