Jump to content

Weather. Any way to toy with it?


Recommended Posts

I'd like to make weather effects occur more often and to last longer.

The way it works by default (from observation), at least in the first act area, is that the game randomly selects some "squares" of the map where a weather effect applies. As long as you are in the square, the weather effect lasts. It is quite easy to find the boundary line where taking one step in a direction will stop the rain after a couple of seconds and taking one step back will start it again. But as you are moving most of the time, you only get to enjoy the rain for like 20 or 30 seconds, before you exit the square. Again, this is how it behaves in act 1 areas.

I remember it raining/storming nearly constantly in the Swamps.

Is there a way to increase the number of these squares where weather effects are happening? Optimally into larger blobs, so a larger area of the map would be covered by it instead of singular squares? I'd assume that the density/occurrence of these "weather squares" is set per area somewhere. The question is, if it's hardcoded or changeable in some file?

It just makes it feel really out of place when there is rain occurring in exactly 1 square area of Thylisium and nowhere else around.

Edited by idbeholdME
Link to comment
13 hours ago, idbeholdME said:

1 seems to do nothing. Probably used to set no weather for a square when weather is turned on. The only thing that happens with this are the default gusts.

2 is wind. At density 100, you can actually hear the wind howling in the background. PhysX particles are flying around wildly and trees and grass are swaying strongly in the wind.

3 is rain. Setting the type to 3 everywhere actually makes it rain in every single square in the game. Running around, it is raining non-stop.

4 is thunder storm. Rain (3) + thunder and lightning (6) + wind (2). Screenshot from Thylisium bridge.

5 - no idea. This weather type is never used in the vanilla file. But considering that 6 DOES something and is also not used anywhere, it might actually do something.

6 is also never used in the game but testing it, it enables lightning ONLY. No rain, just thunder strikes and flashes :O 

7 is snow. Ever wondered what it'd look like if it snowed in Thylisium? :4rofl:

8 is never used in game normally. Testing it out, it gives snow (7) + lightning and thunder (6) + wind (2). All three once.

Past 8, there doesn't seem to be any effect so it is most likely the final one.

Really can't spot what 5 does, if anything.

The weather flags are saved in scripts/shared/defines.txt. I remember them from my journey through all the .txt files for scripting my tools. Since they're binary and your list is decimal I guess you'll have to take log_2() to make sense of them. Seems like 5 was intended for earthquakes.

  • Like! 1
Link to comment
5 hours ago, Lindor said:

The weather flags are saved in scripts/shared/defines.txt. I remember them from my journey through all the .txt files for scripting my tools. Since they're binary and your list is decimal I guess you'll have to take log_2() to make sense of them. Seems like 5 was intended for earthquakes.

Hmmm. So 0 should do something too? Could it be a night exclusive effect? Or does it simply force night? Will try later.

And regarding earthquakes, it was either not implemented or happens only in some set area. Had no effect in Thylysium and the nearby area.

But going by the defines.txt, the entries don't really seem to correspond with the actual in-game effect. I don't see snow in there and it even ends at 128, where log_2(128) results in 7. But from my testing, 8 is still another weather type.

Edited by idbeholdME
Link to comment

So far, I only increased some numbers. Upped the frequency:

1 to 3

3 to 5

5 to 7

Rain definitely occurs much more often now. It could take hours normally to stumble upon a square with rain by default (1% chance). Now I encounter a couple of them every hour (at 3% chance). Makes the weather much more lively.

I might try to fiddle with it more later thanks to the map Flix provided. One could actually create regions where a certain type of weather would occur regularly. Like setting a square to a 100% probability of rain, the surrounding ones to 75%, the ones next to those to 50% etc. and create rain-zones, snow-zones etc.

Although... If I remember correctly, isn't there a quest in the orc region that affects weather (something about manipulating rain?) Wonder if changing this file could break some scripts.

Edited by idbeholdME
  • Like! 1
Link to comment

I don't think that it will break some scripts.

Also multiple weathers apparently can occur at the same time, like snow and wind or rain and wind, I think that's why there are multiple entries for the same sector.
The intensity seems to vary while lingering in the same sector, and some weathers like wind and rain approach and fade without leaving the sector.

I had snow at 62% and it changes it's intensity all the time but never stopped and it reacts to wind (the snowflakes blow around).
Funny, I just wish there was a possibility to assign the weather to larger sectors.
 

  • Like! 1
Link to comment
1 hour ago, idbeholdME said:

So far, I only increased some numbers. Upped the frequency:

1 to 3

3 to 5

5 to 7

Rain definitely occurs much more often now. It could take hours normally to stumble upon a square with rain by default (1% chance). Now I encounter a couple of them every hour (at 3% chance). Makes the weather much more lively.

I might try to fiddle with it more later thanks to the map Flix provided. One could actually create regions where a certain type of weather would occur regularly. Like setting a square to a 100% probability of rain, the surrounding ones to 75%, the ones next to those to 50% etc. and create rain-zones, snow-zones etc.

Although... If I remember correctly, isn't there a quest in the orc region that affects weather (something about manipulating rain?) Wonder if changing this file could break some scripts.

 

This sounds like great material for a new "Weather Mod."

:thumbsup:

  • Like! 1
Link to comment
On 2/20/2022 at 12:04 AM, Vishanka said:

I don't think that it will break some scripts.

Also multiple weathers apparently can occur at the same time, like snow and wind or rain and wind, I think that's why there are multiple entries for the same sector.
 

I completely missed that. As I was just brute-forcing numbers everywhere, I just glanced over that.

Most sectors seem to have between 1 and 3 occurrences and the frequency usually adds up to 100. Take 1,28,0 for example (the first multi-entry one).

Spoiler

mgr.addWeather (1,28,0,{
    type = 1,
    density = 100,
    frequency = 80,
    hours = 16777215,
} )
mgr.addWeather (1,28,0,{
    type = 2,
    density = 30,
    frequency = 15,
    hours = 16777215,
} )
mgr.addWeather (1,28,0,{
    type = 2,
    density = 60,
    frequency = 5,
    hours = 16777215,
} )

That I assume would mean that:

80% of the time, there will be no weather effect (frequency 80 for type 1)

15% of the time, it would be be wind with a density 30 (frequency 15 for type 2)

5% of the time, it would be wind with a density 60 (frequency 5 for type 2)

 

So I think that doesn't mean that there can be multiple weather effects at the same time, but the game can ROLL for several effects at once, whenever it checks for the weather. I'd assume it first checks the lowest chance, then the one above it etc. And I wonder what would happen if you went over 100 total. Probably nothing, but haven't tried that yet.

That could actually give much more flexibility when it comes to choosing a weather that I originally thought. This would allow to make rainy areas where the intensity and occurrence could vary every time you visit the area.

On 2/20/2022 at 12:04 AM, Vishanka said:

The intensity seems to vary while lingering in the same sector, and some weathers like wind and rain approach and fade without leaving the sector.

Yeah, I was posing around for some screenshots recently, waiting for night to come and rain suddenly just started. So it is entirely possible that in a sector where it was raining, the game re-rolled it and resulted in a rain but with different intensity. But I can't really pinpoint how often or under what conditions the game rolls for the weather effect. It could be the hours parameter, but I still have no idea what it does.

One theory could be, that the number is a time in milliseconds. That would make 16777215 result in roughly 4.6 hours, which COULD be the amount of game time (not real time) that the effect will last once it is rolled. After that period, the game re-rolls.

Edited by idbeholdME
Link to comment
13 hours ago, idbeholdME said:

So I think that doesn't mean that there can be multiple weather effects at the same time,

I definitely have wind and snow at the same time and since there is only sometimes wind but always snow I would assume that two enties happen at the same time. But no guarantee that it's the way how it works, just an observation

Link to comment
3 hours ago, Vishanka said:

I definitely have wind and snow at the same time and since there is only sometimes wind but always snow I would assume that two enties happen at the same time. But no guarantee that it's the way how it works, just an observation

Keep in mind that the default gusts of wind occur no matter the weather type. Weather type 2 is the one to actually apply a wind weather effect to a sector.

I just tried setting 2 weather types to 100 frequency for a sector and it always applies only one. Tried 3 and 7 (rain and snow), and it always applied only rain.

Between 2 and 7 (wind and snow) it always seems to randomly pick one (if both have frequency at 100).

The snow might seem like it's changing, but it's just how the weather effect looks by default. It constantly transitions between a high/low amount of snowflakes.

Edited by idbeholdME
Link to comment

Also, how would one go about doing the effect that is done in the haunted woods area of Act 2? Everything gets much darker, no matter what time of day it is. I don't think it's a weather effect (checking the relevant sectors), so it's probably done some other way. Any ideas?

The Last Watch graveyard for example gets darker than normal night, even when it's full noon.

dark.thumb.jpg.46b748d4187b6f68ae199e705762eeef.jpg

dark2.thumb.jpg.f0fb849b5b7b8a3abcb17d72de885332.jpg

Would be cool to create some areas where Light Radius would actually be kind of useful.

Edited by idbeholdME
Link to comment

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...
Please Sign In or Sign Up