Jump to content

How does Wurt take less damage from Drowning?


Recommended Posts

I'm poking through the code to figure out why he has fewer penalties, and so far I haven't been able to pinpoint what it is..  Does anyone know?  Their 'stronggrip' tag prevents them dropping gear, but idk what's preventing them getting the health penalty..

Link to comment
Share on other sites

Drowning penalties differ for most characters, like WX who takes more damage and has a higher sanity penalty, Woodie who loses more hunger or Walter who loses less health and sanity. All of these values are in tuning.lua, specifically at line 3661 to 3713.

Edited by -t-
  • Like 2
Link to comment
Share on other sites

@-t-
Wonderful!  I don't suppose you know how to edit this for a modded character?  (Still learning)

DROWNING_DAMAGE =
{
	DEFAULT =
	{
		HEALTH_PENALTY = 0.25,
		HUNGER = 25,
		SANITY = 25,
		WETNESS = 100,
	},

	WX78 = 
	{
		HEALTH_PENALTY = 0.4,
		HUNGER = 25,
		SANITY = 50,
		WETNESS = 100,
	},

	WOODIE = 
	{
		HEALTH_PENALTY = 0.25,
		HUNGER = 50,
		SANITY = 25,
		WETNESS = 100,
	},

	WEREWOODIE = 
	{
		WERENESS = 100,
		WETNESS = 100,
	},

	WURT =
	{
		HEALTH_PENALTY = 0,
		HUNGER = 0,
		SANITY = 0,
		WETNESS = 50,  
	},

	WALTER = 
	{
		HEALTH_PENALTY = 0.1,
		HUNGER = 25,
		SANITY = 12,
		WETNESS = 100,
	},

	CREATURE =
	{
		WETNESS = 100,
	},
},

Something like this?

inst.components.drownable.DROWNING_DAMAGE =
		{
			CHARACTER_NAME =
			{
				HEALTH_PENALTY = 0.25,
				HUNGER = 25,
				SANITY = 25,
				WETNESS = 100,
			}
  		}

Also investigating this:
C62CE9040BD29CF832FB31782661A9D2E86A02E3

Edited by FurryEskimo
Link to comment
Share on other sites

This is just a table, and it's a global one at that, which makes it easily editable. You can edit it like this:

GLOBAL.TUNING.DROWNING_DAMAGE.MY_CHARACTER = {
	HEALTH_PENALTY = 0.25,
	HUNGER = 25,
	SANITY = 25,
	WETNESS = 100,
}

Just put in in your modmail.lua and if you have local TUNING = GLOBAL.TUNING then you don't need to put GLOBAL at the begging there.

  • Like 1
  • Health 1
Link to comment
Share on other sites

1 minute ago, FurryEskimo said:

@-t-
I was about to say, this is a lot like editing the generic dialogue for the character.  Thanks so much!

Yeah, it's the same thing as this. Most stuff from tuning.lua, constants.lua and strings.lua are just a bunch of global variables or tables and they all are easily editable.

  • Like 1
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...