You are viewing a potentially older version of this package. View all versions.
CDEVx-CDEV_PortalPins-0.2.0 icon

CDEV PortalPins

Every portal in the world gets a map pin for every player, and the portal naming window lists all portals with linked / unlinked marks, search and a jump to the map.

By CDEVx
Date uploaded 2 weeks ago
Version 0.2.0
Download link CDEVx-CDEV_PortalPins-0.2.0.zip
Downloads 182
Dependency string CDEVx-CDEV_PortalPins-0.2.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.0 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.0

README

PortalPins

Every portal in the world gets a map pin — for every player, everywhere, from the moment it is built.

No more "where did we put the portal to the swamp?". The server knows every portal in the world, so the pins are complete: portals you have never visited, portals a friend built while you were offline, and portals that existed long before you installed the mod.

What you get

  • A pin on every portal, named after the portal's tag (Portal when it has none). It appears a few seconds after the portal is built, follows a rename and disappears together with the portal.
  • Pin names start with *, so portal pins are easy to tell apart from the ones you placed yourself. Set NamePrefix to an empty value if you would rather not have it.
  • The pins behave like the game's own spawn pin: they are not written into your character file, a left click does not cross them out, a right click does not delete them, and if another mod wipes them they are back within two seconds. The map's icon filter still hides them if you want quiet.

The portal list, inside the naming window

Interact with a portal and the usual tag window opens — with the list of every portal of the world right under the name field:

  • the portal you are standing at comes first, then the ones that have no partner yet;
  • the icon on the right says whether a portal is linked: white when it has a partner, red while it stands alone. Point at it and it tells you which portal it is paired with;
  • two linked portals are drawn as one block, with a bar down the left side, so a pair reads as one thing instead of two rows with the same name;
  • click a row to write that name into the field — which is how the game pairs two portals;
  • type in the field to search the list. A world with fifty portals is one word away;
  • every row has a map button: it opens the map on that portal, zoomed in, and makes its pin pulse for a few seconds. Close the map and the naming window comes back, with the text you had typed;
  • the list follows the server while the window is open, so a portal someone else builds or renames turns up in it by itself.

While the window is open the background is dimmed and the mouse wheel scrolls the list instead of zooming the camera. ShowPortalList = false turns the whole list off.

Removing a pin (for everybody)

Off by default. With the server setting AllowRemoving on, a right click on a portal pin removes that pin for every player on the server — the portal itself stays, and so does its entry in the portal list.

  • AdminsOnly (on by default) leaves that to admins from adminlist.txt and to whoever hosts the world.
  • ConfirmRemoval (client, on by default) asks first and says what is about to happen.
  • The server remembers it next to the world, in <world>.mod.portalpins.hidden, so it survives a restart. To bring every removed pin back, delete that file while the server is stopped.

Installation

The mod belongs on the server and on every client. Only the server sees every portal in the world; a client only receives what is near it. A server that has the mod refuses clients that do not (Jötunn ClientMustHaveMod), so everyone playing there needs it.

  1. Install BepInExPack Valheim and Jötunn.
  2. Drop CDEV.PortalPins.dll into BepInEx/plugins/CDEV.PortalPins/ on the server and in every player's game folder. A mod manager does this for you.
  3. Single player needs nothing extra: your own world is the server.

Settings — BepInEx/config/cdev.portalpins.cfg

Section Key Default What it does
Pins AllowRemoving false Server, admin only, synced: a right click removes a portal pin for every player.
Pins AdminsOnly true Server, admin only, synced: only admins and the host may remove pins.
Pins ConfirmRemoval true Client: ask before removing a pin.
Pins NamePrefix * Client: the mark in front of every pin name of this mod.
Portals ShowPortalList true Client: the portal list inside the naming window.

The two server settings are admin-only: Jötunn sends them to every client and locks them there, so a player cannot switch removal on for themselves.

Compatibility and cost

  • Valheim 1.0, BepInEx 5.4.23, Jötunn 2.30. Works on a dedicated server, on a player-hosted world and in single player.
  • The server scans its portal list every two seconds and only sends something when it has changed; the list of a big world is a few kilobytes. Nothing is written to your character.
  • pp_selftest in the console (F5) checks the whole thing in a far corner of the map and prints PASS or FAIL, in the console and in LogOutput.log.

Credits

Written by CDEV for a friends' server. Bug reports with a slice of BepInEx/LogOutput.log are welcome.

Licence: MIT (the LICENSE file is in the package). Fork it, reuse it, keep it alive if I stop — a mention of where it came from is all I ask.

CHANGELOG

Changelog

0.2.0

First public release.

  • A map pin on every portal of the world, for every player, named after the portal's tag. It appears when the portal is built, follows a rename and disappears with the portal. Portals that existed before the mod get their pins too.
  • The pins are system pins: not saved into the character, they cannot be crossed out or deleted by clicking, and they come back if another mod removes them.
  • Every pin name starts with * (setting NamePrefix) so portal pins stand out among your own.
  • The portal naming window lists every portal of the world: the portal being named first, then the ones without a partner. Linked or not is shown by the portal icon — white when paired, red while alone, with a tooltip naming the partner; two linked portals are drawn as one block. Clicking a row writes that name into the field, typing in the field searches the list, and every row has a button that opens the map on that portal and makes its pin pulse — closing the map brings the window back with the text that was in it. The list follows the server while the window is open. Setting ShowPortalList.
  • Optional removal of a pin for every player (server settings AllowRemoving, AdminsOnly, client setting ConfirmRemoval). The server keeps the decision next to the world, in <world>.mod.portalpins.hidden; deleting that file with the server stopped brings the pins back.
  • Console command pp_selftest.