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.
RealPortal
Portals you can see and walk through: a live view of the destination and no loading screen. Works with every portal, keeps vanilla item rules, lets items, arrows and creatures pass, reach through. Multiplayer-ready.
| Date uploaded | 4 days ago |
| Version | 1.0.3 |
| Download link | drakeich-RealPortal-1.0.3.zip |
| Downloads | 336 |
| Dependency string | drakeich-RealPortal-1.0.3 |
This mod requires the following mods to function
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.2333README
Real Portal
Portals you can see through and walk through, like in Portal. The opening shows the real place on the other side, live, and you step into it with no loading screen and no teleport.
Features
- A live window. The opening shows the other end as you would see it standing there: the same light, fog, weather, ambient occlusion, sun shafts and reflections. Look around and the view moves with you.
- Walk through it. No loading screen and no fade. You keep your speed and direction, and the camera passes through smoothly.
- The far side is really there. The place behind a portal near you is loaded the way the game loads your own surroundings. Its creatures move, fires burn and smelters work, even before you arrive.
- Every portal. The wooden portal, the stone portal (Ashlands) and modded portals (e.g. the Inscription Gate of Path of Valheiman). No special tag and no limit on the number of portals.
- Things pass too. Dropped and thrown items, arrows and other projectiles, and creatures (each configurable).
- Vanilla rules are kept. If something may not pass (ore and other forbidden items, boss rules, creatures you set to stay), the opening becomes an invisible wall and shows the vanilla swirl, on both sides.
- Reach through. Open a chest, pick up an item, use a workbench or build a piece on the other side, as if it stood where you see it.
- Creatures notice you through it. They see, hear and hit through the opening, and walk through it to reach you (each configurable).
- Sound passes through, heard from the portal it comes through.
- Multiplayer. A dedicated server sends each player the far side of the portals near them and generates places nobody has visited yet. Others see you jump through, not slide across the map.
Installation
Install with r2modman / Thunderstore Mod Manager, or put RealPortal.dll and realportal.bundle together into BepInEx/plugins/RealPortal/.
Multiplayer: install it on the server and on every player. A player on a server without the mod still gets windows, showing only what their game already knows about the other side.
Performance
- Each far end loaded costs about as much as your own surroundings (memory and a little CPU). Only portals within
PreloadDistance(120 m) load their far end. - Far ends nobody is looking at sleep. Windows that are small on screen are refreshed less often.
- Tested with 10 portals to 10 different places at once: about 11 ms per frame facing away from them and about 29 ms facing a hall of 9 windows (6–7 ms without them).
Configuration
BepInEx/config/valheim.realportal.cfg. The most useful settings:
| Setting | Default | What it does |
|---|---|---|
General/Enabled |
true | Turns real portals on or off (off: vanilla portals). |
General/RespectItemRestrictions |
true | Forbidden items stop you at the opening, as in vanilla. |
General/Items, General/Projectiles |
true | Items and projectiles pass through. |
General/ReachThroughPortals |
true | Interact and build through the opening. |
General/Sound |
true | Sound passes through. |
Window/Resolution |
1 | Window resolution (lower = faster). |
Window/MaxDistance |
60 | Windows further than this are not drawn. |
Window/MaxRendersPerFrame |
4 | How many windows may be drawn in one frame. |
Distance/PreloadDistance |
120 | Far ends of portals closer than this are loaded. |
Distance/FarAreaZones |
3 | How many zones around a far end are fully loaded. |
Distance/UnloadExtraDistance |
30 | A far end stays loaded until you are this much farther than PreloadDistance. |
Distance/UnloadDelay |
5 | Seconds a far end stays loaded after you leave its range. |
Distance/MaxFarAreas |
0 | At most this many far ends at once, the nearest portals (0 = no limit). |
Creatures/* |
true | Creatures see, hear, walk and hit through portals; the far side lives. |
A room full of portals: every portal within PreloadDistance keeps its far end loaded. Try PreloadDistance = 15, UnloadExtraDistance = 2, UnloadDelay = 0, or limit them with MaxFarAreas.
Compatibility
- Path of Valheiman: supported, including its Inscription Gate and Beast Portal. Mods can use the
RealPortal.Apiclass (force a mechanic,CanPlayerCross,PlayerCrossed). - OttoBifrost: its preview is turned off on real portals.
- Other mods that change how portals teleport may conflict.
Known limitations
- A portal standing right against a wall cannot be entered: your body hits the wall before you reach the opening.
- While you stand inside the opening, the half of your body still on the entry side is not drawn.
- Depth of field (if you turned it on) blurs the window by the portal's depth, not by what is behind it.
- Over a network the far side arrives more slowly than in single player: the place around the far portal in seconds, the whole area (thousands of objects) in tens of seconds.
Credits
Parts of the approach to reaching through portals and to multiplayer were inspired by Ravengates. No code was taken from it.
CHANGELOG
Changelog
1.0.6
- Real Portal Engine 0.1.2 no longer changes how the game saves: the background world and character autosave is gone, saving is the game's own again. It does not belong in a portal mod.
1.0.5
- Faster windows. Each window's far side costs less to draw: its static objects (trees, rocks, buildings drawn from the game's own meshes) are now sorted out on several threads at once, and as compiled Burst code with the library that comes with the mod, about a third of the time they took per window. The picture is the same; if the library cannot load, the same work runs as plain code.
- Real Portal Engine 0.1.1 (in the package; this version needs it).
1.0.4
- Windows look exactly like the game. Every window is refreshed every frame, and what it shows matches the place itself: creatures are present and moving in every window, far fires, smoke and Mistlands mist run at the game's own rate, far weather and wind (also from under a roof), grass from the first frame, lights and their shadows per place, reflections, shield domes and sun shafts in the far side's light. A far side you have not looked at for a while is woken up before you look again, so nothing is frozen or missing.
- Fixed: shimmer in windows with antialiasing (TAA) while the camera turns: the window's shadow map now has the game's own size, TAA and motion blur read what lies behind the opening, and small windows are no longer drawn from an older frame.
- The far side is lighter. Its static objects (trees, rocks, buildings) beyond the place round the far portal are drawn from the game's own meshes and materials instead of being loaded as game objects: the same picture, about a third fewer objects while a portal is open. Round the far portal everything is real and alive.
- Smoother opening. A portal no longer drops the frame rate while it opens (new setting Distance/ActivationBudgetMs, 3), and its window opens only once the side it shows is all there, instead of things popping in.
- New light defaults (new installs): a portal opens when you come up to it and closes as you walk off (Distance/PreloadDistance 5, UnloadExtraDistance 1, UnloadDelay 0), one at a time (MaxFarAreas 1). Existing settings are kept; see the README to switch.
- Distant windows show the far side instead of a blue disc; a portal seen inside a window shows its own far side when it is loaded; where no window is drawn the portal looks as in vanilla.
- The window closes as soon as its far end is unloaded (it used to stay open while the far end emptied).
- Keys of older versions (the
[Render]section) are removed from the config file by itself: they were not read any more, and editing them did nothing. - The package now includes Real Portal Engine (a helper plugin), its Burst library and a preloader patcher (
BepInEx/patchers). - New setting Window/PortalEffects:
Window(default, as before) shows the swirl, sparks and light inside the frame only while the portal does not let someone through, so the view stays clear;Vanillashows them as the game does, whenever a player who may pass stands close.
1.0.3
- PreloadDistance can now go down to 5 m (was at least 70).
- New settings: Distance/UnloadExtraDistance (how much farther than PreloadDistance a far end stays loaded, 30 m), Distance/UnloadDelay (seconds it stays loaded after you leave, 5) and Distance/MaxFarAreas (at most this many far ends at once, the nearest portals; 0 = no limit). For portal rooms.
- Sound from the other side now comes from the portal it goes through, as loud as the whole way through it is long, so you can tell which portal it is (up close, looking through, it still comes from where it shows in the window).
1.0.2
- Fixed (1.0.1): two portals of the same kind had their view scaled slightly, so your own body seen through the window while walking through looked doubled.
- Fixed: walking up to a larger portal paired with a smaller one, your body seen through the window was the wrong size.
1.0.1
- Fixed: grass on the far side vanished from a window once you stood more than a few metres from the portal (windows refreshed every other frame lost their grass).
- Fixed: portals of different sizes (the stone portal paired with a wooden one) showed the far side around the smaller frame and under the ground. Pairs now meet at the floor you walk on; looking through a larger opening onto a smaller portal, the view is scaled so the whole opening shows what lies inside the smaller one (back to 1:1 as you come up to it and walk through), and the part of the larger opening the smaller one has no room for is a wall.
- Fixed: the exit portal's own frame no longer shows inside the window.
1.0.0
- First release: live windows, walking through, every portal, items/projectiles/creatures, vanilla rules as walls, reach through, sound, multiplayer.