Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

Grantapher
Copy link

@Grantapher Grantapher commented Mar 16, 2023

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:

  • server sync config
  • ABM
  • Structural integrity

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.

Copy link

@JF10R JF10R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@nilsroesel
Copy link

Ill do some testing with it

@justLou72
Copy link

justLou72 commented Mar 16, 2023

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
Copy link
Author

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
Copy link

mgan59 commented Mar 16, 2023

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
Copy link
Author

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

Copy link

@JF10R JF10R left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After testing V+ stuff with the changes of this PR for 3+ hours, I'm just commenting again to add the "Approve" status, even though I don't have write permissions to ValheimPlus' repo.

Hopefully it's useful somehow.

@mgan59
Copy link

mgan59 commented Mar 16, 2023

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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

@Grantapher
Copy link
Author

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

@Jadereaper
Copy link

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

@KayHude
Copy link

KayHude commented Mar 17, 2023

@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
Copy link

Foofah commented Mar 17, 2023

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

@nilsroesel
Copy link

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

Copy link

@JackTheFragger JackTheFragger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All Tests local and on dedicated Server were successfull. All featured functions properly.

@JF10R
Copy link

JF10R commented Mar 17, 2023

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
Copy link
Author

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
Copy link

perryrobinson commented Mar 17, 2023

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
Copy link

bennysp commented Mar 18, 2023

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
Copy link

bennysp commented Mar 18, 2023

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
Copy link

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
  1. 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
  2. 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
Copy link

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

@KayHude
Copy link

KayHude commented Mar 19, 2023

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
Copy link

desprit commented Mar 19, 2023

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

@JackTheFragger
Copy link

JackTheFragger commented Mar 19, 2023

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.

Copy link

@KayHude KayHude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • checked the code changes in this PR, look error-free and plausible to me
  • tested the Zip provided in the PR discussion on a dedicated server plus 10 clients -> no issues, all features work like before the breaking change

=> IMHO this PR is good, no reason not to merge it.

This was referenced Mar 22, 2023
@PuszkaPotato
Copy link

PuszkaPotato commented Mar 23, 2023

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
Copy link

rozwel commented Mar 23, 2023

@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
Copy link
Author

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

@rozwel
Copy link

rozwel commented Mar 24, 2023

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

@Grantapher
Copy link
Author

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
Copy link

JackTheFragger commented Mar 25, 2023

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
Copy link
Author

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
Copy link
Author

@JackTheFragger I opened the above Issue for your comment.

@mrspartak
Copy link

@Grantapher with your patch on the newest update Valhein crush
image

@PuszkaPotato
Copy link

@Grantapher with your patch on the newest update Valhein crush image

It works just fine, you have to update BepInEx

@mrspartak
Copy link

@CanExiOne how do I do that? I have only ValheimPlus installed (@Grantapher patch). As far as I see BepInEx was not updated since last year

@PuszkaPotato
Copy link

@CanExiOne how do I do that? I have only ValheimPlus installed (@Grantapher patch). As far as I see BepInEx was not updated since last year

It did, check on thunderstore https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/

@mrspartak
Copy link

@CanExiOne thanks! Works now. I checked their repo

@Grantapher
Copy link
Author

I'll update my release and thunderstore listing later today.

@SSimp258
Copy link

I'll update my release and thunderstore listing later today.

I think repackaging with newest bepinex is all that's needed. I think your fix is still good with this latest valheim update.

@Grantapher
Copy link
Author

I have Grantapher#2 queued up to be added anyways, so maybe I'll edit .13 with new bepinex and then add .14. I'll figure it out later today.

@JackTheFragger
Copy link

JackTheFragger commented Mar 28, 2023

VPlus works without further work with 0.214.300. BepInEx has to be updated only.

For llloesche/valheim-server you have to update the bepinex.cfg manually. Issue opened: lloesche/valheim-server-docker#608

@Grantapher
Copy link
Author

New release for the new valheim version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet