Deathsquito Lightning Tower

版本 v0.3.8·更新於 2026-09-30

A defensive deathsquito nuking lightning tower, that can recharge from storms or thunderstones. Enemies, range, damage, etc are all configurable.

模組介紹 作者原文

Deathsquito Lightning Tower

A storm-powered defense against Deathsquitos.

0.3.8 is a beta. Tested locally on Valheim 1.0.16 with BepInExPack 5.4.2351 and Jötunn 2.30.2. Multiplayer still needs testing with connected players.

Build and charge

Find Lightning Tower in the Hammer's Misc category. An Artisan Table is required.

| Material | Amount |

| --- | ---: |

| Thunder Stone | 5 |

| Copper | 15 |

| Black Metal | 15 |

| Crystal | 10 |

New towers start empty. Interact with a tower while carrying a Thunder Stone to restore all 30 charges. Thunderstorms replenish one charge every two seconds while the area is loaded.

Each lightning attack spends one charge and deals 50 lightning damage by default. Default range is 40 m with a two-second cooldown. The target list defaults to Deathsquitos and can include other creatures.

Ready towers coordinate their shots: for example, three towers with three reachable bugs can hit three different bugs. With one shared bug, the closest eligible tower gets the shot. With several bugs, assignment favors hitting as many different bugs as possible, then minimizes total distance.

Server compatibility

You can leave this mod installed when joining a server that does not use it, including a vanilla server. The tower stays inactive: it is hidden from the Hammer menu and spawn list, cannot be placed, and sends no tower attack or refill messages. It waits for the connection to finish before enabling tower features.

The tower works normally in single player and on servers that have the mod. Switching worlds or servers updates availability automatically; no restart or configuration change is needed. Use lt_status to check whether it is active.

Servers using Lightning Tower still require every player to install the same version, plus BepInEx and Jötunn. This protects clients from missing custom building assets. Other mods may have their own connection requirements.

Configuration

Launch the game once to generate BepInEx/config/valheim.lightningtower.cfg. Close the game before editing, then restart.

The plugin now uses the neutral ID valheim.lightningtower. When replacing an earlier development build, rename its Lightning Tower config to valheim.lightningtower.cfg before launching to preserve settings. Remove the old plugin DLL so only one copy is installed. Placed towers and their saved charge keys are unchanged. All multiplayer participants must use the new build.

Settings include attack range, capacity, damage, cooldown, target list, scan interval, line of sight, storm recharge rate, recipe, tower height, lightning width and jaggedness, charged halo size, attack volume, and hum range/volume. TowerHeightMeters defaults to 6 and measures the placement point to the highest branch; an additional 0.45 m of base extends into the ground at default scale. ChargedHumVolume defaults to 0.3 and ChargedHumRangeMeters to 3. Gameplay settings are synchronized from the host/server.

The [Crafting] settings are ThunderstoneCost = 5, CopperCost = 15, BlackMetalCost = 15, and CrystalCost = 10. Every enabled ingredient is recoverable. If all four are set to zero, the default recipe is used.

Example combat configuration:

[Combat]

TargetPrefabs = Deathsquito, Seeker, Gjall

LightningDamage = 50

BluntDamage = 0

SlashDamage = 0

PierceDamage = 0

FireDamage = 0

FrostDamage = 0

PoisonDamage = 0

SpiritDamage = 0

Use exact, case-sensitive creature prefab names. Spaces and duplicate entries are ignored; unknown names are logged and skipped. An empty list disables targeting. Players, dead and tamed creatures are always excluded. The one-to-one assignment also applies to mixed creature types.

Damage types add together, before the game's resistances, weaknesses and damage-over-time rules. Each accepts 0–10,000; zero disables that type. All types at zero prevents attacks and charge consumption. Existing LightningDamage values are preserved when updating.

For console testing, the prefab name is piece_lightningtower:

spawn piece

安裝與使用 安裝:BepInEx 外掛

  1. 本站下載的壓縮包就是模組本體,通常是 BepInEx 外掛(解壓後得到 .dll 或外掛資料夾)。
  2. 建議流程:用社群模組管理器(如 r2modman)選中本遊戲後匯入該模組,管理器會自動裝好 BepInEx 前置並處理依賴。
  3. 手動流程:先在遊戲目錄裝好 BepInEx 載入器,再把解壓出的 .dll 或外掛資料夾放進 BepInEx/plugins/。
  4. 啟動遊戲,BepInEx 控制台會列印載入日誌;確認這個模組出現在日誌裡即為安裝成功。

帶「前置依賴」的模組需要一併安裝,否則不會載入。功能開關通常在遊戲內或外掛自帶的設定檔裡調整。 多人連線時,主機與所有用戶端需要安裝一致的模組。

前置依賴

下面這些內容需要先安裝,否則該模組不會生效:

denikson-BepInExPack_ValheimValheimModding-Jotunn

檔案與校驗

檔案名稱
Deathsquito_Lightning_Tower-0.3.8.zip
檔案大小
273.2 KiB