You are viewing a potentially older version of this package. View all versions.
wheezl-QuantumObliterator-0.3.0 icon

QuantumObliterator

Two Obliterators whose nearby signs read the same thing become a linked pair - pull the lever on one and its contents are shipped to the other, anywhere in the world, for one fuel item. An Obliterator with no sign behaves exactly like vanilla.

Date uploaded 2 weeks ago
Version 0.3.0
Download link wheezl-QuantumObliterator-0.3.0.zip
Downloads 56
Dependency string wheezl-QuantumObliterator-0.3.0

This mod requires the following mods to function

denikson-BepInExPack_Valheim-5.4.2350 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.2350
ValheimModding-Jotunn-2.30.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.30.2

README

QuantumObliterator

Description

Put a sign next to an Obliterator and the text on that sign becomes its tag. Two Obliterators tagged with the same text are linked. Pull the lever on one and everything inside it is moved to the other, anywhere on the map, for the cost of one or more fuel items (Thunderstones by default).

An Obliterator with no sign next to it works exactly like it does in vanilla.

The point is long-distance hauling in a world where portals can't carry metal, once your bases are spread across the map.

Features

  • Ship items between any two Obliterators whose signs match, at any distance.
  • The receiving end doesn't need to be loaded, and nobody has to be standing near it.
  • Fuel cost scales with the weight of the shipment, not distance or stack count.
  • The lever's hover text shows the tag, what the Obliterator currently holds, and what the pull will cost. It turns red when there isn't enough fuel.
  • A tagged Obliterator never destroys items. If the tag has no partner, if three or more Obliterators share a tag, if there isn't enough fuel, or if the far end is full, you get a message and nothing is consumed.
  • All or nothing: if the whole shipment doesn't fit, none of it moves and no fuel is spent.
  • The lightning on a shipment does no damage, so it can't destroy the sign that tags the pair. Normal obliteration keeps vanilla's damaging lightning.
  • Transfers are handled by the server, not the client.

Compatibility

Built and tested against Valheim 1.0.15 (build 25390630), BepInExPack Valheim 5.4.2350 and Jotunn 2.30.2.

Required on the server and on every client. A vanilla client connecting to a modded server would fall through to ordinary obliteration and destroy its cargo, so the mod refuses that setup rather than risk it. Works on dedicated servers and on client-hosted worlds.

Known issue: if someone has the receiving Obliterator's container open and moves an item around inside it at the exact moment a shipment lands, that delivery can be lost. Just having it open is fine.

Configuration

BepInEx/config/wheezl.quantumobliterator.cfg. Every gameplay setting is admin-only and synced from the server, so clients get the server's values and can't override them.

Setting Default Meaning
Enabled true Master switch. false restores vanilla behaviour.
SignSearchRadius 5.0 How far from an Obliterator to look for a sign, in metres.
CaseSensitiveTags false Whether Ashlands and ashlands are different tags.
RequireFuel true false makes transfers free and unlimited.
FuelItems Thunderstone Comma-separated item prefab names, tried in order. Capitalisation matters.
WeightPerFuelUnit 1080.0 How much shipment weight one fuel item pays for.
DestinationEffect true Play the lightning at the receiving end as well.
VerboseLogging false Local only. Writes transfer details to LogOutput.log.

One Thunderstone covers 1080 weight by default, which is roughly three full stacks of metal bars. The stone you burn is paid for on top of that, so it doesn't eat into the allowance.

Installation

Use a mod manager and install QuantumObliterator. It depends on BepInExPack Valheim and Jotunn, which the manager installs for you.

To install by hand, put QuantumObliterator.dll in BepInEx/plugins/. Jotunn needs to be installed already.

Author

Made by wheezl. Source: https://github.com/wheezl1/QuantumObliterator

AI Use

This is my first Valheim mod. I'm not an experienced C# developer, and I used AI heavily to write and debug it. The mod is tested and works, but the code was written with a lot of AI assistance and you should judge it on that basis.

CHANGELOG

Changelog

All notable changes to this project are documented here. This project adheres to Semantic Versioning.

0.3.0

Fixed

  • Transfer lightning only fired once per session. Every shipment after the first produced a clipped thunder sound and no visible bolt. The effect was being staged under a deactivated GameObject so its Aoe components could be disarmed before Awake baked the collision mask — but reparenting out of an inactive parent activates the object immediately, so it awoke at the world origin instead of at the Obliterator, registered its ZDO in the wrong sector, and was culled a frame later. The clone is now created with vanilla's own Object.Instantiate call and disarmed through a Harmony prefix on Aoe.Awake.

Changed

  • Plugin GUID is now wheezl.quantumobliterator. The config file is therefore BepInEx/config/wheezl.quantumobliterator.cfg; any older dev.moxie.quantumobliterator.cfg left in a profile is orphaned and can be deleted. Because NetworkCompatibility is set to VersionStrictness.Minor, every client and the server must be on this version.
  • The version number now lives in exactly one place, <PluginVersion> in QuantumObliterator.csproj, and is surfaced to [BepInPlugin] through a generated constant.
  • Lightning spawns now log their position and neutered-component count when VerboseLogging is enabled.

0.2.0

Added

  • Fuel cost scales with shipment weight rather than stack count or distance. One fuel item pays for WeightPerFuelUnit of cargo, and the fuel's own weight is included in the divisor so a burned stone never eats into the allowance it paid for.
  • Lever hover text shows the tag, the current contents' weight, and what the pull will cost — in red when the Obliterator cannot currently pay for it.
  • A pull whose entire payload is the fuel is refused rather than burning a stone to deliver nothing.

Changed

  • Transfer lightning no longer damages anything. Vanilla obliteration keeps its damaging lightning; only shipping is harmless, so a blast can't destroy the sign that tags the pair.

0.1.0

Initial release.

  • Two Obliterators whose nearby signs carry the same text form a linked pair; pulling the lever on one ships its contents to the other, anywhere in the world, for the price of one fuel item.
  • An Obliterator with no sign behaves exactly like vanilla.
  • The destination does not need to be loaded and nobody has to be standing near it.
  • Server-authoritative: the client only asks, and the server resolves the pair, validates fuel and capacity, and writes both containers.
  • A tagged Obliterator never destroys items — no partner is an error, not a pile of coal — and a tag matching three or more Obliterators is refused without consuming anything.