diff --git a/README.md b/README.md index 157839eb..8757f34d 100644 --- a/README.md +++ b/README.md @@ -304,20 +304,9 @@ This guide does not cover how to create a dedicated server. These are the steps **Please read the section about Server Config & Version Control (About Version Enforcement) below.** -## **Linux** -[Easy to set up and ready to use ValheimPlus servers can be rented here at ZAP-Hosting.com !](https://zap-hosting.com/valheimplus) - -### **Game[Unix]** - -1. Download the [latest package called UnixServer.zip over this link](https://github.com/valheimPlus/ValheimPlus/releases/latest/). *(Scroll down and click "assets")* -2. Locate your game folder manually or start Steam client and right-click the Valheim game in your Steam library and select Manage -> browse local files for Steam to open your game folder. -3. Extract the contents of the archive into the game folder. -4. Make sure to run 'chmod u+x start_game_bepinex.sh' to make the start script executable. -5. Right-click the Valheim game in your Steam library. -6. Go to "Properties..." -> "Launch options" and input "./start_game_bepinex.sh %command%" or "bash ./start_game_bepinex.sh %command%" if the first command does not work. +## **Linux/Unix** - -### **Server[Unix]** +### **Server[Linux/Unix]** [Easy to set up and ready to use ValheimPlus servers can be rented here at ZAP-Hosting.com !](https://zap-hosting.com/valheimplus) @@ -333,6 +322,35 @@ This guide does not cover how to create a dedicated server. These are the steps * If you are using [LGSM](https://linuxgsm.com), go inside your instance config file and change executable to "./start_server_bepinex.sh" to load the mod and your server arguments. More on LGSM config files can be found on [their homepage](https://docs.linuxgsm.com/configuration/linuxgsm-config). 6. Make sure to start the server via start_server_bepinex.sh, else the mod will not be loaded. +### **Game[Linux/Unix]** + +1. **NOTE:** It is recommended to install ValheimPlus before installing other mods, especially those which also use BepInEx. +2. Download the [latest package called UnixServer.zip over this link](https://github.com/valheimPlus/ValheimPlus/releases/latest/). *(Scroll down and click "assets")*. +3. Locate your `Valheim/` game folder. + Open your Steam client. In your *"Library"* tab, right-click on Valheim. + Select *"Manage 🡺 Browse local files"*, and make note of the location. + ![image](./resources/images/nav_steam_local_files.png) +4. Ensure that you have the correct path to your game folder location: + ``` + my_path=/replace/with/your/path/to/common/Valheim/ + test -e $my_path/valheim_Data && echo "$my_path is valid!" || echo "$my_path is invalid :(" + ``` +5. Complete the installation by backing up your game folder, extracting the package, and adding the necessary permissions: + + ``` + mkdir $my_path/../Valheim.`date +%Y-%m-%d` && cp -br $my_path/* $_ && echo "backup created" + unzip -o ~/Downloads/UnixServer.zip -d $my_path + chmod u+x $my_path/start_game_bepinex.sh + ``` + +10. Return to your Steam client. In your *"Library"* tab, right-click on Valheim. + Select *"Properties...."* + In the pop-up, add the following to the *"Launch Options"* `./start_game_bepinex.sh %command%` + (in rare cases that this command does not work, use `bash /start_game_bepinex.sh %command%` instead) + ![image](./resources/images/nav_steam_launch_options.png) + + + **Uses libc6-dev** **Most server hosters do not allow you to upload script files or make your own scripts executable (for very good reasons). You will have to wait until your hoster adapts V+ for his servers.** diff --git a/ValheimPlus/GameClasses/Fireplace.cs b/ValheimPlus/GameClasses/Fireplace.cs index 655aed8c..63d6fdf7 100644 --- a/ValheimPlus/GameClasses/Fireplace.cs +++ b/ValheimPlus/GameClasses/Fireplace.cs @@ -186,8 +186,10 @@ public static class FireplaceExtensions "piece_groundtorch_wood", // standing wood torch "piece_groundtorch", // standing iron torch "piece_groundtorch_green", // standing green torch + "piece_groundtorch_blue", // standing blue torch "piece_walltorch", // sconce torch - "piece_brazierceiling01" // brazier + "piece_brazierceiling01", // brazier + "piece_jackoturnip" // Jack-o-turnip }; internal static bool IsTorch(string itemName) diff --git a/ValheimPlus/GameClasses/Inventory.cs b/ValheimPlus/GameClasses/Inventory.cs index 51a82175..fa5869eb 100644 --- a/ValheimPlus/GameClasses/Inventory.cs +++ b/ValheimPlus/GameClasses/Inventory.cs @@ -55,7 +55,7 @@ public static void Prefix(string name, ref int w, ref int h) if (Configuration.Current.Inventory.IsEnabled) { // Player inventory - if (h == 4 && w == 8 || name == "Inventory") + if (name == "Grave" || name == "Inventory") { h = Helper.Clamp(Configuration.Current.Inventory.playerInventoryRows, playerInventoryMinRows, playerInventoryMaxRows); } diff --git a/ValheimPlus/GameClasses/SE_Rested.cs b/ValheimPlus/GameClasses/SE_Rested.cs index 7f4a0df6..67d9f37e 100644 --- a/ValheimPlus/GameClasses/SE_Rested.cs +++ b/ValheimPlus/GameClasses/SE_Rested.cs @@ -26,7 +26,7 @@ public static void Prefix(ref float ___m_TTLPerComfortLevel) [HarmonyPatch(typeof(SE_Rested), nameof(SE_Rested.CalculateComfortLevel))] public static class SE_Rested_CalculateComfortLevel_Transpiler { - private static MethodInfo method_SE_Rested_GetNearbyPieces = AccessTools.Method(typeof(SE_Rested), nameof(SE_Rested.GetNearbyPieces)); + private static MethodInfo method_SE_Rested_GetNearbyPieces = AccessTools.Method(typeof(SE_Rested), nameof(SE_Rested.GetNearbyComfortPieces)); private static MethodInfo method_GetNearbyPieces = AccessTools.Method(typeof(SE_Rested_CalculateComfortLevel_Transpiler), nameof(SE_Rested_CalculateComfortLevel_Transpiler.GetNearbyPieces)); /// @@ -54,7 +54,7 @@ public static IEnumerable Transpiler(IEnumerable GetNearbyPieces(Vector3 point) { List pieces = new List(); - Piece.GetAllPiecesInRadius(point, Configuration.Current.Building.pieceComfortRadius, pieces); + Piece.GetAllComfortPiecesInRadius(point, Configuration.Current.Building.pieceComfortRadius, pieces); return pieces; } } diff --git a/ValheimPlus/GameClasses/WearNTear.cs b/ValheimPlus/GameClasses/WearNTear.cs index 3db0da60..b5878c06 100644 --- a/ValheimPlus/GameClasses/WearNTear.cs +++ b/ValheimPlus/GameClasses/WearNTear.cs @@ -72,7 +72,14 @@ private static bool Prefix(ref WearNTear __instance, ref float damage) return true; } - + if (__instance.m_piece.m_name.StartsWith("$cart")) + { + if (Configuration.Current.StructuralIntegrity.disableDamageToPlayerStructures || + (Configuration.Current.StructuralIntegrity.disableDamageToPlayerStructures && + stackTrace.GetFrame(15).GetMethod().Name == "UpdateWaterForce")) return false; + + return true; + } return !Configuration.Current.StructuralIntegrity.disableDamageToPlayerStructures; } } diff --git a/ValheimPlus/UI/HotkeyBar.cs b/ValheimPlus/UI/HotkeyBar.cs index ba71ad05..9a8c3de0 100644 --- a/ValheimPlus/UI/HotkeyBar.cs +++ b/ValheimPlus/UI/HotkeyBar.cs @@ -93,7 +93,7 @@ private static void DisplayAmmoCountsUnderBowHotbarIcon(HotkeyBar __instance, Pl if (totalAmmo == 0) ammoCounterText.text = noAmmoDisplay; else - ammoCounterText.text = ammoItem.m_shared.m_name.Split('_').Last() + " " + currentAmmo + "/" + totalAmmo; + ammoCounterText.text = ammoItem.m_shared.m_name.Split('_').Last() + "\n" + currentAmmo + "/" + totalAmmo; } } } diff --git a/resources/images/nav_steam_launch_options.png b/resources/images/nav_steam_launch_options.png new file mode 100644 index 00000000..6c30f19a Binary files /dev/null and b/resources/images/nav_steam_launch_options.png differ diff --git a/resources/images/nav_steam_local_files.png b/resources/images/nav_steam_local_files.png new file mode 100644 index 00000000..54ee85c2 Binary files /dev/null and b/resources/images/nav_steam_local_files.png differ