Jump to content

How to make weather last longer ? (rain, fog, etc.)


Djak

Recommended Posts

Hi, 

 

I'm really loving the new random weather changes in A20, but my issue is they return to normal sunny weather way too fast. I would like for the rain, fog, etc. to set in for hours (real life time) if possible. 

 

Anyone know how to achieve that ? 

 

Thanks. 

Link to comment
Share on other sites

I think that would require c# coding.  I did not see anything in the xml files that would change the time of weather effects.  You could change the probability though via xml edits.  For example, pine forests right now has 83% probability of sunny weather while rain is 7% and storm is 3%.  Lowering the default weather significantly and increasing rain / storm will make pine forest more dreary overall.

Link to comment
Share on other sites

For rain/storms: @BFT2020 is correct (as far as i know) in that normal XML modding exposes the weather as "probabilities" amd you have no control over duration or when it starts/ends. Fog is similar but there is a second fog configuration you can tweak for just "night" and "day" settings (fog occurs during one or both of these times). See https://7daystodiemods.com/night-fog/

for the additional fog setting.

 

now, donovans modlet doesn't mean "no fog on the day" (im 90% sure) think of it as "extra fog is added at the night".


also: there is a "global weather" setting that you cannot access via XML (but maybe C#? As suggested already) that actually dictates some core weather conditions for the world/map. I believe it fluctuates variables (temp, sun, clouds, etc) and the XML changes/mods add/subtract to this, and the extra fog setting adds to it as well.

 

im playing a modified donovans night fog mod im tweaking in an Undead Legacy game and theres always "fog" now (as the mod sets some base levels of fogginess and i added fog for both night and day) but the global weather and Undead Legacy weather XML make it go from "impossible to see" to "omg i can see about 25 blocks out", but that's a rare daytime condition and even some days its just a wall of fog. Its exactly what i want (deep fog that has chances of clearing up a little) So you likely have to edit multiple weather XML places to get a more persistent/solid fog.... though a youtuber named jawoodle had an a19? game with "all dense fog all the time" as someone or him had to have made a special mod for it that i have not seen posted.

 

I think for a19 @khzmusik made a "seasons" mod so there is some ability to tweak the weather by time/day and have it "stay" but i think he made a dll mod (c# mods were not supported then) and i believe it was updating the weather constantly (like every second) to override/reset the global weather to he what he wanted on that day/time.

 

I made a "punishing weather" mod https://7daystodiemods.com/punishing-weather-core/

That is supposed to make the weather weather (and visual effects)  "nastier" but allow for some chance of clearer weather. Check out the XML to see how it was done compared to the probabilities/settings of the vanilla game XML. I made it mostly for a "stormy and windy and visuals obscured a bit" effect most of the time. I would assume you could make changes to this mod to crank up whatever weather probability you want..... but beware the global weather will still do whatever it wants.

 

If im wrong about any of the details, anyone please correct me :). Im really hoping when the game goes gold the weather will be a lot more user/mod configurable (like colored fog, lightening strikes, etc) than it is today.

Edited by doughphunghus (see edit history)
Link to comment
Share on other sites

7 hours ago, doughphunghus said:

I think for a19 @khzmusik made a "seasons" mod so there is some ability to tweak the weather by time/day and have it "stay" but i think he made a dll mod (c# mods were not supported then) and i believe it was updating the weather constantly (like every second) to override/reset the global weather to he what he wanted on that day/time.

 

That's pretty close. In A19 I made a C# mod that set the global temperature according to a sine wave, where one cycle of the sine wave was a meteorological year (four seasons). Since the weather was mainly determined by the global temperature, the rest of it (rain, fog, etc.) pretty much just fell into place. (Also the update happened every frame update, not just every second.)

 

But, the entire weather system was overhauled for A20, so none of the code in my mod could be updated.

 

Also, one of the reasons I made that mod was to make survival harder the further you got into the game - it was meant to be combined with my "crop growth by weather" modlet, where certain crops wouldn't grow in certain temperatures (and thus not in certain seasons). Since TFP nerfed farming, and people generally think now that farming is too hard anyway, I didn't see much point to figuring out the weather system from scratch.

 

If you have any C# experience, and want to try it yourself, the place to start is in the WeatherManager.GenerateWeatherServerFrameUpdate method.

 

And, if you want to use my code as a basis for your own C# modlet, the source code is here: https://gitlab.com/karlgiesing/7d2d-a19-modlets/-/tree/master/khzmusik_Seasonal_Weather_DMT

Link to comment
Share on other sites

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