# Hound wave question

## Recommended Posts

I'm curious how hound wave mechanics work with more than one player.

Does each player in a server get a wave to themselves?

For example, lets say the wave spawns 5 hounds and there are 4 people standing next to each other, are there 20 hounds?

Or, lets say 2 people are on one side of the map and 2 people are on the other, do 10 hounds attack each of the 2 players?

##### Share on other sites

*invalid statement*

Would be nice if a "code digger" could post the respective dog-wave code so we can see clearly how is meant to happen when more people are within a screen-distance. Ty!

##### Share on other sites

I checked the code a few eras ago and based on what I think I can recall I'd say that if the players are far enough from each other they get separate waves, like 5 hounds each, but if they're together they get a wave that's bigger than what you'd get if you played alone and smaller than the wave you'd get if you just blatantly combine the separated waves you'd have if you're far away from your pals.

Example scenario for 4 players:

Players are separated: Everyone gets a wave of 5 hounds -> total number of the hounds roaming the wilds is 20

Players are within a short distance from each other: There's a bunch of hounds attacking and the total number of hounds is somewhere in between of 5 and 20

Also, note that the number of hounds that spawn varies randomly within a range that's determined by how old the world is and how long you've been there. If you ever have exactly 5 hounds per player at any point of time, that's just lucky and not a rule.

And please correct me if I'm wrong, I'm not really sure anymore. It's been so long.

##### Share on other sites

What Mrklli said is right - if you're close enough to other players the hound wave is reduced so that it isn't just every player's wave added together.

The hound waves are spawned at once by the server, so everyone's hound wave will trigger at the same time but each player's hound wave size is depending on how long they've been on the server.  If you join a server too soon to have your own hound wave you will still hear the warning but will not receive any hounds.

Also I wanna add - if you're on a boat when the warning sound starts you won't get any hound wave, but that is only determined when the warning sound first plays.  If you get on a boat after the warning triggers you will still get hounds.

##### Share on other sites

Lately I’ve noticed that if two players join the game (on Xbox) at the same exact time when a hounds wave is starting- that the host gets screwed, I’m not talking a little bit screwed, sort of screwed or exaggerated screwed.. I’m talking full on SCREWED like trying to drill 100 screws into a wooden fence type screwed..

Luckily I was playing as Wortox when this happened, But the other two just joining players hounds end up becoming the hosts problem to deal with. Enough hounds on screen to have lag be the cause of your death more often then not.

It is not fun to die to lag  it is also not fun to run for your life from what is probably 20+ hounds all after you at once.

The best way to deal with them is to kite them into something else.. preferably a Treeguard if you can find one.

##### Share on other sites

4 hours ago, Mrklli said:

I checked the code a few eras ago and based on what I think I can recall I'd say that if the players are far enough from each other they get separate waves, like 5 hounds each, but if they're together they get a wave that's bigger than what you'd get if you played alone and smaller than the wave you'd get if you just blatantly combine the separated waves you'd have if you're far away from your pals.

I quickly checked the script, and this is generally still how it works. It first groups players together (maximum distance is 20, but I don't know how far that is in game terms). Then it calculates the number of hounds to spawn for each player based on the number of days they have played in the world. This is the part that is partly random. Finally, the sum of hounds to spawn for each group is reduced by exponentiating with (1 / (0.95 + #players * 0.05)). This exponent is exactly 1 for lone players, so nothing happens there. Else, the exponent is slightly smaller than 1, effectively reducing the number of hounds. Fractions are rounded down.

Given the example above with 4 players, that would happen to spawn exactly 20 hounds if they were alone, we get:

Exponent: 1 / (0.95 + 4*0.05) = 0.87...

Number of Hounds: 20^0.87 = 13.54...

So, when all 4 players are near each other, they would spawn 13 hounds.

##### Share on other sites

• Developer
38 minutes ago, ben_tinc said:

maximum distance is 20, but I don't know how far that is in game terms

a tile in game is 4x4, so 20 game units would be 5 tiles away.