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

Overview Teleporter Fades Placing a Teleporter

 

Overview


A teleporter is an interactive object, like a lever, with a special skrit component. When the teleporter object recieves a we_req_use message, it opens the teleporter interface.



The teleporter interface consists of three parts: the title, the destination list, and the map. The title is taken from the world location of the character who used the teleporter. The destination list is taken from a list of start group names in the teleporter object's instance. (See example teleporter below.) The map is similar to the journal map (see Journal), except that it also displays teleporter icons for the start groups in the destination list. When the player selects a destination name from the destination list, they are teleported to the start position with that name.

Each teleporter object has an accompanying start group. Each teleporter enables the start group next to it, and does not list it in its own destination list. Consider the following example, taken from the interactive.gas file for the region a1_03_01_jngdun:

[t:teleporter_disk_glb_selection_dun_elf,n:0x0670056d]

{

        [placement]

        {

          p position = 0,0,0,0xe4ed02dd;

            use_point_scids = 0x0670056F;

        }

        [teleporter]

        {

            destination_names = "a1_01_06_jngtown, a2_01_01_elftown, a3_01_01_town,

                                 a1_02_02_jngfalls, a1_02_04_jngridge, a1_03_02_jngruins,

                                 a1_03_04_jngcliffs, a1_04_04_jngvalley,a1_05_01_desbridge,

                                 a1_05_05_descanyon, a1_06_04_desroad, a1_06_05_desroadchasm,

                                 a1_06_08_petra, a1_07_03_petratemple";

            enable_dest_names = "a1_03_01_jngdun, a1_01_06_jngtown";

        }

}

Notice that the [teleporter] block contains two fields: 'destination_names' and 'enable_dest_names'. The 'destination_names' field lists all the start groups that this teleporter can send the player's party to. By using the teleporter above, the player could travel to any teleporter in act 1, as well as the towns in acts 2 and 3. The destination names should always be entered in the following order: first, the town for the act that the teleporter is in. Next, the other towns, in chronological order. Then, the other regions in the same act as the teleporter, in chronological order. Whenever a player uses a teleporter that is not in a town, the highlight on the destination list (and therefore the location that the player will teleport to if they click 'ok' without choosing a region) will be at the top. If the player uses a teleporter in town, the highlight will be at the bottom. See the Town Portal Restrictions entry for more info.

The 'enable_dest_names' field lists the start groups that this teleporter will enable when used. Only enabled start groups appear in the teleporter UI destination list. The first start group listed in the 'enable_dest_names' list must be the start group next to this teleporter. (It is used by some game code.) We have all teleporters enable the start group next to them and the start group for the teleporter in the nearest town, so that if the player forgot to activate the town's teleporter they can still return to town. Some teleporters also enable other start groups; for example, the teleporter in a2_08_04_castleshielddun enables the start group in a1_01_03_town so that the player can travel to the next area.

Most regions that contain a teleporter contain only one. In that case, the start group next to that teleporter will have the same name as the region, which is the same as the region's base world location. The example teleporter above is located in the region a1_03_01_jngdun, and its associated start group is also named a1_03_01_jngdun. That region's base world location is also named a1_03_01_jngdun. However, some regions have more than one teleporter. In that case, at least one of the start groups in the region will have to use an altered name (see the Start Positions entry for more info).

 

Teleporter fades


When a character uses a teleporter, all of their non-global fades are erased; the entire world becomes faded in for that character. We add fade triggers around all teleporter start groups, therefore, so that when the character arrives they will have the appropriate fades for that region. Here is the trigger for the teleporter in a1_03_01_jngdun:

[t:trigger_generic,n:0x06700048]

{

    [common]

    {

        dev_instance_text = "Teleporter Trigger";

        [instance_triggers]

        {

            [*]

            {

                action* = set_player_world_location("a1_03_01_jngdun");

              b can_self_destruct = true;

                condition* = party_member_within_bounding_box(3.000000,2.100000,3.000000,"on_every_enter");

              f delay = 0.000000;

              b flip_flop = false;

              b multi_player = true;

              b no_save_trig_bits = false;

              b no_trig_bits = false;

                occupants_group = ;

              f reset_duration = 0.000000;

              b single_player = true;

              b single_shot = false;

              b start_active = true;

            }

            [*]

            {

                action* = mood_change("a1_03_01_jngdun_01");

                action* = fade_nodes(0x00000FD0,1,-1,-1,"out:black"), doc("a1_02_03x_sa_amrendun1 out");

                action* = fade_nodes(0x00000042,1,-1,-1,"out:black"), doc("a1_02_01x_sa_jngcav out");

                action* = fade_nodes(0x00001005,1,-1,-1,"out:black"), doc("a1_02_01x_sa_jngdun out");

                action* = fade_nodes(0x00000FD4,1,-1,-1,"out:black"), doc("a1_03_02x_sa_ruindun2 out");

                action* = fade_nodes_range(0x00000196,1,1,3,-1,"out:black"), doc("a1_03_02x_sa_ruindun");

                action* = fade_nodes(0x0000006C,1,1,-1,"out:black"), doc("a1_03_02x_sa_cav1");

                action* = fade_nodes(0x0000006B,1,1,-1,"out:black"), doc("a1_03_03x_sa_cav1");

                action* = fade_nodes(0x0000006D,1,1,-1,"out:black"), doc("a1_03_03x_sa_cav3");

                action* = fade_nodes(0x00000089,1,-1,-1,"out:black"), doc("a1_03_04x_sa_smithdun");

                action* = fade_nodes(0x00000021,1,1,-1,"out:black"), doc("top region most nodes");

                action* = fade_nodes(0x00000041,1,-1,-1,"out:black"), doc("jnglight");

                action* = fade_nodes(0x00000061,1,-1,-1,"out:black"), doc("jngfalls");

                action* = fade_nodes(0x00000211,1,-1,-1,"out:black"), doc("jngdark");

                action* = fade_nodes(0x00000067,1,-1,-1,"out:black"), doc("jngdun top level");

                action* = fade_nodes(0x00000067,2,3,-1,"out:black"), doc("jngdun lower secret ele");

                action* = fade_nodes(0x00000067,5,-1,-1,"out:black"), doc("jngdun secret are");

                action* = fade_nodes(0x00000067,6,-1,-1,"out:black"), doc("jngdun secret are");

                action* = fade_nodes(0x00000067,4,1,-1,"out:black"), doc("jngdun entry chunk");

                action* = fade_nodes_range(0x00000067,4,2,3,-1,"in"), doc("jngdun current area in, for dev.");

              b can_self_destruct = true;

                condition* = party_member_within_bounding_box(3.000000,2.100000,3.000000,"on_every_enter");

              f delay = 0.000000;

              b flip_flop = false;

              b multi_player = true;

              b no_save_trig_bits = false;

              b no_trig_bits = false;

                occupants_group = ;

              f reset_duration = 0.000000;

              b single_player = true;

              b single_shot = false;

              b start_active = true;

            }

        }

    }

    [gizmo]

    {

      v diffuse_color = 0,1,1;

    }

    [placement]

    {

      q orientation = 0,0.707107,0,0.707107;

      p position = 0.0362625,0,-2.34028,0xe4ed02dd;

    }

}

Its bounding box covers the start group next to the teleporter, and it has two triggers: one for world location, the other for mood and fades. The mood and world location are just whatever the player would have if they walked to the teleporter normally. The fades, however, are a little more complex.

Remember that the fades have been wiped, so we don't need to fade anything in. We just need to fade nodes out that shouldn't be visible. There are two categories of such nodes: any overland regions or higher-level dungon floors that were faded out on the way down to the teleporter (this only applies to teleporters inside dungeons or under roofs), and other dungeons. The first category should be fairly easy; look at all the (non-global) fade triggers the player has activated on their way down into the dungeon and make sure all the fade groups are copied into the teleporter trigger accurately. The second category is a bit harder: what we did was make a list of all the dungeon fade groups that could be reached by walking from the teleporter (i.e. in the same world area), and fading them all out. We copied the fade group numbers from the elevators or z-portal fades that lead into all the dungeons in the same world area, and pasted them all into every teleporter in that world area.

 

Placing a Teleporter


To place a new teleporter, follow these steps:

·         First, add the teleporter node to the world. The teleporter nodes can be found in the ds2_customs node folder, under ds2_teleporters. There are three teleporter nodes, one each for the natural, dungeon, and cave sets. Adding the node is only necessary for cosmetic reasons; if the object is placed on a normal floor node, some of the effects will look like they're coming from nowhere.

·         Next, add a new start group next to the teleporter node. Make sure that it is on floored terrain. For more information on adding start groups, see the Start Positions entry.

·         Place a use_point (found in objects/gizmos/special) next to your start group. Copy its scid ('g').

·         Place the teleporter object, found in objects/gizmos/interactive_tools. (Notice that there are many teleporter objects, to match various texture sets. Also, some teleporters have different sized activation triggers: see world/contentdb/templates/interactive/obj_teleporter.gas for more details.) Center the teleporter object on the teleporter node, then open its object properties.

·         Set its orientation to 0,0,0,0.

·         Set its position on the node to 0,0,0 (be careful not to delete the node guid from the position field when you do this).

·         Paste the new use_point's scid into the use_point field.

·         In the 'enable_dest_names' field, add the name of your new start group, followed by the name of the nearest town start group.

·         In the 'destination_names' field, list the teleporter's destinations, in this order: first, the town for the act that the teleporter is in. Next, the other towns, in chronological order. Then, the other regions in the same act as the teleporter, in chronological order.

·         Now add a generic trigger next to the use_point and start group. On the trigger's object properties tab, type "Teleporter trigger" in its dev_instance_text field. On its triggers tab, add a new trigger so that there are two. Make both triggers' conditions 'party_member_within_bounding_box' with dimensions 4,2.1,4. Make one trigger's action 'set_player_world_location' and enter the world location the player should have near the teleporter. Add the appropriate mood and fades for the other trigger's actions. (See above for information on what fades to add to the trigger.)

·         Add a radar icon next. If you haven't worked with radars, be sure to read the Compass Map Radar entry. To add a teleporter radar icon, first place a dev_radar_icon gizmo, found in game objects/gizmos/level_design_tools. Move the gizmo to the same location as the teleporter object (the center of the teleporter node). Open the radar icon gizmo's properties, and in the 'icon_texture' field, type "b_gui_ig_m_i_rdr_teleport". Make sure to regen the region's radars so that the icon is visible on the radar map.

·         The last step is to add your new teleporter to the destination lists of all the other teleporters in the act. Open interactive.gas for every region with a teleporter in that act. In each teleporter object's 'destination_names' field, add the name of your new start group at the correct place in the list, chronologically. (For example, when I added the a1_03_01_jngdun teleporter, I placed it after a1_02_04_jngridge and before a1_03_02_jngruins in each destination_names list.) Now, the player can use any teleporter in the act to travel to your new teleporter.

Your teleporter should look something like this (in the picture, the radar icon is hidden inside the teleporter node):