theceruleanflash Posted July 10, 2015 Share Posted July 10, 2015 Hey, I was looking for some help on how to create a config where you can change the stats of your character. For example, increase the maximum health. Thanks for any help Link to comment Share on other sites More sharing options...
Mobbstar Posted July 10, 2015 Share Posted July 10, 2015 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 More sharing options...
Blueberrys Posted July 10, 2015 Share Posted July 10, 2015 @theceruleanflash Have you seen this mod? Link to comment Share on other sites More sharing options...
theceruleanflash Posted July 10, 2015 Author Share Posted July 10, 2015 @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 More sharing options...
Blueberrys Posted July 11, 2015 Share Posted July 11, 2015 @theceruleanflashModmainlocal change_max_health = GetModConfigData("ChangeMaxHealth") -- Gets from config-- ...if (change_max_health == true) then AddPlayerPostInit(function(player) player.components.health:SetMaxHealth(300) end)endModinfo-- ...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 More sharing options...
sawaki Posted July 16, 2015 Share Posted July 16, 2015 Hi. I edit tuning.lua but nothing change in game My changes: WALRUSHAT_PERISHTIME = total_day_time*1UMBRELLA_PERISHTIME = total_day_time*1 but nothing happen in game whats wrong? Link to comment Share on other sites More sharing options...
Mobbstar Posted July 16, 2015 Share Posted July 16, 2015 Hi. I edit tuning.lua but nothing change in game My changes: WALRUSHAT_PERISHTIME = total_day_time*1UMBRELLA_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 More sharing options...
Recommended Posts
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.