HalfLife.UnifiedSdk.Utilities 0.1.4

dotnet add package HalfLife.UnifiedSdk.Utilities --version 0.1.4                
NuGet\Install-Package HalfLife.UnifiedSdk.Utilities -Version 0.1.4                
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="HalfLife.UnifiedSdk.Utilities" Version="0.1.4" />                
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.4                
#r "nuget: HalfLife.UnifiedSdk.Utilities, 0.1.4"                
#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.
// Install HalfLife.UnifiedSdk.Utilities as a Cake Addin
#addin nuget:?package=HalfLife.UnifiedSdk.Utilities&version=0.1.4

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

HalfLife Unified SDK CSharp tools

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

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

You will need to install the NET 6 runtime or newer to run the tools included in this repository. You can download the runtime here (included with the NET SDK): https://dotnet.microsoft.com/en-us/download

Uses ImageSharp to handle image encoding: https://github.com/SixLabors/ImageSharp

Install using NuGet

Nuget

HalfLife.UnifiedSdk.Utilities

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.

Documentation

The documentation for these tools can be found in the main Unified SDK repository: https://github.com/SamVanheer/halflife-unified-sdk/blob/master/docs/README.md#tools

LICENSE

See LICENSE for the MIT license See ImageSharp_LICENSE for the Apache License, Version 2.0

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
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.1.4 174 11/24/2022
0.1.3 702 3/13/2022
0.1.2 442 3/12/2022
0.1.1 446 3/8/2022
0.1.0 455 3/6/2022

Many changes.