Jump to content

Custom Categories

Pending 1.0.9

Rezanow
Rezanow

Posted

I've created a custom category. It works. But, I worry that there could be unforeseen issues.

Screenshot

  "Categories": {
    "Test": {
      "probability": 1,
      "allowBlueprints": true
    },

and then this...

"LootTypes": {
    "Test": {
      "supply.signal": {
        "probability": 1,
        "minStack": 1,
        "maxStack": 1
      }
    },

Will this break anything, or am I clear to create my own categories? 

  • Administrator
Steenamaroo

Posted

It's not the intended use but I suppose you could make your own if you want.
The plugin selects a category from the file, and and item from that category,
so as long as all the manually entered item names are correct, as they appear in a default file, it should work.

Rezanow

Posted (edited)

Good to hear. Thank you. Do you have a more detailed explanation on the probability weighting? It's kicking my ass. 

I ask because there are times where my bots have no loot. If my two custom categories have the same weight, shouldn't they always appear? 

Edited by Rezanow
Added info
  • Administrator
Steenamaroo

Posted

It's just a two-tier probability process,
so every time the plugin needs to create an item it chooses a category, then chooses an item from that category.

If you had 5 categories and their probabilities were 1, 1, 1, 1, 6

the've all got 1 in 10 chance of being picked, except the last one which has 6 in 10 chance.
Same logic applies to items within.

If you have some category with probability 1 or more, and some item within it with probability 1 or more then yes,
your npcs should always get that item.

If they're coming up empty I'd guess they're being looted, or some other plugin is maybe clearing their inventory.

 

Since you're having problems, I'd stick to the default categories and items for now.
Maybe try custom stuff, if you want, once you know it's working as it should.

Rezanow

Posted

Oh, so it totals them? So, if it says 5, 4, 2... It's a 11 point scale? 🤦‍♂️That helps. 

Next question: When it's picking categories (or items for that matter inside a category), is it guaranteed to pick something or is it possible to have something not picked at all? 

If I have two categories at 3 & 1, one of the categories should have a 75% chance of showing up and one should make up the other 25%, yes? 

I currently have a list set up where everything is set to 1. That should give them all equal chance to show up, right? 

Rezanow

Posted (edited)

Ok, this is pissing me off. I reset to a completely new file (test1.json). 


    "BotSpawn-test": {
      "enabled": true,
      "lootTable": "test1",
      "maxItems": 6,
      "minItems": 6,
      "gunsWithAmmo": false,
      "noGuns": false,
      "MaxBps": 3,
      "WaterPreFillPercent": 20,
      "ClearContainerFirst": true

I set CustomLoot to give my test bots the test1 loot. 

I have these relevant changes. 

  "AlwaysSpawnList": ["scrap"],
  "Component": {
      "probability": 1,
"gears": {
        "probability": 1,
        "minStack": 2,
        "maxStack": 6,

I have everything else set to 0 as it came. 

I am getting zero loot after reloading BotSpawn and CustomLoot. Imgur link.

EDIT: Oh ffs...  User error strikes again. It's working.

I'm leaving this here so you can have a record of my misstep. 

test1.json

Edited by Rezanow
User Error
  • Like 1
Rezanow

Posted

By the way, you know what it was...?  I had forgotten to unload AlphaLoot. It was messing with things. Oops. 

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.