Not completely compatible with the new Hearth & Home update. It looks like regular workbenches still work, but this exception pops up in the logs when building the new attachments for the cooking station:
NullReferenceException: Object reference not set to an instance of an object at CraftingStationLevelRange.CraftingStationLevelRangePlugin.ChangeStationRange (CraftingStation station, System.Single newRange) [0x00015] at CraftingStationLevelRange.CraftingStationLevelRangePlugin.LogStations (Player __instance) [0x00071]
EDIT: Well dang it! Wrote to soon. The current update to VH v0.217.22/24 finaly broke this mod. :-(
---------
Just in case anyone is discouraged from trying this mod because of bonesbro's comment: Don't be.
It works perfectly fine even with VH v0.217.14 (Hildirs update).
I'm pretty sure this error occurs every time a cauldron is in the players range. This mod tries to set a range on every crafting station but the cauldron doesn't have a range to increase -> thus the "NullReferenceException" (because its referencing a variable in a "CraftingStation" object which doesn't even have it).
Just try it: Teleport into an area without any cauldrons and compare it with cauldron infested areas. Or build a few more cauldrons just for fun and the error count rises in sync.
I love this mod and it's one of my must-haves!! Could you please consider working with @aedenthorn to make it compatible with Craft From Containers The two mods would work so well together! for now, I just set the building range on Craft From Containers to the same value as the maxed out crafting stations build range but a more seamless interaction would be iconic!
I don't know if there's a bug related to this mod, the game, or just my understanding of how enemies spawn is incorrect, but it seems like the expanded workbench range isn't registering with the enemy spawning system.
Now, I don't even know if that's how the enemy spawning works; It's just something I read in the forums (that enemies won't spawn within the workbench's range). But I've got a base built on the water, with a large terrain/stone breakwater/wall creating a harbor. All of this is within my workbench's range when upgraded to level >2. However, every night I get a LARGE mass of Greydwarfs, Shamans and Brutes gathering at the end of my breakwater. Sometimes more than 10 at a time. Recently I tried building another workbench at the end of the breakwater, and so far it seems to have stopped them from spawning en masse. (Still get 1 or 2, but I think they are walking over, not actually spawning).
So I'm not sure if this has to do with the game itself; possibly calculating spawn distances before it sees the expanded workbench range? (or rather, the upgraded workbench level isn't modifying the workbench range in-time, before the spawn distance is being calculated?) Again, I'm not positive this is even how all of that works..
But I guess the next move would be to probably increase the default/level 1 workbench range to see if that prevents the spawning.. This would at least narrow it down to see if has anything to do with the workbench's level (and thus this mod adjusting the range based on the level) or not.. But I figured I'd mention it here as well, incase anyone else has noticed anything similar, and possibly save me the time troubleshooting something that's already been troubleshoot-ed.
Oh wow, nevermind.. I just realized this was being discussed a few comments down, lol. Not sure how I missed that.
I'll keep my original post up however, incase anyone finds out more information regarding how the enemy spawning works and whether or not it factors in the workbench's range..
Nicely done mod, increase range based on level is a good idea.
one question, I like to use a setting in Valheim plus that make it possible to place workbench/forge attachments longer away from the stations. I like to setup up where they more naturally belong. Can I use that setting with mod? To enable this setting it automatically enable workbench area setting also.
Great Mod, love the inheritance feature and the customizable increase per level. Any thoughts on adding an option to increase upgrade detections for the workbench and forge upgrades? The base value seems really small and makes you crowd all the upgrades it feels like to me.
I plan on turning this mod into a crafting station utility that gives you heaps of customisation options for all things crafting stations. So stay tuned for that!
Can this be installed on a dedicated server to make it so it works for all players? As in can this be ran server side? or is this only able to be run client side and all users will need to install it?
Ohhhh really? Wiki says otherwise tho https://valheim.fandom.com/wiki/Spawns I would have thought that since the workbench increases its radius the spawn would decrease too.
If I'm understanding the "SearchRange" value correctly, it's essentially the maximum range that a workbench would be?
So, if it was using you default values and it was a level 1 workbench, the Search Range would be 10? And if it was a level 4 workbench with your default value of 10 range per level, the Search Range would be 40?
Just want to make sure I understand the Search Range before changing it. I'm actually going to set the increased range per level to 5, so would I be safe to set the search range to 60 (half your default value)?
42 comments
NullReferenceException: Object reference not set to an instance of an object
at CraftingStationLevelRange.CraftingStationLevelRangePlugin.ChangeStationRange (CraftingStation station, System.Single newRange) [0x00015]
at CraftingStationLevelRange.CraftingStationLevelRangePlugin.LogStations (Player __instance) [0x00071]
"I have no further interest in Valheim modding."
Looks like someone else will have to pick up maintenance.
Well dang it! Wrote to soon.
The current update to VH v0.217.22/24 finaly broke this mod. :-(
---------
Just in case anyone is discouraged from trying this mod because of bonesbro's comment: Don't be.
It works perfectly fine even with VH v0.217.14 (Hildirs update).
I'm pretty sure this error occurs every time a cauldron is in the players range. This mod tries to set a range on every crafting station but the cauldron doesn't have a range to increase -> thus the "NullReferenceException" (because its referencing a variable in a "CraftingStation" object which doesn't even have it).
Just try it: Teleport into an area without any cauldrons and compare it with cauldron infested areas.
Or build a few more cauldrons just for fun and the error count rises in sync.
Now, I don't even know if that's how the enemy spawning works; It's just something I read in the forums (that enemies won't spawn within the workbench's range). But I've got a base built on the water, with a large terrain/stone breakwater/wall creating a harbor. All of this is within my workbench's range when upgraded to level >2. However, every night I get a LARGE mass of Greydwarfs, Shamans and Brutes gathering at the end of my breakwater. Sometimes more than 10 at a time.
Recently I tried building another workbench at the end of the breakwater, and so far it seems to have stopped them from spawning en masse. (Still get 1 or 2, but I think they are walking over, not actually spawning).
So I'm not sure if this has to do with the game itself; possibly calculating spawn distances before it sees the expanded workbench range? (or rather, the upgraded workbench level isn't modifying the workbench range in-time, before the spawn distance is being calculated?) Again, I'm not positive this is even how all of that works..
But I guess the next move would be to probably increase the default/level 1 workbench range to see if that prevents the spawning.. This would at least narrow it down to see if has anything to do with the workbench's level (and thus this mod adjusting the range based on the level) or not.. But I figured I'd mention it here as well, incase anyone else has noticed anything similar, and possibly save me the time troubleshooting something that's already been troubleshoot-ed.
I'll keep my original post up however, incase anyone finds out more information regarding how the enemy spawning works and whether or not it factors in the workbench's range..
one question, I like to use a setting in Valheim plus that make it possible to place workbench/forge attachments longer away from the stations. I like to setup up where they more naturally belong. Can I use that setting with mod? To enable this setting it automatically enable workbench area setting also.
Also was wondering does the increased range also remove nearby spawns? If so some things still spawn within the range of the workbench.
I would have thought that since the workbench increases its radius the spawn would decrease too.
So, if it was using you default values and it was a level 1 workbench, the Search Range would be 10? And if it was a level 4 workbench with your default value of 10 range per level, the Search Range would be 40?
Just want to make sure I understand the Search Range before changing it. I'm actually going to set the increased range per level to 5, so would I be safe to set the search range to 60 (half your default value)?