Jump to content

Recommended Posts

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.

Edited by unique kantilope

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...