SIEGE UNIVERSITY 2

Siege University II Tutorials
Modding FAQ
095: Upgrading DSII
100: The Basics of Siege Editor
201: Compass Map Radar
202: Conversations
203: Journal
204: Quest Indicator Icons
205: Start Positions
206: Teleporters
207: Town Portal Restrictions
208: Weapon Effects
209: Flick
210: Tuning Grids
211: Setting Up Good Map Lighting
212: Setting Up Simple Node Fading
215: Building Data Tables

Siege University I Tutorials
200: Concepts and Terminology
201: Templates
203: Triggers
204: Moods
205: Fades
206: Elevators
211: Naming Key
213: Dungeon Siege Resource System
301: Introduction to Dungeon Siege Architecture

Third Party Tutorials
A Simple Mod Part One - Armor Textures
A Simple Mod Part Two - A New Armor
Beginners Guide to Stitching Regions
How to Open and Create Tanks
Making Chants Work in a New Map
Ornaments
Understanding the NKK

Useful Links
Siegetheday.org
Dungeon Siege Outpost
Dungeon Raider
Kdawg.org - List of useful Links
MCarp DS Nodes
Dungeon Siege 2 at Gamefront
Broken World at Gamefront

212: Setting up a simple house for node fading

A tutorial by Ryan Dulac.

Ok, I'm assuming you've got a house and want it to fade properly when your characters walk inside.
Here's a house - let's use it in our tutorial:

To start with, let's hide the house's roof for awhile, so we can work inside the house. You can hide nodes by selecting the node(s) and in Siege Editor 2's main menu bar, clicking on Node and then selecting Hide Node(s). When you do this with the roof selected, it will disappear. Now we can work _in_ the house.

By the way, to later show the node again, click on Node in the menu bar and then select Show All Nodes.

If you do not want the camera to "duck" when you enter the house, select both your door top(s) and roof if your roof was not visible when you started, you'll first need to click on Node on the main menu and select Show All Nodes to show your roof. Then, in the main menu, click on Node then Properties.

Now, with the Node Properties window up, uncheck Bound Camera and Occludes Camera to avoid the roof from ducking the camera when you enter the house.

You will probably have to do the same for the walls of the building as well. And, if you put in two doors, like me, do the same procedure for the other side.

In general, it's good to remove the nodes' default settings so the camera does not duck when player goes under the door top and roof.


Roof

Now, show all the nodes if the roof isn't visible, or put a roof on your house if there isn't one yet. You will need to set the house up for the fade triggers. Select the roof and click on the main menu Node then Properties. Click on the Fade Settings tab.

Change the Level and Object values to 1.

The properties for the roof should look like this:

Now select your roof and hide it (so you can see inside the building), as you did earlier.


Alternate way of hiding the roof

You can hide the roof in an alternative way. I prefer to use this for all things I fade for organization. It is not needed, but I will show you the concept and recommend you do it.

Go to the main menu and select Node then Node Fade Groups. In the Node Fade Groups window, in the Properties colum on the left, check Section, Level and Object boxes. Also set the value to all three to 1.

Now click on the New Group button and, in the New Node Fade Group pop-up window, enter in 1-1-1 followed by a reminder note such as -town001. The 1-1-1 part is also just a reminder of what attributes you gave the node(s) for fading. It's not something you _have_ to do, but it is recommended.

Do not use any characters other than a dash ('-'), letters, and numbers in the group name.
Otherwise, SE2 will crash your map - unless you fix fade_groups.gas manually. After that, it's safe to Save Favorites.

It should look like the following image:

Click Ok. The group you typed in should now be selectable from the Groups pull-down menu at the bottom of the window. Select it.

Now, still in the Node Fade Groups window, click on the Add button on the left. If you have it set up right, you will be able to click on Hide to hide and Show to show all the nodes you assign to that group.

You can save your Node Fade Groups by going up to the main menu bar, clicking on File and selecting Save. It's good to do that just in case you crash. Do Save, not Save Favorites - Saving favorites will delete the group. It is ok to save favorites _after_ the group is saved.

Now, click on Hide to hide the roof again.


Generic Triggers

Before we place generic triggers to fade the roof in and out we need to ensure the Draw Debug HUD is on. You can turn this on by clicking the 'sideways triangle' button so it's pressed in - the button is located next to the Visual Node Placement button (see picture below).

Having this set On will show us the boundaries of our triggers.

Now, we need to place some generic triggers to fade the roof in and out. Go to the Unsorted Items tab on the left side of SE2, click on the Game Objects folder, the Special folder, the trigger folder and finally select trigger_generic from the list.

NOTE: You will get an error message like this:

Just ignore it (click on Ignore Always).

Now, with the trigger_generic selected, place a trigger inside the house, near the door, by left-clicking. Select the new trigger (white wrench icon) and right-click, then select Properties from the menu.

Now that the Object Properties window is up, click on the Trigger Properties tab. Click on the Add Condition button on the right side, then use the drop-down menu on the Add Trigger Condition to select party_member_within_bounding_box.
Click Ok.

Now, look at the Conditions section of the Object Properties window.

Under the Parameter field, you will see
Half Diag X
Half diag y
Half diag Z

These will give the length, width, and height coordinates of where the player walks to activate the trigger. In the Value field, I set:
Half Diag X: 3.2
Half Diag Y: 1.4
Half Diag Z: .8
I set it to fit the door frames on both sides; you will need to adjust this to fit your door frame as well.

I like to use the door frame as a guideline when setting the diag values. The default (on _every_ enter) in the boundary check field works for this type of trigger.

You will want to move the trigger around to align it and will have to use shift and drag to move up and down if you altered a value that changes its height. It should look similar to this:




Now, go back to the Trigger Properties tab and click on the Add Action button on the right. From teh Add Trigger Action pop-up, select fade_nodes_range as your action.

In the Action section, you will see Region ID in the Parameter column which is set to 0xFFFFFFFF (in the Value column). Note that this is _not_ your region's ID.

To find out your region's ID, go up and select Settings in the main menu bar, then click on region.




The Region GUID in the lower left tells you your region's ID. Copy the Region GUID and paste it into the Value field for the Parameter in the Action section, overwriting the existing 0xFFFFFFFF. Also set the values for Section, StartLevel, EndLevel and Object to 1.

For Fade Type, double-click on the Value field to get a list, then choose Out:Black.




Testing Roof Fade

Now will be a good time to test if the trigger works properly.

Save your map and use Ds2Mod to test the trigger. The roof should fade as you walk into the house. It will stay faded without adding other triggers.

If your roof faded out, fine - continue on.
If not you did something wrong.


Continuing on, copy the trigger you put in the house and paste it outside the house to make a new trigger.
I changed the length of this new trigger (x for me) to 1 meter. You will want to move the trigger close to the other one - but make sure it does not overlap.



The only other alteration to the new trigger we need to make is changing Fade Type to In. This will fade the roof back in, if you didn't guess that.



If you have two doors in the house - like my house does - copy the Fade In trigger and place the copy on the other side and you're all set. Then run another test to make sure everything is set up right.

Additional tip: If you are working with a lot of triggers or want to be organized you will want to name your triggers. I named mine... fade in and fade out . Select your trigger, click on Properties, the Template Properties tab and, under dev_instance_text, type in a name you want.



This name will appear only in SE2, above the type of trigger you named (in this case Generic Trigger)

And so, at the end, here's the same house that we started with: