HalfLife.UnifiedSdk.Utilities 0.1.3

.NET 6.0
NuGet\Install-Package HalfLife.UnifiedSdk.Utilities -Version 0.1.3
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.
dotnet add package HalfLife.UnifiedSdk.Utilities --version 0.1.3
<PackageReference Include="HalfLife.UnifiedSdk.Utilities" Version="0.1.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add HalfLife.UnifiedSdk.Utilities --version 0.1.3
#r "nuget: HalfLife.UnifiedSdk.Utilities, 0.1.3"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install HalfLife.UnifiedSdk.Utilities as a Cake Addin
#addin nuget:?package=HalfLife.UnifiedSdk.Utilities&version=0.1.3

// Install HalfLife.UnifiedSdk.Utilities as a Cake Tool
#tool nuget:?package=HalfLife.UnifiedSdk.Utilities&version=0.1.3

HalfLife Unified SDK CSharp tools

Tools for the Half-Life Unified SDK written in C#.

Note: the Unified SDK itself is written in C++.

Install using NuGet



This library contains utility functionality for opening, analyzing, modifying, converting and upgrading Half-Life 1 maps made for the GoldSource engine.

A list of Valve-made games can be accessed through the HalfLife.UnifiedSdk.Utilities.Games.ValveGames class. A set of GameInfo objects provides basic information about each game, such as the engine the game runs on, the mod directory its content is installed in and a list of official maps.

A map can be loaded into a HalfLife.UnifiedSdk.Utilities.Maps.Map object. You can load vanilla Half-Life 1 maps as well as Blue Shift maps. This provides basic information about the map such as whether it is a map source file (.rmf, .map) or a compiled map file (.bsp, .ent), the file name and base name (used in trigger_changelevel, console commands and the Create Server dialog).

It also provides access to the map's entity list through the Entities property. This is an HalfLife.UnifiedSdk.Utilities.Entities.EntityList object containing the list of all entities in the map.

Entity objects are of the type HalfLife.UnifiedSdk.Utilities.Entities.Entity and can be manipulated in various ways. All entities except worldspawn can be removed from a map and have their class name changed.

All entities can have their keyvalues added, removed and modified. New entities can be created and added to a map (it is not possible to add entities that the mod the map is played with does not support).

Helper methods exist to simplify certain tasks. For example the contents of a map can be replaced with those of another using the EntityListExtensions.ReplaceWith LINQ method. This behavior is identical to what Ripent does.

The HalfLife.UnifiedSdk.Utilities.Tools namespace provides various tools for the automation of tasks:

  • MapFormats: Provides methods to load maps into memory, automatically detecting the format based on file extension. Direct access to serializers is also provided.
  • KeyValueUtilities: Provides constants for commonly used keyvalues as well as methods for identifying values.
  • ModUtilities: Provides methods to enumerate mods in a GoldSource engine installation and loading the liblist.gam file.
  • ParsingUtilities: Provides methods for converting between strings and commonly used data types using locale-independent conversions.
  • SteamUtilities: Provides methods to query Steam registry values on Windows.
  • Ripent: Provides methods to import and export .ent files the way Ripent does. This is a convenience wrapper around lower level methods that can perform Ripent functionality in-memory.
  • UpgradeTool: This namespace provides classes to help automate the upgrading of maps and map source files from older versions of a game to newer versions.

The Sledge.Formats.Bsp and Sledge.Formats.Map libraries are used to load Half-Life 1 maps and map source files. Many thanks to Daniel Walder for creating these libraries.

Product Versions
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
Compatible target framework(s)
Additional computed target framework(s)
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.1.3 153 3/13/2022
0.1.2 72 3/12/2022
0.1.1 81 3/8/2022
0.1.0 86 3/6/2022

Added helpers to get list of Steam languages and mod directory suffixes, upgraded uses of ArgumentNullException to use ThrowIfNull.