DM2 weather system: explanation?

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. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

DM2 weather system: explanation?

Post by Gambit37 »

I've tried to fathom out how GG set this up but I seem to be failing to grasp it. Has anyone pulled it apart and can explain it -- clearly?
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: DM2 weather system: explanation?

Post by Lord_BoNes »

The weather system in DM2 works as follows... it triggers the relay chain with a given delay between each "stage" of the weather. When it reaches a given stage, it does a GLOBAL_SWAP_FAST on all the objects that it has to... IE: the "rain" hazes (it swaps out the old haze for a new one, pretty straight forward here)...

The more complex part is how it swaps the wallsets. Each dungeon level has a default wallset (as you know), and you can change this wallset to another one, using ACTION_CHANGE_LEVEL_WALLSET. The object_1 field of the action determines the wallset to change it to... if you check out each of the "wallset objects", you'll find they each have a different "default wallset"... this field sets what the new wallset will be.
EG: If you clone a WALLSET_ALT item (floor or wall, doesn't matter) and you use that object_type for a ACTION_CHANGE_LEVEL_WALLSET, then the dungeon-level of the object that started the relay chain will change wallsets. IE: If you started the relay chain using a FLOORITEM_TRIGGER, then the level that the FLOORITEM_TRIGGER resides on.

I hope that this helps, but I'm sure that I could do a brief tutorial map for ya... keep an eye out over the next few days.
 
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
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: DM2 weather system: explanation?

Post by Lord_BoNes »

Just a quick run-through of the DM2 weather system. This only changes the actual appearance of the environment (no lightning, thunder, etc) simply to illustrate what I said above. I've included "comments" about the workings.

Here is the link.
 
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
Gambit37
Should eat more pies
Posts: 13773
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: DM2 weather system: explanation?

Post by Gambit37 »

Cool, nice one, I'll check it out :)
Post Reply