Jump to content
We've made dark mode the default preference to protect your eyes! You can change this at anytime below. ×
Search In
  • More options...
Find results that contain...
Find results in...
Rezanow

Custom Categories

Pending 1.0.9

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? 

Share this comment


Link to comment

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.

Share this comment


Link to comment

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

Share this comment


Link to comment

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.

Share this comment


Link to comment

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? 

Share this comment


Link to comment

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

Share this comment


Link to comment

About Us

Codefling is a forward-thinking platform for developers to share and monetize their work from plugins to game assets and everything in-between.

2,125 files sold to 250 customers and $28,028 of payments processed this year!

×
×
  • 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.