Jump to content

About loot for some bots

Pending 1.4.1

maxalt
maxalt

Posted

Hello, and thank you always for providing such a fun server!

Previously, I received help setting up zombie loot so that they only drop skulls using CustomLoot — and it's working great!

However, I'm wondering if it's possible to add extra items to some specific bots in addition to the skulls.

For example, at the Water Treatment Plant, I have 30 zombies spawning, and one of them is a stronger zombie that I've configured through Kits to carry an L96.
I'd like this one to also carry a skull and a bluedogtag. (Both items can be sold for RP at the Shop.)

I tried giving items through Kits to its inventory, but it seems like the zombie only drops the skull — everything else disappears.

Is there any workaround or method to make this work?

  • Administrator
Steenamaroo

Posted

Hi,

If it's just single, or a few, specific items like that it's probably easiest to just add them to a customloot table for that npc profile.

Just duplicate and rename your current customloot table - the one that gives skulls,
then in /config/CustomLoot.json, apply that new name to whatever profile you're working on  as "lootTable".
While you're there, make sure minItems and maxItems are set to 2

Now open and edit that new loot table and set "Resources" category probability to 1, then search to find "bluedogtags" entry and set its probability to 1.


Alternatively you can just set all probabilities to zero and just use the AlwaysSpawnList, at the top of your /data/Customloot... loot table file.
Like this.

  "AlwaysSpawnList": [
      "bluedogtags",
      "skull.human"
    ],

 

maxalt

Posted

1時間前、Steenamarooは言った:

こんにちは、

そのような単一の、またはいくつかの特定のアイテムである場合、おそらくそのnpcプロファイルのカスタムルートテーブルに追加するのが最も簡単です。

現在のカスタムルートテーブルを複製して名前を変更するだけです - 頭蓋骨を与えるもの、
次に、/config/CustomLoot.jsonで、その新しい名前を「lootTable」として作業しているプロファイルに適用します。
そこにいる間、minItemsとmaxItemsが2に設定されていることを確認してください

次に、新しい戦利品テーブルを開いて編集し、「リソース」カテゴリの確率を1に設定し、検索して「bluedogtags」エントリを見つけ、その確率を1に設定します。


または、すべての確率をゼロに設定し、/data/Customloot...ルートテーブルファイルの上部にあるAlwaysSpawnListを使用することもできます。
このように。

"AlwaysSpawnList": [「bluedogtags」、「skull.human」]、

 

Thank you very much.

When you say to duplicate a custom loot table, do you mean the sk.json file I previously created that only drops skulls?

Should I simply copy that file and rename it?

 

By the way, I’m currently using the /botrespawn command in-game to configure settings.

I’ve set it so that for each monument or biome, I spawn 1 strong zombie using the “Edit Kits” section with Zombie29 and Hunter1.

  • Administrator
Steenamaroo

Posted (edited)

"Should I simply copy that file and rename it?"
Yes, that's right.

I mean, you can just open the /config/CustomLoot/json and enter a new (unique) loottable name for your WaterTreatment guys,
then reload the plugin and it will create a new blank table (just like previous instructions).
From there you'd set up your skull and your dog tags.

The duplicate approach just saves you a few steps, since you already have a loottable giving skulls,
and you want a new one to give skulls plus other items.

The easiest option is probably the one I described using the AlwaysSpawnList inside your customloot loot table json.

 

 

The approaches I've described are all within, and handled by CustomLoot - Nothing to do with BotReSpawn or Kits.

You could add the items you want to the npc profile's kit, if you wanted,
but then you'd have to set custom loot's "Clear Container First" to false for that profiles CustomLoot table,
and then set Allow_Rust_Loot_Percent to zero for that profile in BotReSpawn.

That's more complicated, and your'e already using CustomLoot so you might as well handle it there. 👍

 

 

Edited by Steenamaroo
maxalt

Posted

Am I editing it correctly like this?

IMG_6416.png

  • Administrator
Steenamaroo

Posted (edited)

I doubt commas are a good idea in loottable / file names.
If you're trying to apply two loot tables there, that's not a thing.

There's a few different approaches but the simplest would be to give the WaterTreatment BotReSpawn entry, in /config/CustomLoot.json, a new loot table name,
then reload CustomLoot so it creates that file,
then edit that file (in /data/CustomLoot) with the AlwaysSpawnList that as I pasted above.
That takes probability out of the equation and keeps things simple.

 If you need to refer back to previous support where I outlined creating and setting a loot table, do that. 👍

That should get you your skull and tags for that particular BotReSpawn profile.

Edited by Steenamaroo
maxalt

Posted

Sorry for the trouble.

To be honest, I’m still not entirely sure how BotReSpawn and CustomLoot work.

Would it be okay if I summarize what I’m trying to do?

 

What I want to achieve:

 

I have strong zombies (Hunter) spawning only at large monuments, and I want only the Hunters to carry one skull and one bluedogtag.

In other areas such as biomes, harbors, and rad towns, I only want regular zombies, and they should drop only skulls.

 

 

Regarding the method you mentioned—does it go like this?

 

In config/CustomLoot.json, I assign a LootTable (e.g. “Hunter”) to monuments like Water Treatment or Airfield, then reload CustomLoot.

In data/CustomLoot/Hunter.json, I set the chance for skull.human to 1, and also set bluedogtags to 1.

 

 

Is this correct?

 

However, there’s one thing I still don’t understand.

I want regular zombies to drop only skulls, and Hunters to drop skulls and bluedogtags.

But if I assign the “Hunter” LootTable to a monument, wouldn’t the regular zombies there also drop bluedogtags?

Sorry to bother you again, and thank you for your help.

  • Administrator
Steenamaroo

Posted (edited)

"To be honest, I’m still not entirely sure how BotReSpawn and CustomLoot work."

You can basically forget about BotReSpawn. No changes need to be made there.

CustomLoot can 'see' barrels, crates, and corpses.
It's written to recognise what profile any given BotReSpawn corpse is from.

All the work for managing loot is done in CustomLoot's files.

 

 

 

Regarding the method you mentioned—does it go like this?

In config/CustomLoot.json, I assign a LootTable (e.g. “Hunter”) to monuments like Water Treatment or Airfield, then reload CustomLoot.

In data/CustomLoot/Hunter.json, I set the chance for skull.human to 1, and also set bluedogtags to 1.

Is this correct?

Yes, that sounds good.
If you're using probabilities make sure the "Resources" category is set to probability 1 also, and that the profile (in config file)
is set for min/max items = 2.

 

 

However, there’s one thing I still don’t understand.

I want regular zombies to drop only skulls, and Hunters to drop skulls and bluedogtags.

Just make sure that the BotReSpawn profiles for regular zombies are using your original CustomLoot loot table - The one with skulls only.


Really, in summary, all you're doing is making a new loot table with extra stuff and assigning it to select BotReSpawn profiles.
The ones which should remain skull-only shouldn't be changed. 👍

Edited by Steenamaroo
1.8m

Downloads

Total number of downloads.

8.4k

Customers

Total customers served.

127.4k

Files Sold

Total number of files sold.

2.6m

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.