LootConfig

Allows you to adjust the server's loot list

Total Downloads: 14,928 - First Release: Mar 27, 2015 - Last Update: May 20, 2018

5/5, 21 likes
  1. Excellent. Thank you!!
     
  2. Code:
    [Oxide] 6:29 PM [Info] LootConfig was compiled successfully in 1841ms
    [Oxide] 6:29 PM [Info] Unloaded plugin LootConfig v1.0.3 by Nogrod
    [Oxide] 6:29 PM [Info] Loaded plugin LootConfig v1.0.3 by Nogrod
    [Oxide] 6:29 PM [Info] [LootConfig] Incorrect config version() move to .old
    [Oxide] 6:29 PM [Error] Failed to call hook 'OnServerInitialized' on plugin 'LootConfig v1.0.3' (ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: startIndex)
    [Oxide] 6:29 PM [Debug]   at System.String.Substring (Int32 startIndex) [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.CreateDefaultConfig () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.CheckConfig () [0x00000] in <filename unknown>:0
      at Oxide.Plugins.LootConfig.OnServerInitialized () [0x00000] in <filename unknown>:0
      at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
      at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
     
    Last edited by a moderator: Sep 21, 2015
  3. Try delete all lootconfig's and restart server (plugin are generate new, correct config)
     
  4. restart server?! ill have to wait on that ...
     
  5. is there any way to make the config file more accessable, i mean is it supposed to have ~26k lines of code ?
     
    Last edited by a moderator: Sep 19, 2015
  6. + for length config

    And one more question. Add info about containers (name on config > how looking), and why in config i can't found heli crates?
    And whats mean this line
    Code:
    private readonly Regex _findLoot = new Regex("crate_normal|loot\\-barrel|loot_trash|oil_barrel|supply_drop|trash\\-pile", RegexOptions.Compiled | RegexOptions.IgnoreCase);
    If loot containers founded by
    Code:
    var containers = Resources.FindObjectsOfTypeAll<LootContainer>();
     
  7. i'll have a look at the config size...
    the regex is to preload these LootContainers, since they are not always loaded already when config should be applied...
     
  8. So i cant cut some containers from? Only all containers are populated with loot?
     
  9. all available containers are in the config like BarrelBetter, BarrelCommon...if you empty one of them the entity type wont drop anything, or what do you intend to do?
     
  10. I uploaded the file on the server : here is the message I got :

    Code:
    (09:20:54) | [Oxide] 8:20 AM [Info] LootConfig was compiled successfully in 2172ms
    (09:20:54) | [Oxide] 8:20 AM [Info] Loaded plugin LootConfig v1.0.3 by Nogrod
    (09:20:54) | [Oxide] 8:20 AM [Info] [LootConfig] Incorrect config version() move to .old
    (09:20:54) | [Oxide] 8:20 AM [Warning] CallHook 'OnServerInitialized' on plugin 'LootConfig v1.0.3' took: 633ms
     
  11. So how look like barrel better\common in game? Oil barrel i know how look at
    Trash pile too, supply drop
    And where are loot crates 1 & 2? Big white crate and small dark green crate (like ammunition)?
     
  12. Nogrod updated LootConfig with a new update entry:

    1.0.4

     
  13. [Oxide] 2:10 PM [Warning] Waiting for another application to stop using script: LootConfig
    [Oxide] 2:10 PM [Error] Exception while resolving plugin references (NullReferenceException: Object reference not set to an instance of an object)
    [Oxide] 2:10 PM [Debug] at Oxide.Plugins.Compilation+<Prepare>c__AnonStorey1.<>m__0 (System.Object _) [0x00000] in <filename unknown>:0
    [Oxide] 2:10 PM [Debug] Load requested for plugin which is already loading: LootConfig

    cant even get this working. and now when i try to upload it again it just says

    [Oxide] 2:11 PM [Debug] Load requested for plugin which is already loading: LootConfig
    cant reload any plugins. ugh
     
  14. looks like your server needs a restart ;)
     
  15. Having this error after executing oxide.reload LootConfig with new version. New config .json file was empty ({}) as well. I issued the command after overwriting the previous version of the .cs and deleting the old config file. Any idea what might be happening?


    Code:
    (16:08:39) | [Oxide] 4:09 PM [Info] Unloaded plugin LootConfig v1.0.4 by Nogrod
    (16:08:39) | [Oxide] 4:09 PM [Info] Loaded plugin LootConfig v1.0.4 by Nogrod
    (16:08:40) | [Oxide] 4:09 PM [Info] [LootConfig] Incorrect config version(1321/0)
    (16:08:41) | [Oxide] 4:09 PM [Warning] CallHook 'OnServerInitialized' on plugin 'LootConfig v1.0.4' took: 1158ms
    (16:08:41) | TimeWarning: Net.sv.Cycle took 1.21 seconds (1208ms)
    (16:08:41) | TimeWarning: ServerMgr.Update took 1.22 seconds (1215ms)
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: oil_barrel
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: oil_barrel
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: assets/bundled/prefabs/autospawn/resource/loot/trash-pile-1.prefab
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: assets/bundled/prefabs/autospawn/resource/loot/loot-barrel-1.prefab
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: oil_barrel
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_2
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_2
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_1
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_2
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_2
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_2
    (16:08:41) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: assets/bundled/prefabs/autospawn/resource/loot/loot-barrel-2.prefab... (had to remove some lines, would not let me post) ...(16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: crate_normal_2_food
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: Trash-Pile-1
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: oil_barrel
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: heli_crate
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_2
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: Loot-Barrel-2
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: Loot-Barrel-1
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: crate_normal
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: crate_normal_2
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_trash
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_1
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: crate_normal_2_medical
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: supply_drop
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_1
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No container data found: loot_barrel_1
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No reveal data found: blueprint_book.item
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No reveal data found: blueprint_library.item
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No reveal data found: blueprint_page.item
    (16:08:42) | [Oxide] 4:09 PM [Info] [LootConfig] No reveal data found: blueprint_fragment.item
     
  16. if you already had an old LootConfig version running, remove the config and make a fresh server start
     
  17. Stopped server, deleted old config file, uploaded new script version, started server, no errors! Worked like a charm - and great job with the new config file! Much easier to use and understand. Plus you added heli loot!!! :D:D

    Thank you!!!
     
  18. the first error is what happened when i uploaded this plugin. i had updated 3-4 plugins before without a problem. uploading this made the compiler stop working.
     
  19. Like i already said. Restart needed. The plugin is working fine.
     
  20. Can someone help me to understand how it works please ?

    I don't really know how I have to modify the cfg file to set it up for the server.

    Can you tell me if I am right :

    Code:
    "rifle.ak": {
          "items": [
            {
              "shortname": "rifle.ak",
              "amount": 1.0
            }
          ],
          "blueprints": [],
          "subSpawn": []
        },
        "rifle.ak Blueprint": {
          "items": [],
          "blueprints": [
            {
              "shortname": "rifle.ak",
              "amount": 1.0
    "category": "rifle.ak",
    "weight": 100

    Does that mean that everywhere I have a chance to loot 1 rifle.ak with 100% of chance

    "amount": 1.0 = what happens if I put 5 instead of 1 ? Will I have 5 ak in one box ? Of will it be 5 ak in the map in different boxes ? 1+1+1+1+1+1 ?

    Code:
     "AK47 With Ammo": {
          "items": [
            {
              "shortname": "rifle.ak",
              "amount": 1.0
            },
            {
              "shortname": "ammo.rifle",
              "amount": 80.0
    Here same as above but I have a chance to get it with 80 ammunition right ?
    50% chance ?
    "category": "AK47 With Ammo",
    "weight": 50


    Code:
      "Blueprints.VeryRare.Weapon": {
          "items": [],
          "blueprints": [],
          "subSpawn": [
            {
              "category": "rifle.ak Blueprint",
              "weight": 100
    I have 100% chance to find ak bp ? how ? Where ?

    Code:
     "Collection.Rifles": {
          "items": [],
          "blueprints": [],
          "subSpawn": [
            {
              "category": "AK47 With Ammo",
              "weight": 50
    I have 50% chance to find ak with ammo ?

    Can you maybe give me an exemple of what you did for you config file ? It will allow me to compare and try to understand what to do for mine ? thx
     
    Last edited by a moderator: Sep 21, 2015