Search the Community
Showing results for tags 'multiplier'.
Found 2 results
about a month ago i had been working on a mod and looked around for a code of some sorts for what i want to achieve: making my character cook faster than average. i successfully found one, and it was working perfectly at the time! now it doesn't seem to be working and i'm very confused as to why. local old_cook_fn = ACTIONS.COOK.fn ACTIONS.COOK.fn = function(act, ...) local result = old_cook_fn(act,...) local stewer = act.target.components.stewer if result and stewer ~= nil and act.doer:HasTag("mycharacterprefab") then local fn = stewer.task.fn local t = GetTaskRemaining(stewer.task) stewer.task:Cancel() stewer.task = stewer.inst:DoTaskInTime(t*.5, fn, stewer) end return result end this is the code in question. this is all i've tried, to no avail: - adding it to character.lua by itself - adding it to character.lua inside of local master_postinit = function(inst) - adding it to modmain.lua at the very bottom could anyone explain to me what i'm doing wrong, and maybe give some pointers as to what i can do to fix this? ;; thank you very much in advance! ❤
Hello, I have a question. So I want to give my character the ability to give others a damage boost when using a staff item, is there something like "inst.components.locomotor:SetExternalSpeedMultiplier(inst, "mycharacter_speed_mod", 1)" but for damage instead of speed that i could use. ive looked trough the combat.lua component but couldnt find anything that i could use. I believe wont be able to use "inst.components.combat.damagemultiplier" because i believe that'l mess up characters like wolfgang and wigfrid (and modded characters). Unless this isnt the case i'd really appriciate the help!