unique kantilope Posted February 23, 2020 Share Posted February 23, 2020 as the title says, i'd like to add loot to the drops of various creatures. i'm working on a character mod, and part of the mod involves the character gaining nightmare fuel for killing things (nearly all animals & monsters in base DS & RoG, maybe SW too, but for the moment i'm not worrying about SW compatibility) ideally, i'd individually set the chance for nightmare fuel to drop from each mob (the more threatening, the more likely NF will drop. for now however, i just want to get the ball rolling, so i've been trying to set a handful of mobs to always drop 1 NF. but the game crashes and doesn't so much as do me the courtesy of giving me a proper crash report to work with. here's what i've tried to use so far (i was using it in my character's prefab): solved it: (this goes in modmain) GetPlayer = GLOBAL.GetPlayer AddPrefabPostInit("rabbit", function(inst) if GetPlayer().prefab == "sigarda" then inst.components.lootdropper:AddChanceLoot("nightmarefuel",1) end end) AddPrefabPostInit("bee", function(inst) if GetPlayer().prefab == "sigarda" then inst.components.lootdropper:AddChanceLoot("nightmarefuel",1) end end) while i'm here, there's one more thing i need for the character to be complete. i want her to be able to use the night light for warmth+dryness+coolness as appropriate, and to get + 3sanity/min while near it. i only want these benefits to be active while it is lit. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.