Page 1 of 1

Regarding NPCs' loot

Posted: 26 Aug 2017, 12:41
by Thumba-umba
Basically i am a bit disoriented, since CoC has clearly changed the way the loot system works.
I have run a small test, editing character_desc_general. In the <supplies> section, i have addded "grenade_f1 = 10 \n" for each loadout of a specific faction. When i try trading with them, i see nine grenades in te inventory (i assume it is ten minus one equipped). However when i kill them and search the bodies, i see ranbom number of grenades, between zero and ten; that is despite the fact of death_generic having a line: "grenade_f1 = 0, 1".
At this point i realised, "i am surely missing something", and went here to ask.
What is a relation between NPC's "alive" inventory, and his "dead" inventory?

Re: Regarding NPCs' loot

Posted: 28 Aug 2017, 12:47
by Diegtiarov
Check out the scripts; iirc entire NPCs equipment is sent to one of the scripts then items are one by one returned in certain condition or released.
I think that grenades for grenade launcher are added to the corpse whenever sufficent weapon is present in the equipment.

For references(or however they were called) like IsOutfit or IsWeapon check the _g.script for valid sections.