all backpacks are kepted as files not as entities . they will not go away unless you wipe them. And they add up. With any plugin that saves data, over time it could be enough to impact server performance. but not sure if backpack files will or not.
Backpacks
Moved
Total Downloads: 15,963 - First Release: Oct 30, 2015 - Last Update: Mar 6, 2018
- 5/5, 49 likes
-
-
I haven't had 7360 players since the first of the month, so maybe there's duplicate files, I suppose you can look for duplicate files with the same SteamID, but you risk losing data/ items per player. -
Yeah. Not going to risk any of that. I was curious what was with all the files aside from the possibility of a folder cleanup. As long as it knows which files to read and doesn't cause my server to lag out I'm fine with it. I just ask a lot of questions. The more I ask now the less I ask later.
-
A player on my server brought to my attention, that in the past on a different server...the server owner/admin was able to save the contents
of the players Backpacks even after force wipe, to carry over after update.
Would anyone know how this is possible? And what exactly is needed to accomplish this?
Thanks! -
-
That's all?...Just don't delete the files?...That's easy......but wait!.....will those files be deleted on the next oxide update?
Like I would need to save them?.....Or oxide update will not mess with those files? -
[DOUBLEPOST=1508988204][/DOUBLEPOST] -
-
Okay so I've been scrolling through and either there isn't an answer or my eyes are failing me. With the setting "Erase On Death": false, If it's set to true do the backpacks just disappear or do they despawn on a timer? Apparently they are sticking around while it's set to false.
-
post removed, problem fixed.
As for the backpacks, they do survive a wipe if you dont remove data file, on death they generally stay around or about an hour on my server. which makes everyone happy who is killed by bot or animal and of course the heliLast edited by a moderator: Oct 27, 2017 -
Code:private class BackpackInventory { public List<BackpackItem> Items = new List<BackpackItem>(); public class BackpackItem { public int ID; public int BlueprintID; public int Amount; public ulong Skin; public float Fuel; public int FlameFuel; public float Condition; public int Ammo; public int AmmoType; public bool Blueprint; public List<BackpackItem> Contents = new List<BackpackItem>(); public Item ToItem() { Item item = null; if(Blueprint) { item = ItemManager.CreateByItemID(-1887162396, Amount, Skin); item.blueprintTarget = BlueprintID; return item; } else { item = ItemManager.CreateByItemID(ID, Amount, Skin); } BaseProjectile.Magazine magazine = item.GetHeldEntity()?.GetComponent<BaseProjectile>()?.primaryMagazine; FlameThrower flameThrower = item.GetHeldEntity()?.GetComponent<FlameThrower>(); item.fuel = Fuel; item.condition = Condition; if (Contents != null) foreach (var contentItem in Contents) contentItem.ToItem().MoveToContainer(item.contents); else item.contents = null; if (magazine != null) { magazine.contents = Ammo; magazine.ammoType = ItemManager.FindItemDefinition(AmmoType); } if (flameThrower != null) flameThrower.ammo = FlameFuel; return item; } public static BackpackItem FromItem(Item item) => new BackpackItem { BlueprintID = item.blueprintTarget, ID = item.info.itemid, Ammo = item.GetHeldEntity()?.GetComponent<BaseProjectile>()?.primaryMagazine?.contents ?? 0, AmmoType = item.GetHeldEntity()?.GetComponent<BaseProjectile>()?.primaryMagazine?.ammoType?.itemid ?? 0, Amount = item.amount, Condition = item.condition, Fuel = item.fuel, Skin = item.skin, Contents = item.contents?.itemList?.Select(FromItem).ToList(), FlameFuel = item.GetHeldEntity()?.GetComponent<FlameThrower>()?.ammo ?? 0, Blueprint = item.IsBlueprint() }; } }
-
I would not like this at all, especially as i usually update the plugin when game updates. so inventory is full
-
-
[DOUBLEPOST=1509228174][/DOUBLEPOST] -
-
-
Hey guys,
today i added a Usergroup "vip" and now i want to give this group the permission to backbacks.use.medium.
But there is no medium backpack.
Large and small works perfect but medium wont work.
If a vip opens backpack he opens a small backpack.
Is there a way to use that medium-backpack ? -
-
Boss, is the red durable property of items solved? Or it can be refreshed indefinitely
[DOUBLEPOST=1509469425][/DOUBLEPOST]