Navigation Menu

Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/valheimPlus/ValheimPlus
Browse files Browse the repository at this point in the history
 into development
  • Loading branch information
nxPublic committed Nov 22, 2021
2 parents 742541f + 2522bb2 commit d9edb3b
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 19 deletions.
44 changes: 31 additions & 13 deletions README.md
Expand Up @@ -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)

Expand All @@ -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.**
Expand Down
4 changes: 3 additions & 1 deletion ValheimPlus/GameClasses/Fireplace.cs
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion ValheimPlus/GameClasses/Inventory.cs
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions ValheimPlus/GameClasses/SE_Rested.cs
Expand Up @@ -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));

/// <summary>
Expand Down Expand Up @@ -54,7 +54,7 @@ public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstructio
public static List<Piece> GetNearbyPieces(Vector3 point)
{
List<Piece> pieces = new List<Piece>();
Piece.GetAllPiecesInRadius(point, Configuration.Current.Building.pieceComfortRadius, pieces);
Piece.GetAllComfortPiecesInRadius(point, Configuration.Current.Building.pieceComfortRadius, pieces);
return pieces;
}
}
Expand Down
9 changes: 8 additions & 1 deletion ValheimPlus/GameClasses/WearNTear.cs
Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion ValheimPlus/UI/HotkeyBar.cs
Expand Up @@ -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;
}
}
}
Expand Down
Binary file added resources/images/nav_steam_launch_options.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/images/nav_steam_local_files.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d9edb3b

Please sign in to comment.