SIEGE UNIVERSITY 1 |
|
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 |
Fades ·
What
You Need For This Tutorial ·
What
This Tutorial Assumes You Have Already Learned ·
What
This Tutorial Will Teach You ·
How
Nodes Are Faded ·
Fade
Fields In Siege Editor ·
A
Simple Example Of A Fade ·
Defining
Wildcards ·
Using
Wildcards, or Why Nodes Have 3 Fade Values How The Siege Engine Keeps Track Of It
All Fading Tools In The Siege Editor ·
An
Easy-To-Use SE Fading Tool ·
A
More Advanced SE Fading Tool ·
Why
Are Fade Triggers On Elevators Different? ·
How
Do You Set Fades (Or Moods) On Elevators? Practical Exercise: A Two-Story House
Fade Introduction Fading
is the act of
making nodes visible or invisible. It is an important part of a world
that
never has a loading screen - anytime you go into a house, cave,
dungeon, etc.,
certain pieces of the terrain will need to disappear to allow the
player to
continue playing. Likewise, when players leave a dungeon or house, the
terrain
will need to re-appear. All objects and actors that are on terrain that
is
faded out will also be faded out. An important rule to remember is to
never
allow player characters to stand on faded out terrain, as they will no
longer
see their own characters, or be able to interact with their
surroundings. What
You Need For This Tutorial ·
Dungeon
Siege, updated to version 1.09B or later ·
Siege
Editor, updated to version 1.09B.313 or later ·
A
text editor What
This Tutorial Assumes You Have
Already Learned ·
Siege U: 100 - The Basics of the Siege
Editor ·
Siege U: 200 - Concepts and Terminology
What
This Tutorial Will Teach You ·
How
nodes are faded ·
How
wildcards are used ·
How
the Siege Engine tracks fades ·
How
fades are manipulated in Siege Editor ·
Examples
of common and advanced fades Overview
of Fades How
Nodes Are Faded Fades
can be done three different ways: node flags, triggers, and elevators. Node
Flags The
first method is very simple: a flag on the node can
be set so that it
will fade away if the node comes between the camera and the player's
character.
This is done by opening up the node properties when a node is selected,
and
making sure the checkbox "camera fade" is checked (under the
"General" tab). The most common uses for this are doorway arches, or
rock arches at cave entrances. If you use this, you should uncheck both
"bounds camera" and "occludes camera" so that the node
simply fades away and does not force the camera to move. Fade
Triggers The
most commonly used method of fading is a fade trigger.
By using
triggers, we can fade as many or as few nodes as we want to, and they
can be
anywhere in the world; the player does not necessarily have to be close
to the
nodes being faded. Elevators Elevators
are covered
later, after more terms are defined and examples are given. Fade
Fields In Siege Editor When
you add a fading Action to a trigger in Siege Editor, there are five
parameters
to that Action: region GUID, Section, Level, Object, and Fade Type. Region
GUIDs Region
GUIDs are 8-digit hexadecimal numbers that are unique to each region
within the
map. You can see the current region's GUID by looking at "region"
under the "settings" menu. You can also find a region GUID in the
main.gas file under world\maps\<map
name>\regions\<region name>. Section/Level/Object All
nodes have three fading terms associated with them: Section, Level, and
Object.
To fade a node in or out, we have to refer to the region that the node
is in
(via the region GUID) and these three numbers. The labels
(Section/Level/Object) are meaningless - the only thing important about
them is
that they give us a place to assign values to nodes, and refer back to
them
later. Since the names don't mean anything, when referring to these
values, we
simply refer to them by the three numerical values that they hold.
Throughout
this document, there will be sets of numbers listed like this: (5, 15,
-1).
This is simply an abbreviation for Section 5, Level 15, Object -1. The
default
setting for nodes is (1, -1, -1). While region GUIDs use hexadecimal;
Section,
Level, and Object values are decimal only. Fade
Type Fade
Type has several options. Fade "out:black" will fade nodes completely
out. Fade "out:alpha" will fade nodes out most of the way, leaving
the nodes almost transparent. Fade "in" will cause nodes that have
been faded out to fade back in. The "out:instant" setting is just
like "out:black" except that the nodes do not fade smoothly away,
they disappear instantly. "In:instant" works the same way, fading in
nodes instantly. A
Simple Example Of A Fade A
region with GUID 0x88993344 has many nodes, most of which are flagged
as (1,
-1, -1). There is one house in the region, and it has a roof flagged
(1, 2,
-1). A fade trigger could be set down in the doorway of the house with
a
condition of "party member within bounding box" and the action
"fade_nodes." The bounding box would need to be rotated and sized
appropriately (refer to Siege U: 203A - Triggers I),
and fade nodes would
need the following values: Region
GUID: 0x88993344
Wildcards Defining
Wildcards So
far in our discussion of fades, the "-1" value hasn't been explained.
It's a little bit complicated because it has a double meaning. When
nodes are
flagged with -1, that value stands for "no value". So the default
node flags of (1,-1,-1) really could be seen as (1,nothing,nothing).
But -1
means something completely different when used in a fade trigger. When
fading
nodes, -1 is a wildcard. It can be read as "anything". This can be
pretty powerful. Using
Wildcards, or Why Nodes Have 3
Fade Values Using
wildcards can save a lot of time, and allow you to fade a large number
of
differently flagged nodes with a drastically reduced number of fade
triggers. Here
is an illustrative example: A
region has five houses near each other, and one of those houses has a
dungeon
in the basement. Most of the surface nodes in the region are flagged
(1, -1,
-1), and the dungeon nodes are flagged (2,-1,-1). The house roofs are
flagged
(1, 1, -1), (1, 2, -1), (1, 3, -1), (1, 4, -1), and (1, 5, -1). Each
time a
player walks into a house, they walk through a trigger that fades off
the roof,
and that looks how you would expect: (1, 1, -1) for the first one, (1,
2, -1)
for the second, etc. When the player walks down into the dungeon, they
walk
through a trigger that looks a little different: (1, -1, -1). This
means that
the game will fade all nodes in that region that have (1, anything,
anything).
So with just one fade action, all of the house roofs fade away along
with the
rest of the nodes in the region. The dungeon doesn't fade away because
it has a
Section value of 2, not 1 (2, -1, -1). How
The Siege Engine Keeps Track Of It
All The
way that the engine handles fades isn't completely intuitive. By
default, all
nodes are visible. The engine maintains a list of nodes that are faded
out
for each player. Every time that a player walks into a trigger that
fades OUT
some nodes, the engine ADDS that group of nodes to the list. Every time
a
player walks through a trigger that fades IN some nodes, the engine
REMOVES
that group of nodes from the list. This can cause some unexpected
behavior when
using wildcards. The nodes that are faded out and the nodes that are
faded in must
match Section, Level, and Object values exactly, including wildcards.
Here are
a couple of examples to illustrate: ·
Half
of the nodes are flagged as (1, -1, -1) ·
The
other half are flagged as (2, -1, -1) ·
The
player walks through a trigger that fades OUT (1, -1, -1) ·
The
player walks through a trigger that fades IN (1, -1, -1) In
this case, everything is fine. The nodes marked (1, -1, -1) are
visible. Here
is where expectations can cause confusion: ·
The
player walks through a trigger that fades OUT (1, -1, -1) ·
The
player walks through a trigger that fades IN (-1, -1, -1) Some
of the nodes in the region are faded out, and then the player walks
through a
trigger that looks like it will fade in all nodes in the entire region.
But
since the fade out was done with (1, -1, -1), the engine doesn't find a
match
for (-1, -1, -1) and ignores that fade. So the end result of this
situation is
that the nodes are still faded out, which is probably not what the
designer
intended. Fading
Tools In The Siege Editor An
Easy-To-Use SE Fading Tool Select
a node in Siege Editor and look at its Node Properties. Under the Fade
Settings
tab are the fields for Section, Level, and Object. There are also three
buttons: Show, Hide, and Select. These buttons will perform their
functions on
all nodes in the region that match the fade values of the current node.
This can
be a great way to see what your fades will look like in-game without
leaving
the editor. A
More Advanced SE Fading Tool "Node
Fade Groups" (under the Node Menu) can be a powerful tool for an
advanced
user. Using this screen is a little complicated, but can make managing
your
fades a lot easier in the long run. The first thing to do on the Node
Fade
Groups screen is to create a new group with the "New Group" button on
the right. The name doesn't matter; this is something that will stay
local on
your machine only. Once you have made a group, select it down at the
bottom
from the pull-down menu "groups". Type in any value you want for
section, level, or object, and check the box next to any of the fields
that you
entered values for. Anything unchecked will function as a wildcard,
matching on
any value. You can then use the "add" button to add these values to
the "fade settings" window. Any time that you select
"hide," "show," or "select," all nodes that match
the fade settings in the window will be hidden/shown/selected. So you
could
have a fade group for "castle interior" and another for "castle
first floor," etc. This comes in handy when you have a lot of different
fade values on nodes in a region, but want to toggle the visibility of
those
nodes easily. Elevator
Fades Why
Are Fade Triggers On Elevators
Different? This
is fairly complicated. Fade triggers work by noticing when a party
member
crosses the boundary of the trigger. This is true whether the trigger
is
"party member within node/sphere/bounding box", or even "party
member entered trigger group". When players click to go somewhere, the
engine figures out all of the steps that they will take to get there.
The
engine knows when they will cross into the trigger, even before they
get there.
It even sends this information to other player's computers in a
multiplayer
environment, as this keeps everything looking smooth for each player. How
Do You Set Fades (Or Moods) On
Elevators? Elevators
have two special lines in their "Template Properties" to allow the
designer to trigger fades or moods when the elevator moves. Moving1ActionInfo
is used for triggering fades and moods when the elevator from its
original
position to its destination. Moving2ActionInfo is
used when the elevator
moves back to its original position. The syntax for these lines is
this: [region
GUID],[section],[level],[object],[fade type];
Moving1ActionInfo
= 0xA1000033,1,-1,-1,in;0xB1000012,3,4,-1,out:black,2.5;gpg_fh_r1_1;
Common
Fading Scenarios A
common fading situation is a set of stairs leading in and out of a
dungeon. We
usually place a fade trigger at the top of the stairs that will fade
the
dungeon out (no need to render a dungeon that you can't see, especially
when
you're leaving it), a fade trigger in the middle of the stairs to fade
the
dungeon in as well as the original region (to catch players going
either
direction), and a trigger at the bottom of the stairs to fade the
original
region out (for players entering the dungeon). This way the player can
walk
down the stairs and see the dungeon, or walk up the stairs and see the
original
region. Practical
Exercise: A Two-Story House
Fade Open
up a test region. Try placing some t_xxx_flr_08x08-v0 nodes down to get
a nice
area to walk around. Then place the house that we will use for our
fading
example: t_grs01_houses_generic-c-log-lv1. t_grs01_houses_generic-c-log-lv2
goes on top of this node, and t_grs01_houses_generic-b-roof-shingle
makes a good roof. t_grs01_houses_generic-c-log-lv1-door-top
can go in
the doorway, and t_grs01_houses_generic-c-log-stairs
will work for the
stairs. Advanced
Fading Scenarios A
castle is one of the most complex buildings to fade, as several things
need to
be taken into consideration. Whenever a player is on the outside of the
castle,
all they need to see is the outside of the castle. If the interior of
the
castle is faded in, the engine is doing a lot of unnecessary rendering.
When a
player goes into the castle, all floors above the player need to be
faded away.
However, the interior of each floor below them can be faded away as
well, again
to eliminate unnecessary rendering. With these issues in mind, this is
how we
divided up castles: ·
Each
floor of the building should probably have all nodes flagged with the
same
[section], to make it easy to fade floors above the player's character.
·
On
each floor, there will be "interior" areas that are far away from any
outside windows or doorways. These should be flagged with their own
[level] so
that they are easy to fade away when the player is on a floor above
them and
can't possibly see these areas. The [object] flag can be set on a
per-node
basis when there is something like an archway on the interior of a
floor of the
castle that you might want to fade with a trigger. A
large tower is another interesting case. Conceptually a tower is pretty
easy to
deal with. If the tower has five floors, then each floor can have all
of its
nodes flagged with a different Level, while keeping the same Section.
So the
floors could be something like this: (3, 1, -1), (3, 2, -1), (3, 3,
-1), (3, 4,
-1), (3, 5, -1). That way if you ever needed to fade the whole tower
away, you
could use (3, -1, -1). Conclusion Some
of the concepts in this document are difficult to digest. I recommend
experimenting with fades in a small, simple test map before trying
anything too
complicated. Setting up fade triggers in a 20-floor tower can take
quite a
while, even if you already have a lot of experience. Try starting with
a simple
field, where fade triggers will fade different pieces of the ground in
and out
when you walk through them. After that, try a few houses...maybe even a
house
with a second floor. Dungeons may or may not be difficult, depending on
how
many levels they have, and how many rooms have node caps. ·
Examples
of towns:
bt_r1, path2dm, nt_r1, df_r0,
and dc_r1 are all regions that have houses or dwellings in them. ·
Examples
of dungeons:
cr_r1 is a
dungeon with a large number of capped rooms, sd_r1 and sd_r2 are both
dungeon
regions with two floors and elevators. There
are plenty of examples in the other regions as well, but if you can
understand
and emulate the fading being done in these regions, you will be well on
your
way to becoming a Fading Master. |