Jump to content

Changing stats in Config


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.

Link to comment
Share on other sites

@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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...