You are viewing a potentially older version of this package. View all versions.
ItsBlade-OttoBifrost_NoPreview-1.3.2 icon

OttoBifrost NoPreview

See where a portal leads before you step through. The destination loads while you walk up, so you arrive with the floors already built.

Date uploaded a week ago
Version 1.3.2
Download link ItsBlade-OttoBifrost_NoPreview-1.3.2.zip
Downloads 30
Dependency string ItsBlade-OttoBifrost_NoPreview-1.3.2

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

README

OttoBifrost - The veil between worlds grows thin

THIS IS A MODIFIED VERSION WHICH REMOVES THE PORTAL PREVIEW.

I DO NOT OWN THIS CODE. DO NOT REPORT BUGS TO ME.

This was modified so the pre-load destinations feature from this mod works while allowing me to use Max's Immersive Portals mod's 3D portal preview.

OttoBifrost

For Valheim 1.0.12

Walk up to a portal and you see through it. The disc on the portal shows the far end, as a picture or live, and while you look the mod loads that place. By the time you step through, the floors and walls over there already exist. A trip between two built bases becomes a walk instead of a loading screen.

Maintainer: Paul Otto


What it does

  • A window in the portal. Within 12 m of a connected wood or stone portal, a round preview shows the arrival side, and both faces of the portal show the same place. The disc is sized for the wood arch, so it looks small on the stone portal. The preview has two modes, set with PreviewMode:
    • StaticView, the default. The mod takes a picture of the destination, facing the way you face when you arrive, as soon as everything within 40 m in front of the far portal exists. When the rest of the arrival area has loaded, it takes a second picture to fill in distant buildings. The picture stays until you walk away, and each new approach starts again. It shimmers and ripples, fades out at its rim, and lets 30% of the portal behind it show through.
    • LiveView. The preview renders continuously and follows your head, so the view shifts as you move.
  • Loading before you arrive. Within 15 m of a portal the zones around its destination start to load. Past 10 m that is 3x3 zones, inside 10 m it is 5x5, and inside 5 m it is 7x7. The area grows over a few seconds, and objects at the far end are created in small batches, so walking up does not hitch.
  • A room full of portals. The portal nearest to you loads first and at full size. Every other destination loads 3x3, which is enough for its preview. A different portal only takes over as nearest once it is 2 m closer, so pacing around a hub room does not drag the load back and forth between bases.
  • Faster teleports. When the destination is preloaded, the vanilla wait is skipped. The trip ends as soon as every object within 40 m of the arrival point exists and there is a floor under you. The far edges of a big base can finish building after you land. If that is already true you walk straight through. If it is not, the screen dims while the rest arrives, and at the vanilla 8 second mark vanilla takes over. Dungeon doors are left alone.

What it costs

StaticView renders at most twice per portal per approach, at most one portal per frame, and nothing after that.

In LiveView only the closest preview renders live. The others keep their last frame. The live one renders every frame inside 4 m, 10 times a second out to 8 m, and 3 times a second beyond that. In my six-portal hub room a preview render averaged 1.4 ms.

Both modes render without shadows and with a 300 m draw distance.


The game writes BepInEx/config/potto007.OttoBifrost.cfg the first time it runs with the mod loaded. When the server has the mod, the OttoBifrost section comes from the server.

Section Key Default What it does
OttoBifrost LockConfiguration true Only server admins can change the synced settings.
OttoBifrost PreloadDestinations true Load the area around a portal's destination while you stand near the portal. Synced.
OttoBifrost FastTeleport true Skip the vanilla wait when the destination is already loaded. Synced.
Preview PreviewMode StaticView StaticView shows a picture of the destination, taken once the objects near the far portal exist and again once the whole arrival area has loaded. LiveView renders the destination continuously and follows your head. Not synced.
Debug LogPerformance false Write a timing summary to the log every 5 seconds. Not synced.

Installation (manual)

Extract the DLL from the zip into <GameDirectory>\BepInEx\plugins, then start the game.


Installation (automatic)

Use Gale, r2modman or the Thunderstore Mod Manager. OttoBifrost is on Thunderstore and on Hexium. Search for it and install.


Servers

OttoBifrost works client only, and it works better with the mod on the server too.

A dedicated server sends each player only the objects near that player. Without the mod on the server you can preload only bases you already visited this session. A first visit shows bare terrain in the preview, the base builds itself around you after you land, and every fast teleport waits for the arrival area to stop changing.

With the mod on the server, each player reports the portals they stand near, and the server also sends the objects around each destination, after the player's own area. It accepts at most 8 portals per player, and only portals within 30 m of that player, so nobody can use it to scan the map. The server tells the player when a destination has nothing left to send, and a trip to a complete destination is a walk-through.

When both sides have the mod, the server config wins and the versions must match. A player on a different version cannot join.

Version information

The release history lives in CHANGELOG.md, and it renders on the Changelog tab of the Thunderstore package page.

Credits

OttoBifrost is written and maintained by Paul Otto. It depends on the BepInEx pack, and it carries ServerSync inside the DLL for the config sync and the version check. Bugs are mine, so report them at https://github.com/potto007/OttoBifrost. MIT licence.

CHANGELOG

Changelog

All notable changes to OttoBifrost.

v1.3.3

  • updated README.md

v1.3.2

  • Rebuilt against Valheim 1.0.15. Every Harmony patch target still resolves in this build, and nothing else changed.

v1.3.1

  • Rebuilt against Valheim 1.0.14. Every Harmony patch target still resolves in this build, and nothing else changed.

v1.3.0

  • StaticView shows its first picture sooner. It waits only for the objects within 40 m of the far portal, on the side you arrive on, instead of every object in the 3x3 zones around it. Height counts toward the 40 m, so the interior of a crypt next to the portal, which the game places far above its entrance, doesn't hold the picture back. A second picture replaces the first once the whole arrival area has loaded. Each picture waits 0.2 s, down from 0.5 s.
  • Fast teleports end once the objects within 40 m of the arrival point exist. They used to wait for the whole 3x3 zones, so a portal taken a few seconds after landing could hold you behind the loading screen for 1-3 s.
  • For 5 s after you land, the portal nearest you still loads first and at full size. Before, every portal waited behind the area you landed in.
  • Destination zones load in the order pictures and teleports need them. Each destination gets its centre zone first, then the zones within 40 m of its far portal, and only then its outer zones. In a hub with 8 portals, first pictures used to trickle in over about 16 s.
  • Destination zones load up to twice as fast. The mod asked the game's terrain thread for one zone at a time, so every zone sat out an extra 0.1 s tick. It now queues terrain for the next 4 zones, but only while the game has no zones of its own to load.
  • Objects near a destination come up in a fixed order. The game's own rule still holds: terrain edits, then building pieces, then everything else. Within each of those, portals go first, then objects in front of the far portal, closest first. Before, each zone's objects came in whatever order the game stored them.
  • LogPerformance reports more. Each 5 s summary adds how long the next destination zone waited to spawn and how busy the terrain thread was. Each StaticView picture logs how long after you came in range it was taken, when the far portal, the nearby zones and the nearby objects were ready, and the last object it waited for.

v1.2.0

  • StaticView is now the default PreviewMode. v1.1.0 wrote LiveView into every config file the first time it ran, so a saved LiveView says nothing about what you chose. The first time v1.2.0 loads a config file saved by an older version, it switches LiveView to StaticView and logs the change. After that it leaves the setting alone.
  • StaticView pictures shimmer and ripple, fade out toward the rim, and let 30% of the portal behind them show through.
  • StaticView no longer takes a picture mid-teleport, when the far side is the area you are leaving.
  • Fast teleports keep their own clock. In debug mode, Server devcommands' "Debug mode fast teleport" sets the teleport timer to 15. The fast path read that as past its 8 second limit and handed the trip to vanilla on the first frame, so you could land before the floors arrived.
  • Standing near built destinations costs less. The pass that creates their objects ran every 0.2 s even when nothing was left to create. Now each empty pass doubles the wait, up to 2 s, and any change to those zones or their objects brings it back to 0.2 s.
  • With LogPerformance on, the log records "server reports complete" once per change. The server repeats every state whenever your list of nearby portals changes, and each repeat used to get its own line.

v1.1.0

  • New PreviewMode setting in the Preview section. Not synced.
  • LiveView, the default, keeps the continuous, head-tracking preview from v1.0.0.
  • StaticView takes one picture of the destination once the objects around the arrival point are built, and renders nothing after that. Each approach takes a new picture.

v1.0.0

  • First release, for Valheim 1.0.12 and BepInEx 5.4.2350.
  • Live preview of the far end on wood and stone portals, from your eye position, on both sides of the portal.
  • The destination starts to load within 15 m of a portal, and the loaded area grows as you get closer.
  • The nearest portal loads first and at full size. Other destinations load 3x3, enough for their previews. The nearest only changes when another portal is 2 m closer.
  • Zones load ring by ring across all destinations and stay loaded while you stand near them. Objects come up in vanilla type order, terrain edits first, so nothing appears before the ground under it.
  • Faster teleports to a preloaded destination. The trip ends once every object around the arrival point exists and there is a floor under you, and vanilla takes over at the 8 second mark. Dungeon doors keep vanilla behaviour.
  • With the mod on a dedicated server, the server also sends the objects around each destination you stand near and reports when one is complete. At most 8 per player, and only for portals within 30 m of that player.
  • Only the nearest preview renders live, at a rate that drops with distance, without shadows and with a 300 m draw distance.
  • LogPerformance writes a timing summary every 5 seconds. Off by default.