Jump to content

Woodie transformation at will with Idols


Recommended Posts

Hello everyone, I am a woodie enthusiast, I like playing woodie as my main character, I like the mod Tree´s a crowd by Bramble, however I have asked for permisison and seen suggestions not being taken into consideration, so support by him has no longer be offered; I want for woodie to waste idols he has at his inventory, when clicking on a hud, for transforming as a wereform, you also cannot transform into any wereform without any idols in your inventory is the rework I would like for this mod, this mod for me is the only workaround to change into other wereforms while being one still, example would be to transform into goose from moose when in a dangerous or low health situation to escape.

" https://steamcommunity.com/sharedfiles/filedetails/?id=1863500676&searchtext=tree%27s+a+crowd "  - The Mod

I have tried changing the code myself, an inexpert or even amateur at modding, so my idea would be to cause woodie to consume the item he has in his inventory and transform briefly to the transformation you clicked on the hud, but you must need the idols in your inventory to be consumed when wanting to change form.

AddModRPCHandler("Woodie_Mod", "goose_button", function(inst)
    if inst:HasTag("goose") then
	    inst.components.wereness:SetPercent(0, true)
		inst:RemoveTag("goose")
	elseif inst:HasTag("beaver") and inst.components.inventory:FindItem(ConsumeByName, 1) or inst:HasTag("moose") 
	and inst.components.inventory:ConsumeByName(wereitem_goose, 1) then
	    inst.components.wereness:SetPercent(0, true)
	    inst.components.wereness:SetWereMode("goose")
	    inst.components.wereness:SetPercent(1, true)
	    inst:AddTag("goose")
		inst:RemoveTag("beaver")
		inst:RemoveTag("moose")
	elseif inst.components.inventory:ConsumeByName(wereitem_goose, 1) then 
	    inst.components.wereness:SetWereMode("goose")
	    inst.components.wereness:SetPercent(1, true)
	    inst:AddTag("goose")
	end
end)

AddModRPCHandler("Woodie_Mod", "beaver_button", function(inst)
    if inst:HasTag("beaver") then
	    inst.components.wereness:SetPercent(0, true)
		inst:RemoveTag("beaver")
	elseif inst:HasTag("goose") and inst.components.inventory:ConsumeByName(wereitem_goose, 1) or inst:HasTag("moose") 
	and inst.components.inventory:ConsumeByName(wereitem_moose, 1) then
	    inst.components.wereness:SetPercent(0, true)
	    inst.components.wereness:SetWereMode("beaver")
	    inst.components.wereness:SetPercent(1, true)
	    inst:AddTag("beaver")
		inst:RemoveTag("goose")
		inst:RemoveTag("moose")
	elseif inst.components.inventory:ConsumeByName(wereitem_beaver, 1) then
	    inst.components.wereness:SetWereMode("beaver")
	    inst.components.wereness:SetPercent(1, true)
	    inst:AddTag("beaver")
	end
end)

AddModRPCHandler("Woodie_Mod", "moose_button", function(inst)
    if inst:HasTag("moose") then
	    inst.components.wereness:SetPercent(0, true)
		inst:RemoveTag("moose")
	elseif inst:HasTag("goose") and inst.components.inventory:ConsumeByName(wereitem_goose, 1) or inst:HasTag("beaver") 
	and inst.components.inventory:ConsumeByName(wereitem_beaver, 1) then
	    inst.components.wereness:SetPercent(0, true)
	    inst.components.wereness:SetWereMode("moose")
	    inst.components.wereness:SetPercent(1, true)
	    inst:AddTag("moose")
		inst:RemoveTag("goose")
		inst:RemoveTag("beaver")
	elseif inst.components.inventory:ConsumeByName(wereitem_moose, 1) then
	    inst.components.wereness:SetWereMode("moose")
	    inst.components.wereness:SetPercent(1, true)
	    inst:AddTag("moose")
	end
end)

I have uploaded the original code in attachments.

modmain.lua

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...