Valheim
0 of 0

File information

Last updated

Original upload

Created by

Flatscreen to VR Modders

Uploaded by

manicmoose99

Virus scan

Safe to use

Tags for this mod

About this mod

This mod adds VR support to Valheim using OpenVR and SteamVR Unity integration.

Requirements
Permissions and credits
Changelogs
VHVR - Valheim VR
This is an experimental mod for the PC game Valheim that adds in native VR support using Unity and SteamVR with OpenVR. If you experience seizures from flashing lights, use extra caution as there may be some additional flashing during loading screens or gameplay. Use caution when playing, the developers of the mod assume no liability for damages resulting from the use of this mod. Play at your own risk :) 

Have questions or just want to chat? Join the Flatscreen To VR Modding Discord! You can learn about and get support for other flatscreen-to-VR mods and speak directly to several of the modders!

Developers:
moose
Maddy25
artum
Aceship
phjong
Helpful step-by-step guide for installation - please follow closely!

Want to support the modders?
Donate to our patreon

Latest Updates
  • BHaptics vest now works with VHVR! Thanks to @Astienth for the work in enabling this feature. You must run version 0.9.1 once to generate the new config option, then edit the config file at steamapps\common\Valheim\BepInEx\config\org.bepinex.plugins.valheimvrmod.cfg and change bhapticsEnabled to true
  • Fixes problems with Ice Caves update
  • Adds "Reset" buttons for VR Hud Positions/Rotations
  • UnlockDesktopCursor now defaulted to true
  • Improved Fist Colliders
  • Improved bow options and mechanics
  • Fixed Iron Shield Buckler hitbox
  • Fixed ship icon rotation on VR HUD map
  • Fixed various crashes related to player death
  • Lock the Menu UI's real world position instead of in-game position
  • Add proper SteamVR manifest creation
  • Improved Two-handled wielding mechanics (instructions soon)

Huge thanks to Maddy25, artum, and Aceship, and phjong for all the work making this release possible!

IMPORTANT
If you have trouble loading the mod, it would be very helpful if you can add a post here with what mods/plugins you have installed as well as any logs from the game!
Thanks!

Requirements
This mod requires BepInExPack Valheim. BepInEx is a mod framework for Unity games that allows modders to inject their code into the game's runtime. It also includes Harmony, which is a tools used to patch existing methods in C# libraries.

Additionally, you need an HMD that supports OpenVR/SteamVR. I've only tested it using a Valve Index, but it should theoretically work on anything that meets those requirements. Please feel free to create issues if you find incompatibilities and I'll work on any problems related to specific headsets if possible.

Installation
Note: This mod doesn't yet support any mod manager installation. I am looking at what is involved in supporting Vortex. I'm hitting some issues figuring this out because this mod has some files that need to go under valheim_Data, but Vortex wants to copy everything into BepInEx - looking for a workaround.

Note About Multiplayer: If you are using VR controls, many of the game's systems have been re-worked. If you play on a multiplayer server with non-VR players, they will see weird things like your character will have no upper-body animation and they'll see damage appearing in front of you when you do things like attack. If the other players on the server have the mod installed and running, they'll see your upper-body and hand animations synced. Non-VR Players can also install the mod and use the "nonVRPlayer" config option, which will cause the game to run in flatscreen mode, but still allow them to sync the VR animations for the VR playing friends.

Helpful step-by-step guide!

Unzip the contents of the mod file directly into your game's installation folder. It contains a BepInEx plugin file as well as numerous assets/DLL files.

Running:
  • Make sure SteamVR is running BEFORE starting the game
  • Game resolution should be set to 1080p in the game settings (restart after updating resolution). I'm working on a fix, but if you set the resolution too low, it will crop part of the UI and make the Craft button disappear. If it is too high, the UI scale will be more difficult to read.
  • Having trouble keeping the game window in focus? In SteamVR settings, change "SteamVR Always on Top" to Off
  • To properly center the camera on the player model, I recommend sitting upright and still, facing the direction you wish to be "center" and reset tracking with the Home key or position the VR controllers in front of the HMD for approximately 3 seconds if using VR controls.
  • I recommend turning off Motion Blur for VR. Also, SSAO looks great, but is very demanding on performance. I've included a third party post processing effect called "Amplify Occlusion" that can be used in place of it (See configuration section). I strongly recommend using amplify and disabling SSAO. Other settings you can configure to your liking/adjust for performance needs (turning down shadows to the lowest level actually doesn't change the graphics that much but is way better performance-wise, so I recommend doing that - but just experiment and see what works for you).
  • Due to what I needed to do to get the mouse cursor to work in game, the "real" cursor is locked to center of the screen. You need to make sure the game window is focused for the in game mouse cursor to work - you might need to alt-tab into the window if it doesn't load on top.
  • Disable "Use Desktop Game Theatre while SteamVR is active" under Valheim properties in Steam.
  • Some users have reported that the game needs to be in full screen to get it running properly - while I haven't experienced this, it is something to try if you have problems.
  • Vulkan is not supported - so make sure you run without Vulkan activated.
  • There have been a lot of reports that certain HOTAS or game controllers plugged into the system are causing conflicts. If you are having issues with the game (UI not showing or controls not working), try unplugging any unnecessary game input devices from your system.
  • Some users have reported fixing slowdown after around 20 minutes of gameplay by turning off Windows Game Mode

Tips
  • You can re-center the HMD tracking using the Home key. Sit upright and face forwards and still and use this to center the tracking. This should put you correctly aligned on the player model in first person. Or if you are using motion controls, hold your controllers in front of your HMD for ~3 seconds.
  • When in placement mode, you control the position of the thing being placed with either the mouse or the right joystick (or motion control laser pointer). You will have a hammer icon floating in the air to indicate where the placement cursor is currently located.
  • Vive users: If you see a nose, set the NearClipPlane value in the mod's config file to 0.057 to make it go away.

VR Controls




Re-center Tracking:
To re-center tracking, position your controllers in front of your headsets (as if you are holding your hands over your eyes) for about 3 seconds.

Equipping and Unequipping Weapons: In addition to opening the inventory and using the laser pointer to select an item, you can use the Quick Switch menu to switch between items on your hotbar. To use the quick bar, press and hold the Quick Item Switch button and use the joystick to select the item you wish to equip, and then release the quick switch icon. Finally, you can holster and unholster the select item by positioning your hand over your shoulder and pressing “Grab”.

Melee Combat: With a melee weapon equipped, swing the weapon with enough speed to trigger the attack. There will be a slight time delay between attacks to limit the attack speed and stamina will be depleted on each attack.

Bow and Arrow: With a bow equipped, grab an arrow using your right hand by reaching over your left shoulder and pressing the grab button. Then position the arrow over the bow string and press and hold grab, pull back the arrow string and arrow, aim and release. You will drain stamina while holding the arrow back.

Building: Place and remove keys are displayed on visual controller diagrams + the button to open the build menu. Aim the hammer where you want to build and press the buttons to place the object. Rotating the pieces using Index controllers is done using the touchpads as a “scroll wheel”. On Touch controllers, hold the “Right Hand Grab” button on the left controller and use the right joystick to rotate the piece. In order to remove objects, hold down the right controller's grip and press the "Jump" button. 

GPowers and Sitting: Press and hold the left controller Quick Select button and use the joystick to select the desired action (either Sitting down or one of your available GPowers) and release the Quick Action button.

Boss Summoning: To summon a boss, use your left hand to hover over the altar and use the QuickSelect menu on the left hand to select the sacrifice.

Sprinting and Sneaking:
The right joystick horizontal axis is used to rotate the player direction. Use “Up” to sprint and use “Down” to crouch/sneak.

Spear Throwing & Fishing: Press and hold “Grab”, thrust or swing, and release when appropriate to either throw the spear or send out the fishing line. Hold grab to bring back the float.

Shield: Hold the shield in the direction of an incoming attack to block it.

Shield Parry: Swing your shield towards the incoming attack to parry it.

Compatibility
  • This mod is almost certainly not compatible with any mods that affect the game camera, as that is central to how it works.
  • The mod is also highly unlikely to be compatible with anything that adds or modifies post processing effects
  • Mods that make changes to the GUI may not work properly, but it depends on the specifics
  • Mods that mess with the controls - probably fine but could be some issues. Feel free to report specific problems. Mods that add custom controls/inputs probably won't be able to be used with VR controllers.
  • Texture mods and other non-post process effect graphical mods should work.
  • Most content mods should work fine
  • Gameplay mods - if you are using m&k controls only, most should work. If you are using VR controllers, then it's a lot less likely as some of the core mechanics have been modified to implement motion-based features. As always it will depend on the specifics.

Known Incompatibilities:

  • Time Mod: https://www.nexusmods.com/valheim/mods/68 - Something about pausing the game while my mod is loaded causes things to lock up permanently. There was a similar issue regarding the SteamVR dashboard pausing the game. If I figure out the root cause I might be able to fix it, but for now this mod is incompatible.

More About the Mod
The mod will let you play using native Open VR support in full stereoscopic 3D. Motion controls are supported for Oculus Touch and Valve Index - Vive bindings are also included, but may need some work. Please provide any feedback you have.

If not using VR controls, there are some animations that cause the character model to lunge forward sometimes, such as chopping wood. This results in seeing a headless character model lunge out in front of you. I initially had the camera tied directly to the head location, so the camera was dragged along with these animations. While more realistic in a sense, it was quite uncomfortable to be moved around in this way, not to mention other slight movements like head bobbing while walking etc. Therefore I disconnected the camera position from the head and just place it at a fixed height above the player model - this results in smooth walking and no more uncomfortable motions - with the tradeoff being that you see some goofy animations sometimes - but the tradeoff for VR comfort is definitely the right tradeoff.

This is an experimental mod and almost certainly will contain a bunch of bugs and glitches. Additionally, Valheim is currently an early access game, so there is a high probability that patches will be released for the game that break this mod. Please be patient as fixes are worked on and feel free to report any issues you find :)

As Valheim was not made for VR, this implementation isn't going to be as comfortable as a built-for-VR game. If VR tends to make you feel queasy, then this mod probably isn't for you.

Source Code:
https://github.com/brandonmousseau/vhvr-mod