Weather Spawner

Post your example zscripts/ACS scripts/etc here.
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.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
Boondorl
Posts: 144
Joined: Wed Jul 11, 2018 10:57 pm

Weather Spawner

Post by Boondorl »

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.

Requires GZDoom 4.11 or newer

Documentation is included in the Release download
Release download
Github

How to Use:
Spoiler:
A quick guide:
Spoiler:
Mods and maps that use this:
Spoiler:
Last edited by Boondorl on Sun Oct 29, 2023 4:35 am, edited 2 times in total.
User avatar
Enjay
 
 
Posts: 26535
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Weather Spawner

Post by Enjay »

Very cool. Thank you very much for this. I look forward to trying out a few things with it.

13 pages of documentation! :shock: Very thorough. Again, thank you.
User avatar
Lippeth
Posts: 293
Joined: Wed Apr 24, 2013 1:41 am
Location: Lost Angeles

Re: Weather Spawner

Post by Lippeth »

Wow, this looks very useful. Really look forward to having fun with this. Cheers!
User avatar
Deon
Posts: 232
Joined: Thu Oct 08, 2020 10:44 am

Re: Weather Spawner

Post by Deon »

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.
Bryanvent7
Posts: 3
Joined: Thu Mar 04, 2021 10:10 am

Re: Weather Spawner

Post by Bryanvent7 »

Boondorl wrote:[imgur]https://i.imgur.com/htyx2oI[/imgur]
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?
User avatar
Boondorl
Posts: 144
Joined: Wed Jul 11, 2018 10:57 pm

Re: Weather Spawner

Post by Boondorl »

In this case, the code should be:

Code: Select all

ScriptCall("Weather", "SetPrecipitationType", "MedRain");
Bryanvent7
Posts: 3
Joined: Thu Mar 04, 2021 10:10 am

Re: Weather Spawner

Post by Bryanvent7 »

Boondorl wrote:In this case, the code should be:

Code: Select all

ScriptCall("Weather", "SetPrecipitationType", "MedRain");
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.
User avatar
Boondorl
Posts: 144
Joined: Wed Jul 11, 2018 10:57 pm

Re: Weather Spawner

Post by Boondorl »

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.
User avatar
Boondorl
Posts: 144
Joined: Wed Jul 11, 2018 10:57 pm

Re: Weather Spawner

Post by Boondorl »

Official 2.0 release is now available. See the above comment for a few important API tweaks. Other than that it remains largely the same.

Return to “Script Library”