Creating random weather for RTC -- Finished

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Creating random weather for RTC -- Finished

Post by Seriously Unserious »

I am trying to create a random events system that allows for branching events, but where only one event chain can occur at a time. What I am currently looking to use this for is to create random weather for outdoor adventures in RTC.

The problem is that I sometimes get 2 or more sequences of random events (weather conditions) happening at the same time. This is causing strange things to happen such as it there are heavy clouds and light clouds with both heavy rain and light rain falling at the same time, for instance. I have tried several ideas to prevent this and ensure only one of these events can be active at a time but so far, when I think I have it working and the weather model finished, I get the above problem rearing its ugly head again, and I'm beginning to get that banging my head against a brick wall feeling.

I will use the diagram below to illustrate some examples of both what I am looking for and what I am getting, each lettered box represents all the items associated with a single part of an event chain, and the box labeled Start represents the event checker itself, along with all items needed to make it work.
Image

So let's say the random event checker, Start is activated, and it begins checking for the start of events A, B and C. Now, only one of these 3 events should ever start at a time, so if event A starts, then events B and C should be blocked from starting. I've tried several methods to ensure this behavior actually happens but none of them have worked.

The most recent method I'm experimenting with and which I have had the most success with so far is to associate a dummy item that can hold the states of either active or inactive and have only one of these dummies active at a time. I'll refer to these dummy items as dummy Start if its associated with the Start event, dummy A if its associated with event A, dummy B for event B, and so on. So my intentions here were to have dummy Start default to active, while all other dummies default to inactive. This allows the Start event to occur when it should and begin the testing for random events. If, at some point, both events A, and C were to pass the random activation test, each would then test if dummy Start is active. My idea here is then when event A activates, the first thing it does is deactivates dummy Start, and so when event C is tests the state of dummy Start it will find its inactive and fail to activate, because event A already deactivated it. At least that's my theory, but I really don't know enough about how RTC handles the relays and other specialty items like that to know for sure if that's really how it works, of if it tests both events A and C simultaneously, and to both would pass the test for dummy Start being active, and then it would be disabled by both events A and C, so both now end up running simultaneously, thus defeating my attempt to make only 1 of them run at a time.

In short, what I'm looking for is some way to create the behavior that when Start activates event A, event A does something to block events B and C from activating, if event A did not activate, but event B did, then event B blocks event C from activating. Then if event A activated successfully, and properly blocked events B and C from any possibility of activating, would then test for events D and E activating, and should event D activate it too would prevent event E from activating. If anyone knows a way to do this, or has any suggestions of something I might try them please share them with me, of if it is impossible with the current RTC engine than I'd also like to know so I don't keep banging my head against a brick wall trying to do something I really can't anyways.

If anyone wants to take a more detailed look into what I have and see if they can tinker around with it until it works I would be happy to release the source code for this random weather system as part of a small test dungeon. I am actually planning to release a working copy to the community anyways to other custom dungeon developers can use it in outdoor adventures, and even modify it as they see fit, to fine tune it to different climates. Once working, simple adjustment of the probabilities of the relays that handle activating a possible next step in a weather event would simply need to be adjusted to simulate anything from an arid desert to a rainforest in the middle of the monsoon season.

EDIT: Using the dummy objects system is now working. I've been testing the weather system for hours now without any double branching of the weather system, so I should be able to release this soon. I just need to test it for timing and balance the probability settings so I get a realistic looking weather system going.I hope to be releasing the source code for this system in a small test dungeon by the end of this weekend. Anyone who wants to use random weather in for outdoor adventures should be able to build a custom dungeon by modifying my test dungeon, which I will name Weather Test. I'd recommend you keep an original around as a back-up and do any experimenting, modifications and dungeon building under a different file name. I plan on balancing this for a temperate climate, but if you want to simulate another climate, all you need to do is adjust the probabilities of the relays that control the weather progression to make rain less likely and any rain storms that do occur more likely to break up quickly, or do the opposite to simulate a wetter climate such as a rainforest.

I'll post some directions on how to use this weather system in your dungeons later.

EDIT: I've finished the system and have been testing it for the last few days without any errors. So I'm posting the download link:

Random Weather Starter Kit
Alt link: http://dmweb.free.fr/Stuff/files/Random_Weather.zip - b.
This file includes the text file RTC needs for editing and compiling, a readme file with credits, version info and detailed instructions on how to use this system in your own custom RTC dungeons and some sound files I used to add sound effects to the weather, like the sound of wind, and falling rain, and some extra thunder effects.
Last edited by Seriously Unserious on Wed Nov 14, 2012 5:26 am, edited 1 time in total.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Creating random weather for RTC -- WIP

Post by beowuuf »

Glad you managed to solve your own problem, look forward to seeing your solution!
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Creating random weather for RTC -- WIP

Post by Seriously Unserious »

Thanks. I should have it ready this weekend, baring any new major bugs, of course. I could really have used some tutorials on how to use the Relays though, as most of my problems were mainly from lack on knowledge of how the Relays work.
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Creating random weather for RTC -- Finished

Post by Seriously Unserious »

I've updated the first post with the download link. I would also appreciate it if someone could add a back-up link as is done with other custom downloads. Thanks to anyone who's had any interest in this and thanks in advance to anyone who chooses to use this system in any future custom RTC dungeons. I look forward to seeing what the community will create using my work.
User avatar
Gambit37
Should eat more pies
Posts: 13714
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Creating random weather for RTC -- Finished

Post by Gambit37 »

Many thanks for all your efforts on this, it looks impressive! I'm no longer using RTC myself, but I'm sure there are a few dungeon designers here who will love to try your weather out :-)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Creating random weather for RTC -- Finished

Post by beowuuf »

Link added, also added it to the tutorials section
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Creating random weather for RTC -- Finished

Post by Seriously Unserious »

Great, thanks. And thanks beo and gambit for your words of encouragement.

Like I said before, I'm excited to see what other designers will create using this random weather system.

Incidentally, this system can also be used as a general tutorial on random event generation for any type of branching chain or sequence of random events where only 1 outcome can occur at a time and needs to be selected randomly.
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Creating random weather for RTC -- Finished

Post by Chaos-Shaman »

dude, you can do anything with RTC, you have proven that already. now it is time to enhence your storyline. your logic process is solid. show it well with RTC.
keep your gor coin handy
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Creating random weather for RTC -- Finished

Post by Seriously Unserious »

thanks.

Since I released this for all to use I hope you will incorporate this system into any outdoor games you make. When I played Skullkeep for the first time on RTC I loved the way there were storms introduced to the outdoor portions of the game, it really added realism and created a much more immersive environment and I wanted to build on that system and make if available for all to use in their outdoor adventures.
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Creating random weather for RTC -- Finished

Post by Chaos-Shaman »

that's great. i want to see the system used with blue skies then a cumulus nimbus approaching, yeah i like it.
keep your gor coin handy
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Creating random weather for RTC -- Finished

Post by Seriously Unserious »

that's exactly the sort of affect I was going for too. and when the weather does hit, you never know how long it will last, or if it's just going to be an overcast that amounts to nothing, a short drizzle, or a long, intense thunderstorm, or something in between. With a little adjustment of probabilities/delays for the right set of relays, you can also modify the system to suit any type of climate from temperate, to rainforest to desert. The only climate it doesn't support is a cold, snowy climate. With the addition of the right hazes and wallsets snow could be added or substituted in without too much difficulty.
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Creating random weather for RTC -- Finished

Post by Chaos-Shaman »

of course you can do snow, haze, fog and mist etc... RTC can just about do anything, almost. most bugs can be fixed with your own go around method.
i'm looking forward to this project of yours. when i finish the swamp scene, i'll work on a snow and desert theme.
keep your gor coin handy
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Creating random weather for RTC -- Finished

Post by Seriously Unserious »

That would be great.

If you can do that I'd be happy to add them into my weather model as custom wallsets. If someone wants to simulate a different climate, all it would take then is to change the outdoor wallsets over, and then substitute the alternate wallset for the thicket set in the "swap level wallset" actions on the weather modeling level.

Someone who's particularly ambitions could even create their own outdoor wallset and substitute it for the default "thicket" wallset. There are so many possibilities here.
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: Creating random weather for RTC -- Finished

Post by Lord_BoNes »

I'm sorry I wasn't around to assist you... I've been offline for many moons now :P
But, if there's any help you need with RTC, feel free to PM me and I'll get to it as soon as I can (I plan on being active at least once a day).
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
User avatar
Seriously Unserious
Master Superior
Posts: 1418
Joined: Sun May 11, 2008 11:53 am
Location: Wandering around aimlessly in Lynchgate Woods
Contact:

Re: Creating random weather for RTC -- Finished

Post by Seriously Unserious »

Hey, glad to see you back. I've got the main functionality of the weather model running already. I've tested it and it does produce randomized weather and does not crash RTC, everything words as it is, but if anyone's interested in modified versions pre-set to other wallsets, climates etc then by all means play around and modify the model to you're hart's content. If you have any help or suggestions on ways to improve on this model I'd be happy to hear about it, and if I need help with anything else RTC related I'm grateful for your offer to help. Hopefully I won't need to take you up on it (if I do that means something's gone wrong with my dungeon), but I'm glad it's there just in case.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Creating random weather for RTC -- Finished

Post by beowuuf »

welcome back LB!
Post Reply