Skip to content

Building

shmitzas edited this page Nov 12, 2026 · 2 revisions

Building

Building CustomHUD from source. The layouts are built separately, into the Workshop addon.


Requirements

.NET SDK 10.0.x
SwiftlyS2 Restored from NuGet, SwiftlyS2.CS2 1.5.0 or later
Git For cloning

Clone

git clone https://github.com/shmitzas/CustomHUD.git
cd CustomHUD

Build

Build the contract first: on a fresh clone a single publish leaves CustomHUD.Contract.dll out of the zip.

dotnet build CustomHUD.Contract/CustomHUD.Contract.csproj -c Release
dotnet publish CustomHUD.csproj -c Release

The archive lands in build/CustomHUD.zip. Unzip it into addons/swiftlys2/plugins/.


Layout

CustomHUD.Contract/          The Panels API other plugins reference
src/                         The plugin
resources/
  translations/              en, lt, pt-BR
  panorama/                  Layouts, styles and images for the Workshop addon
lib/                         The supported plugins' contracts, compiled against
scripts/                     Generators for layouts and art classes, the Panorama watcher, the audit
tools/SoftDependencyCheck/   Checks every supported plugin stays optional
docs/                        Design and authoring documents
config.example.jsonc         An annotated config

Panorama layouts

resources/panorama/ never ships in the plugin zip: players get it as the CustomHUD Workshop addon. A changed or new layout reaches players only in an addon you build and publish yourself, served with AddonsManager in place of 3834965450.

Panorama Authoring covers authoring, compiling and publishing layouts; Design Language covers the tokens, colours and each layout's anatomy.


Contributing

  • Run pwsh -File scripts/audit.ps1 before you push. It checks what CS2 never reports (unknown properties, selector limits, what a layout may contain), the generated files and the translations, then builds as CI does. The contributor guide covers the rest of the loop.
  • CI runs tools/SoftDependencyCheck, which loads the published plugin with no supported plugin installed and names any type that would not load.
  • scripts/update-contracts.ps1 rebuilds the contracts in lib/ from the supported plugins' repositories.
  • Testing Guide is a pass over every surface. Public Port records the constraints behind src/Rendering and src/Input; read it before changing either.

Clone this wiki locally