Hello,
Unfortunately earlier today I lost a tent bag from this mod: https://mods.vintagestory.at/tentbag which contained a structure holding a lot of items across multiple chests and shelves. It simply disappeared as I crashed, claiming that I put it into a chest. I've tried everything I can think of to find it again, including going back to the chest but it seems to have vanished. I've been trying to work out how the mod works via the 'Source'/github page and I could use some assistance from someone more well versed in this subject!
I'm looking at the 'Src' > 'Behaviors' > 'PackableBehaviour.cs' file where it describes what's going on in the background and it seems to be copying everything when the empty tent bag picks up a structure and loads it from a JSON file somewhere:
// create schematic of area
BlockSchematic bs = new();
bs.AddAreaWithoutEntities(entity.World, blockAccessor, start, end);
bs.PackIncludingAir(entity.World, start);
// clear area in world
ClearArea(entity.World, start, end);
// drop packed item on the ground and remove empty from inventory
ItemStack packed = new(entity.World.GetItem(_packedBag), slot.StackSize);
packed.Attributes.SetString("packed-contents", bs.ToJson());
if (Config.PutTentInInventoryOnUse) {
ItemStack sinkStack = slot.Itemstack.Clone();
slot.Itemstack.StackSize = 0;
slot.Itemstack = packed;
slot.OnItemSlotModified(sinkStack);
} else {
entity.World.SpawnItemEntity(packed, blockSel.Position.ToVec3d().Add(0, 1 - y, 0));
slot.TakeOutWhole();
}
......
// try load schematic data from json contents
string? error = null;
BlockSchematic bs = BlockSchematic.LoadFromString(contents, ref error);
if (!string.IsNullOrEmpty(error)) {
SendClientError(entity, Lang.UnpackError());
return;
}
I've been looking everywhere I can think of in my local and server appdata files for something that might contain this saved data used by the mod, but I've been unable to find anything. Is there any locations that I might not have considered?
Is it possible for me to either:
Find the unique item in the world or respawn it using a specific command?
Trick the mod into reading the JSON file for the structure I want and fix it that way?