Jump to content

Recommended Posts

Try manipulating TUNING values (as seen in scripts/tuning.lua)

 

You can change them directly from modmain.lua like this (in the example we make tooth traps overpowered):

 

GLOBAL.TUNING.TRAP_TEETH_DAMAGE = 999

 

for how to make a configuration screen, see this and compare with other mods.

@theceruleanflash Have you seen this mod?

 

I downloaded it and looked at the code, but it doesn't seem to have any on increasing maximum health, sanity, or hunger. The mod provides only invincibility for health, which in addition crashes my game when I had tried to implement it. Does anyone have an idea on what the code would look like in the modinfo and modmain?

@theceruleanflash

Modmain

local change_max_health = GetModConfigData("ChangeMaxHealth") -- Gets from config-- ...if (change_max_health == true) then	AddPlayerPostInit(function(player)		player.components.health:SetMaxHealth(300)	end)end

Modinfo

-- ...configuration_options =	{		{			name = "ChangeMaxHealth",			label = "Change Max Health",			options = {					{description = "Yes", data = true},					{description = "No", data = false},				},			default = false,		},	}	-- ...

-

 

Or look at the how the mod uses number values.

Hi. I edit tuning.lua but nothing change in game

 

My changes:

 

WALRUSHAT_PERISHTIME = total_day_time*1

UMBRELLA_PERISHTIME = total_day_time*1

 

but nothing happen in game

 

whats wrong?

 

Did you edit the file directly? Because you shouldn't do that, make a mod instead and place the following in modmain.lua:

 

GLOBAL.TUNING.WALRUSHAT_BLABLA = 42

 

Else, did you remember to enable the mod? Are you using mods that may conflict?

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