Jump to content

Recommended Posts

Sorry my English is not very good.
So these words Come through GOOGLE Translation.
Thank you for willingness to read this article and help me pick out the problem


New I have some problem in my character.

the first one was about of food
I want my character to eat about monstermeat There is no health to punish but  More sanity deduction

I know about one mod have this effect than I cope it

but it can't use in my character .It would cause an error.

I don't know where's the problem,can i fix it?

Here is I cope it 

Quote

    function inst.components.eater:Eat( food )
        if self:CanEat(food) then
            if food.prefab == "meat" or food.prefab == "smallmeat" or food.prefab == "batwing" or food.prefab == "froglegs" or food.prefab == "plantmeat" then
                    food.components.edible.sanityvalue = 0
            elseif food.prefab == "monstermeat" then
                    food.components.edible.healthvalue = 0
                    food.components.edible.sanityvalue = -30
            elseif food.prefab == "cookedmonstermeat" then
                    food.components.edible.healthvalue = 0
                    food.components.edible.sanityvalue = -20
            elseif food.prefab == "monstermeat_dried" then
                    food.components.edible.healthvalue = 0
                    food.components.edible.sanityvalue = -15
            elseif food.prefab == "drumstick" then
                    food.components.edible.healthvalue = 2
                    food.components.edible.hungervalue = 15
                    food.components.edible.sanityvalue = 5
            elseif food.prefab == "drumstick_cooked" then
                    food.components.edible.healthvalue = 5
                    food.components.edible.hungervalue = 18
                    food.components.edible.sanityvalue = 5
            elseif food.prefab == "turkeydinner" then
                    food.components.edible.healthvalue = 40
                    food.components.edible.sanityvalue = 40
                    food.components.edible.hungervalue = 80
            elseif food.prefab == "monsterlasagna" then
                    food.components.edible.healthvalue = 0
                    food.components.edible.sanityvalue = -40
            end
        end
    return inst.components.eater:EatMEAT(food)
    end

Did I need to throw up my complete file?

 

 

Edited by Sinster-A

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...