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.
SaerimnerBallista
BETA. Ballistas that only shoot at hostile creatures (with the Ullr Trophy, or all of them), refill from chests, optional unlimited ammo, and tuning of range, arc and turn rate. Settings are decided by the server.
By MH
| Last updated | 6 days ago |
| Total downloads | 43 |
| Total rating | 1 |
| Categories | Mods Deep North Update AI Generated Tweaks Server-side Client-side |
| Dependency string | MH-SaerimnerBallista-0.7.2 |
| Dependants | 0 other packages depend on this package |
This mod requires the following mods to function
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.2denikson-BepInExPack_Valheim
BepInEx pack for Valheim. Preconfigured with the correct entry point for mods and preferred defaults for the community.
Preferred version: 5.4.2360README
Saerimner Ballista (beta)
Beta, version 0.7.2. The hostiles-only targeting and the refill from chests have been tried in the author's own game, with the ballista shooting at animals and the log showing the refill. Unlimited ammo and the tuning values are newer and have been tried less. Expect rough edges, and please report problems with the log.
A mod for the ballista in Valheim. It can make a ballista shoot only at hostile creatures, refill itself from a chest, have unlimited ammo, and it lets you tune its range and turning.
Hostiles only: two ways
1. The Ullr Trophy (default)
- Adds a trophy,
Ullr Trophy(prefabTrophyUllr_SB), that looks like the head of a Viking (see "What the trophy looks like"). It has no recipe and no drop: it only exists if you give it to somebody (spawn TrophyUllr_SBwith the console commands on, or put it in a loot list). - Use it on a ballista, like any trophy (hold it, point at the ballista, use it). That ballista then only shoots at hostile creatures: never at players or tamed animals. Use the trophy again on the same ballista to take the blessing away. The trophy is not used up. The ballista's hover text says when it is blessed, and the blessing is saved with the ballista.
1 - Ullr Trophy / Enabled = falseswitches it off: the item still exists, but it does nothing on a ballista.
2. Every ballista, no trophy: 2 - Hostiles only / All ballistas = true (default off).
Bolts that pass through friends (2 - Hostiles only / Bolts pass through friends, default on): a player or a tamed animal can stand in the way of the bolt of a hostiles-only ballista. These bolts fly on without hurting them.
Refill from chests (default on)
When a ballista has run out of ammo, it takes ammo from a chest within reach (3 - Chest refill / Range (meters), default 10) and is filled up again, up to its maximum (40 for the normal ballista). It takes ammo that the ballista accepts, the kind it used last first, from the closest chests first. A chest that a player has open is left alone.
It works with any chest, also private and warded ones: only put ammo in a chest that you are willing to share with every ballista within the range.
Unlimited ammo (default off)
4 - Unlimited ammo / Enabled: every ballista has unlimited ammo, and needs no ammo item at all. Ammo chooses the kind (the prefab name, for example TurretBoltWood; empty = the kind it used last). The normal ballista accepts TurretBolt, TurretBoltWood, TurretBoltFlametal and TurretBoltBloodgold. With this on, the chest refill is not used. A ballista that is destroyed (with the hammer, or by damage) drops no bolts for the ammo that unlimited ammo gave it, and when you switch unlimited ammo off, the ammo it made up is taken away again.
Tuning (all default 0 = as the game has it)
5 - Tuning: Range (meters), Scan arc (degrees), Sweep interval (seconds), Turn rate, Maximum ammo and Maximum target trophies. Nothing changes until you set a value. Only ballistas that a player built are changed.
How to change a setting
- Start the game once with the mod, so that the config file is made, and close the game.
- Open
BepInEx/config/SaerimnerBallista.cfgin a text editor (in the Thunderstore Mod Manager or r2modman: Settings, then Browse profile folder, thenBepInEx,config). - Find the section, for example
[4 - Unlimited ammo], and change the value after the equals sign, for exampleEnabled = true. Writetrueandfalsein lower case, and do not change the lines that start with#. - Save the file and start the game. On a server it is the server's file that counts.
Servers and multiplayer
- Install the mod on the server and on every player's computer: it adds an item, so everybody must have it, together with Jotunn.
- All settings are synced from the server (admin only): the server's config file decides, and a player's own values are replaced by the server's while connected.
- The trophy item always exists on the server and on every client, so the item lists match whatever the settings are.
What the trophy looks like
The Ullr Trophy is the head of a blond, blue-eyed Viking: a helmet with bands, rivets and a nose guard, a beard of many locks with two braids with gold beads, a moustache, long hair and a fur collar. The model and the icon are inside the mod and were made for it by a program (nothing from the game's own files is used).
6 - Look (only what you see, so it is not synced from the server; needs a restart):
Trophy model:Viking(default) orSkeleton(the Skeleton Trophy that it is made from).Trophy model scale(default 1),Trophy model offset (meters x,y,z)(default0,0,0; for example0,-0.03,0lowers the head 3 cm on a trophy mount) andTrophy model rotation (degrees x,y,z)(default0,0,0; for example0,180,0if the head faces the wrong way).
Your own graphics: put files in BepInEx/config/SaerimnerBallista/ and start the game: ullr_icon.png (the inventory icon), or ullr_model.obj together with ullr_texture.png (a model of your own in the OBJ format, in metres, y up, the front along +Z, and its colours).
How it works, and what to look for in the log
The mod finds the settings of the ballista (a turret that a player builds) in the game by name when it starts. The log (BepInEx/LogOutput.log) should have these lines:
Turret settings found: ...without "(MISSING)"Ballista targeting ...: set up,Ballista tuning ...: set up,Ullr Trophy on the ballista: set up,Ballista bolts: set up,Ballista refill from chests: set upandAdded the Ullr Trophy (TrophyUllr_SB)
A line that says "not found" means that part is switched off in your game version. Please send the log with your report.
Requires
BepInExPack for Valheim, and Jotunn (both are installed with the mod by the mod manager).
AI disclosure
Large parts of this mod's code were written with the help of an AI assistant (Claude), and the model of the Viking head, its colours and the icon were made by programs that it wrote. Please report problems, with the log.
Changes
See the changelog.