
Mods / The Nightwatcher
Author: Buggi
Side: Both
Created: Nov 16th 2021 at 6:29 AM
Last modified: Jan 30th at 7:42 PM
Downloads: 15705
Follow Unfollow 180
Recommended download (for Vintage Story v1.20.x):
NightWatcher-1.20-2.2.0.zip
1-click install
Once placed the Nightwatcher prevents Entities from spawning in a radius around it. You decide what he watches for in the watcher_config.json. By default he blocks drifters, bears, and wolves. Add/remove Entity code values of anything you wish to block.
An example is in Vintagestory\assets\survival\entities\land there's a locust.json, inside that file is code: "locust"
"locust" is the value you would add to the watcher_config list to block all the variants of locusts from spawning in the radius.
The radius is configurable, Default radius is 128.
v2.2 For game version 1.20.3
DEFAULT entity blocking now has more entity codes in it. Delete your old watcher_config.json file in ModConfig to regenerate the new list. Or you can add the new codes yourself if you've already customized the list.
A list of all entity codes blocked by default now:
- drifter
- bell
- locust
- bear
- wolf
- bellmini - new type in 1.20
- erel - new type in 1.20
- bowtorn - new type in 1.20
- shiver - new type in 1.20
v2.0 MAJOR FEATURE - Now can block Rifts from spawning in the effective radius!
Blocking Rifts does so no matter if there's a storm or not. If you wish for storms to allow Rifts anywhere, let me know.
v1.6 MAJOR FEATURE - Now can block ANY entity as long as you put the code part in the config.
"BlockCodes" is an array that defaults to this:"BlockCodes": [
"drifter",
"bear",
"wolf"
],
All you need to do is add/remove the first code part of the entity you wish to block with the Nightwatcher. (See above)
This will still respect "BlockDuringStorm" and shut down all entity blocking during a Temporal Storm if this is false.
You may catch him looking around once in awhile, don't be alarmed, he remains steadfast in his duties.
Crafting requires a temporal gear, a straw dummy, and gold plate. So not an early game option.
As always, my YouTube channel is dedicated to moddable games and VS is just plain fun to mod and play.
Check out my channel here:
https://www.youtube.com/c/FlexibleGames
I'm always on the lookout for mod ideas.
Support me if you want via Patreon: https://www.patreon.com/flexiblegames
Version | For Game version | Downloads | Release date | Changelog | Download | 1-click mod install* |
---|---|---|---|---|---|---|
v2.2.0 | 3417 | Jan 30th at 7:42 PM | Show | NightWatcher-1.20-2.2.0.zip | 1-click install | |
v2.1.0 | 2775 | Mar 21st 2024 at 4:02 AM | Show | NightWatcher-119-2.1.0.zip | 1-click install | |
v2.0.0 | 463 | Mar 7th 2024 at 7:57 PM | Show | NightWatcher-1.19-2.0.zip | 1-click install | |
v1.8.0 | 131 | Mar 7th 2024 at 5:37 PM | Show | NightWatcher-1.19-1.8.zip | 1-click install | |
v1.7.0 | 563 | Feb 16th 2024 at 10:30 PM | Show | NightWatcher-1.19-1.7.zip | 1-click install | |
v1.6.0 | 516 | Feb 5th 2024 at 6:14 PM | Show | NightWatcher-1.19-1.6.zip | 1-click install | |
v1.5.0 | 1443 | Aug 28th 2023 at 4:24 PM | Show | NightWatcher-1.18-1.5.zip | 1-click install | |
v1.4.0 | 1747 | Apr 10th 2023 at 9:11 PM | Show | NightWatcher-1.18-1.4.zip | 1-click install | |
v1.3.0 | 1588 | Aug 31st 2022 at 8:13 PM | Show | NightWatcher_v1.3.0.zip | 1-click install | |
v1.2.0 | 2094 | Jan 11th 2022 at 3:49 AM | Show | NightWatcher-v1.2.zip | 1-click install | |
v1.1.0 | 553 | Nov 17th 2021 at 6:51 PM | Show | NightWatcher-v1.1.0.zip | 1-click install | |
v1.0.0 | 415 | Nov 16th 2021 at 6:30 AM | Show | NightWatcher-v1.0.0.zip | 1-click install |
You want to customize what it blocks individually? That would require a ton of work.
Would you be able to add a second version in? more or less just having two of them both customizable? had a thought for my server if i had two versions i could set one for animals and one for drifters. (we had to disable drifters, cause players were using them to cheese dungeons on the map >.<)
All you need to use in the config is the first 'name' or 'code' of the entity.
For example, adding "wolf" to the list (it's already there) blocks wolf-male, wolf-female, wolf-pup variants, etc.
Same with "drifter", drifter-surface, drifter-nightmare, etc.
Once you understand how the game maps things, it makes sense and is very intuitive.
"BlockCodes" in the config was poorly named on my part, it is the CODE of the Entity to BLOCK, NOT a code OF a block. Can't change it now, everyone who uses this would have to redo their configs.
Buggi Thanks for this nice mod. is it possible to use wilcards? The Rustbound Magic mobs have many variants and that would make things easier (IIRC there's 8 variants for each mob, 3 being common, the rest are bosses and will not spawn at random places, so that's 24 instead of 3 lines, and that would be future-proof because some variants are curently disabled but might be activated later on).
I see, thank you for the info I'll let them know.
Your using a rift alteration mod and it's causing crazy Rift spawning behavior?
If so, that mod needs to gracefully handle the rift spawn event returning false. All the nightwatcher does is subscribe to the event, detect the distance to the watcher (as well as the config value) and return false if it should block it. That's it.
I got a server crashing cascade of errors, apparently the game continuously tried spawning a rift nearby, but the Nightwatcher prevented it. But then it kept occuring over and over until it crashed the server. Is this an issue on your end? Or does changing rift spawning behaviour from using Temporal Tempest cause this? Who should I talk to about fixing it?
Me again with another idea, though this one is... maybe more useful and less silly? Maybe?
Would it be possible to have more than one recipe for the Nightwatcher so that we could set different recipes to block different entities? Ex. Recipe 1 blocks entities a, b, c, and d; Recipe 2 blocks a, c, d, and e, but NOT b?
Strange as it may sound, I want to block some animals from spawning inside of my farm, but I don't mind if Drifters spawn inside of it.
You can shrink the radius of the NightWatcher using the config file watcher_config to test your pack.
I disagree wholeheartedly, enemies spawning outside a protected zone and attacking in is EXACTLY the behavior I want. I am trying to develop a modpack that resembles 7 days to die, and that requires being able to "clear territory" of enemies so that they have to attack from OUTSIDE your controlled territory. Pairing this with Temporal Tempest mod can potentially create the gameplay I am looking for. Plus I use the Bed Spawning mod, which reduces the uses of the Temporal gear, so having them be used for creating these is ideal. The fact the Nightwatcher is an "entity" is also good, because then that hopefully means that hostile mobs could see it as an attackable entity and possibly try to destroy it in order to allow more hostile mobs to spawn deeper within a player controlled territory. There is a LOT of potential here.
As for being able to see the range, that is unfourtunate. How else would someone effectively tell if what they are trying to protect is protected? other than waiting for enemies to spawn.
I havent really used any of the "land claim" mods as they dont explicitly state that it stops enemy mobs from spawning within the territory. If they do I may switch. But for now I am likely to remove the plate entirely and simply reduce the effective range of the nightwatcher, to make it something you have to gradually build up a "controlled territory".
Smaller radius would be largely ineffectual as anything that spawns would automatically target you. So an entity would spawn outside a range of, say 32, target you and attack thus making the closer spawn block irrelevant. The gold plate was used precisely because it is difficult to get, I don't think this is something you should have access to early. You have to go through some tough times to truly enjoy the good ones. :) But as always, you can create a patch mod to edit the values and recipe and I included a config you can use to further customize it.
Rendering the radius of this thing would literally destroy your FPS, it's a sphere 128 blocks in radius, it's massive, default radius of 128, it would have to highlight 206000 blocks at a minimum.
Fine mod, kind of a lite-land claim system. However I find the gold plates to be far too restrictive, I would LOVE if you would add different nightwatchers that have different radius based on the plate theyre on. Copper plated nightwatchers could have a much smaller radius but be far more accessible.
Also, being able to SEE the exact radius of protection would be incredibly useful, thanks!
I currently don't clamp the radius value, odd. Might have unknown behavior if extremely large values are used for the radius.
Hello, I wanted to know what is the maximum radius of the night watcher? Does it depend on the Chunks loading range in the game?
Never enough features.
I know this is a completely impractical suggestion, but the idea of being able to make a version of the Night Watcher that is tiny and functions like the other ¼ block objects sounds REALLY funny and cute. Like... The Night (stand) Watcher.
Or a version of the full size/mini Watcher that also functions as a lantern.
Tbh, being able to generally customize them— idk, dyeing them, or putting clothes on them— is way more appealing to me than it should be. I know that those are some hugely impractical ideas, so I'm more just letting you know that I am, apparently, weirdly attached to them.
That said, on an actually relevant/mechanical side of things, allowing Temporal Storms to overwrite some/all blacklisted spawns would be interesting. I guess if would be something like a "Temporal Storm Whitelist"? "If weather= Temporal storm, then allow: (insert whatever entities/rifts.)"? So you could have Temporal Storms only overwrite the ability for rifts and/or drifters to spawn but not allow wolves to spawn (can they even spawn in a TS...?) Or have it where they just completely nullify the little buddy.
Anyway, thank you for the mod!
Check your config file and make sure "wolf" is part of the list.
Outside of that, the game could be spawning them outside of the event call-back function and completely by-passing the system.
This does not appear to be working in 1.20.4 (at least its not preventing wolf spawns in our spawn area, i placed like 20 around the area.)
no errors to speak of, just figured i would let you know >.<
Thank you very much for all of the updates, Buggi!
Updated, enjoy!
Just updated the Angel Belt, this is next on the list!
Hi Buggi
Loving the Nightwatcher mod, it is allowing builds that can use light and shadow as building materials without having to worry about unwelcome guests.
As 1.20.3 stable is now out, do you have any idea of when we can expect an update, as I am waiting on this mod as well as a couple of other to update so we can migrate our server.
Thanks
Cid
Yep, waiting on a stable version to update, and it's the holidays so the timing is not great with family events and everything.
Would love to see an update to 1.20!
Love this mod! A note for fellow users is to try to remember how realistic Vintage Story's ecosystem strives to be - a lacking of wolves in the area has quickly led to an antlike overabundance of hares swarming my house, so you might have to be prepared to add multiple animals to the block list until you're essentially pausing the food chain in that radius xD
(Also wanted to thank you for not giving the Night Watcher the tendency to migrate like most of the other dummy(?)-based items seem to do. It's annoying enough trying to keep my scarecrow near the garden it's supposed to be protecting; I can't imagine needing to track these guys down!)
Very cool work, thank you!!
Circle
Calculation is based on distance between the entity and the nightwatcher, essentially a bubble around it.
Love this mod, couldn't play without it. A question, though: Is the protected area a circle or a square? I'd been assuming it was a 256x256 square, but someone pointed out to me that "radius" might imply a circle, in which case the protected area is smaller than I realized and I'll need to adjust their position to ensure coverage. Thanks!
version 2.0 now includes the feature I've wanted to do for awhile, and that's the ability to also block Rifts from spawning in the EffectRadius of the NightWatcher.
Make sure to delete your old watcher_config.json file in ModConfig to regenerate the default file. Sorry about this, for some reason the config loading process doesn't detect changes to variables, if someone knows how to do this please let me know.
@Kara
"Assembly with same name is already loaded" kind of gives it away there. Did you not delete the old version? The game does cache some data so that might be the issue.
And it'll only create the config file if the file is missing. This is purely base-game modding API I'm using, nothing special. watcher_config.json is the filename it creates.
Japanese translation is here.
https://ux.getuploader.com/VintageStory/download/21
Buggi
16.2.2024 19:05:04 [Error] [nightwatcher] An exception was thrown when trying to load assembly:
16.2.2024 19:05:04 [Error] [nightwatcher] Exception: Assembly with same name is already loaded
at System.Runtime.Loader.AssemblyLoadContext.g____PInvoke|5_0(IntPtr ptrNativeAssemblyBinder, UInt16* ilPath, UInt16* niPath, ObjectHandleOnStack retAssembly)
at System.Runtime.Loader.AssemblyLoadContext.LoadFromAssemblyPath(String assemblyPath)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at Vintagestory.Common.ModAssemblyLoader.LoadFrom(String path) in VintagestoryLib\Common\API\ModAssemblyLoader.cs:line 34
at Vintagestory.Common.ModContainer.<>c__DisplayClass35_0.b__0(String path) in VintagestoryLib\Common\API\ModContainer.cs:line 449
at System.Linq.Enumerable.SelectListIterator`2.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.ToList()
at Vintagestory.Common.ModContainer.LoadAssembly(ModCompilationContext compilationContext, ModAssemblyLoader loader) in VintagestoryLib\Common\API\ModContainer.cs:line 448
It also appears to not be creating a config file via single player.
Edit: by deleting ALLL of my moddata files, it seems to have fixed this issue. that being said, im not sure which file was for your mod and deleting them all on a server is not an option =P.
Thanks for reporting the issue! All should be fixed now! <3
Will investigate! Thanks for reporting!
ASkeleton Our server is experiancing the same issue. i think we are going to revert back to v1.5.0 (1.18.5) as it worked just fine in 1.19. Buggi
It doesn't seem to be stopping the drifters from spawning at all. Am I missing something?
Instantly downloading this, for our server <3. love everything you do =D
Just Updated:
MAJOR FEATURE - Now can block ANY entity as long as you put the code part in the config.
"BlockCodes" is an array that defaults to this:
"BlockCodes": [
"drifter",
"bear",
"wolf"
],
All you need to do is add/remove the first code part of the entity you wish to block with the Nightwatcher.
This will still respect "BlockDuringStorm" and shut down all entity blocking during a Temporal Storm if this is false.
anyone know if this is working in 1.19?
Many thanks for the help fixing this! I've been extremely busy the last couple months so fell behind on updating all these.
Open nightwater.zip most updated > assets > game > shapes > Entity > Edit the nightwatcher.json file inside. replace the Textures into with what is provided. some of the directed texture's were changed for the strawdummy in vanilla. if the mod dev ever see's this, You are welcome.
SecretFoxfire
Thank you so much for this mod. Fair and balanced (gold is so hard to find!) but also really necessary for making areas habitable in the long-term.
I have noticed that the texture is broken on 1.18.5 though. It looks fine while carrying it around but once placed the poor thing's face is a question mark 😅
Updated to 1.18, and yes, now can prevent bear spawns.
Now there's bears? Do they really spawn frequently enough to justify adding them?
able to add bears? xD
would do it myself, but im not sure how to code yet D=
Updated to 1.17
Added config option for Blocking Wolves
Added config option for Blocking Drifters (So you can JUST block wolves if you want)..
Added config option to control blocking of drifters during temporal storms.
How about a nightwatcher addon that disables wolf spawns?
While it could be done, you can already tweak the radius by editing the watcher_config.json. I didn't want to be able to craft this too early as the early game should be harder.
Very Nice! This is almost the exact mod i was looking for. Dont suppose you could make different tiers?
Copper:
Does a 32 block area.
Bronze:
Does a 64 block area.
Iron:
Does a 128 block area.
Steel:
Does a 256 block area.
Steel, Gold and Temporal Gears:
Does a 512 block area.