Mods / BedSpawn
- Tags:
- Author:
- ilan
- Side:
- Both
- Created:
- Jun 14th 2024 at 6:15 AM
- Last modified:
- Jun 17th at 5:53 AM
- Downloads:
- 310257
-
Latest release (for Vintage Story 1.22.0 - 1.22.3, potentially outdated):
bedspawnv2_1.7.1.zip 1-click install
A simple mod that sets your spawn point when you use a bed. The spawn point is reset when the bed is destroyed.
Includes a command called /set-fatigue to allow you to set your player's "tiredness" (requires admin).
Configuration
The configuration file is located at <data>/ModConfig/BedSpawn.json
{
// A list of blacklisted bed codes that won't set your spawn.
// Useful if you want to take a hay bed for exploration, for example. In that case, the value should look like:
// ["bed-hay"]
"BlacklistedBeds": [],
// If true, will only set the spawn if the player is sneaking when using the bed
"RequireSneaking": false,
"Rooms": {
// If true, will require the bed to be in a valid room to set your spawn
"Enabled": false,
// A list of bed codes that will set your spawn that ignore the room requirement
"BedsThatDontRequireRooms": []
},
// If true, will tell you in chat why the bed isn't setting your spawn
"EnableDebugMessages": true,
// If true, you will be notified when you respawn and your bed's been destroyed
"NotifyPlayerOnBedDestroyed": false,
// If true, requires the bed to be above sea level to set your spawn
"DisableBelowSeaLevel": true,
"Cooldown": {
// If true, will force you to wait before you can set your spawn again
"Enabled": true,
// The number of days you have to wait before you can set your spawn again. Can be fractional i.e. 0.5 = half a day
"CooldownDays": 0.5
}
}
| Mod Version | Mod Identifier | For Game version | Downloads | Released | Changelog | Download | 1-click mod install* |
|---|---|---|---|---|---|---|---|
| 1.7.1 | bedspawnv2 | 58594 | Jun 17th at 5:53 AM | bedspawnv2_1.7.1.zip | 1-click install | ||
|
Prevent crashes if mod config load fails (usually thanks to autoconfiglib) | |||||||
| 1.7.0 | bedspawnv2 | 30811 | May 11th at 2:39 PM | bedspawnv2_1.7.0.zip | 1-click install | ||
|
Updated for 1.22 | |||||||
| 1.6.4 | bedspawnv2 | 114525 | Oct 8th 2025 at 9:27 AM | bedspawnv2_1.6.4.zip | 1-click install | ||
|
Unpatch only BedSpawn patches when mod is disposed | |||||||
| 1.6.3 | bedspawnv2 | 134 | Oct 8th 2025 at 9:22 AM | bedspawnv2_1.6.3.zip | 1-click install | ||
|
Added russian translation (thanks Qua8ion!) | |||||||
| 1.6.2 | bedspawnv2 | 22708 | Sep 14th 2025 at 5:15 AM | bedspawnv2_1.6.2.zip | 1-click install | ||
|
Changed target game version to 1.21.0 | |||||||
| 1.6.1 | bedspawnv2 | 1216 | Sep 13th 2025 at 4:43 PM | bedspawnv2_1.6.1.zip | 1-click install | ||
| |||||||
| 1.6.0 | bedspawnv2 | 690 | Sep 13th 2025 at 10:33 AM | bedspawnv2_1.6.0.zip | 1-click install | ||
| |||||||
| 1.5.0 | bedspawnv2 | 6074 | Sep 9th 2025 at 11:43 AM | bedspawnv2_1.5.0.zip | 1-click install | ||
|
Updated to 1.21.1 | |||||||
| 1.4.0 | bedspawnv2 | 58041 | Jan 26th 2025 at 9:08 AM | bedspawnv2_1.4.0.zip | 1-click install | ||
|
Updated target game version to 1.20.3 | |||||||
| 1.3.0 | bedspawnv2 | 7228 | Nov 18th 2024 at 4:10 PM | bedspawnv2_1.3.0.zip | 1-click install | ||
|
Added config option for only setting spawn while sneaking | |||||||
| 1.2.0 | bedspawnv2 | 9420 | Jun 15th 2024 at 9:14 PM | bedspawnv2_1.2.0.zip | 1-click install | ||
|
Fix localization issue, fix crash when breaking beds | |||||||
| 1.1.0 | bedspawnv2 | 310 | Jun 15th 2024 at 3:03 PM | bedspawnv2_1.1.0.zip | 1-click install | ||
|
Added configuration option to blacklist bed types from being used as spawn points as suggested by CKitt | |||||||
| 1.0.0 | bedspawnv2 | 506 | Jun 14th 2024 at 7:56 AM | bedspawnv2_1.0.0.zip | 1-click install | ||
|
Initial release | |||||||
If I enable Rooms, is that a requirement to set the spawn point when sleeping, or a requirement when dying to ensure the bed is in a room to be elegible? Or both?
The mod sets your spawn (same as using a temporal gear) when you use a bed, so the former
I see, thanks!
is there any way you could make this compatible with the decorative bed from chiseltools? I want to make a custom bed but i want it to be my spawn point :/
As long as they use the BlockBed base class this mod will work fine with it
it doesn't work, so should I message the chiseltools modder about it then?
yes π
I love this mod, it really is a must-have. Is there any way you could make it compatible with Double Beds?
Looks like they made it compatible already :)
Yessss bro. My life blood <3 <3
;)
Mod looks absolutely great! Though, may a suggest an additional config option? It would be great help for a server I'm working on with friends.
Durability use per respawn, with 0 being default. I was thinking if it could have another config for using temp gears, but I feel like that's a whole different can of worms...
crash when trying to set spawn in bed.
looks like it some wacky code at line 115 in bedspawnsystem.cs or maybe config was not made?
version 1.22.3
You probably have autoconfiglib installed, which changes how the game creates/loads configs. Remove it and it'll work just fine :)
I do but I need it for other things in my modpack. can i temporarily unistall it then load a bedspawn config then reinstall autoconfiglib?
That wouldn't work, as mod configs are loaded every time you load up a world. I released a new version just now (1.7.1) that should prevent crashes, but it's just a bandaid.. since autoconfiglib literally changes/breaks how mod configs are loaded, the best I could do is use a default config if loading the config fails
gotcha I turned off autoconfiglib for now.
Hello! Any idea why, in 1.22.2, I set my spawn to my bed and occasionally when I die I respawn in place?
Some friends and I are also experiencing this issue
Dunno, this mod only sets your spawn like a temporal gear. You probably have a different mod that changes the respawn location?
Hey! Thanks for this mod! It's so simple, but so useful.
radarcg Just tested, seems to work fine.
That seems odd. It should not, as 1.21 and 1.22 are different .net versions, requiring all mods to be recompiled.
net10 can run net8 code
does it work on 1.22?
Aekiel
Once a stable build is out, sure
port to 1.22 planed?
Has the mod been broken by the new update ? it doesnt seem like they changed anything relating to beds or respawns
Is it possible to add the option to add a spawn cool down so say you die respawn and you can not respawn for 1 hour irl time etc?
Could you add an option that makes me spawn in a radius, as dictated by world config? This way, i won't nescessarily spawn in my base, but it won't be completely over if i moved away from worlrdspawn.
Does this work with 1.21.6?
(Edit) It does work. I do not know how or why but it does please update the info ASAP for others.
limpjellyfish Thank you!
Does anyone know if this works for 1.21.5?
Edit: It does indeed!
Darcy you can enable the debug view from the settings (under developer options I believe), then you can see the code of each item in-game, similar to Minecraft's "advanced tooltips"
Has anyone been able to blacklist the fur roll bed from Kevin's Furniture? I've been able to blacklist the vanilla hay bed and the thatch bed (ingame called "straw bed") from Art of Growing, but I can't seem to figure out the proper code name for the fur roll. Here's what my configs look like currently - I already tried just "furroll" and that didn't work either. I've also included the .json file of the furroll from the mod. Thanks for any help.
"BlacklistedBeds": [
"bed-hay",
"bed-thatch",
"bed-furroll",
],
"RequireSneaking": false,
"Rooms": {
"Enabled": true,
"BedsThatDontRequireRooms": []
},
"EnableDebugMessages": true,
"NotifyPlayerOnBedDestroyed": true,
"DisableBelowSeaLevel": true,
"Cooldown": {
"Enabled": true,
"CooldownDays": 1.0
}
}
Tvrdii the mod sets the spawn in the same way a temporal gear does - so unfortunately it's not possible in this mod
There might be a different mod that does that for you - I know there's at least one that "keeps" your hunger after you die to avoid cheesing
is there a way to make it so if the player dies from hunger it doesnt respawn him on the bed but at world spawn? as to remove the cheese of not having it eat
Aceolu this mod works with any bed that extends BlockBed i.e. any regular bed
not sure what that mod does but if it's not implementing beds "the regular way" then yeah this mod wont work with that
Does not work with the decorative beds from QP's Chisel Tools
Huh, weird. π€
Mrozak can you share your save, mods, and modconfigs folder? I'll try to reproduce the issue
JohnCuttler but we are not using AutoConfigLib :-(
JohnCuttler
No clue why that mod causes such issues with loading mod configs, but a ton of people have complained about it
I can confirm, the issues Necromunger & Mrozak reported are caused by AutoConfigLib being present. Removing the latter fixed the issue for me.
qlVegetalp can you share your config?
iLorde will fix
[Warning] Harmony instance "bedspawn" attempted to run UnpatchAll() with no arguments. This normally unpatches all mods, including EMTK, instead of just the harmony instance itself. Please notify the mod author to use UnpatchAll("bedspawn") instead.
- EarlyModToolKit warning.
so i tried to disable the hay beds but they still work i think my whole config is glitched because cooldown isnt working either
qlVegetalp try enabling debug messages in the mod config - they will tell you if you're not meeting a certain condition
i cant get the hay beds not working as spawn points im not sure what im doing wrong
ilan i am not aware of any mods that would add "fake players" or something that could result in invalid players.
Only thing that comes to my mind is a player who left and thusly their player data got wiped from server - which occasionally happens, and did happen roughly around the time these crashes started, but i don't have the exact timeline.
Here is a list of mods we currently use (categories some mods are under on this list, are not always same as on the ModDB):
Cosmetics / Crafting
- Banners
- Custom Flowerpots
- Plumpkins
- Reforged Tools
- Tabards
- Tabards Emblems
Crafting / Furniture
- Braziers
- CartwrightΒ΄s Caravan
- Medieval expansion patch
- More Torch Holders
- Stone Railings
- Tankards and Goblets
- Vintage Scarecrows
Library
- Common lib
- Config lib
- ImGui
Quality of Life
- Auto Map Markers
- BedSpawn
- Carry On
- From Golden Combs
- Prospect Together
- Shelf Obsessed
- Simple HUD Clock Patch
- Simple Pottery Wheel
- StepUp (continued)
- Zoom Button - Reborn
Technology
- Millwright
- Primitive Survival
- Translocator Engineering - Redux
Utility
- Notice Board
- QP's Chisel Tools
- RP Voice Chat
- Stone Quarry
Weapons
- Attribute Rendering Library
- Combat Overhaul (disable Immersive First person Mode in your game settings!)
- Combat Overhaul Armory
- Crossbows
- Firearms (unsure if we keep it, if yes, we will have to tweak it somewhat)
- Overhaul lib
- Quivers And Sheaths
World Generation
- Better Ruins
- Better Traders
- Fields and Plateaus
- Plains and Valleys
- Rivers
Mrozak that crash comes from the game's code itself - all this mod does is ask for the players that have the spawn position of the bed. Do you have any other mods that add "fake players" or something that could add invalid players?
Necromunger Yes, it's a built-in game mechanic: https://wiki.vintagestory.at/Room
Hello ilan, I was just curious for the config.
What exactly is a valid room? is this like a cellar rules of not being too large?
Me and others on our server crash when destroying any kind of bed (non-clutter).
We are on 1.21.1, using version 1.6.2 of this mod.
Was able to resolve our issue thankyou Ilan.
Gelan you can use 1.4.0
Necromunger do you have AutoConfigLib installed (or another mod that modifies config loading)? The error is thrown because the mod config wasn't loaded
Hello, recently started using this mod (v1.6.2) on our server and we get this crash. We are running server on 1.21.1
ilan I am playing on 1.20.12 and not planning on updating anytime soon. Which mod file should I use?
amaranthinos try 1.6.2 - I changed the minimum version to 1.21.0 instead of 1.21.1
It's giving an issue with being on 1.21.0 π Under modmanager, it says "Unable to load mod. Requires dependency game v1.21.1"
anonowo Great ideas! I implemented both in 1.6.1 :)
Any chance for an option to check the world height of the bed, to prevent setting respawn inside dungeons and caves?
Or maybe a limit on how often players can move their respawn point? To prevent abuse of the mechanic by carrying a bed with you to dangerous locations for easy nearby respawns.
DesolateRose Tyrnn it should be compatible with 1.21, the logic shouldn't have changed
eerino the files dont have a 1.21.0 version. You can only go back to 1.20
DesolateRose, click "Files" above (next to "Description," above the photo.) All older release are there and always available. (:
hey this requires 1.21.1 is it posible for you to port a version back to 1.21?
cottageCryptid I uploaded a version that is built for 1.21.1 so there shouldn't be any problems
StrawberrySoda really?? it hasn't worked for me since the update :')
StrawberrySoda ty for testing π
After testing it in 1.21, this mod still thankfully works!
Will this mod be updated for 1.21?
eerino that's just a debug log, unrelated to the crash. crash logs usually start with "error"
DrakenRolle this mod does not affect the game world in any way, other than setting the player's respawn point (which can be overridden with a temporal gear)
Aleczolotl are you using Auto Config Lib or some other mod that changes how mod configs work?
Just crashed and the server debug log's last log was
"[Debug] [bedspawnv2] Found 0 players with spawn point set to removed bed at 511725, 129, 511721, clearing spawn position for these players"
Hey a friendly reminder, that if you add this mod. The gameworld resets itself wouldve been nice....
For some reason whenever i change the config for blacklisting a bed, it just resets and doesnt save no matter what i do
The first mod I searched for!
Confirmed: Works fine with 1.20.11 (only tested in singleplayer)
Thank you for the mod!
May I ask for a feature request? I would like to see a configurable time in the configuration file for how much time must pass to reset your spawn point with a bed again. Maybe every x days, or once a month. Not sure how easy it is to persist state in Vintage Story mods. The idea is to prevent me from abusing bed respawns. Even if I don't abuse it, the knowledge of being able to use it all the time breaks my survival immersion.
So I am conflicted, I love the bed respawns, but it is so easy to abuse it. I think a time constraint would be a great addition.
Spiridon I haven't tested it personally but it should!
does this work on 1.20.9?
Drew_555 all beds work by default, did you install the mod correctly?
hey im new to modded vs me and a few mates set up a server and are using this mod but they hay beds seem to not be working on default is that intended and we need to make a wooden one or is somthing wrong with our session
seems to be working in 1.20.6
diegokilla Yeah, the code that resets your spawn point when the bed is destroyed is in the mod. Remove the mod, and your spawn is no longer reset. You will need to use a temporal gear to set your spawn location.
jabes I haven't tested it, but it should work fine.
Working on 1.20.4?
So we had this mod on our server and took it off, but I continually spawn where my bed was, even if I destroy the bed. I also tried setting the temporalgearrespawn(whatever that command is) to zero and I'm still just respawning where my bed was. Any thoughts? (server spawn is not set where my bed was obviously XD )
DecaByte Sure, I can probably add a configuration option to change the button
I found that I accidentally will hit shift-click on beds. Could you add a config so I can change the key or Ctrl-click instead? That would be helpful.
Arthemy
Kutaras
Can you share some logs? I've tested with 1.20.3 and it works fine, it could be a game bug in 1.20.1
CKitt
That's really nice to hear, glad you're enjoying the mod! π
ilan
I do have AutoConfigLib installed, but there had been no errors prior to this mod being installed. I've disabled AutoConfigLib for now, your mod is more important!
Don't know what sorcery people did to say it works on 1.20.1 for me it doesn't, it throws an exception and blocks me there π.
Just play on 1.20.3 it works there πͺπ
1.19.8 version does not work with 1.20.1 ππ¨βπ¨βπ¦βπ¦π³οΈβπ
CKitt
Did you update/install AutoConfigLib by any chance? Or did it start happening with this latest version?
In any case, the error is coming from AutoConfigLib's code π
Edit: Yep, after testing myself with my mods and AutoConfigLib, it appears that mod has some issues:
27.1.2025 09:52:54 [Client Error] Failed to load AutoConfigLibConfig.json using default, exception: System.NullReferenceException: Object reference not set to an instance of an object.
at AutoConfigLib.Auto.AutoConfigGenerator.RegisterOrCollectConfigFile[T](ICoreAPI api, String configPath, T configValue) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\Auto\AutoConfigGenerator.cs:line 24
at AutoConfigLib.AutoConfigLibModSystem.StartPre(ICoreAPI api) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\AutoConfigLibModSystem.cs:line 58
Thank you! Always a pleasure to have this mod running on my server.
Edit: Uh-oh! I'm not quite sure what's going on here. Incompatibility with AutoConfig?
26.1.2025 09:38:18 [Error] [bedspawnv2] An exception was thrown when trying to start the mod:
26.1.2025 09:38:18 [Error] [bedspawnv2] Exception: Object reference not set to an instance of an object.
at AutoConfigLib.Auto.AutoConfigGenerator.RegisterOrCollectConfigFile[T](ICoreAPI api, String configPath, T configValue) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\Auto\AutoConfigGenerator.cs:line 24
at AutoConfigLib.HarmonyPatches.ConfigInterception.GetConfigOverride[T](ICoreAPICommon api, String fileName) in D:\Modding\VintageStory\AutoConfigLib\AutoConfigLib\HarmonyPatches\ConfigInterception.cs:line 48
at BedSpawn.Configuration.ModConfig.ReadConfig(ICoreAPI api) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\Configuration\ModConfig.cs:line 30
at BedSpawn.BedSpawnModSystem.Start(ICoreAPI api) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\BedSpawnModSystem.cs:line 25
at Vintagestory.Common.ModLoader.TryRunModPhase(Mod mod, ModSystem system, ICoreAPI api, ModRunPhase phase) in VintagestoryLib\Common\API\ModLoader.cs:line 629
26.1.2025 09:38:18 [Error] Failed to run mod phase Start for mod BedSpawn.BedSpawnModSystem
I updated the mod for 1.20.3, but there are no real code changes (just changed the game version)
For those wondering if this mod still works as of 1.20.1
Yes, it still works, tested it and had no issues after 30+ Hours
Are you working on an update for 1.20? please
Isochronous
Didn't use the mod yet so not fully sure, but basing on how other mod configs work you have to go to C:\Users\[Username]\AppData\Roaming\VintagestoryData\ModConfig
and find the config file for this mod, and editting it by openning it in notepad (or other text editor) and looking for the "RequireSneaking:false," and change the false to true or BlacklistedBeds and add the ["bed-hay"] after it.
hello :) im brand new to the game and have no idea how to edit the banlist/have sneak enable setting spawn. Could anyone help me please :) TYIA
Edit:: I guess im actually asking how to set the configurations? :)
"Good idea! I've gone ahead and added that :) "
EPIC, ty so much!
ilan
Hi o/ 1.20 update?
Xiarno BulletJustice
Good idea! I've gone ahead and added that :)
I agree with BulletJustice. Having "Hold sneak when using bed to set spawn" makes a lot of sense. A config to allow that would be really appreciated if possible!
Would it be possible to make it so you can toggle on/off the function via a keybind on client side? blacklisting a bed just doesnt really cut it when there is gate-keeping in progression to what bed you have available. Making a keybind "hold shift when using bed to set spawn" just makes more sense to me, if that would be possible?
Omikronlex
The mod config folder is under the %APPDATA%\VintagestoryData\ModConfig folder in Windows.
Where would I find the mod settings or the configuration file to blacklist beds?
Hi there,
There isn't any command to disable the respawn mechanic as the mod uses the vanilla spawn point system to change your spawn point.
However, you can use the "blacklisted beds" configuration in the mod settings to blacklist the hay bed, for example, so you can use a hay bed during your travels, and use a regular wooden bed at home to set your spawn point.
Hi there!
Could anyone tell me if there is a command or key combination to disable the spawn set so I can use another bed while exploring without resetting the spawnpoint?
Any bed that implements `BlockBed` will work, but looking at the code for the "storage bed" in Vies Blocks, it seems that they do not.
I could probably add some kind of whitelist for non-bed blocks..
Is there a way to allow for modded beds to set spawn? We are using Vies Blocks in our server and they add storage beds that function as both storage, and beds (hence the name) with a couple other functions. There is a large amount of the beds so would something in the config be able to be modified or a whitelist that will force a bed to allow spawn being set?
Thanks for the kind words :) And I'm glad that 1.2.0 works!
I'll give it a try today! For what it's worth, 1.0.0 was working great during half a dozen hours of multiplayer.
Edit: After the usual tests, no issues at all, zero errors. I think 1.2.0 is the ticket!
Oh, sorry about that. I thought I could mark the mod as server-only but it seems that makes the localizations not load in the client (and an oversight in the code made it throw an NPE..)
1.2.0 published with the fixes π
Interesting, after adding the hay bed (and thank you for not making it where I had to add head/foot N/E/W/S individually) and laying in a hay bed, I get the following message:
bedspawn:msgSpawnSet
Subsequently destroying the hay bed crashes the game.
Edit: In fact, all beds now have that behavior, even while leaving the blacklist blank. I hope my suggestion didn't just ruin your mod, as v1.0.0 worked perfectly!
Edit 2: The relevant portion of the error log follows.
System.NullReferenceException: Object reference not set to an instance of an object.
at BedSpawn.Patches.BedRemovedPatch.Postfix(BlockBed __instance, IWorldAccessor world, BlockPos pos) in D:\Code\VintageStory\VSMods\src\BedSpawn\BedSpawn\Patches\BedRemovedPatch.cs:line 21
π
Awesome, that was very speedy. Thank you!
Glad to help :) I just added the feature you suggested, gonna update the docs now
Excellent, thanks for clarifying and for offering up the source. I always like taking a peek at what mods are actually doing!
You can check out the source code in the GitHub repo here: https://github.com/Ilan321/VSMods/tree/master/src/BedSpawn
This mod works with any bed that extends `BlockBed`, which is every bed in the vanilla game (that you can sleep in).
Great suggestion, I will add that :)
I have a perhaps stupid question, as I can't open the .dll to check for myself: does the type of bed matter? Would I be able to use this with hay beds, aged beds, regular beds, and Vanilla Variants beds alike? Thanks!
Edit: Question answered via a creative world and the included /set-fatigue command. All bed variants work as intended. Excellent mod, thank you for that! In the future, if possible, it might be worthwhile to include a config file to allow for enabling/disabling specific beds. As an example, with an older bed spawner mod I'd disable hay beds and use those for long-distance exploration.
π
Thank god. Exactly what I needed.