Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
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
| Date uploaded | 15 hours ago |
| Version | 1.2.0 |
| Download link | Aquark-ResinFire-1.2.0.zip |
| Downloads | 21 |
| Dependency string | Aquark-ResinFire-1.2.0 |
This mod requires the following mods to function
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.2351README
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 = Coalputs 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
Containercount; 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.dllintoBepInEx/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.GetPrefabin 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.
CHANGELOG
Changelog
1.2.1
- Fixed auto refill doing nothing when a player had opened the resin chest: opening a container moves ZDO ownership to that player, so the server-side loop could not use it. The server now claims ownership of the container (unless somebody has it open) and of the fireplace itself before refilling.
- Added a
Verbosediagnostic option that logs a per-cycle summary and the reason each fire was skipped (no containers in range,no Resin in range,switched off,fire not owned, ...). - Logs once when the plugin is loaded on a non-server peer, because refill only runs on the server.
1.2.0
- Added the coloured light sources to the fuel change: Blue Standing Brazier (
piece_brazierfloor02), Standing Blue-burning Iron Torch (piece_groundtorch_blue) and Standing Green-burning Iron Torch (piece_groundtorch_green) now burn resin instead of Greydwarf Eyes / Guck. - The same three pieces are also auto-refilled now, so the refill list covers eight pieces.
- Startup log now prints what each piece burned before it was changed.
- Configs upgrading from 1.1.0 get the new default prefab lists once, unless they were edited by hand.
1.1.0
- Fuel replacement and auto refill are now two separate prefab lists.
- Default fuel list is only the two coal braziers: Hanging Brazier and Standing Brazier. The Iron Fire Pit is no longer touched (it burns wood and its prefab id did not resolve).
- Auto refill now also covers the Sconce (wall torch) and the standing torches.
- Refill pulls whatever item each piece actually burns, instead of always looking for resin.
- Fuel item is also applied per instance on
Awake, so pieces spawned before the prefab patch and prefabs with the component on a child object are covered too.
1.0.0
- Initial release.
- Hanging Brazier, Standing Brazier and Iron Fire Pit burn resin instead of coal.
- Automatic refill from containers within 30 m (configurable radius / interval / prefabs).