Jump to content

No more clothes ripping for Wolfgang when in mighty form


Recommended Posts

Hello. As the title says, is it possible to get rid of the clothes ripping effect when wolfgang goes into mighty form with the help of a mod? Since I'm playing wolfgang all the skins that cover the chest, besides the wolfgang specific skins, are not visible since I'm almost always in mighty form.

In the wolfgang.lua located in the Prefabs folder I managed to pinpoint this function:

----------------------------------------------

local function becomemighty(inst, silent)
    if inst.strength == "mighty" then
        return
    end

    inst.components.skinner:SetSkinMode("mighty_skin", "wolfgang_mighty")

    if not silent then
        inst.components.talker:Say(GetString(inst, "ANNOUNCE_NORMALTOMIGHTY"))
        inst.sg:PushEvent("powerup")
        inst.SoundEmitter:PlaySound("dontstarve/characters/wolfgang/grow_medtolrg")
    end

    inst.talksoundoverride = "dontstarve/characters/wolfgang/talk_large_LP"
    inst.hurtsoundoverride = "dontstarve/characters/wolfgang/hurt_large"
    inst.strength = "mighty"
end

----------------------------------------------

I tried to replace the mighty_skin with normal_skin in the becomemighty function and I kinda managed to get the desired effect: in mighty form wolfgang uses the normal body but he's just bigger in scale (he doesn't have the big head for example from the mighty_skin build), and the skins used on him don't rip and are still visible.

I would like to do this through the help of a server sided mod if possible but I do not know how to start it and this is where I would need help. So far I only managed to make a simple mod on my own that modifies characteristics of a hand weapon, the whip, using GLOBAL.TUNING.

Also, in order to use the mighty effect build would that require to redraw some of the images in the corresponding tex files? 

P.S.: I am using @rezecib Rebalance Mod which gives wolfgang only 3 forms, wimpy, normal and mighty. When I did the function modification above I had the mod activated as I do on all my worlds, and it worked ok.

 

Edited by t1morino88eex
Link to comment
Share on other sites

I think the simplest mod to do this would be as follows:

AddPrefabPostInit("wolfgang", function(inst)
	local _SetSkinMode = inst.components.skinner.SetSkinMode
	function inst.components.skinner:SetSkinMode(skintype, ...)
		if skintype == "mighty_skin" then skintype = "normal_skin" end
		_SetSkinMode(self, skintype, ...)
	end
end)

All this is doing is intercepting the call to SetSkinMode and checking if it's setting it to mighty_skin, and if so, changing that to normal_skin instead.

This should work as a server-only mod. (all_clients_require_mod = false, client_only_mod = false).

Link to comment
Share on other sites

Thank you so much for the answer Rezecib!

I put the function you created into the modmain.lua and made that into a mod but it crashes after selecting Wolfgang as a character. If selecting any other character the world starts ok and there's no crash.

I am attaching the mod, log files and error screen. 

error screen.jpg

NoRipWolfgangClothes.zip

client_log.txt

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...