kOnoNicolasGa Posted December 22, 2021 Share Posted December 22, 2021 Someone know where i could get the past Wolfgang scripts? I m doing a character with the past idea of Wolf, with the eating mechanic, but as you guys know, they reworked him, so idk how to make it right now. I m new into that modding stuff srry Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/ Share on other sites More sharing options...
HarryPPP Posted December 23, 2021 Share Posted December 23, 2021 (edited) Luckily for you, I had a mod that reworked Wolfgang in a way similar to his old version... I've adapted the code to try and replicate old Wolfgang's behaviour. wolfgang.lua Tell me if you have any issues while using it. This file also overrides his TUNING and STRINGS values to fit his old behaviour. Edited December 23, 2021 by HarryPPP Updated the sent file. 1 Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527452 Share on other sites More sharing options...
kOnoNicolasGa Posted December 23, 2021 Author Share Posted December 23, 2021 1 hour ago, HarryPPP said: Luckily for you, I had a mod that reworked Wolfgang in a way similar to his old version... I've adapted the code to try and replicate old Wolfgang's behaviour. wolfgang.lua 11.85 kB · 1 download Tell me if you have any issues while using it. This file also overrides his TUNING and STRINGS values to fit his old behaviour. Tysm, i will try it, i m new at modding. Maybe i cant use it now, but i m trying to understand how it works... Well, i actually was trying to make it before sending that quote, but then i got this crash. I don t know WTF am i doing rn but if u can help me i will be eternally thankfull! Good morning or good night idk what time of the day u will see it. Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527462 Share on other sites More sharing options...
HarryPPP Posted December 23, 2021 Share Posted December 23, 2021 Hm... there's not much I can do with just that crash log. Could you send me the "wicolas.lua" file? 1 Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527465 Share on other sites More sharing options...
kOnoNicolasGa Posted December 23, 2021 Author Share Posted December 23, 2021 Oh, sure! I m kinda lost, i just copied all the things u send me and tried to rename some of then but i just get crashes so well... It just become that mess wicolas.lua The idea of the character was kinda simple in the paper, but is kinda hard to make it. In my mind i thought of the character having the simple 3 perk s as always, one of them would be the Wolfgang eating mechanic. The other two was just things to make the life easier, one of the three it s already made was he being able to do simple tasks faster like chopping. The last one was of him being completely ignorated by the pacific creatures, like bunny and birds. Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527466 Share on other sites More sharing options...
HarryPPP Posted December 23, 2021 Share Posted December 23, 2021 Here, I think I fixed it, and also removed some redundant coding. I also implemented the perk to make him be ignored by Rabbits... I'm not sure of how to do it for birds, though. wicolas.lua 1 Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527479 Share on other sites More sharing options...
kOnoNicolasGa Posted December 23, 2021 Author Share Posted December 23, 2021 OMG, tysm, the wolfgang mechanic worked perfectly, but the bunny one doesnt. Anyway, tysm! You helped me a lot, I just need to solve the bunny problem and the sanity gain from trees, yes, trees. I want him to gain sanity from trees, but his gaining too much, like, 1 per second and that s kinda broken ngl. i can t explain how happy i am you saved my life! Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527481 Share on other sites More sharing options...
kOnoNicolasGa Posted December 23, 2021 Author Share Posted December 23, 2021 (edited) 2 hours ago, HarryPPP said: Here, I think I fixed it, and also removed some redundant coding. I also implemented the perk to make him be ignored by Rabbits... I'm not sure of how to do it for birds, though. wicolas.lua 14.79 kB · 1 download So, about that, I just want one more thing, how do I remove height scaling? And you put some script lines in the wrong place, they incorrect lines are: 100, 118 and 142. Nothing very important actually, because I managed to solve it. Edited December 23, 2021 by kOnoNicolasGa Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527488 Share on other sites More sharing options...
HarryPPP Posted December 23, 2021 Share Posted December 23, 2021 9 hours ago, kOnoNicolasGa said: So, about that, I just want one more thing, how do I remove height scaling? It's quite simple: In the "applymightiness" function, I've commented out all scale-related code: local function applymightiness(inst) local percent = inst.components.hunger:GetPercent() local damage_mult = TUNING.WICOLAS_ATTACKMULT_NORMAL local hunger_rate = TUNING.WICOLAS_HUNGER_RATE_MULT_NORMAL local health_max = TUNING.WICOLAS_HEALTH_NORMAL --inst._mightiness_scale = 1 --local mighty_scale = 1.25 --local wimpy_scale = .9 if inst.strength == "mighty" then local mighty_start = (TUNING.WICOLAS_START_MIGHTY_THRESH/TUNING.WICOLAS_HUNGER) local mighty_percent = math.max(0, (percent - mighty_start) / (1 - mighty_start)) damage_mult = easing.linear(mighty_percent, TUNING.WICOLAS_ATTACKMULT_MIGHTY_MIN, TUNING.WICOLAS_ATTACKMULT_MIGHTY_MAX - TUNING.WICOLAS_ATTACKMULT_MIGHTY_MIN, 1) health_max = easing.linear(mighty_percent, TUNING.WICOLAS_HEALTH_NORMAL, TUNING.WICOLAS_HEALTH_MIGHTY - TUNING.WICOLAS_HEALTH_NORMAL, 1) hunger_rate = easing.linear(mighty_percent, TUNING.WICOLAS_HUNGER_RATE_MULT_NORMAL, TUNING.WICOLAS_HUNGER_RATE_MULT_MIGHTY - TUNING.WICOLAS_HUNGER_RATE_MULT_NORMAL, 1) --inst._mightiness_scale = easing.linear(mighty_percent, 1, mighty_scale - 1, 1) elseif inst.strength == "wimpy" then local wimpy_start = (TUNING.WICOLAS_START_WIMPY_THRESH/TUNING.WICOLAS_HUNGER) local wimpy_percent = math.min(1, percent/wimpy_start ) damage_mult = easing.linear(wimpy_percent, TUNING.WICOLAS_ATTACKMULT_WIMPY_MIN, TUNING.WICOLAS_ATTACKMULT_WIMPY_MAX - TUNING.WICOLAS_ATTACKMULT_WIMPY_MIN, 1) health_max = easing.linear(wimpy_percent, TUNING.WICOLAS_HEALTH_WIMPY, TUNING.WICOLAS_HEALTH_NORMAL - TUNING.WICOLAS_HEALTH_WIMPY, 1) hunger_rate = easing.linear(wimpy_percent, TUNING.WICOLAS_HUNGER_RATE_MULT_WIMPY, TUNING.WICOLAS_HUNGER_RATE_MULT_NORMAL - TUNING.WICOLAS_HUNGER_RATE_MULT_WIMPY, 1) -- inst._mightiness_scale = easing.linear(wimpy_percent, wimpy_scale, 1 - wimpy_scale, 1) end --inst:ApplyScale("mightiness", inst._mightiness_scale) inst.components.hunger:SetRate(hunger_rate*TUNING.WILSON_HUNGER_RATE) inst.components.combat.damagemultiplier = damage_mult local health_percent = inst.components.health:GetPercent() inst.components.health:SetMaxHealth(health_max) inst.components.health:SetPercent(health_percent, true) --if inst.components.rider:IsRiding() then --OnMounted(inst) --end end Also remove the commented lines in the "master_postinit" function: local master_postinit = function(inst) -- Set starting inventory inst.starting_inventory = start_inv[TheNet:GetServerGameMode()] or start_inv.default inst.strength = "normal" --inst._mightiness_scale = 1 inst._wasnomorph = nil inst.talksoundoverride = nil inst.hurtsoundoverride = nil -- choose which sounds this character will play inst.soundsname = "wilson" -- Uncomment if "wathgrithr"(Wigfrid) or "webber" voice is used --inst.talker_path_override = "dontstarve_DLC001/characters/" -- Stats inst.components.health:SetMaxHealth(TUNING.WICOLAS_HEALTH_NORMAL) inst.components.hunger:SetMax(TUNING.WICOLAS_HUNGER) inst.components.sanity:SetMax(TUNING.WICOLAS_SANITY) -- Damage multiplier (optional) inst.components.combat.damagemultiplier = 1 -- Hunger rate (optional) inst.components.hunger.hungerrate = 1 * TUNING.WILSON_HUNGER_RATE if inst.components.workmultiplier ~= nil then inst.components.workmultiplier:AddMultiplier(ACTIONS.CHOP, 1.25, inst) inst.components.workmultiplier:AddMultiplier(ACTIONS.MINE, 1.25, inst) inst.components.workmultiplier:AddMultiplier(ACTIONS.HAMMER, 1.25, inst) end inst.components.sanity.custom_rate_fn = CustomSanityFn inst._tree_sanity_gain = 0 inst._update_tree_sanity_task = inst:DoPeriodicTask(1, UpdateTreeSanityGain) inst.OnPreLoad = onpreload inst.OnLoad = onload inst.OnNewSpawn = onload --inst:ListenForEvent("mounted", OnMounted) - Not needed, as this tweaks the speed on mounts done by scaling. --inst:ListenForEvent("dismounted", OnDismounted) -- You could even remove the OnMounted and OnDismounted functions completely. end Hope this helps. 1 Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527583 Share on other sites More sharing options...
Leonidas IV Posted December 23, 2021 Share Posted December 23, 2021 I just want to remind you that Wolfgang's code in Singleplayer is untouched. Some things have changed with DST, but it should help. 1 Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527584 Share on other sites More sharing options...
kOnoNicolasGa Posted December 23, 2021 Author Share Posted December 23, 2021 Thank you very much! I really appreciate the help, I was able to learn a little more about programming with all this, I really appreciate it. Good morning, good afternoon or good night, and happy holidays! 1 Link to comment https://forums.kleientertainment.com/forums/topic/136407-help-with-the-past-wolfgang-scripts/#findComment-1527623 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