Giter Club home page Giter Club logo

valheim-better-portal's Introduction

Better Portal - Valheim Mod

Better Portal is a mod that allows you to change the destination of portals to any tag. I know that there are already mods with the same functionality, but I created this mod because I did not want to install Jotunn. If you already have Jotunn installed, there is no advantage to using this mod. This mod has only minimal functionality.

Important
This mod has been developed by an individual and is not associated with the game’s developer in any way. Please refrain from asking the developer any questions regarding this mod.

Features

When interacting with the portal, you can set the destination tag by pressing the Shift key at the same time. Portals do not have to be connected to each other and can teleport one way.

Tip
Pressing the Insert Key while entering the destination tag will execute autocomplete. Also, pressing the up or down arrow key will rotate existing tags.
Note
If multiple portals with the specified destination tag exist, they will be randomly connected.
Features - Image

Languages

Language Translators Status

English

Translation Tools

100%

German

FreeFun

100%

Japanese

EideeHi

100%

Contacts

Bug report on Issues

Only bug reports are accepted under Issues.

eidee.net - Discord Server

Questions, suggestions and comments are welcome on the Discord Server.

Credits

License

Better Portal is developed and released under the MIT license. For the full text of the license, please see the LICENSE file.

valheim-better-portal's People

Contributors

eideehi avatar xxfreefunxx avatar fusionette avatar

Stargazers

 avatar

Watchers

 avatar

valheim-better-portal's Issues

Not Working after 0.216.9 Patch

Is there an existing issue for this?

  • I have searched the existing issues

Mod version

1.0.3

Is this a bug caused by this mod alone?

The bug was reproduced with this mod alone

List of mods to reproduce bug

Better portal 1.0.3

What happened?

Errors in bepinex log and functionality gone. Option for destination portal is gone. Portal options reverted to vanilla valheim.

Steps to reproduce the bug

Load better portal mod

Logs and screenshots

[Info : BepInEx] Loading [Better Portal 1.0.3]
[Info : Unity Log] 06/19/2023 15:13:13: Loaded localization file #0 - 'localization' language: 'English'

[Info : Unity Log] 06/19/2023 15:13:13: Loaded localization file #1 - 'localization_extra' language: 'English'

[Info : Unity Log] 06/19/2023 15:13:13: Loaded localization file #0 - 'localization' language: 'English'

[Info : Unity Log] 06/19/2023 15:13:13: Loaded localization file #1 - 'localization_extra' language: 'English'

[Error : HarmonyX] Failed to patch virtual bool Game+d__33::MoveNext(): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Collections.Generic.List1[T].RemoveRange (System.Int32 index, System.Int32 count) [0x00004] in <695d1cc93cca45069c528c15c9fdd749>:0 at HarmonyLib.CodeMatcher.RemoveInstructions (System.Int32 count) [0x0000c] in <474744d65d8e460fa08cd5fd82b5d65f>:0 at BetterPortal.GameCoroutinePatch.MoveNext_Transpiler (System.Collections.Generic.IEnumerable1[T] instructions) [0x00182] in :0
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke(System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <695d1cc93cca45069c528c15c9fdd749>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <695d1cc93cca45069c528c15c9fdd749>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <695d1cc93cca45069c528c15c9fdd749>:0
at HarmonyLib.Internal.Patching.ILManipulator.ApplyTranspilers (System.Reflection.Emit.ILGenerator il, System.Reflection.MethodBase original, System.Func2[T,TResult] getLocal, System.Func1[TResult] defineLabel) [0x00093] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Internal.Patching.ILManipulator.WriteTo (Mono.Cecil.Cil.MethodBody body, System.Reflection.MethodBase original) [0x00066] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WriteTranspilers () [0x00084] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () [0x0002b] in <474744d65d8e460fa08cd5fd82b5d65f>:0
[Error : Unity Log] ArgumentOutOfRangeException: Non-negative number required.
Parameter name: index
Stack trace:
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Collections.Generic.List1[T].RemoveRange (System.Int32 index, System.Int32 count) (at <695d1cc93cca45069c528c15c9fdd749>:0) HarmonyLib.CodeMatcher.RemoveInstructions (System.Int32 count) (at <474744d65d8e460fa08cd5fd82b5d65f>:0) BetterPortal.GameCoroutinePatch.MoveNext_Transpiler (System.Collections.Generic.IEnumerable1[T] instructions) (at :0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <695d1cc93cca45069c528c15c9fdd749>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <695d1cc93cca45069c528c15c9fdd749>:0)
HarmonyLib.Internal.Patching.ILManipulator.ApplyTranspilers (System.Reflection.Emit.ILGenerator il, System.Reflection.MethodBase original, System.Func2[T,TResult] getLocal, System.Func1[TResult] defineLabel) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Internal.Patching.ILManipulator.WriteTo (Mono.Cecil.Cil.MethodBody body, System.Reflection.MethodBase original) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.WriteTranspilers () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.Process (MonoMod.Cil.ILContext ilContext, System.Reflection.MethodBase originalMethod) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.Manipulate (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo, MonoMod.Cil.ILContext ctx) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.Manipulate (System.Reflection.MethodBase original, MonoMod.Cil.ILContext ctx) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.ManagedMethodPatcher.Manipulator (MonoMod.Cil.ILContext ctx) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
MonoMod.Cil.ILContext.Invoke (MonoMod.Cil.ILContext+Manipulator manip) (at <6733e342b5b549bba815373898724469>:0)
MonoMod.RuntimeDetour.ILHook+Context.InvokeManipulator (Mono.Cecil.MethodDefinition def, MonoMod.Cil.ILContext+Manipulator cb) (at <4e2760c7517c4ea79c633d67e84b319f>:0)
(wrapper dynamic-method) MonoMod.RuntimeDetour.ILHook+Context.DMD<MonoMod.RuntimeDetour.ILHook+Context::Refresh>(MonoMod.RuntimeDetour.ILHook/Context)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<MonoMod.RuntimeDetour.ILHook+Context::Refresh>?-604354560(object)
HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.OnILChainRefresh (System.Object self) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
MonoMod.RuntimeDetour.ILHook.Apply () (at <4e2760c7517c4ea79c633d67e84b319f>:0)
HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.PatchClassProcessor.Patch () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.b__11_0 (System.Type type) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable1[T] sequence, System.Action1[T] action) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.CreateAndPatchAll (System.Reflection.Assembly assembly, System.String harmonyInstanceId) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
BetterPortal.BetterPortal.Initialize (BepInEx.PluginInfo info, BepInEx.Logging.ManualLogSource logger, BepInEx.Configuration.ConfigFile config) (at :0)
BetterPortal.UnityPlugin.Awake () (at :0)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.UI.Image:OnCanvasHierarchyChanged()

[Info : BepInEx] Loading [Display BepInEx Info In-Game 2.0.1]

BetterPortal don't run with 0.218.15

Is there an existing issue for this?

  • I have searched the existing issues

Mod version

1.0.6

Is this a bug caused by this mod alone?

The bug was reproduced with this mod alone

List of mods to reproduce bug

No response

What happened?

Portals stay vanillia

Steps to reproduce the bug

1 Intall Better Portal 1.0.6
2 Launch valheim 0.218.15

Logs and screenshots

[Error : HarmonyX] Failed to patch void Game::ConnectPortals(): System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentOutOfRangeException: Non-negative number required.
Parameter name: index
at System.Collections.Generic.List1[T].RemoveRange (System.Int32 index, System.Int32 count) [0x00004] in <17d9ce77f27a4bd2afb5ba32c9bea976>:0 at HarmonyLib.CodeMatcher.RemoveInstructions (System.Int32 count) [0x0000c] in <474744d65d8e460fa08cd5fd82b5d65f>:0 at BetterPortal.Patches.Game_ConnectPortals_Transpiler (System.Collections.Generic.IEnumerable1[T] instructions) [0x001ab] in <438414f91f894b0385977504b42d1d3d>:0
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in <17d9ce77f27a4bd2afb5ba32c9bea976>:0
--- End of inner exception stack trace ---
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00083] in <17d9ce77f27a4bd2afb5ba32c9bea976>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <17d9ce77f27a4bd2afb5ba32c9bea976>:0
at HarmonyLib.Internal.Patching.ILManipulator.ApplyTranspilers (System.Reflection.Emit.ILGenerator il, System.Reflection.MethodBase original, System.Func2[T,TResult] getLocal, System.Func1[TResult] defineLabel) [0x00093] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Internal.Patching.ILManipulator.WriteTo (Mono.Cecil.Cil.MethodBody body, System.Reflection.MethodBase original) [0x00066] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WriteTranspilers () [0x00084] in <474744d65d8e460fa08cd5fd82b5d65f>:0
at HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () [0x0002b] in <474744d65d8e460fa08cd5fd82b5d65f>:0
[Error : Unity Log] ArgumentOutOfRangeException: Non-negative number required.
Parameter name: index
Stack trace:
System.Collections.Generic.List1[T].RemoveRange (System.Int32 index, System.Int32 count) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0) HarmonyLib.CodeMatcher.RemoveInstructions (System.Int32 count) (at <474744d65d8e460fa08cd5fd82b5d65f>:0) BetterPortal.Patches.Game_ConnectPortals_Transpiler (System.Collections.Generic.IEnumerable1[T] instructions) (at <438414f91f894b0385977504b42d1d3d>:0)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <17d9ce77f27a4bd2afb5ba32c9bea976>:0)
HarmonyLib.Internal.Patching.ILManipulator.ApplyTranspilers (System.Reflection.Emit.ILGenerator il, System.Reflection.MethodBase original, System.Func2[T,TResult] getLocal, System.Func1[TResult] defineLabel) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Internal.Patching.ILManipulator.WriteTo (Mono.Cecil.Cil.MethodBody body, System.Reflection.MethodBase original) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.WriteTranspilers () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.Public.Patching.HarmonyManipulator.WriteImpl () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.Process (MonoMod.Cil.ILContext ilContext, System.Reflection.MethodBase originalMethod) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.Manipulate (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo, MonoMod.Cil.ILContext ctx) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.HarmonyManipulator.Manipulate (System.Reflection.MethodBase original, MonoMod.Cil.ILContext ctx) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Public.Patching.ManagedMethodPatcher.Manipulator (MonoMod.Cil.ILContext ctx) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
MonoMod.Cil.ILContext.Invoke (MonoMod.Cil.ILContext+Manipulator manip) (at <6733e342b5b549bba815373898724469>:0)
MonoMod.RuntimeDetour.ILHook+Context.InvokeManipulator (Mono.Cecil.MethodDefinition def, MonoMod.Cil.ILContext+Manipulator cb) (at <4e2760c7517c4ea79c633d67e84b319f>:0)
(wrapper dynamic-method) MonoMod.RuntimeDetour.ILHook+Context.DMD<MonoMod.RuntimeDetour.ILHook+Context::Refresh>(MonoMod.RuntimeDetour.ILHook/Context)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition.Trampoline<MonoMod.RuntimeDetour.ILHook+Context::Refresh>?1793788618(object)
HarmonyLib.Internal.RuntimeFixes.StackTraceFixes.OnILChainRefresh (System.Object self) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
MonoMod.RuntimeDetour.ILHook.Apply () (at <4e2760c7517c4ea79c633d67e84b319f>:0)
HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.Public.Patching.ManagedMethodPatcher.DetourTo (System.Reflection.MethodBase replacement) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, HarmonyLib.PatchInfo patchInfo) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Rethrow as HarmonyException: IL Compile Error (unknown location)
HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.PatchClassProcessor.Patch () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.b__11_0 (System.Type type) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable1[T] sequence, System.Action1[T] action) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.PatchAll (System.Reflection.Assembly assembly) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.CreateAndPatchAll (System.Reflection.Assembly assembly, System.String harmonyInstanceId) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
BetterPortal.BetterPortal.Initialize (BepInEx.PluginInfo info, BepInEx.Logging.ManualLogSource logger, BepInEx.Configuration.ConfigFile config) (at <438414f91f894b0385977504b42d1d3d>:0)
BetterPortal.UnityPlugin.Awake () (at <438414f91f894b0385977504b42d1d3d>:0)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.GameObject:.cctor()
PlatformTools.Common.SingletonMonoBehaviour`1:get_Instance()
PlatformTools.PlatformManagerInitializer:OnRuntimeMethodLoad()

Portals don't stay connected

Is there an existing issue for this?

  • I have searched the existing issues

Mod version

1.0.4

Is this a bug caused by this mod alone?

The bug was reproduced with this mod alone

List of mods to reproduce bug

AutoFollowPath - 1.1.0
Veinmine 1.2.8
Show Container Contents - 0.4.0
Valheim Build Camera - 1.6.1
Compass - 1.3.0
Simple Sort - 0.8.0
Configurable Fire - 0.1.4
Enhanced BepInEx Config Manager - 0.1.1
Plant Everything - 1.13.7
Fast Teleport - 1.1.0
Project Auga - 1.2.15
Hoe Radius - 0.2.1
Auto Map Pins - 1.3.0.0
Improved Build Hud - 1.0.5

What happened?

If I have 3 portals. A, B, & C.
Portal A - Tag: "A", Destination: "B" or "C"
Portal B - Tag: "B", Destination: "A"
Portal C - Tag: "C", Destination: "A"

All three portals will stay connected for a few seconds and then unconnect.

They were tested on a vanilla (no mods added) dedicated server.

Steps to reproduce the bug

  1. Create 3 portals
  2. 1st portal, Tag: "A", Destination Tag: "B" or "C"
  3. 2nd portal, Tag: "B", Destination Tag: "A"
  4. 3rd portal, Tag: "C", Destination Tag: "A"

Logs and screenshots

No logs from BepInEx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.