FleurDuSoleil3 Posted March 7, 2018 Share Posted March 7, 2018 A character I have created deals 25% less damage than usual. When she transforms into a bunnyman she deals the same amount of damage as a bunnyman. I have tested this by spawning in spiders. My problem is upon transforming back into her regular form she still deals the same amount of damage as the bunnyman. I have posted the code below. Inside of the becomebob(inst) I have tried: Placing the normal combat damage multiplier and setting it to 0.75. Tuning Wendy's damage. Making the bunnyman simply increase their damage through a damage multiplier rather than setdefaultdamage - this, however, triggered no change in damage upon transforming into a bunnyman, so both the bunnyman and the character dealt the same damage. No matter what I do the character refuses to restore her damage back to the default 0.75. I've looked at other mods and even tried to look at Woodie but still no dice. SOLUTION: Instead of using damage multipliers or tuning Wendy's damage I simply decided to tune unarmed damage and bunnyman damage for the regular form and wererabbit form respectively. local function becomebob(inst) inst.wererabbit = false inst.AnimState:SetBank("wilson") inst.AnimState:SetBuild("bob") inst:SetStateGraph("SGwilson") inst.entity:AddLight() inst.Light:Enable(false) inst.Light:SetRadius(40) inst.Light:SetFalloff(.5) inst.Light:SetIntensity(0.9) inst.Light:SetColour(245/255,255/255,245/255) local health_percent = inst.components.health:GetPercent() inst.components.health:SetMaxHealth(100) inst.components.health:SetPercent(health_percent, true) local sanity_percent = inst.components.sanity:GetPercent() inst.components.sanity.max = 120 inst.components.sanity:SetPercent(sanity_percent, true) local hunger_percent = inst.components.hunger:GetPercent() inst.components.hunger:SetMax(bobbi_hunger) inst.components.hunger:SetPercent(hunger_percent, true) inst.components.combat:SetDefaultDamage(TUNING.UNARMED_DAMAGE) -------- this is what I used to reset it inst.Transform:SetScale(1., 1., 1.) inst:RemoveTag("scarytoprey") STRINGS.CHARACTERS.BOB = require "speech_bob" inst.components.talker.special_speech = false end local function becomewererabbit(inst) inst.wererabbit = true inst.AnimState:SetBank("manrabbit") inst.AnimState:SetBuild("manrabbit_build") inst:SetStateGraph("SGwererabbit") inst.entity:AddLight() inst.Light:Enable(true) inst.Light:SetRadius(40) inst.Light:SetFalloff(.5) inst.Light:SetIntensity(0.9) inst.Light:SetColour(245/255,255/255,245/255) local health_percent = inst.components.health:GetPercent() inst.components.health:SetMaxHealth(200) inst.components.health:SetPercent(health_percent, true) local sanity_percent = inst.components.sanity:GetPercent() inst.components.sanity.max = 100 inst.components.sanity:SetPercent(sanity_percent, true) inst.components.sanity:DoDelta(-TUNING.SANITY_HUGE) local hunger_percent = inst.components.hunger:GetPercent() inst.components.hunger:SetMax(wererabbit_hunger) inst.components.hunger:SetPercent(hunger_percent, true) inst.Transform:SetScale(1.25, 1.25, 1.25) inst.components.combat:SetDefaultDamage(TUNING.BUNNYMAN_DAMAGE) ------ This is what I used to set the bunnyman's damage inst:AddTag("scarytoprey") STRINGS.CHARACTERS.BOB = require "speech_wob" inst.components.talker.special_speech = false end I also have another instance of unarmed damage being tuned in the character's stats as the character does not start off in the becomebob stage. 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.