Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.
At long last, a light-weight Actor for all your weather spawning needs. Weather Spawner is yet another Actor-based solution for handling weather in maps, but this time with a significantly new interface. Unlike weather spawners of the past, this one doesn't come with default effects but allows mappers to entirely create their own in mere minutes. With the power of the custom WTHRINFO lump, creating your weather is as simple as making a definition in MAPINFO.
There are also huge optimization benefits to this Actor. For starters, it's only a single Actor that needs to be placed in the map. No more Actor spamming to get your desired storm. It also doesn't create a ton of weather spawning Actors meaning your maps remain efficient and weather will only ever spawn where the player is. On top of this, it'll make sure not to spawn in water and will properly hit the top of water for those cool rain splash effects. All of this in one incredibly easy to use bundle. Want even more control? As a bonus, it has a plethora of ACS functions designed to give it full scriptability (there's so many I can't even list them all here!). It also comes with some user options to tweak its general properties right out of the box, such as the volume and amount of precipitation.
Got a feature request? Those are cool too! Feel free to leave your feedback here as I'm always looking for new options to add. I can't guarantee they'll get done in a timely manner, but I'm sure I'll be updating this every now and then with some bugfixes and new toys to play with.
Download the source code at the bottom as a zip. Within it should be a folder named Weather-[version]. See included documentation for how to merge the files into your project. For more information about using archives as a replacement for WADs, see here.
From Github
Make sure you're on the branch you want to download from (main is the default). Click the green Code button near the top right and a drop down should appear. From here select Download ZIP. Within it should be a folder called Weather-[branch name] that contains all the files. Follow the above steps for adding.
A quick guide:
Spoiler:
After adding the files to your mod, place the Weather Spawner anywhere in the map. From there, create an ACS OPEN script to set the weather type:
#include "zcommon.acs"
script 1 OPEN
{
ScriptCall("Weather", "SetPrecipitationType", "MyWeatherType");
}
And that's it! You'll need to include your own assets and Actors (make sure they inherit from Precipitation!) and create your own WTHRINFO definitions. The documentation includes examples for how to do so.
Mods and maps that use this:
Spoiler:
Universal Rain and Snow - A package of different weather types designed to be used anywhere Dooming the Bar - A recreation of the Half Life 2 beta maps in GZDoom
Last edited by Boondorl on Sun Oct 29, 2023 4:35 am, edited 2 times in total.
I was thinking about implementing a weather system in my maps, and this came out! Thank you very much, I will definitely try to make it work! I appreciate all the effort put into this work.
I have a cuestion,i don't know the type of lenguage text is this, Because,
don't see the same,i need help with this because the Quick Guide
A quick guide:
After adding the files to your mod, place the Weather Spawner anywhere in the map. From there, create an ACS OPEN script to set the weather type:
#include "zcommon.acs"
script 1 OPEN
{
ScriptCall("Weather", "SetPrecipitationType", "MyWeatherType");
}
dosn't work. And i test the map,print this error
or i write bad the script,or what version of Slade,Ultimate Dbuilder, o others?
But i have a Question, what type of Zdoom Language is?
Because Dosn't work, print the same Error, or what is te version of the Slade(if was Slade) or need a diferente doom editor app or i write something wrong, and so sorry for the very fast response.
As an update, I'm currently working on a new version of this for the upcoming 4.11 GZDoom release. It won't bring much in the way of new features but will include some fixes for portal handling, improvements to game tickrate tracking, and a total rewrite of the WTHRINFO parser. All current WHTRINFO files will need to remove the precipitation keyword from the start of type names, but everything else will be valid. I had more planned with that feature at one point but have ultimately dropped it since the ideas weren't going anywhere. String handling will be significantly improved and will now be optional. The main goal is to future proof this library for later on down the road should features that can potentially break things be added.
On the coding side of things, there will be some API changes. Dictionaries have been dropped in favor of <Name, string> maps. This will not only make looks up faster, but make properties case-insensitive by default which will allow for cleaner looking code. GetValue() has been changed to GetString() to give it parity with the other types, but that's the only change on that front. The rest is mostly changes to access modifiers and scope to better represent what should and shouldn't be allowed.
Lastly will be improvements to integration. A language file will now be included to go with the custom menu (whoops) and I'm looking into ways to make it easier to merge into existing projects without disrupting things. Ideally most files would be able to be simply drag and dropped right in. Documentation will be updated accordingly to reflect all the changes and the way things should be handled.