• Content Count

  • Joined

  • Last visited

Community Reputation

1 Neutral

About Zoshiru

  • Rank
    Junior Member

Recent Profile Visitors

385 profile views
  1. It decompiled the anim of a hat just fine. The textures are all there. The SCML loads just fine. Recompiled it with the autocompiler, the hat is invisible.
  2. I meant DarkXzero's code freezes on load, Ryuushu's code works beautifully. Thanks.
  3. If I put it in the modmain, the game just goes "Click" and freezes on load.
  4. Ok, you've fixed the syntax error, but now I'm getting THIS error: The lines it's mentioning: local master_postinit = function(inst) -- choose which sounds this character will play inst.soundsname = "willow" -- Stats inst.components.health:SetMaxHealth(150) inst.components.hunger:SetMax(150) inst.components.sanity:SetMax(80) inst.components.sanity.night_drain_mult = 0 inst.components.combat.damagemultiplier = 0.5 AddComponentPostInit("tool", function(t) local old = SetAction function Tool:SetAction(action, effectiveness) if self.inst and self.inst.components.inventoryitem and self.inst.components.inventoryitem.owner and self.inst.components.inventoryitem.owner.prefab == "timothy" then effectiveness = effectiveness / 2 end old(self, action, effectiveness) end end)end
  5. Added that to my character's prefab, now the game just crashes. Not even an error message. If I add it to modmain, it crashes with the error "Unexpected symbol near )" Edit: For some reason the function stretches all the way to the bottom of the script in Notepad++, as if it's missing an end. Are there some syntax errors in there I'm not seeing?
  6. Ok, so modifying the animation speed is overcomplicated. But then there's a mod on the Workshop called "Zinnia the dismantler" that makes mining/chopping less effective by making it take more swings. A large tree, for instance, takes 15 hits with an axe, but with the tool she starts with it takes 20. As far as I can tell this is the part of the script that does it: inst:AddComponent("tool") inst.components.tool:SetAction(ACTIONS.HAMMER, 1.5) inst.components.tool:SetAction(ACTIONS.MINE, 0.5) inst.components.tool:SetAction(ACTIONS.CHOP, 0.75)Would it be possible to put this into a character's script instead of a tool? There's some similar code in Woodie's script under the Werebeaver code that sets his chop speed while he's without and axe: inst:AddComponent("worker") inst.components.worker:SetAction(ACTIONS.DIG, 1) inst.components.worker:SetAction(ACTIONS.CHOP, 4) inst.components.worker:SetAction(ACTIONS.MINE, 1) inst.components.worker:SetAction(ACTIONS.HAMMER, 1)But I'm not entirely sure how the "worker" component fits into this or if tools override these values with their own. Is it possible to override the tool's stats with my own values for this?
  7. Friend of Woodside here: We tried looking at the code for the Razor, since it seems to be exactly what we want in this tool, but the problem is it doesn't seem to HAVE any code. The chain of modules its scripts reference just ends in an ACTIONS.SHAVE.
  8. So I'm looking to add a perk to my character that makes him use tools like Axes and Pickaxes at half the speed of other characters. I looked at Woodie's code and found that his increased chopping speed is part of his axe, but is there a way to make it affect all tools wielded by a character? I would also like to decrease his swing speed when attacking monsters, but if that's not possible I'll just half his attack damage.