Home » MODDING HQ 1.13 » Flugente's Magika Workshop » New feature: localized weather
New feature: localized weather[message #345949] Sat, 18 June 2016 23:37 Go to next message
Flugente

 
Messages:3507
Registered:April 2009
Location: Germany
While it is nice to occasionally have rain in order to spice up the tactical situation things a bit, there could be more types of weather than just that. Additionally it is odd that if it rains, it rains in the entire country.



So I've upgraded the weather system. Weather can now be local, meaning that at the same time, different sectors can have different weather. When and where weather happens is not controlled by the ini and SectorNames.xml, where you can enter specific weather chances for several weather types:
Toggle Spoiler


Toggle Spoiler

As the above excerpt from JA2_Options.ini tells you, the current weather types are:

  • Normal weather. When no particular interesting stuff is falling from the sky, besides the odd mortar shell or so.
  • Rain - water falling from the sky. Classic stuff
  • Thunderstorms - every rain shower has a chance to be upgraded to a thunderstorm, which is like a more boss version of rain. With lightning, louder sounds, higher penalties and everything.
  • Sandstorms - likely to happen in the desert, a severe sandstorms can be devastating. Visual range is drastically lowered, your mercs can hear almost nothing over the noise, and even breathing gets harder...
  • Snow. While this might seem odd in Arulco, this is a worthy addition (and might be used more widely in mods with a less tropical climate). I've added it to the mountains so we don't forget it exists.
While I also planned to add fog to swamps, I don't see how we could reasonably add the effect, so I didn't.

As you can see in the above video, there is now a new map display that shows you what weather currently happens where.

This is fully savegame compatible.

This has been added in r8253 & GameDir r2325. Using the new exe without the new GameDir data will cause BLOOD TO RAIN FROM THE SKY, AND NOT IN A FUN KIND OF WAY.

[Updated on: Sat, 18 June 2016 23:41]




I know now that it could never work between us, as much as we wanted to, it could never be! Not because you're a rabbit, but because you're black.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.

Report message to a moderator

Captain

Re: New feature: localized weather[message #345953 is a reply to message #345949] Sun, 19 June 2016 02:53 Go to previous messageGo to next message
RunAwayScientist is currently offline RunAwayScientist

 
Messages:84
Registered:September 2001

To add Swamp Fog effects, you might try looking at modifying the tile lighting values globally for the sector via the same method that Lightning/Thunderstorms use. Altering RGB values and luminosity may give the desired ambiance.

Report message to a moderator

Corporal 1st Class
Re: New feature: localized weather[message #352069 is a reply to message #345953] Thu, 18 January 2018 14:09 Go to previous messageGo to next message
Thor is currently offline Thor

 
Messages:423
Registered:February 2007
Location: Belgium
Haha... Reign in blood ;)

Report message to a moderator

Master Sergeant
Re: New feature: localized weather[message #358070 is a reply to message #352069] Thu, 19 September 2019 13:14 Go to previous messageGo to next message
MH17 is currently offline MH17

 
Messages:46
Registered:November 2018
Location: Antarctica
Hello!
There is no local weather events in Urban Chaos Mod (ja2.exe version 8692).
I tried to check the function "DetermineLocalizedWeatherGivenHelperArray" (file "environment.cpp").
It looks like the variable "totalweatherpoints" with a global chance to launch weather changes in the game is equal zero.
Looking in the file "SectorNames.xml" I see correct (at least plausible) values of <rainchance>, but all "helperstruct[sector].chance" are always 0.
Does anything else affect the values of "helperstruct[sector].chance" which contribute to "totalweatherpoints"?
Thank you in advance.

Report message to a moderator

Corporal
Re: New feature: localized weather[message #358074 is a reply to message #358070] Sun, 22 September 2019 12:09 Go to previous messageGo to next message
silversurfer

 
Messages:2791
Registered:May 2009
A quick look at the code tells me that function ForecastDayEvents() decides if there are any weather events for the day. If we want to have weather events we have to enable them in JA2_Options.ini and give them a certain chance and length. For each weather type the chance in the helperstruct is determined from sector data. Once we have this, function DetermineLocalizedWeatherGivenHelperArray() can determine if we will have a weather event in certain sectors or not.

You should monitor function ForecastDayEvents() to see what value each parameter has.



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Report message to a moderator

Lieutenant
speech59.png  Re: New feature: localized weather[message #358236 is a reply to message #358074] Sun, 13 October 2019 06:24 Go to previous messageGo to next message
MH17 is currently offline MH17

 
Messages:46
Registered:November 2018
Location: Antarctica
Yeah, you are right.
The weather events are enabled in ja2_options.ini, the sector data in files Ja2\Data-UC113\TableData\Map\SectorNames.xml, Ja2\Data-UC113\Data-UC113NewMaps\TableData\Map\SectorNames.xml and Ja2\Data-UC113\Data-UC113OldMaps\TableData\Map\SectorNames.xml are non zero as well. Cant understand why in my code the rainchance in the helperstruct is always equal zero not sure

[Updated on: Sun, 13 October 2019 06:54]

Report message to a moderator

Corporal
Re: New feature: localized weather[message #358239 is a reply to message #358236] Sun, 13 October 2019 19:20 Go to previous messageGo to next message
JP'TR is currently offline JP'TR

 
Messages:104
Registered:April 2009
Location: Germany
Love the snow! But maybe you could make it a bit slower at all, the fast falling flakes look much like rain.

Evene if i doubt its possible, any chance to get the ground covered with snow? happy

[Updated on: Sun, 13 October 2019 19:21]

Report message to a moderator

Sergeant
Re: New feature: localized weather[message #358307 is a reply to message #358239] Sun, 20 October 2019 18:49 Go to previous message
Wolfe is currently offline Wolfe

 
Messages:36
Registered:July 2019
I like when I have experienced the rains....Perhaps some snow in the northern part of the country?

Report message to a moderator

Private 1st Class
Previous Topic: New feature: new animations
Next Topic: New (unofficial) merc: Mercy (Overwatch)
Goto Forum:
  


Current Time: Sat Nov 30 08:34:05 GMT+2 2024

Total time taken to generate the page: 0.02052 seconds