Jump to content

How do I stop wind from breaking my pig houses?


Recommended Posts

Wind destroys structures near you.

WINDBLOWN_DESTROY_DIST = 15, --distance from player wind blown prefabs can be destroyed, fall over, get picked, etc

Put the pig houses away from you and visit them on any season except for the hurricane one.

 

What if you change WINDBLOWN_DESTROY_DIST = 0 or WINDBLOWN_DESTROY_DIST = 1

?

 

Would 0 make it so the distance is indefinite, or would it disable it?  Wouldn't setting it to 1 as well, minimize anything you lost?

 

 

EDIT:  Which file is this string located in?

What if you change WINDBLOWN_DESTROY_DIST = 0 or WINDBLOWN_DESTROY_DIST = 1 ?

 

The check to see if something will be destroyed is

if math.random() < self.destroychance and math.sqrt(self.inst:GetDistanceSqToInst(GetPlayer())) <= TUNING.WINDBLOWN_DESTROY_DIST then

so if the WINDBLOWN_DESTROY_DIST is 0, as math.sqrt returns a number higher than zero, 99.9% of the times, the pig house won't be destroyed.

 

If you edit WINDBLOWN_DESTROY_DIST, then nothing will get destroyed, bamboo, vines, twigs, or Wildbore houses.

 

If you set it to 1, you have to be right next to the item to be destroyed if the destroychance check gets passed.

 

The destroychance a Wildbore house has, is

PIGHOUSE_WINDBLOWN_FALL_CHANCE = 0.1,

So you can also edit this value to be 0, since math.random() returns values between 0-1, and 0 < 0 is a false statement.

 

This way you don't affect stuff like twigs or bamboo.

 

Those strings are located in the TUNING.lua file, in scripts folder, in DLC0002.

This is ridiculous.

Wait...

Ever watched The Truman Show?

The parts of Truman's world is not working when it is not being visited or seen by the main role Truman.

Then this is how they can explain this ... the world Wilson is living in a drama show. And the show has a lot of flaws.

 

My God, it makes perfect sense now! It is all just some drama show, and he is forced to live in it!!!

The reason the game doesn't have stuff going on all over the map at all times is because that would create a BIG resource intensive game. It would make slower computers lag heaps.

 

All open world games do this. The ones that mimic stuff happening outside your range do certain tricks to make it seem like something is happening or limit the amount of stuff that happens outside your range. 

The check to see if something will be destroyed is

if math.random() < self.destroychance and math.sqrt(self.inst:GetDistanceSqToInst(GetPlayer())) <= TUNING.WINDBLOWN_DESTROY_DIST then

so if the WINDBLOWN_DESTROY_DIST is 0, as math.sqrt returns a number higher than zero, 99.9% of the times, the pig house won't be destroyed.

 

If you edit WINDBLOWN_DESTROY_DIST, then nothing will get destroyed, bamboo, vines, twigs, or Wildbore houses.

 

If you set it to 1, you have to be right next to the item to be destroyed if the destroychance check gets passed.

 

The destroychance a Wildbore house has, is

PIGHOUSE_WINDBLOWN_FALL_CHANCE = 0.1,

So you can also edit this value to be 0, since math.random() returns values between 0-1, and 0 < 0 is a false statement.

 

This way you don't affect stuff like twigs or bamboo.

 

Those strings are located in the TUNING.lua file, in scripts folder, in DLC0002.

 

Thanks for the info.  I wasn't looking in the DLC folder (duh), so I wasn't seeing those strings.

 

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.

×
  • Create New...