OhSnapple Posted March 20, 2015 Share Posted March 20, 2015 I'm currently working on a "better hambat" mod. It's a simple mod, that allows you to get the most out of your spoiling hambat. This is the entirety of my mod: function BetterBat(inst) inst:AddComponent("cookable") inst.components.cookable.product = "kabobs" inst:AddComponent("dryable") inst.components.dryable:SetProduct("meat_dried") inst.components.dryable:SetDryTime(TUNING.DRY_MED) inst:AddComponent("tradable") inst.components.tradable.goldvalue = TUNING.GOLD_VALUES.MEAT*2 end AddPrefabPostInit("hambat",BetterBat) Everything works exactly how I want, but the hambat doesn't have any animations on the drying rack. I'm fine using the existing meat animations, I'm just not sure how to link it all up. Link to comment https://forums.kleientertainment.com/forums/topic/52219-additional-drying-rack-meats-mod-help/ Share on other sites More sharing options...
Mobbstar Posted March 21, 2015 Share Posted March 21, 2015 You need some AnimState:OverrideSymbol magic for that. I myself am not very experienced with that, but maybe the crop mods help. (since crop animations work similiarly). Link to comment https://forums.kleientertainment.com/forums/topic/52219-additional-drying-rack-meats-mod-help/#findComment-623627 Share on other sites More sharing options...
OhSnapple Posted March 21, 2015 Author Share Posted March 21, 2015 Well, I seemed to have "solved" it. I really just copy pasted some coding from the "Better Drying Rack" mod made by Mouse.I'm not savvy enough to do my own coding Heres the finished mod:TUNING=GLOBAL.TUNING function onstartdrying(inst, dryable)if not inst:HasTag("burnt") then inst.AnimState:PlayAnimation("drying_pre")inst.AnimState:PushAnimation("drying_loop", true)if dryable=="hambat" then dryable="meat"end inst.AnimState:OverrideSymbol("swap_dried", "meat_rack_food", dryable)endendAddPrefabPostInit("meatrack", function(inst)inst.components.dryer:SetStartDryingFn(onstartdrying)inst.components.dryer:SetContinueDryingFn(onstartdrying)end) AddPrefabPostInit("hambat", function(inst)inst:AddComponent("dryable")inst.components.dryable:SetProduct("meat_dried")inst.components.dryable:SetDryTime(TUNING.DRY_MED)end) function BetterBat(inst) inst:AddComponent("cookable") inst.components.cookable.product = "kabobs" inst:AddComponent("tradable") inst.components.tradable.goldvalue = TUNING.GOLD_VALUES.MEAT*2 end AddPrefabPostInit("hambat",BetterBat) Link to comment https://forums.kleientertainment.com/forums/topic/52219-additional-drying-rack-meats-mod-help/#findComment-623640 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now