You might be able do an on event handler on:
OnItemDeployed
or perhaps:
OnItemAddedToContainer
Simple Loot
Set multipliers for any item of your choosing!
Total Downloads: 5,019 - First Release: Oct 10, 2017 - Last Update: Dec 8, 2017
- 5/5, 12 likes
-
-
Why is the version of the plugin Version 1.0.6 and actually Version 1.0.5?
-
The last version is 1.0.6 but the release descriptor in the .cs code was not updated so it is mentioned 1.0.5.
Kappasaurus, at the same time I tried the previous release (actual 1.0.5) where you fixed only start error and the plugin works fine.
It's odd but true. Thank you!
[DOUBLEPOST=1511681271][/DOUBLEPOST]Only one assumption: it handles refreshing weirdly enough increasing garbage entities each time it loads. Anyway it should be one now once a restart so it's better than it was. -
im just looking around the data .cs to see if i can understand any of it, i have never really worked with markup language. but upon looking at the code in another plugin dealing with refreshing loot to see if i can recognise the loot default or call/delete function.
maybe im an idiot but is this anywhere close to something thats different?
Code:} private void OnSpawnLoot(LootContainer lootContainer) { if (lootContainer?.inventory?.itemList == null) return; foreach (var item in lootContainer.inventory.itemList.ToList()) { item.RemoveFromWorld(); item.RemoveFromContainer(); }
Noticing simalarities with this
Code:var lootContainers = Resources.FindObjectsOfTypeAll<LootContainer>().Where(c => c.isActiveAndEnabled && !c.IsInvoking("SpawnLoot")).ToList(); foreach (var container in lootContainers) { try { container.Invoke("SpawnLoot", UnityEngine.Random.Range(container.minSecondsBetweenRefresh, container.maxSecondsBetweenRefresh)); } catch{} } }
Last edited by a moderator: Nov 29, 2017 -
-
so far i cannot get either to work correctly. however if could figure out betterloot and this plugin was updated with a correct on entitiy spawn delete and refresh with new loot script im pretty sure both would be compatible yes, however you have to set multipliers identical i think on on both configuration to avoid a conflict.
@Kappasaurus
Bud any closer to a fix yet, im up 30k entities in 2 days and short of apologising to the players and spending hours messing with betterloot or just goinb back to vanilla loot im stuck haha.
an oh yea, on reload the plugin add around and extra 500+ entities at a time. T.T -
its still sometimes spawn 1x loot in some barrels
-
Do
-
There is a brute force solution.... Run Timed Execute | Oxide
With these in the json:
Code:"RealTime-Timer": { "00:00:00": "oxide.reload SimpleLoot", "00:05:00": "oxide.reload SimpleLoot", "00:10:00": "oxide.reload SimpleLoot", ... "23:45:00": "oxide.reload SimpleLoot", "23:50:00": "oxide.reload SimpleLoot", "23:55:00": "oxide.reload SimpleLoot"
-
You guys seem not to read messages at all. If reloading plugin that often you will reach entity limit in a couple of days or even earlier. I used TimedExecute with 30 minutes interval to reload SimpleLoot and that caused enormous problems and you are saying here about 5 minutes interval (what's more realtime timer instead of repeat one). Ok try it and have fun.
-
Yes i saw them but i try because nobody explain what's going on with this plugin... That's the goal of a forum, help each other
Do you have any idea or you're at the same point as me ? -
I think I've come up with a solution. If anyone is interested, try this.
[DOUBLEPOST=1512528493][/DOUBLEPOST]Attached Files:
-
-
I'm wondering where these entities are going when they are "removed"? I'm going to build a shack there and get rich! ;-) -
-
-
Simple test with no one on on a simple test server. Machine has SimpleLoot running. did a reload, looked at the change in entity count.
Code:> serverinfo { "Hostname": "Bella Clean", "MaxPlayers": 5, "Players": 0, "Queued": 0, "Joining": 0, "EntityCount": 91326, "GameTime": "05/20/2024 17:13:45", "Uptime": 3085, "Map": "Procedural Map", "Framerate": 263.0, "Memory": 1238, "Collections": 40, "NetworkIn": 0, "NetworkOut": 0, "Restarting": false, "SaveCreatedTime": "11/27/2017 11:02:18" } > o.reload SimpleLoot SimpleLoot was compiled successfully in 1754ms Unloaded plugin Simple Loot v1.0.7 by Jacob [Simple Loot] Repopulating 2089 loot containers. Calling 'OnServerInitialized' on 'SimpleLoot v1.0.7' took 1958ms Loaded plugin Simple Loot v1.0.7 by Jacob > serverinfo { "Hostname": "Bella Clean", "MaxPlayers": 5, "Players": 0, "Queued": 0, "Joining": 0, "EntityCount": 92263, "GameTime": "05/20/2024 17:19:02", "Uptime": 3114, "Map": "Procedural Map", "Framerate": 263.0, "Memory": 1374, "Collections": 40, "NetworkIn": 0, "NetworkOut": 0, "Restarting": false, "SaveCreatedTime": "11/27/2017 11:02:18" }
Did a quit and restart:
87921.
so there is a brute force fix, but not very player friendly.Last edited by a moderator: Dec 6, 2017 -
As for me I have only one working way: to use 1.0.5 version and with no reload during a day. Multipliers work but entities grow on restart, i.e. once in 24 hours. It's still best of a bad lot.
-
Begging for a fix on this - I really enjoy this plugin's simplicity, I just wish it worked as intended (without causing entity problems as well). I get issues with vanilla loot without reloading the plugin
I've also tried a previous verison, as well as the fix posted above. -
I truly believe the author is aware of the problems, but I suspect there may be downstream issues contributing to the challenge in resolving this. From my own testing and looking at the code there is clean up occurring. I suspect the garbage collection is not properly processing entity removal. But I am speculating on that part.