Jump to content

[LE] What do you run IsRaining() on? What does findWeather() do?


Nathan55

Recommended Posts

I've started a simple temperature mod and want to check if it is currently raining or snowing.

 

I've tried Weather.IsRaining(), Game.Weather.IsRaining(),Weather.GetCurrentWeather.IsRaining(), (weather, int, bool, float) weaChk = "all of the above"

It doesn't say what to run this on in the CK wiki.

 

Also, how exactly does findWeather() work? Does this mean that if the weather were bad right now, this would return what that would be.(e.g. Snowing, Raining) This could simplify the climate check because sometimes you're on a mountaintop and it would snow(cold climate), but rain at the mountain's base(warmer climate).

Link to comment
Share on other sites

IsRaining is only a condition/console function. To check the current weather with Papyrus functions you would this to see if its either raining or snowing:

 

Weather.GetCurrentWeather().GetClassification() > 1

 

Snow is 3, Rain is 2, Cloudy is 1, Clear is 0, and -1 is used for odd cases that aren't any of those.

 

 

FindWeather is used to get a valid weather code of the appropriate type for the player's current location. Most regions of the game have their own versions of the 4 basic weather types and some simply aren't possible (it's not supposed to ever rain in the city of Winterhold, it should never snow in Riften, etc.). Typically you would use FindWeather to find an appropriate choice to use with SetActive or ForceActive.

Link to comment
Share on other sites

As cdcooley pointed, also :

In vanilla game those are mostly used in " Sound Descriptor " for the sounds FX conditions, example : some crickets, frogs, birds will play only under a certain weather and time conditions.

 

* Also " IsRaining " and " GetCurrentWeather " can be used to make a follower - npc to change his clothing, i personally haven't done it, but i have come across a follower mod that used " IsRaining " and " GetCurrentWeather " to make her put on her hood and coat or remove them if is not rainning.

Edited by maxarturo
Link to comment
Share on other sites

@cdCooley:

 

Weather.GetCurrentWeather().GetClassification() > 1 is exactly what I was wanting for the weather check.

and it's so easy that I'm going to implement a clear weather check too.

 

for the FindWeather():

It sounds like if i'm standing in Riften and run:

 

Weather rainChk = Weather.FindWeather(2)

it would return, rainChk = SkyrimOvercastRain ;or another type of rain that can be found at that location

 

and if so; if I ran (still in Riften):

 

Weather snowChk = Weather.FindWeather(3)

would it return snowChk = None?

 

 

@maxarturo

 

This is some handy info, as i'm also wanting to cause the npcs around the player to bundle up if it's cold. Thanks bunches.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...