You are viewing a potentially older version of this package. View all versions.
valheimvibes-Deathsquito_Lightning_Tower-0.3.7 icon

Deathsquito Lightning Tower

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

Date uploaded 2 weeks ago
Version 0.3.7
Download link valheimvibes-Deathsquito_Lightning_Tower-0.3.7.zip
Downloads 44
Dependency string valheimvibes-Deathsquito_Lightning_Tower-0.3.7

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

Deathsquito Lightning Tower

A storm-powered defense against Deathsquitos.

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

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_lightningtower

Current limitations

  • Use with trusted multiplayer participants. Refill payment is client-controlled, and sender authentication and RPC flood protection need hardening before treating this mod as safe against malicious clients.
  • Recharging from weather requires the tower's area to be loaded.
  • The model is original geometry; its native materials, effects and audio depend on the installed Valheim version.

The mod references game assets at runtime. No Valheim models, textures, or sound files are included in this package. This mod was developed with AI assistance (some vibing and lots of reading).

CHANGELOG

Changelog

0.3.8

  • Slightly darkened the tower's copper with a redder hue, retaining its metallic shine.
  • Clients can join servers without Lightning Tower installed. Tower building, spawning, attacks, effects, and refills stay inactive on those servers.
  • Tower features activate automatically in local worlds and on servers running the mod. The Hammer menu is filtered even in free-build mode, and cached build selections cannot bypass the restriction.
  • Servers using Lightning Tower still require all players to have the same mod version.

0.3.7

Initial beta release.

  • Added a 6 m copper lightning tower with a branching crown, black metal bands, and glowing rune inscriptions on three faces.
  • Targets Deathsquitos by default within 40 m. Nearby towers coordinate attacks to cover different targets, favoring the closest eligible tower for a shared target.
  • Holds 30 charges. One Thunder Stone restores all charges, and thunderstorms recharge the tower while its area is loaded.
  • Deals 50 lightning damage per attack by default, with a two-second cooldown.
  • Includes jagged lightning strikes, Obliterator sparkles and thunder, intermittent branch-to-orb lightning, and a nearby charged hum.
  • Requires an Artisan Table and 5 Thunder Stones, 15 Copper, 15 Black Metal, and 10 Crystal to build. Construction materials are recoverable on dismantling or destruction; recharge fuel is consumed.
  • Configurable targets, damage types, range, capacity, recharge rate, recipe, and visual/audio settings. Gameplay settings synchronize from the host/server.

Requires BepInEx and Jötunn. Multiplayer testing with connected players remains outstanding.