Well you can use mod client-side only if server allows using non whitelisted mods. And in that case you will face inconsistency in game's behaviour.
For example if you are first one to appear on your base your machine will be responsible for simulation calculations and mod will work fine. But if you aren't the first who came to base the simulation will be calculated on another machine and ward will not have effect.
So to say I can't say exactly what can go wrong if you use it without installing on the server. It won't break the game though but will be not functional in most cases. So installing on the server is highly recommended, mostly mandatory.
Valheim is client-authorative game so it needs to be installed on every client since you placed it on the server. The clients without mod installed just will not be able to connect.
This mod currently causes stamina to fail to regenerate and all status effects to no longer count down. I really have no idea why, but it's definitely caused by this mod, even when I run it entirely by itself.
I'm using the Ashlands version. I did not notice any error messages that would be helpful (Valheim's error messages in general rarely seem to be, to be honest), but I'll check again later and get back to you about that. I had to systematically remove all my mods one by one and restart the game to suss out the culprit, so while I can't really tell you what the problem is, it was very definitely caused by this mod in particular.
Hi Shudnal, I love the idea of your mod, and find it works really well. I had a question about whether or not altering the effective radius of the ward affects its "playerbase" (spawn blocking) radius?
Yes PlayerBase radius is also modified by ward radius config. You have an option to disable it completely. Set Supress spawn in ward area to false to disable PlayerBase component of ward. If you have other buildings you base should be already covered. So you could have one ward with ginormous radius covering all your base.
Thanks for the reply, that makes sense. One final question, for the damage mutipliers, does setting for example: "Structure damage taken multiplier" to 2 mean that building pieces damage taken is doubled or halved in the ward radius?
That's multiplier of damage taken. So damage taken * 2 = double the damage taken on hit. The logic is shared between all multipliers. You can test it ingame. The config value change is applied on the fly.
Love the Mod but it really seems to slow down the FPS. I have multiple wards set up to cover my base area and each time I add one it seems to drop the FPS even lower. Any suggestions?
In general it's better to use less wards and instead increase the ward radius. Also there is setting "Ward protected status check time" that covers most performance wise operation - ward coverage position calculation. It means the time in seconds while piece will save its status between range check.
Tested it recently on 20k instances big community base. In general reducing wards count, radius, and other parameters doesn't take any effect. Even disabling the mod entirely doesn't seem to change anything. It was 40-42 fps and it stays the same. I've made the mod with an optimisation in mind so I can't take any measures to increase perfomance much more. Maybe slightly but not noticeably.
Made some more tests and I can't see the difference between mod enabled and disabled on a really large base with many wards. I don't think I can do more optimal implementation than current one.
If you want I can test your world myself if you provide me your world files and mods with its configs. Maybe it's some mods collision or so.
I set the range to 100 and removed most of the wards. I am still getting an FPS drop but nowhere as bad. What would you suggest as a max range for it? Also I'm not as computer savvy as I was back in the 80"s, (I was a rock star then now I barely above rock. LOL) F2 instance? I'll hit F2 next time I pick up the drop and see what I get. Thank you!
OK, I've seen what you were talking about with F2 (THANKS! learned something new. Instance is about 4 .5k instance with 1 Ward set with 100 range and FPS is looking good (mid 40's) with about 72 mods running. I think you might be right about some collision with another mod. Next time it starts to drop I'll see if F2 shows any chages.
5k instances seems to be small base near the open water. Based on your mid 40's fps though its look like your computer is not very powerful.
Ward radius depends on your base location. Do keep in mind that ward supresses creature spawns (it's vanilla behavior) if you didn't uncheck corresponding config option. So if you don't want raid spawn protection you can uncheck the option, place 1 ward in the middle and set radius to cover all of your buildings. Other way if you want spawn protection:
If you have clamped base you may place 1 ward in the middle
If you base is long then a couple wards with overlapped radius
I really can't give a more proper advice without seeing your base :D
Despite all said this mod should not cause such a issues even if you place a hundred wards. If you still suspect this mod you can try to make copy of your world and character and remove all other mods and try to mess with the settings.
Running pure vanilla I have an FPS >100. One issue I was able to see/fix is one with Chartography Skill. But I am still getting the FPS crash in area with a Ward. Here is the error that is popping up: [Error : Unity Log]NullReferenceException: Object reference not set to an instance of an object Stack trace: ZNetScene.RemoveObjects(System.Collections.Generic.List`1[T] currentNearObjects, System.Collections.Generic.List`1[T] currentDistantObjects) (at <447b19510f604ca3807cd6cce3a7c1ef>:0) ZNetScene.CreateDestroyObjects () (at<447b19510f604ca3807cd6cce3a7c1ef>:0) ZNetScene.Update () (at<447b19510f604ca3807cd6cce3a7c1ef>:0)
Q: I am running solo. How do I enable you to see my world?
Ah I see. The error you get is some mod has shitty network code implementation. The root cause of the issue is some mod instantiate the object without proper destroying it leaving the link to already destroyed object. Then when it comes to garbage collector it is trying to destroy the destroyed and falls to the error you see. I guess in your 70 mods there is one or couple that adds new stuff or do some way create objects aren't meant to be vanilla.
More likely some developer use Destroy() function instead of ZNetScene.instance.Destroy(). It could be either unupdated mod or unaware mod developer.
EDIT: Now I don't need to see your world. It is completely fine. 100FPS on vanilla is indeed a good one. I can recommend Render Limits and set Distant area (key: distant_area) to 10-12. Your machine will handle it with ease but you will start to see distant trees which is very immersive.
Thank you Q: Garbage collector? Id that the Obliterator or some programing function? I will have to wake up my Crash Test Dummy and experiment around in my test world to narrow down the culprit. It might take a while but I'll let you know when (if?) I find it. You have been a great help.
You will find it sooner or later. In general, garbage collector is the system that collects objects meant to be destroyed instead of immediate destruction and then destroy it by the whole bunch.
It apears that when i install this mod it dose not do anything other than stop my stamina from regening and this eror keeps apearing in the console. [Error : Unity Log] MissingFieldException: Field 'ZNet.m_serverSyncedPlayerData' not found. Stack trace: (wrapper dynamic-method) Player.DMD<Player::UpdateBaseValue>(Player,single) Player.FixedUpdate () (at <478cefef01544173a8b5828694dc7192>:0)
65 comments
I have a dedicated server setup. Will I have to install this on the server itself to be able to use this mod?
For example if you are first one to appear on your base your machine will be responsible for simulation calculations and mod will work fine. But if you aren't the first who came to base the simulation will be calculated on another machine and ward will not have effect.
So to say I can't say exactly what can go wrong if you use it without installing on the server. It won't break the game though but will be not functional in most cases.
So installing on the server is highly recommended, mostly mandatory.
Do all clients that connect to the server need this mod for the functionality to work or is it enough to have it on the server only?
Yeaaaah!
Any errors in log file?
Love your mod! No stress :D
I love the idea of your mod, and find it works really well. I had a question about whether or not altering the effective radius of the ward affects its "playerbase" (spawn blocking) radius?
One final question, for the damage mutipliers, does setting for example: "Structure damage taken multiplier" to 2 mean that building pieces damage taken is doubled or halved in the ward radius?
Best to you, and thank you for sharing your work!
Also there is setting "Ward protected status check time" that covers most performance wise operation - ward coverage position calculation. It means the time in seconds while piece will save its status between range check.
How much instances you have in F2 menu?
Even disabling the mod entirely doesn't seem to change anything. It was 40-42 fps and it stays the same.
I've made the mod with an optimisation in mind so I can't take any measures to increase perfomance much more. Maybe slightly but not noticeably.
I don't think I can do more optimal implementation than current one.
If you want I can test your world myself if you provide me your world files and mods with its configs. Maybe it's some mods collision or so.
Thank you!
.5k instance with 1 Ward set with 100 range and FPS is looking good (mid 40's) with about 72 mods running. I think you might be right about some collision with another mod. Next time it starts to drop I'll see if F2 shows any chages.
Ward radius depends on your base location. Do keep in mind that ward supresses creature spawns (it's vanilla behavior) if you didn't uncheck corresponding config option.
So if you don't want raid spawn protection you can uncheck the option, place 1 ward in the middle and set radius to cover all of your buildings.
Other way if you want spawn protection:
- If you have clamped base you may place 1 ward in the middle
- If you base is long then a couple wards with overlapped radius
I really can't give a more proper advice without seeing your base :DDespite all said this mod should not cause such a issues even if you place a hundred wards.
If you still suspect this mod you can try to make copy of your world and character and remove all other mods and try to mess with the settings.
One issue I was able to see/fix is one with Chartography Skill. But I am still getting the FPS crash in area with a Ward.
Here is the error that is popping up:
[Error : Unity Log]NullReferenceException: Object reference not set to an instance of an object
Stack trace:
ZNetScene.RemoveObjects(System.Collections.Generic.List`1[T] currentNearObjects,
System.Collections.Generic.List`1[T] currentDistantObjects) (at
<447b19510f604ca3807cd6cce3a7c1ef>:0)
ZNetScene.CreateDestroyObjects () (at<447b19510f604ca3807cd6cce3a7c1ef>:0)
ZNetScene.Update () (at<447b19510f604ca3807cd6cce3a7c1ef>:0)
Q: I am running solo. How do I enable you to see my world?
The root cause of the issue is some mod instantiate the object without proper destroying it leaving the link to already destroyed object. Then when it comes to garbage collector it is trying to destroy the destroyed and falls to the error you see.
I guess in your 70 mods there is one or couple that adds new stuff or do some way create objects aren't meant to be vanilla.
More likely some developer use Destroy() function instead of ZNetScene.instance.Destroy(). It could be either unupdated mod or unaware mod developer.
EDIT: Now I don't need to see your world. It is completely fine. 100FPS on vanilla is indeed a good one.
I can recommend Render Limits and set Distant area (key: distant_area) to 10-12. Your machine will handle it with ease but you will start to see distant trees which is very immersive.
Q: Garbage collector? Id that the Obliterator or some programing function?
I will have to wake up my Crash Test Dummy and experiment around in my test world to narrow down the culprit. It might take a while but I'll let you know when (if?) I find it.
You have been a great help.
In general, garbage collector is the system that collects objects meant to be destroyed instead of immediate destruction and then destroy it by the whole bunch.
[Error : Unity Log] MissingFieldException: Field 'ZNet.m_serverSyncedPlayerData' not found.
Stack trace:
(wrapper dynamic-method) Player.DMD<Player::UpdateBaseValue>(Player,single)
Player.FixedUpdate () (at <478cefef01544173a8b5828694dc7192>:0)