Jump to content

Recommended Posts

in tuning.lua, 

MERM_TOOL = {
            USES = 50,
            DAMAGE = wilson_attack * .5,
            CONSUMPTION = {
                CHOP = 1,
                MINE = 3,
                DIG  = 3,
                TILL  = 1,
            },
            EFFICIENCY = 0.25,
        },

ARMOR_MERMARMORUPGRADEDHAT = wilson_health*3*multiplayer_armor_durability_modifier,

 

I want to give infinite durability to these things.

 

I want to make a mod.

 

thanks

 

 

 

On 7/2/2024 at 8:47 PM, scgr110 said:

in tuning.lua, 

MERM_TOOL = {
            USES = 50,
            DAMAGE = wilson_attack * .5,
            CONSUMPTION = {
                CHOP = 1,
                MINE = 3,
                DIG  = 3,
                TILL  = 1,
            },
            EFFICIENCY = 0.25,
        },

ARMOR_MERMARMORUPGRADEDHAT = wilson_health*3*multiplayer_armor_durability_modifier,

 

I want to give infinite durability to these things.

 

I want to make a mod.

 

thanks

 

 

 

Spoiler
AddPrefabPostInit("merm_tool", function(inst)
	inst:AddTag("hide_percentage")
	if not GLOBAL.TheWorld.ismastersim then
		return inst
	end
	inst.components.finiteuses.Use = function() end
end)
AddPrefabPostInit("merm_tool_upgraded", function(inst)
	inst:AddTag("hide_percentage")
	if not GLOBAL.TheWorld.ismastersim then
		return inst
	end
	inst.components.finiteuses.Use = function() end
end)

AddPrefabPostInit("mermarmorupgradedhat", function(inst)
	inst:AddTag("hide_percentage")
	if not GLOBAL.TheWorld.ismastersim then
		return inst
	end
	inst.components.armor:InitIndestructible(TUNING.ARMOR_MERMARMORUPGRADEDHAT_ABSORPTION)
end)

 

Haven't played Vannila in a while so I don't really know if it works correctly

I'm not familiar with merm's stuff, but I think for the tool you could just remove the finiteuses component, and for the armor you use InitIndestructible to set it as, well, indestructible.

I didnt try it but it should work (I guess)

_G = GLOBAL

AddPrefabPostInit("merm_tool", function(inst) -- Normal merm tool
	if not GLOBAL.TheWorld.ismastersim then
		return
	end
   if inst.components.finiteuses then -- Check if have finiteuses components or not
		inst:RemoveComponent("finiteuses") -- Remove the finiteuses components
   end
end)

AddPrefabPostInit("merm_tool_upgraded", function(inst) -- upgraded merm tool
	if not GLOBAL.TheWorld.ismastersim then
		return
	end
   if inst.components.finiteuses then -- Check if have finiteuses components or not
		inst:RemoveComponent("finiteuses") -- Remove the finiteuses components
   end
end)

AddPredabPostInit("mermarmorupgraded", function(inst) -- upgraded merm armor
	if not GLOBAL.TheWorld.ismastersim then
		return
	end
	if inst.components.armor then -- Check if have armor components or not
		inst.components.armor:InitIndestructible(TUNING.ARMOR_MERMARMORUPGRADEDHAT_ABSORPTION) -- Might need a GLOBAL. before TUNING, not really sure
	end
end)

 

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
×
  • Create New...