Kolya Medz 0 Posted February 2, 2020 How do you make all or at least most enemies drop loot every time they die. Is this even possible? I figured out how to edit and compile the scripts but I'm not sure what to change or add k_def_spawn01 PlaceCritterTreasure(OBJECT_SELF, Random(4)-2); not sure if this is the right line.. i want all the critters to have treasure Thanks! Quote Share this post Link to post Share on other sites
AmanoJyaku 184 Posted February 2, 2020 4 hours ago, Kolya Medz said: k_def_spawn01 PlaceCritterTreasure(OBJECT_SELF, Random(4)-2); I believe that is correct. Random(4) can return any value from 0-4. If it returns 0, 1, or 2, the value passed to PlaceCritterTreasure() would be 0 or less after subtracting 2. This will prevent treasure drops since that is the quantity to be dropped (e.g. -2, -1, 0, 1 or 2 items). So, whatever value is passed as a second argument (i.e. replacing the expression Random(4)-2) needs to evaluate to 1 or greater. Note that drops are extremely random, and are partially based on your level. You may be better off with the cheat console. Quote Share this post Link to post Share on other sites
Kolya Medz 0 Posted February 2, 2020 I love you. Thank you for explaining that line. So random(1)+1 should "always" give loot since it only returns 1 or 2. Quote Share this post Link to post Share on other sites
AmanoJyaku 184 Posted February 2, 2020 Correct. For enemies that have that script, you have a 100% chance of getting loot. I've never tested this, but this is what I read from the script code. You have a 50% chance of getting one or more items of a single type (returns 1, e.g. 1 or more med packs), and a 50% chance of getting one or more items of two (potentially different) types (returns 2, e.g. 1 or more med packs, and 1 or more blaster pistols). To test this properly, you'll either: 1) Want to be on Telos or later. As far as I know, most of the enemies on Peragus and the Harbinger have the no-treasure script attached. 2) Modify the early enemies. But, that requires modifying every enemy's UTC file. 3) Modify the no-treasure script itself. But, that can be confusing if you aren't good at keeping track of your files. Whichever option you choose is up to you. Quote Share this post Link to post Share on other sites