Jump to content

Recommended Posts

Hi, not sure if this is the right section, but I recently just learned how to tackle the tuning.lua file and want to know how to increase the possible values of hound waves.

I know hound waves max out around Day 100, but noticed under the special change category this can be tweaked and increased manually by setting more values past the minday value. I was wondering what the hound wave value or name was or if it was manually possible without having to make a mod to do it.

What I could gather from a quick look at the file is that you don't really have a possibily to make it work without making a mod, and even then it's not that easy to make. It looks like the max is reached at the age of 100 days of a player, if you change the settings they just start with more hounds but the limit will stay the same.

  • Like 1
On 6/21/2021 at 3:33 AM, Monti18 said:

What I could gather from a quick look at the file is that you don't really have a possibily to make it work without making a mod, and even then it's not that easy to make. It looks like the max is reached at the age of 100 days of a player, if you change the settings they just start with more hounds but the limit will stay the same.

Sorry for my late response. 

So from what I read here is that you can't really increase the total hounds whatsoever because of a hard limit? 

local function CalcEscalationLevel()
	local day = GetAveragePlayerAgeInDays()

	if day < 10 then
		_attackdelayfn = _spawndata.attack_delays.rare
		_attacksizefn = _spawndata.attack_levels.intro.numspawns
		_warndurationfn = _spawndata.attack_levels.intro.warnduration
	elseif day < 25 then
		_attackdelayfn = _spawndata.attack_delays.rare
		_attacksizefn = _spawndata.attack_levels.light.numspawns
		_warndurationfn = _spawndata.attack_levels.light.warnduration
	elseif day < 50 then
		_attackdelayfn = _spawndata.attack_delays.occasional
		_attacksizefn = _spawndata.attack_levels.med.numspawns
		_warndurationfn = _spawndata.attack_levels.med.warnduration
	elseif day < 100 then
		_attackdelayfn = _spawndata.attack_delays.occasional
		_attacksizefn = _spawndata.attack_levels.heavy.numspawns
		_warndurationfn = _spawndata.attack_levels.heavy.warnduration
	else
		_attackdelayfn = _spawndata.attack_delays.frequent
		_attacksizefn = _spawndata.attack_levels.crazy.numspawns
		_warndurationfn = _spawndata.attack_levels.crazy.warnduration
	end

end

This is the piece of code that calculates the size of the attack and more depending on the number of days. As you can see, it will only go up to day 100, so there isn't anything there that could increase the size of the attacks.

I just saw that you can change it with a small mod that changes this file by calling hounded:SetSpawnData

--Configure this data using hounded:SetSpawnData
local _spawndata =
	{
		base_prefab = "hound",
		winter_prefab = "icehound",
		summer_prefab = "firehound",

		attack_levels =
		{
			intro 	= { warnduration = function() return 120 end, numspawns = function() return 2 end },
			light 	= { warnduration = function() return 60 end, numspawns = function() return 2 + math.random(2) end },
			med 	= { warnduration = function() return 45 end, numspawns = function() return 3 + math.random(3) end },
			heavy 	= { warnduration = function() return 30 end, numspawns = function() return 4 + math.random(3) end },
			crazy 	= { warnduration = function() return 30 end, numspawns = function() return 6 + math.random(4) end },
		},

		attack_delays =
		{
			rare 		= function() return TUNING.TOTAL_DAY_TIME * 6, math.random() * TUNING.TOTAL_DAY_TIME * 7 end,
			occasional 	= function() return TUNING.TOTAL_DAY_TIME * 4, math.random() * TUNING.TOTAL_DAY_TIME * 7 end,
			frequent 	= function() return TUNING.TOTAL_DAY_TIME * 3, math.random() * TUNING.TOTAL_DAY_TIME * 5 end,
		},

		warning_speech = "ANNOUNCE_HOUND",
		warning_sound_thresholds =
		{	--Key = time, Value = sound prefab
			{time = 30, sound =  "LVL4"},
			{time = 60, sound =  "LVL3"},
			{time = 90, sound =  "LVL2"},
			{time = 500, sound = "LVL1"},
		},
	}

crazy is the highest attack level, which will be called each time the player is older than 100 days. numspawns is the amount of hounds that will spawn. You can just change this function to one that depends on the age of the world for example:

crazy 	= { warnduration = function() return 30 end, numspawns = function() return( 6 * TheWorld.state.cycles * 0.01) + math.random(4) end },

If you change it to this, the base amount of spawned hounds will go up with the age of the world. 

But this is only if you want to make a mod, otherwise I don't think it's possible.

  • Like 1
19 hours ago, Monti18 said:

local function CalcEscalationLevel()
	local day = GetAveragePlayerAgeInDays()

	if day < 10 then
		_attackdelayfn = _spawndata.attack_delays.rare
		_attacksizefn = _spawndata.attack_levels.intro.numspawns
		_warndurationfn = _spawndata.attack_levels.intro.warnduration
	elseif day < 25 then
		_attackdelayfn = _spawndata.attack_delays.rare
		_attacksizefn = _spawndata.attack_levels.light.numspawns
		_warndurationfn = _spawndata.attack_levels.light.warnduration
	elseif day < 50 then
		_attackdelayfn = _spawndata.attack_delays.occasional
		_attacksizefn = _spawndata.attack_levels.med.numspawns
		_warndurationfn = _spawndata.attack_levels.med.warnduration
	elseif day < 100 then
		_attackdelayfn = _spawndata.attack_delays.occasional
		_attacksizefn = _spawndata.attack_levels.heavy.numspawns
		_warndurationfn = _spawndata.attack_levels.heavy.warnduration
	else
		_attackdelayfn = _spawndata.attack_delays.frequent
		_attacksizefn = _spawndata.attack_levels.crazy.numspawns
		_warndurationfn = _spawndata.attack_levels.crazy.warnduration
	end

end

This is the piece of code that calculates the size of the attack and more depending on the number of days. As you can see, it will only go up to day 100, so there isn't anything there that could increase the size of the attacks.

I just saw that you can change it with a small mod that changes this file by calling hounded:SetSpawnData


--Configure this data using hounded:SetSpawnData
local _spawndata =
	{
		base_prefab = "hound",
		winter_prefab = "icehound",
		summer_prefab = "firehound",

		attack_levels =
		{
			intro 	= { warnduration = function() return 120 end, numspawns = function() return 2 end },
			light 	= { warnduration = function() return 60 end, numspawns = function() return 2 + math.random(2) end },
			med 	= { warnduration = function() return 45 end, numspawns = function() return 3 + math.random(3) end },
			heavy 	= { warnduration = function() return 30 end, numspawns = function() return 4 + math.random(3) end },
			crazy 	= { warnduration = function() return 30 end, numspawns = function() return 6 + math.random(4) end },
		},

		attack_delays =
		{
			rare 		= function() return TUNING.TOTAL_DAY_TIME * 6, math.random() * TUNING.TOTAL_DAY_TIME * 7 end,
			occasional 	= function() return TUNING.TOTAL_DAY_TIME * 4, math.random() * TUNING.TOTAL_DAY_TIME * 7 end,
			frequent 	= function() return TUNING.TOTAL_DAY_TIME * 3, math.random() * TUNING.TOTAL_DAY_TIME * 5 end,
		},

		warning_speech = "ANNOUNCE_HOUND",
		warning_sound_thresholds =
		{	--Key = time, Value = sound prefab
			{time = 30, sound =  "LVL4"},
			{time = 60, sound =  "LVL3"},
			{time = 90, sound =  "LVL2"},
			{time = 500, sound = "LVL1"},
		},
	}

crazy is the highest attack level, which will be called each time the player is older than 100 days. numspawns is the amount of hounds that will spawn. You can just change this function to one that depends on the age of the world for example:


crazy 	= { warnduration = function() return 30 end, numspawns = function() return( 6 * TheWorld.state.cycles * 0.01) + math.random(4) end },

If you change it to this, the base amount of spawned hounds will go up with the age of the world. 

But this is only if you want to make a mod, otherwise I don't think it's possible.

You're a straight bro. I unfortunately do not know how to fully code or even design a mod. Would it be possible for you or someone you know to bundle it into a mod to make it a value that is like a percent to the age of the world? If so, would you be able to make it compatible with Super Hound Waves mod?

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