Jump to content

Perk Coding Help


Recommended Posts

This is really my first time working with anything like this, but I am trying to work on my first mod. My character is a hellhound and I got the sprite edited, however I have no idea how to add her modifiers.

 

I'm hoping to add:

 

Heat/Fire invincibility

Hates to get wet (lowers sanity badly)

Hounds don't attack her, and perhaps she can even make them follow her (a companion or pack of hounds?)

Gets more out of meat products than other things (she can eat other stuff but the meats will give her better health/sanity/ etc bonuses)

 

I'd be willing to draw something up for someone that can help since I lack in code, but I'm pretty good at art!

Link to comment
Share on other sites

This is really my first time working with anything like this, but I am trying to work on my first mod. My character is a hellhound and I got the sprite edited, however I have no idea how to add her modifiers.

 

I'm hoping to add:

 

Heat/Fire invincibility

Hates to get wet (lowers sanity badly)

Hounds don't attack her, and perhaps she can even make them follow her (a companion or pack of hounds?)

Gets more out of meat products than other things (she can eat other stuff but the meats will give her better health/sanity/ etc bonuses)

 

I'd be willing to draw something up for someone that can help since I lack in code, but I'm pretty good at art!

 

So far I figured out how to do the heat tolerance but that is about it. I been trying to figure out how to add the other things.

Link to comment
Share on other sites

Fire immunity:

inst.components.health.fire_damage_scale = TUNING.WILLOW_FIRE_DAMAGEinst.components.health.fire_timestart = TUNING.WILLOW_FIRE_IMMUNITY

Heat immunity:

local function onstartoverheating(inst)	inst.components.temperature:SetTemperature(23)endinst:ListenForEvent("startoverheating", onstartoverheating)

Hates getting wet:

local function onmoisturedelta(inst)	if inst.components.moisture:IsWet() then		inst.components.sanity.dapperness = TUNING.DAPPERNESS_TINY*-1	else		inst.components.sanity.dapperness = 0	endendinst:ListenForEvent("moisturedelta", onmoisturedelta)

On the third line, these are the values for sanity drain:

Tiny: 1.33:60s
Small: 2:60s
Med: 3.33:60s
Large: 6.66:60s
Huge: 20:60s

 

So in the example, it drains 1.33 sanity every 60 seconds (DAPPERNESS_TINY)

 

Hounds don't attack you:

inst:AddTag("hound")

Not sure on how to make them your followers.

 

 

Now the next one can be done in three ways, bonus for eating meat:

 

Way 1, flat bonus:

local function oneat(inst, food)	if food and food.components.edible and food.components.edible.foodtype == FOODTYPE.MEAT then)		inst.components.health:DoDelta(5) -- Flat health bonus (+5)		inst.components.hunger:DoDelta(5) -- Flat hunger bonus		inst.components.sanity:DoDelta(5) -- Flat sanity bonusendif inst.components.eater == nil then    inst:AddComponent("eater")endinst.components.eater:SetOnEatFn(oneat)

Way 2, bonus depending on the food values but not affecting negative values (monster meat health and sanity drain) :

local function oneat(inst, food)	if food and food.components.edible and food.components.edible.foodtype == FOODTYPE.MEAT then			local healthvalue = food.components.edible.healthvalue		local hungervalue = food.components.edible.foodvalue		local sanityvalue = food.components.edible.sanityvalue				if healthvalue and healthvalue >= 0 then			inst.components.health:DoDelta(healthvalue * 1.5) -- Multiplies food's health value by 1.5		end		if hungervalue and hungervalue >= 0 then			inst.components.hunger:DoDelta(hungervalue * 1.5) -- Multiplies food's hunger value by 1.5		end		if sanityvalue and sanityvalue >= 0 then			inst.components.sanity:DoDelta(sanityvalue * 1.5) -- Multiplies food's sanity value by 1.5		end	endendif inst.components.eater == nil then    inst:AddComponent("eater")endinst.components.eater:SetOnEatFn(oneat)

Way 3, bonus depending on food values and making all negative meat values positive (monster meat health and sanity drain) :

local function oneat(inst, food)	if food and food.components.edible and food.components.edible.foodtype == FOODTYPE.MEAT then			local healthvalue = food.components.edible.healthvalue		local hungervalue = food.components.edible.foodvalue		local sanityvalue = food.components.edible.sanityvalue				if healthvalue and not healthvalue = 0 then			if healthvalue >= 0 then			inst.components.health:DoDelta(healthvalue * 1.5) -- Multiplies food's health value by 1.5			else			inst.components.health:DoDelta(healthvalue * -1.5) -- Multiplies food's health value by 1.5 and makes it positive			end		end		if hungervalue and not hungervalue = 0 then			if hungervalue >= 0 then			inst.components.hunger:DoDelta(hungervalue * 1.5) -- Multiplies food's hunger value by 1.5			else			inst.components.hunger:DoDelta(hungervalue * -1.5) -- Multiplies food's hunger value by 1.5 and makes it positive			end		end		if sanityvalue and not sanityvalue = 0 then			if sanityvalue >= 0 then			inst.components.sanity:DoDelta(sanityvalue * 1.5) -- Multiplies food's sanity value by 1.5			else			inst.components.sanity:DoDelta(sanityvalue * -1.5) -- Multiplies food's sanity value by 1.5 and makes it positive			end		end	endendif inst.components.eater == nil then    inst:AddComponent("eater")end

I'm going to use the third way, you can replace one with another in the final result however you like though.

 

Final result

All that put together in your character lua file would look like this (more notes and comments added to make it easier to understand) :

 

local MakePlayerCharacter = require "prefabs/player_common"local assets = {        Asset( "ANIM", "anim/player_basic.zip" ),        Asset( "ANIM", "anim/player_idles_shiver.zip" ),        Asset( "ANIM", "anim/player_actions.zip" ),        Asset( "ANIM", "anim/player_actions_axe.zip" ),        Asset( "ANIM", "anim/player_actions_pickaxe.zip" ),        Asset( "ANIM", "anim/player_actions_shovel.zip" ),        Asset( "ANIM", "anim/player_actions_blowdart.zip" ),        Asset( "ANIM", "anim/player_actions_eat.zip" ),        Asset( "ANIM", "anim/player_actions_item.zip" ),        Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ),        Asset( "ANIM", "anim/player_actions_bugnet.zip" ),        Asset( "ANIM", "anim/player_actions_fishing.zip" ),        Asset( "ANIM", "anim/player_actions_boomerang.zip" ),        Asset( "ANIM", "anim/player_bush_hat.zip" ),        Asset( "ANIM", "anim/player_attacks.zip" ),        Asset( "ANIM", "anim/player_idles.zip" ),        Asset( "ANIM", "anim/player_rebirth.zip" ),        Asset( "ANIM", "anim/player_jump.zip" ),        Asset( "ANIM", "anim/player_amulet_resurrect.zip" ),        Asset( "ANIM", "anim/player_teleport.zip" ),        Asset( "ANIM", "anim/wilson_fx.zip" ),        Asset( "ANIM", "anim/player_one_man_band.zip" ),        Asset( "ANIM", "anim/shadow_hands.zip" ),        Asset( "SOUND", "sound/sfx.fsb" ),        Asset( "SOUND", "sound/wilson.fsb" ),        Asset( "ANIM", "anim/beard.zip" ),}local prefabs = {}local start_inv = {	-- Custom starting items}-- Heat Immunity functionlocal function onstartoverheating(inst)	inst.components.temperature:SetTemperature(23) -- Sets the temperature to 23ºCend-- Wetness Debuff functionlocal function onmoisturedelta(inst)	if inst.components.moisture:IsWet() then -- If the character is wet		inst.components.sanity.dapperness = TUNING.DAPPERNESS_TINY*-1 -- Drain sanity at a rate of 1.33/minute	else -- If the character is not wet		inst.components.sanity.dapperness = 0 -- Reset the sanity drain to 0	endend-- Eating Meat Bonuslocal function oneat(inst, food)	if food and food.components.edible and food.components.edible.foodtype == FOODTYPE.MEAT then -- If it is food, edible, and meat			local healthvalue = food.components.edible.healthvalue -- Shortcuts for having to write only "healthvalue" instead of "food.components.edible.healthvalue"		local hungervalue = food.components.edible.foodvalue		local sanityvalue = food.components.edible.sanityvalue				if healthvalue and not healthvalue = 0 then -- If the food item has a health value, and it isn't 0			if healthvalue >= 0 then -- If the food item's health value is over 0			inst.components.health:DoDelta(healthvalue * 1.5) -- Multiplies food's health value by 1.5			else -- If the food item's health value is below 0			inst.components.health:DoDelta(healthvalue * -1.5) -- Multiplies food's health value by 1.5 and makes it positive			end		end		if hungervalue and not hungervalue = 0 then			if hungervalue >= 0 then			inst.components.hunger:DoDelta(hungervalue * 1.5) -- Multiplies food's hunger value by 1.5			else			inst.components.hunger:DoDelta(hungervalue * -1.5) -- Multiplies food's hunger value by 1.5 and makes it positive			end		end		if sanityvalue and not sanityvalue = 0 then			if sanityvalue >= 0 then			inst.components.sanity:DoDelta(sanityvalue * 1.5) -- Multiplies food's sanity value by 1.5			else			inst.components.sanity:DoDelta(sanityvalue * -1.5) -- Multiplies food's sanity value by 1.5 and makes it positive			end		end	endend-- This initializes for both clients and the hostlocal common_postinit = function(inst)	inst.MiniMapEntity:SetIcon( "wilson.tex" ) -- Minimap iconend-- This initializes for the host onlylocal master_postinit = function(inst)	inst.soundsname = "wilson" -- The sounds your character will play		-- Stats		inst.components.health:SetMaxHealth(150) -- Base health	inst.components.hunger:SetMax(150) -- Base hunger	inst.components.sanity:SetMax(150) -- Base sanity		-- Fire Immunity	inst.components.health.fire_damage_scale = TUNING.WILLOW_FIRE_DAMAGE -- Willow's fire immunity	inst.components.health.fire_timestart = TUNING.WILLOW_FIRE_IMMUNITY -- Willow's fire immunity		-- Heat Immunity	inst:ListenForEvent("startoverheating", onstartoverheating) -- Wait for the event saying the character starts overheating, and execute a function when it does		-- Wetness Debuff	inst:ListenForEvent("moisturedelta", onmoisturedelta) -- Wait for the event saying the moisture of the character has changed, and execute a function when it does		-- Hounds don't attack you	inst:AddTag("hound") -- Add the tag "hound" to the player		-- Add the eater component	if inst.components.eater == nil then -- If the character doesn't have the component    inst:AddComponent("eater") -- Add the component "eater" to let us execute a function when it eats	end	-- Execute a function when the character eats	inst.components.eater:SetOnEatFn(oneat) -- Execute a function when the character eats	endreturn MakePlayerCharacter("wilson", prefabs, assets, common_postinit, master_postinit, start_inv)

 

 

I may have missed something in the final result as I just grabbed the first modded character template I had, and I don't make character mods. You have to change some things such as the character prefab and sound it makes.

 

 

EDIT: The final code and comments are much easier to read if you paste it into Notepad++, Sublime Text or Pastebin.

Edited by DrSmugleaf
Link to comment
Share on other sites

Thanks for helping, however when I plug it all in I keep getting this error

 

when loading up I get

 

 

string ["scripts/malfunctions.lua"]:92: Error loading file prefabs/rosedisciple

[string"../mods/Rose Disciple/scripts/prefans/rosedisciple.lua"]:70: 'then' epected near '='

Lua Error Stack Traceback;

=[C] in functions 'assert'

scripts/malfunctions.lua (92,1)

=(tail call)?

=[c} in function 'xpcall'

scripts/mods.lua (144,1)

 

 

_______________________________________________________________code below

 

local MakePlayerCharacter = require "prefabs/player_common"
 
 
local assets = {
 
        Asset( "ANIM", "anim/player_basic.zip" ),
        Asset( "ANIM", "anim/player_idles_shiver.zip" ),
        Asset( "ANIM", "anim/player_actions.zip" ),
        Asset( "ANIM", "anim/player_actions_axe.zip" ),
        Asset( "ANIM", "anim/player_actions_pickaxe.zip" ),
        Asset( "ANIM", "anim/player_actions_shovel.zip" ),
        Asset( "ANIM", "anim/player_actions_blowdart.zip" ),
        Asset( "ANIM", "anim/player_actions_eat.zip" ),
        Asset( "ANIM", "anim/player_actions_item.zip" ),
        Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ),
        Asset( "ANIM", "anim/player_actions_bugnet.zip" ),
        Asset( "ANIM", "anim/player_actions_fishing.zip" ),
        Asset( "ANIM", "anim/player_actions_boomerang.zip" ),
        Asset( "ANIM", "anim/player_bush_hat.zip" ),
        Asset( "ANIM", "anim/player_attacks.zip" ),
        Asset( "ANIM", "anim/player_idles.zip" ),
        Asset( "ANIM", "anim/player_rebirth.zip" ),
        Asset( "ANIM", "anim/player_jump.zip" ),
        Asset( "ANIM", "anim/player_amulet_resurrect.zip" ),
        Asset( "ANIM", "anim/player_teleport.zip" ),
        Asset( "ANIM", "anim/wilson_fx.zip" ),
        Asset( "ANIM", "anim/player_one_man_band.zip" ),
        Asset( "ANIM", "anim/shadow_hands.zip" ),
        Asset( "SOUND", "sound/sfx.fsb" ),
        Asset( "SOUND", "sound/wilson.fsb" ),
        Asset( "ANIM", "anim/beard.zip" ),
 
        Asset( "ANIM", "anim/rosedisciple.zip" ),
        Asset( "ANIM", "anim/ghost_rosedisciple_build.zip" ),
}
local prefabs = {}
 
-- Custom starting items
local start_inv = {
 "tentaclespike",
 
}
 
-- Heat Immunity function
local function onstartoverheating(inst)
    inst.components.temperature:SetTemperature(23) -- Sets the temperature to 23ºC
end
 
-- Wetness Debuff function
local function onmoisturedelta(inst)
    if inst.components.moisture:IsWet() then -- If the character is wet
        inst.components.sanity.dapperness = TUNING.DAPPERNESS_TINY*-1 -- Drain sanity at a rate of 1.33/minute
    else -- If the character is not wet
        inst.components.sanity.dapperness = 0 -- Reset the sanity drain to 0
    end
end
 
-- Eating Meat Bonus
local function oneat(inst, food)
    if food and food.components.edible and food.components.edible.foodtype == FOODTYPE.MEAT then -- If it is food, edible, and meat
     
        local healthvalue = food.components.edible.healthvalue -- Shortcuts for having to write only "healthvalue" instead of "food.components.edible.healthvalue"
        local hungervalue = food.components.edible.foodvalue
        local sanityvalue = food.components.edible.sanityvalue
         
        if healthvalue and not healthvalue = 0 then -- If the food item has a health value, and it isn't 0
            if healthvalue >= 0 then -- If the food item's health value is over 0
            inst.components.health:DoDelta(healthvalue * 1.5) -- Multiplies food's health value by 1.5
            else -- If the food item's health value is below 0
            inst.components.health:DoDelta(healthvalue * -1.5) -- Multiplies food's health value by 1.5 and makes it positive
            end
        end
        if hungervalue and not hungervalue = 0 then
            if hungervalue >= 0 then
            inst.components.hunger:DoDelta(hungervalue * 1.5) -- Multiplies food's hunger value by 1.5
            else
            inst.components.hunger:DoDelta(hungervalue * -1.5) -- Multiplies food's hunger value by 1.5 and makes it positive
            end
        end
        if sanityvalue and not sanityvalue = 0 then
            if sanityvalue >= 0 then
            inst.components.sanity:DoDelta(sanityvalue * 1.5) -- Multiplies food's sanity value by 1.5
            else
            inst.components.sanity:DoDelta(sanityvalue * -1.5) -- Multiplies food's sanity value by 1.5 and makes it positive
            end
        end
    end
end
 
 
-- This initializes for both clients and the host
local common_postinit = function(inst)
    inst.MiniMapEntity:SetIcon( "rosedisciple.tex" ) -- Minimap icon
end
 
-- This initializes for the host only
local master_postinit = function(inst)
    inst.soundsname = "willow" -- The sounds your character will play
    inst.components.temperature.inherentinsulation = (TUNING.INSULATION_MED * 5)
inst.components.temperature.mintemp = 20
inst.components.temperature.maxtemp = 60
inst.components.health.fire_damage_scale = 0
inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 7.2)
inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 8.3)
-- Uncomment if "wathgrithr"(Wigfrid) or "webber" voice is used
    --inst.talker_path_override = "dontstarve_DLC001/characters/"
    -- Stats    
    inst.components.health:SetMaxHealth(200) -- Base health
    inst.components.hunger:SetMax(150) -- Base hunger
    inst.components.sanity:SetMax(150) -- Base sanity
    
    -- Fire Immunity
    inst.components.health.fire_damage_scale = TUNING.WILLOW_FIRE_DAMAGE -- Willow's fire immunity
    inst.components.health.fire_timestart = TUNING.WILLOW_FIRE_IMMUNITY -- Willow's fire immunity
    
    -- Heat Immunity
    inst:ListenForEvent("startoverheating", onstartoverheating) -- Wait for the event saying the character starts overheating, and execute a function when it does
    
    -- Wetness Debuff
    inst:ListenForEvent("moisturedelta", onmoisturedelta) -- Wait for the event saying the moisture of the character has changed, and execute a function when it does
    
    -- Hounds don't attack you
    inst:AddTag("hound") -- Add the tag "hound" to the player
    
    -- Add the eater component
    if inst.components.eater == nil then -- If the character doesn't have the component
    inst:AddComponent("eater") -- Add the component "eater" to let us execute a function when it eats
    end
    -- Execute a function when the character eats
    inst.components.eater:SetOnEatFn(oneat) -- Execute a function when the character eats
    
-- Damage multiplier (optional)
    inst.components.combat.damagemultiplier = 9
 
-- Hunger rate (optional)
inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE
end
 
return MakePlayerCharacter("rosedisciple", prefabs, assets, common_postinit, master_postinit, start_inv)
Link to comment
Share on other sites

That would be because I'm terrible.

It was in this part:

        if healthvalue and not healthvalue = 0 then -- If the food item has a health value, and it isn't 0            if healthvalue >= 0 then -- If the food item's health value is over 0            inst.components.health:DoDelta(healthvalue * 1.5) -- Multiplies food's health value by 1.5            else -- If the food item's health value is below 0            inst.components.health:DoDelta(healthvalue * -1.5) -- Multiplies food's health value by 1.5 and makes it positive            end        end        if hungervalue and not hungervalue = 0 then            if hungervalue >= 0 then            inst.components.hunger:DoDelta(hungervalue * 1.5) -- Multiplies food's hunger value by 1.5            else            inst.components.hunger:DoDelta(hungervalue * -1.5) -- Multiplies food's hunger value by 1.5 and makes it positive            end        end        if sanityvalue and not sanityvalue = 0 then            if sanityvalue >= 0 then            inst.components.sanity:DoDelta(sanityvalue * 1.5) -- Multiplies food's sanity value by 1.5            else            inst.components.sanity:DoDelta(sanityvalue * -1.5) -- Multiplies food's sanity value by 1.5 and makes it positive            end        end
The first line of each of the 3 groups are written wrong:

        if healthvalue and not healthvalue = 0 then -- If the food item has a health value, and it isn't 0        if hungervalue and not hungervalue = 0 then        if sanityvalue and not sanityvalue = 0 then
Those 3 lines need to be like this:

        if healthvalue and not healthvalue == 0 then -- If the food item has a health value, and it isn't 0        if hungervalue and not hungervalue == 0 then        if sanityvalue and not sanityvalue == 0 then
Fixed version

local MakePlayerCharacter = require "prefabs/player_common" local assets = {         Asset( "ANIM", "anim/player_basic.zip" ),        Asset( "ANIM", "anim/player_idles_shiver.zip" ),        Asset( "ANIM", "anim/player_actions.zip" ),        Asset( "ANIM", "anim/player_actions_axe.zip" ),        Asset( "ANIM", "anim/player_actions_pickaxe.zip" ),        Asset( "ANIM", "anim/player_actions_shovel.zip" ),        Asset( "ANIM", "anim/player_actions_blowdart.zip" ),        Asset( "ANIM", "anim/player_actions_eat.zip" ),        Asset( "ANIM", "anim/player_actions_item.zip" ),        Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ),        Asset( "ANIM", "anim/player_actions_bugnet.zip" ),        Asset( "ANIM", "anim/player_actions_fishing.zip" ),        Asset( "ANIM", "anim/player_actions_boomerang.zip" ),        Asset( "ANIM", "anim/player_bush_hat.zip" ),        Asset( "ANIM", "anim/player_attacks.zip" ),        Asset( "ANIM", "anim/player_idles.zip" ),        Asset( "ANIM", "anim/player_rebirth.zip" ),        Asset( "ANIM", "anim/player_jump.zip" ),        Asset( "ANIM", "anim/player_amulet_resurrect.zip" ),        Asset( "ANIM", "anim/player_teleport.zip" ),        Asset( "ANIM", "anim/wilson_fx.zip" ),        Asset( "ANIM", "anim/player_one_man_band.zip" ),        Asset( "ANIM", "anim/shadow_hands.zip" ),        Asset( "SOUND", "sound/sfx.fsb" ),        Asset( "SOUND", "sound/wilson.fsb" ),        Asset( "ANIM", "anim/beard.zip" ),}  local prefabs = {} local start_inv = {    -- Custom starting items}  -- Heat Immunity functionlocal function onstartoverheating(inst)    inst.components.temperature:SetTemperature(23) -- Sets the temperature to 23ºCend -- Wetness Debuff functionlocal function onmoisturedelta(inst)    if inst.components.moisture:IsWet() then -- If the character is wet        inst.components.sanity.dapperness = TUNING.DAPPERNESS_TINY*-1 -- Drain sanity at a rate of 1.33/minute    else -- If the character is not wet        inst.components.sanity.dapperness = 0 -- Reset the sanity drain to 0    endend -- Eating Meat Bonuslocal function oneat(inst, food)    if food and food.components.edible and food.components.edible.foodtype == FOODTYPE.MEAT then -- If it is food, edible, and meat             local healthvalue = food.components.edible.healthvalue -- Shortcuts for having to write only "healthvalue" instead of "food.components.edible.healthvalue"        local hungervalue = food.components.edible.foodvalue        local sanityvalue = food.components.edible.sanityvalue                 if healthvalue and not healthvalue == 0 then -- If the food item has a health value, and it isn't 0            if healthvalue >= 0 then -- If the food item's health value is over 0            inst.components.health:DoDelta(healthvalue * 1.5) -- Multiplies food's health value by 1.5            else -- If the food item's health value is below 0            inst.components.health:DoDelta(healthvalue * -1.5) -- Multiplies food's health value by 1.5 and makes it positive            end        end        if hungervalue and not hungervalue == 0 then            if hungervalue >= 0 then            inst.components.hunger:DoDelta(hungervalue * 1.5) -- Multiplies food's hunger value by 1.5            else            inst.components.hunger:DoDelta(hungervalue * -1.5) -- Multiplies food's hunger value by 1.5 and makes it positive            end        end        if sanityvalue and not sanityvalue == 0 then            if sanityvalue >= 0 then            inst.components.sanity:DoDelta(sanityvalue * 1.5) -- Multiplies food's sanity value by 1.5            else            inst.components.sanity:DoDelta(sanityvalue * -1.5) -- Multiplies food's sanity value by 1.5 and makes it positive            end        end    endend  -- This initializes for both clients and the hostlocal common_postinit = function(inst)    inst.MiniMapEntity:SetIcon( "wilson.tex" ) -- Minimap iconend -- This initializes for the host onlylocal master_postinit = function(inst)    inst.soundsname = "wilson" -- The sounds your character will play         -- Stats        inst.components.health:SetMaxHealth(150) -- Base health    inst.components.hunger:SetMax(150) -- Base hunger    inst.components.sanity:SetMax(150) -- Base sanity         -- Fire Immunity    inst.components.health.fire_damage_scale = TUNING.WILLOW_FIRE_DAMAGE -- Willow's fire immunity    inst.components.health.fire_timestart = TUNING.WILLOW_FIRE_IMMUNITY -- Willow's fire immunity         -- Heat Immunity    inst:ListenForEvent("startoverheating", onstartoverheating) -- Wait for the event saying the character starts overheating, and execute a function when it does         -- Wetness Debuff    inst:ListenForEvent("moisturedelta", onmoisturedelta) -- Wait for the event saying the moisture of the character has changed, and execute a function when it does         -- Hounds don't attack you    inst:AddTag("hound") -- Add the tag "hound" to the player         -- Add the eater component    if inst.components.eater == nil then -- If the character doesn't have the component    inst:AddComponent("eater") -- Add the component "eater" to let us execute a function when it eats    end    -- Execute a function when the character eats    inst.components.eater:SetOnEatFn(oneat) -- Execute a function when the character eats     end return MakePlayerCharacter("wilson", prefabs, assets, common_postinit, master_postinit, start_inv)

Edit: I grabbed my code instead of yours, just noticed now that you added the rosedisciple sounds and things, so change those again.

Edited by DrSmugleaf
Link to comment
Share on other sites

I can try at some point, though it would be best to add me on skype. Me and my friend are making custom characters (or trying to anyway) and we are playing around with the art part of it. So while we are messing around we could probably help with something if you need it?

Link to comment
Share on other sites

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
 Share

×
  • Create New...