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 Adding New Start Groups Changing the Default Start Group Town Portal Start Groups

 

Overview

start_positions.gas is where all the start groups in a map are stored. Here is an example of a start group:

[t:start_group,n:a1_03_01_jngdun]
{
f clothmap_pos_x = 0.000000;
f clothmap_pos_y = 0.000000;
f clothmap_pos_z = 0.000000;
b default = false;
description = "Elven Shrine";
b dev_only = false;
b enabled = false;
i id = 1301;
mood_name = "";
b mp_default = false;
screen_name = "Elven Shrine";
[start_position]
{
i id = 1;
position = -0.015068,0.000000,-3.051664,0xE4ED02DD;
[camera]
{
f azimuth = 0.500000;
f distance = 20.000000;
f orbit = 0.000000;
position = -0.015068,0.000000,-3.051664,0xE4ED02DD;
}
}
[world_levels]
{
}
}

·         The name of the start group (a1_03_01_jngdun in this case) must be unique for the map. Our convention is to make it the same as the region it is in. If a region contains more than one start group, we append numbers to the names of additional start groups or change the descriptive name. For example, the start groups a2_05_01_cultravine_1 and a2_05_01_cultravine_2 are both contained in the region a2_05_01_cultravine, and the start groups a2_07_03_beginning and a2_07_03_end are both contained in the region a2_07_03_snowmountain.

·         If no cloth map coordinates are specified, as here, then the cloth map code will take the coordinates for this location from the world location entry in world_locations.gas that has the same name as this start group. If no such world location entry exists, the cloth map code will throw an error. The world location with the same name as this start group looks like this:

        [t:location,n:a1_03_01_jngdun]

        {

                id = 1301;

                screen_name  = "An Elven Shrine";

                clothmap_show_group  = group_default;

                clothmap_hide_group  = group_default_fog;

                clothmap_pos_x       = 139;

                clothmap_pos_y       = 125;

                clothmap_pos_z       = 0;

                clothmap_rollover    = journal_map_location_a1_03_01_jngdun;

                clothmap_window      = ":info:clothmap_info:cave";

        }

·         There is one default start group (the one at which the hero character starts the game by default); in the ds2_world map, it is in the tutorial. All other start groups are marked default = false.

·         The description does not appear in the game; it is for our internal documentation. It happens to be the same as the screen name in this case.

·         dev_only is set to true if the start group should not be available for use in the retail game.

·         If enabled is set to 'true', the start group will not need to be enabled by a Teleporter or starting_group_toggle gizmo before you can teleport to it.

·         The id number must be unique for the map; it is used by the starting_group_toggle gizmo to identify the start group, and it was once used to order start groups.

·         The mood_name field is not used (we had planned to use it to apply a mood to any characters arriving at that start group, but bounding box triggers ended up being easier).

·         mp_default is set to true for the start group at which multiplayer games start by default; that start group is in the prison cell in Eirulan in this map.

·         The screen name is the text used for the name of the start group in the game.

·         The world_levels block was intended to be used to determine which character levels would be allowed to use the teleporter, but we ended up not using it, and I doubt that the code is supported any more.

There can be as many start groups as you like, and each start group must contain one or more start positions. Each start position contains three sets of data: its position in the world, its camera position, and its id number.

                [start_position]

                {

                  i id = 1;

                        position = -0.015068,0.000000,-3.051664,0xE4ED02DD;

                        [camera]

                        {

                          f azimuth = 0.500000;

                          f distance = 20.000000;

                          f orbit = 0.000000;

                                position = -0.015068,0.000000,-3.051664,0xE4ED02DD;

                        }

                }

·         The id number indicates the order in which start positions will be used to initialize player characters; if 6 characters are starting at that start group, the first will appear at the position with id 1, the second at the position with id 2, etc. At the five locations at which player characters can appear when a game is first started (the tutorial, the prison cell, and the teleporters in the three towns), there are 18 start positions placed. (We ended up not needing that many, but when we placed them the party size had not yet been ironed out.) Each other teleporter start group only has one start position; the teleporter code just places all teleporting characters in the same spot. The example above is the start group for the teleporter in the Elven shrine dungeon west of Eirulan, so it only needs one start position.

·         The position is in nodespace; it is the position the player character will have when they are teleported to or initialized at that start position.

·         The camera position indicates which direction the camera will be pointing from and which position in nodespace it will be pointing at. By default, Siege Editor saves out the start position camera with the above azimuth, distance, and orbit, and uses the start position itself as the camera position. We change these values by hand in certain cases; for example, if on arrival at a teleporter the camera is pointing at a wall, or if we want to point out the correct direction to go for the player. Azimuth and orbit are in radians, and distance is in meters.

 

Adding New Start Groups

To add a new start group to a region in Siege Editor, select 'Starting groups' from the 'Settings' menu. Hit 'New'. Enter a name for your new start group; remember that it must be unique for the map. Our convention is to use the name of the region the start group is in, if possible. The Mood Name field is not used. Entering a Description is not necessary, but will help you later if you enter something that will help you remember what the purpose of the start group is.

Hit 'Ok' twice to exit the Start Group interface. Now you must place a start position in your start group (empty start groups will not be saved). Open the 'Siege Objects' folder in the folder view and place a start position in your region. Right-click on the start position or hit 'v' to open its properties. Use the drop-down menu to select the start group that you want the start position to be a member of.

Repeat until you've placed all the start positions that you want in your group. Remember to check 'save start positions' when you save the region.

If the start group that you just created will ever be used as a spawn point for the player (i.e. it's not a teleporter), then it must have a unique ID. For DS2, I based the ID number off of the region name: the ID of the start group in a1_06_01, for example, was 1601. For DS2x, we'll probably want to make the ID for, say, x1_02 1021.

 

Changing the Default Start Group

The starting_group_toggle gizmo can be used to change where the player's party will start on loading a saved game. By default, the player's party will start at the start group marked 'default = true'; which is the tutorial area in the DS2_world map. However, once the player's party reaches the town of Eirulan, we no longer want them to start in the tutorial after saving and loading their game. We must change the default start group for that party.

To set up a starting_group_toggle gizmo that will change the default start group, first place a trigger with the condition 'party_member_within_bounding_box' at the location where you want the change to occur. (We place them around all start positions in each town, so that the player's party will start in the last town they were in on loading a saved game.) Make the trigger's action 'send_world_message', and make the message 'we_req_activate'. Next, place a starting_group_toggle gizmo (found in objects/gizmos/special in the folder view). Open its object properties ('v') and set 'change_default_group' and 'enable_group' (found in the [starting_group_toggle] block) to true.

Finally, paste the ID number of the starting group that you want to set as default (1301 in the example start group above) into the 'default_group_id' and the 'starting_group_id' fields. Now, when a character in the player's party enters the bounding box, their default start group will be updated.

 

Town Portal Start Groups

Town portal start groups utilize special code, and are used as destinations for the town portal spell. There are three possible destinations for the town portal spell (the three towns), and there is a town portal start group for each. The name of the town portal start group is the name of the default town start group with '_town_portal' appended to the end.

If, for example, a1_01_06_jngtown is the current default start group, a1_01_06_jngtown_town_portal will be the start group used by the town portal spell. If no such town portal start group exists, the current default start group will be used.