Adding item to Scientist inventory on death?Solved
Is it possible?
No it is not, the Scientists are game created and already have default loot , if you want other scientists/murderers on your server you could try BotSpawn plugin which allows you to assign a created kit to each group of bots and they usually have a good amount of loot as well as the weapon they are holding, I have 243 bots running around the server which livens things up a bit,
I know. I use both BotSpawn and Kits, but I want to randomize the inventory a bit. There's several plugins for modifying barrel drops and supply drops etc, but there seems to be nothing that does that with NPCs.. even on chaoscode... there must be a way to do that...
As far as i know there isnt, game bots are game controlled they are not client side editable
Default had a plugin that let you alter the loot that a scientist carries, but he has removed them all from his site due to someone stealing or something. Pity, there was a lot of good stuff there.
That does suck. That would be useful.

Merged post

Ok I'm trying to add a pickaxe to BotSpawn bots inventory when they die...

void OnEntitySpawned(BaseEntity entity)
		{
		if (entity is NPCPlayerCorpse) {
		var corpse = entity as NPCPlayerCorpse;
		var additem = ItemManager.CreateByName("pickaxe", 1, 876264389); 
        additem.MoveToContainer(corpse.containers[0]);
		}
		}​

Doesn't work... what am I doing wrong? Thanks.

Merged post

Anyone? Bueller?
In response to pookins ():
As far as i know there isnt, game bots are game controlled they are not client side editable
Dude, You are on the forum related to server modding, what does it have to do with client-side? R u high?
Dude you got anything interesting to solve the problem ? I am not talking about a SERVER client = player , I am talking about someone who runs a server  = a RUST client,

And according to Steenamaroo who is the botspawn dev, he is not able to do anything with the game bots in regard to adding more loot,

 

Easy guys. :)

Merged post

Managed to get something working. So solved for now.
In response to pookins ():
Dude you got anything interesting to solve the problem ? I am not talking about a SERVER client = pl...
You can add anything you want to a bots corpse with a plugin: (first 3 are game's default loot and skinned items I added with a plugin)

What plugin ?
In response to pookins ():
What plugin ?
Didn't find any so I had to make one myself.
So you managed to make a plugin that configures HTNPlayers which includes military tunnel,loot pile, CH47 and cargo ship scientists ? 
In response to pookins ():
So you managed to make a plugin that configures HTNPlayers which includes military tunnel,loot pile,...
Well technically it simply injects items that I want into the corpse's inventory that spawns when the bot dies.
"Doesn't work... what am I doing wrong? Thanks."
You might need to do it a tick or two later, so you're adding items after Facepunch setup/item moving is complete.

"And according to Steenamaroo who is the botspawn dev, he is not able to do anything with the game bots in regard to adding more loot."

It's certainly possible. I just didn't want to add full loot table functionality to BotSpawn as it's complicated enough already,
but I did write a separate plugin (not released) exclusively for NPCPlayer/HTNPlayer corpse loot tables.

BotSpawn does move the kit items over to the corpse, but the method used in the current version sucks. :P
Locked automatically