BetterLoot

Moved

Total Downloads: 42,623 - First Release: Feb 26, 2015 - Last Update: Mar 20, 2018

4.95699/5, 93 likes
  1. In the console type version and it should tell you the version of Oxide you're running.
     
  2. Protocol: 1935.139.1
    Build Version: 1100.98
    Build Date: Thursday, December 15, 2016 11:34:54 PM
    Unity Version: 5.4.2f2
    Changeset: 17929
    Branch: /main
    Oxide Version: 2.0.2848
     
  3. Your version of Oxide is out of date. You'll need to update it to fix the errors. The latest Oxide version is 2.0.2854

    EDIT: It looks like both your server and Oxide need updating. Update your game too. Everything is out of date.
     
    Last edited by a moderator: Dec 19, 2016
  4. Hey dcode, awesome plugin.

    I am busy with the config now. As I understand it, any items I place in the blacklist.json file will not spawn in any crate, correct?

    Second question, can you explain what the "32" means in this line: (taken from helicrate.json)

    Code:
    "ammo.rocket.basic": 32,
    Is the 32 a percentage chance that will spawn rockets in the crate or is this the number of rockets it will spawn (RNG between 1 and 32)
     
  5. The blacklist will delete the item not only from the loot boxes, it will also completely remove ANY instances of it from the game. So adding the C4 to the blacklist will stop people from having C4, not just finding it. If you craft a C4, it would be deleted. To stop items from spawning in crates, just exclude it from the loot tables.

    Second answer is it's the maximum amount that can be spawned. So taking C4 again as an example, 100 would mean that a max stack of 100 C4 can be spawned in a crate. But it randomly generates the number each time.
     
  6. Thanks Sweaty Womble

    I am making a "Stone Age" server with some end game items (C4, Rockets) but with no modern weapons. I have added a bunch of items to the blacklist but the still appear in game.

    EDIT2: No loot boxes spawn now as well... This is weird.

    My blacklist is as follows:

    EDIT: Just realized I blacklisted all ammo types, even though they still spawn in crates/airdrops. I have removed them now from the blacklist because I want them to spawn.

    Code:
    {
      "ItemList":    [
        "rifle.ak",
        "rifle.bolt",
        "door.double.hinged.toptier",
        "door.hinged.toptier",
        "gates.external.high.stone",
        "grenade.f1",
        "rifle.lr100",
        "pistol.revolver",
        "pistol.semiauto",
        "pookie.bear",
        "research.table",
        "researchpaper",
        "rifle.semiauto",
        "shotgun.double",
        "shotgun.pump",
        "sign.post.double",
        "sign.post.single",
        "sign.post.town",
        "sign.post.town.roof",
        "smg.2",
        "smg.thompson",
        "wall.external.high.stone",
        "wall.window.bars.toptier"
        ]
    }
    I spawned 50 airdrops to see what the average airdrop would contain. Nearly all of them had AKs, SMGs and Pistols in it.

    Furthermore, I edited the SupplyDrop (which I assume are airdrops) to only drop ammo and high tier loot, but the above mentioned airdrops were full of clothes (shirts, jackets etc).

    Code:
    {
      "ItemList": {
        "ammo.handmade.shell": 50,
        "ammo.pistol": 100,
        "ammo.pistol.fire": 100,
        "ammo.pistol.hv": 100,
        "ammo.rifle": 100,
        "ammo.rifle.explosive": 100,
        "ammo.rifle.incendiary": 100,
        "ammo.rifle.hv": 100,
        "ammo.rocket.basic": 2,
        "ammo.rocket.fire": 2,
        "ammo.rocket.hv": 2,
        "ammo.shotgun": 50,
        "ammo.shotgun.slug": 50,
        "trap.bear": 5,
        "tool.camera": 5,
        "cctv.camera": 5,
        "explosive.satchel": 5,
        "explosive.timed": 3,
        "explosives": 10,
        "grenade.beancan": 15,
        "gunpowder": 500,
        "trap.landmine": 5,
        "metal.facemask": 1,
        "metal.plate.torso": 1,
        "targeting.computer": 1
      }
    }
    The idea is that people get the airdrops and recycle the ammo for gunpowder to make satchels or C4 etc, in case you were wondering why I have ammo but no weapons.

    Lastly, console pops this message when I reload the plugin:

    Code:
    (16:29:42) | [RCON][94.200.238.62:64073] betterloot.reload
    (16:29:42) | [Oxide] 13:29 [Info] [BetterLoot] HeliCrate > 'useCustomTableHeli' enabled, but loot population inactive by 'includeHeliCrate'
    (16:29:42) | [Oxide] 13:29 [Info] [BetterLoot] SupplyDrop > 'useCustomTableSupply' enabled, but loot population inactive by 'includeSupplyDrop'
    (16:29:42) | [Oxide] 13:29 [Info] [BetterLoot] Updating internals ...
    (16:29:42) | [Oxide] 13:29 [Info] [BetterLoot] There are 122 items in the global Barrels LootTable.
    (16:29:42) | [Oxide] 13:29 [Info] [BetterLoot] There are 79 items in the global Crates LootTable.
    (16:29:42) | [Oxide] 13:29 [Error] Failed to run a 0.10 timer in 'BetterLoot v2.11.2' (JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'System.Collections.Generic.Dictionary`2[System.String,System.String]' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
    To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
    Path 'AllItemsAvailable', line 3, position 24.)
    (16:29:42) | [Oxide] 13:29 [Debug]   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue, System.String id) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00000] in <filename unknown>:0
      at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00000] in <filename unknown>:0
    (16:29:42) | [Oxide] 13:29 [Info] [BetterLoot] Removed 55 stacked LootContainer (out of 355)
    (16:29:42) | [Oxide] 13:29 [Info] [BetterLoot] Internals have been updated. Populated '284' supported containers.
     
    Last edited by a moderator: Dec 19, 2016
  7. Ok, I have Oxide updated but am still running into a couple of issues..

    > oxide.reload BetterLoot
    [Oxide] 14:43 [Info] Unloaded plugin BetterLoot v2.11.2 by Fujikura/dcode
    [Oxide] 14:43 [Info] Loaded plugin BetterLoot v2.11.2 by Fujikura/dcode
    [Oxide] 14:43 [Info] [BetterLoot] HeliCrate > 'useCustomTableHeli' enabled, but loot population inactive by 'includeHeliCrate'
    [Oxide] 14:43 [Info] [BetterLoot] SupplyDrop > 'useCustomTableSupply' enabled, but loot population inactive by 'includeSupplyDrop'

    [Oxide] 14:43 [Error] Failed to run a 0.10 timer in 'BetterLoot v2.11.2' (JsonSerializationException: Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'System.Collections.Generic.Dictionary`2[System.String,System.String]' because the type requires a JSON object (e.g. {"name":"value"}) to deserialize correctly.
    To fix this error either change the JSON to a JSON object (e.g. {"name":"value"}) or change the deserialized type to an array or a type that implements a collection interface (e.g. ICollection, IList) like List<T> that can be deserialized from a JSON array. JsonArrayAttribute can also be added to the type to force it to deserialize from a JSON array.
    Path 'AllItemsAvailable', line 3, position 24.)
    [Oxide] 14:43 [Debug] at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.EnsureArrayContract (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract) [0x00000] in <filename unknown>:0
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.Object existingValue, System.String id) [0x00000] in <filename unknown>:0
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal (Newtonsoft.Json.JsonReader reader, System.Type objectType, Newtonsoft.Json.Serialization.JsonContract contract, Newtonsoft.Json.Serialization.JsonProperty member, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerMember, System.Object existingValue) [0x00000] in <filename unknown>:0
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue (Newtonsoft.Json.Serialization.JsonProperty property, Newtonsoft.Json.JsonConverter propertyConverter, Newtonsoft.Json.Serialization.JsonContainerContract containerContract, Newtonsoft.Json.Serialization.JsonProperty containerProperty, Newtonsoft.Json.JsonReader reader, System.Object target) [0x00000] in <filename unknown>:0
    at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject (System.Object newObject, Newtonsoft.Json.JsonReader reader, Newtonsoft.Json.Serialization.JsonObjectContract contract, Newtonsoft.Json.Serialization.JsonProperty member, System.String id) [0x00000] in <filename unknown>:0
    [Oxide] 14:43 [Info] [BetterLoot] Removed 96 stacked LootContainer (out of 1344)
    [Oxide] 14:43 [Info] [BetterLoot] Internals have been updated. Populated '1036' supported containers.
     
  8. Delete the file "data/BetterLoot/NamesList.json" and then try to reload again the plugin by "reload BetterLoot".
     
  9. When you updated the plugin, are you sure you deleted the data files in your_server\oxide\data\BetterLoot?

    I'm pretty sure (but not 100%) that's the error you get on this plugin when the data files haven't been cleaned out from an update.
    [DOUBLEPOST=1482159326][/DOUBLEPOST]
    Damn Fuji, you beat me by a second! xD
     
  10. Done this, still getting the same faults... Also the item list is way outdated? When the mod does work is fills the crates with random garbage rather than components... I read back a couple of pages and found some files that somebody had made with the new components in, but it doesn't seed the loot crates with them.



    I attached whats in the JSON files here.. could really use to help please.
     

    Attached Files:

    Last edited by a moderator: Dec 19, 2016
  11. Just fully updated and verified everything and downloaded the plugin.

    After letting the server boot I dropped the plugin in and looked at the console and it loaded fine for me so it's definitely a config issue.

    Try deleting the whole BetterLoot folder inside the data folder as well as the config and reload it.
     
  12. Somehow I have managed to get it so it looks like it is working.. the only thing I am confused by is this...

    [Oxide] 15:35 [Info] [BetterLoot] HeliCrate > 'useCustomTableHeli' enabled, but loot population inactive by 'includeHeliCrate'
    [Oxide] 15:35 [Info] [BetterLoot] SupplyDrop > 'useCustomTableSupply' enabled, but loot population inactive by 'includeSupplyDrop'
     
  13. When you came (before your errors started) from any any version prior 2.10, then you might nee to delete All files which are created by BetterLoot. This will sole any issues. I did test the current version again, and it runs fine without errors.
     
  14. Do not worry about that. It is only advisory.

    All it means is that in the BetterLoot.json config file, you have said you want to use custom loot tables, but then said don't use the custom loot tables. :D

    You just need to set the values to false and they go away.

    EDIT: For clarity, set useCustomTableHeli & useCustomTableSupply to false in config.
     
  15. How do I get it to use the Custom Loot Tables?? Think I have them set right.
     

    Attached Files:

  16. Certain updates require you to delete all of your data files and config file for BetterLoot when massive changes are made. To resolve that error you'll need to backup all of your data files and delete them. After that you'd need to restore all of the items you want spawning in crates etc.

    The blacklist will only delete the items when they are transferred between crates unfortunately. To remove them fully from the game you'd have to install either ItemConfig or LootConfig... Can't remember which one if it is even them two lol.

    Finally, the reason that your supply drop and heli crate loot tables aren't working is because in the BetterLoot.json config file you need to set includeHeliCrate & includeSupplyDrop to true.
     
  17. In the BetterLoot.json config file you need to set includeHeliCrate & includeSupplyDrop to true.
     
  18. OK, I got excited when you said this, because I missed it completely, but now I have set it as you suggested, restarted the server but still no beuno.

    It spawns, which I understand is fine (reinstalled the plugin, only changed the blacklist.json file), but when I transfer it to my inventory it doesn't disappear.

    Code:
      "HeliCrate": {    "excludeHeliCrate":false,
        "giveXpHeliCrate": true,
        "includeHeliCrate": true,
        "maxItemsPerHeliCrate": 4,
        "maxXpScaleHeliCrate": 1.0,
        "minItemsPerHeliCrate": 2,
        "minXpScaleHeliCrate": 1.0,
        "useCustomTableHeli": true
      },
      "SupplyDrop": {
        "giveXpSupplyDrop": true,
        "includeSupplyDrop": true,
        "maxItemsPerSupplyDrop": 6,
        "maxXpScaleSupplyDrop": 1.0,
        "minItemsPerSupplyDrop": 3,
        "minXpScaleSupplyDrop": 1.0,
        "useCustomTableSupply": true
      }
    Do you mind hopping on my discord server and sharing your knowledge?
     
  19. Shouldn't be any need. Your config file looks wrong... Download this one and see if it works when you reload the plugin. If not, I'll hop on Discord and see if I can help you that way. But if you delete your one and use mine instead it should work fine. I have turned on the blacklist and crates for you so it should work.
     

    Attached Files:

  20. Thanks a lot Sweaty Womble, appreciate the help.

    I have added your BetterLoot.json file but still have the same issue :(

    Discord is

    Would appreciate if you can help out. It's driving me absolutely nuts