Jump to content

Recommended Posts

Well, you're in luck as I just released a mod that does just that lol (I know we've already spoken on my Steam page, I'm just posting this here for clarity)

https://steamcommunity.com/sharedfiles/filedetails/?id=2844835803

Quote

I wanted to double all the bosses hp like dst. (from the workshop page)

If you wanted to just target the bosses or be able to fine tune each health value each mob gets, then your best bet is to just adjust their specific health tuning variables. Something like this in your modmain

local TUNING = GLOBAL.TUNING

TUNING.DEERCLOPS_HEALTH = TUNING.DEERCLOPS_HEALTH * 2
TUNING.BEARGER_HEALTH = TUNING.BEARGER_HEALTH * 2
TUNING.MOOSE_HEALTH = TUNING.MOOSE_HEALTH * 2
TUNING.DRAGONFLY_HEALTH = TUNING.DRAGONFLY_HEALTH * 2
-- continue with any other bosses or mobs' health you want to double

But if you wanted to mimic the behavior of DST then you'll want to apply a multiplier to just about everything's health, so you could probably get away with something like this

AddComponentPostInit("health", function(comp)
	local _SetMaxHealth = comp.SetMaxHealth
	comp.SetMaxHealth = function(self, amount)
		if self.inst ~= GLOBAL.GetPlayer() then
			amount = amount * 2
		end
		_SetMaxHealth(self, amount)
	end
end)

That should double the health of every entity who isn't the player (won't affect any pre-existing mobs, however).

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