<?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=GameVoid</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=GameVoid"/>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/wiki/Special:Contributions/GameVoid"/>
		<updated>2026-06-16T21:23:03Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.6</generator>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Area_tutorial&amp;diff=8892</id>
		<title>Area tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Area_tutorial&amp;diff=8892"/>
				<updated>2009-12-16T17:25:22Z</updated>
		
		<summary type="html">&lt;p&gt;GameVoid: /* Creating the area */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Creating the area ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have created a new module (see [[creating a module]]), the first thing you will likely want to do is create one or more areas where your adventure is going to be set. There are several ways to reach the &amp;quot;new area&amp;quot; command; you can right-click on the resource palette window, or select &amp;quot;new&amp;quot; from the file menu.&lt;br /&gt;
&lt;br /&gt;
[[Image:New resource.png|thumb|center|New resource menu]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br clear=&amp;quot;all&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Areas are represented with the [[Image:IconArea.png]] icon. When you select it you'll be presented with a &amp;quot;Create New Resource&amp;quot; window:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Create new resource.png|center|]]&lt;br /&gt;
&lt;br /&gt;
{{sidebox|&lt;br /&gt;
* Resref names should be useful to the designer&lt;br /&gt;
* Set the &amp;quot;area layout&amp;quot; property to assign terrain to an area&lt;br /&gt;
* &amp;quot;Resource Name&amp;quot; and &amp;quot;Tag&amp;quot; are only seen by developers&lt;br /&gt;
* &amp;quot;Name&amp;quot; may be seen by players&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Most of the fields are already filled in with good defaults for the module you're working with. You'll need to supply a &amp;quot;ResRef Name&amp;quot;, which is the name by which the resource will be known internally to the toolset. (This is the &amp;quot;Name&amp;quot; field on the &amp;quot;Create New Resource&amp;quot; dialog box.) You'll probably want to use a name that will remind you, the module designer, of the purpose or important features of the area. Changing a resource's name is difficult to do later. We're going to call the first area of the tutorial &amp;quot;hut_exterior&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
After creating the area you'll be presented with a completely blank area editor. There will be no environment or objects of any kind. To specify what environment you'll be placing objects into, open the object inspector and select the &amp;quot;Area Layout&amp;quot; property. There will be an ellipsis button ([[Image:ellipsis.png]]) in the property's data field that will bring up a resource selection window where you can select an environment to use for this area. The environment we wish to select is in the area layout file &amp;quot;ost101d.arl&amp;quot;. Once we select it, the area layout appears in the main area window.&lt;br /&gt;
&lt;br /&gt;
The resource's internal resource name is hut_exterior but the player will not see this when he's playing the game. To give the area a name meaningful to the player we'll set the &amp;quot;Name&amp;quot; field to &amp;quot;Deep in the Swamp&amp;quot;. All of the other defaults are fine for now, we will leave them as is.&lt;br /&gt;
&lt;br /&gt;
[[Image:Area tutorial 1.png|thumb|600px|center]]&lt;br /&gt;
&lt;br /&gt;
== Area Basics ==&lt;br /&gt;
{{sidebox|&lt;br /&gt;
* See [[3D control]] for camera and movement controls&lt;br /&gt;
* You can double-click on an object in the area's object list to zoom in to it.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Moving the view around inside the area layout can be somewhat non-intuitive and frustrating at first. The toolset has a number of different control schemes it can be set to; see [[3D control]] for a summary of the various options. By default, you can:&lt;br /&gt;
&lt;br /&gt;
* zoom in and out by using the mouse wheel&lt;br /&gt;
* rotate the camera around the target it's focused on by holding the middle button down or by holding down the Ctrl key and the right mouse button while moving the mouse&lt;br /&gt;
* translate the camera by holding down the Ctrl key and the left mouse button while moving the mouse&lt;br /&gt;
&lt;br /&gt;
To see where you are a bit better, it is helpful to deactivate real lighting or turn on full brightness.  Above the area viewer, the sun-like button should be toggled so that it isn't highlighted; see [[Area]] for a more complete summary of various options within the Area Editor.&lt;br /&gt;
&lt;br /&gt;
Sometimes the Area Editor may show your level as a wireframe when you create it. You can switch from a wireframe view to a normal view by going to the View menu and choosing View/Environment/Render Mode/Normal.&lt;br /&gt;
&lt;br /&gt;
Before we move along to placing a starting location, it is important to touch upon Pathfinding points.  All BioWare areas include walkmesh or pathfinding information.  To view pathfinding information for your area, goto View, then Environment, and then toggle Pathfinding Points on.  The green dots represent areas where characters can walk.  Note, in this map, the area that is walkable is quite small compared to the entire area.  When placing your starting location, you should ensure it is in a walkable portion of the area.&lt;br /&gt;
&lt;br /&gt;
== Setting the start point ==&lt;br /&gt;
&lt;br /&gt;
{{sidebox|&lt;br /&gt;
* Create a waypoint to mark where the player starts the game&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is going to be the starting area for the adventure, so we're going to want to define a spot within the area where the player will first appear. This is done by setting a [[waypoint]]. Waypoints are very simple objects that mark locations in an area that other objects in the game can refer to; they are not normally visible to the player. To create a waypoint, right-click somewhere in the area and select &amp;quot;Insert Waypoint&amp;quot; from the resulting menu. A waypoint will appear at the location of your mouse pointer and follow it around along the area's floor; move it to the approximate place you want to have the player appear and left-click to place it. By default the waypoint is named &amp;quot;Waypoint&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The waypoint will be automatically selected, indicated by a yellow wireframe box surrounding it. You'll also see the waypoint listed in the area's object list, to the left of the display window. If you lose track of the waypoint later a good way to find it again is to right-click on the waypoint in the list and select &amp;quot;Zoom to Object&amp;quot; in the resulting menu or double click on its tag to center the object in the display window. The waypoint's properties will be shown in the object inspector. We want to change the waypoint's name to something more informative, in this case to &amp;quot;start&amp;quot;. More importantly for the game itself, though, we'll also want to change the waypoint's tag to &amp;quot;start&amp;quot; (it defaults to blank). An object's tag is how scripts and other resources will refer to the waypoint. Since this particular waypoint is never going to be visible to the player it's likely that the waypoint's name will never be seen at all.&lt;br /&gt;
&lt;br /&gt;
The player will also start out facing in the same direction that the waypoint is facing (indicated by the arrow-shaped base of the waypoint object). If we don't want the player to start out facing in the default direction, we'll want to rotate the waypoint to point in a new direction. To rotate an object, use the toolbar to switch from standard selection mode ([[Image:Standard selection mode.png]]) to 3-axis rotation mode ([[Image:3 axis rotation mode.png]]). &lt;br /&gt;
When you select the waypoint in this mode you'll see a set of circles around the waypoint's base with various orientations; clicking and holding the mouse button on one of them will allow you to rotate the waypoint around its center.&lt;br /&gt;
&lt;br /&gt;
[[Image:Waypoint rotation.png|center]]&lt;br /&gt;
&lt;br /&gt;
Now that we have an area and a waypoint to start at, we can now tell the module that this is where the player is to appear. Reopen the &amp;quot;Manage Modules&amp;quot; window (available via a command under the File menu), select your module, and click the &amp;quot;Properties&amp;quot; button. This opens the module's properties. For the &amp;quot;Starting Area&amp;quot; property, click on the ellipsis button ([[Image:ellipsis.png]]) and select the starting area from the areas available in the module; since we've only put one area in so far &amp;quot;hut_exterior&amp;quot; will be the only available option. Once the area has been selected we can then select the starting waypoint from the waypoints currently placed in the area. Note that the list will show waypoint tags rather than names. Again, we've only put in one so this will be easy. You can also set the player to appear at the origin of the map (coordinates 0,0,0), but this is generally a poor choice and available only as a default in case there are no waypoints defined yet.&lt;br /&gt;
&lt;br /&gt;
== Area transitions via doors ==&lt;br /&gt;
&lt;br /&gt;
Adventures almost always have more than one area in them, so we'll create a second area to demonstrate travel between the two. The area &amp;quot;hut_interior&amp;quot; will use area layout ost102d, which is a cosy little room that represents the interior of the small hut present in the hut_exterior area.&lt;br /&gt;
&lt;br /&gt;
{{sidebox|&lt;br /&gt;
* [[Door]]s are special placeables&lt;br /&gt;
* Doors can attach to &amp;quot;hooks&amp;quot; pre-built into the area layout&lt;br /&gt;
* Area transition doors use a different &amp;quot;appearance&amp;quot; than within-area doors&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next we will need to create some doors. We'll create a default door placeable using the &amp;quot;New Placable&amp;quot; command, reached in a similar way as the &amp;quot;New Area&amp;quot; command explained earlier (placeables will be covered in the [[Placeable tutorial]], but the core game resources will come with a variety of default doors usable in many situations like this) and place it in the area near the empty doorframe built into the hut's exterior. For an area transition, use one of the &amp;quot;Area Transition&amp;quot; appearances for the door. To place the door, click on it in the palette; the mouse cursor will turn into a crosshair; then click in the area viewer near the doorframe.&lt;br /&gt;
&lt;br /&gt;
As a side note, if you accidentally use one of the standard door appearances it won't work as an area transition: the door will simply swing open when clicked on instead. Each standard door appearance has a matching area transition door appearance in the resource database so this can be an easy mistake to make, but it's also easily correctable - just go back to the door's placeable resource and swap in the correct appearance, and all copies of that door in use throughout your game will be updated. The &amp;quot;Area Transition&amp;quot; doors are at the top under the Appearance list, e.g. &amp;quot;Area Transition, Ferelden Small&amp;quot; as apposed to &amp;quot;Door, Ferelden, Small&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
You may notice that when the door you placed in the area is selected a small blue sphere will appear at one edge in addition to the yellow wireframe bounding box. This is the door's &amp;quot;hook&amp;quot;. Area layouts come with hidden &amp;quot;hooks&amp;quot; pre-installed to place doors on, and doors have matching hooks of their own. If you click on the blue sphere it will turn red, and all of the compatible door hooks built into the area's layout will appear. The following image illustrates this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Door with door hook selected.png|400px|center|thumb|Drag the red sphere near to the blue sphere to automatically position the door]]&lt;br /&gt;
&lt;br /&gt;
To hook a door up with its frame, simply click and drag the door's hook to a location very close to the matching frame hook. You don't need to get the positioning exact; if the two hooks are close enough together when you release the mouse button they'll automatically snap together. The door will be positioned and reoriented to fit correctly into the frame. Make sure you're still in the 'Standard Selection' mode ([[Image:IconStandardSelection.png]]) for the snap to occur, if you're in the more advanced 3 Axis Movement tool, the snap will not happen.&lt;br /&gt;
&lt;br /&gt;
Note that door hooks are only there to make it easy to get exact matches on frames and walls that need a snug fit, to ensure that Artists and Designers don't have to spend a lot of time putting it in place. Doors will function just as well off of hooks as on them.&lt;br /&gt;
&lt;br /&gt;
{{sidebox|&lt;br /&gt;
* Area transition effect is defined in the door's &amp;quot;Variables&amp;quot; property&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next, we'll tell the game engine that the door is an area transition door and that when the player clicks on it he will be transported to another area of the game. This is done by setting two of the door's [[variable]]s. Select the door (either in the area's object palette or directly in the main display window) and right-click on it, selecting &amp;quot;properties&amp;quot; from the resulting menu. This will open the door's properties in the Object Inspector window. Select the &amp;quot;Variables&amp;quot; property and click on the ellipsis ([[Image:ellipsis.png]]) button. This will open up the variable browser for that particular instance of the door object.&lt;br /&gt;
&lt;br /&gt;
There are two key variables in this list that we'll need to set:&lt;br /&gt;
&lt;br /&gt;
*PLC_AT_DEST_AREA_TAG - tag of the destination area&lt;br /&gt;
*PLC_AT_DEST_TAG - tag of the destination waypoint within the destination area. This is a waypoint that you must add. It is NOT added automatically when you create the door.&lt;br /&gt;
&lt;br /&gt;
Once we've set these the door will become an area transition door, and when the player interacts with it they'll be transported to the target area.&lt;br /&gt;
&lt;br /&gt;
The destination area is &amp;quot;hut_interior&amp;quot;. We'll create a waypoint just inside the hut's interior door, tagged &amp;quot;hut_door_interior&amp;quot;, to serve as the place where the player appears.&lt;br /&gt;
&lt;br /&gt;
Here is how the exterior door's variables should look:&lt;br /&gt;
&lt;br /&gt;
[[Image:Area tutorial door variables.png|frame|center|Area transition door's variables]]&lt;br /&gt;
&lt;br /&gt;
And here is the interior door, with the destination waypoint:&lt;br /&gt;
&lt;br /&gt;
[[Image:Area tutorial interior door.png|frame|center|Interior door with destination waypoint]]&lt;br /&gt;
&lt;br /&gt;
The interior door is set up in the same manner, with a destination area of &amp;quot;hut_exterior&amp;quot; and a matching destination waypoint of &amp;quot;hut_door_exterior&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{sidebox|&lt;br /&gt;
* Use invisible area transition &amp;quot;doors&amp;quot; when the transition is already built into the area layout art&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you want to create an area transition that doesn't look like a door, or is otherwise already represented by the level art, you can use an invisible 'door' instead. Appearances for these invisible placeables are named &amp;quot;Area Transition, Invisible&amp;quot;. Set its variables the same way as was done for the visible door.&lt;br /&gt;
&lt;br /&gt;
[[Image:Area Transition, Invisible.png|frame|center|Invisible area transition]]&lt;br /&gt;
&lt;br /&gt;
The player won't see this 'door' in the game, but when he moves the mouse pointer over it it will change to signify that an area transition lies there and it can be right-clicked to be activated just like a visible door.&lt;br /&gt;
&lt;br /&gt;
== Area transitions via triggers ==&lt;br /&gt;
&lt;br /&gt;
{{sidebox|&lt;br /&gt;
* Triggers use variables with a different prefix for setting their area transition effect&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Finally, you can also create an area transition that triggers automatically when the player walks into a predefined area. This is done using [[trigger]]s. ([[Image:IconTrigger.png]]) You'll first have to create a trigger resource, much like how you had to create a placeable door earlier, but trigger resources are much simpler and for area transitions you won't need to change any of the defaults. Create a default trigger with &amp;quot;New -&amp;gt; Trigger&amp;quot; (either by right-clicking the resource palette or from the File menu) and give it an informative name such as &amp;quot;trigger_area_transition&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Go back to your area map, select the trigger from the resource palette, and then click on the map to define the corner points of the area the trigger will occupy. Double-click the last vertex to complete the polygon. A trigger can have any number of vertices, and vertices can be moved, added, or deleted after the trigger is created so don't worry if you don't get it exactly right. Note that the blue plane the trigger uses to show the enclosed area will pass through the ground and may not be entirely visible in the toolset, but it extends infinitely upward so the trigger will still take effect if the player enters its boundaries.&lt;br /&gt;
&lt;br /&gt;
To set the trigger's destination, you'll find a familiar pair of variables in the trigger's default variable table:&lt;br /&gt;
&lt;br /&gt;
*TRIGGER_AT_DEST_AREA_TAG - tag of the destination area&lt;br /&gt;
*TRIGGER_AT_DEST_TAG - tag of the destination waypoint within the destination area&lt;br /&gt;
&lt;br /&gt;
(Note the prefix &amp;quot;TRIGGER&amp;quot; instead of &amp;quot;PLC&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Below is an example where we've placed both a trigger and an invisible door across a pathway. Note that this is redundant, only one or the other is really needed. For most purposes a placeable area transition is probably best. (''It is worth noting that placeable area transitions prompt a popup asking the player if they want to transition when bumped, but not when clicked upon - effectively acting as either a door or a trigger.'') The waypoint shown is the arrival spot for the player when coming in from the other side; note how it's placed outside the trigger area, allowing the player to immediately back up and retreat through the area transition if he chooses. &lt;br /&gt;
&lt;br /&gt;
[[Image:Area Transition, invisible with trigger.png|center]]&lt;br /&gt;
&lt;br /&gt;
== Grouping Placeables ==&lt;br /&gt;
&lt;br /&gt;
{{sidebox|&lt;br /&gt;
* Two or more placeables can be grouped together using Associations.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Often the placeables within an area are related. For example, a firepit placeable probably has an associated sound emitter. The toolset needs to be told that these two objects are related. &lt;br /&gt;
&lt;br /&gt;
# Create a new Placeable and change its &amp;quot;Appearance&amp;quot; to &amp;quot;Firepit (Dialog)&amp;quot;, then place it in your area. Remember that if you can't see the new placable, make sure you have the correct module open.&lt;br /&gt;
# Next, click on the musical note icon in the Palette for &amp;quot;Sounds&amp;quot;. &lt;br /&gt;
# In the folder tree, go to global_amb_fade &amp;gt; 3D_placeables &amp;gt; 3d_emitter and select the amb_ext_smfire1_lp and place the emitter in your area.&lt;br /&gt;
# Right-click on the firepit to bring up the menu and choose &amp;quot;Add Associated object.&amp;quot; The cursor changes to a cross-hair. &lt;br /&gt;
# Click on the sound emitter placeable. &lt;br /&gt;
&lt;br /&gt;
Now when you drag the firepit placeable around the area, the sound emitter will automatically follow. Use the &amp;quot;Managed Links&amp;quot; menu item if you want to remove an association. Note that associations are uni-directional; you can still move the sound emitter without moving the firepit. Examples of other useful associations: a table and all of the items on top of the table, a table surrounded by chairs, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Sound ==&lt;br /&gt;
&lt;br /&gt;
Sounds are placed using the Area Editor. For more details see [[Sound]]. &lt;br /&gt;
&lt;br /&gt;
[[Category:Areas]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>GameVoid</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Level_Editor_Tutorial&amp;diff=8891</id>
		<title>Level Editor Tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Level_Editor_Tutorial&amp;diff=8891"/>
				<updated>2009-12-16T15:21:14Z</updated>
		
		<summary type="html">&lt;p&gt;GameVoid: Just some minor clean up and spelling corrections.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Building your room (Interior Level)=&lt;br /&gt;
How to create/lightmap a [[Level]] for use in an Interior [[Area]]:&lt;br /&gt;
Objective: Following along with this tutorial, you should be able to create a simple room from scratch in 10 minutes or less&lt;br /&gt;
&lt;br /&gt;
 This was lifted from a posting by St4rdog http://social.bioware.com/forum/1/topic/8/index/150840&lt;br /&gt;
 It needs some additional formatting love, but is as good starting place for people to create usable &lt;br /&gt;
 interior levels&lt;br /&gt;
&lt;br /&gt;
File &amp;gt; New &amp;gt; Level &amp;gt; Room Level&lt;br /&gt;
&lt;br /&gt;
* Click on &amp;quot;New Area&amp;quot; in top-left list &amp;gt; Object Inspector in bottom-right &amp;gt; Layout Name &amp;gt; anything under 8 characters no spaces or special characters (*,&amp;amp;,%, etc).&lt;br /&gt;
&lt;br /&gt;
*Right-click in 3D view and select Insert &amp;gt; New Room.&lt;br /&gt;
*Click Models (blue box) in the Palette in the top-right. These folders contain everything such as floor tiles, walls, etc.&lt;br /&gt;
*Enable Grid Snap with the magnet icon to make sure they line up.&lt;br /&gt;
*The &amp;quot;prp&amp;quot; folder contains things like beds/barrels to clutter your Level.&lt;br /&gt;
 Hint: Use [[DATool]] (3rd party tool downloadable at http://social.bioware.com/project/41/ )to browse &lt;br /&gt;
 through these quickly to find the floors/walls you want.&lt;br /&gt;
&lt;br /&gt;
 Note: If you get &amp;quot;Cannot spawn models into the selected parent object&amp;quot; when trying to place a model &lt;br /&gt;
 then you don't have &amp;quot;New Room&amp;quot; selected.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Working with multiple rooms==&lt;br /&gt;
&lt;br /&gt;
In general it is best to define each building room as a new room in the level. This becomes important when you work on lighting. To physically connect rooms you need to slide them together to get the doors to line up, they do not line up automatically. It takes some trial and error but becomes easier with practice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding lights==&lt;br /&gt;
&lt;br /&gt;
* Right-click on &amp;quot;New Room&amp;quot; in top-left list &amp;gt; Insert &amp;gt; New Light&lt;br /&gt;
&lt;br /&gt;
* Move it up off the floor a little. In Object Inspector &amp;gt; &amp;quot;Color&lt;br /&gt;
Intensity&amp;quot; 2 or more &amp;gt; &amp;quot;Light Type&amp;quot; Point - Static (lc) &amp;gt; Choose&lt;br /&gt;
any bright color.&lt;br /&gt;
&lt;br /&gt;
*Copy and paste. In Object Inspector &amp;gt;&amp;quot;Light Type&amp;quot; Ambient - Baked (this light stops your shadows being pitch&lt;br /&gt;
black) &amp;gt; Choose a dark blue colour and keep the Color Intensity under 2/3.&lt;br /&gt;
&lt;br /&gt;
 Note: I'm not sure what the mix of Baked/Static light is supposed to be. &lt;br /&gt;
 If you just put a Baked + Ambient it complains about not having Static, but if &lt;br /&gt;
 you put a Static + Ambient it seems to work fine, but the wiki says Static is &lt;br /&gt;
 the most expensive.&lt;br /&gt;
&lt;br /&gt;
==Rendering Lightmaps==&lt;br /&gt;
&lt;br /&gt;
*Press the Render Lightmaps icon (you need ActivePython 2.5 installed to default location). When it's done click the Display&lt;br /&gt;
Lightmaps On/Off icon in the top-left to refresh the results.&lt;br /&gt;
*Uncheck the &amp;quot;View Models Fully Lit&amp;quot; icon in the lop-left. You should see shadows from any objects you've dropped in.&lt;br /&gt;
&lt;br /&gt;
 Note: Lightmap-atlas messages might appear the first time you render. That seems normal.&lt;br /&gt;
 Sometimes re-rendering the lightmaps messes them up badly when Display Lightmaps On/Off is on. It &lt;br /&gt;
 doesn't seem to use the latest lightmaps. Try pressing Display Lightmaps On/Off a few times to &lt;br /&gt;
 update it. If they're still messed up sometimes one of these fixes it (don't know which)&lt;br /&gt;
 unloading/reloading your Area or Level/changing your Area's layout property/posting your Level to &lt;br /&gt;
 Local.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Exporting==&lt;br /&gt;
&lt;br /&gt;
*Press the Do All Local Posts icon to the right of the lightmapping icons. It will export the name you typed into the &amp;quot;New Area&amp;quot; &amp;quot;Layout Name&amp;quot;. If there's a complaint about walkable/player start then delete your old start then place a new one on a flat area.&lt;br /&gt;
&lt;br /&gt;
*Save your .lvl file. It's not used by the game and the name/location doesn't matter. Only the exported/posted files are used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using this in an Area==&lt;br /&gt;
&lt;br /&gt;
File &amp;gt; New &amp;gt; Area &amp;gt; Any Name&lt;br /&gt;
&lt;br /&gt;
*In the Object Inspector &amp;gt; Area Layout you should get a &amp;quot;...&amp;quot; box (make sure it's Checked Out) &amp;gt; click then select your &amp;quot;Layout Name&amp;quot; which should now be there.&lt;br /&gt;
&lt;br /&gt;
* Now you have a pretty lightmapped level inside an area.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Building your terrain (Exterior Level)=&lt;br /&gt;
How to create/lightmap a [[Level]] for use in an Exterior [[Area]]:&lt;br /&gt;
Objective: Following along with this tutorial, you should be able to create a simple terrain from scratch.&lt;br /&gt;
&lt;br /&gt;
File&amp;gt;New&amp;gt;Level&lt;br /&gt;
&lt;br /&gt;
* Choose Terrain (Landscape) Level and then click Next.&lt;br /&gt;
&lt;br /&gt;
* Accept the default values for the purpose of this tutorial and click Next and then click Finish. You can learn more about what the different terrain options do at the [[Level editor]] page.&lt;br /&gt;
&lt;br /&gt;
You should now see a flat, dark piece of terrain. To move around you hold down the mouse wheel. If you want to rotate the view press the Alt key while holding down the mouse wheel. You will want some light so you can see what you are doing, so we will generate a light source next.&lt;br /&gt;
&lt;br /&gt;
Tip: When choosing the size of your terrain level think about where you are going to put horizon and vista objects, like distant mountains and tree lines. You may need to allow for extra space around your adventure area to place those items.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Grid Size==&lt;br /&gt;
&lt;br /&gt;
If you want to work with a larger grid than the one provided by default you can change the grid size by going to: &lt;br /&gt;
&lt;br /&gt;
Tools/Options/Level Editor/Grid Square Size.&lt;br /&gt;
&lt;br /&gt;
This will not change the actual dimensions of the terrain level that you created, it only changes the size of the squares in the grid.&lt;br /&gt;
&lt;br /&gt;
==Define an area==&lt;br /&gt;
&lt;br /&gt;
Must be done before rendering the lightmap.&lt;br /&gt;
&lt;br /&gt;
* Click on the purple +-sign and click Define Area. Start in one corner and draw the green square to define the area that you will export.&lt;br /&gt;
* Fill in the box Layout Name, max seven characters.&lt;br /&gt;
* Fill in the box Name.&lt;br /&gt;
&lt;br /&gt;
==Lighting==&lt;br /&gt;
&lt;br /&gt;
* Right click on Terrain World to the upper left and choose Insert&amp;gt;New Light. This will spawn a light source in your area.  Make sure you change the Light Type to Ambient - Baked (L).  Be sure to click on the Render Lightmaps button if you want to see how your ambient light is working.&lt;br /&gt;
&lt;br /&gt;
Now that the terrain is lit we can modify it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modifying Terrain==&lt;br /&gt;
&lt;br /&gt;
The [[Terrain mesh]] tools allow you to modify the terrain by changing elevations, smoothing edges, flatting terrain, or painting textures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Water==&lt;br /&gt;
&lt;br /&gt;
Please note that as of build 1.0.982.0 water is broken.  You can see it in editor, but it is not making it into the game.&lt;br /&gt;
&lt;br /&gt;
First use the [[Terrain mesh]] tools to make a hole.  It doesn't have to be deep.  Then right-click on Terrain world and select Insert -&amp;gt; New Water Mesh.  Double Click on the Water Mesh to zoom to it.  By default it gets placed in a corner.  Using the 3 Axis Movement tool [[File:moveTool.png]] grab the water and drag it to your hole.  Depending on the size of the hole, you might have to adjust the water mesh size by changing the Size X and Size Y property values.  Once you have the mesh placed, it's time to create the light probe.  Right-click near the water mesh and select Insert -&amp;gt; New Light Probe.  Using the move tool again, drag the light probe so that is roughly centered over the water mesh and slightly above it.  Click on Render Lightmaps, then Render Light Probs.  You might have to toggle Display Lightmaps, but you should now see your water looking like water and reflecting things around it.&lt;br /&gt;
&lt;br /&gt;
==Placing Models==&lt;br /&gt;
&lt;br /&gt;
* Click the blue box in the Palette Window to access the models that come with the game. The [[Model list]] shows pictures of many of the models available.&lt;br /&gt;
&lt;br /&gt;
* The [[Model]] page has more details on how to work with models.&lt;br /&gt;
&lt;br /&gt;
Tip 1: I had to change the Snap Options to make the models go where I wanted them. The settings I use were 0.10 for Snap to Grid and Snap Z Size. I also had to turn off Enable Snap to Surface whenever I wanted to change the vertical position of something (like creating the second floor of a building). Enable Snap to Surface is not applied globally, so once you turn it off and position an object vertically, turning it back on will not move that object unless you select it (or have it selected when you turn it back on).&lt;br /&gt;
&lt;br /&gt;
Tip 2: When placing premade cottages be aware that the door frames you can see attached to those buildings DO NOT have built in door hooks (see [[Area tutorial]] for information on placing doors). You can place a door frame model (for example, fhe_doorfrs_0) over the built in door frame to generate a door hook. The door frame model has to be placed from the Level Editor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Adding Vegetation and Wind==&lt;br /&gt;
&lt;br /&gt;
The [[Vegetation]] page includes a list with pictures of the various plants available for placement. If you do not see the plants once you place them with the Scatter Object Tool then you may need to adjust your SpeedTree Rendering Distance Selector. This is a drop-down that you will see in the Tool Bar. It lists the distances at which plants will be visible. I set it to Very Far and left it there.&lt;br /&gt;
&lt;br /&gt;
Each level can have one active wind object in it. The location of the wind object doesn't matter. The wind object defines how wind behaves on this level, which is used for such things as flapping banners and swaying trees.&lt;br /&gt;
&lt;br /&gt;
Image:Level editor wind object.png &lt;br /&gt;
&lt;br /&gt;
The Wind Object may be found by right clicking on Terrain World and selecting:&lt;br /&gt;
&lt;br /&gt;
Insert&amp;gt;New Wind Object&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Visual Effects (VFX)==&lt;br /&gt;
&lt;br /&gt;
Placeable visual effects like flames or smoke are considered to be art assets in the Dragon Age toolset, so you need to place them from within the Level Editor. &lt;br /&gt;
&lt;br /&gt;
The [[VFX Tutorial]] provides guidance on creating and placing visual effects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Path finding and Obstructions==&lt;br /&gt;
&lt;br /&gt;
The path finding process lays down a grid of points that are marked &amp;quot;accessible&amp;quot; if they can be reached from a path finding start spot via passable terrain. This is essentially a flood-fill algorithm.&lt;br /&gt;
&lt;br /&gt;
You must create an Exportable Area before you can generate any path finding data.&lt;br /&gt;
&lt;br /&gt;
* Click on the purple + in the tool bar. This will open an Area Properties window. The [[Level editor]] page has more details on this process, so I will just keep these steps very basic.&lt;br /&gt;
* Name your Exportable Area in the Layout Name field of the Area Properties window. The name of an exportable area layout is limited to seven characters. BioWare uses the following naming system:&lt;br /&gt;
** Three-letter prefix that describes the region or plot the layout is for. For example, &amp;quot;ost&amp;quot; for Ostagar and environs.&lt;br /&gt;
** Three-digit number that uniquely identifies the layout within that region. Increments of one hundred are commonly used for major areas to allow sub-regions to be grouped together.&lt;br /&gt;
** A single character identifying variants of the layout. For example, a &amp;quot;d&amp;quot; suffix for the &amp;quot;daytime&amp;quot; version of an exterior layout. &amp;quot;d&amp;quot; is also often used to mean &amp;quot;default&amp;quot;, for areas where day and night are irrelevant (deep in a cave, for example).&lt;br /&gt;
* Define your walkable area. Do this by clicking the Define Area button in the Area Properties window. The green box must include any areas that you want players to be able to walk. If you click in a corner of the level the green box will appear there. You can then expand it by dragging the corner.&lt;br /&gt;
* Close the Area Properties window.&lt;br /&gt;
&lt;br /&gt;
In most cases you will want to block off certain areas of your terrain.&lt;br /&gt;
* Turn on the Build Terrain Blocking tool.  It is the middle mountain icon.&lt;br /&gt;
* Using left-click to place and right-click to end chains/delete, place down blocks or 'walls' around areas you don't want the player to enter&lt;br /&gt;
* Be sure to provide visual clues if it isn't obvious why the player can't walk there.&lt;br /&gt;
&lt;br /&gt;
Now that you have your exportable area you can generate path finding data.&lt;br /&gt;
&lt;br /&gt;
* Place a Starting Point in your level. I found that path finding does not work if you place the Starting Point before you have an Exportable Area. To place a Starting Point click on Setup Start Point in the tool bar.&lt;br /&gt;
* Record the name of your Starting Point by clicking on it and looking at the name in the Object Inspector. Do not change the name - changing the name can prevent path finding from working.&lt;br /&gt;
* Click Exportable Area Properties in the tool bar to open the Area Properties window. Put the Start Point name in the appropriate  field and close the window.&lt;br /&gt;
&lt;br /&gt;
You should now be ready to generate pathfinding data by clicking on the Generate Pathfinding for Active Area button in the tool bar.&lt;br /&gt;
&lt;br /&gt;
==Converting Levels into Areas==&lt;br /&gt;
&lt;br /&gt;
Click on Do All Local Posts (you can avoid problems by generating a lightmap and pathfinding before doing local posts). This can be found in the menu at Tools&amp;gt;Export&amp;gt;Do All Local Posts&lt;br /&gt;
&lt;br /&gt;
Your level has now been converted and can be used to make an area. The [[Area tutorial]] will walk you through what to do next.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Tutorials]]&lt;/div&gt;</summary>
		<author><name>GameVoid</name></author>	</entry>

	<entry>
		<id>http://www.datoolset.net/mw/index.php?title=Module_tutorial&amp;diff=8851</id>
		<title>Module tutorial</title>
		<link rel="alternate" type="text/html" href="http://www.datoolset.net/mw/index.php?title=Module_tutorial&amp;diff=8851"/>
				<updated>2009-12-15T17:33:09Z</updated>
		
		<summary type="html">&lt;p&gt;GameVoid: The casual reader might not realize that they need to be following along with the demo module included with the game, adding links to hopefully clear it up a bit.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The simple [[demo module]] that is included with the Dragon Age Toolset is intended to show off a variety of methods that will be commonly used in real stand-alone modules. The documentation on this website will walk you through the major steps required to set it all up, but the [[demo module]] itself also has documentation embedded within it in the form of comments; it is intended to be explored in the designer toolkit and dissected to see how things tick.&lt;br /&gt;
&lt;br /&gt;
One thing that this demo doesn't demonstrate is the art of writing. As such the 'plot' of the adventure is somewhat nonsensical.&lt;br /&gt;
&lt;br /&gt;
This tutorial also assumes that you've read many of the other basic tutorials elsewhere on this site and are familiar with the basic functioning of the toolkit. Links will be provided directing you to more specific information if needed.&lt;br /&gt;
&lt;br /&gt;
== Organization ==&lt;br /&gt;
&lt;br /&gt;
There are two major groups of resources that are used when creating a Dragon Age module; designer resources and art resources. Designer resources are housed in a database whereas art resources take the form of conventional files on your file system.&lt;br /&gt;
&lt;br /&gt;
For your art resources the most convenient approach it is probably to create a directory tree with subdirectories sorting your art resources by what regions of the game they appear in. The directory tree should be someplace easily accessible and with full read/write priviledges - somewhere in your &amp;quot;My Documents&amp;quot; folder is a good place to put them.&lt;br /&gt;
&lt;br /&gt;
In our example we're going to have three areas:&lt;br /&gt;
*A swampy outdoor area with a small tavern in it&lt;br /&gt;
*The tavern's interior&lt;br /&gt;
*An outdoor roadway&lt;br /&gt;
&lt;br /&gt;
=== Naming conventions ===&lt;br /&gt;
&lt;br /&gt;
For the most part the names you give your resources will matter only to you, there are very few situations where the toolset pays attention to the specific form that a resource name takes. So provided you're working on your own, any naming convention that suits your particular style will suffice.&lt;br /&gt;
&lt;br /&gt;
Dragon Age is a large and complex game to create content for, however, so establishing ''some'' form of naming convention and adhering to it from the outset is important to ensure you don't lose track of things later on. A consistent naming system is very useful for debugging and if you later choose to collaborate with other builders it allows you to find your way around other peoples' work without needing to know it intimately.&lt;br /&gt;
&lt;br /&gt;
The convention used in the main Single Player campaign of Dragon Age is as follows:&lt;br /&gt;
&lt;br /&gt;
*Three-letter prefix indicating which large-scale area of the game the resource begins to (particular origin story, prelude, etc)&lt;br /&gt;
*three-digit number unique to a particular area, generally starting with 100 and incrementing in hundreds for major areas. Accessory areas are given numbers within the block of one hundred that their 'parent' area belongs to. &amp;quot;global&amp;quot; resources are often given the number 000.&lt;br /&gt;
*two-letter code indicating what general type of resource it is (for example &amp;quot;ar&amp;quot; for area, &amp;quot;pl&amp;quot; for placeable). A major exception here is event scripts, which have exactly the same name as the resource they're the script for. Dialogue files are also generally named exactly the same as their owner resource.&lt;br /&gt;
*An underscore.&lt;br /&gt;
*The remainder of the name is free-form  and human-readable, a descriptive term to remind you at a glance what the resource is.&lt;br /&gt;
&lt;br /&gt;
Designer resources will have a three-letter extension, much like a regular file system file, but this is not editable and does not frequently come up.&lt;br /&gt;
&lt;br /&gt;
Resources in the designer toolkit can also be placed into folders, again much like a regular file system. Unlike most file systems, though, you don't need to explicitly create a folder in order to put a resource into it. Just edit the resource's &amp;quot;folder&amp;quot; property and if the folder didn't have anything in it before it'll be created automatically. Folders that don't have any resources in them are removed automatically.&lt;br /&gt;
&lt;br /&gt;
Here's a preview of what we're going to put into the demo module, to illustrate how this naming convention looks in practice. We'll be using the four-letter prefix &amp;quot;demo&amp;quot; instead of the usual three-letter one for clarity.&lt;br /&gt;
&lt;br /&gt;
[[screenshot of demo resource palette]]&lt;br /&gt;
&lt;br /&gt;
== Setting up character generation in a new module ==&lt;br /&gt;
&lt;br /&gt;
The most basic steps of creating a new module are described in &amp;quot;[[creating a module]]&amp;quot;. A Dragon Age module, when first created, lacks many very basic components such as the ability to generate a character or an area to start in.&lt;br /&gt;
&lt;br /&gt;
Note that you can actually start creating areas and testing content before you set up character creation if you prefer, the game will provide a player with a simple (and very weak!) default character if character generation isn't performed. You can also override the default starting area and waypoint every time you export for testing purposes, using the &amp;quot;Export Options&amp;quot; found under the &amp;quot;Tools&amp;quot; menu, so you can skip directly to the area you're working on without needing to write debugging scripts.&lt;br /&gt;
&lt;br /&gt;
We're going to follow the flow of the finished game for now, though, so after creating the module the first thing we'll want to do is create a module script that triggers character generation.&lt;br /&gt;
&lt;br /&gt;
Once you've created the initial empty module you'll need to create a module script. We call it &amp;quot;demo_module&amp;quot;. The event that we'll want to handle character generation in is EVENT_TYPE_MODULE_START, which is sent to the module script only once when the game is first started up.&lt;br /&gt;
&lt;br /&gt;
To call the default character generation system, simply have this event call the following functions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
            PreloadCharGen();&lt;br /&gt;
            StartCharGen(GetHero(),0);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
PreloadCharGen causes the game to load up various resources that will be used in character generation, and StartCharGen causes the game to show the character generation GUI to the player.&lt;br /&gt;
&lt;br /&gt;
== Creating our areas ==&lt;br /&gt;
&lt;br /&gt;
This module will be very simple, consisting of only three areas - only two of which will have any signficiant amount of detail. They will be named:&lt;br /&gt;
&lt;br /&gt;
* demo100ar_wilderness&lt;br /&gt;
* demo200ar_tavern&lt;br /&gt;
* demo300ar_road&lt;br /&gt;
&lt;br /&gt;
Three level layouts ([[LVL]] files) are included with the module for use in these areas; ost101d (a swampy wasteland with a small wooden structure), hrt002d (a small tavern interior), and lgt600d (a section of roadway). The naming convention for level layouts used internally at BioWare is specific to the single player campaign, the meaning of these filenames is not relevant to this basic tutorial.&lt;br /&gt;
&lt;br /&gt;
The area editor (and the game itself) cannot use a LVL file directly, it must be compiled into a more efficient form for use. Open up each LVL file in the level editor and, under tools, select &amp;quot;Post to local&amp;quot; to compile the level and export it to an appropriate directory where the game and toolset will be able to find it.&lt;br /&gt;
&lt;br /&gt;
Once you've done this you can select the layout in the area editor's &amp;quot;Area Layout&amp;quot; property field.&lt;br /&gt;
&lt;br /&gt;
== Placing area transitions and setting up the world map ==&lt;br /&gt;
&lt;br /&gt;
See the [[Area tutorial]] for details on how to link areas up with level transitions. The transition from demo100ar_wilderness to demo200_tavern is straightforward and is basically the same as what's shown in that tutorial.&lt;br /&gt;
&lt;br /&gt;
The transition between demo100ar_wilderness and demo300ar_road, however, is going to be handled via the world [[map]] instead. The demo's map is a resource named demo000mp_world.&lt;br /&gt;
&lt;br /&gt;
To create an area transition that sends the player to the world map, set the PLC_AT_DEST_AREA_TAG to the string &amp;quot;world_map&amp;quot;. The placeable_core script recognizes this string as a special override that triggers a map transition by sending the module script an EVENT_TYPE_BEGIN_TRAVEL event.&lt;br /&gt;
&lt;br /&gt;
Note that you can have multiple world maps in a module, but under the default code you can't directly specify which one an area transition will send the player to. Instead, you will need to call the script function WR_SetWorldMapPrimary to specify which world map is the currently active &amp;quot;primary&amp;quot; one. In this demo the code that performs this is also in the EVENT_TYPE_MODULE_START event of the module script, since we only have one map and it only needs to be set as primary once. If you have multiple maps in your module you'll need to call this function again later from some other scripted event to change it.&lt;br /&gt;
&lt;br /&gt;
Here, then, is the complete code for the demo module's EVENT_TYPE_MODULE_START event:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
      case EVENT_TYPE_MODULE_START:&lt;br /&gt;
        {&lt;br /&gt;
            object oMapId = GetObjectByTag(&amp;quot;demo000mp_world&amp;quot;);&lt;br /&gt;
            WR_SetWorldMapPrimary(oMapId);&lt;br /&gt;
&lt;br /&gt;
            PreloadCharGen();&lt;br /&gt;
            StartCharGen(GetHero(),0);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Although the default placeable_core script has code in it to recognize that the &amp;quot;world_map&amp;quot; string should lead to a world transition and generates an EVENT_TYPE_BEGIN_TRAVEL event, the default module_core script doesn't actually do anything with this event. This is because the map transition code used in Dragon Age's single player world map transitions is rather complex and has to handle many special cases that depend on plot elements specific to the single player campaign, so BioWare never implemented a basic default - it would have had to be overridden completely anyway.&lt;br /&gt;
&lt;br /&gt;
Fortunately it's quite easy to add one, though there's a slight hitch; the area transition code needs to be split over two different events.&lt;br /&gt;
&lt;br /&gt;
* In EVENT_TYPE_BEGIN_TRAVEL you'll be able to get the target area and waypoint tags from the event object, and then call the &amp;lt;pre&amp;gt;WorldMapStartTravelling&amp;lt;/pre&amp;gt; function to cause the map to start animating the map trail path the player is following.&lt;br /&gt;
&lt;br /&gt;
* While the map trail animation is playing, the EVENT_TYPE_WORLDMAP_PRETRANSITION event is called. This is the event where you'll want to call the &amp;lt;pre&amp;gt;UT_DoAreaTransition&amp;lt;/pre&amp;gt; function to start the loading process of the destination area. The area will load at the same time that the map trail animation is playing, making the transition seem more seamless for the player. Note, however, that EVENT_TYPE_WORLDMAP_PRETRANSITION's event object ''doesn't'' contain the destination area and waypoint tags as members; you'll need to use local variables in the module's variable table to preserve these strings and pass them on from EVENT_TYPE_BEGIN_TRAVEL.&lt;br /&gt;
&lt;br /&gt;
The basic code to handle map travel, then, is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        ////////////////////////////////////////////////////////////////////////&lt;br /&gt;
        // Sent by: The engine&lt;br /&gt;
        // When: the player clicks on a destination in the world map&lt;br /&gt;
        ////////////////////////////////////////////////////////////////////////&lt;br /&gt;
        case EVENT_TYPE_BEGIN_TRAVEL:&lt;br /&gt;
        {&lt;br /&gt;
            string sSource = GetEventString(ev, 0); //area tag source location&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 (sSource != sTarget)&lt;br /&gt;
            {&lt;br /&gt;
                //store target area's tag to a local module variable&lt;br /&gt;
                SetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;, sTarget);&lt;br /&gt;
                //store target waypoint tag&lt;br /&gt;
                SetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;, sWPOverride);&lt;br /&gt;
                //initiate the map's travelling animation. The engine will&lt;br /&gt;
                //send EVENT_TYPE_WORLDMAP_PRETRANSITION once it's started.&lt;br /&gt;
                WorldMapStartTravelling();&lt;br /&gt;
            }&lt;br /&gt;
        }&lt;br /&gt;
&lt;br /&gt;
        ////////////////////////////////////////////////////////////////////////&lt;br /&gt;
        // Sent by: The engine&lt;br /&gt;
        // When: the world map has begun its &amp;quot;travelling&amp;quot; animation&lt;br /&gt;
        ////////////////////////////////////////////////////////////////////////&lt;br /&gt;
        case EVENT_TYPE_WORLDMAP_PRETRANSITION:&lt;br /&gt;
        {&lt;br /&gt;
            //retrieve the target area tag we stored in EVENT_TYPE_BEGIN_TRAVEL&lt;br /&gt;
            string sArea = GetLocalString(GetModule(), &amp;quot;WM_STORED_AREA&amp;quot;);&lt;br /&gt;
            //retrieve the target waypoint tag&lt;br /&gt;
            string sWP = GetLocalString(GetModule(), &amp;quot;WM_STORED_WP&amp;quot;);&lt;br /&gt;
            //execute the area transition to that target.&lt;br /&gt;
            UT_DoAreaTransition(sArea, sWP);&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We'll need to come back to the module script later on to add some plot-specific code, but for now this is all that's needed to enable a basic adventure to stand on its own.&lt;br /&gt;
&lt;br /&gt;
== Introductory cutscene ==&lt;br /&gt;
&lt;br /&gt;
After the player has finished character generation we play an introductory cutscene for him before the game starts.&lt;br /&gt;
&lt;br /&gt;
The cutscene itself is quite simple, consisting of a few camera movements and an actor (substituted by the player) playing a walking animation. See [[cutscene tutorial]] for how to create a cutscene.&lt;br /&gt;
&lt;br /&gt;
To make it play when the game begins we need to call it at the appropriate time with the CS_LoadCutscene function. The appropriate time has to be after the area that the cutscene is located in as loaded, otherwise the cutscene won't be able to play. The event that's best suited for this is EVENT_TYPE_AREALOAD_SPECIAL, which is called on an area's event script after the area has loaded but before any of the other game systems (AI and so forth) have been enabled. So in this case we want to insert the function call into the area script for the starting area, demo100ar_wilderness. We only want the cutscene to play the first time we enter this area so we've wrapped the function call in a plot flag check;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
case EVENT_TYPE_AREALOAD_SPECIAL:&lt;br /&gt;
        {&lt;br /&gt;
            if (!WR_GetPlotFlag(PLT_DEMO000PL_MAIN, DEMO_INTRO_COMPLETE))&lt;br /&gt;
            {&lt;br /&gt;
                CS_LoadCutscene(R&amp;quot;demo100ct_intro.cut&amp;quot;);&lt;br /&gt;
                WR_SetPlotFlag(PLT_DEMO000PL_MAIN, DEMO_INTRO_COMPLETE,TRUE); //sets the plot flag to ensure we don't repeat the intro cutscene.&lt;br /&gt;
            }&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The main plot file ==&lt;br /&gt;
&lt;br /&gt;
For this demo module, all of the major events relating to the development of the plot are kept track of in the demo000pl_main plot file. This also allows for a centralized place to put scripting that deals with these events.&lt;br /&gt;
&lt;br /&gt;
The plot outline of the demo module is:&lt;br /&gt;
&lt;br /&gt;
#Player encounters the innkeeper outside his inn and speaks with him, receiving the quest to retrieve the innkeeper's sword.&lt;br /&gt;
#Player enters the inn. As he approaches the lever that will open the door to the room the sword is in, the bandit that's taken over the inn initiates conversation with the player. This leads to combat.&lt;br /&gt;
#Player pulls the lever, blowing up the door to the room the sword is in&lt;br /&gt;
#Player retrieves the sword&lt;br /&gt;
#Player returns the sword to the innkeeper, who offers to join the party. A new area also opens up on the world map at this point.&lt;br /&gt;
&lt;br /&gt;
We'll cover each of these events in a separate section of this documentation.&lt;br /&gt;
&lt;br /&gt;
You may also note that many of the constants used in the code have been separated out into a &amp;quot;demo_consts_h&amp;quot; script file, even if they are only currently used in one particular place. This is not strictly necessary, and in fact the toolset doesn't recognize the &amp;quot;_h&amp;quot; suffix as having any special significance; whenever you save an _h script the toolset will try to compile it and complain about the lack of a main() or StartingConditional() function (you can ignore this complaint). However, it makes typos much easier to find and debug, and should you need to change a constant later on this approach ensures that you can always catch every instance of it.&lt;br /&gt;
&lt;br /&gt;
== Giving the player an item ==&lt;br /&gt;
&lt;br /&gt;
The first thing that happens if the player talks to the barkeep and accepts the quest is that the barkeep will give him a key. The key is a &amp;quot;plot item&amp;quot;, meaning it will be shown in a separate section of the player's inventory and can't be given away or destroyed by the player, but the mechanism used here can give the player non-plot items as well.&lt;br /&gt;
&lt;br /&gt;
The function UT_AddItemToInventory takes a resource variable as its parameter. It causes a new instance of the item to be created and added. If you call it multiple times with the same resource, earlier copies won't be affected - multiple copies of the item will be created. You'll see one way of removing an object from the player's inventory at the end of the quest when the innkeeper takes back his sword.&lt;br /&gt;
&lt;br /&gt;
== Using a trigger to initiate conversation ==&lt;br /&gt;
&lt;br /&gt;
We want the bandit and his loyal patrons to attack the player before the lever can be pulled. A trigger has been placed in such a manner that the player will have to pass through it before reaching the lever; the trick is now to use that trigger to make the things we want to have happen, happen.&lt;br /&gt;
&lt;br /&gt;
When a trigger is entered by any entity the trigger's event script is sent an EVENT_TYPE_ENTER event. Note that this is sent ''every'' time the trigger is entered, by ''any'' entity, so the first thing we'll need to do in the event script is a test to ensure that the triggering entity is the player or one of his party members.&lt;br /&gt;
&lt;br /&gt;
The IsPartyMember function tests to see whether an object is player-controllable, which is true for the player's character and for any creature currently in the player's party. We call it on the event's creator to check if this is the right person; if it's not the event script does nothing.&lt;br /&gt;
&lt;br /&gt;
If we wanted the bandit and patrons to simply charge and attack the player, we'd have the trigger call UT_TeamGoesHostile(BANDIT_TEAM); directly (the bandit and patrons' creature templates are all set to the same team so that we don't need to set each one hostile individually). In this case an unexplained attack would be strange, so instead a conversation has been set up that has the bandit and patrons explain themselves before attacking. So we've set the trigger script to call UT_Talk instead.&lt;br /&gt;
&lt;br /&gt;
Once this has been called, we never want the trigger to fire again for anyone. It is important to note that setting a trigger to &amp;quot;inactive&amp;quot; will ''not'' work; an inactive trigger still fires EVENT_TYPE_ENTER whenever an entity enters it. There are several approaches that can be used here:&lt;br /&gt;
&lt;br /&gt;
*Set the event script to check the trigger's active status and not perform any action if it's inactive&lt;br /&gt;
*Use a plot flag to make the code only fire once&lt;br /&gt;
*call Safe_Destroy_Object(OBJECT_SELF, 0); to destroy the trigger entirely&lt;br /&gt;
&lt;br /&gt;
Since there will be no circumstances where we'll need the trigger to become active again in the future, destroying the trigger is the simplest and most foolproof way of accomplishing this.&lt;br /&gt;
&lt;br /&gt;
== Using a placeable to call a script ==&lt;br /&gt;
&lt;br /&gt;
The lever placeable has a &amp;quot;use&amp;quot; option that allows the player to flip it from one state to the other. When this happens an EVENT_TYPE_USE event is sent to the placeable's event script. We've added a custom event script to the lever to intercept this event and do something special; demo200pl_security_lever.nss.&lt;br /&gt;
&lt;br /&gt;
Rather than handling all the details of what should happen when the lever is pulled right in this script, though, we've instead put them into the main plot file's script. The custom placeable script serves only to set the appropriate main plot file flag.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Failure to exit combat mode after defeating the bandits in the inn ===&lt;br /&gt;
&lt;br /&gt;
Try clearing out the folder My Documents\BioWare\Dragon Age\packages\core\override. As of version 1.0.982.0 of the Dragon Age Toolset, the export process deposits certain files to that override folder, which is currently causing conflicts within the game. One immediate indication of this may be that the player character is initially in their undergarments during character generation.&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>GameVoid</name></author>	</entry>

	</feed>