Jump to content

Medical Crates do not work (at least for me)

Pending 1.1.8

jougles
jougles

Posted

Hello

I have the issue that I all my medical crate (crate_normal_2_medical) only spawn 1 item.

Even though I have the following settings:

    "crate_normal_2_medical": {
      "enabled": true,
      "lootTable": "MedicalCrate",
      "maxItems": 2,
      "minItems": 1,
      "gunsWithAmmo": false,
      "noGuns": false,
      "MaxBps": 1,
      "WaterPreFillPercent": 20,
      "ClearContainerFirst": true
    },

Now I have a MedicalCrate.json in my oxide/data/CustomLoot
I tried different min and max numbers as well but nothing works.

The only Items with a probability in there look like this:
 

    "Medical": {
      "antiradpills": {
        "probability": 0,
        "minStack": 1,
        "maxStack": 1
      },
      "bandage": {
        "probability": 3,
        "minStack": 1,
        "maxStack": 3
      },
      "blood": {
        "probability": 0,
        "minStack": 1,
        "maxStack": 1
      },
      "largemedkit": {
        "probability": 5,
        "minStack": 1,
        "maxStack": 1,
        "blueprintChancePercent": 1
      },
      "syringe.medical": {
        "probability": 6,
        "minStack": 1,
        "maxStack": 6,
        "blueprintChancePercent": 1
      }
    },

All categories have the same probability of 1 in the same file.

It is funny, that all my settings for all the other containers work and I do nothing different. It is only the Medical crate that does this.

Can it be that there is an issue with medical crates and it has nothing to do with my settings?

  • Administrator
Steenamaroo

Posted

Hi @jougles
Sorry it took so long to reply. This got overlooked somehow.


I just tested crate_normal_2_medical on my local server and it's working just fine,
but there is an issue in CustomLoot with min/max item amount which I've addressed for the next update.

It's reading the max-items as one smaller than it should, so the example you've given will only ever give 1 item...never 2.

 

Thanks for reporting this! 👍

jougles

Posted (edited)

Ok. Thank you @Steenamaroo for the reply.

I guess I just increase the max numbers by one for the medical crate and then it works?

Edited by jougles
  • Administrator
Steenamaroo

Posted

Yeah, until the next update that'll do the job.

jougles

Posted

just one more question @Steenamaroo. I also tried min 4 items and max 4 but it still only gave 1 item. is that because max then would be one smaller then min and there is some kind of exception that is not shown in the console?

  • Administrator
Steenamaroo

Posted

Setting min and max to the same number should result in that number being used, regardless of the other identified issue.
Is your loot table still set up as shown in the original message?

jougles

Posted

yes @Steenamaroo
Regardless from min or max numbers it is always only one item in the container. It works for all other containers

  • Administrator
Steenamaroo

Posted

Perhaps try some other known-to-work loottable, just to rule that out?
When I tested in my first reply I had multiple items without any problems.

jougles

Posted (edited)

@SteenamarooStill doesn't work for me ... but are you bringing out the new Version with the fix you made? 

Quote

reading the max-items as one smaller than it should

 

Edited by jougles
  • Administrator
Steenamaroo

Posted

If other containers working fine are this loottable is working fine in other containers then I'd guess you have some other plugin modifying that particular container type.

Maybe you could unload all plugins then spawn the medical container then load CustomLoot.
After a brief wait (and message in console), CustomLoot should populate that container for you.

 


FYI. If you're only giving out medical items then there's no point setting all categories to probability 1,
however the plugin is written to ignore categories which have no items with probability greater than zero so, really, it shouldn't make a difference.

 

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.