You are viewing a potentially older version of this package. View all versions.
Terramizer-LightMyFire_Coal_Resin-0.5.0 icon

LightMyFire Coal Resin

LightMyFire - Coal&Resin: dedicated Coal and Resin barrels that automatically top up nearby compatible lights.

Date uploaded a day ago
Version 0.5.0
Download link Terramizer-LightMyFire_Coal_Resin-0.5.0.zip
Downloads 38
Dependency string Terramizer-LightMyFire_Coal_Resin-0.5.0

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.2 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.2

README

LightMyFire - Coal&Resin

Release status

0.5.0 is the first publish-ready public release of LightMyFire.

LightMyFire adds separate placeable Coal Barrel and Resin Barrel pieces to Hammer > Misc.

Each barrel has the same 8x4, 32-slot inventory space as a black metal chest and costs 100 Wood, 40 Iron, and 40 Tar. The Coal Barrel accepts only vanilla Coal; the Resin Barrel accepts only vanilla Resin - every other item is rejected. Fill one with its matching fuel and any compatible light within range gets topped up automatically on the next scan.

Features

  • Built from Valheim's current native barrel/container prefab through Jotunn, preserving its normal network, interaction, collider and WearNTear behaviour.
  • Adds only visual decoration: a compact forged lid plus a small wood/metal COAL or RESIN plaque. The decoration has no collider and cannot steal clicks or damage hits from the barrel.
  • Coal-only / Resin-only inventories. Wrong-fuel items (and everything else) are rejected on drop, shift-click, and quick-transfer; anything that slips through by another mod's path is safely ejected next to the barrel, never deleted.
  • Tops up, doesn't just refill. Partially-fueled lights are topped up to their own maximum; full lights are left untouched.
  • Works with any loaded Fireplace-based light source - vanilla or modded - that burns vanilla Coal or Resin and has finite fuel capacity, with no hardcoded torch/sconce list.
  • Nearest-matching-barrel-first selection, falling through to the next-nearest barrel if one barrel can't fully cover a light's missing fuel.
  • Transaction-safe multiplayer: fuel is only ever moved by the object's own owner, using a request/grant/acknowledge/refund exchange with timeouts, so ownership changes and disconnects can't duplicate or lose fuel.
  • One efficient shared scan, 5 minutes by default, plus a lightweight maintenance tick for transaction cleanup.
  • Configurable feeding range (50m default) and scan interval - server-controlled, synced to every client.
  • A thin white dotted range ring marks the exact feeding-radius circumference while placing a barrel and while that barrel inventory is open. There is no filled area marker.
  • Works in single-player and multiplayer.
  • Compatible with Terramizer, TerramizerServer, EquipmentSheet, and InventoryLink 0.2.6 or newer.

Installation

Install LightMyFire and Jotunn on the server and every connecting client. LightMyFire uses patch-level network version matching, so server and clients should run the same LightMyFire version.

Configuration

Config file:

BepInEx/config/r4v9n1.lightmyfire.cfg

Enabled, feeding range, and the refill interval are set by the server/host and synced to clients; a client's local values for those three are overridden. LogTransfers and LogDiagnostics are local-only. Enable LogDiagnostics while troubleshooting to see barrel readiness and scan counts.

Created and maintained by R4V9N1.

CHANGELOG

Changelog

0.5.0

  • Published under the new Thunderstore package identity LightMyFire_Coal_Resin while keeping the in-game plugin identity LightMyFire unchanged.

  • First publish-ready public release.

  • Coal Barrel accepts only vanilla Coal; Resin Barrel accepts only vanilla Resin.

  • Automatically tops up compatible Coal/Resin Fireplace lights within the configured range.

  • Default refill scan interval is 5 minutes and default feeding radius is 50 metres.

  • Multiplayer refill requests are owner-authoritative so lights are not skipped when barrel/light ownership is split across peers.

  • Uses Jotunn's native prefab-cloning path for normal Valheim interaction, durability, networking and placement behaviour.

  • Corrected COAL/RESIN plaque orientation and retained the visual-only forged lid/plaque decoration.

  • Includes the thin white dotted range circumference while placing a barrel and while its inventory is open.

  • Build pipeline generates a Thunderstore upload ZIP with metadata at ZIP root and normalized forward-slash ZIP paths.

0.2.11

  • Corrected the mirrored COAL/RESIN plaque orientation.

0.2.10

  • Improved dotted range-ring visibility and placement-ghost detection.
  • Ring height is sampled around the circumference so uneven terrain does not bury the marker.

0.2.9

  • Replaced the large workbench-style area effect with a thin white dotted circumference at the exact feeding range.
  • The ring appears while positioning a barrel and while that barrel inventory is open, and remains hidden otherwise.

0.2.8

  • Added the first visual feeding-range indicator tied to the synchronized feeding range.

0.2.7

  • All-sources refill fix: refill scans no longer trust a non-owner peer's local copy of a barrel inventory. Matching in-range barrels are requested directly and the barrel owner authoritatively decides how much fuel is available. This fixes dedicated-server/multiplayer ownership splits where some lights were skipped despite fuel remaining.
  • Broader prefab hierarchy support: Fireplace components may now resolve their ZNetView from the same object, a parent, or a child; grant application can also find Fireplace components below the network prefab root. This prevents otherwise compatible light prefab layouts from being silently skipped.
  • Keeps the 0.2.6 native barrel prefab, strict Coal-only/Resin-only inventories, normal interaction/durability/build costs, and existing transaction safety.

0.2.6

  • Fixes the current Valheim 0.221.x prefab integration bug that caused Container.Awake, WearNTear.Awake, hover, interaction and durability NullReferenceException spam.
  • Creates each barrel with Jotunn's vanilla-prefab copy path instead of a raw Unity clone, preserving the native barrel's runtime/soft-reference dependencies.
  • Validates Piece, ZNetView, Container, WearNTear and the native collider hierarchy before registering either custom piece.
  • Re-fits the visual-only lid and plaque from the native barrel's physical collider bounds; imported decoration colliders are removed.
  • Keeps the explicit Hammer recipe of 100 Wood, 40 Iron and 40 Tar and the 8x4 inventory.
  • Keeps strict per-barrel fuel inventories: Coal accepts only Coal; Resin accepts only Resin, with the broad current-API insertion filter and owner-side fallback sanitation.
  • Uses patch-level network version strictness for this compatibility build so a 0.2.6 client cannot silently run against a 0.2.5 server copy.
  • Refreshes the custom lid/plaque source textures toward darker, rougher, less glossy Valheim-like wood and iron.

0.2.5

  • Enforced strict per-barrel fuel inventories across current Inventory insertion/check paths.
  • Added owner-side sanitation for wrong items inserted by another mod or an unpatched path.

0.2.4

  • Rebuilt barrel decoration proportions around the actual Valheim barrel bounds.
  • Smaller fitted forged lid and compact front plaque.
  • Fixed mirrored label UV orientation.
  • Reworked wood and iron PBR maps with grain, knots, cracks, pitting, scratches, oxidation and much lower smoothness.
  • Preview proxy is now a bulged barrel silhouette; runtime still uses Valheim's native barrel body.

0.2.2

  • Replaced procedurally generated barrel accessories with authored OBJ asset files.
  • Added 1024x1024 PBR texture sets for hammered forged iron and carved wood plaques.
  • COAL and RESIN labels are baked/carved into separate wood textures.
  • Runtime still preserves Valheim's native barrel body mesh/materials.
  • Added one-command build-and-install test script.

0.2.1

  • Refill initialization fix: barrels no longer rely on a one-shot Awake() race with ZNetView. Runtime setup now retries until the ZDO/network view and inventory are ready, and an empty active-barrel registry can recover loaded barrel instances automatically.
  • Broader light compatibility: Coal/Resin support is now determined by the actual Fireplace fuel item and capacity; m_canRefill no longer excludes otherwise compatible lights.
  • Diagnostics: optional Diagnostics > LogDiagnostics reports barrel runtime readiness and refill-scan counts so a failed scan is no longer silent.
  • Visual upgrade: the Unity builder now generates procedural albedo + normal maps for dark oak, amber oak, black iron, bronze, coal and resin instead of flat-colour materials.
  • Added rebuild-all.ps1 to rebuild the AssetBundle, DLL and Thunderstore package in one command.

0.2.0

  • Item restriction: Coal Barrel now accepts only vanilla Coal and Resin Barrel only vanilla Resin, enforced on drag/drop, shift-click, and quick-transfer, with an owner-side sweep that safely ejects (never deletes) anything that gets in another way.
  • Top-up instead of empty-only refill: lights are topped up to their own maximum fuel every scan; a light no longer has to reach zero first, and full lights consume nothing.
  • Generic Fireplace support: any loaded Fireplace-based light burning vanilla Coal or Resin is serviced automatically, vanilla or modded, with no hardcoded prefab list.
  • Nearest-first, multi-barrel fallthrough: if the nearest matching barrel can't fully cover a light's missing fuel, the scan continues to the next-nearest matching barrel.
  • Transaction-safe multiplayer: fuel is only ever added or removed by an object's own ZNetView owner. Cross-peer fuel moves use a transaction-ID'd request/grant/acknowledge/refund RPC exchange with a bounded timeout and automatic refund, so ownership changes, disconnects, or destroyed objects can't duplicate or silently lose Coal/Resin.
  • Server-controlled config: Enabled, feeding range, and refill interval are synced from the server/host to every client via Jotunn; clients can no longer run with different gameplay values than the server.
  • Existing barrel prefab names, save data, and piece recipes are unchanged, so barrels placed under 0.1.0 continue to work after updating.

0.1.0

  • Adds custom Unity-built coal and resin barrel models under Hammer > Misc, fitted to the vanilla barrel footprint and each with the same 32-slot capacity as a black metal chest.
  • Shows or hides the modeled coal and resin contents automatically based on each barrel's synchronized inventory.
  • Each barrel costs 100 Wood, 40 Iron, and 40 Tar.
  • Efficiently refills matching empty coal- or resin-burning lights within 50 metres using one configurable timed scan every 15 minutes by default.
  • Coordinates overlapping barrels so each light uses one matching barrel and scan-time fuel reservations distribute work safely.
  • Supports native light capacities, persistent fuel storage, and multiplayer ownership.
  • Compatible with Terramizer, TerramizerServer, EquipmentSheet, and InventoryLink 0.2.6 or newer.