Aquark-ResinFire icon

ResinFire

Five fire pieces burn resin instead of coal, guck or greydwarf eyes, and eight fire pieces refill themselves from containers within 30 m. Prefab lists are configurable, server-side.

By Aquark
Last updated 13 hours ago
Total downloads 73
Total rating 1 
Categories Building
Dependency string Aquark-ResinFire-1.2.0
Dependants 0 other packages depend on this package

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2351 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.2351

README

ResinFire

Two changes for Valheim's fireplaces: five light sources burn resin instead of their old fuel, and eight fire pieces keep themselves fuelled from your storage.

Features

1. Burn resin instead of coal / guck / eyes

Piece Prefab Old fuel New fuel
Hanging Brazier piece_brazierceiling01 Coal Resin
Standing Brazier piece_brazierfloor01 Coal Resin
Blue Standing Brazier piece_brazierfloor02 Greydwarf Eye Resin
Standing Blue-burning Iron Torch piece_groundtorch_blue Greydwarf Eye Resin
Standing Green-burning Iron Torch piece_groundtorch_green Guck Resin
  • Works on pieces that are already built (leave the area and come back, or restart) and on new ones.
  • Their old fuel is no longer accepted — resin becomes the only fuel for these five.
  • Burn time is unchanged: one resin still equals one fuel unit. The coloured pieces are very long-burning (6 fuel x 20000 s), so they barely need attention.
  • The fuel item is configurable: FuelItem = Coal puts everything back to vanilla behaviour.

2. Self-refilling fires

These eight pieces pull fuel out of any container within 30 meters and top themselves up:

Piece Prefab What it pulls
Hanging Brazier piece_brazierceiling01 Resin
Standing Brazier piece_brazierfloor01 Resin
Blue Standing Brazier piece_brazierfloor02 Resin
Standing Blue-burning Iron Torch piece_groundtorch_blue Resin
Standing Green-burning Iron Torch piece_groundtorch_green Resin
Sconce (wall torch) piece_sconce its own fuel
Standing iron torch piece_groundtorch its own fuel
Standing wood torch piece_groundtorchwood its own fuel
  • Each piece pulls its own fuel item, so the resin pieces take resin while the plain torches keep taking wood — torches do not need their fuel changed.
  • Refill tops the piece up to its maximum in one go, then waits until it burns some down again.
  • Fires the player switched off are left alone; only burning ones are refuelled.
  • Containers a player currently has open are skipped for that pass (they are owned by the client) and picked up on a later check.
  • Chests, carts and any other Container count; it is a 3D distance, so a chest one floor up still works.

3. Everything is configurable

BepInEx/config/snowfarm.valheim.resinfire.cfg

Section Key Default Meaning
1 - General Enabled true Master switch
2 - Fuel FuelItem Resin Item the FuelPrefabs burn (Coal = vanilla)
2 - Fuel FuelPrefabs the five pieces above Pieces whose fuel type is replaced
3 - Auto refill RefillPrefabs the eight pieces above Pieces that refill themselves
3 - Auto refill Radius 30 Container search radius, meters
3 - Auto refill Interval 5 Seconds between refill checks

The two lists are independent: you can run only the fuel change, only the auto refill, or both, on any mix of pieces.

Other prefab ids you may want (note the underscores in the coloured torches):

Piece Prefab
Standing torch, demister piece_groundtorchdemister
Dvergr wall lantern / pole lantern piece_dvergr_lantern / piece_dvergr_lantern_pole (no fuel, not applicable)
Iron Fire Pit (burns wood) piece_firepit_iron

Install

  • Install BepInExPack Valheim (r2modman handles it).
  • Drop ResinFire.dll into BepInEx/plugins/.
  • Install on the server and on the clients. The refill loop runs on the server; clients need the same data so fuel icons and hover text match.

Performance

There is no Update() and no per-frame patch. A coroutine runs once every Interval seconds on the server: it compares each covered fire against loaded containers by squared distance, and only scans inventory slots for containers inside the radius. With dozens of fires and hundreds of containers this is well under a millisecond per pass.

Compatibility and safety

  • Only the pieces in the two lists are touched. Campfires, hearths, fire pits, bonfires, lanterns and every modded piece are unaffected.
  • Purely runtime: nothing is written to the world file, so uninstalling restores vanilla behaviour (the braziers accept coal again, refilling stops).
  • Upgrading from 1.1.0 rewrites the default prefab lists once; if you edited those lists yourself, your value is kept.
  • The Iron Fire Pit burns wood and its prefab id does not resolve through ZNetScene.GetPrefab in 1.0, so it is not a default target.
  • Works alongside build/placement mods; no dependencies besides BepInEx.

中文说明

功能一:五个建筑改烧树脂。 吊盆火炉(煤)、火盆(煤)、蓝色立式火盆(灰矮人之眼)、立式蓝色火炬 (灰矮人之眼)、立式绿色火炬(树脓 Guck)——全部改成烧树脂,原来的燃料加不进去了。已经摆好的重进 区域即生效,不用拆。燃烧时长不变(1 树脂 = 1 燃料单位)。

功能二:八个建筑自动补燃料。 上面五个,加上壁挂火把(piece_sconce)、立式铁火炬 (piece_groundtorch)、立式木火炬(piece_groundtorchwood),每 5 秒从 30 米内的箱子/储物建筑里取 燃料补满。

  • 每个建筑取自己烧的那种燃料:改过的是树脂,没改的火炬仍是木头。
  • 玩家手动关掉的火盆不会被补;正被玩家打开的箱子那一轮跳过。
  • 只影响列表里的建筑,营火/壁炉/火坑/篝火/灯笼都不动。
  • 纯运行时改动,卸载后立即恢复原版行为,不污染存档。

注意彩色火炬的 prefab 名带下划线:piece_groundtorch_blue / piece_groundtorch_green。

Build

dotnet build -c Release -p:ValheimDir="C:\Program Files (x86)\Steam\steamapps\common\Valheim"

or run pack.ps1 to build and produce ResinFire.zip for Thunderstore.