valheimPlus / ValheimPlus

A HarmonyX Mod aimed at improving the gameplay and quality of life of the game Valheim.
http://valheim.plus
GNU Affero General Public License v3.0
967 stars 237 forks source link

Fixing compile and patch errors introduced via v0.214.2 #793

Closed Grantapher closed 4 months ago

Grantapher commented 1 year ago

Possibly fixes #789, #790, #791, #792. Unclear if there are any incompatibilities in Valheim v0.214.2 that didn't cause obvious errors.

Upgrading BepInExPack_Valheim to 5.4.2100 was required. Without it, there were additional errors when using the console or chat, seemingly because of missing unstripped_corlib dependencies that were added in the new Valheim version.

I tested the use cases mentioned not working in the linked issues with some exceptions:

Given that most of the problems were fixed from changes in mostly unrelated code, I think it is not terribly risky to say it was the root cause.


Edit: Since this seems like it may be sitting a while, I uploaded this change to thunderstore for folks who install from there and added a release on my fork for folks who install manually. The regular installation instructions will apply to that release.

They both contain one additional change that bumps up the version number, points some version/config checks to my fork, and adds the fact that it is not the main mod to the title screen text. The branch used is the one attached to that commit: grantapher-development.

nilsroesel commented 1 year ago

Ill do some testing with it

justLou72 commented 1 year ago

I was able to load V+ with the updated DLL files and the V+ screen loaded fine and it all of the config items were activated. No issues as far as I could tell.

Here is the Log: `[Info : BepInEx] Loading [Valheim Plus 0.9.9.11] [Info :Valheim Plus] Trying to load the configuration file [Info : Unity Log] Loading config section AdvancedBuildingMode [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section AdvancedEditingMode [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section Bed [Info : Unity Log] Loading key sleepWithoutSpawn [Info : Unity Log] Loading key unclaimedBedsOnly [Info : Unity Log] Loading config section Beehive [Info : Unity Log] Loading key honeyProductionSpeed [Info : Unity Log] Loading key maximumHoneyPerBeehive [Info : Unity Log] Loading key autoDeposit [Info : Unity Log] Loading key autoDepositRange [Info : Unity Log] Loading key showDuration [Info : Unity Log] Loading config section Building [Info : Unity Log] Loading key noInvalidPlacementRestriction [Info : Unity Log] Loading key noMysticalForcesPreventPlacementRestriction [Info : Unity Log] Loading key noWeatherDamage [Info : Unity Log] Loading key maximumPlacementDistance [Info : Unity Log] Loading key pieceComfortRadius [Info : Unity Log] Loading key alwaysDropResources [Info : Unity Log] Loading key alwaysDropExcludedResources [Info : Unity Log] Loading key enableAreaRepair [Info : Unity Log] Loading key areaRepairRadius [Info : Unity Log] Loading config section Deconstruct [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section Inventory [Info : Unity Log] Loading key inventoryFillTopToBottom [Info : Unity Log] Loading key mergeWithExistingStacks [Info : Unity Log] Loading key playerInventoryRows [Info : Unity Log] Loading key woodChestColumns [Info : Unity Log] Loading key woodChestRows [Info : Unity Log] Loading key personalChestColumns [Info : Unity Log] Loading key personalChestRows [Info : Unity Log] Loading key ironChestColumns [Info : Unity Log] Loading key ironChestRows [Info : Unity Log] Loading key blackmetalChestColumns [Info : Unity Log] Loading key blackmetalChestRows [Info : Unity Log] Loading key cartInventoryColumns [Info : Unity Log] Loading key cartInventoryRows [Info : Unity Log] Loading key karveInventoryColumns [Info : Unity Log] Loading key karveInventoryRows [Info : Unity Log] Loading key longboatInventoryColumns [Info : Unity Log] Loading key longboatInventoryRows [Info : Unity Log] Loading config section Items [Info : Unity Log] Loading key noTeleportPrevention [Info : Unity Log] Loading key baseItemWeightReduction [Info : Unity Log] Loading key itemStackMultiplier [Info : Unity Log] Loading key droppedItemOnGroundDurationInSeconds [Info : Unity Log] Loading key itemsFloatInWater [Info : Unity Log] Loading config section Fermenter [Info : Unity Log] Loading key fermenterDuration [Info : Unity Log] Loading key fermenterItemsProduced [Info : Unity Log] Loading key showDuration [Info : Unity Log] Loading key autoDeposit [Info : Unity Log] Loading key autoFuel [Info : Unity Log] Loading key ignorePrivateAreaCheck [Info : Unity Log] Loading key autoRange [Info : Unity Log] Loading config section FireSource [Info : Unity Log] Loading key torches [Info : Unity Log] Loading key fires [Info : Unity Log] Loading key autoFuel [Info : Unity Log] Loading key ignorePrivateAreaCheck [Info : Unity Log] Loading key autoRange [Info : Unity Log] Loading config section Food [Info : Unity Log] Loading key foodDurationMultiplier [Info : Unity Log] Loading key disableFoodDegradation [Info : Unity Log] Loading config section Smelter [Info : Unity Log] Loading key maximumOre [Info : Unity Log] Loading key maximumCoal [Info : Unity Log] Loading key coalUsedPerProduct [Info : Unity Log] Loading key productionSpeed [Info : Unity Log] Loading key autoDeposit [Info : Unity Log] Loading key autoFuel [Info : Unity Log] Loading key ignorePrivateAreaCheck [Info : Unity Log] Loading key autoRange [Info : Unity Log] Loading config section Furnace [Info : Unity Log] Loading key maximumOre [Info : Unity Log] Loading key maximumCoal [Info : Unity Log] Loading key coalUsedPerProduct [Info : Unity Log] Loading key productionSpeed [Info : Unity Log] Loading key autoDeposit [Info : Unity Log] Loading key autoFuel [Info : Unity Log] Loading key ignorePrivateAreaCheck [Info : Unity Log] Loading key autoRange [Info : Unity Log] Loading key allowAllOres [Info : Unity Log] Loading config section Hotkeys [Info : Unity Log] Loading key rollForwards [Info : Unity Log] Loading key rollBackwards [Info : Unity Log] Loading config section Kiln [Info : Unity Log] Loading key productionSpeed [Info : Unity Log] Loading key maximumWood [Info : Unity Log] Loading key dontProcessFineWood [Info : Unity Log] Loading key dontProcessRoundLog [Info : Unity Log] Loading key autoDeposit [Info : Unity Log] Loading key autoFuel [Info : Unity Log] Loading key stopAutoFuelThreshold [Info : Unity Log] Loading key ignorePrivateAreaCheck [Info : Unity Log] Loading key autoRange [Info : Unity Log] Loading config section Windmill [Info : Unity Log] Loading key maximumBarley [Info : Unity Log] Loading key productionSpeed [Info : Unity Log] Loading key ignoreWindIntensity [Info : Unity Log] Loading key autoDeposit [Info : Unity Log] Loading key autoFuel [Info : Unity Log] Loading key ignorePrivateAreaCheck [Info : Unity Log] Loading key autoRange [Info : Unity Log] Loading config section SpinningWheel [Info : Unity Log] Loading key maximumFlax [Info : Unity Log] Loading key productionSpeed [Info : Unity Log] Loading key autoDeposit [Info : Unity Log] Loading key autoFuel [Info : Unity Log] Loading key ignorePrivateAreaCheck [Info : Unity Log] Loading key autoRange [Info : Unity Log] Loading config section Map [Info : Unity Log] Loading key shareMapProgression [Info : Unity Log] Loading key exploreRadius [Info : Unity Log] Loading key preventPlayerFromTurningOffPublicPosition [Info : Unity Log] Loading key shareAllPins [Info : Unity Log] Loading key displayCartsAndBoats [Info : Unity Log] Loading config section Player [Info : Unity Log] Loading key baseMaximumWeight [Info : Unity Log] Loading key baseMegingjordBuff [Info : Unity Log] Loading key baseAutoPickUpRange [Info : Unity Log] Loading key disableCameraShake [Info : Unity Log] Loading key baseUnarmedDamage [Info : Unity Log] Loading key cropNotifier [Info : Unity Log] Loading key restSecondsPerComfortLevel [Info : Unity Log] Loading key deathPenaltyMultiplier [Info : Unity Log] Loading key autoRepair [Info : Unity Log] Loading key guardianBuffDuration [Info : Unity Log] Loading key guardianBuffCooldown [Info : Unity Log] Loading key disableGuardianBuffAnimation [Info : Unity Log] Loading key autoEquipShield [Info : Unity Log] Loading key autoUnequipShield [Info : Unity Log] Loading key skipIntro [Info : Unity Log] Loading key iHaveArrivedOnSpawn [Info : Unity Log] Loading key queueWeaponChanges [Info : Unity Log] Loading key dontUnequipItemsWhenSwimming [Info : Unity Log] Loading key reequipItemsAfterSwimming [Info : Unity Log] Loading key fallDamageScalePercent [Info : Unity Log] Loading key maxFallDamage [Info : Unity Log] Loading key skipTutorials [Info : Unity Log] Loading key disableEncumbered [Info : Unity Log] Loading key autoPickUpWhenEncumbered [Info : Unity Log] Loading config section Server [Info : Unity Log] Loading key maxPlayers [Info : Unity Log] Loading key disableServerPassword [Info : Unity Log] Loading key enforceMod [Info : Unity Log] Loading key serverSyncsConfig [Info : Unity Log] Loading key serverSyncHotkeys [Info : Unity Log] Loading config section Stamina [Info : Unity Log] Loading key dodgeStaminaUsage [Info : Unity Log] Loading key encumberedStaminaDrain [Info : Unity Log] Loading key jumpStaminaDrain [Info : Unity Log] Loading key runStaminaDrain [Info : Unity Log] Loading key sneakStaminaDrain [Info : Unity Log] Loading key staminaRegen [Info : Unity Log] Loading key staminaRegenDelay [Info : Unity Log] Loading key swimStaminaDrain [Info : Unity Log] Loading config section StaminaUsage [Info : Unity Log] Loading key axes [Info : Unity Log] Loading key bows [Info : Unity Log] Loading key blocking [Info : Unity Log] Loading key clubs [Info : Unity Log] Loading key knives [Info : Unity Log] Loading key pickaxes [Info : Unity Log] Loading key polearms [Info : Unity Log] Loading key spears [Info : Unity Log] Loading key swords [Info : Unity Log] Loading key unarmed [Info : Unity Log] Loading key hammer [Info : Unity Log] Loading key hoe [Info : Unity Log] Loading key cultivator [Info : Unity Log] Loading key fishing [Info : Unity Log] Loading config section Workbench [Info : Unity Log] Loading key workbenchRange [Info : Unity Log] Loading key workbenchEnemySpawnRange [Info : Unity Log] Loading key workbenchAttachmentRange [Info : Unity Log] Loading key disableRoofCheck [Info : Unity Log] Loading config section Time [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section Ward [Info : Unity Log] Loading key wardRange [Info : Unity Log] Loading key wardEnemySpawnRange [Info : Unity Log] Loading config section StructuralIntegrity [Info : Unity Log] Loading key wood [Info : Unity Log] Loading key stone [Info : Unity Log] Loading key iron [Info : Unity Log] Loading key hardWood [Info : Unity Log] Loading key marble [Info : Unity Log] Loading key disableStructuralIntegrity [Info : Unity Log] Loading key disableDamageToPlayerStructures [Info : Unity Log] Loading key disableDamageToPlayerBoats [Info : Unity Log] Loading key disableDamageToPlayerCarts [Info : Unity Log] Loading key disableWaterDamageToPlayerBoats [Info : Unity Log] Loading key disableWaterDamageToPlayerCarts [Info : Unity Log] Loading config section Tameable [Info : Unity Log] Loading key mortality [Info : Unity Log] Loading key ownerDamageOverride [Info : Unity Log] Loading key stunRecoveryTime [Info : Unity Log] Loading key stunInformation [Info : Unity Log] Loading config section Hud [Info : Unity Log] Loading key showRequiredItems [Info : Unity Log] Loading key experienceGainedNotifications [Info : Unity Log] Loading key removeDamageFlash [Info : Unity Log] Loading key displayBowAmmoCounts [Info : Unity Log] Loading config section Experience [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section Camera [Info : Unity Log] Loading key cameraMaximumZoomDistance [Info : Unity Log] Loading key cameraBoatMaximumZoomDistance [Info : Unity Log] Loading key cameraFOV [Info : Unity Log] Loading config section Game [Info : Unity Log] Loading key gameDifficultyDamageScale [Info : Unity Log] Loading key gameDifficultyHealthScale [Info : Unity Log] Loading key extraPlayerCountNearby [Info : Unity Log] Loading key setFixedPlayerCountTo [Info : Unity Log] Loading key difficultyScaleRange [Info : Unity Log] Loading key disablePortals [Info : Unity Log] Loading key disableConsole [Info : Unity Log] Loading key bigPortalNames [Info : Unity Log] Loading key disableFog [Info : Unity Log] Loading config section Wagon [Info : Unity Log] Loading key wagonExtraMassFromItems [Info : Unity Log] Loading key wagonBaseMass [Info : Unity Log] Loading config section Gathering [Info : Unity Log] Loading key wood [Info : Unity Log] Loading key stone [Info : Unity Log] Loading key fineWood [Info : Unity Log] Loading key coreWood [Info : Unity Log] Loading key elderBark [Info : Unity Log] Loading key ironScrap [Info : Unity Log] Loading key tinOre [Info : Unity Log] Loading key copperOre [Info : Unity Log] Loading key silverOre [Info : Unity Log] Loading key chitin [Info : Unity Log] Loading key dropChance [Info : Unity Log] Loading config section Pickable [Info : Unity Log] Loading key edibles [Info : Unity Log] Loading key flowersAndIngredients [Info : Unity Log] Loading key materials [Info : Unity Log] Loading key valuables [Info : Unity Log] Loading key surtlingCores [Info : Unity Log] Loading config section Durability [Info : Unity Log] Loading key axes [Info : Unity Log] Loading key pickaxes [Info : Unity Log] Loading key hammer [Info : Unity Log] Loading key cultivator [Info : Unity Log] Loading key hoe [Info : Unity Log] Loading key weapons [Info : Unity Log] Loading key armor [Info : Unity Log] Loading key bows [Info : Unity Log] Loading key shields [Info : Unity Log] Loading key torch [Info : Unity Log] Loading config section Armor [Info : Unity Log] Loading key helmets [Info : Unity Log] Loading key chests [Info : Unity Log] Loading key legs [Info : Unity Log] Loading key capes [Info : Unity Log] Loading config section FreePlacementRotation [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section Shields [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section FirstPerson [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section GridAlignment [Info : Unity Log] Loading key align [Info : Unity Log] Loading key alignToggle [Info : Unity Log] Loading key changeDefaultAlignment [Info : Unity Log] Loading config section CraftFromChest [Info : Unity Log] Loading key range [Info : Unity Log] Loading key disableCookingStation [Info : Unity Log] Loading key checkFromWorkbench [Info : Unity Log] Loading key ignorePrivateAreaCheck [Info : Unity Log] Loading key lookupInterval [Info : Unity Log] Loading key allowCraftingFromCarts [Info : Unity Log] Loading key allowCraftingFromShips [Info : Unity Log] Loading config section ValheimPlus [Info : Unity Log] Loading key mainMenuLogo [Info : Unity Log] Loading key serverBrowserAdvertisement [Info : Unity Log] Loading config section PlayerProjectile [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section MonsterProjectile [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section GameClock [Info : Unity Log] Loading key useAMPM [Info : Unity Log] Loading key textFontSize [Info : Unity Log] Loading key textRedChannel [Info : Unity Log] Loading key textGreenChannel [Info : Unity Log] Loading key textBlueChannel [Info : Unity Log] Loading key textTransparencyChannel [Info : Unity Log] Loading config section Brightness [Info : Unity Log] Section not enabled [Info : Unity Log] Loading config section Chat [Info : Unity Log] Section not enabled [Info :Valheim Plus] Configuration file loaded succesfully. [Info : Unity Log] 03/16/2023 09:58:36: Successfully transpiled Pickable.RPC_Pick to patch item yields

[Info :Valheim Plus] ValheimPlus [0.9.9.11] is up to date. `

Grantapher commented 1 year ago

denikson-BepInExPack_Valheim-5.4.2100_ValheimPlusFix.zip

@JF10R Thanks for adding this, I was going to basically write the same instructions this morning as well so that non-devs could verify and fix their servers as well.

mgan59 commented 1 year ago

Thanks for posting instructions, I can give them a try as well. I run my server on gportal with the vplus mod enabled -- assuming I need to push these files up to it via ftp as well?

Grantapher commented 1 year ago

@mgan59 yes, but I'm not sure how any of the server hosts handles updates so it could get overwritten.

mgan59 commented 1 year ago

Also, I'm running my mods all through thunderstore, to test this I need to actually replace files in my steam/valheim folder? Guess there isn't a way to target a github-branch from thunderstore -- that seems like a dream 😁

p.s. I have a dev background mainly internet software (python,golang,js) so learning my way around the unity / valheim mod stuff recently πŸ‘πŸ»

kaiqueknup commented 1 year ago

on nitrado.net servers it seems not to work. even if I copy all the files into the server via FTP, the following error appears:

Valheim Modded Version String Mismatch: This may indicate that mods are missing on one side. Not all mods show up equally on both server and client even if they are installed. Please check the requirements of the listed mods Local (this game): 0.214.2@0.9.9.11 Remote (the server): 0.214.2

For some reason the server is not loading valheim plus even with the updated file in the plugins folder.

TheAntonWonton commented 1 year ago

I am using shockbyte mods seem to be loading fine however when trying to join my world it says incompatible version someone pls help I am not tech savy myself

Fenrirthviti commented 1 year ago

Any incompatibilities with hosting providers should be handled by the hosting provider themselves. I'd recommend reaching out to the support for your server host, as discussion and comments on this PR should be related to the code itself, not general support updating servers. You can always join the V+ Discord for more assistance as well.

Jadereaper commented 1 year ago

Loads up fine with the patch but all tooltips are still broken.

Grantapher commented 1 year ago

@Jadereaper do you have other mods enabled? If not, can you share a screenshot of the issue and how you can reproduce it?

Jadereaper commented 1 year ago

@Grantapher my bad, i thought i had updated Epic Loot but failed to copy it into the folder. Everything is working fine atm.

KayHude commented 1 year ago

@everyone who is testing this and considers themselves "not-tech-savvy": Please note that you need the new BepInEx and Valheim Plus version on both server + client.

I also did some basic tests last night and can confirm that it is generally working. Not many options are enabled on our server, but the clock (game time) is shown and the "Free rotation mode" (1 degree rotation for all axis) is possible.

Foofah commented 1 year ago

My anti virus was triggered by valheimplus.dll. Anyone else received a warning message regarding this?

nilsroesel commented 1 year ago

I tested yesterday all V+ settings. No issue detected in functionality.

JF10R commented 1 year ago

My anti virus was triggered by valheimplus.dll. Anyone else received a warning message regarding this?

My first guess is that your antivirus has a signature for ValheimPlus.dll version 0.9.9.1.1, which is mismatched with this new, modified DLL. Thus triggering an alert.
My second guess is that the DLL is unsigned, since I'm not the official developer, triggering a warning.
Both make sense, since I did not update the version when I built the DLL and it's still showing 0.9.9.1.1 in the assembly info. You can look at it (or upload it yourself) here for more details: VirusTotal Scan

Or follow the guide linked above and build it yourself, which is always the safest option. If you are still on the fence, which I would completely understand, I strongly recommend you wait for the official release and not trust the word of a stranger on the web :) Stay safe.

(For other devs reading this: I simply built the PR 793 version of the solution as-is on VS2022 Community Edition and added it to the official BepInEx zip archive)

Grantapher commented 1 year ago

I would be concerned if anti-virus didn't flag random DLLs ha.

If you want to be extra safe, you can checkout the PR and build it yourself. Instructions on how to set it up the dev env are here. Then install visual studio 2022, open the ValheimPlus.sln in it, and hit run.

perryrobinson commented 1 year ago

Here is a zipped version of BepInEx 5.4.21 with @Grantapher Valheim Plus fix already added to the plugins folder (/BepInEx/plugins/ValheimPlus.dll): denikson-BepInExPack_Valheim-5.4.2100_ValheimPlusFix.zip.

I downloaded this zip file and tested it with my G Portal server. Here is what I did:

I used these folders and files from the zip:

  1. BepInEx
  2. doorstop_libs
  3. unstripped_corlib
  4. doorstop_config.ini
  5. winhttp.dll

Server side: FTP into the server and copy the above folders and files into the root directory, delete old or overwrite existing folders and files if prompted. If you have a V+ config you have been using, replace the BepInEx/config/valheim_plus.cfg with your config.

Client side: Copy/paste the folders and files above into your Valheim game directory, delete old or overwrite existing folders and files if prompted. For windows steam users this is likely C:\SteamLibrary\steamapps\common\Valheim.

Mod appears to be working perfectly now with the changes in this PR.

bennysp commented 1 year ago

I take that back, even with PlanBuild disabled, I am still getting an error.

[Info   : Unity Log] 03/17/2023 21:50:41: -------------------- SENDING VPLUSMAPSYNC DATA

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
ValheimPlus.RPC.VPlusMapSync.ExplorationDataToMapRanges (System.Boolean[] explorationData) (at <9ba9948e5ac44e45b453ceeb8a553e96>:0)
ValheimPlus.RPC.VPlusMapSync.SendMapToServer () (at <9ba9948e5ac44e45b453ceeb8a553e96>:0)
ValheimPlus.GameClasses.Player_OnSpawned_Patch.Prefix (Player& __instance) (at <9ba9948e5ac44e45b453ceeb8a553e96>:0)
(wrapper dynamic-method) Player.DMD<Player::OnSpawned>(Player)
Game.SpawnPlayer (UnityEngine.Vector3 spawnPoint) (at <afd4e3f8ab8b460f8ff25d476fbd573e>:0)
(wrapper dynamic-method) Game.DMD<Game::UpdateRespawn>(Game,single)
Game.FixedUpdate () (at <afd4e3f8ab8b460f8ff25d476fbd573e>:0)
bennysp commented 1 year ago

I take that back, even with PlanBuild disabled, I am still getting an error.

[Info   : Unity Log] 03/17/2023 21:50:41: -------------------- SENDING VPLUSMAPSYNC DATA

[Error  : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
ValheimPlus.RPC.VPlusMapSync.ExplorationDataToMapRanges (System.Boolean[] explorationData) (at <9ba9948e5ac44e45b453ceeb8a553e96>:0)
ValheimPlus.RPC.VPlusMapSync.SendMapToServer () (at <9ba9948e5ac44e45b453ceeb8a553e96>:0)
ValheimPlus.GameClasses.Player_OnSpawned_Patch.Prefix (Player& __instance) (at <9ba9948e5ac44e45b453ceeb8a553e96>:0)
(wrapper dynamic-method) Player.DMD<Player::OnSpawned>(Player)
Game.SpawnPlayer (UnityEngine.Vector3 spawnPoint) (at <afd4e3f8ab8b460f8ff25d476fbd573e>:0)
(wrapper dynamic-method) Game.DMD<Game::UpdateRespawn>(Game,single)
Game.FixedUpdate () (at <afd4e3f8ab8b460f8ff25d476fbd573e>:0)

Disregard - the issue was unrelated and was an issue with UpgradeWorld mod.

ZSteiger commented 1 year ago

Here is a zipped version of BepInEx 5.4.21 with @Grantapher Valheim Plus fix already added to the plugins folder (/BepInEx/plugins/ValheimPlus.dll): denikson-BepInExPack_Valheim-5.4.2100_ValheimPlusFix.zip.

Can confirm this patch works through Thunderstore Mod Manager, both my buddy and I tested for several hours last night on our server and all V+ functionality returned by following these steps:

  1. Backup any configs, though this process shouldn't affect them as we're only moving a DLL file
  2. Download the zipped link above, virus scan didn't find anything wrong
  3. Open the archive with your favorite zip tool, navigate into... BepInExPack_Valheim/BepInEx/plugins and copy the ValheimPlus.dll file (nothing else is necessary)
  4. Next, locate your local profile in Thunderstore Mod Manager by going to Settings -> Locations -> Browse Profile Folder, it should give you a file path to navigate to
  5. Depending on your OS and how you've set your machine up, this route varies but it should look something like AppData/Thunderstore Mod Manager/DataFolder/Valheim/profiles/{YOUR_PROFILE_YOU_USE}. Next, you should see BepInEx, navigate into that folder
    • Note: BepInEx stores your Valheim+ config in the config directory, we're not modifying this folder so your config should persist
  6. Navigate into plugins/ValheimPlus-ValheimPlus, you should see a similar ValheimPlus.dll file from the previous step, replace that file with the one you copied from the zipped patch
  7. Now launch the game through TSMM as you would normally. The menu logo loading is the first sign of success, and from there everything should be working as intended.

Best of luck, and thank you @Grantapher & @JF10R!

Bortmansf commented 1 year ago

Anyone get this fix working on a dedicated linux server? Getting an incompatible version error when trying to connect. Thanks!

KayHude commented 1 year ago

Anyone get this fix working on a dedicated linux server? Getting an incompatible version error when trying to connect. Thanks!

Yes, we got it working with (more or less) the steps explained above. Make sure that you replace the ValheimPlus.dll in the plugins folder on the server AND the client. Both must be the same (from the Zip linked above).

desprit commented 1 year ago

I confirm it's working with https://github.com/lloesche/valheim-server-docker with dll replacement method. Thank you!

JackTheFragger commented 1 year ago

I confirm it's working with https://github.com/lloesche/valheim-server-docker with dll replacement method. Thank you!

Me, too. You have to deactivate ValheimPlus in Environment Varaiables and to use BEPINEX=true instead. Then you copy the valheimplus.dll into the /config/bepinex/plugins folder.

bennysp commented 1 year ago

Confirmed it is working on my dedicated server using AMP game server manager.

desprit commented 1 year ago

I confirm it's working with https://github.com/lloesche/valheim-server-docker with dll replacement method. Thank you!

Me, too. You have to deactivate ValheimPlus in Environment Varaiables and to use BEPINEX=true instead. Then you copy the valheimplus.dll into the /config/bepinex/plugins folder.

Hm, I didn't deactivate it, only replaced the file.

JackTheFragger commented 1 year ago

I confirm it's working with https://github.com/lloesche/valheim-server-docker with dll replacement method. Thank you!

Me, too. You have to deactivate ValheimPlus in Environment Varaiables and to use BEPINEX=true instead. Then you copy the valheimplus.dll into the /config/bepinex/plugins folder.

Hm, I didn't deactivate it, only replaced the file.

Then you should have the old BepInEx Version.

FrBillyD commented 1 year ago

I've tested a moderately modded client and server (mainly building, structural integrity, inventory, weight scaling, auto-fill stations, unlimited fire fuel, etc.) on a dedicated server with this PR fix and I can confirm I noticed ZERO issues with my V+ config.

I suggest people test this thoroughly and report back with their findings here while the main devs are inactive.

Note: If you know what you're doing, I highly suggest you checkout Grant's modifications, and build the DLL yourself if possible. Follow the updated CONTRIBUTING.md instructions.

I'm not tech savvy and I want to test the fix. How do I proceed?

For those who are willing to test (take backups of everything beforehand) and are not dev-savvy:

  • Update Valheim to the latest build.
  • Copy the new version of BepInEx within your Valheim/Valheim Dedicated Server folder.

Here is a zipped version of BepInEx 5.4.21 with @Grantapher Valheim Plus fix already added to the plugins folder (/BepInEx/plugins/ValheimPlus.dll): denikson-BepInExPack_Valheim-5.4.2100_ValheimPlusFix.zip.

  1. Backup Valheim folder.
  2. Update Valheim
  3. Download the files linked above.
  4. Simply open the archive and drag the content of BepInExPack_Valheim\ within your Valheim or server folder (overwrite files when prompted to).
  5. Launch the game.

All in all, thank you very much for this PR, Grant.

Hi ! Thank you for your fix. It work for our https://github.com/lloesche/valheim-server-docker Docker server and latest client version. πŸ‘ @JackTheFragger thanks for your help, it work too with your solution (https://github.com/valheimPlus/ValheimPlus/pull/793#issuecomment-1475135592) πŸ˜‰ πŸ‘‹

bytorphoto commented 1 year ago

I ran the download on a G-Portal server with no issues. Everything seems to work as required. No error messages with multiple mods running on the client, and a few on the server. Not a single issue that I can see. I am somewhat tech savvy, so don't fall into the "I'm a noob, how do I do this?" category.

I had already updated client and server to Bep5.4.21, so all I did here was copy the DLL and my CFG, restarted and it worked perfectly.

I use Thunderstore to manage my mods and it worked first time, just enabling with the new dll and away.

kaiqueknup commented 1 year ago

on nitrado.net servers it seems not to work. even if I copy all the files into the server via FTP, the following error appears:

Valheim Modded Version String Mismatch: This may indicate that mods are missing on one side. Not all mods show up equally on both server and client even if they are installed. Please check the requirements of the listed mods Local (this game): 0.214.2@0.9.9.11 Remote (the server): 0.214.2

For some reason the server is not loading valheim plus even with the updated file in the plugins folder.

I managed to get around the problem. After sending the files via FTP to the offline Nitrado server, open the ValheimPlus configuration file and set the option "EnforceMod = false". Do this same procedure in the client settings and that's it! Start your server normally and everything will work.

kmayberry91 commented 1 year ago

hey check out Icarus way better game than Valheim anyway with better than 16bit graphics, irongate dev team, and v+ nonexistant devs

AlejandroRoR commented 1 year ago

I confirm its working server and client side.

Grantapher commented 1 year ago

@kaiqueknup it should still work with enforce version being true. It is likely that you just have different versions or no mod at all on server/client.

Grantapher commented 1 year ago

Updated my description comment (the one at the top) with some releases I published for this change.

kaiqueknup commented 1 year ago

@kaiqueknup it should still work with enforce version being true. It is likely that you just have different versions or no mod at all on server/client.

No because what makes the nitrado server force the outdated version of the mod is precisely this function. When the server starts with this function active, it performs a version check with the database nitrado from the plugins tab, causing the Downgrade. I've been playing on my server for a whole day and there hasn't been a single problem. This tutorial was taught in the fix posted on the Nexus site, there are a lot of people reporting that it works. I brought the tutorial here to help others who still don't know.

Grantapher commented 1 year ago

enforceMod in valheim_plus.cfg adds an update in nitrado? Interesting.

Does this mean that the correct version is running on the server, it just isn't being verified? If so, then that works, albeit is unfortunate that it has to be the solution.

kaiqueknup commented 1 year ago

enforceMod in valheim_plus.cfg adds an update in nitrado? Interesting.

Does this mean that the correct version is running on the server, it just isn't being verified? If so, then that works, albeit is unfortunate that it has to be the solution.

Yes. this goes for both the nitrado server and other servers that natively support valheim plus. As the original V+ was not updated, even if you add the Fix and the new version of BepInEx via FTP, the server when starting checks the version that is in its files with the version that is in its database. If it is different, the server automatically performs a downgrade (which is the outdated official version of V+). Disabling "EnforceMod", this check does not happen.

Grantapher commented 1 year ago

I figured they would have their own separate flag for that (and perhaps they should), but either way glad it is working.

bytorphoto commented 1 year ago

enforceMod in valheim_plus.cfg adds an update in nitrado? Interesting. Does this mean that the correct version is running on the server, it just isn't being verified? If so, then that works, albeit is unfortunate that it has to be the solution.

Yes. this goes for both the nitrado server and other servers that natively support valheim plus. As the original V+ was not updated, even if you add the Fix and the new version of BepInEx via FTP, the server when starting checks the version that is in its files with the version that is in its database. If it is different, the server automatically performs a downgrade (which is the outdated official version of V+). Disabling "EnforceMod", this check does not happen.

Well, I DO have the correct (new test) version installed on both client and server AND the "enforceMod = true" on a G-Portal dedicated server and it works perfectly, so there's something funky going on for one of us.

kaiqueknup commented 1 year ago

enforceMod in valheim_plus.cfg adds an update in nitrado? Interesting. Does this mean that the correct version is running on the server, it just isn't being verified? If so, then that works, albeit is unfortunate that it has to be the solution.

Yes. this goes for both the nitrado server and other servers that natively support valheim plus. As the original V+ was not updated, even if you add the Fix and the new version of BepInEx via FTP, the server when starting checks the version that is in its files with the version that is in its database. If it is different, the server automatically performs a downgrade (which is the outdated official version of V+). Disabling "EnforceMod", this check does not happen.

Well, I DO have the correct (new test) version installed on both client and server AND the "enforceMod = true" on a G-Portal dedicated server and it works perfectly, so there's something funky going on for one of us.

maybe gportal doesn't force a wrong update when starting the server. I heard that zap-hosting does the same thing as Nitrado. It depends on how the server works.

ivan-stels commented 1 year ago

Here is a zipped version of BepInEx 5.4.21 with @Grantapher Valheim Plus fix already added to the plugins folder (/BepInEx/plugins/ValheimPlus.dll): denikson-BepInExPack_Valheim-5.4.2100_ValheimPlusFix.zip.

I downloaded this zip file and tested it with my G Portal server. Here is what I did:

I used these folders and files from the zip:

  1. BepInEx
  2. doorstop_libs
  3. unstripped_corlib
  4. doorstop_config.ini
  5. winhttp.dll

Server side: FTP into the server and copy the above folders and files into the root directory, delete old or overwrite existing folders and files if prompted. If you have a V+ config you have been using, replace the BepInEx/config/valheim_plus.cfg with your config.

Client side: Copy/paste the folders and files above into your Valheim game directory, delete old or overwrite existing folders and files if prompted. For windows steam users this is likely C:\SteamLibrary\steamapps\common\Valheim.

Mod appears to be working perfectly now with the changes in this PR.

That doesnt work on my linux server. Seems like it starts but after I get error: CAppInfoCacheReadFromDiskThread took 17 milliseconds to initialize Setting breakpad minidump AppID = 892970 [S_API FAIL] Tried to access Steam interface SteamNetworkingUtils003 before SteamAPI_Init succeeded. 03/21/2023 16:02:27: Server ID 90071992547409920 03/21/2023 16:02:27: Authentication:k_ESteamNetworkingAvailability_Waiting 03/21/2023 16:02:27: Steam game server initialized 03/21/2023 16:02:27: Using default prefs 03/21/2023 16:02:27: Valheim version:0.214.300 03/21/2023 16:02:27: Worldgenerator version setup:2 ERROR: Shader TextMeshPro/Sprite shader is not supported on this GPU (none of subshaders/fallbacks are suitable) 03/21/2023 16:02:27: Render threading mode:SingleThreaded 03/21/2023 16:02:27: Missing audio clip in music respawn 03/21/2023 16:02:27: Builder started GetPixel called on an undefined mip (valid values are 0 - 6 Caught fatal signal - signo:11 code:1 errno:0 addr:0x3fb Segmentation fault

Tried different ways: -with all mods I uploaded in previous version of Valheim. -clear install without mods Always get the same:(

Can anyone help? Debian11

PuszkaPotato commented 1 year ago

Here is a zipped version of BepInEx 5.4.21 with @Grantapher Valheim Plus fix already added to the plugins folder (/BepInEx/plugins/ValheimPlus.dll): denikson-BepInExPack_Valheim-5.4.2100_ValheimPlusFix.zip.

I downloaded this zip file and tested it with my G Portal server. Here is what I did:

I used these folders and files from the zip:

  1. BepInEx
  2. doorstop_libs
  3. unstripped_corlib
  4. doorstop_config.ini
  5. winhttp.dll

Server side: FTP into the server and copy the above folders and files into the root directory, delete old or overwrite existing folders and files if prompted. If you have a V+ config you have been using, replace the BepInEx/config/valheim_plus.cfg with your config.

Client side: Copy/paste the folders and files above into your Valheim game directory, delete old or overwrite existing folders and files if prompted. For windows steam users this is likely C:\SteamLibrary\steamapps\common\Valheim.

Mod appears to be working perfectly now with the changes in this PR.

That doesnt work on my linux server. Seems like it starts but after I get error: CAppInfoCacheReadFromDiskThread took 17 milliseconds to initialize Setting breakpad minidump AppID = 892970 [S_API FAIL] Tried to access Steam interface SteamNetworkingUtils003 before SteamAPI_Init succeeded. 03/21/2023 16:02:27: Server ID 90071992547409920 03/21/2023 16:02:27: Authentication:k_ESteamNetworkingAvailability_Waiting 03/21/2023 16:02:27: Steam game server initialized 03/21/2023 16:02:27: Using default prefs 03/21/2023 16:02:27: Valheim version:0.214.300 03/21/2023 16:02:27: Worldgenerator version setup:2 ERROR: Shader TextMeshPro/Sprite shader is not supported on this GPU (none of subshaders/fallbacks are suitable) 03/21/2023 16:02:27: Render threading mode:SingleThreaded 03/21/2023 16:02:27: Missing audio clip in music respawn 03/21/2023 16:02:27: Builder started GetPixel called on an undefined mip (valid values are 0 - 6 Caught fatal signal - signo:11 code:1 errno:0 addr:0x3fb Segmentation fault

Tried different ways: -with all mods I uploaded in previous version of Valheim. -clear install without mods Always get the same:(

Can anyone help? Debian11

You are using Valheim PBT 0.214.300, BepInEx 5.4.2100 does not work on this version. You can find updated BepInEx on some discord servers but it has not been released on thunderstore.

rozwel commented 1 year ago

@Grantapher Since it seems you may hold the active fork for the moment, are you open to accepting some additional bug fixes into your version?

Grantapher commented 1 year ago

only bug fixes, don't intend on adding features.

rozwel commented 1 year ago

@Grantapher I was actually hoping you would include your fix for the fishing skill. #777

Grantapher commented 1 year ago

Yes, that is the only bug fix I have planned for the next release right now, and also the only one I am aware of.

JackTheFragger commented 1 year ago

Yes, that is the only bug fix I have planned for the next release right now, and also the only one I am aware of.

I have a bug, that local defined Keys will not be loaded when connecting to a dedicated server. Insted only the default values will be used. I have a fix for it, but can't commit it to your fork (branch: origin\grantapher-development). The button is disabled in VS2022.

I've changed the code in BaseConfig.cs from

                if (prop.PropertyType == typeof(KeyCode) && !RPC.VPlusConfigSync.isConnecting)
                {
                    prop.SetValue(this, data.GetKeyCode(keyName, (KeyCode)existingValue), null);
                    continue;
                }

to

                if (prop.PropertyType == typeof(KeyCode))
                {
                    prop.SetValue(this, data.GetKeyCode(keyName, (KeyCode)existingValue), null);
                    continue;
                }

This is necessary to use FreePlacementRotation without colliding with other keys (e.g. F is used for activateForsaken Powers. This is very frustrating.

Grantapher commented 1 year ago

Can you open a pr in this repo? I'll be watching this repo as well and will rebase open prs with bug fixes. Plus the owners of this repo will have to still merge it anyways.

If not a pr, at least an issue.

Grantapher commented 1 year ago

@JackTheFragger I opened the above Issue for your comment.