Mods / TentBag

Category: #Cheat #Crafting #QoL #Storage
Author: BillyGalbreath
Side: Both
Created: Jan 24th at 2:09 AM
Last modified: 6 days ago
Downloads: 6653
Follow Unfollow 92

Latest file for Various v1.19.x:
TentBag-2.1.1.zip 1-click install


I took the tentbag from jakecool19's Useful Stuff and made it better.

 

-------------------------------------------------------------------------------------------------------------

 

Changes I've made:

  • changed the model to the unused bag-roll item instead of a linen sack
  • changed the recipe so it does not conflict with Useful Stuff's version (check handbook, you can have both installed at same time)
  • option of requiring solid ground/floor or not
  • replacing plants and rocks instead of having to clear out an area
  • placing the tentbag back into your inventory after use so you dont end up forgetting to pick it back up and it despawns into the abyss
  • moved all operations to server side to prevent client-prediction desyncs
  • various other code optimizations

 

-------------------------------------------------------------------------------------------------------------

 

Config options in %appdata%/VintagestoryData/ModConfig/tentbag.json

{
  "radius": 3,
  "height": 7,
  "buildEffort": 0.0,
  "requireFloor": false,
  "replacePlantsAndRocks": true,
  "putTentInInventoryOnUse": true,
  "highlightErrorColor": "#2FFF0000",
  "bannedBlocks": [
    "game:log-grown-*",
    "game:log-resin-*",
    "game:log-resinharvested-*",
    "game:statictranslocator-*",
    "game:teleporterbase",
    "game:crop-*",
    "game:herb-*",
    "game:mushroom-*",
    "game:smallberrybush-*",
    "game:bigberrybush-*",
    "game:water-*",
    "game:lava-*",
    "game:farmland-*",
    "game:rawclay-*",
    "game:peat-*",
    "game:rock-*",
    "game:ore-*",
    "game:crock-burned-*",
    "game:bowl-meal",
    "game:claypot-cooked",
    "game:anvil-*",
    "game:forge"
  ]
}

The mod will automagically reload the config when you save the modified file.

 

-------------------------------------------------------------------------------------------------------------

 

So what even is a tentbag?

Seems some people are not familiar with this mechanism, so I'll try to explain. A tentbag is an item that can hold a player made structure (within reason, illegal blocks listed below). The default config allows for a 3 block radius and a 7 block high area to be used, which makes a max of 7x7x7 in the world that is centered on the block clicked as the floor. The floor is not included.

I don't think my description does it justice, so here's a short video of me unpacking and packing one of my tentbags (this one is mostly full of trunks to collect stuff while exploring ruins).

 

-------------------------------------------------------------------------------------------------------------

 

Here is the list of illegal blocks that cannot be packed into a tentbag.

  • game:log-grown-*
  • game:log-resin-*
  • game:log-resinharvested-*
  • game:statictranslocator-*
  • game:teleporterbase
  • game:crop-*
  • game:herb-*
  • game:mushroom-*
  • game:smallberrybush-*
  • game:bigberrybush-*
  • game:water-*
  • game:lava-*
  • game:farmland-*
  • game:rawclay-*
  • game:peat-*
  • game:rock-*
  • game:ore-*
  • game:crock-burned-*
  • game:bowl-meal
  • game:claypot-cooked
  • game:anvil-*
  • game:forge

This is the banned list from the original mod. I have no idea if there is a technical reason for them to be illegal. I do plan to make this list configurable, eventually.

Update: This list is now configurable in 2.1.0 and above

 

-------------------------------------------------------------------------------------------------------------

 

Remember, I build these mods for myself and my family. Not you. I owe you nothing. I just like sharing what I've built with others for free. You will receive minimal to no support when using any of my mods.

 

-------------------------------------------------------------------------------------------------------------

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v2.1.1 361 6 days ago Show TentBag-2.1.1.zip Install now
v2.1.0 430 Jul 11th at 12:46 AM Show TentBag-2.1.0.zip Install now
v2.0.0 1084 Jun 12th at 10:33 PM Show TentBag-2.0.0.zip Install now
v1.1.2 2038 Mar 29th at 2:47 PM Show TentBag-1.1.2.zip Install now
v1.1.1 1282 Feb 16th at 9:48 AM Show TentBag-1.1.1.zip Install now
v1.1.0 449 Feb 7th at 10:50 PM Show TentBag-1.1.0.zip Install now
v1.0.3 440 Jan 29th at 11:44 PM Show TentBag-1.0.3.zip Install now
v1.0.2 371 Jan 24th at 6:53 PM Show TentBag-1.0.2.zip Install now
v1.0.1 92 Jan 24th at 4:52 PM Show TentBag-1.0.1.zip Install now
v1.0.0 106 Jan 24th at 2:13 AM Show TentBag-1.0.0.zip Install now

42 Comments (oldest first | newest first)

💬 Maamessu, 6 days ago

Appreciate the fix!

💬 BillyGalbreathAuthor, 6 days ago

ImNuts42 from Discord (idk who to tag here on moddb) was able to pinpoint the exact cause for the decor duplication issues DanaCraluminum

💬 DanaCraluminum, 6 days ago

Maamessu BillyGalbreath SpearAndFang 

My Dana Tweaks mod doesn't affect TentBag in any way, so if it also happens with vanilla linen, then it is vanilla bug

💬 DanaCraluminum, 6 days ago

I found a critical bug in the mod, you can dupe linen when it is placed as decor

💬 BillyGalbreathAuthor, Jul 14th at 1:40 AM

Tyllandian

What? No. In fact, it's even more editable than the yaml was. I added the highlight color and the banned blocks list to it. Just open the json file and edit the values, just like you did for the yaml file.

💬 Tyllandian, Jul 13th at 10:28 PM

Does the change in file type mean it is no longer editable? The file in the modconfig folder is a .json. I ask because my save was built around a mobile base that isnt all that mobile anymore x.x

BillyGalbreath

💬 BillyGalbreathAuthor, Jul 13th at 8:43 PM

Sorry about that, Tyllandian. Starting with v2.0.0 I changed the config from YAML to JSON, so the new file would be tentbag.json

💬 Tyllandian, Jul 13th at 3:10 PM

Since new update, modifying the config to increase the size does not seem to work. Any idea why this might be?

💬 Maamessu, Jun 25th at 2:57 AM

Interesting. I do I have DanaTweaks installed, and I actually went into it's config first thing after experiancing this to disable the drop tweaks. Unfortunately it seems that even with them disabled, the tent is still affected. I'll confirm if it is that, and if it is, maybe Dana will look into it! Thanks.

💬 SpearAndFang, Jun 24th at 10:13 PM

Maamessu
Do you have a mod called "Dana Tweaks"? Because it alters decor drops. And maybe you can disable it in that mod to fix this issue.

💬 BillyGalbreathAuthor, Jun 24th at 9:40 PM

Maamessu This has been reported to me, and I am unable to reproduce this behavior. Here's a video of me testing with wallpapers that was reported to me on a CoB servers https://www.youtube.com/watch?v=6_G1VuCdQ50 We came to the conclusion that it must be an incompatibility with another mod, but we don't know what. Either way, it's nothing on my end.

💬 Maamessu, Jun 24th at 7:56 PM

Wanted to report a dupe problem with the tent bag. Any surface attachable blocks such as vines, rush mats, carpets, wallpaper, etc, will "explode" out of the structure when packed into a tent bag, dropping all over the ground. The things is, when you next unpack the tent bag, those items will still be attached to where they should be in the strucutre... So my wallpaper lined support beam still has wallpaper on it. Basicaly, every time the tent bag is packed up, those blocks duplicate by both going inside the tent bag and also dropping to the ground.

💬 BillyGalbreathAuthor, Jun 19th at 12:33 AM

Oh, this was fixed a week ago Flufee. Only took me a few minutes once I was made aware of it. ;)

💬 Flufee, Jun 18th at 4:49 PM

BillyGalbreath Hey Billy. Love your work. Keep in mind that currently this does not seem to happen with any other mod (for anyone else wondering, there is nothing wrong with Billy's mod, just mere coincidence of choice of library), so only proceed if it's not too much hastle to replace any logic to be using a standard library. See you in the server, pal!

💬 Maamessu, Jun 17th at 6:25 PM

I'm not sure if this is intentional or not, but it seems that because there are only three dimensions specified (WxHxW), it is possible to actually dig out and have a 'basement' be packed up into the tent bag, as you can also go 'height' blocks down, not just up. Figured I'd report the behaviour just in case it was a bug. I'll also hand it to the player on my server for figuring it out!

(I'd also love to see that illegal block list become configurable one you get around to it. It'd be nice to blacklist containers, for example.)

💬 CKitt, Jun 13th at 12:18 PM

2.0.0 works as expected in an existing world, with my mod selection that was running fine with 1.1.2. I did nothing past swapping the mods out. Anyone wondering whether you can do the same, I wouldn't be concerned about any issues unless previous versions were causing you grief.

💬 BillyGalbreathAuthor, Jun 12th at 10:35 PM

Sorry about that, Flufee

I had no idea there was an assembly conflict with the yaml library. I'll be switching that out for the standard built-in json library in all my mods, starting with PlayerList and TentBag.

💬 Flufee, Jun 11th at 7:25 PM

Sorry im late, guys. I reuploaded the mod with the conflict with TentBag resolved:

mods.vintagestory.at/volumetricyamldotnetcompatibility

💬 Mendall, Jun 8th at 7:05 PM

yatsu you were correct I removed volumetric shading and removed its entry from cash folder now tent bag is working. Thanks again for the info. I'm going to post a link to this conversation to volumetric shading page, hope he can fix it.

💬 Mendall, Jun 6th at 4:52 PM

Thank you VERY much yatsu I do use volumetric shading, so I bet you hit the nail on the head, ill try what you posted and if it works will post back so others know. Also, might post to VS in hopes he can fix it on his end. I would hate to give VS up.

💬 yatsu, Jun 6th at 2:49 AM

Mendall , i had this problem too, in my case it turned out to be some kind of conflict with the Volumetric Shading mod. i'm assuming it has something to do with the fact that both mods have a yamldotnet dll file, but i'm not a modder, so i'm not sure. anyway, i deleted the volumetric shading mod from my mod folder, deleted my cache folder, and reloaded the game and the tent bag works now.

💬 Mendall, May 28th at 5:15 PM

Well if no one knows why this stopped working, ill go back to still useful stuff for now.

💬 Mendall, May 26th at 7:34 PM

When I first installed this mod it was there I checked, but when I finally got around to making one it has disappeared from my world altogether. No crafting recipe, no object in creative menu. Not even a config file (tentbag.yml) in the folder. The mod is in my mod folder, it's up-to-date, and I'm not using useful stuff. But the only mention of it I can find anywhere else is this error in the log files

 

   25.5.2024 11:27:10 [Error] [tentbag] An exception was thrown when trying to load assembly:
25.5.2024 11:27:10 [Error] [tentbag] 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 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 481.

 

 

 

Anyone know what this means or how I can fix this.

I reloaded a couple of times to make sure It's not just a fluke, and I uninstalled/reinstalled mod with no joy.

I'm not sure what else to do. I was looking forward to trying this.

💬 actuallyasriel, May 15th at 2:23 PM

I am not immune to advertising by shitty pun.

💬 Cursd, Apr 19th at 7:49 PM

im not entirely sure if its just this mod doing this, but thought id bring it to your attention. the doors arent stopping creatures from entering. tried all doors on home base and works fine. but when its on a structure i place with the tent bag. it acts like its there but not there. they do have a bit of pushback, but eventually phase thru it. also tried replacing doors after placing to see if it wasnt recognizing it and still creatures walk thru. again not entirely sure if its just this mod causing this. Great mod! great job!

💬 Daniel86268, Apr 19th at 2:16 PM

I love the idea of having the options of a portable base like this, at least until we get boats/airships/wagons to use as a portable base.

However I got this error on my client first time trying to log in after installing tentbag onto my dedicated server (and my client).

Running on 64 bit Windows 10.0.22631.0 with 32644 MB RAM
Game Version: v1.19.7 (Stable)
19.04.2024 16:10:49: Critical error occurred
Loaded Mods: bushmeat_meals@1.0.7, viescraftmachines@2.3.1, volumetricshadingreupdated@0.7.5, game@1.19.7, zoombuttonreborn@1.6.0, blocksoverlay@3.2.1, levelup@1.1.3, spawnhighlight@1.2.0, creative@1.19.7, survival@1.19.7
System.Exception: Don't know how to instantiate item of class 'TentBag' did you forget to register a mapping?
at Vintagestory.Common.ClassRegistry.CreateItem(String itemClass) in VintagestoryLib\Common\ClassRegistry.cs:line 274
at Vintagestory.Common.ItemTypeNet.ReadItemTypePacket(Packet_ItemType packet, IWorldAccessor world, ClassRegistry registry) in VintagestoryLib\Common\Network\ItemTypeNet.cs:line 18
at Vintagestory.Client.NoObf.ClientSystemStartup.PopulateItems(List`1 items, Int32 listSize) in VintagestoryLib\Client\Systems\Startup.cs:line 587
at Vintagestory.Client.NoObf.ClientSystemStartup.LoadItemTypes() in VintagestoryLib\Client\Systems\Startup.cs:line 399
at Vintagestory.Client.NoObf.ClientSystemStartup.HandleServerAssets_Step1() in VintagestoryLib\Client\Systems\Startup.cs:line 341
at Vintagestory.API.Common.TyronThreadPool.<>c__DisplayClass12_0.<QueueTask>b__0(Object a) in VintagestoryApi\Common\TyronThreadPool.cs:line 120
at System.Threading.QueueUserWorkItemCallback.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

I did install this mod into an existing world, if that helps/causes any issues.

💬 CKitt, Mar 29th at 10:47 PM

BillyGalbreath

No worries at all about the delay! I read and understood your disclaimer at the bottom. 

For what it's worth, the error is gone and the mod is once again working. Thank you very much!

💬 BillyGalbreathAuthor, Mar 29th at 2:57 PM

CKitt, sorry for the late reply. That is indeed an odd error. Its stating that the client side is trying to reload the mod's config file, which it shouldn't be doing even in single player. I went ahead and just applied the recommendation the error is suggesting, but i feel there might be some deeper issue going on.

💬 CKitt, Mar 20th at 11:58 PM

BillyGalbreath

I had been successfully using this mod for a while, and it abruptly stopped working properly. Now, when I attempt to pick up a tent, I get the following crash:

Running on 64 bit Windows 10.0.19045.0 with 130848 MB RAM
Game Version: v1.19.4 (Stable)
3/20/2024 5:55:40 PM: Critical error occurred in the following mod: tentbag@1.1.1
Loaded Mods: game@1.19.4, tentbag@1.1.1, creative@1.19.4, survival@1.19.4
System.InvalidOperationException: Cannot call this method outside the main thread. Not thread safe to do so. You can use the thread safe method .EnqueueMainThreadTask() to queue up the register on the main thread instead.
at Vintagestory.Client.NoObf.ClientEventAPI.RegisterCallback(Action`1 OnTimePassed, Int32 millisecondDelay) in VintagestoryLib\Client\API\ClientEventAPI.cs:line 542
at TentBag.Configuration.FileWatcher.QueueReload(Nullable`1 change) in C:\Users\Billy\RiderProjects\TentBag\src\Configuration\FileWatcher.cs:line 48
at TentBag.Configuration.FileWatcher.Changed(Object sender, FileSystemEventArgs e) in C:\Users\Billy\RiderProjects\TentBag\src\Configuration\FileWatcher.cs:line 26
at System.IO.FileSystemWatcher.NotifyFileSystemEventArgs(WatcherChangeTypes changeType, ReadOnlySpan`1 name)
at System.IO.FileSystemWatcher.ParseEventBufferAndNotifyForEach(ReadOnlySpan`1 buffer)
at System.IO.FileSystemWatcher.ReadDirectoryChangesCallback(UInt32 errorCode, UInt32 numBytes, AsyncReadState state)
at System.IO.FileSystemWatcher.<>c.b__85_0(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* overlappedPointer)
at System.Threading.PortableThreadPool.IOCompletionPoller.Callback.Invoke(Event e)
at System.Threading.ThreadPoolTypedWorkItemQueue`2.System.Threading.IThreadPoolWorkItem.Execute()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()

I figured you'd want to know that it was crashing with no other mods enabled whatsoever.

💬 DJLinder, Feb 28th at 6:33 AM

I'm loving the use of it, one quick suggestion came to mind. 

Can you automate a waypoint creation at the centerpoint of the tentbag during the unpack, and label it "Tentbag" or "Tent" or "Camp" etc?.  (Even better, pin the created waypoint so we can't easily forget it!)

You could also automate the removal of the waypoint during the packing operation.

💬 ScantLobster, Feb 18th at 12:28 PM

I've been trying to use this mod for the past couple days, I'm still running 1.18.15 and when I download it doesn't want to add to the game. The file is in the mods folder but no config file is loading. I've tried all the versions that are supported for 1.18. Am I doing something wrong or missing a step? I have the useful mod and that is working for me fine. Any advice would be appreciated. :)

💬 Mendall, Feb 4th at 12:15 AM

Thanks for the answer the food spoiling thing will not affect me, I used the original tent bag to allow me to travel long distances for a long period of time (like a full in game year or more) while I find the perfect place to build. Plus, I just kinda like the nomad lifestyle. When moving every day like that, all you need to do is forage. So I never store food any way. The best thing about this mod is not having to clear a spot of all grass. Thing is, I can't give up the chiseling bench and trader welcome mat from useful stuff, so will probably be running both. Hopefully your tent bag is more stable as well, that was my only gripe b4 it crashed the game a lot when packing your tent up again.

💬 DarkThoughts, Feb 3rd at 3:01 PM

Mendall Yes, you can use chiseled blocks. The mod is affected by a bug which I think is VS related in that insulated rooms turn into greenhouses instead of cellars when placed down again (I could replicate this with the worldedit move tool too). This will consequently cause food items to spoil much quicker. So right now I'd treat this more of a quick & dirty way to quickly plonk down something to sleep, not something to camp out in for a while in a region.

See: https://github.com/anegostudios/VintageStory-Issues/issues/3542

💬 Mendall, Feb 2nd at 3:27 AM

I used the original mod and was able to turn off the limitation on storage, keeping its inventory in the config files as well as making it a little larger. In short, my chests could keep storage.

I didn't have a food vessel, though, so cant say if it would have been possible.

The original tent bag was a bit unstable if a small animal was inside when you tried to pack it up the game would crash, if grass had grown to close outside when you packed it the game would crash. ECT.... but over all it made for a fun play style just wandering around setting up a tent for the night.

One question, can you use chiseled blocks in this version?

I play single player world.

💬 DarkThoughts, Jan 31st at 4:30 PM

I second the storage issue. I'd kinda like to have a storage vessel inside for better spoilage time but not if it keeps its items. Like, worst case we ban all storage containers (might be hard with modded ones?) and carry one extra that we plonk down inside of it. But dropping a 7x7 area full of trunks seems bonkers and cheaty.

💬 UA_Shaman, Jan 30th at 4:31 PM

BillyGalbreath
When I download the world gives the following error:
30.1.2024 18:28:55 [Error] [configlib] An exception was thrown when trying to load assembly:
30.1.2024 18:28:55 [Error] [configlib] 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

Before that, I tested the Still Usefull Staff mod

💬 Adler1011, Jan 30th at 4:16 AM

I think the banned list is to prevent people from making portable farms, or using tent bags as a quick way to excavate large areas. Just my 2 cents.

💬 bringitonwimps, Jan 29th at 11:54 PM

is it possible to make it so firews and chests can not either be part of the tent or at least they can not hold items?.. notice if we pick up ternt with fire even lit not only does the wood remain in it also the fire is still lit when we place it again.  I ask because i know if i use this mod on my server people will turn t into one giant chest.  Just asking, if not no huge issue.  thanks

💬 DarkThoughts, Jan 29th at 2:29 PM

So you could have like a max 5x5x2 type of interior, excluding chiseled half spaces of course, right? Assuming you use the entire space for a "tent". VS really needs wool blocks or something though.

💬 BillyGalbreathAuthor, Jan 27th at 8:41 PM

ChadStevens

I got you, fam. ^_^

💬 ChadStevens, Jan 27th at 2:26 PM

Needs screenshots

💬 DrBubba, Jan 24th at 5:44 PM

Love this idea.  Thanks for sharing the mod.

(edit comment delete)