DrakeMods-DrakeModsLibs icon

DrakeModsLibs

Shared DrakeMods library for Valheim - display patches, tags, APIs, and server config sync. Required by DrakesRenameit. Valheim 1.0 compatible.

Last updated a day ago
Total downloads 122
Total rating 0 
Categories Libraries
Dependency string DrakeMods-DrakeModsLibs-0.9.1
Dependants 1 other package depends on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2333 icon
denikson-BepInExPack_Valheim

BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.

Preferred version: 5.4.2333
ValheimModding-Jotunn-2.29.0 icon
ValheimModding-Jotunn

Jötunn (/ˈjɔːtʊn/, 'giant'), the Valheim Library was created with the goal of making the lives of mod developers easier. It enables you to create mods for Valheim using an abstracted API so you can focus on the actual content creation.

Preferred version: 2.29.0

README

DrakeModsLibs icon

DrakeModsLibs

Shared library for DrakeMods Valheim mods. It owns the display Harmony patches, item custom-data helpers, tag gatekeeping, menu binding registry, and server config sync so feature mods stay smaller and stay compatible when the game updates.

DrakeModsLibs is published on its own so other DrakeMods (starting with DrakesRenameit) can depend on one common package. More customization-oriented mods may use it later; there is no full suite planned for release right now — priorities and a redesign pass come first. Reskin is something we still want to look into when time allows.

Valheim 1.0

This release targets Valheim 1.0 API changes (notably item-stand visual updates and related display paths). Install the matching DrakeModsLibs build with your feature mods so labels and hover text keep working after the 1.0 update.

Required for

  • DrakesRenameit (and any future DrakeMods that share display / config sync)

Server config sync (DrakeConfigSync)

Only DrakeModsLibs references and ILRepack-embeds ServerSync. Consumer mods must not add a ServerSync Thunderstore dependency or ILRepack step.

At startup, create sync via the API:

var sync = CustomizeLibsAPI.CreateConfigSync(modId, displayName, version);
var entry = sync.BindSynced(config, section, configurationManagerCategory, key, defaultValue, description);
sync.AddLockingConfigEntry(lockEntry);
sync.FinalizeBinding(log, expectedSyncedEntryCount, () => lockEntry.Value);

Use BindClientOnly for per-client settings (never registered with ServerSync). IsSourceOfTruth / SourceOfTruthChanged behave like the underlying ServerSync instance.

Custom data API (other mods)

Read and dump ItemDrop.ItemData.m_customData through CustomizeLibsAPI:

  • GetCustomDataValue(item, key) — display value (tags → true/null, text → stored string)
  • GetCustomDataRaw(item, key) — raw dictionary value
  • DumpItemCustomData(item, options) — all keys, one mod, one key, JSON or neat text
  • DumpAllDrakeCustomData(item) / DumpItemCustomDataForMod(item, modId)
  • RegisterModCustomDataFields(modId, fields) — register your mod’s keys at startup

Built-in mod ids: DrakesRenameIt, DrakeModsLibs, DrakesQuestItems, DrakesItemShop.

Subscribe to CustomizationEvents.OnItemNameChanged for rename logging; use DrakeCustomDataKeys.Rename with GetCustomDataValue.

Install

  1. Install BepInEx and Jotunn (see Thunderstore dependencies).
  2. Install DrakeModsLibs.
  3. Install feature mods that depend on it (e.g. DrakesRenameit).

Team: DrakeMods · Contact: Drakethos (Discord / email in the RenameIt page).

Publishing (GitHub Actions)

Pushing a tag v{Version} that matches <Version> in mod.package.props runs .github/workflows/release.yml:

  1. Build the Thunderstore zip and create a GitHub Release with the zip attached
  2. Publish that zip to Thunderstore (DrakeMods-DrakeModsLibs)
  3. Publish the same zip to Hexium (valheim.hexium.gg) after Thunderstore succeeds

Repo secrets required:

Secret Source
THUNDERSTORE_TOKEN Thunderstore team service account for DrakeMods
HEXIUM_TOKEN Hexium team API token for DrakeMods (team settings)