<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.datoolset.net/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arixsus</id>
		<title>Dragon Age Toolset Wiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.datoolset.net/mw/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Arixsus"/>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/wiki/Special:Contributions/Arixsus"/>
		<updated>2026-04-18T06:27:18Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.6</generator>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8401</id>
		<title>Map tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8401"/>
				<updated>2009-11-28T05:05:56Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Restructured my previous editions to the tutorial. moved creating a custom maps in photoshop tutorial section to the bottom, and created a tutorial on how to add them into worldmaps.xls&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map objects are a way to allow the player to travel from area to area without having to follow a rigid path from one exit to the next. They're useful for representing large expanses of wide-open countryside, for example, or a city with various districts that the player can travel between freely but is too large to conveniently fit in a single area. Maps allow a world to be large without having to detail every little irrelevant place in it.&lt;br /&gt;
&lt;br /&gt;
If you start by creating a new map resource within the designer toolkit, you'll quickly find that there is only a very limited pre-defined list of map images that are available for use. That's because map layouts are defined in a 2DA (&amp;quot;two-dimensional array&amp;quot;), a binary table of data that is used by the toolset to provide definitions but that is not itself editable from it. You may have encountered references to 2DAs when working with other objects. For example, the list of variables that an object's scripts can refer to is stored in a 2DA. This tutorial is going to assume that you've never worked with 2DAs themselves before. In a sense, this tutorial is as much a 2DA tutorial as it is a map tutorial.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
This tutorial makes use of a number of different three-letter acronyms and specific terms that may be troublesome to keep track of at first. Before we dive straight in, here's a cheat sheet that may prove useful:&lt;br /&gt;
&lt;br /&gt;
*2DA - &amp;quot;two-dimensional array&amp;quot;, the table of data we'll be editing. Note that a 2DA can be stored in a human-readable or machine-readable format, each of which has their own names. &amp;quot;2DA&amp;quot; is used to refer to the table as an abstract concept.&lt;br /&gt;
*XLS - the file extension for an Excel spreadsheet.&lt;br /&gt;
*Worksheet - tabbed panes within an Excel spreadsheet. Each Excel spreadsheet can contain multiple worksheets and each worksheet can represent one 2DA, so one spreadsheet can contain multiple 2DAs.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worksheet tabs.png|frame|center|Worksheet tabs along the bottom of an Excel spreadsheet]]&lt;br /&gt;
&lt;br /&gt;
*GDA - The file extension for a binary file usable by the game. 2DAs that have been processed by the resource exporter will be stored in this form.&lt;br /&gt;
*TGA - Targa graphics file extension. TGA graphic files are used to define the underlying appearance of the map itself.&lt;br /&gt;
*M2DA - &amp;quot;Multiple 2DA&amp;quot;. Previous BioWare games have made use of 2DAs, but the 2DAs used in Dragon Age use this new format instead. It allows several different 2DAs to be combined together and treated as a single 2DA by the game, which is very useful for adding new content to an existing 2DA.&lt;br /&gt;
&lt;br /&gt;
== The worldmaps.xls spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
See also [[worldmaps.xls]].&lt;br /&gt;
&lt;br /&gt;
If we're creating maps for a brand new module we could in theory start with a blank Excel spreadsheet and build the required 2DAs from scratch. It's much easier, however, to start with an existing copy of the relevant spreadsheet from another module and replace the values within it with our own.&lt;br /&gt;
&lt;br /&gt;
The spreadsheet that contains all the 2DAs relevant to world maps is &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;. Open it in Excel and you'll find that it contains, among other worksheets, the &amp;quot;worldmaps&amp;quot; worksheet.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet.png|frame|center|The redaction will be removed when the game ships !!Note: mere moments after these screenshots were taken a NameStrRef column was added to allow localized map names. These screenshots will have to be redone anyway!!]]&lt;br /&gt;
&lt;br /&gt;
This is the core 2DA that defines what maps are available in the Designer Toolset's &amp;quot;Map&amp;quot; dropdown menu.&lt;br /&gt;
&lt;br /&gt;
First, some standard features that all 2DA worksheets will have:&lt;br /&gt;
*The first row of the worksheet contains the labels of the columns. Don't change the names of columns or the game won't be able to recognize them.&lt;br /&gt;
*The second row contains a keyword describing the data type of that column. Again, don't change this or the game will become confused by what it's seeing.&lt;br /&gt;
*The first column contains ID numbers. Each row needs to have a unique ID number.&lt;br /&gt;
&lt;br /&gt;
In the case of the worldmaps worksheet there are four columns that contain the data defining the map layout.&lt;br /&gt;
* Label - The name that this map layout will be known by in the Designer Toolkit's dropdown menu. It's not seen by the player.&lt;br /&gt;
* MAP - The filename of the .tga that defines the map's appearance, without the .tga extension.&lt;br /&gt;
* TargetWpTable - The names of 2DAs that contains information about what waypoints the player appears at within areas accessible from the map. This is discussed in greater detail below.&lt;br /&gt;
* TripsCounterTable - A table showing which trips should have random encounters. We won't be going into detail about this in this tutorial.&lt;br /&gt;
&lt;br /&gt;
We'll need to add a new row to this table to describe the map area that we want to use in the toolset. For this example we have a map of a region named &amp;quot;Epona's Realm&amp;quot;, in a file named &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt;. We'll need to assign a unique number ID, which we'll arbitrarily set to 700 (using a high number like this makes it less likely to interfere with other people's additions in the future.). We'll call the target waypoint table &amp;quot;target_wps_epona&amp;quot; to fit with the naming convention of the other maps.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet with epona added.png]]&lt;br /&gt;
&lt;br /&gt;
In our hypothetical game module we've got three different cities that the player can reach via the world map; Dunland, Agrabia, and Serepta. They'll be represented by the areas dunland_main, agrabia_main, and serepta_main. The next thing we might want to do is create a 2DA that defines which waypoints you wind up in when you travel to each of these areas from each of the possible origin points. This isn't strictly necessary but can be used to make travel around the worldmap seem more realistic by having the player arrive at different waypoints depending on which direction they're arriving in an area from.&lt;br /&gt;
&lt;br /&gt;
Again, a convenient starting place is an existing 2DA. This 2DA is another worksheet in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt; that shows the target waypoints for a group of areas accessible from a city map in the game's single-player campaign:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps example.png]]&lt;br /&gt;
&lt;br /&gt;
All of the source areas are listed in the second column, and then each column after that corresponds to a destination area for that source. Every source needs a destination column, so there should always be a number of columns equal to the number of sources plus two (the &amp;quot;ID&amp;quot; and &amp;quot;SourceLocation&amp;quot; columns). In this example, if you're in the &amp;quot;markets&amp;quot; area and then use the map to go to the &amp;quot;elven_alienage&amp;quot; area, you'll be placed at the waypoint &amp;quot;wmw_alienage_from_market&amp;quot;. Since you can never travel from an area to that same area via the map the diagonal entries are left blank.&lt;br /&gt;
&lt;br /&gt;
To repurpose this 2DA for Epona's Realm, first copy the worksheet and then rename it to &amp;quot;target_wps_epona&amp;quot;. We'll only need three rows and three destination columns so delete the extras.&lt;br /&gt;
&lt;br /&gt;
The geometry of these three cities is quite simple, they lie in an east-west row with Serepta to the west, Agrabia in the center, and Dunland to the east. We'll place waypoints in the eastern and western ends of agrabia_main's area layout to represent the player arriving from each of those directions.&lt;br /&gt;
&lt;br /&gt;
So, the final version of the target_wps_epona worksheet will look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps_epona.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using M2DAs to extend the game ==&lt;br /&gt;
&lt;br /&gt;
There's one remaining complication to be addressed now. When you generate &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; it will include our new map ID 700, but it also includes the old maps with the IDs 1-5. Since the file is in the override directory, these rows override the existing maps with those ID numbers in the single player campaign. This isn't a problem right now since the data is identical but it could be a problem in the future; if BioWare releases an update that needs to change those original five maps, or if some other modder wants to add some maps of his own, only one version will &amp;quot;win&amp;quot; and the result could be a mess.&lt;br /&gt;
&lt;br /&gt;
This can be overcome by splitting up a 2DA into different files that all get loaded by the game and are combined into one 2DA internally. These multi-part 2DA files are known as M2DAs, which stands for &amp;quot;multiple 2DA&amp;quot;. The identity of M2DA files is kept track of via their &amp;quot;prefix&amp;quot;, a string of text that all M2DAs being with. In the case of the worldmaps 2DA, the prefix is &amp;quot;worldmaps&amp;quot; (ie, the &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; file has the &amp;quot;worldmaps&amp;quot; prefix and no suffix, so it belongs to the &amp;quot;worldmaps&amp;quot; 2DA).&lt;br /&gt;
&lt;br /&gt;
What we'll do now is split out the data relating to our &amp;quot;Epona's Realm&amp;quot; map into a separate M2DA file named &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt;. Simply rename the worksheet to &amp;quot;worldmaps_epona&amp;quot; and delete the first five rows of data entirely, leaving us with this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps_epona worksheet.png]]&lt;br /&gt;
&lt;br /&gt;
Now when the game encounters this 2DA in the override directory it will keep the data from the original worldmaps 2DA in memory and add the data from worldmaps_epona to it. If in the future some other modder builds on top of your work they can add further worldmap M2DAs, and if a patch comes out that updates the contents of the original 2DA your mod will incorporate it without needing to be updated.&lt;br /&gt;
&lt;br /&gt;
== Converting XLS files into GDA files ==&lt;br /&gt;
&lt;br /&gt;
The game can't use Excel files directly, the 2DAs must first be converted into a &amp;quot;binarized&amp;quot; form. This is done by a command-line utility called &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;. Command-line utilities are not very user-friendly, however, so a more convenient &amp;quot;wrapper&amp;quot; is included in the form of another spreadsheet named &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; uses macros to run &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt; with the appropriate command-line options. You'll need to provide &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; with the following parameters:&lt;br /&gt;
&lt;br /&gt;
* ResourceBuild Path: The path to &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;, which is installed by default in your Dragon Age directory under tools\ResourceBuild&lt;br /&gt;
* 2DA Path: The source path of the XLS files to be exported.&lt;br /&gt;
* Override Path: The path to the directory that the completed GDA files should be exported to. This doesn't have to be your actual override directory, you can move the files there manually after creating them if you prefer.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;' macro can have trouble with paths that have spaces in them, so you may need to move your XLS files to a path without any. Likewise, you may not be able to send the output files directly to the override directory if there are spaces in its path.&lt;br /&gt;
&lt;br /&gt;
Here's how we've set up &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; for converting our example:&lt;br /&gt;
&lt;br /&gt;
[[Image:2da exporter for worldmap tutorial.png]]&lt;br /&gt;
&lt;br /&gt;
To convert worldmaps.xls into binary form, select it and click the &amp;quot;Export Selected&amp;quot; button. A command-line window should pop up briefly while ResourceBuilder runs and then the finished GDA files will be placed in the directory listed in &amp;quot;Override Path.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you can't get &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; working, just run &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; instead. You can learn more about &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; by reading the [[2DA]] section.&lt;br /&gt;
&lt;br /&gt;
Note that there will be a separate GDA file for each worksheet in the XLS file, named after the worksheets in the XLS file. We only need to use two of them; &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;target_wps_epona.GDA&amp;lt;/code&amp;gt;. Copy these files into your game's override directory along with &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt; and &amp;quot;Epona's Realm&amp;quot; will become available in the toolset's dropdown menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a map and adding pins ==&lt;br /&gt;
&lt;br /&gt;
Now we can at last see the map as an option in the drop-down menus of the toolset. Create a map and set the &amp;quot;Map&amp;quot; property to Epona's Realm, and the map should appear.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps selecting Epona.png]]&lt;br /&gt;
&lt;br /&gt;
There's not much to the map itself - its only configurable properties are Parent Map, Tag, and Map. To make the map useful beyond simply displaying a graphic we'll need to add map pins (icons representing destinations). You can also add &amp;quot;trails&amp;quot;, which are a series of icons that you can make appear between different pins to mark the player's passage, but these are of lesser importance and can be left for later or omitted entirely.&lt;br /&gt;
&lt;br /&gt;
To insert a pin, right-click on the map and select &amp;quot;insert pin&amp;quot; from the drop-down menu. The pointer will turn into a crosshair that you can click anywhere on the map to place a pin (pins can also be dragged around after creation so don't worry if you miss slightly). The pin will be added to the tree view to the left of the map and, when selected, you can view its properties in the object inspector.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps placing a pin.png]]&lt;br /&gt;
&lt;br /&gt;
The most important properties to set here are:&lt;br /&gt;
* AreaTag - tells the game which area to take the player to when he clicks on this pin. Our Dunland pin will have this set to dunland_main.&lt;br /&gt;
* Initial State - tells the game whether to display the pin and whether to make it clickable; you will often want to have pins on the map that only become available to the player at some point later in the game. We'll set Dunland to &amp;quot;grayed out&amp;quot; right now, since we'll want the player to know about its existence but not be able to go there right away.&lt;br /&gt;
* Name - This name is shown to the player.&lt;br /&gt;
*Pin Type - A list of icons that can be used for the pin. The list of appearances available can be added to in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;, you may have noticed the &amp;lt;code&amp;gt;map_pin_images&amp;lt;/code&amp;gt; worksheet when you were editing it earlier.&lt;br /&gt;
&lt;br /&gt;
Other properties you may wish to set include &amp;quot;Tooltip&amp;quot; (a longer description that will be shown to the player if he hovers the mouse pointer over the pin) and &amp;quot;Waypoint Override&amp;quot;, which designates which waypoint in the pin's target area to send the player to when he clicks on it. This waypoint overrides the one set in target_wps_epona but has less fine-grained control available; it can be useful for testing purposes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;TerrainType&amp;quot; property is used to determine which group of random encounters to draw from. Setting up random encounters is a more advanced topic that we won't cover in this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps pins placed.png]]&lt;br /&gt;
&lt;br /&gt;
== Showing the player the map ==&lt;br /&gt;
&lt;br /&gt;
Once you've got a map built for your module you'll need to tell the game how to use it. There are a number of wrapper functions in wrappers_h that you'll find useful for this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPrimary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function tells the game what the current default &amp;quot;world map&amp;quot; is. You'll want to set this to your default world map as part of the initial setup of your module, and if you have multiple different maps you'll need to call this function again later in the game to switch which one is active (for example in a plot script that triggers when the player completes a certain task or moves to a certain area).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapSecondary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!!Need to find out more about this one.!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapLocationStatus(object oLocation, int nStatusId, int bSuppressActiveFlash = FALSE)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oLocation is a map pin, nStatusId is an integer identifier for one of the status states (such as active, grayed out, destroyed), and the optional bSuppressActiveFlash flag tells the game to omit the visual highlighting that is usually shown around map pins that have had their status changed since the last time the player looked at the map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPlayerLocation(object oMap, object oLocation)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This marks the player's current location on the map.&lt;br /&gt;
&lt;br /&gt;
=== Sending the player to the world map via an area transition ===&lt;br /&gt;
&lt;br /&gt;
To set up an area transition placeable (such as a door) to send the player to the world map when an area transition is performed, set the placeable's PLC_AT_DEST_AREA_TAG variable to the string &amp;quot;world_map&amp;quot;. This is a special string that's used to signal the placeable_core script's area-transition-handling code that it needs to show a map instead. When the placeable is triggered it will send an EVENT_TYPE_TRANSITION_TO_WORLD_MAP event to the module's event script.&lt;br /&gt;
&lt;br /&gt;
The default module_core script doesn't handle this event so you'll need to add your own module event script to override this behavior. The module's event script should call the following core script functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 SetWorldMapGuiStatus(WM_GUI_STATUS_USE);&lt;br /&gt;
 OpenPrimaryWorldMap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This displays the map to the player.&lt;br /&gt;
&lt;br /&gt;
== Activating and deactivating map pins ==&lt;br /&gt;
&lt;br /&gt;
This can be done via scripting.&lt;br /&gt;
&lt;br /&gt;
First get the world map pin object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
object oVillage = GetObjectByTag(WML_WOW_VILLAGE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then call the following to activate the pin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WR_SetWorldMapLocationStatus(oVillage, WM_LOCATION_ACTIVE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Area transitions using the default area transition core script can also automatically enable certain map pins when the player travels through them. The names of these pins are set in the area transition's variables.&lt;br /&gt;
&lt;br /&gt;
== Handling the player's map usage ==&lt;br /&gt;
&lt;br /&gt;
If the proper destination areas and waypoints have been set in the map pins (and optionally the target_wps 2DA) the player's movement from one location to another should be handled automatically. However, the game does provide some hooks that allows further customization or non-standard actions to be performed.&lt;br /&gt;
&lt;br /&gt;
When a player clicks on a map pin, the EVENT_TYPE_BEGIN_TRAVEL event is sent to the module script.&lt;br /&gt;
&lt;br /&gt;
This event has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* string sSource = GetEventString(ev, 0); // area tag for the source location (the area the player's leaving)&lt;br /&gt;
* string sTarget = GetEventString(ev, 1); // area tag for the target location (the area the player's travelling to)&lt;br /&gt;
* string sWPOverride = GetEventString(ev, 2); // the tag for the target waypoint override (the waypoint in the destination area that the player will appear at)&lt;br /&gt;
* int nSourceTerrain = GetEventInteger(ev, 0); //The terrain type of the source location&lt;br /&gt;
* int nTargetTerrain = GetEventInteger(ev, 1); //The terrain type of the target location - these two parameters are used in the main campaign's code for determining what sort of random encounters to generate, but that's handled entirely in scripting so you can use them for other purposes or ignore them completely if you prefer.&lt;br /&gt;
* int nWorldMap = GetEventInteger(ev, 2);&lt;br /&gt;
* object oSourceLocation = GetEventObject(ev, 0); // the map pin object representing the source location.&lt;br /&gt;
&lt;br /&gt;
In the main Dragon Age campaign's module script, a large amount of complex code is triggered by the EVENT_TYPE_BEGIN_TRAVEL event. This code takes into account a lot of special-case situations that are relevant only to the particular plot and structure of the Dragon Age main campaign. But it is important to note one thing that is ''not'' done in the EVENT_TYPE_BEGIN_TRAVEL event; the actual call to UT_DoAreaTransition().&lt;br /&gt;
&lt;br /&gt;
Instead, once you have finished doing whatever special-case coding and random encounter tests you choose to implement, you will need to store the destination that you're sending the player to in the module's variable table. Then call the WorldMapStartTravelling(); function to begin the map trail animation (the WorldMapStartTravelling function has optional parameters to insert a random encounter partway through the trip and to override the map pin the trail starts at).&lt;br /&gt;
&lt;br /&gt;
The engine will send the EVENT_TYPE_WORLDMAP_PRETRANSITION event as it begins the map trail animation. This is where you want to call UT_DoAreaTransition(); the level will begin loading in the background as the map trail animation plays.&lt;br /&gt;
&lt;br /&gt;
The following code is the most basic amount that you should need to put in your module script in order to implement area transitions via the world map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
case EVENT_TYPE_BEGIN_TRAVEL:&lt;br /&gt;
{&lt;br /&gt;
    string sTarget = GetEventString(ev, 1); // area tag target location&lt;br /&gt;
    string sWPOverride = GetEventString(ev, 2); // waypoint tag override&lt;br /&gt;
    //if you want to do any special-case code or random encounter handling, insert it here&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;, sTarget); //store target area's tag to a local module variable&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;, sWPOverride); //store target waypoint tag&lt;br /&gt;
    WorldMapStartTravelling(); //initiate the map's travelling animation. The engine will send EVENT_TYPE_WORLDMAP_PRETRANSITION once it's started. &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case EVENT_TYPE_WORLDMAP_PRETRANSITION:&lt;br /&gt;
{&lt;br /&gt;
    string sArea = GetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;); //retrieve the target area tag stored in EVENT_TYPE_BEGIN_TRAVEL&lt;br /&gt;
    string sWP = GetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;); //retrieve the target waypoint tag&lt;br /&gt;
    UT_DoAreaTransition(sArea, sWP); //execute the area transition to that target.&lt;br /&gt;
    break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a EVENT_TYPE_WORLDMAP_POSTTRANSITION event. In the Dragon Age main campaign it is used only to trigger certain cutscenes that play as a result of world travel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other map-related events ===&lt;br /&gt;
&lt;br /&gt;
The EVENT_TYPE_WORLD_MAP_CLOSED is sent to the module script when the world map is closed. It has only one parameter, an integer flag that indicates whether the map was closed due to cancel being selected or due to the player traveling to a new destination.&lt;br /&gt;
&lt;br /&gt;
==Custom Maps==&lt;br /&gt;
&lt;br /&gt;
=== Creating maps in photoshop to use in-game ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some tutorials that can be used to make yourself a map in photoshop.&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map01.htm Basic Map tutorial] - required as it is the basic stepping stone to make any map [Difficulty = Basic]&lt;br /&gt;
&lt;br /&gt;
[[File:Map01_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map02.htm Paper style/aged Map tutorial ] Style #1 [Difficulty = Beginner]&lt;br /&gt;
&lt;br /&gt;
[[File:Map02_thumb.jpg]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map04.htm Colored 2D Map Tutorial ] Style #2 [Difficulty = Beginner/Intermediate]&lt;br /&gt;
&lt;br /&gt;
[[File:Map04_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map05.htm Pseudo 3D Map Tutorial ] Style #3  [Difficulty = Intermeditate/Advanced]&lt;br /&gt;
&lt;br /&gt;
[[File:Map05_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
Be sure to save the map as a .tga so the 2da will read it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
All map making tutorials above are done by Jeremy Elford and [http://www.jezelf.co.uk/index.html www.Jezelf.co.uk]''&lt;br /&gt;
&lt;br /&gt;
'''Other Valuable Map Making Resources'''&lt;br /&gt;
&lt;br /&gt;
[http://www.profantasy.com/ Cartographer 3 + Addons -$] Simple easy to use map maker for those who don't have photoshop or the skills/knowledge to work it.&lt;br /&gt;
&lt;br /&gt;
[http://cartographersguild.com/ Cartographers Guild Map Making Community  -Free] Great website if you are seeking other tutorials, inspiration, help, possibility of hiring someone to make you a map, and more!&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/ZombieNirvana#p/u/18/KO4XZfaSAoA Youtube Tut series by ZombieNirvana -Free] Great Series of tutorials on youtube&lt;br /&gt;
&lt;br /&gt;
=== Putting your map into the toolset ===&lt;br /&gt;
&lt;br /&gt;
Now that we've created our own map, we need to find away for the game to see it. In the previous parts of this tutorial we covered .xls files that contain 2da data. For this part we are going to modify the 2da so that it will use our newly created map instead of the one that shipped with Dragon Age.&lt;br /&gt;
&lt;br /&gt;
Step 1:&lt;br /&gt;
&lt;br /&gt;
Browse to your Dragon Age folder &amp;gt; tools &amp;gt; Source &amp;gt; 2DA and find the worldmaps.xls&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Step 2: &lt;br /&gt;
&lt;br /&gt;
Create a folder, somewhere on your hard drive, such as &amp;quot;C:\Dragon_Age\test_mod\&amp;quot; (do not allow any of the folders to have space)&lt;br /&gt;
&lt;br /&gt;
[[File:Step_2_map.jpg]]&lt;br /&gt;
&lt;br /&gt;
Step 3:&lt;br /&gt;
&lt;br /&gt;
Go back to your window with the Dragon Age&amp;gt;Tools&amp;gt;source&amp;gt;2da and copy the worldmaps.xls to your newly created folder.&lt;br /&gt;
&lt;br /&gt;
Step 4: &lt;br /&gt;
&lt;br /&gt;
open up your copied over worldmaps.xls and it should be on the first tab. You will notice that there are multiple tabs on the bottom, which make up the 2da.&lt;br /&gt;
&lt;br /&gt;
Step 5: &lt;br /&gt;
&lt;br /&gt;
After you have opened up the .xls you will see &lt;br /&gt;
&lt;br /&gt;
1	Wide Open World	396061	Worldmap	target_wps_wow	1012	enc_trips_sp&lt;br /&gt;
[[File:Step_3_map.jpg]]&lt;br /&gt;
&lt;br /&gt;
Step 6:&lt;br /&gt;
&lt;br /&gt;
This step is rather simple, in Column D Row 4, you will notice that it says world map. This is the part of the .2da that point's to the image file. After you've taken a sec to get the feel of how it works, replace the &amp;quot;worldmap&amp;quot; txt with the name of the image file you are going to use, but leave out the file extension. As you can see in the image of step5 I have replaced &amp;quot;worldmap&amp;quot; with &amp;quot;Genalor_DA_BL_MAP&amp;quot; leaving out the .tga extension.&lt;br /&gt;
&lt;br /&gt;
Step 7:&lt;br /&gt;
&lt;br /&gt;
Download [http://combustiblestudios.comze.com/files/converter.rar Converter.rar] this .rar contains the convert.bat and excelprocessor.exe needed to convert your newly changed worldmaps.xls into a GDA for you to use in your mod.&lt;br /&gt;
&lt;br /&gt;
Step 8:&lt;br /&gt;
&lt;br /&gt;
Once downloaded extract it to your folder that you copied and edited your worldmaps.xls in. When it is finished copying over, right click the covert.bat and select edit. It should pop up a window using notepad.exe that should look like this.&lt;br /&gt;
[[File:Step 4 map.jpg]]&lt;br /&gt;
&lt;br /&gt;
Step 9:&lt;br /&gt;
&lt;br /&gt;
You will see in the opened Covert.bat that will say&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
C:\Combustable_Studios\Dragon_Age_Files\XLS\test_mod\ExcelProcessor.exe worldmaps.xls -outdir=C:\Combustable_Studios\Dragon_Age_Files\XLS\test_mod\convert\&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this part you want to change&lt;br /&gt;
 &amp;lt;pre&amp;gt;C:\Combustable_Studios\Dragon_Age_Files\XLS\test_mod\ExcelProcessor.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;Your Directory where the stuff you need to convert is located\Excelprocessor.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;-Outdir=C:\Combustable_Studios\Dragon_Age_Files\XLS\test_mod\convert\&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;-Outdir=Your Directory where the stuff you need to convert is located\convert\&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have changed those batch to point to your folder and file save and close it. Once it is saved and has been close run it, if all goes well it should create a folder called convert and it will contain the following GDA's.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Location_states.GDA&lt;br /&gt;
Map_pin_images.GDA&lt;br /&gt;
State_image_suffixes.GDA&lt;br /&gt;
target_wps_climax_denerim.GDA&lt;br /&gt;
target_wps_denerim.GDA&lt;br /&gt;
target_wps_fade.GDA&lt;br /&gt;
target_wps_underground.GDA&lt;br /&gt;
target_wps_wow.GDA&lt;br /&gt;
terrain_types.GDA&lt;br /&gt;
worldmaps.GDA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
step 10: Copy those files then navigate to your BioWare\Dragon Age\AddIns\mod_name\core\override and paste them into the folder. Then go get your .tga map you created in what ever program you used and place it into that folder to. &lt;br /&gt;
&lt;br /&gt;
After step 10 you may jump back up to Creating a map and adding pins tutorial, and where your map will have replaced the original world map.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Once you get a feel with what you are doing you may be able to do more, but I would not recommend such a thing for those who are new to this kinda stuff&amp;quot;--[[User:Arixsus|-Arixsus]] 05:05, 28 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Maps]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8400</id>
		<title>Map tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8400"/>
				<updated>2009-11-28T05:01:41Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map objects are a way to allow the player to travel from area to area without having to follow a rigid path from one exit to the next. They're useful for representing large expanses of wide-open countryside, for example, or a city with various districts that the player can travel between freely but is too large to conveniently fit in a single area. Maps allow a world to be large without having to detail every little irrelevant place in it.&lt;br /&gt;
&lt;br /&gt;
If you start by creating a new map resource within the designer toolkit, you'll quickly find that there is only a very limited pre-defined list of map images that are available for use. That's because map layouts are defined in a 2DA (&amp;quot;two-dimensional array&amp;quot;), a binary table of data that is used by the toolset to provide definitions but that is not itself editable from it. You may have encountered references to 2DAs when working with other objects. For example, the list of variables that an object's scripts can refer to is stored in a 2DA. This tutorial is going to assume that you've never worked with 2DAs themselves before. In a sense, this tutorial is as much a 2DA tutorial as it is a map tutorial.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
This tutorial makes use of a number of different three-letter acronyms and specific terms that may be troublesome to keep track of at first. Before we dive straight in, here's a cheat sheet that may prove useful:&lt;br /&gt;
&lt;br /&gt;
*2DA - &amp;quot;two-dimensional array&amp;quot;, the table of data we'll be editing. Note that a 2DA can be stored in a human-readable or machine-readable format, each of which has their own names. &amp;quot;2DA&amp;quot; is used to refer to the table as an abstract concept.&lt;br /&gt;
*XLS - the file extension for an Excel spreadsheet.&lt;br /&gt;
*Worksheet - tabbed panes within an Excel spreadsheet. Each Excel spreadsheet can contain multiple worksheets and each worksheet can represent one 2DA, so one spreadsheet can contain multiple 2DAs.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worksheet tabs.png|frame|center|Worksheet tabs along the bottom of an Excel spreadsheet]]&lt;br /&gt;
&lt;br /&gt;
*GDA - The file extension for a binary file usable by the game. 2DAs that have been processed by the resource exporter will be stored in this form.&lt;br /&gt;
*TGA - Targa graphics file extension. TGA graphic files are used to define the underlying appearance of the map itself.&lt;br /&gt;
*M2DA - &amp;quot;Multiple 2DA&amp;quot;. Previous BioWare games have made use of 2DAs, but the 2DAs used in Dragon Age use this new format instead. It allows several different 2DAs to be combined together and treated as a single 2DA by the game, which is very useful for adding new content to an existing 2DA.&lt;br /&gt;
&lt;br /&gt;
== The worldmaps.xls spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
See also [[worldmaps.xls]].&lt;br /&gt;
&lt;br /&gt;
If we're creating maps for a brand new module we could in theory start with a blank Excel spreadsheet and build the required 2DAs from scratch. It's much easier, however, to start with an existing copy of the relevant spreadsheet from another module and replace the values within it with our own.&lt;br /&gt;
&lt;br /&gt;
The spreadsheet that contains all the 2DAs relevant to world maps is &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;. Open it in Excel and you'll find that it contains, among other worksheets, the &amp;quot;worldmaps&amp;quot; worksheet.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet.png|frame|center|The redaction will be removed when the game ships !!Note: mere moments after these screenshots were taken a NameStrRef column was added to allow localized map names. These screenshots will have to be redone anyway!!]]&lt;br /&gt;
&lt;br /&gt;
This is the core 2DA that defines what maps are available in the Designer Toolset's &amp;quot;Map&amp;quot; dropdown menu.&lt;br /&gt;
&lt;br /&gt;
First, some standard features that all 2DA worksheets will have:&lt;br /&gt;
*The first row of the worksheet contains the labels of the columns. Don't change the names of columns or the game won't be able to recognize them.&lt;br /&gt;
*The second row contains a keyword describing the data type of that column. Again, don't change this or the game will become confused by what it's seeing.&lt;br /&gt;
*The first column contains ID numbers. Each row needs to have a unique ID number.&lt;br /&gt;
&lt;br /&gt;
In the case of the worldmaps worksheet there are four columns that contain the data defining the map layout.&lt;br /&gt;
* Label - The name that this map layout will be known by in the Designer Toolkit's dropdown menu. It's not seen by the player.&lt;br /&gt;
* MAP - The filename of the .tga that defines the map's appearance, without the .tga extension.&lt;br /&gt;
* TargetWpTable - The names of 2DAs that contains information about what waypoints the player appears at within areas accessible from the map. This is discussed in greater detail below.&lt;br /&gt;
* TripsCounterTable - A table showing which trips should have random encounters. We won't be going into detail about this in this tutorial.&lt;br /&gt;
&lt;br /&gt;
We'll need to add a new row to this table to describe the map area that we want to use in the toolset. For this example we have a map of a region named &amp;quot;Epona's Realm&amp;quot;, in a file named &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt;. We'll need to assign a unique number ID, which we'll arbitrarily set to 700 (using a high number like this makes it less likely to interfere with other people's additions in the future.). We'll call the target waypoint table &amp;quot;target_wps_epona&amp;quot; to fit with the naming convention of the other maps.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet with epona added.png]]&lt;br /&gt;
&lt;br /&gt;
In our hypothetical game module we've got three different cities that the player can reach via the world map; Dunland, Agrabia, and Serepta. They'll be represented by the areas dunland_main, agrabia_main, and serepta_main. The next thing we might want to do is create a 2DA that defines which waypoints you wind up in when you travel to each of these areas from each of the possible origin points. This isn't strictly necessary but can be used to make travel around the worldmap seem more realistic by having the player arrive at different waypoints depending on which direction they're arriving in an area from.&lt;br /&gt;
&lt;br /&gt;
Again, a convenient starting place is an existing 2DA. This 2DA is another worksheet in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt; that shows the target waypoints for a group of areas accessible from a city map in the game's single-player campaign:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps example.png]]&lt;br /&gt;
&lt;br /&gt;
All of the source areas are listed in the second column, and then each column after that corresponds to a destination area for that source. Every source needs a destination column, so there should always be a number of columns equal to the number of sources plus two (the &amp;quot;ID&amp;quot; and &amp;quot;SourceLocation&amp;quot; columns). In this example, if you're in the &amp;quot;markets&amp;quot; area and then use the map to go to the &amp;quot;elven_alienage&amp;quot; area, you'll be placed at the waypoint &amp;quot;wmw_alienage_from_market&amp;quot;. Since you can never travel from an area to that same area via the map the diagonal entries are left blank.&lt;br /&gt;
&lt;br /&gt;
To repurpose this 2DA for Epona's Realm, first copy the worksheet and then rename it to &amp;quot;target_wps_epona&amp;quot;. We'll only need three rows and three destination columns so delete the extras.&lt;br /&gt;
&lt;br /&gt;
The geometry of these three cities is quite simple, they lie in an east-west row with Serepta to the west, Agrabia in the center, and Dunland to the east. We'll place waypoints in the eastern and western ends of agrabia_main's area layout to represent the player arriving from each of those directions.&lt;br /&gt;
&lt;br /&gt;
So, the final version of the target_wps_epona worksheet will look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps_epona.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using M2DAs to extend the game ==&lt;br /&gt;
&lt;br /&gt;
There's one remaining complication to be addressed now. When you generate &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; it will include our new map ID 700, but it also includes the old maps with the IDs 1-5. Since the file is in the override directory, these rows override the existing maps with those ID numbers in the single player campaign. This isn't a problem right now since the data is identical but it could be a problem in the future; if BioWare releases an update that needs to change those original five maps, or if some other modder wants to add some maps of his own, only one version will &amp;quot;win&amp;quot; and the result could be a mess.&lt;br /&gt;
&lt;br /&gt;
This can be overcome by splitting up a 2DA into different files that all get loaded by the game and are combined into one 2DA internally. These multi-part 2DA files are known as M2DAs, which stands for &amp;quot;multiple 2DA&amp;quot;. The identity of M2DA files is kept track of via their &amp;quot;prefix&amp;quot;, a string of text that all M2DAs being with. In the case of the worldmaps 2DA, the prefix is &amp;quot;worldmaps&amp;quot; (ie, the &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; file has the &amp;quot;worldmaps&amp;quot; prefix and no suffix, so it belongs to the &amp;quot;worldmaps&amp;quot; 2DA).&lt;br /&gt;
&lt;br /&gt;
What we'll do now is split out the data relating to our &amp;quot;Epona's Realm&amp;quot; map into a separate M2DA file named &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt;. Simply rename the worksheet to &amp;quot;worldmaps_epona&amp;quot; and delete the first five rows of data entirely, leaving us with this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps_epona worksheet.png]]&lt;br /&gt;
&lt;br /&gt;
Now when the game encounters this 2DA in the override directory it will keep the data from the original worldmaps 2DA in memory and add the data from worldmaps_epona to it. If in the future some other modder builds on top of your work they can add further worldmap M2DAs, and if a patch comes out that updates the contents of the original 2DA your mod will incorporate it without needing to be updated.&lt;br /&gt;
&lt;br /&gt;
== Converting XLS files into GDA files ==&lt;br /&gt;
&lt;br /&gt;
The game can't use Excel files directly, the 2DAs must first be converted into a &amp;quot;binarized&amp;quot; form. This is done by a command-line utility called &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;. Command-line utilities are not very user-friendly, however, so a more convenient &amp;quot;wrapper&amp;quot; is included in the form of another spreadsheet named &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; uses macros to run &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt; with the appropriate command-line options. You'll need to provide &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; with the following parameters:&lt;br /&gt;
&lt;br /&gt;
* ResourceBuild Path: The path to &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;, which is installed by default in your Dragon Age directory under tools\ResourceBuild&lt;br /&gt;
* 2DA Path: The source path of the XLS files to be exported.&lt;br /&gt;
* Override Path: The path to the directory that the completed GDA files should be exported to. This doesn't have to be your actual override directory, you can move the files there manually after creating them if you prefer.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;' macro can have trouble with paths that have spaces in them, so you may need to move your XLS files to a path without any. Likewise, you may not be able to send the output files directly to the override directory if there are spaces in its path.&lt;br /&gt;
&lt;br /&gt;
Here's how we've set up &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; for converting our example:&lt;br /&gt;
&lt;br /&gt;
[[Image:2da exporter for worldmap tutorial.png]]&lt;br /&gt;
&lt;br /&gt;
To convert worldmaps.xls into binary form, select it and click the &amp;quot;Export Selected&amp;quot; button. A command-line window should pop up briefly while ResourceBuilder runs and then the finished GDA files will be placed in the directory listed in &amp;quot;Override Path.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you can't get &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; working, just run &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; instead. You can learn more about &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; by reading the [[2DA]] section.&lt;br /&gt;
&lt;br /&gt;
Note that there will be a separate GDA file for each worksheet in the XLS file, named after the worksheets in the XLS file. We only need to use two of them; &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;target_wps_epona.GDA&amp;lt;/code&amp;gt;. Copy these files into your game's override directory along with &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt; and &amp;quot;Epona's Realm&amp;quot; will become available in the toolset's dropdown menu.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Creating a map and adding pins ==&lt;br /&gt;
&lt;br /&gt;
Now we can at last see the map as an option in the drop-down menus of the toolset. Create a map and set the &amp;quot;Map&amp;quot; property to Epona's Realm, and the map should appear.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps selecting Epona.png]]&lt;br /&gt;
&lt;br /&gt;
There's not much to the map itself - its only configurable properties are Parent Map, Tag, and Map. To make the map useful beyond simply displaying a graphic we'll need to add map pins (icons representing destinations). You can also add &amp;quot;trails&amp;quot;, which are a series of icons that you can make appear between different pins to mark the player's passage, but these are of lesser importance and can be left for later or omitted entirely.&lt;br /&gt;
&lt;br /&gt;
To insert a pin, right-click on the map and select &amp;quot;insert pin&amp;quot; from the drop-down menu. The pointer will turn into a crosshair that you can click anywhere on the map to place a pin (pins can also be dragged around after creation so don't worry if you miss slightly). The pin will be added to the tree view to the left of the map and, when selected, you can view its properties in the object inspector.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps placing a pin.png]]&lt;br /&gt;
&lt;br /&gt;
The most important properties to set here are:&lt;br /&gt;
* AreaTag - tells the game which area to take the player to when he clicks on this pin. Our Dunland pin will have this set to dunland_main.&lt;br /&gt;
* Initial State - tells the game whether to display the pin and whether to make it clickable; you will often want to have pins on the map that only become available to the player at some point later in the game. We'll set Dunland to &amp;quot;grayed out&amp;quot; right now, since we'll want the player to know about its existence but not be able to go there right away.&lt;br /&gt;
* Name - This name is shown to the player.&lt;br /&gt;
*Pin Type - A list of icons that can be used for the pin. The list of appearances available can be added to in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;, you may have noticed the &amp;lt;code&amp;gt;map_pin_images&amp;lt;/code&amp;gt; worksheet when you were editing it earlier.&lt;br /&gt;
&lt;br /&gt;
Other properties you may wish to set include &amp;quot;Tooltip&amp;quot; (a longer description that will be shown to the player if he hovers the mouse pointer over the pin) and &amp;quot;Waypoint Override&amp;quot;, which designates which waypoint in the pin's target area to send the player to when he clicks on it. This waypoint overrides the one set in target_wps_epona but has less fine-grained control available; it can be useful for testing purposes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;TerrainType&amp;quot; property is used to determine which group of random encounters to draw from. Setting up random encounters is a more advanced topic that we won't cover in this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps pins placed.png]]&lt;br /&gt;
&lt;br /&gt;
== Showing the player the map ==&lt;br /&gt;
&lt;br /&gt;
Once you've got a map built for your module you'll need to tell the game how to use it. There are a number of wrapper functions in wrappers_h that you'll find useful for this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPrimary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function tells the game what the current default &amp;quot;world map&amp;quot; is. You'll want to set this to your default world map as part of the initial setup of your module, and if you have multiple different maps you'll need to call this function again later in the game to switch which one is active (for example in a plot script that triggers when the player completes a certain task or moves to a certain area).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapSecondary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!!Need to find out more about this one.!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapLocationStatus(object oLocation, int nStatusId, int bSuppressActiveFlash = FALSE)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oLocation is a map pin, nStatusId is an integer identifier for one of the status states (such as active, grayed out, destroyed), and the optional bSuppressActiveFlash flag tells the game to omit the visual highlighting that is usually shown around map pins that have had their status changed since the last time the player looked at the map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPlayerLocation(object oMap, object oLocation)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This marks the player's current location on the map.&lt;br /&gt;
&lt;br /&gt;
=== Sending the player to the world map via an area transition ===&lt;br /&gt;
&lt;br /&gt;
To set up an area transition placeable (such as a door) to send the player to the world map when an area transition is performed, set the placeable's PLC_AT_DEST_AREA_TAG variable to the string &amp;quot;world_map&amp;quot;. This is a special string that's used to signal the placeable_core script's area-transition-handling code that it needs to show a map instead. When the placeable is triggered it will send an EVENT_TYPE_TRANSITION_TO_WORLD_MAP event to the module's event script.&lt;br /&gt;
&lt;br /&gt;
The default module_core script doesn't handle this event so you'll need to add your own module event script to override this behavior. The module's event script should call the following core script functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 SetWorldMapGuiStatus(WM_GUI_STATUS_USE);&lt;br /&gt;
 OpenPrimaryWorldMap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This displays the map to the player.&lt;br /&gt;
&lt;br /&gt;
== Activating and deactivating map pins ==&lt;br /&gt;
&lt;br /&gt;
This can be done via scripting.&lt;br /&gt;
&lt;br /&gt;
First get the world map pin object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
object oVillage = GetObjectByTag(WML_WOW_VILLAGE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then call the following to activate the pin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WR_SetWorldMapLocationStatus(oVillage, WM_LOCATION_ACTIVE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Area transitions using the default area transition core script can also automatically enable certain map pins when the player travels through them. The names of these pins are set in the area transition's variables.&lt;br /&gt;
&lt;br /&gt;
== Handling the player's map usage ==&lt;br /&gt;
&lt;br /&gt;
If the proper destination areas and waypoints have been set in the map pins (and optionally the target_wps 2DA) the player's movement from one location to another should be handled automatically. However, the game does provide some hooks that allows further customization or non-standard actions to be performed.&lt;br /&gt;
&lt;br /&gt;
When a player clicks on a map pin, the EVENT_TYPE_BEGIN_TRAVEL event is sent to the module script.&lt;br /&gt;
&lt;br /&gt;
This event has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* string sSource = GetEventString(ev, 0); // area tag for the source location (the area the player's leaving)&lt;br /&gt;
* string sTarget = GetEventString(ev, 1); // area tag for the target location (the area the player's travelling to)&lt;br /&gt;
* string sWPOverride = GetEventString(ev, 2); // the tag for the target waypoint override (the waypoint in the destination area that the player will appear at)&lt;br /&gt;
* int nSourceTerrain = GetEventInteger(ev, 0); //The terrain type of the source location&lt;br /&gt;
* int nTargetTerrain = GetEventInteger(ev, 1); //The terrain type of the target location - these two parameters are used in the main campaign's code for determining what sort of random encounters to generate, but that's handled entirely in scripting so you can use them for other purposes or ignore them completely if you prefer.&lt;br /&gt;
* int nWorldMap = GetEventInteger(ev, 2);&lt;br /&gt;
* object oSourceLocation = GetEventObject(ev, 0); // the map pin object representing the source location.&lt;br /&gt;
&lt;br /&gt;
In the main Dragon Age campaign's module script, a large amount of complex code is triggered by the EVENT_TYPE_BEGIN_TRAVEL event. This code takes into account a lot of special-case situations that are relevant only to the particular plot and structure of the Dragon Age main campaign. But it is important to note one thing that is ''not'' done in the EVENT_TYPE_BEGIN_TRAVEL event; the actual call to UT_DoAreaTransition().&lt;br /&gt;
&lt;br /&gt;
Instead, once you have finished doing whatever special-case coding and random encounter tests you choose to implement, you will need to store the destination that you're sending the player to in the module's variable table. Then call the WorldMapStartTravelling(); function to begin the map trail animation (the WorldMapStartTravelling function has optional parameters to insert a random encounter partway through the trip and to override the map pin the trail starts at).&lt;br /&gt;
&lt;br /&gt;
The engine will send the EVENT_TYPE_WORLDMAP_PRETRANSITION event as it begins the map trail animation. This is where you want to call UT_DoAreaTransition(); the level will begin loading in the background as the map trail animation plays.&lt;br /&gt;
&lt;br /&gt;
The following code is the most basic amount that you should need to put in your module script in order to implement area transitions via the world map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
case EVENT_TYPE_BEGIN_TRAVEL:&lt;br /&gt;
{&lt;br /&gt;
    string sTarget = GetEventString(ev, 1); // area tag target location&lt;br /&gt;
    string sWPOverride = GetEventString(ev, 2); // waypoint tag override&lt;br /&gt;
    //if you want to do any special-case code or random encounter handling, insert it here&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;, sTarget); //store target area's tag to a local module variable&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;, sWPOverride); //store target waypoint tag&lt;br /&gt;
    WorldMapStartTravelling(); //initiate the map's travelling animation. The engine will send EVENT_TYPE_WORLDMAP_PRETRANSITION once it's started. &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case EVENT_TYPE_WORLDMAP_PRETRANSITION:&lt;br /&gt;
{&lt;br /&gt;
    string sArea = GetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;); //retrieve the target area tag stored in EVENT_TYPE_BEGIN_TRAVEL&lt;br /&gt;
    string sWP = GetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;); //retrieve the target waypoint tag&lt;br /&gt;
    UT_DoAreaTransition(sArea, sWP); //execute the area transition to that target.&lt;br /&gt;
    break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a EVENT_TYPE_WORLDMAP_POSTTRANSITION event. In the Dragon Age main campaign it is used only to trigger certain cutscenes that play as a result of world travel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other map-related events ===&lt;br /&gt;
&lt;br /&gt;
The EVENT_TYPE_WORLD_MAP_CLOSED is sent to the module script when the world map is closed. It has only one parameter, an integer flag that indicates whether the map was closed due to cancel being selected or due to the player traveling to a new destination.&lt;br /&gt;
&lt;br /&gt;
==Custom Maps==&lt;br /&gt;
&lt;br /&gt;
=== Creating maps in photoshop to use in-game ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some tutorials that can be used to make yourself a map in photoshop.&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map01.htm Basic Map tutorial] - required as it is the basic stepping stone to make any map [Difficulty = Basic]&lt;br /&gt;
&lt;br /&gt;
[[File:Map01_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map02.htm Paper style/aged Map tutorial ] Style #1 [Difficulty = Beginner]&lt;br /&gt;
&lt;br /&gt;
[[File:Map02_thumb.jpg]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map04.htm Colored 2D Map Tutorial ] Style #2 [Difficulty = Beginner/Intermediate]&lt;br /&gt;
&lt;br /&gt;
[[File:Map04_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map05.htm Pseudo 3D Map Tutorial ] Style #3  [Difficulty = Intermeditate/Advanced]&lt;br /&gt;
&lt;br /&gt;
[[File:Map05_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
Be sure to save the map as a .tga so the 2da will read it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
All map making tutorials above are done by Jeremy Elford and [http://www.jezelf.co.uk/index.html www.Jezelf.co.uk]''&lt;br /&gt;
&lt;br /&gt;
'''Other Valuable Map Making Resources'''&lt;br /&gt;
&lt;br /&gt;
[http://www.profantasy.com/ Cartographer 3 + Addons -$] Simple easy to use map maker for those who don't have photoshop or the skills/knowledge to work it.&lt;br /&gt;
&lt;br /&gt;
[http://cartographersguild.com/ Cartographers Guild Map Making Community  -Free] Great website if you are seeking other tutorials, inspiration, help, possibility of hiring someone to make you a map, and more!&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/ZombieNirvana#p/u/18/KO4XZfaSAoA Youtube Tut series by ZombieNirvana -Free] Great Series of tutorials on youtube&lt;br /&gt;
&lt;br /&gt;
=== Putting your map into the toolset ===&lt;br /&gt;
&lt;br /&gt;
Now that we've created our own map, we need to find away for the game to see it. In the previous parts of this tutorial we covered .xls files that contain 2da data. For this part we are going to modify the 2da so that it will use our newly created map instead of the one that shipped with Dragon Age.&lt;br /&gt;
&lt;br /&gt;
Step 1:&lt;br /&gt;
&lt;br /&gt;
Browse to your Dragon Age folder &amp;gt; tools &amp;gt; Source &amp;gt; 2DA and find the worldmaps.xls&lt;br /&gt;
&lt;br /&gt;
[[File:Step_1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Step 2: &lt;br /&gt;
&lt;br /&gt;
Create a folder, somewhere on your hard drive, such as &amp;quot;C:\Dragon_Age\test_mod\&amp;quot; (do not allow any of the folders to have space)&lt;br /&gt;
&lt;br /&gt;
[[File:Step_2_map.jpg]]&lt;br /&gt;
&lt;br /&gt;
Step 3:&lt;br /&gt;
&lt;br /&gt;
Go back to your window with the Dragon Age&amp;gt;Tools&amp;gt;source&amp;gt;2da and copy the worldmaps.xls to your newly created folder.&lt;br /&gt;
&lt;br /&gt;
Step 4: &lt;br /&gt;
&lt;br /&gt;
open up your copied over worldmaps.xls and it should be on the first tab. You will notice that there are multiple tabs on the bottom, which make up the 2da.&lt;br /&gt;
&lt;br /&gt;
Step 5: &lt;br /&gt;
&lt;br /&gt;
After you have opened up the .xls you will see &lt;br /&gt;
&lt;br /&gt;
1	Wide Open World	396061	Worldmap	target_wps_wow	1012	enc_trips_sp&lt;br /&gt;
[[File:Step_3_map.jpg]]&lt;br /&gt;
&lt;br /&gt;
Step 6:&lt;br /&gt;
&lt;br /&gt;
This step is rather simple, in Column D Row 4, you will notice that it says world map. This is the part of the .2da that point's to the image file. After you've taken a sec to get the feel of how it works, replace the &amp;quot;worldmap&amp;quot; txt with the name of the image file you are going to use, but leave out the file extension. As you can see in the image of step5 I have replaced &amp;quot;worldmap&amp;quot; with &amp;quot;Genalor_DA_BL_MAP&amp;quot; leaving out the .tga extension.&lt;br /&gt;
&lt;br /&gt;
Step 7:&lt;br /&gt;
&lt;br /&gt;
Download [http://combustiblestudios.comze.com/files/converter.rar Converter.rar] this .rar contains the convert.bat and excelprocessor.exe needed to convert your newly changed worldmaps.xls into a GDA for you to use in your mod.&lt;br /&gt;
&lt;br /&gt;
Step 8:&lt;br /&gt;
&lt;br /&gt;
Once downloaded extract it to your folder that you copied and edited your worldmaps.xls in. When it is finished copying over, right click the covert.bat and select edit. It should pop up a window using notepad.exe that should look like this.&lt;br /&gt;
[[File:Step 4 map.jpg]]&lt;br /&gt;
&lt;br /&gt;
Step 9:&lt;br /&gt;
&lt;br /&gt;
You will see in the opened Covert.bat that will say&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;Pre&amp;gt;&lt;br /&gt;
C:\Combustable_Studios\Dragon_Age_Files\XLS\test_mod\ExcelProcessor.exe worldmaps.xls -outdir=C:\Combustable_Studios\Dragon_Age_Files\XLS\test_mod\convert\&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For this part you want to change&lt;br /&gt;
 &amp;lt;pre&amp;gt;C:\Combustable_Studios\Dragon_Age_Files\XLS\test_mod\ExcelProcessor.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;Your Directory where the stuff you need to convert is located\Excelprocessor.exe&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;-Outdir=C:\Combustable_Studios\Dragon_Age_Files\XLS\test_mod\convert\&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;pre&amp;gt;-Outdir=Your Directory where the stuff you need to convert is located\convert\&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have changed those batch to point to your folder and file save and close it. Once it is saved and has been close run it, if all goes well it should create a folder called convert and it will contain the following GDA's.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Location_states.GDA&lt;br /&gt;
Map_pin_images.GDA&lt;br /&gt;
State_image_suffixes.GDA&lt;br /&gt;
target_wps_climax_denerim.GDA&lt;br /&gt;
target_wps_denerim.GDA&lt;br /&gt;
target_wps_fade.GDA&lt;br /&gt;
target_wps_underground.GDA&lt;br /&gt;
target_wps_wow.GDA&lt;br /&gt;
terrain_types.GDA&lt;br /&gt;
worldmaps.GDA&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
step 10: Copy those files then navigate to your BioWare\Dragon Age\AddIns\mod_name\core\override and paste them into the folder. Then go get your .tga map you created in what ever program you used and place it into that folder to. &lt;br /&gt;
&lt;br /&gt;
After step 10 you may jump back up to Creating a map and adding pins tutorial, and where your map will have replaced the original world map.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Once you get a feel with what you are doing you may be able to do more, but I would not recommend such a thing for those who are new to this kinda stuff&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Maps]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=File:Step_4_map.jpg&amp;diff=8397</id>
		<title>File:Step 4 map.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=File:Step_4_map.jpg&amp;diff=8397"/>
				<updated>2009-11-28T04:35:12Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Step 4 of placing your map into worldmaps.xls&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Step 4 of placing your map into worldmaps.xls&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=File:Step_3_map.jpg&amp;diff=8394</id>
		<title>File:Step 3 map.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=File:Step_3_map.jpg&amp;diff=8394"/>
				<updated>2009-11-28T04:12:59Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Step 2 of placing your map into worldmaps.xls&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Step 2 of placing your map into worldmaps.xls&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=File:Step_2_map.jpg&amp;diff=8393</id>
		<title>File:Step 2 map.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=File:Step_2_map.jpg&amp;diff=8393"/>
				<updated>2009-11-28T04:11:01Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Step 2 of placing your map into worldmaps.xls&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Step 2 of placing your map into worldmaps.xls&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=File:Step_1.jpg&amp;diff=8392</id>
		<title>File:Step 1.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=File:Step_1.jpg&amp;diff=8392"/>
				<updated>2009-11-28T04:08:47Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Step 1 of placing your map into worldmaps.xls&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Step 1 of placing your map into worldmaps.xls&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8388</id>
		<title>Map tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8388"/>
				<updated>2009-11-28T03:47:16Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: /* Creating maps in photoshop to use in-game */  _cleaning up&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map objects are a way to allow the player to travel from area to area without having to follow a rigid path from one exit to the next. They're useful for representing large expanses of wide-open countryside, for example, or a city with various districts that the player can travel between freely but is too large to conveniently fit in a single area. Maps allow a world to be large without having to detail every little irrelevant place in it.&lt;br /&gt;
&lt;br /&gt;
If you start by creating a new map resource within the designer toolkit, you'll quickly find that there is only a very limited pre-defined list of map images that are available for use. That's because map layouts are defined in a 2DA (&amp;quot;two-dimensional array&amp;quot;), a binary table of data that is used by the toolset to provide definitions but that is not itself editable from it. You may have encountered references to 2DAs when working with other objects. For example, the list of variables that an object's scripts can refer to is stored in a 2DA. This tutorial is going to assume that you've never worked with 2DAs themselves before. In a sense, this tutorial is as much a 2DA tutorial as it is a map tutorial.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
This tutorial makes use of a number of different three-letter acronyms and specific terms that may be troublesome to keep track of at first. Before we dive straight in, here's a cheat sheet that may prove useful:&lt;br /&gt;
&lt;br /&gt;
*2DA - &amp;quot;two-dimensional array&amp;quot;, the table of data we'll be editing. Note that a 2DA can be stored in a human-readable or machine-readable format, each of which has their own names. &amp;quot;2DA&amp;quot; is used to refer to the table as an abstract concept.&lt;br /&gt;
*XLS - the file extension for an Excel spreadsheet.&lt;br /&gt;
*Worksheet - tabbed panes within an Excel spreadsheet. Each Excel spreadsheet can contain multiple worksheets and each worksheet can represent one 2DA, so one spreadsheet can contain multiple 2DAs.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worksheet tabs.png|frame|center|Worksheet tabs along the bottom of an Excel spreadsheet]]&lt;br /&gt;
&lt;br /&gt;
*GDA - The file extension for a binary file usable by the game. 2DAs that have been processed by the resource exporter will be stored in this form.&lt;br /&gt;
*TGA - Targa graphics file extension. TGA graphic files are used to define the underlying appearance of the map itself.&lt;br /&gt;
*M2DA - &amp;quot;Multiple 2DA&amp;quot;. Previous BioWare games have made use of 2DAs, but the 2DAs used in Dragon Age use this new format instead. It allows several different 2DAs to be combined together and treated as a single 2DA by the game, which is very useful for adding new content to an existing 2DA.&lt;br /&gt;
&lt;br /&gt;
== The worldmaps.xls spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
See also [[worldmaps.xls]].&lt;br /&gt;
&lt;br /&gt;
If we're creating maps for a brand new module we could in theory start with a blank Excel spreadsheet and build the required 2DAs from scratch. It's much easier, however, to start with an existing copy of the relevant spreadsheet from another module and replace the values within it with our own.&lt;br /&gt;
&lt;br /&gt;
The spreadsheet that contains all the 2DAs relevant to world maps is &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;. Open it in Excel and you'll find that it contains, among other worksheets, the &amp;quot;worldmaps&amp;quot; worksheet.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet.png|frame|center|The redaction will be removed when the game ships !!Note: mere moments after these screenshots were taken a NameStrRef column was added to allow localized map names. These screenshots will have to be redone anyway!!]]&lt;br /&gt;
&lt;br /&gt;
This is the core 2DA that defines what maps are available in the Designer Toolset's &amp;quot;Map&amp;quot; dropdown menu.&lt;br /&gt;
&lt;br /&gt;
First, some standard features that all 2DA worksheets will have:&lt;br /&gt;
*The first row of the worksheet contains the labels of the columns. Don't change the names of columns or the game won't be able to recognize them.&lt;br /&gt;
*The second row contains a keyword describing the data type of that column. Again, don't change this or the game will become confused by what it's seeing.&lt;br /&gt;
*The first column contains ID numbers. Each row needs to have a unique ID number.&lt;br /&gt;
&lt;br /&gt;
In the case of the worldmaps worksheet there are four columns that contain the data defining the map layout.&lt;br /&gt;
* Label - The name that this map layout will be known by in the Designer Toolkit's dropdown menu. It's not seen by the player.&lt;br /&gt;
* MAP - The filename of the .tga that defines the map's appearance, without the .tga extension.&lt;br /&gt;
* TargetWpTable - The names of 2DAs that contains information about what waypoints the player appears at within areas accessible from the map. This is discussed in greater detail below.&lt;br /&gt;
* TripsCounterTable - A table showing which trips should have random encounters. We won't be going into detail about this in this tutorial.&lt;br /&gt;
&lt;br /&gt;
We'll need to add a new row to this table to describe the map area that we want to use in the toolset. For this example we have a map of a region named &amp;quot;Epona's Realm&amp;quot;, in a file named &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt;. We'll need to assign a unique number ID, which we'll arbitrarily set to 700 (using a high number like this makes it less likely to interfere with other people's additions in the future.). We'll call the target waypoint table &amp;quot;target_wps_epona&amp;quot; to fit with the naming convention of the other maps.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet with epona added.png]]&lt;br /&gt;
&lt;br /&gt;
In our hypothetical game module we've got three different cities that the player can reach via the world map; Dunland, Agrabia, and Serepta. They'll be represented by the areas dunland_main, agrabia_main, and serepta_main. The next thing we might want to do is create a 2DA that defines which waypoints you wind up in when you travel to each of these areas from each of the possible origin points. This isn't strictly necessary but can be used to make travel around the worldmap seem more realistic by having the player arrive at different waypoints depending on which direction they're arriving in an area from.&lt;br /&gt;
&lt;br /&gt;
Again, a convenient starting place is an existing 2DA. This 2DA is another worksheet in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt; that shows the target waypoints for a group of areas accessible from a city map in the game's single-player campaign:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps example.png]]&lt;br /&gt;
&lt;br /&gt;
All of the source areas are listed in the second column, and then each column after that corresponds to a destination area for that source. Every source needs a destination column, so there should always be a number of columns equal to the number of sources plus two (the &amp;quot;ID&amp;quot; and &amp;quot;SourceLocation&amp;quot; columns). In this example, if you're in the &amp;quot;markets&amp;quot; area and then use the map to go to the &amp;quot;elven_alienage&amp;quot; area, you'll be placed at the waypoint &amp;quot;wmw_alienage_from_market&amp;quot;. Since you can never travel from an area to that same area via the map the diagonal entries are left blank.&lt;br /&gt;
&lt;br /&gt;
To repurpose this 2DA for Epona's Realm, first copy the worksheet and then rename it to &amp;quot;target_wps_epona&amp;quot;. We'll only need three rows and three destination columns so delete the extras.&lt;br /&gt;
&lt;br /&gt;
The geometry of these three cities is quite simple, they lie in an east-west row with Serepta to the west, Agrabia in the center, and Dunland to the east. We'll place waypoints in the eastern and western ends of agrabia_main's area layout to represent the player arriving from each of those directions.&lt;br /&gt;
&lt;br /&gt;
So, the final version of the target_wps_epona worksheet will look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps_epona.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using M2DAs to extend the game ==&lt;br /&gt;
&lt;br /&gt;
There's one remaining complication to be addressed now. When you generate &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; it will include our new map ID 700, but it also includes the old maps with the IDs 1-5. Since the file is in the override directory, these rows override the existing maps with those ID numbers in the single player campaign. This isn't a problem right now since the data is identical but it could be a problem in the future; if BioWare releases an update that needs to change those original five maps, or if some other modder wants to add some maps of his own, only one version will &amp;quot;win&amp;quot; and the result could be a mess.&lt;br /&gt;
&lt;br /&gt;
This can be overcome by splitting up a 2DA into different files that all get loaded by the game and are combined into one 2DA internally. These multi-part 2DA files are known as M2DAs, which stands for &amp;quot;multiple 2DA&amp;quot;. The identity of M2DA files is kept track of via their &amp;quot;prefix&amp;quot;, a string of text that all M2DAs being with. In the case of the worldmaps 2DA, the prefix is &amp;quot;worldmaps&amp;quot; (ie, the &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; file has the &amp;quot;worldmaps&amp;quot; prefix and no suffix, so it belongs to the &amp;quot;worldmaps&amp;quot; 2DA).&lt;br /&gt;
&lt;br /&gt;
What we'll do now is split out the data relating to our &amp;quot;Epona's Realm&amp;quot; map into a separate M2DA file named &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt;. Simply rename the worksheet to &amp;quot;worldmaps_epona&amp;quot; and delete the first five rows of data entirely, leaving us with this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps_epona worksheet.png]]&lt;br /&gt;
&lt;br /&gt;
Now when the game encounters this 2DA in the override directory it will keep the data from the original worldmaps 2DA in memory and add the data from worldmaps_epona to it. If in the future some other modder builds on top of your work they can add further worldmap M2DAs, and if a patch comes out that updates the contents of the original 2DA your mod will incorporate it without needing to be updated.&lt;br /&gt;
&lt;br /&gt;
== Converting XLS files into GDA files ==&lt;br /&gt;
&lt;br /&gt;
The game can't use Excel files directly, the 2DAs must first be converted into a &amp;quot;binarized&amp;quot; form. This is done by a command-line utility called &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;. Command-line utilities are not very user-friendly, however, so a more convenient &amp;quot;wrapper&amp;quot; is included in the form of another spreadsheet named &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; uses macros to run &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt; with the appropriate command-line options. You'll need to provide &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; with the following parameters:&lt;br /&gt;
&lt;br /&gt;
* ResourceBuild Path: The path to &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;, which is installed by default in your Dragon Age directory under tools\ResourceBuild&lt;br /&gt;
* 2DA Path: The source path of the XLS files to be exported.&lt;br /&gt;
* Override Path: The path to the directory that the completed GDA files should be exported to. This doesn't have to be your actual override directory, you can move the files there manually after creating them if you prefer.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;' macro can have trouble with paths that have spaces in them, so you may need to move your XLS files to a path without any. Likewise, you may not be able to send the output files directly to the override directory if there are spaces in its path.&lt;br /&gt;
&lt;br /&gt;
Here's how we've set up &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; for converting our example:&lt;br /&gt;
&lt;br /&gt;
[[Image:2da exporter for worldmap tutorial.png]]&lt;br /&gt;
&lt;br /&gt;
To convert worldmaps.xls into binary form, select it and click the &amp;quot;Export Selected&amp;quot; button. A command-line window should pop up briefly while ResourceBuilder runs and then the finished GDA files will be placed in the directory listed in &amp;quot;Override Path.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you can't get &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; working, just run &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; instead. You can learn more about &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; by reading the [[2DA]] section.&lt;br /&gt;
&lt;br /&gt;
Note that there will be a separate GDA file for each worksheet in the XLS file, named after the worksheets in the XLS file. We only need to use two of them; &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;target_wps_epona.GDA&amp;lt;/code&amp;gt;. Copy these files into your game's override directory along with &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt; and &amp;quot;Epona's Realm&amp;quot; will become available in the toolset's dropdown menu.&lt;br /&gt;
&lt;br /&gt;
== Creating maps in photoshop to use in-game ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some tutorials that can be used to make yourself a map in photoshop.&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map01.htm Basic Map tutorial] - required as it is the basic stepping stone to make any map [Difficulty = Basic]&lt;br /&gt;
&lt;br /&gt;
[[File:Map01_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map02.htm Paper style/aged Map tutorial ] Style #1 [Difficulty = Beginner]&lt;br /&gt;
&lt;br /&gt;
[[File:Map02_thumb.jpg]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map04.htm Colored 2D Map Tutorial ] Style #2 [Difficulty = Beginner/Intermediate]&lt;br /&gt;
&lt;br /&gt;
[[File:Map04_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map05.htm Pseudo 3D Map Tutorial ] Style #3  [Difficulty = Intermeditate/Advanced]&lt;br /&gt;
&lt;br /&gt;
[[File:Map05_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
All map making tutorials above are done by Jeremy Elford and [http://www.jezelf.co.uk/index.html www.Jezelf.co.uk]''&lt;br /&gt;
&lt;br /&gt;
'''Other Valuable Map Making Resources'''&lt;br /&gt;
&lt;br /&gt;
[http://www.profantasy.com/ Cartographer 3 + Addons -$] Simple easy to use map maker for those who don't have photoshop or the skills/knowledge to work it.&lt;br /&gt;
&lt;br /&gt;
[http://cartographersguild.com/ Cartographers Guild Map Making Community  -Free] Great website if you are seeking other tutorials, inspiration, help, possibility of hiring someone to make you a map, and more!&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/ZombieNirvana#p/u/18/KO4XZfaSAoA Youtube Tut series by ZombieNirvana -Free] Great Series of tutorials on youtube&lt;br /&gt;
&lt;br /&gt;
== Creating a map and adding pins ==&lt;br /&gt;
&lt;br /&gt;
Now we can at last see the map as an option in the drop-down menus of the toolset. Create a map and set the &amp;quot;Map&amp;quot; property to Epona's Realm, and the map should appear.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps selecting Epona.png]]&lt;br /&gt;
&lt;br /&gt;
There's not much to the map itself - its only configurable properties are Parent Map, Tag, and Map. To make the map useful beyond simply displaying a graphic we'll need to add map pins (icons representing destinations). You can also add &amp;quot;trails&amp;quot;, which are a series of icons that you can make appear between different pins to mark the player's passage, but these are of lesser importance and can be left for later or omitted entirely.&lt;br /&gt;
&lt;br /&gt;
To insert a pin, right-click on the map and select &amp;quot;insert pin&amp;quot; from the drop-down menu. The pointer will turn into a crosshair that you can click anywhere on the map to place a pin (pins can also be dragged around after creation so don't worry if you miss slightly). The pin will be added to the tree view to the left of the map and, when selected, you can view its properties in the object inspector.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps placing a pin.png]]&lt;br /&gt;
&lt;br /&gt;
The most important properties to set here are:&lt;br /&gt;
* AreaTag - tells the game which area to take the player to when he clicks on this pin. Our Dunland pin will have this set to dunland_main.&lt;br /&gt;
* Initial State - tells the game whether to display the pin and whether to make it clickable; you will often want to have pins on the map that only become available to the player at some point later in the game. We'll set Dunland to &amp;quot;grayed out&amp;quot; right now, since we'll want the player to know about its existence but not be able to go there right away.&lt;br /&gt;
* Name - This name is shown to the player.&lt;br /&gt;
*Pin Type - A list of icons that can be used for the pin. The list of appearances available can be added to in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;, you may have noticed the &amp;lt;code&amp;gt;map_pin_images&amp;lt;/code&amp;gt; worksheet when you were editing it earlier.&lt;br /&gt;
&lt;br /&gt;
Other properties you may wish to set include &amp;quot;Tooltip&amp;quot; (a longer description that will be shown to the player if he hovers the mouse pointer over the pin) and &amp;quot;Waypoint Override&amp;quot;, which designates which waypoint in the pin's target area to send the player to when he clicks on it. This waypoint overrides the one set in target_wps_epona but has less fine-grained control available; it can be useful for testing purposes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;TerrainType&amp;quot; property is used to determine which group of random encounters to draw from. Setting up random encounters is a more advanced topic that we won't cover in this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps pins placed.png]]&lt;br /&gt;
&lt;br /&gt;
== Showing the player the map ==&lt;br /&gt;
&lt;br /&gt;
Once you've got a map built for your module you'll need to tell the game how to use it. There are a number of wrapper functions in wrappers_h that you'll find useful for this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPrimary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function tells the game what the current default &amp;quot;world map&amp;quot; is. You'll want to set this to your default world map as part of the initial setup of your module, and if you have multiple different maps you'll need to call this function again later in the game to switch which one is active (for example in a plot script that triggers when the player completes a certain task or moves to a certain area).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapSecondary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!!Need to find out more about this one.!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapLocationStatus(object oLocation, int nStatusId, int bSuppressActiveFlash = FALSE)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oLocation is a map pin, nStatusId is an integer identifier for one of the status states (such as active, grayed out, destroyed), and the optional bSuppressActiveFlash flag tells the game to omit the visual highlighting that is usually shown around map pins that have had their status changed since the last time the player looked at the map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPlayerLocation(object oMap, object oLocation)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This marks the player's current location on the map.&lt;br /&gt;
&lt;br /&gt;
=== Sending the player to the world map via an area transition ===&lt;br /&gt;
&lt;br /&gt;
To set up an area transition placeable (such as a door) to send the player to the world map when an area transition is performed, set the placeable's PLC_AT_DEST_AREA_TAG variable to the string &amp;quot;world_map&amp;quot;. This is a special string that's used to signal the placeable_core script's area-transition-handling code that it needs to show a map instead. When the placeable is triggered it will send an EVENT_TYPE_TRANSITION_TO_WORLD_MAP event to the module's event script.&lt;br /&gt;
&lt;br /&gt;
The default module_core script doesn't handle this event so you'll need to add your own module event script to override this behavior. The module's event script should call the following core script functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 SetWorldMapGuiStatus(WM_GUI_STATUS_USE);&lt;br /&gt;
 OpenPrimaryWorldMap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This displays the map to the player.&lt;br /&gt;
&lt;br /&gt;
== Activating and deactivating map pins ==&lt;br /&gt;
&lt;br /&gt;
This can be done via scripting.&lt;br /&gt;
&lt;br /&gt;
First get the world map pin object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
object oVillage = GetObjectByTag(WML_WOW_VILLAGE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then call the following to activate the pin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WR_SetWorldMapLocationStatus(oVillage, WM_LOCATION_ACTIVE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Area transitions using the default area transition core script can also automatically enable certain map pins when the player travels through them. The names of these pins are set in the area transition's variables.&lt;br /&gt;
&lt;br /&gt;
== Handling the player's map usage ==&lt;br /&gt;
&lt;br /&gt;
If the proper destination areas and waypoints have been set in the map pins (and optionally the target_wps 2DA) the player's movement from one location to another should be handled automatically. However, the game does provide some hooks that allows further customization or non-standard actions to be performed.&lt;br /&gt;
&lt;br /&gt;
When a player clicks on a map pin, the EVENT_TYPE_BEGIN_TRAVEL event is sent to the module script.&lt;br /&gt;
&lt;br /&gt;
This event has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* string sSource = GetEventString(ev, 0); // area tag for the source location (the area the player's leaving)&lt;br /&gt;
* string sTarget = GetEventString(ev, 1); // area tag for the target location (the area the player's travelling to)&lt;br /&gt;
* string sWPOverride = GetEventString(ev, 2); // the tag for the target waypoint override (the waypoint in the destination area that the player will appear at)&lt;br /&gt;
* int nSourceTerrain = GetEventInteger(ev, 0); //The terrain type of the source location&lt;br /&gt;
* int nTargetTerrain = GetEventInteger(ev, 1); //The terrain type of the target location - these two parameters are used in the main campaign's code for determining what sort of random encounters to generate, but that's handled entirely in scripting so you can use them for other purposes or ignore them completely if you prefer.&lt;br /&gt;
* int nWorldMap = GetEventInteger(ev, 2);&lt;br /&gt;
* object oSourceLocation = GetEventObject(ev, 0); // the map pin object representing the source location.&lt;br /&gt;
&lt;br /&gt;
In the main Dragon Age campaign's module script, a large amount of complex code is triggered by the EVENT_TYPE_BEGIN_TRAVEL event. This code takes into account a lot of special-case situations that are relevant only to the particular plot and structure of the Dragon Age main campaign. But it is important to note one thing that is ''not'' done in the EVENT_TYPE_BEGIN_TRAVEL event; the actual call to UT_DoAreaTransition().&lt;br /&gt;
&lt;br /&gt;
Instead, once you have finished doing whatever special-case coding and random encounter tests you choose to implement, you will need to store the destination that you're sending the player to in the module's variable table. Then call the WorldMapStartTravelling(); function to begin the map trail animation (the WorldMapStartTravelling function has optional parameters to insert a random encounter partway through the trip and to override the map pin the trail starts at).&lt;br /&gt;
&lt;br /&gt;
The engine will send the EVENT_TYPE_WORLDMAP_PRETRANSITION event as it begins the map trail animation. This is where you want to call UT_DoAreaTransition(); the level will begin loading in the background as the map trail animation plays.&lt;br /&gt;
&lt;br /&gt;
The following code is the most basic amount that you should need to put in your module script in order to implement area transitions via the world map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
case EVENT_TYPE_BEGIN_TRAVEL:&lt;br /&gt;
{&lt;br /&gt;
    string sTarget = GetEventString(ev, 1); // area tag target location&lt;br /&gt;
    string sWPOverride = GetEventString(ev, 2); // waypoint tag override&lt;br /&gt;
    //if you want to do any special-case code or random encounter handling, insert it here&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;, sTarget); //store target area's tag to a local module variable&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;, sWPOverride); //store target waypoint tag&lt;br /&gt;
    WorldMapStartTravelling(); //initiate the map's travelling animation. The engine will send EVENT_TYPE_WORLDMAP_PRETRANSITION once it's started. &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case EVENT_TYPE_WORLDMAP_PRETRANSITION:&lt;br /&gt;
{&lt;br /&gt;
    string sArea = GetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;); //retrieve the target area tag stored in EVENT_TYPE_BEGIN_TRAVEL&lt;br /&gt;
    string sWP = GetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;); //retrieve the target waypoint tag&lt;br /&gt;
    UT_DoAreaTransition(sArea, sWP); //execute the area transition to that target.&lt;br /&gt;
    break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a EVENT_TYPE_WORLDMAP_POSTTRANSITION event. In the Dragon Age main campaign it is used only to trigger certain cutscenes that play as a result of world travel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other map-related events ===&lt;br /&gt;
&lt;br /&gt;
The EVENT_TYPE_WORLD_MAP_CLOSED is sent to the module script when the world map is closed. It has only one parameter, an integer flag that indicates whether the map was closed due to cancel being selected or due to the player traveling to a new destination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Maps]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8387</id>
		<title>Map tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8387"/>
				<updated>2009-11-28T03:46:43Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: /* Creating maps in photoshop to use in-game */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map objects are a way to allow the player to travel from area to area without having to follow a rigid path from one exit to the next. They're useful for representing large expanses of wide-open countryside, for example, or a city with various districts that the player can travel between freely but is too large to conveniently fit in a single area. Maps allow a world to be large without having to detail every little irrelevant place in it.&lt;br /&gt;
&lt;br /&gt;
If you start by creating a new map resource within the designer toolkit, you'll quickly find that there is only a very limited pre-defined list of map images that are available for use. That's because map layouts are defined in a 2DA (&amp;quot;two-dimensional array&amp;quot;), a binary table of data that is used by the toolset to provide definitions but that is not itself editable from it. You may have encountered references to 2DAs when working with other objects. For example, the list of variables that an object's scripts can refer to is stored in a 2DA. This tutorial is going to assume that you've never worked with 2DAs themselves before. In a sense, this tutorial is as much a 2DA tutorial as it is a map tutorial.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
This tutorial makes use of a number of different three-letter acronyms and specific terms that may be troublesome to keep track of at first. Before we dive straight in, here's a cheat sheet that may prove useful:&lt;br /&gt;
&lt;br /&gt;
*2DA - &amp;quot;two-dimensional array&amp;quot;, the table of data we'll be editing. Note that a 2DA can be stored in a human-readable or machine-readable format, each of which has their own names. &amp;quot;2DA&amp;quot; is used to refer to the table as an abstract concept.&lt;br /&gt;
*XLS - the file extension for an Excel spreadsheet.&lt;br /&gt;
*Worksheet - tabbed panes within an Excel spreadsheet. Each Excel spreadsheet can contain multiple worksheets and each worksheet can represent one 2DA, so one spreadsheet can contain multiple 2DAs.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worksheet tabs.png|frame|center|Worksheet tabs along the bottom of an Excel spreadsheet]]&lt;br /&gt;
&lt;br /&gt;
*GDA - The file extension for a binary file usable by the game. 2DAs that have been processed by the resource exporter will be stored in this form.&lt;br /&gt;
*TGA - Targa graphics file extension. TGA graphic files are used to define the underlying appearance of the map itself.&lt;br /&gt;
*M2DA - &amp;quot;Multiple 2DA&amp;quot;. Previous BioWare games have made use of 2DAs, but the 2DAs used in Dragon Age use this new format instead. It allows several different 2DAs to be combined together and treated as a single 2DA by the game, which is very useful for adding new content to an existing 2DA.&lt;br /&gt;
&lt;br /&gt;
== The worldmaps.xls spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
See also [[worldmaps.xls]].&lt;br /&gt;
&lt;br /&gt;
If we're creating maps for a brand new module we could in theory start with a blank Excel spreadsheet and build the required 2DAs from scratch. It's much easier, however, to start with an existing copy of the relevant spreadsheet from another module and replace the values within it with our own.&lt;br /&gt;
&lt;br /&gt;
The spreadsheet that contains all the 2DAs relevant to world maps is &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;. Open it in Excel and you'll find that it contains, among other worksheets, the &amp;quot;worldmaps&amp;quot; worksheet.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet.png|frame|center|The redaction will be removed when the game ships !!Note: mere moments after these screenshots were taken a NameStrRef column was added to allow localized map names. These screenshots will have to be redone anyway!!]]&lt;br /&gt;
&lt;br /&gt;
This is the core 2DA that defines what maps are available in the Designer Toolset's &amp;quot;Map&amp;quot; dropdown menu.&lt;br /&gt;
&lt;br /&gt;
First, some standard features that all 2DA worksheets will have:&lt;br /&gt;
*The first row of the worksheet contains the labels of the columns. Don't change the names of columns or the game won't be able to recognize them.&lt;br /&gt;
*The second row contains a keyword describing the data type of that column. Again, don't change this or the game will become confused by what it's seeing.&lt;br /&gt;
*The first column contains ID numbers. Each row needs to have a unique ID number.&lt;br /&gt;
&lt;br /&gt;
In the case of the worldmaps worksheet there are four columns that contain the data defining the map layout.&lt;br /&gt;
* Label - The name that this map layout will be known by in the Designer Toolkit's dropdown menu. It's not seen by the player.&lt;br /&gt;
* MAP - The filename of the .tga that defines the map's appearance, without the .tga extension.&lt;br /&gt;
* TargetWpTable - The names of 2DAs that contains information about what waypoints the player appears at within areas accessible from the map. This is discussed in greater detail below.&lt;br /&gt;
* TripsCounterTable - A table showing which trips should have random encounters. We won't be going into detail about this in this tutorial.&lt;br /&gt;
&lt;br /&gt;
We'll need to add a new row to this table to describe the map area that we want to use in the toolset. For this example we have a map of a region named &amp;quot;Epona's Realm&amp;quot;, in a file named &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt;. We'll need to assign a unique number ID, which we'll arbitrarily set to 700 (using a high number like this makes it less likely to interfere with other people's additions in the future.). We'll call the target waypoint table &amp;quot;target_wps_epona&amp;quot; to fit with the naming convention of the other maps.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet with epona added.png]]&lt;br /&gt;
&lt;br /&gt;
In our hypothetical game module we've got three different cities that the player can reach via the world map; Dunland, Agrabia, and Serepta. They'll be represented by the areas dunland_main, agrabia_main, and serepta_main. The next thing we might want to do is create a 2DA that defines which waypoints you wind up in when you travel to each of these areas from each of the possible origin points. This isn't strictly necessary but can be used to make travel around the worldmap seem more realistic by having the player arrive at different waypoints depending on which direction they're arriving in an area from.&lt;br /&gt;
&lt;br /&gt;
Again, a convenient starting place is an existing 2DA. This 2DA is another worksheet in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt; that shows the target waypoints for a group of areas accessible from a city map in the game's single-player campaign:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps example.png]]&lt;br /&gt;
&lt;br /&gt;
All of the source areas are listed in the second column, and then each column after that corresponds to a destination area for that source. Every source needs a destination column, so there should always be a number of columns equal to the number of sources plus two (the &amp;quot;ID&amp;quot; and &amp;quot;SourceLocation&amp;quot; columns). In this example, if you're in the &amp;quot;markets&amp;quot; area and then use the map to go to the &amp;quot;elven_alienage&amp;quot; area, you'll be placed at the waypoint &amp;quot;wmw_alienage_from_market&amp;quot;. Since you can never travel from an area to that same area via the map the diagonal entries are left blank.&lt;br /&gt;
&lt;br /&gt;
To repurpose this 2DA for Epona's Realm, first copy the worksheet and then rename it to &amp;quot;target_wps_epona&amp;quot;. We'll only need three rows and three destination columns so delete the extras.&lt;br /&gt;
&lt;br /&gt;
The geometry of these three cities is quite simple, they lie in an east-west row with Serepta to the west, Agrabia in the center, and Dunland to the east. We'll place waypoints in the eastern and western ends of agrabia_main's area layout to represent the player arriving from each of those directions.&lt;br /&gt;
&lt;br /&gt;
So, the final version of the target_wps_epona worksheet will look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps_epona.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using M2DAs to extend the game ==&lt;br /&gt;
&lt;br /&gt;
There's one remaining complication to be addressed now. When you generate &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; it will include our new map ID 700, but it also includes the old maps with the IDs 1-5. Since the file is in the override directory, these rows override the existing maps with those ID numbers in the single player campaign. This isn't a problem right now since the data is identical but it could be a problem in the future; if BioWare releases an update that needs to change those original five maps, or if some other modder wants to add some maps of his own, only one version will &amp;quot;win&amp;quot; and the result could be a mess.&lt;br /&gt;
&lt;br /&gt;
This can be overcome by splitting up a 2DA into different files that all get loaded by the game and are combined into one 2DA internally. These multi-part 2DA files are known as M2DAs, which stands for &amp;quot;multiple 2DA&amp;quot;. The identity of M2DA files is kept track of via their &amp;quot;prefix&amp;quot;, a string of text that all M2DAs being with. In the case of the worldmaps 2DA, the prefix is &amp;quot;worldmaps&amp;quot; (ie, the &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; file has the &amp;quot;worldmaps&amp;quot; prefix and no suffix, so it belongs to the &amp;quot;worldmaps&amp;quot; 2DA).&lt;br /&gt;
&lt;br /&gt;
What we'll do now is split out the data relating to our &amp;quot;Epona's Realm&amp;quot; map into a separate M2DA file named &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt;. Simply rename the worksheet to &amp;quot;worldmaps_epona&amp;quot; and delete the first five rows of data entirely, leaving us with this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps_epona worksheet.png]]&lt;br /&gt;
&lt;br /&gt;
Now when the game encounters this 2DA in the override directory it will keep the data from the original worldmaps 2DA in memory and add the data from worldmaps_epona to it. If in the future some other modder builds on top of your work they can add further worldmap M2DAs, and if a patch comes out that updates the contents of the original 2DA your mod will incorporate it without needing to be updated.&lt;br /&gt;
&lt;br /&gt;
== Converting XLS files into GDA files ==&lt;br /&gt;
&lt;br /&gt;
The game can't use Excel files directly, the 2DAs must first be converted into a &amp;quot;binarized&amp;quot; form. This is done by a command-line utility called &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;. Command-line utilities are not very user-friendly, however, so a more convenient &amp;quot;wrapper&amp;quot; is included in the form of another spreadsheet named &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; uses macros to run &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt; with the appropriate command-line options. You'll need to provide &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; with the following parameters:&lt;br /&gt;
&lt;br /&gt;
* ResourceBuild Path: The path to &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;, which is installed by default in your Dragon Age directory under tools\ResourceBuild&lt;br /&gt;
* 2DA Path: The source path of the XLS files to be exported.&lt;br /&gt;
* Override Path: The path to the directory that the completed GDA files should be exported to. This doesn't have to be your actual override directory, you can move the files there manually after creating them if you prefer.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;' macro can have trouble with paths that have spaces in them, so you may need to move your XLS files to a path without any. Likewise, you may not be able to send the output files directly to the override directory if there are spaces in its path.&lt;br /&gt;
&lt;br /&gt;
Here's how we've set up &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; for converting our example:&lt;br /&gt;
&lt;br /&gt;
[[Image:2da exporter for worldmap tutorial.png]]&lt;br /&gt;
&lt;br /&gt;
To convert worldmaps.xls into binary form, select it and click the &amp;quot;Export Selected&amp;quot; button. A command-line window should pop up briefly while ResourceBuilder runs and then the finished GDA files will be placed in the directory listed in &amp;quot;Override Path.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you can't get &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; working, just run &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; instead. You can learn more about &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; by reading the [[2DA]] section.&lt;br /&gt;
&lt;br /&gt;
Note that there will be a separate GDA file for each worksheet in the XLS file, named after the worksheets in the XLS file. We only need to use two of them; &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;target_wps_epona.GDA&amp;lt;/code&amp;gt;. Copy these files into your game's override directory along with &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt; and &amp;quot;Epona's Realm&amp;quot; will become available in the toolset's dropdown menu.&lt;br /&gt;
&lt;br /&gt;
== Creating maps in photoshop to use in-game ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some tutorials that can be used to make yourself a map in photoshop.&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map01.htm Basic Map tutorial] - required as it is the basic stepping stone to make any map [Difficulty = Basic]&lt;br /&gt;
&lt;br /&gt;
[[File:Map01_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map02.htm Paper style/aged Map tutorial ] Style #1 [Difficulty = Beginner]&lt;br /&gt;
&lt;br /&gt;
[[File:Map02_thumb.jpg]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map04.htm Colored 2D Map Tutorial ] Style #2 [Difficulty = Beginner/Intermediate]&lt;br /&gt;
&lt;br /&gt;
[[File:Map04_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map05.htm Pseudo 3D Map Tutorial ] Style #3  [Difficulty = Intermeditate/Advanced]&lt;br /&gt;
&lt;br /&gt;
[[File:Map05_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
All map making tutorials above are done by Jeremy Elford and [http://www.jezelf.co.uk/index.html www.Jezelf.co.uk]''&lt;br /&gt;
&lt;br /&gt;
'''Other Valuable Map Making Resources'''&lt;br /&gt;
&lt;br /&gt;
[http://www.profantasy.com/ Cartographer 3 + Addons -$] Simple easy to use map maker for those who don't have photoshop or the skills/knowledge to work it.&lt;br /&gt;
&lt;br /&gt;
[http://cartographersguild.com/ Cartographers Guild Map Making Community  -Free] Great website if you are seeking other tutorials, inspiration, help, possibility of hiring someone to make you a map, and more!&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/ZombieNirvana#p/u/18/KO4XZfaSAoA Youtube Tut series by ZombieNirvana -Free] Great Series of tutorials on youtube&lt;br /&gt;
&lt;br /&gt;
== Creating a map and adding pins ==&lt;br /&gt;
&lt;br /&gt;
Now we can at last see the map as an option in the drop-down menus of the toolset. Create a map and set the &amp;quot;Map&amp;quot; property to Epona's Realm, and the map should appear.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps selecting Epona.png]]&lt;br /&gt;
&lt;br /&gt;
There's not much to the map itself - its only configurable properties are Parent Map, Tag, and Map. To make the map useful beyond simply displaying a graphic we'll need to add map pins (icons representing destinations). You can also add &amp;quot;trails&amp;quot;, which are a series of icons that you can make appear between different pins to mark the player's passage, but these are of lesser importance and can be left for later or omitted entirely.&lt;br /&gt;
&lt;br /&gt;
To insert a pin, right-click on the map and select &amp;quot;insert pin&amp;quot; from the drop-down menu. The pointer will turn into a crosshair that you can click anywhere on the map to place a pin (pins can also be dragged around after creation so don't worry if you miss slightly). The pin will be added to the tree view to the left of the map and, when selected, you can view its properties in the object inspector.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps placing a pin.png]]&lt;br /&gt;
&lt;br /&gt;
The most important properties to set here are:&lt;br /&gt;
* AreaTag - tells the game which area to take the player to when he clicks on this pin. Our Dunland pin will have this set to dunland_main.&lt;br /&gt;
* Initial State - tells the game whether to display the pin and whether to make it clickable; you will often want to have pins on the map that only become available to the player at some point later in the game. We'll set Dunland to &amp;quot;grayed out&amp;quot; right now, since we'll want the player to know about its existence but not be able to go there right away.&lt;br /&gt;
* Name - This name is shown to the player.&lt;br /&gt;
*Pin Type - A list of icons that can be used for the pin. The list of appearances available can be added to in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;, you may have noticed the &amp;lt;code&amp;gt;map_pin_images&amp;lt;/code&amp;gt; worksheet when you were editing it earlier.&lt;br /&gt;
&lt;br /&gt;
Other properties you may wish to set include &amp;quot;Tooltip&amp;quot; (a longer description that will be shown to the player if he hovers the mouse pointer over the pin) and &amp;quot;Waypoint Override&amp;quot;, which designates which waypoint in the pin's target area to send the player to when he clicks on it. This waypoint overrides the one set in target_wps_epona but has less fine-grained control available; it can be useful for testing purposes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;TerrainType&amp;quot; property is used to determine which group of random encounters to draw from. Setting up random encounters is a more advanced topic that we won't cover in this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps pins placed.png]]&lt;br /&gt;
&lt;br /&gt;
== Showing the player the map ==&lt;br /&gt;
&lt;br /&gt;
Once you've got a map built for your module you'll need to tell the game how to use it. There are a number of wrapper functions in wrappers_h that you'll find useful for this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPrimary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function tells the game what the current default &amp;quot;world map&amp;quot; is. You'll want to set this to your default world map as part of the initial setup of your module, and if you have multiple different maps you'll need to call this function again later in the game to switch which one is active (for example in a plot script that triggers when the player completes a certain task or moves to a certain area).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapSecondary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!!Need to find out more about this one.!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapLocationStatus(object oLocation, int nStatusId, int bSuppressActiveFlash = FALSE)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oLocation is a map pin, nStatusId is an integer identifier for one of the status states (such as active, grayed out, destroyed), and the optional bSuppressActiveFlash flag tells the game to omit the visual highlighting that is usually shown around map pins that have had their status changed since the last time the player looked at the map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPlayerLocation(object oMap, object oLocation)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This marks the player's current location on the map.&lt;br /&gt;
&lt;br /&gt;
=== Sending the player to the world map via an area transition ===&lt;br /&gt;
&lt;br /&gt;
To set up an area transition placeable (such as a door) to send the player to the world map when an area transition is performed, set the placeable's PLC_AT_DEST_AREA_TAG variable to the string &amp;quot;world_map&amp;quot;. This is a special string that's used to signal the placeable_core script's area-transition-handling code that it needs to show a map instead. When the placeable is triggered it will send an EVENT_TYPE_TRANSITION_TO_WORLD_MAP event to the module's event script.&lt;br /&gt;
&lt;br /&gt;
The default module_core script doesn't handle this event so you'll need to add your own module event script to override this behavior. The module's event script should call the following core script functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 SetWorldMapGuiStatus(WM_GUI_STATUS_USE);&lt;br /&gt;
 OpenPrimaryWorldMap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This displays the map to the player.&lt;br /&gt;
&lt;br /&gt;
== Activating and deactivating map pins ==&lt;br /&gt;
&lt;br /&gt;
This can be done via scripting.&lt;br /&gt;
&lt;br /&gt;
First get the world map pin object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
object oVillage = GetObjectByTag(WML_WOW_VILLAGE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then call the following to activate the pin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WR_SetWorldMapLocationStatus(oVillage, WM_LOCATION_ACTIVE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Area transitions using the default area transition core script can also automatically enable certain map pins when the player travels through them. The names of these pins are set in the area transition's variables.&lt;br /&gt;
&lt;br /&gt;
== Handling the player's map usage ==&lt;br /&gt;
&lt;br /&gt;
If the proper destination areas and waypoints have been set in the map pins (and optionally the target_wps 2DA) the player's movement from one location to another should be handled automatically. However, the game does provide some hooks that allows further customization or non-standard actions to be performed.&lt;br /&gt;
&lt;br /&gt;
When a player clicks on a map pin, the EVENT_TYPE_BEGIN_TRAVEL event is sent to the module script.&lt;br /&gt;
&lt;br /&gt;
This event has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* string sSource = GetEventString(ev, 0); // area tag for the source location (the area the player's leaving)&lt;br /&gt;
* string sTarget = GetEventString(ev, 1); // area tag for the target location (the area the player's travelling to)&lt;br /&gt;
* string sWPOverride = GetEventString(ev, 2); // the tag for the target waypoint override (the waypoint in the destination area that the player will appear at)&lt;br /&gt;
* int nSourceTerrain = GetEventInteger(ev, 0); //The terrain type of the source location&lt;br /&gt;
* int nTargetTerrain = GetEventInteger(ev, 1); //The terrain type of the target location - these two parameters are used in the main campaign's code for determining what sort of random encounters to generate, but that's handled entirely in scripting so you can use them for other purposes or ignore them completely if you prefer.&lt;br /&gt;
* int nWorldMap = GetEventInteger(ev, 2);&lt;br /&gt;
* object oSourceLocation = GetEventObject(ev, 0); // the map pin object representing the source location.&lt;br /&gt;
&lt;br /&gt;
In the main Dragon Age campaign's module script, a large amount of complex code is triggered by the EVENT_TYPE_BEGIN_TRAVEL event. This code takes into account a lot of special-case situations that are relevant only to the particular plot and structure of the Dragon Age main campaign. But it is important to note one thing that is ''not'' done in the EVENT_TYPE_BEGIN_TRAVEL event; the actual call to UT_DoAreaTransition().&lt;br /&gt;
&lt;br /&gt;
Instead, once you have finished doing whatever special-case coding and random encounter tests you choose to implement, you will need to store the destination that you're sending the player to in the module's variable table. Then call the WorldMapStartTravelling(); function to begin the map trail animation (the WorldMapStartTravelling function has optional parameters to insert a random encounter partway through the trip and to override the map pin the trail starts at).&lt;br /&gt;
&lt;br /&gt;
The engine will send the EVENT_TYPE_WORLDMAP_PRETRANSITION event as it begins the map trail animation. This is where you want to call UT_DoAreaTransition(); the level will begin loading in the background as the map trail animation plays.&lt;br /&gt;
&lt;br /&gt;
The following code is the most basic amount that you should need to put in your module script in order to implement area transitions via the world map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
case EVENT_TYPE_BEGIN_TRAVEL:&lt;br /&gt;
{&lt;br /&gt;
    string sTarget = GetEventString(ev, 1); // area tag target location&lt;br /&gt;
    string sWPOverride = GetEventString(ev, 2); // waypoint tag override&lt;br /&gt;
    //if you want to do any special-case code or random encounter handling, insert it here&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;, sTarget); //store target area's tag to a local module variable&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;, sWPOverride); //store target waypoint tag&lt;br /&gt;
    WorldMapStartTravelling(); //initiate the map's travelling animation. The engine will send EVENT_TYPE_WORLDMAP_PRETRANSITION once it's started. &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case EVENT_TYPE_WORLDMAP_PRETRANSITION:&lt;br /&gt;
{&lt;br /&gt;
    string sArea = GetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;); //retrieve the target area tag stored in EVENT_TYPE_BEGIN_TRAVEL&lt;br /&gt;
    string sWP = GetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;); //retrieve the target waypoint tag&lt;br /&gt;
    UT_DoAreaTransition(sArea, sWP); //execute the area transition to that target.&lt;br /&gt;
    break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a EVENT_TYPE_WORLDMAP_POSTTRANSITION event. In the Dragon Age main campaign it is used only to trigger certain cutscenes that play as a result of world travel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other map-related events ===&lt;br /&gt;
&lt;br /&gt;
The EVENT_TYPE_WORLD_MAP_CLOSED is sent to the module script when the world map is closed. It has only one parameter, an integer flag that indicates whether the map was closed due to cancel being selected or due to the player traveling to a new destination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Maps]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8386</id>
		<title>Map tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8386"/>
				<updated>2009-11-28T03:44:50Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map objects are a way to allow the player to travel from area to area without having to follow a rigid path from one exit to the next. They're useful for representing large expanses of wide-open countryside, for example, or a city with various districts that the player can travel between freely but is too large to conveniently fit in a single area. Maps allow a world to be large without having to detail every little irrelevant place in it.&lt;br /&gt;
&lt;br /&gt;
If you start by creating a new map resource within the designer toolkit, you'll quickly find that there is only a very limited pre-defined list of map images that are available for use. That's because map layouts are defined in a 2DA (&amp;quot;two-dimensional array&amp;quot;), a binary table of data that is used by the toolset to provide definitions but that is not itself editable from it. You may have encountered references to 2DAs when working with other objects. For example, the list of variables that an object's scripts can refer to is stored in a 2DA. This tutorial is going to assume that you've never worked with 2DAs themselves before. In a sense, this tutorial is as much a 2DA tutorial as it is a map tutorial.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
This tutorial makes use of a number of different three-letter acronyms and specific terms that may be troublesome to keep track of at first. Before we dive straight in, here's a cheat sheet that may prove useful:&lt;br /&gt;
&lt;br /&gt;
*2DA - &amp;quot;two-dimensional array&amp;quot;, the table of data we'll be editing. Note that a 2DA can be stored in a human-readable or machine-readable format, each of which has their own names. &amp;quot;2DA&amp;quot; is used to refer to the table as an abstract concept.&lt;br /&gt;
*XLS - the file extension for an Excel spreadsheet.&lt;br /&gt;
*Worksheet - tabbed panes within an Excel spreadsheet. Each Excel spreadsheet can contain multiple worksheets and each worksheet can represent one 2DA, so one spreadsheet can contain multiple 2DAs.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worksheet tabs.png|frame|center|Worksheet tabs along the bottom of an Excel spreadsheet]]&lt;br /&gt;
&lt;br /&gt;
*GDA - The file extension for a binary file usable by the game. 2DAs that have been processed by the resource exporter will be stored in this form.&lt;br /&gt;
*TGA - Targa graphics file extension. TGA graphic files are used to define the underlying appearance of the map itself.&lt;br /&gt;
*M2DA - &amp;quot;Multiple 2DA&amp;quot;. Previous BioWare games have made use of 2DAs, but the 2DAs used in Dragon Age use this new format instead. It allows several different 2DAs to be combined together and treated as a single 2DA by the game, which is very useful for adding new content to an existing 2DA.&lt;br /&gt;
&lt;br /&gt;
== The worldmaps.xls spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
See also [[worldmaps.xls]].&lt;br /&gt;
&lt;br /&gt;
If we're creating maps for a brand new module we could in theory start with a blank Excel spreadsheet and build the required 2DAs from scratch. It's much easier, however, to start with an existing copy of the relevant spreadsheet from another module and replace the values within it with our own.&lt;br /&gt;
&lt;br /&gt;
The spreadsheet that contains all the 2DAs relevant to world maps is &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;. Open it in Excel and you'll find that it contains, among other worksheets, the &amp;quot;worldmaps&amp;quot; worksheet.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet.png|frame|center|The redaction will be removed when the game ships !!Note: mere moments after these screenshots were taken a NameStrRef column was added to allow localized map names. These screenshots will have to be redone anyway!!]]&lt;br /&gt;
&lt;br /&gt;
This is the core 2DA that defines what maps are available in the Designer Toolset's &amp;quot;Map&amp;quot; dropdown menu.&lt;br /&gt;
&lt;br /&gt;
First, some standard features that all 2DA worksheets will have:&lt;br /&gt;
*The first row of the worksheet contains the labels of the columns. Don't change the names of columns or the game won't be able to recognize them.&lt;br /&gt;
*The second row contains a keyword describing the data type of that column. Again, don't change this or the game will become confused by what it's seeing.&lt;br /&gt;
*The first column contains ID numbers. Each row needs to have a unique ID number.&lt;br /&gt;
&lt;br /&gt;
In the case of the worldmaps worksheet there are four columns that contain the data defining the map layout.&lt;br /&gt;
* Label - The name that this map layout will be known by in the Designer Toolkit's dropdown menu. It's not seen by the player.&lt;br /&gt;
* MAP - The filename of the .tga that defines the map's appearance, without the .tga extension.&lt;br /&gt;
* TargetWpTable - The names of 2DAs that contains information about what waypoints the player appears at within areas accessible from the map. This is discussed in greater detail below.&lt;br /&gt;
* TripsCounterTable - A table showing which trips should have random encounters. We won't be going into detail about this in this tutorial.&lt;br /&gt;
&lt;br /&gt;
We'll need to add a new row to this table to describe the map area that we want to use in the toolset. For this example we have a map of a region named &amp;quot;Epona's Realm&amp;quot;, in a file named &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt;. We'll need to assign a unique number ID, which we'll arbitrarily set to 700 (using a high number like this makes it less likely to interfere with other people's additions in the future.). We'll call the target waypoint table &amp;quot;target_wps_epona&amp;quot; to fit with the naming convention of the other maps.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet with epona added.png]]&lt;br /&gt;
&lt;br /&gt;
In our hypothetical game module we've got three different cities that the player can reach via the world map; Dunland, Agrabia, and Serepta. They'll be represented by the areas dunland_main, agrabia_main, and serepta_main. The next thing we might want to do is create a 2DA that defines which waypoints you wind up in when you travel to each of these areas from each of the possible origin points. This isn't strictly necessary but can be used to make travel around the worldmap seem more realistic by having the player arrive at different waypoints depending on which direction they're arriving in an area from.&lt;br /&gt;
&lt;br /&gt;
Again, a convenient starting place is an existing 2DA. This 2DA is another worksheet in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt; that shows the target waypoints for a group of areas accessible from a city map in the game's single-player campaign:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps example.png]]&lt;br /&gt;
&lt;br /&gt;
All of the source areas are listed in the second column, and then each column after that corresponds to a destination area for that source. Every source needs a destination column, so there should always be a number of columns equal to the number of sources plus two (the &amp;quot;ID&amp;quot; and &amp;quot;SourceLocation&amp;quot; columns). In this example, if you're in the &amp;quot;markets&amp;quot; area and then use the map to go to the &amp;quot;elven_alienage&amp;quot; area, you'll be placed at the waypoint &amp;quot;wmw_alienage_from_market&amp;quot;. Since you can never travel from an area to that same area via the map the diagonal entries are left blank.&lt;br /&gt;
&lt;br /&gt;
To repurpose this 2DA for Epona's Realm, first copy the worksheet and then rename it to &amp;quot;target_wps_epona&amp;quot;. We'll only need three rows and three destination columns so delete the extras.&lt;br /&gt;
&lt;br /&gt;
The geometry of these three cities is quite simple, they lie in an east-west row with Serepta to the west, Agrabia in the center, and Dunland to the east. We'll place waypoints in the eastern and western ends of agrabia_main's area layout to represent the player arriving from each of those directions.&lt;br /&gt;
&lt;br /&gt;
So, the final version of the target_wps_epona worksheet will look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps_epona.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using M2DAs to extend the game ==&lt;br /&gt;
&lt;br /&gt;
There's one remaining complication to be addressed now. When you generate &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; it will include our new map ID 700, but it also includes the old maps with the IDs 1-5. Since the file is in the override directory, these rows override the existing maps with those ID numbers in the single player campaign. This isn't a problem right now since the data is identical but it could be a problem in the future; if BioWare releases an update that needs to change those original five maps, or if some other modder wants to add some maps of his own, only one version will &amp;quot;win&amp;quot; and the result could be a mess.&lt;br /&gt;
&lt;br /&gt;
This can be overcome by splitting up a 2DA into different files that all get loaded by the game and are combined into one 2DA internally. These multi-part 2DA files are known as M2DAs, which stands for &amp;quot;multiple 2DA&amp;quot;. The identity of M2DA files is kept track of via their &amp;quot;prefix&amp;quot;, a string of text that all M2DAs being with. In the case of the worldmaps 2DA, the prefix is &amp;quot;worldmaps&amp;quot; (ie, the &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; file has the &amp;quot;worldmaps&amp;quot; prefix and no suffix, so it belongs to the &amp;quot;worldmaps&amp;quot; 2DA).&lt;br /&gt;
&lt;br /&gt;
What we'll do now is split out the data relating to our &amp;quot;Epona's Realm&amp;quot; map into a separate M2DA file named &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt;. Simply rename the worksheet to &amp;quot;worldmaps_epona&amp;quot; and delete the first five rows of data entirely, leaving us with this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps_epona worksheet.png]]&lt;br /&gt;
&lt;br /&gt;
Now when the game encounters this 2DA in the override directory it will keep the data from the original worldmaps 2DA in memory and add the data from worldmaps_epona to it. If in the future some other modder builds on top of your work they can add further worldmap M2DAs, and if a patch comes out that updates the contents of the original 2DA your mod will incorporate it without needing to be updated.&lt;br /&gt;
&lt;br /&gt;
== Converting XLS files into GDA files ==&lt;br /&gt;
&lt;br /&gt;
The game can't use Excel files directly, the 2DAs must first be converted into a &amp;quot;binarized&amp;quot; form. This is done by a command-line utility called &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;. Command-line utilities are not very user-friendly, however, so a more convenient &amp;quot;wrapper&amp;quot; is included in the form of another spreadsheet named &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; uses macros to run &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt; with the appropriate command-line options. You'll need to provide &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; with the following parameters:&lt;br /&gt;
&lt;br /&gt;
* ResourceBuild Path: The path to &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;, which is installed by default in your Dragon Age directory under tools\ResourceBuild&lt;br /&gt;
* 2DA Path: The source path of the XLS files to be exported.&lt;br /&gt;
* Override Path: The path to the directory that the completed GDA files should be exported to. This doesn't have to be your actual override directory, you can move the files there manually after creating them if you prefer.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;' macro can have trouble with paths that have spaces in them, so you may need to move your XLS files to a path without any. Likewise, you may not be able to send the output files directly to the override directory if there are spaces in its path.&lt;br /&gt;
&lt;br /&gt;
Here's how we've set up &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; for converting our example:&lt;br /&gt;
&lt;br /&gt;
[[Image:2da exporter for worldmap tutorial.png]]&lt;br /&gt;
&lt;br /&gt;
To convert worldmaps.xls into binary form, select it and click the &amp;quot;Export Selected&amp;quot; button. A command-line window should pop up briefly while ResourceBuilder runs and then the finished GDA files will be placed in the directory listed in &amp;quot;Override Path.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you can't get &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; working, just run &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; instead. You can learn more about &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; by reading the [[2DA]] section.&lt;br /&gt;
&lt;br /&gt;
Note that there will be a separate GDA file for each worksheet in the XLS file, named after the worksheets in the XLS file. We only need to use two of them; &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;target_wps_epona.GDA&amp;lt;/code&amp;gt;. Copy these files into your game's override directory along with &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt; and &amp;quot;Epona's Realm&amp;quot; will become available in the toolset's dropdown menu.&lt;br /&gt;
&lt;br /&gt;
== Creating maps in photoshop to use in-game ==&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some tutorials that can be used to make yourself a map in photoshop.&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map01.htm Basic Map tutorial] - required as it is the basic stepping stone to make any map [Difficulty = Basic]&lt;br /&gt;
&lt;br /&gt;
[[File:Map01_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map02.htm Paper style/aged Map tutorial ] Style #1 [Difficulty = Beginner]&lt;br /&gt;
&lt;br /&gt;
[[File:Map02_thumb.jpg]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map04.htm Colored 2D Map Tutorial ] Style #2 [Difficulty = Beginner/Intermediate]&lt;br /&gt;
&lt;br /&gt;
[[File:Map04_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map05.htm Pseudo 3D Map Tutorial ] Style #3  [Difficulty = Intermeditate/Advanced]&lt;br /&gt;
&lt;br /&gt;
[[File:Map05_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
All map making tutorials above are done courtesy of Jeremy Elford and [http://www.jezelf.co.uk/index.html www.Jezelf.co.uk]''&lt;br /&gt;
&lt;br /&gt;
'''Other Valuable Map Making Resources'''&lt;br /&gt;
&lt;br /&gt;
[http://www.profantasy.com/ Cartographer 3 + Addons -$] Simple easy to use map maker for those who don't have photoshop or the skills/knowledge to work it.&lt;br /&gt;
&lt;br /&gt;
[http://cartographersguild.com/ Cartographers Guild Map Making Community  -Free] Great website if you are seeking other tutorials, inspiration, help, possibility of hiring someone to make you a map, and more!&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/ZombieNirvana#p/u/18/KO4XZfaSAoA Youtube Tut series by ZombieNirvana -Free] Great Series of tutorials on youtube&lt;br /&gt;
&lt;br /&gt;
== Creating a map and adding pins ==&lt;br /&gt;
&lt;br /&gt;
Now we can at last see the map as an option in the drop-down menus of the toolset. Create a map and set the &amp;quot;Map&amp;quot; property to Epona's Realm, and the map should appear.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps selecting Epona.png]]&lt;br /&gt;
&lt;br /&gt;
There's not much to the map itself - its only configurable properties are Parent Map, Tag, and Map. To make the map useful beyond simply displaying a graphic we'll need to add map pins (icons representing destinations). You can also add &amp;quot;trails&amp;quot;, which are a series of icons that you can make appear between different pins to mark the player's passage, but these are of lesser importance and can be left for later or omitted entirely.&lt;br /&gt;
&lt;br /&gt;
To insert a pin, right-click on the map and select &amp;quot;insert pin&amp;quot; from the drop-down menu. The pointer will turn into a crosshair that you can click anywhere on the map to place a pin (pins can also be dragged around after creation so don't worry if you miss slightly). The pin will be added to the tree view to the left of the map and, when selected, you can view its properties in the object inspector.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps placing a pin.png]]&lt;br /&gt;
&lt;br /&gt;
The most important properties to set here are:&lt;br /&gt;
* AreaTag - tells the game which area to take the player to when he clicks on this pin. Our Dunland pin will have this set to dunland_main.&lt;br /&gt;
* Initial State - tells the game whether to display the pin and whether to make it clickable; you will often want to have pins on the map that only become available to the player at some point later in the game. We'll set Dunland to &amp;quot;grayed out&amp;quot; right now, since we'll want the player to know about its existence but not be able to go there right away.&lt;br /&gt;
* Name - This name is shown to the player.&lt;br /&gt;
*Pin Type - A list of icons that can be used for the pin. The list of appearances available can be added to in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;, you may have noticed the &amp;lt;code&amp;gt;map_pin_images&amp;lt;/code&amp;gt; worksheet when you were editing it earlier.&lt;br /&gt;
&lt;br /&gt;
Other properties you may wish to set include &amp;quot;Tooltip&amp;quot; (a longer description that will be shown to the player if he hovers the mouse pointer over the pin) and &amp;quot;Waypoint Override&amp;quot;, which designates which waypoint in the pin's target area to send the player to when he clicks on it. This waypoint overrides the one set in target_wps_epona but has less fine-grained control available; it can be useful for testing purposes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;TerrainType&amp;quot; property is used to determine which group of random encounters to draw from. Setting up random encounters is a more advanced topic that we won't cover in this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps pins placed.png]]&lt;br /&gt;
&lt;br /&gt;
== Showing the player the map ==&lt;br /&gt;
&lt;br /&gt;
Once you've got a map built for your module you'll need to tell the game how to use it. There are a number of wrapper functions in wrappers_h that you'll find useful for this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPrimary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function tells the game what the current default &amp;quot;world map&amp;quot; is. You'll want to set this to your default world map as part of the initial setup of your module, and if you have multiple different maps you'll need to call this function again later in the game to switch which one is active (for example in a plot script that triggers when the player completes a certain task or moves to a certain area).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapSecondary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!!Need to find out more about this one.!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapLocationStatus(object oLocation, int nStatusId, int bSuppressActiveFlash = FALSE)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oLocation is a map pin, nStatusId is an integer identifier for one of the status states (such as active, grayed out, destroyed), and the optional bSuppressActiveFlash flag tells the game to omit the visual highlighting that is usually shown around map pins that have had their status changed since the last time the player looked at the map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPlayerLocation(object oMap, object oLocation)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This marks the player's current location on the map.&lt;br /&gt;
&lt;br /&gt;
=== Sending the player to the world map via an area transition ===&lt;br /&gt;
&lt;br /&gt;
To set up an area transition placeable (such as a door) to send the player to the world map when an area transition is performed, set the placeable's PLC_AT_DEST_AREA_TAG variable to the string &amp;quot;world_map&amp;quot;. This is a special string that's used to signal the placeable_core script's area-transition-handling code that it needs to show a map instead. When the placeable is triggered it will send an EVENT_TYPE_TRANSITION_TO_WORLD_MAP event to the module's event script.&lt;br /&gt;
&lt;br /&gt;
The default module_core script doesn't handle this event so you'll need to add your own module event script to override this behavior. The module's event script should call the following core script functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 SetWorldMapGuiStatus(WM_GUI_STATUS_USE);&lt;br /&gt;
 OpenPrimaryWorldMap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This displays the map to the player.&lt;br /&gt;
&lt;br /&gt;
== Activating and deactivating map pins ==&lt;br /&gt;
&lt;br /&gt;
This can be done via scripting.&lt;br /&gt;
&lt;br /&gt;
First get the world map pin object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
object oVillage = GetObjectByTag(WML_WOW_VILLAGE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then call the following to activate the pin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WR_SetWorldMapLocationStatus(oVillage, WM_LOCATION_ACTIVE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Area transitions using the default area transition core script can also automatically enable certain map pins when the player travels through them. The names of these pins are set in the area transition's variables.&lt;br /&gt;
&lt;br /&gt;
== Handling the player's map usage ==&lt;br /&gt;
&lt;br /&gt;
If the proper destination areas and waypoints have been set in the map pins (and optionally the target_wps 2DA) the player's movement from one location to another should be handled automatically. However, the game does provide some hooks that allows further customization or non-standard actions to be performed.&lt;br /&gt;
&lt;br /&gt;
When a player clicks on a map pin, the EVENT_TYPE_BEGIN_TRAVEL event is sent to the module script.&lt;br /&gt;
&lt;br /&gt;
This event has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* string sSource = GetEventString(ev, 0); // area tag for the source location (the area the player's leaving)&lt;br /&gt;
* string sTarget = GetEventString(ev, 1); // area tag for the target location (the area the player's travelling to)&lt;br /&gt;
* string sWPOverride = GetEventString(ev, 2); // the tag for the target waypoint override (the waypoint in the destination area that the player will appear at)&lt;br /&gt;
* int nSourceTerrain = GetEventInteger(ev, 0); //The terrain type of the source location&lt;br /&gt;
* int nTargetTerrain = GetEventInteger(ev, 1); //The terrain type of the target location - these two parameters are used in the main campaign's code for determining what sort of random encounters to generate, but that's handled entirely in scripting so you can use them for other purposes or ignore them completely if you prefer.&lt;br /&gt;
* int nWorldMap = GetEventInteger(ev, 2);&lt;br /&gt;
* object oSourceLocation = GetEventObject(ev, 0); // the map pin object representing the source location.&lt;br /&gt;
&lt;br /&gt;
In the main Dragon Age campaign's module script, a large amount of complex code is triggered by the EVENT_TYPE_BEGIN_TRAVEL event. This code takes into account a lot of special-case situations that are relevant only to the particular plot and structure of the Dragon Age main campaign. But it is important to note one thing that is ''not'' done in the EVENT_TYPE_BEGIN_TRAVEL event; the actual call to UT_DoAreaTransition().&lt;br /&gt;
&lt;br /&gt;
Instead, once you have finished doing whatever special-case coding and random encounter tests you choose to implement, you will need to store the destination that you're sending the player to in the module's variable table. Then call the WorldMapStartTravelling(); function to begin the map trail animation (the WorldMapStartTravelling function has optional parameters to insert a random encounter partway through the trip and to override the map pin the trail starts at).&lt;br /&gt;
&lt;br /&gt;
The engine will send the EVENT_TYPE_WORLDMAP_PRETRANSITION event as it begins the map trail animation. This is where you want to call UT_DoAreaTransition(); the level will begin loading in the background as the map trail animation plays.&lt;br /&gt;
&lt;br /&gt;
The following code is the most basic amount that you should need to put in your module script in order to implement area transitions via the world map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
case EVENT_TYPE_BEGIN_TRAVEL:&lt;br /&gt;
{&lt;br /&gt;
    string sTarget = GetEventString(ev, 1); // area tag target location&lt;br /&gt;
    string sWPOverride = GetEventString(ev, 2); // waypoint tag override&lt;br /&gt;
    //if you want to do any special-case code or random encounter handling, insert it here&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;, sTarget); //store target area's tag to a local module variable&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;, sWPOverride); //store target waypoint tag&lt;br /&gt;
    WorldMapStartTravelling(); //initiate the map's travelling animation. The engine will send EVENT_TYPE_WORLDMAP_PRETRANSITION once it's started. &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case EVENT_TYPE_WORLDMAP_PRETRANSITION:&lt;br /&gt;
{&lt;br /&gt;
    string sArea = GetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;); //retrieve the target area tag stored in EVENT_TYPE_BEGIN_TRAVEL&lt;br /&gt;
    string sWP = GetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;); //retrieve the target waypoint tag&lt;br /&gt;
    UT_DoAreaTransition(sArea, sWP); //execute the area transition to that target.&lt;br /&gt;
    break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a EVENT_TYPE_WORLDMAP_POSTTRANSITION event. In the Dragon Age main campaign it is used only to trigger certain cutscenes that play as a result of world travel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other map-related events ===&lt;br /&gt;
&lt;br /&gt;
The EVENT_TYPE_WORLD_MAP_CLOSED is sent to the module script when the world map is closed. It has only one parameter, an integer flag that indicates whether the map was closed due to cancel being selected or due to the player traveling to a new destination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Maps]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Talk:Main_Page&amp;diff=8340</id>
		<title>Talk:Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Talk:Main_Page&amp;diff=8340"/>
				<updated>2009-11-27T08:43:25Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Create a new single developers page within the wiki to properly list addon's underdevelopment, and the teams developing them? -Discussion&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Add a new topic by creating a new header like this one ==&lt;br /&gt;
&lt;br /&gt;
And then write your comment below it. Sign your comment with four tildes, like so: &amp;lt;nowiki&amp;gt;~~~~&amp;lt;/nowiki&amp;gt;. It is automatically substituted with your user name and a link to your user page.&lt;br /&gt;
&lt;br /&gt;
:To respond to someone else's comment, use a colon at the beginning of your response to indent it.&lt;br /&gt;
&lt;br /&gt;
::Two colons indent twice, and so forth.&lt;br /&gt;
&lt;br /&gt;
== Can we add a link to the Level Editor tutorial to the list of tutorials on the main page? ==&lt;br /&gt;
&lt;br /&gt;
I don't know how to do it myself, but it seems like the Level Editor tutorial belongs before the Area tutorial in that list on the main page.&lt;br /&gt;
&lt;br /&gt;
== Tutorials ==&lt;br /&gt;
I moved the placeable tutorial to second on the list, because it doesn't work unless you already created a module in the area tutorial.&lt;br /&gt;
[[User:Proleric1|Proleric1]] 12:41, 25 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
The list of events is actually here:&lt;br /&gt;
http://social.bioware.com/wiki/datoolset/index.php/Category:Event_types [[User:Proleric1|Proleric1]] 07:59, 15 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== NDA ==&lt;br /&gt;
I suspect that the NDA no longer applies to the Wiki, since the latter does not touch on the three topics that Chris Priestly asked us not to discuss in his e-mail of 13-Jul-2009.&lt;br /&gt;
[[User:Proleric1|Proleric1]] 09:42, 25 July 2009 (UTC)&lt;br /&gt;
:Surely no NDA applies now, as the wiki is in the public domain? [[User:Proleric1|Proleric1]] 07:47, 15 October 2009 (UTC)&lt;br /&gt;
::Probably not. I'll ask around to make sure, though. [[User:BryanDerksen|BryanDerksen]] 19:44, 15 October 2009 (UTC)&lt;br /&gt;
::I've been asked to ask you to hold off on talking about the wiki until next week, to help spread the &amp;quot;buzz&amp;quot; out a bit. Right now everyone's talking about character creator, we don't want to distract from that. The folks who busted their humps on CC need their due. [[User:BryanDerksen|BryanDerksen]] 15:07, 16 October 2009 (UTC)&lt;br /&gt;
::Heh. I see Sunjammer just posted about the wiki on the forum, directing people here. Oh well. :) [[User:BryanDerksen|BryanDerksen]] 15:41, 16 October 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Toolset download location ==&lt;br /&gt;
&lt;br /&gt;
Someone should probably post a link to the location of the toolset here and/or in the installation page, to go with the instructions.  It's a bit slow on the various EA/Bioware servers right now to just search around for them, and there's no direct link on Google for the obvious searches yet.&lt;br /&gt;
&lt;br /&gt;
Edit: That link would be:&lt;br /&gt;
[http://social.bioware.com/toolset.php#downloads]&lt;br /&gt;
&lt;br /&gt;
According to a post by Scott Meadows,Senior Programmer in the forums, it is still not available for general download, as of 9:48pm PST.  No ETA was given.&lt;br /&gt;
&lt;br /&gt;
--[[User:RyanFenton|RyanFenton]] 20:45, 3 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:It is available now.&lt;br /&gt;
[[User:Rabidgerbal|Rabidgerbal]] 23:20, 6 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
::Thanks, slipped my mind in the midst of all the troubleshooting. :) [[User:BryanDerksen|BryanDerksen]] 23:41, 6 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Camp ==&lt;br /&gt;
&lt;br /&gt;
How do I add stuff to the camp area? [[User:Apocalypsefu|Apocalypsefu]] 04:45, 11 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
: [[How-tos#Insert_content_into_an_existing_area]] has a summary of how you can create an addin that adds new content to existing areas. [[User:BryanDerksen|BryanDerksen]] 01:42, 14 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Ten Minute Tutorials==&lt;br /&gt;
I think we should create a category and or easily accessible launch page where people can contribute quick 10 minute tutorials on a variety of subjects [[User:Allan Smith|Allan Smith]] 01:54, 13 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Help for the timid==&lt;br /&gt;
We should also put up something on the main page that helps timid editors know that it is okay to make new articles, and possibly give some guidance on naming conventions and how to get their articles included or linked from the main page (or really guidance on where they should be linked from [[User:Allan Smith|Allan Smith]] 01:54, 13 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:I'll come up with a page tomorrow, I should have some spare time then. :) [[User:BryanDerksen|BryanDerksen]] 01:43, 14 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
==Added an Item Reskinning Tutorial==&lt;br /&gt;
See [[Tutorial: Reskinning an Item]]. Perhaps someone could add it to the list of tutorials on the main page, if appropriate?&lt;br /&gt;
[[User:Avantoreon|Avantoreon]] 00:38, 17 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Google ==&lt;br /&gt;
&lt;br /&gt;
The Wiki isn't accessible unless you have a Bioware social account; are there exceptions for Googlebot?  I understand wanting to protect the contents but being searchable is a great way to be found.  --[[User:Talonius|Talonius]] 04:30, 17 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== 2DA ID reservation page ==&lt;br /&gt;
&lt;br /&gt;
Is there any way a page can be added to the wiki so that modders that use it can reserve ranges for their content? I would do it, but I feel that it needs to be accessible from the main page of the wiki so that its existence is well known. [[User:Ladydesire|Ladydesire]] 01:34, 19 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
: I've just redone the main page to have a lot fewer links on it, which I think will actually help a new user find things more easily. I'm thinking that putting it on [[script]] would be better now, since that's the &amp;quot;portal&amp;quot; page that deals with things where row IDs are likely to come up. I'll put it there for now, anyway. Thoughts? [[User:BryanDerksen|BryanDerksen]] 22:46, 23 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
:There, I've whipped up a stub page at [[2DA ranges in use]]. Is that the sort of thing you were thinking of? [[User:BryanDerksen|BryanDerksen]] 22:53, 23 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Adding to main game ==&lt;br /&gt;
&lt;br /&gt;
Is it possible to add &amp;quot;addin&amp;quot; content to the main game (Single Player)? I would like to add a new town to an existing forest in the main game without going through Other Campaign.&lt;br /&gt;
&lt;br /&gt;
:Does [[How-tos#Insert_content_into_an_existing_area]] cover what you had in mind? [[User:BryanDerksen|BryanDerksen]] 22:58, 23 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
== Custom Animations? ==&lt;br /&gt;
&lt;br /&gt;
Is it possible to create custom animations with the toolset?  As in, animate the characters any way you wish for cutscenes, like a werewolf thriller remake for example?  I haven't taken a good look in the toolset quite yet, and only a brief look at the wiki, but it looks as though I would be limited to a set group of named pre-made animations.  [[User:Interitus3841|Interitus3841]] 13:29, 23 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
: The toolset doesn't have animation-creation tools in it, though the [[blend tree editor]] is used to combine existing animations. Currently there aren't any tools available that I know of for converting animations created with other tools such as Poser to the [[ANI]] format used by Dragon Age, but I'm sure eventually someone will come up with something. [[User:BryanDerksen|BryanDerksen]] 22:58, 23 November 2009 (UTC)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Create a new single developers page within the wiki to properly list addon's underdevelopment, and the teams developing them? ==&lt;br /&gt;
&lt;br /&gt;
Title basically sums it up. I feel like Social.Bioware.com itself isn't as organized as it should be, and its quiet hard to sift through. I figure if all us developers get together we could maintain a single page that would list addon's and the team doing them in a table sort of way, linking our social.bioware.com page, and our websites all in one little easy to use area.&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Tutorials&amp;diff=8339</id>
		<title>Tutorials</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Tutorials&amp;diff=8339"/>
				<updated>2009-11-27T08:36:28Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: /* External Tutorials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In the course of these tutorials we'll go through all the steps needed to create a basic adventure.&lt;br /&gt;
&lt;br /&gt;
{{sidebox|&lt;br /&gt;
*Boxes like this contain a checklist of important steps.&lt;br /&gt;
*They're intended as a reminder and as a navigational aid.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
*[[Introductory tutorial]] - An overview of the toolset as a whole&lt;br /&gt;
*[[Module tutorial]] - how to create a module to work in.&lt;br /&gt;
&lt;br /&gt;
This set of tutorials forms a series, each building on or filling in omissions by the last:&lt;br /&gt;
*[[Level Editor Tutorial]]&lt;br /&gt;
*[[Placeable tutorial]]&lt;br /&gt;
*[[Area tutorial]]&lt;br /&gt;
*[[Item tutorial]]&lt;br /&gt;
*[[Creature tutorial]]&lt;br /&gt;
*[[Conversation tutorial]]&lt;br /&gt;
*[[Scripting tutorial]]&lt;br /&gt;
&lt;br /&gt;
Once you've become familiar with the basics introduced on those tutorials you might have a better grounding for:&lt;br /&gt;
*[[Cutscene tutorial]]&lt;br /&gt;
*[[Map tutorial]] (which also introduces you to [[2DA]] editing)&lt;br /&gt;
&lt;br /&gt;
== Demo module ==&lt;br /&gt;
&lt;br /&gt;
The toolset currently ships with a simple demo module pre-loaded into its database.&lt;br /&gt;
&lt;br /&gt;
*[[Demo module]] - how to export and run the demo module.&lt;br /&gt;
&lt;br /&gt;
== Other Tutorials ==&lt;br /&gt;
*[[Tutorial: Reskinning an Item]]&lt;br /&gt;
*[[Adding a Location to the Single Player Campaign Tutorial]]&lt;br /&gt;
*[[Backgrounds tutorial]]&lt;br /&gt;
&lt;br /&gt;
== External Tutorials ==&lt;br /&gt;
*[http://dragonagemodding.wordpress.com Beyond Ferelden] has many in-depth tutorials by jwvanderbeck.&lt;br /&gt;
&lt;br /&gt;
*[http://www.youtube.com/watch?v=TwQNRBFLhrE Playable Area and Conversation] video tutorial by [http://social.bioware.com/64020/ st4rdog].&lt;br /&gt;
*[http://www.youtube.com/watch?v=CaHldJcUTz8 Simple Conversation Cameras] video tutorial by [http://social.bioware.com/64020/ st4rdog].&lt;br /&gt;
*[http://www.youtube.com/watch?v=QOQJ2heQto4 Cutscene and Trigger] video tutorial by [http://social.bioware.com/64020/ st4rdog].&lt;br /&gt;
*[http://www.youtube.com/watch?v=szWKgj2ZuXo Custom Level and Room Building] video tutorial by [http://social.bioware.com/64020/ st4rdog].&lt;br /&gt;
*[http://www.youtube.com/watch?v=DKJ7F14n8o8 Downloading and Installing the Toolset] video tutorial by [http://social.bioware.com/74287/ DragonAge22].&lt;br /&gt;
*[http://www.youtube.com/watch?v=iMPBsulv9xI Creating a Room] video tutorial by [http://social.bioware.com/74287/ DragonAge22].&lt;br /&gt;
*[http://www.youtube.com/watch?v=g3kx2CaarHo How to Make an Interior Level with Lighting] video tutorial by [http://social.bioware.com/group/60/ Darkworld Development Team].&lt;br /&gt;
*[http://www.youtube.com/watch?v=O6TeZeE1Lc8 Making a Room] video tutorial by BigDrip681.&lt;br /&gt;
*[http://social.bioware.com/5339/blog/576/ Custom Player Items In Single Player] by [http://social.bioware.com/5339/ weriK].&lt;br /&gt;
*[http://social.bioware.com/5339/blog/651/ The Secret Behind Item Statistics] by [http://social.bioware.com/5339/ weriK].&lt;br /&gt;
*[http://social.bioware.com/project/923/ Guide for installing/uninstalling Mods] Beginner Guide to get started with using Mods by [http://social.bioware.com/237411/ Alexspeed].&lt;br /&gt;
*[http://www.jezelf.co.uk/tutorials.htm Photoshop Map making tutorials] Credits to Jason Elford, brought to DAT wiki by [http://social.bioware.com/48156/ Arixsus]&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials| ]]&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8338</id>
		<title>Map tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Map_tutorial&amp;diff=8338"/>
				<updated>2009-11-27T08:32:57Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Added photoshop map making tutorials, and resources to the map making tutorial section.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map objects are a way to allow the player to travel from area to area without having to follow a rigid path from one exit to the next. They're useful for representing large expanses of wide-open countryside, for example, or a city with various districts that the player can travel between freely but is too large to conveniently fit in a single area. Maps allow a world to be large without having to detail every little irrelevant place in it.&lt;br /&gt;
&lt;br /&gt;
If you start by creating a new map resource within the designer toolkit, you'll quickly find that there is only a very limited pre-defined list of map images that are available for use. That's because map layouts are defined in a 2DA (&amp;quot;two-dimensional array&amp;quot;), a binary table of data that is used by the toolset to provide definitions but that is not itself editable from it. You may have encountered references to 2DAs when working with other objects. For example, the list of variables that an object's scripts can refer to is stored in a 2DA. This tutorial is going to assume that you've never worked with 2DAs themselves before. In a sense, this tutorial is as much a 2DA tutorial as it is a map tutorial.&lt;br /&gt;
&lt;br /&gt;
== Terminology ==&lt;br /&gt;
&lt;br /&gt;
This tutorial makes use of a number of different three-letter acronyms and specific terms that may be troublesome to keep track of at first. Before we dive straight in, here's a cheat sheet that may prove useful:&lt;br /&gt;
&lt;br /&gt;
*2DA - &amp;quot;two-dimensional array&amp;quot;, the table of data we'll be editing. Note that a 2DA can be stored in a human-readable or machine-readable format, each of which has their own names. &amp;quot;2DA&amp;quot; is used to refer to the table as an abstract concept.&lt;br /&gt;
*XLS - the file extension for an Excel spreadsheet.&lt;br /&gt;
*Worksheet - tabbed panes within an Excel spreadsheet. Each Excel spreadsheet can contain multiple worksheets and each worksheet can represent one 2DA, so one spreadsheet can contain multiple 2DAs.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worksheet tabs.png|frame|center|Worksheet tabs along the bottom of an Excel spreadsheet]]&lt;br /&gt;
&lt;br /&gt;
*GDA - The file extension for a binary file usable by the game. 2DAs that have been processed by the resource exporter will be stored in this form.&lt;br /&gt;
*TGA - Targa graphics file extension. TGA graphic files are used to define the underlying appearance of the map itself.&lt;br /&gt;
*M2DA - &amp;quot;Multiple 2DA&amp;quot;. Previous BioWare games have made use of 2DAs, but the 2DAs used in Dragon Age use this new format instead. It allows several different 2DAs to be combined together and treated as a single 2DA by the game, which is very useful for adding new content to an existing 2DA.&lt;br /&gt;
&lt;br /&gt;
== The worldmaps.xls spreadsheet ==&lt;br /&gt;
&lt;br /&gt;
See also [[worldmaps.xls]].&lt;br /&gt;
&lt;br /&gt;
If we're creating maps for a brand new module we could in theory start with a blank Excel spreadsheet and build the required 2DAs from scratch. It's much easier, however, to start with an existing copy of the relevant spreadsheet from another module and replace the values within it with our own.&lt;br /&gt;
&lt;br /&gt;
The spreadsheet that contains all the 2DAs relevant to world maps is &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;. Open it in Excel and you'll find that it contains, among other worksheets, the &amp;quot;worldmaps&amp;quot; worksheet.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet.png|frame|center|The redaction will be removed when the game ships !!Note: mere moments after these screenshots were taken a NameStrRef column was added to allow localized map names. These screenshots will have to be redone anyway!!]]&lt;br /&gt;
&lt;br /&gt;
This is the core 2DA that defines what maps are available in the Designer Toolset's &amp;quot;Map&amp;quot; dropdown menu.&lt;br /&gt;
&lt;br /&gt;
First, some standard features that all 2DA worksheets will have:&lt;br /&gt;
*The first row of the worksheet contains the labels of the columns. Don't change the names of columns or the game won't be able to recognize them.&lt;br /&gt;
*The second row contains a keyword describing the data type of that column. Again, don't change this or the game will become confused by what it's seeing.&lt;br /&gt;
*The first column contains ID numbers. Each row needs to have a unique ID number.&lt;br /&gt;
&lt;br /&gt;
In the case of the worldmaps worksheet there are four columns that contain the data defining the map layout.&lt;br /&gt;
* Label - The name that this map layout will be known by in the Designer Toolkit's dropdown menu. It's not seen by the player.&lt;br /&gt;
* MAP - The filename of the .tga that defines the map's appearance, without the .tga extension.&lt;br /&gt;
* TargetWpTable - The names of 2DAs that contains information about what waypoints the player appears at within areas accessible from the map. This is discussed in greater detail below.&lt;br /&gt;
* TripsCounterTable - A table showing which trips should have random encounters. We won't be going into detail about this in this tutorial.&lt;br /&gt;
&lt;br /&gt;
We'll need to add a new row to this table to describe the map area that we want to use in the toolset. For this example we have a map of a region named &amp;quot;Epona's Realm&amp;quot;, in a file named &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt;. We'll need to assign a unique number ID, which we'll arbitrarily set to 700 (using a high number like this makes it less likely to interfere with other people's additions in the future.). We'll call the target waypoint table &amp;quot;target_wps_epona&amp;quot; to fit with the naming convention of the other maps.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet with epona added.png]]&lt;br /&gt;
&lt;br /&gt;
In our hypothetical game module we've got three different cities that the player can reach via the world map; Dunland, Agrabia, and Serepta. They'll be represented by the areas dunland_main, agrabia_main, and serepta_main. The next thing we might want to do is create a 2DA that defines which waypoints you wind up in when you travel to each of these areas from each of the possible origin points. This isn't strictly necessary but can be used to make travel around the worldmap seem more realistic by having the player arrive at different waypoints depending on which direction they're arriving in an area from.&lt;br /&gt;
&lt;br /&gt;
Again, a convenient starting place is an existing 2DA. This 2DA is another worksheet in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt; that shows the target waypoints for a group of areas accessible from a city map in the game's single-player campaign:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps example.png]]&lt;br /&gt;
&lt;br /&gt;
All of the source areas are listed in the second column, and then each column after that corresponds to a destination area for that source. Every source needs a destination column, so there should always be a number of columns equal to the number of sources plus two (the &amp;quot;ID&amp;quot; and &amp;quot;SourceLocation&amp;quot; columns). In this example, if you're in the &amp;quot;markets&amp;quot; area and then use the map to go to the &amp;quot;elven_alienage&amp;quot; area, you'll be placed at the waypoint &amp;quot;wmw_alienage_from_market&amp;quot;. Since you can never travel from an area to that same area via the map the diagonal entries are left blank.&lt;br /&gt;
&lt;br /&gt;
To repurpose this 2DA for Epona's Realm, first copy the worksheet and then rename it to &amp;quot;target_wps_epona&amp;quot;. We'll only need three rows and three destination columns so delete the extras.&lt;br /&gt;
&lt;br /&gt;
The geometry of these three cities is quite simple, they lie in an east-west row with Serepta to the west, Agrabia in the center, and Dunland to the east. We'll place waypoints in the eastern and western ends of agrabia_main's area layout to represent the player arriving from each of those directions.&lt;br /&gt;
&lt;br /&gt;
So, the final version of the target_wps_epona worksheet will look like:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps worksheet target_wps_epona.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Using M2DAs to extend the game ==&lt;br /&gt;
&lt;br /&gt;
There's one remaining complication to be addressed now. When you generate &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; it will include our new map ID 700, but it also includes the old maps with the IDs 1-5. Since the file is in the override directory, these rows override the existing maps with those ID numbers in the single player campaign. This isn't a problem right now since the data is identical but it could be a problem in the future; if BioWare releases an update that needs to change those original five maps, or if some other modder wants to add some maps of his own, only one version will &amp;quot;win&amp;quot; and the result could be a mess.&lt;br /&gt;
&lt;br /&gt;
This can be overcome by splitting up a 2DA into different files that all get loaded by the game and are combined into one 2DA internally. These multi-part 2DA files are known as M2DAs, which stands for &amp;quot;multiple 2DA&amp;quot;. The identity of M2DA files is kept track of via their &amp;quot;prefix&amp;quot;, a string of text that all M2DAs being with. In the case of the worldmaps 2DA, the prefix is &amp;quot;worldmaps&amp;quot; (ie, the &amp;lt;code&amp;gt;worldmaps.GDA&amp;lt;/code&amp;gt; file has the &amp;quot;worldmaps&amp;quot; prefix and no suffix, so it belongs to the &amp;quot;worldmaps&amp;quot; 2DA).&lt;br /&gt;
&lt;br /&gt;
What we'll do now is split out the data relating to our &amp;quot;Epona's Realm&amp;quot; map into a separate M2DA file named &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt;. Simply rename the worksheet to &amp;quot;worldmaps_epona&amp;quot; and delete the first five rows of data entirely, leaving us with this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps_epona worksheet.png]]&lt;br /&gt;
&lt;br /&gt;
Now when the game encounters this 2DA in the override directory it will keep the data from the original worldmaps 2DA in memory and add the data from worldmaps_epona to it. If in the future some other modder builds on top of your work they can add further worldmap M2DAs, and if a patch comes out that updates the contents of the original 2DA your mod will incorporate it without needing to be updated.&lt;br /&gt;
&lt;br /&gt;
== Converting XLS files into GDA files ==&lt;br /&gt;
&lt;br /&gt;
The game can't use Excel files directly, the 2DAs must first be converted into a &amp;quot;binarized&amp;quot; form. This is done by a command-line utility called &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;. Command-line utilities are not very user-friendly, however, so a more convenient &amp;quot;wrapper&amp;quot; is included in the form of another spreadsheet named &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; uses macros to run &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt; with the appropriate command-line options. You'll need to provide &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; with the following parameters:&lt;br /&gt;
&lt;br /&gt;
* ResourceBuild Path: The path to &amp;lt;code&amp;gt;ResourceBuilder.exe&amp;lt;/code&amp;gt;, which is installed by default in your Dragon Age directory under tools\ResourceBuild&lt;br /&gt;
* 2DA Path: The source path of the XLS files to be exported.&lt;br /&gt;
* Override Path: The path to the directory that the completed GDA files should be exported to. This doesn't have to be your actual override directory, you can move the files there manually after creating them if you prefer.&lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt;' macro can have trouble with paths that have spaces in them, so you may need to move your XLS files to a path without any. Likewise, you may not be able to send the output files directly to the override directory if there are spaces in its path.&lt;br /&gt;
&lt;br /&gt;
Here's how we've set up &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; for converting our example:&lt;br /&gt;
&lt;br /&gt;
[[Image:2da exporter for worldmap tutorial.png]]&lt;br /&gt;
&lt;br /&gt;
To convert worldmaps.xls into binary form, select it and click the &amp;quot;Export Selected&amp;quot; button. A command-line window should pop up briefly while ResourceBuilder runs and then the finished GDA files will be placed in the directory listed in &amp;quot;Override Path.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
If you can't get &amp;lt;code&amp;gt;2daExporter.xls&amp;lt;/code&amp;gt; working, just run &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; instead. You can learn more about &amp;lt;code&amp;gt;ExcelProcessor&amp;lt;/code&amp;gt; by reading the [[2DA]] section.&lt;br /&gt;
&lt;br /&gt;
Note that there will be a separate GDA file for each worksheet in the XLS file, named after the worksheets in the XLS file. We only need to use two of them; &amp;lt;code&amp;gt;worldmaps_epona.GDA&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;target_wps_epona.GDA&amp;lt;/code&amp;gt;. Copy these files into your game's override directory along with &amp;lt;code&amp;gt;epona.tga&amp;lt;/code&amp;gt; and &amp;quot;Epona's Realm&amp;quot; will become available in the toolset's dropdown menu.&lt;br /&gt;
&lt;br /&gt;
=== Creating maps in photoshop to use in-game ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here are some tutorials that can be used to make yourself a map in photoshop.&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map01.htm Basic Map tutorial] - required as it is the basic stepping stone to make any map [Difficulty = Basic]&lt;br /&gt;
&lt;br /&gt;
[[File:Map01_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map02.htm Paper style/aged Map tutorial ] Style #1 [Difficulty = Beginner]&lt;br /&gt;
&lt;br /&gt;
[[File:Map02_thumb.jpg]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map04.htm Colored 2D Map Tutorial ] Style #2 [Difficulty = Beginner/Intermediate]&lt;br /&gt;
&lt;br /&gt;
[[File:Map04_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
[http://www.jezelf.co.uk/tutorials_map05.htm Pseudo 3D Map Tutorial ] Style #3  [Difficulty = Intermeditate/Advanced]&lt;br /&gt;
&lt;br /&gt;
[[File:Map05_thumb.jpg‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''&lt;br /&gt;
All map making tutorials above are done courtesy of Jeremy Elford and [http://www.jezelf.co.uk/index.html www.Jezelf.co.uk]''&lt;br /&gt;
&lt;br /&gt;
'''Other Valuable Map Making Resources'''&lt;br /&gt;
&lt;br /&gt;
[http://www.profantasy.com/ Cartographer 3 + Addons -$] Simple easy to use map maker for those who don't have photoshop or the skills/knowledge to work it.&lt;br /&gt;
&lt;br /&gt;
[http://cartographersguild.com/ Cartographers Guild Map Making Community  -Free] Great website if you are seeking other tutorials, inspiration, help, possibility of hiring someone to make you a map, and more!&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/ZombieNirvana#p/u/18/KO4XZfaSAoA Youtube Tut series by ZombieNirvana -Free] Great Series of tutorials on youtube&lt;br /&gt;
&lt;br /&gt;
== Creating a map and adding pins ==&lt;br /&gt;
&lt;br /&gt;
Now we can at last see the map as an option in the drop-down menus of the toolset. Create a map and set the &amp;quot;Map&amp;quot; property to Epona's Realm, and the map should appear.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps selecting Epona.png]]&lt;br /&gt;
&lt;br /&gt;
There's not much to the map itself - its only configurable properties are Parent Map, Tag, and Map. To make the map useful beyond simply displaying a graphic we'll need to add map pins (icons representing destinations). You can also add &amp;quot;trails&amp;quot;, which are a series of icons that you can make appear between different pins to mark the player's passage, but these are of lesser importance and can be left for later or omitted entirely.&lt;br /&gt;
&lt;br /&gt;
To insert a pin, right-click on the map and select &amp;quot;insert pin&amp;quot; from the drop-down menu. The pointer will turn into a crosshair that you can click anywhere on the map to place a pin (pins can also be dragged around after creation so don't worry if you miss slightly). The pin will be added to the tree view to the left of the map and, when selected, you can view its properties in the object inspector.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps placing a pin.png]]&lt;br /&gt;
&lt;br /&gt;
The most important properties to set here are:&lt;br /&gt;
* AreaTag - tells the game which area to take the player to when he clicks on this pin. Our Dunland pin will have this set to dunland_main.&lt;br /&gt;
* Initial State - tells the game whether to display the pin and whether to make it clickable; you will often want to have pins on the map that only become available to the player at some point later in the game. We'll set Dunland to &amp;quot;grayed out&amp;quot; right now, since we'll want the player to know about its existence but not be able to go there right away.&lt;br /&gt;
* Name - This name is shown to the player.&lt;br /&gt;
*Pin Type - A list of icons that can be used for the pin. The list of appearances available can be added to in &amp;lt;code&amp;gt;worldmaps.xls&amp;lt;/code&amp;gt;, you may have noticed the &amp;lt;code&amp;gt;map_pin_images&amp;lt;/code&amp;gt; worksheet when you were editing it earlier.&lt;br /&gt;
&lt;br /&gt;
Other properties you may wish to set include &amp;quot;Tooltip&amp;quot; (a longer description that will be shown to the player if he hovers the mouse pointer over the pin) and &amp;quot;Waypoint Override&amp;quot;, which designates which waypoint in the pin's target area to send the player to when he clicks on it. This waypoint overrides the one set in target_wps_epona but has less fine-grained control available; it can be useful for testing purposes.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;TerrainType&amp;quot; property is used to determine which group of random encounters to draw from. Setting up random encounters is a more advanced topic that we won't cover in this tutorial.&lt;br /&gt;
&lt;br /&gt;
[[Image:Worldmaps pins placed.png]]&lt;br /&gt;
&lt;br /&gt;
== Showing the player the map ==&lt;br /&gt;
&lt;br /&gt;
Once you've got a map built for your module you'll need to tell the game how to use it. There are a number of wrapper functions in wrappers_h that you'll find useful for this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPrimary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function tells the game what the current default &amp;quot;world map&amp;quot; is. You'll want to set this to your default world map as part of the initial setup of your module, and if you have multiple different maps you'll need to call this function again later in the game to switch which one is active (for example in a plot script that triggers when the player completes a certain task or moves to a certain area).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapSecondary(object oMapId)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
!!Need to find out more about this one.!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapLocationStatus(object oLocation, int nStatusId, int bSuppressActiveFlash = FALSE)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
oLocation is a map pin, nStatusId is an integer identifier for one of the status states (such as active, grayed out, destroyed), and the optional bSuppressActiveFlash flag tells the game to omit the visual highlighting that is usually shown around map pins that have had their status changed since the last time the player looked at the map.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;void WR_SetWorldMapPlayerLocation(object oMap, object oLocation)&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This marks the player's current location on the map.&lt;br /&gt;
&lt;br /&gt;
=== Sending the player to the world map via an area transition ===&lt;br /&gt;
&lt;br /&gt;
To set up an area transition placeable (such as a door) to send the player to the world map when an area transition is performed, set the placeable's PLC_AT_DEST_AREA_TAG variable to the string &amp;quot;world_map&amp;quot;. This is a special string that's used to signal the placeable_core script's area-transition-handling code that it needs to show a map instead. When the placeable is triggered it will send an EVENT_TYPE_TRANSITION_TO_WORLD_MAP event to the module's event script.&lt;br /&gt;
&lt;br /&gt;
The default module_core script doesn't handle this event so you'll need to add your own module event script to override this behavior. The module's event script should call the following core script functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 SetWorldMapGuiStatus(WM_GUI_STATUS_USE);&lt;br /&gt;
 OpenPrimaryWorldMap();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This displays the map to the player.&lt;br /&gt;
&lt;br /&gt;
== Activating and deactivating map pins ==&lt;br /&gt;
&lt;br /&gt;
This can be done via scripting.&lt;br /&gt;
&lt;br /&gt;
First get the world map pin object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
object oVillage = GetObjectByTag(WML_WOW_VILLAGE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then call the following to activate the pin:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
WR_SetWorldMapLocationStatus(oVillage, WM_LOCATION_ACTIVE);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Area transitions using the default area transition core script can also automatically enable certain map pins when the player travels through them. The names of these pins are set in the area transition's variables.&lt;br /&gt;
&lt;br /&gt;
== Handling the player's map usage ==&lt;br /&gt;
&lt;br /&gt;
If the proper destination areas and waypoints have been set in the map pins (and optionally the target_wps 2DA) the player's movement from one location to another should be handled automatically. However, the game does provide some hooks that allows further customization or non-standard actions to be performed.&lt;br /&gt;
&lt;br /&gt;
When a player clicks on a map pin, the EVENT_TYPE_BEGIN_TRAVEL event is sent to the module script.&lt;br /&gt;
&lt;br /&gt;
This event has the following parameters:&lt;br /&gt;
&lt;br /&gt;
* string sSource = GetEventString(ev, 0); // area tag for the source location (the area the player's leaving)&lt;br /&gt;
* string sTarget = GetEventString(ev, 1); // area tag for the target location (the area the player's travelling to)&lt;br /&gt;
* string sWPOverride = GetEventString(ev, 2); // the tag for the target waypoint override (the waypoint in the destination area that the player will appear at)&lt;br /&gt;
* int nSourceTerrain = GetEventInteger(ev, 0); //The terrain type of the source location&lt;br /&gt;
* int nTargetTerrain = GetEventInteger(ev, 1); //The terrain type of the target location - these two parameters are used in the main campaign's code for determining what sort of random encounters to generate, but that's handled entirely in scripting so you can use them for other purposes or ignore them completely if you prefer.&lt;br /&gt;
* int nWorldMap = GetEventInteger(ev, 2);&lt;br /&gt;
* object oSourceLocation = GetEventObject(ev, 0); // the map pin object representing the source location.&lt;br /&gt;
&lt;br /&gt;
In the main Dragon Age campaign's module script, a large amount of complex code is triggered by the EVENT_TYPE_BEGIN_TRAVEL event. This code takes into account a lot of special-case situations that are relevant only to the particular plot and structure of the Dragon Age main campaign. But it is important to note one thing that is ''not'' done in the EVENT_TYPE_BEGIN_TRAVEL event; the actual call to UT_DoAreaTransition().&lt;br /&gt;
&lt;br /&gt;
Instead, once you have finished doing whatever special-case coding and random encounter tests you choose to implement, you will need to store the destination that you're sending the player to in the module's variable table. Then call the WorldMapStartTravelling(); function to begin the map trail animation (the WorldMapStartTravelling function has optional parameters to insert a random encounter partway through the trip and to override the map pin the trail starts at).&lt;br /&gt;
&lt;br /&gt;
The engine will send the EVENT_TYPE_WORLDMAP_PRETRANSITION event as it begins the map trail animation. This is where you want to call UT_DoAreaTransition(); the level will begin loading in the background as the map trail animation plays.&lt;br /&gt;
&lt;br /&gt;
The following code is the most basic amount that you should need to put in your module script in order to implement area transitions via the world map:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
case EVENT_TYPE_BEGIN_TRAVEL:&lt;br /&gt;
{&lt;br /&gt;
    string sTarget = GetEventString(ev, 1); // area tag target location&lt;br /&gt;
    string sWPOverride = GetEventString(ev, 2); // waypoint tag override&lt;br /&gt;
    //if you want to do any special-case code or random encounter handling, insert it here&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;, sTarget); //store target area's tag to a local module variable&lt;br /&gt;
    SetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;, sWPOverride); //store target waypoint tag&lt;br /&gt;
    WorldMapStartTravelling(); //initiate the map's travelling animation. The engine will send EVENT_TYPE_WORLDMAP_PRETRANSITION once it's started. &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
case EVENT_TYPE_WORLDMAP_PRETRANSITION:&lt;br /&gt;
{&lt;br /&gt;
    string sArea = GetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;); //retrieve the target area tag stored in EVENT_TYPE_BEGIN_TRAVEL&lt;br /&gt;
    string sWP = GetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;); //retrieve the target waypoint tag&lt;br /&gt;
    UT_DoAreaTransition(sArea, sWP); //execute the area transition to that target.&lt;br /&gt;
    break;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There is also a EVENT_TYPE_WORLDMAP_POSTTRANSITION event. In the Dragon Age main campaign it is used only to trigger certain cutscenes that play as a result of world travel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other map-related events ===&lt;br /&gt;
&lt;br /&gt;
The EVENT_TYPE_WORLD_MAP_CLOSED is sent to the module script when the world map is closed. It has only one parameter, an integer flag that indicates whether the map was closed due to cancel being selected or due to the player traveling to a new destination.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Maps]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=File:Map05_thumb.jpg&amp;diff=8337</id>
		<title>File:Map05 thumb.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=File:Map05_thumb.jpg&amp;diff=8337"/>
				<updated>2009-11-27T08:19:40Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Map_05_thumbnail for map making tut&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map_05_thumbnail for map making tut&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=File:Map04_thumb.jpg&amp;diff=8336</id>
		<title>File:Map04 thumb.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=File:Map04_thumb.jpg&amp;diff=8336"/>
				<updated>2009-11-27T08:17:24Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Map_04_thumbnail for map making tut&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map_04_thumbnail for map making tut&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=File:Map02_thumb.jpg&amp;diff=8334</id>
		<title>File:Map02 thumb.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=File:Map02_thumb.jpg&amp;diff=8334"/>
				<updated>2009-11-27T08:14:21Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Map_02_thumbnail for map making tut&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map_02_thumbnail for map making tut&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=File:Map01_thumb.jpg&amp;diff=8333</id>
		<title>File:Map01 thumb.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=File:Map01_thumb.jpg&amp;diff=8333"/>
				<updated>2009-11-27T08:13:23Z</updated>
		
		<summary type="html">&lt;p&gt;Arixsus: Map_01_thumbnail for map making tut&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Map_01_thumbnail for map making tut&lt;/div&gt;</summary>
		<author><name>Arixsus</name></author>	</entry>

	</feed>