Jump to content

1 Screenshot

  • 836.8k
  • 7.3k
  • 52.51 kB

Recommended Comments



ClockworkCat

Posted

@SteenamarooSo you'll be happy to know that I figured out the source of the problem. 

While I can't for the life of me figure out what's autopopulating them with loot, it turns out that was completely unrelated to the issue at hand; classic case of correlation not equaling causation.  So for the bots that randomly stopped working, it turns out you can't set a minimum of zero.  I wanted a CHANCE for food, but not to necessarily spawn it, and it turns out doing it that way made the mod unhappy.  I can't seem to get the probability to balance the way I like, but it's not that relevant since it's literally just food items.

Thanks again for trying to help!  Turns out I was just hurting myself in my confusion.  On the plus, I'm super fast at creating bots and loot tables for them now.  😛

  • Administrator
Steenamaroo

Posted

Hi,

I think I’m following. Are you talking about the minStack/maxStack options, and setting that min to zero?
If so the plugin should just completely ignore any items where minstack, or maxstack, is zero,
so they’ll never be picked or created.

 

If you’re just talking about probability of zero then any category set to zero (and all of the items in it) will be ignored,
and any item set to zero, regardless of its category’s probability, will be ignored.

If there’s only one category and item (in it) with probability above 0, then that item will always be picked and created, cos there’s no other choice.

I order to give that item a chance of not being picked, there needs to be at least one other viable item which could be picked instead.

I.E. You can set the plugin up to create wood or stone, for example
but you can’t set it up to create wood or nothing.

 

It’s hard to describe but people usually get a feel for it.
If everything was probability zero except for

category tools 1
    item timed explosve 1

category Resources 9
    item wood 1
    item stone 1
 

Then for every item created there’s a 9 in 10 chance it’s going to be a resource,
and beyond that it’s a 50/50 whether it’s wood or stone.

1 time in 10 the item will be a tool and if it is a tool, it’s guaranteed to be c4, because there’s no other option.

 

When people are starting out I often suggest that they pick a handful of common items that could make up their base common loot, and set the probabilities for those items to something a good bit above zero, to allow room for other things to be less common.

Say you have wood with a probability of 10, for example,
you could then have stone at 7 so it’s less common and scrap at 3 so it’s even less common.

 

If the only category enabled was resources with those three items set that way,
and the profile’s asking for one item (for simplicity) then, on average, you’d get

scrap 3 time out of 20
stone 7 times out of 20
wood 10 times out of 20.

 

Of course I don’t expect anyone to follow the actual fractions like but you get the idea - It becomes a ‘feel’ thing.

ClockworkCat

Posted

Yeah, it was the minStack set to zero.  It was causing the mod to throw an error whenever one of those particular bots was killed as if it couldn't comprehend what the loot table should be and was falling back on what seems to be some kind of default loot table we have set up through something somewhere that I can't identify.  As soon as I changed the minStack to 1, everything worked as expected. 

And I know, the variables are a little wonky to toy with.  I could adjust them down, but it's a lot of hassle with how many profiles I have and figured it'd be something I tweaked in time.  For example, I have "knights" who have a 1 probability of resource, 1 probability of meds, and 2 probability of food.  The items that have probability set are bandages, cooked bear meat, raw bear meat, metal ore, refined ore, and sulfur ore.  They are set to drop 4 items.  Almost inevitably, I end up with spawns that have all three ores and one bandages.  Sometimes the ratio is what I'd expect with that blend, but more often than not, they have more than one ore on them.  It's not a big deal, and does help vary the loot a bit which is nice; it'll just take some tweaking on my end.

  • Administrator
Steenamaroo

Posted (edited)

I'll look into that and see what the problem is.
If MinStack or MaxStack is zero I ignore that item.
I guess the problem is that if it was the only item with > 0 probability I now need to ignore the category too.

I think I'll just force min+max to 1 if the user puts in 0 for either. That'll silently fix it.

 

For your apparent imbalance, I'lll see if I can replicate that or, better yet, maybe you'd attach or DM me that loottable json data file?
Looking at those numbers it should, I think, appear to be food heavy, as there's 4 items asked for a and a 50/50 chance of any given item being food.
 

Having 'AllowDuplicates' set to false in the global config can skew things for sparsely populated tables.
If, for example, it tries to give out raw bear meat twice, it'll just ignore the second attempt and roll again.

Be aware, though, that AllowDuplicates : true can make it look like you're getting fewer items
because if it gives Bandages : 1, Bandages : 2, raw meat 1, raw meat 3,
that's your four items but they'll stack into
Bandages :3, raw meat 4, and just look like two items.

Edited by Steenamaroo
ClockworkCat

Posted

I went back in and looked at the config again to make sure before sending a reply, and it turns out that two of the three sets of knights were set for 6 drops instead of four.  There's an issue where my server doesn't always save changes to a json despite saying it did.  I usually edit things on my PC and replace the files, but I know I wasn't doing that early on in this process before realizing the server was dropping the ball sometimes.  That would explain why I was getting that issue.  It's still a little silly sometimes, but this is much more what I expected to see.  As for the silent fix, that seems a reasonable solution, though probably a lot to go through to fix a problem that probably no one but me will ever have. XD

  • Like 1
  • Administrator
Steenamaroo

Posted

Hey, thanks for coming back to update.
That's good to know.

Hopefully that's the answer to what was going on but if you still find anything's not quite right don't hesitate to let me know,
Forcing Min/MaxStack to 1, if 0, is a one-line fix. I actually did it at the time so it'll be in the next update.

Always nice to catch a bug. 😉

andremelo90

Posted (edited)

hi, can i use multiple loottables? for instance, in weapons cat i would like to have weapons spawn with a random quantity stack of their proper ammo. Like shotguns, would spawn only with any kind of shells, Pistols ~ pistol ammo, and so on. For this i assume i would have to configure every weapon/ammo a specific loottable. Just like dm loot crates works.

Edited by andremelo90
  • Administrator
Steenamaroo

Posted

In the config for each entry you'll find a setting called "gunsWithAmmo"
If you set that to true then any guns which spawn will be accompanied with an amount of appropriate ammunition.

To directly answer your question, though, no. You can't have multiple loot tables apply to any given container type.

  • Love 1
  • Administrator
Steenamaroo

Posted

If memory serves you should keep the probabilities to zero for those ammo items - gunsWithAmmo is a probability ignore/override setup,
but the settings for minstack + maxstack are taken into account
so that you can manage the amount of ammo that will spawn with each weapon.

  • Like 1
0g.Ghost.7373

Posted

Can this be setup so only RandomRaids. uses the tables?

  • Administrator
Steenamaroo

Posted

There's API so that other plugins can make calls to CustomLoot.
RandomRaids could offer that as an option, if it doesn't already.

0g.Ghost.7373

Posted

I believe it already has it. I just don't wish for this plugin to change any other loot.

So what I mean is, can I make a loot table for "Npc Random Raids" only?

I just don't want to install this and it change other loot tables. I already hear about every little change I make. lol

  • Administrator
Steenamaroo

Posted

Oh, I see.
Yes, CustomLoot does nothing at all unless you enable profiles within the config and set up a valid loottable to go with them so, simply put,
if you just install it on the server and do nothing else, it wont change or interfere with anything.

What you'd do is install it, set up RandomRaids config to use a CustomLoot profile name (which you make up),
then the first time RandomRaids tries to ask CustomLoot for loot, CustomLoot will create a config entry, under API, of that name.

In console you'd see the following as confirmation.
                CustomLoot had a call for a profile that doesn't exist.
                Adding profile {NameHere} using loottable 'default'.


From there you can set up that new profile as if it was any other.

 

If you need any help beyond that, let me know.

Wammerl26

Posted

There is a bug in the custom loot plugin!!

The rifle ammunition is wrong for the loot and you can't use it
The weapon is too low

Unbenannt.PNG

Luuxen

Posted

8 hours ago, Wammerl26 said:

There is a bug in the custom loot plugin!!

The rifle ammunition is wrong for the loot and you can't use it
The weapon is too low

Unbenannt.PNG

This is not a bug, but this is the "ammo.snowballgun", it just have a wrong icon by rust default.
Try reload it in to the snowball gun and you see.
i suggest using a icon changer on the server and just make a icon for the snowball gun ammo your self, OR just remove ammo.snowballgun from the loot table if you dont want it.
Best
Luux

  • Like 1
  • Administrator
Steenamaroo

Posted

Thanks for the answer @Luuxen
I wouldn't have known that - You saved me some time. 👍

  • Haha 1
  • Love 1
0g.Ghost.7373

Posted

I think they did this with a few items. 

I found a Metal Fragment that would not stack with the rest. I dropped it and it's a black blob(crude oil?), I let it despawn. 

  • Like 1
0g.Ghost.7373

Posted

If a Plugin asks if we wish to use CustomLoot and only has a way to say yes, I take it that it uses the default loot table json?

  • Administrator
Steenamaroo

Posted (edited)

I can only guess, without knowing a bit more,
but if true/false is the only option I'd assume it's giving you the option to prevent CustomLoot from filling some container/corpse, in the event that you already have CustomLoot set up for that container/corpse type.

Edited by Steenamaroo
0g.Ghost.7373

Posted

40 minutes ago, Steenamaroo said:

I can only guess, without knowing a bit more,
but if true/false is the only option I'd assume it's giving you the option to prevent CustomLoot from filling some container/corpse, in the even that you already have CustomLoot set up for that container/corpse type.

 I ment to add pick CL as an option too. In BossMonster it has this,

  "Which loot table should the plugin use? (0 - default; 1 - own; 2 - AlphaLoot; 3 - CustomLoot; 4 - loot table of the Rust objects; 5 - combine the 1 and 4 methods)": 

I tried using 3 and reloading BM but it added nothing to CL. So which CL would it be using?

I originally wasn't going to use CL for anything but one plugin but it has grown on me. SO I am slowly moving everything over to use it. 

Thanks for a great plugin!

  • Like 1
  • Administrator
Steenamaroo

Posted (edited)

I can only really reiterate what I said before, because I don't know that plugin,
but my assumption would be that if you already have CustomLoot set up to put loot on the type of npc that plugin spawns, then the option provided would let you prevent that from happening for BossMonster npcs.

It sounds like when I had 'Allow_Alphaloot' in BotReSpawn.
I had dozens of people asking 'where do I put the loot table name' when, really, the option was preventative and should have been called 'Prevent_Alphaloot'.

 

Maybe the author would consider adding "CustomLoot_Profile" as a string option, and making their own call for loot to CustomLoot if that's not empty.
That would give more control.

Edited by Steenamaroo
  • Like 2
0g.Ghost.7373

Posted

On 6/5/2021 at 7:28 AM, TheBot said:

Since wipe I have had reports from players that they are finding 5.56 ammo in loot that does not have a name. This in turn caused my stacking plugin to spam console

I had that issue last wipe. Not seen it yet this one.

0g.Ghost.7373

Posted

Any idea why only one loot json added the new items?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Like 3
  • Love 6

User Feedback

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.