One very important element of module creation is movement between areas. Several complete areas have been provided along with the D’jinni Editor by the authors of The Witcher. These include exterior as well as interior areas. In our module, the first area (the cave) has already been created. However, it lacks both an entrance and an exit.
The entrance to the cave should probably be from some exterior terrain, for example a forest or a swamp. In our example module a slightly different approach will be taken. The next area we’ll add will be a cave. Of course, there will be a passageway between the two areas. That way Geralt (the player) can move from one cave to the next and vice versa. Actually, from the player’s perspective, nothing much happens. The player thinks he is moving from one area to another. From the standpoint of the person creating the module, however, things are a bit different – the player is teleported from one area to another. To cross from one area to the next, two elements are needed: a door or trigger from which the player is teleported and the waypoint at which the player arrives.
First let’s add the second area. Since instruction on how to add a layer have already been discussed in detail, we’ll just have a quick review here. Right-click on the Areas tree in the Module Explorer window and select New Area from the menu:
Go to the Data\Meshes\G31 folder, select the g31.set file and click Open. The same cave area that we used for the first area will be added here. In the Enter New Area Name window, enter g31_newcave and click OK. The new area will appear in the Module Explorer window:
Open the g31_newcave (EMPTY) tree and double-click on Edit Area. Then, in the Area loading mode window, click on Entire geometry. This opens the Area Editor window.
Now add a waypoint somewhere in the cave. To do this, click on the downward arrow located next to the waypoints tool and choose Select new Waypoint template from the menu. Then open the Waypoints tree and double-click on m0_wp_standard:
Click on the location where this waypoint is to be added. In this example, we’ll add the waypoint to the largest space of the cave:
Double-click on the new waypoint. A Properties window containing the waypoint’s attributes will open on the right side of the screen. Enter second_cave in the Tag attribute of the General section. To change the setting, click on the right-hand column opposite the Tag attribute, entering the appropriate text and press ENTER:
Remember this waypoint tag because you’ll need it later. Using this tag, the game knows where the player should teleport. Important: In order for teleportation to work, both the point of origin and destination must have the same name.
Assign a name to the new area. To do so, double-click on Area Properties in the g31_newcave (EMPTY) tree. An Area Properties window will appear on the right side of the screen. Type in second cave in the right-hand column opposite the Name attribute under the General section and press ENTER.
That’s all that has to be done in this area. Let’s save the changes to the module. To do so, select Save Module from the Module menu:
Now let’s edit the old cave. Double-click on Edit Area in the g31_cave (Cave) tree. Create a rectangular trigger near the player's location. In this example, the trigger will become a passage between two locations.
Doors can also be used to move between areas, but can only be placed in certain locations. If you want to make a passageway leading from a city street into a building, for example, you need to use a door template. Every building asset includes pre-defined doors, inserted by the creators of The Witcher wherever a building contained multiple areas between which players could move. In order to add a door, select New -> Template > Door (.utd) from the File menu.
For our cave a door isn’t appropriate. Instead, click on the downward arrow located next to the trigger tool on the Area Editor Toolbar. Select new Trigger template from the menu, open the Triggers tree and double-click on m0_tr_standard:
Using the tool, form a rectangle as was described earlier in the manual, clicking on all the appropriate places. Connect the last point with the first to create the new trigger:
Double-click on the new trigger in the Module Explorer. Now we need to set the attributes of the trigger.
• Name. Enter Passageway to the next cave. This phrase will appear during the game when the player hovers the cursor over the trigger. If a door has been used as the transition point, the phrase will appear on the door.
• Type. Set this attribute to Area transition. The game will now know that this trigger serves as a passageway to another area.
Area transition Section:
• Destination tag. Enter second_cave in this attribute. This attribute determines the destination to which the player will be transferred. Remember that this tag has to match that of the destination point. In our case, the second point we added to the new cave has exactly that name.
That’s it on modules and areas. Let’s save the module. As a reminder, select Save Module from the Module menu.
If the module was run now and Geralt (the player) entered the trigger, he would be transported to the second cave. He would be enveloped by darkness, however, as we didn’t add any lighting to the second area.