Module and area creation
From Djinni Wiki
[edit] Module creation
Start the D’jinni Editor. In order to create a new module, choose New module (.adv) from the Module menu:
The Module Explorer will open on the left side of the screen:
The window’s content is displayed as a tree. At the moment, all you can see is [new module] and two branches:
- Module Properties – sets the module’s attributes,
- Areas – contains the list of all the areas in this module. At the moment no areas exist, hence the list is empty.
[edit] Area creation
Now we are going to add the first area. To do so, right-click on the Areas branch:
and choose New Area from the menu:
This will open a standard Windows window used for loading files. Go to the Data\Meshes folder. It contains all the available areas created by The Witcher team. Each area is saved in a separated folder. Open the folder which contains the area you’ve chosen. The best, perhaps, would be the cave located in the g31 folder. Enter the folder, select the g31.set file and click on the Open button. Another window will appear. This time it is the Enter New Area Name window:
Enter the name for the area here, but keep this in mind: the name cannot start with a capital letter and you cannot use non-English letters or other signs, like ! @ # $, for example. If you try to use a capital letter or any other invalid sign, you will get this error message:
If you want to enter more than 16 characters, you will also receive an error message:
And, of course, the name must contain at least one letter. Otherwise you will be informed:
In any of the above cases you won’t be able to use the OK button, thus it will be impossible to create a new area. Enter g31_cave as the name and click on OK in the Enter New Area Name window. The area will be added to our module, but in order to see it we have to open the Areas branch in the Module Explorer by clicking on the small ‘+’ sign next to the name:
Now you can see that a new area has been created. The g31_cave branch is located under Areas:
Open the branch containing the new area by clicking on the small ‘+’ sign located next to its name. Now we have a full view of our module and area:
At the moment, the new area contains three sub-branches:
- Area Properties – sets the area’s attributes (do not confuse this with for Module Properties, which is something completely different,)
- Edit Area – edits the area in question,
- Default – default layer of the area.
[edit] Saving your module
We should save our module now before we get to more complicated operations. In order to do that, choose Save Module As… from the module menu:
This will open a standard Windows window used for saving files. Go to the Documents and Settings\username\My documents\The Witcher, where the modules will be saved. Enter our_adventure as the name and click on the Save button.
[edit] Editing an area
Now we can do move on. Let’s start by editing our area. In order to do that, double-click on the Edit Area sub-branch of the area you want to edit:
A new g31_cave window will appear. It contains our area:
[edit] Ambient lighting
If the area is too dark when it loads, you can brighten it up. In order to do so, choose Ambient -> Medium Ambient from the Render menu:
This immediately makes the area brighter:
Of course you don’t change the lighting of the playable area this way, it’s just useful for editing the area. If you were to run your module now, you would be plunged into complete darkness. We’re going to add some light to the area later.
[edit] Navigating an area
Now, a couple of words on how to move through the area while you are editing it:
- Use the ←↑↓→ buttons to move through the area,
- Use the W A S D buttons to move the camera,
- In order to turn, right-click on the area and hold, moving the mouse in the desired direction.
[edit] Adding a Start Point
Now we should add a Start Point. This is the place where Geralt (the player) is going to appear. In other words, it is a place in our module where the game will start. In order to add the Start Point, click on the second icon from the right on the toolbar located above the edited area:
An object representing the Start Point becomes “stuck” to the cursor. Left-click on the spot where you want to place the Start Point and it will be added to the area:
[edit] Layers
The Start Point is always added to the Default Layer. Now would be a good time to go over what layers are.
Imagine a vast area with hundreds of various objects. If you wanted to change something in one of these objects, finding it would take a lot of time and effort if we didn’t have layers. When you create an area, you can add layers and place different objects on different layers, e.g. Spawn Points on one layer and Action Points on another. The next layer might be used for placeables (chairs, tables etc.).
You can hide a layer, so the objects that have been placed on it disappear, but only when you edit the area. They will be still present in the game itself. You can also freeze a layer, so that objects on it cannot be changed (you won’t be able to delete or move them, or to change their properties). Layers make our work with the editor easier. Each newly created area has one Default layer:
This is exactly where we’ve added the Start Point. Remember that it doesn’t matter how many layers there are in the area or which of them is active, the Start Point will be always added to the Default Layer. Actually, our module is ready to be run now, but it would be pointless to do so – firstly, we have no attributes set for either the module or the area. Secondly, our area has no lighting, so it would be completely dark. After all, it is a cave.
[edit] Module properties
Before we add lighting, let’s set the properties of the module. Double-click on the Module Properties branch:
The Module our_adventure properties window appears on the right side of the screen:
The window is divided into two columns. The left one contains the properties, which are divided into the following sections: General, Optimization, Player starting position, Weather, Time and Scripts. In order to switch easily between the sections, you can minimize them by clicking on a small ‘-‘ signs located next to the section names:
When you want to maximize the previously minimized group, click on the small ‘+’ sign located next to that section’s name:
The right-hand column holds the values of the respective attributes. The list is quite long, thus you can scroll up and down using the bar on the right:
Now we are going to set the respective attributes. All will be described along the way.
[edit] General Section
• Name. Contains the name of the module. In order to save the name, click the right-hand column opposite Name. Enter Our adventure in the window that appears:
[edit] Language
You can also choose the language version for the name. Choose this from the following list:
Choose FinalEnglish_Short.
• Tag. Designated for the flags describing the given module. It is mainly used in scripts, which we will talk about later in the manual. In order to enter the text, just click the right-hand column opposite Tag and enter our_adventure.
• Description. Not used.
• Comment. Contains a space in which to write a comment. This is not used by the game, it’s just an information field. You can write whatever you want here, for example information on the module.
• Quest Database list. Assigns a Quest Database to the module. Creating such databases and assigning them to a module is described in another chapter of the manual.
• Quest List. Assigns quests to the module. Creating such quests and assigning them to a module is described in another chapter of the manual.
• Story NPC list. Assign an NPC Spawn Set to the module. Creating such Spawn Sets and assigning them to a module is described in another chapter of the manual.
• Spawnset list. Assigns a common character Spawn Set to the module. Creating such Spawn Sets and assigning them to a module is described in another chapter of the manual.
[edit] Optimization Section
• Cached NSS scripts. Assigns scripts used in the module. These scripts will be loaded with the module (not dynamically, however). Thanks to this our game runs faster, but loading the module may take longer. Scripts are described in another chapter of the manual. In order to assign scripts, click on the small yellow icon located in the right-hand column opposite Cached NSS scripts:
This will open the Resource list window:
At the moment, there are no scripts in the Available resources panel because you haven’t created any yet. But if you want to assign an existing script to the Cached NSS scripts attribute, click on its name in the Available resources panel and then on the ‘<’ button:
The script will then appear in the Added resources panel:
Another way to add a script is to double-click on its name in the Available resources panel. The result will be the same – the script will appear in the Added resources panel. If you want to remove a script from the Added resources panel, double-click on it or simply click on the ‘>’ button:
The script will thus be removed from the Cached NSS script attribute. If you want to assign all the existing scripts (assuming there are several) to the attribute, click on the ‘<<’ button:
A similar operation will remove all assigned scripts. To do so, click on the ‘>>’ button:
If, for any reason, you want to rearrange the scripts in the Added resources panel, all you have to do is to select the given script and click on ‘↑’ or ‘↓’ buttons:
After you’ve added the scripts, click on OK in the Resource list window.
[edit] Player starting position Section
• Entry area. Contains the area with the Start Point. This is updated automatically whenever you change the Start Point, so you don’t have to change anything here.
• Entry position X, Entry position Y, Entry position Z. These three attributes contain the X, Y, Z coordinates of the Start Point located in the given area. These attributes are also updated automatically whenever you change the Start Point. You don’t have to change anything here.
[edit] Weather Section
This is the section of Weather attributes used to determining the weather in the module.
• Minimum weather intensity. Determines the intensity of weather (rain or snow) in the module. This is its minimal value. Enter 0 here. To change the setting, click on the right-hand column opposite the Minimum weather intensity attribute. Press ENTER once you’ve entered the value.
• Maximum weather intensity. Determines the intensity of weather (rain or snow) in the module. This is its maximum value. Enter 0 here. To change the setting, click on the right-hand column opposite the Maximum weather intensity attribute. Press ENTER once you’ve entered the value.
• Chance of rain. Determines whether it’s going to rain in the module. This affects the chance of rain in the module, where 0 means rain will never occur and 100 means it will always be raining. Enter 0 here. To change the setting, click on the right-hand column opposite the Chance of rain attribute. Press ENTER once you’ve entered the value.
• Chance of snow. Determines whether it’s going to snow on the module. This affects the chance of snow in the module, where 0 means snow will never occur and 100 means it will always be raining. To change the setting, click on the right-hand column opposite the Chance of snow attribute. Press ENTER once you’ve entered the value.
[edit] Time Section
This is the section of Time attributes responsible for managing time in the module.
• Minutes per hour. Determines how many minutes of real time will make up an hour in the module. Let’s put 4 here, which means that every 4 minutes of real time will correspond to one hour in the game. In order to enter the value, click on the right-hand column opposite the Minutes per hour attribute. Press ENTER once you’ve entered the value.
• Start day. Determines the starting day of the module, where 1 is Monday and 7 is Sunday. You can put any value from 1 to 7 here. In order to change the value, click on the right-hand column opposite the Start day attribute. Press ENTER once you’ve entered the value.
• Start hour. Determines the starting hour of the module. Enter a value from 0 to 23. In order to change the value, click on the right-hand column opposite the Start hour attribute. Press ENTER once you’ve entered the value.
• Start month. Determines the starting month of the module, where 1 is January and 12 is December. You can put any value from 1 to 12 here. In order to change the value, click on the right-hand column opposite the Start month attribute. Press ENTER once you’ve entered the value.
• Start year. Determines the starting year of the module. You can put any value from 0 to 99 here. If you enter 43, it would mean that you’ve set the year for 1243. In order to change the value, click on the right-hand column opposite the Start year attribute. Press ENTER once you’ve entered the value.
• Dawn hour. Determines the hour at which dawn breaks in the module. You can put any value from 0 to 23 here. Let’s enter 7, which means dawn will break at 7 a.m. In order to change the value, click on the right-hand column opposite the Dawn hour attribute. Press ENTER once you’ve entered the value.
• Dusk hour. Determines the hour at which dusk begins in the module. You can put any value from 0 to 23 here. Let’s enter 20, which means it will start getting dark at 8 p.m. In order to change the value, click on the right-hand column opposite the Dawn hour attribute. Press ENTER once you’ve entered the value.
[edit] Scripts Section
The attributes in this section are responsible for the scripts that will be run when an event related to the module takes place, i.e. the module gets loaded. More about scripting has been written in another chapter. At the moment I’m only going to describe what the respective attributes are for.
• On client enter. Script gets loaded when the player appears on the module.
• On client leave. Script gets loaded when the player leaves the module.
• On heartbeat. Script gets loaded every 5 seconds.
• On module loaded. Script gets loaded when the module is loaded.
• On module started. Script loaded when the module is started.
• On player death. Script gets loaded when the player dies.
• On player dying. Script gets loaded when the player starts dying.
• On player level-up. Script gets loaded when the player has gained a level.
• On player rest. Script gets loaded when the player is meditating (resting).
• On player respawn. Script gets loaded when the player has respawned.
• On user defined. Script is defined by the user.
In order to assign a given Script to an event, click on the small yellow icon in the right-hand column opposite this event. For example, if you want to assign a script to the On client enter event, click on the yellow icon located in the right-hand column, next to the attribute itself:
This will open the standard Windows window used for loading files. Go to the Data\Scripts folder (this contains all Script files). Look for the file of your choice and click Open.
That’s it for module attributes. Please remember that module attributes apply to the whole module, whereas area attributes, which we are going to set in a minute, apply only to a given area of the module. This way each area constituting a module may have its own, different set of attributes.
[edit] Area properties
In order to set the attributes for an area, double-click on the Area Properties sub-branch in the area you want to edit:
The Area properties: g31_cave window appears on the right side of the screen:
This window works in the same way as previously described windows. The only things that are different are the sections and the attributes they contain. Now I’m going to describe the individual attributes and give you their proper values.
[edit] General Section
• Name. Contains the name of the area. In order to enter a name, click on the Name attribute in the right-hand column. Enter Cave in the newly opened window:
Here, too, you can choose a language for the name. Choose the language from the following list:
Choose FinalEnglish_Short.
• Comment. Contains a space in which to write a comment. This is not used by the game, it’s just an information field. You can write whatever you want here, for example information on the area.
• Tag. Designates the flags describing the given area. It is mainly used with scripts, which we will talk about later in the manual. In order to enter the text, just click the right-hand column opposite Tag and enter our_cave.
• Last SET update by. Contains information on the last person to have modified the area. The name is taken directly from the Windows login account. This attribute cannot be changed. It is updated automatically.
• Last SET update date. Contains information on the date and time of the last modification to the area. This attribute cannot be changed. It is updated automatically when the area or the module is saved. The date and time are taken directly from the Windows system.
• Tileset. This attribute contains the name of the mesh (3D object) of the area. You don’t need to change this because it is updated automatically when the area is created. If you want to change the object, i.e. you want to use a different cave that is already in use, click on a small yellow icon in the right-hand column of the Tileset attribute:
This will open the standard Windows window used for loading files. Go to the Data\Meshes folder. Just to remind you: this is the folder containing all the accessible areas created by The Witcher team. Enter the folder with the area you want to use, select the .set file and click on Open.
• Persistent scene. Not used.
[edit] Area map Section
• Regions bitmap override. Contains the graphical image of your area. Along with the D’jinni Editor and the areas created by The Witcher team, you have also received bitmaps of the areas. These bitmaps serve as area maps that appear when the player presses the M button during the game. In order to assign a bitmap, click on the small yellow icon in the right-hand column opposite the Regions bitmap override attribute:
This will open the standard Windows window used for loading files. Go to the Data\Meshes\g31 folder (this is the folder containing the cave we used for our area), select the regg31_m1.bmp file and click on Open.
• Regions 2da override. Contains the .2da file of our area. These .2da files are simple databases. More about these files has been written in another chapter of the manual. Along with the D’jinni Editor and the areas created by The Witcher team, you have also received .2da files related to a given area. In order to assign the file, click on the small yellow icon in the right-hand column opposite the Regions 2da override attribute:
This will open the standard Windows window used for loading files. Again, go to the Data\Meshes\g31 folder, select the regg31_m1.2da file and click on Open.
• Worldmap region. Determines the position of our area in the overall game world. A map in The Witcher consists of two elements: the map of the area in which Geralt (the player) is currently located; and a map of the region in which the given area is located. By using the Regions bitmap override and Regions 2da override attributes we have defined the map of our area – the cave.
Now we have to establish where the cave itself is located. We do this by using the Worldmap region attribute. For the moment this doesn’t actually matter and later, when you create your own modules and quests, you will certainly know where your areas are located. Choose a region from the list. To change the setting, click opposite the Worldmap region attribute. Choose, for example, the graveyard region. This means that our cave will be located in a cemetery:
When you click the small red icon by the choice list, it will open the reg_worldmap.2da file. This is the database containing all the regions of The Witcher:
[edit] Visual Section
• Period Settings. Contains the definition for the day-night cycle. It’s obvious that an area looks different in the morning than it does in the afternoon, evening or at night. This doesn’t really matter for us, though, because our area is a cave – it’s mono-atmospheric by default. I’ll tell you how to define the cycles, however. To change the setting, you have to click on the small red icon located in the right-hand column opposite the Period Settings attribute:
[edit] Period settings
This will open the Period Settings window:
The window is divided into two panels: Periods, containing the defined cycles; and Settings for selected period, containing the settings for the given cycle. First, we have to define the cycle. To change the setting, click on the Periods panel and choose Add New Period from the menu:
[edit] Cycle
A new cycle will appear in the Periods panel:
By default the cycle lasts from 00:00 to 23:00, i.e. the 24 hours. Of course, you can change it and I’ll tell you how in a minute. If you want to remove a given cycle altogether, right-click on it and choose Remove Period from the menu:
You can define up to 24 cycles – that’s one cycle per hour. Of course it would be pointless to do such a thing. It is usually enough to have one cycle for day-time and one for the night. In the case of our cave, one is enough. Go to the Settings for selected period panel. First set the time for the given cycle. Use the Time field:
Start corresponds to the first hour of the cycle and End to the last. Choose from the list:
As I’ve already said, we need just one cycle for our cave, so we don’t change a thing here. The next field is Fog:
[edit] Fog
This field is responsible for the fog in the area. What’s the purpose of fog? Firstly, it changes scene – an area covered with a fine mist looks more interesting than one without it. Secondly, it increases the efficiency of our area because far-away objects, obscured by fog, are not visible and thus don’t need to be displayed. This generally works for exteriors.
In the Fog field, choose the distance from Geralt (the player) at which the fog begins to fade. Also set the color of the fog. Notice also that the settings are divided into three categories: Minimum, Medium and Maximum. In order to explain how it works more easily, I’m going to use a different example.
Let’s assume that we’ve got a cycle defined from 21:00 to 7:00. If there were no division between Minimum, Medium and Maximum, the fog would have the same color all the time. It wouldn’t look real, especially considering that it is getting dark at 21:00 and it’s already dark at midnight, while around 05:00 it is getting bright again. Hence, this division into three categories. At 21:00 the fog will have the color defined in the Minimum category, about 01:00 it will assume the color defined in the Medium category and about 07:00 the color of the fog will be as defined in the Maximum category. Of course the colors will change smoothly so that the player won’t notice anything. All the three categories will have the same value for our cycle. Enter 20 as the starting value in all the three categories:
Then enter 70 as the end value:
This means that the fog will begin 20 units from the player and end 70 units from the player. Let’s set the color of the fog now. Click on the black box next to Minimum:
This will open the standard Windows window used for defining colors:
Choose a brown hue:
and click on OK. Repeat this for the other two categories, Medium and Maximum:
Next, set the Skybox Fog field:
This is responsible for the same things as Fog. The only difference is that the Skybox Fog field relates to the fog covering the sky, so it works only for the exteriors. Because our area is a cave, we don’t have to set this field. When you create an open-space area, set the values in the Skybox Fog field the same way we did with the Fog field. The next field is the Clip plane:
[edit] Clip plane
This field is mainly responsible for the efficiency of our area and for cutting out objects that are distant from the player, as determined in the Far field. Distant objects are not visible to the player, thus they don’t have to be displayed.
In truth, in order to set the optimal distances you have to experiment a bit. Run the module each time and check how it looks in-game. Naturally, when you set the clipping distance too close to the player, it will result in objects appearing right in front of the player. If you set the clipping distance too far away, your module will be very slow because the game will have to display all the distant objects, too.
The Clip plane field also contains the three categories: Minimum, Medium and Maximum. This way, you can create an even more efficient area since the clipping distance can be far shorter at night. After all, it’s dark anyway, so objects distant from the player won’t be visible. I recommend starting with the near distance set at 0.1, and the far distance at 200. Set these values for all three categories:
[edit] Light Mod
Next is the Light Mod field:
This field is responsible for the light modifier for the area. The Color field contains the color of the modifier, whereas the Factor field contains its multiplier. The light modifier is used for exteriors. In our case, we don’t have to set it. Next is the Shadow field:
[edit] Shadow
This field determines the color of the shadows thrown by the objects located in the area. It’s black by default, so let’s leave it like that. After all, shadows, especially in a cave, are going to be black. Next is the NightVision Threshold field:
[edit] NightVision Threshold
This field allows you to set the threshold distance at which the player starts to make out objects in the dark. This works provided the player drinks a nightvision potion, of course. Next is the SpeedTree LOD Distance field:
[edit] SpeedTree LOD distance
This field is used exclusively for exteriors with trees. Here the multiplier controls the level of detail of the trees. The lower the multiplier, the more real the trees look, but the lower the efficiency of the area. I recommend you increase the value of the multiplier if your area contains a lot of trees, for instance in a forest. Next is the Grass Distances field:
[edit] Grass Distances
This field is used only for exteriors covered with grass. The Fade field contains the distance from the player at which the grass begins to fade away. If you set this too high, it may decrease the efficiency of the area; if you set it too low, the grass will unrealistically appear right under the player’s feet. The Visibility field contains the distance at which the player is able to see the grass. Lastly we have the Color Filter field:
[edit] Color Filter
Here you set the filter for colors. The Color field contains a color and the Factor is its multiplier. That’s all when it comes to the cycle settings. Click on OK in the Period Settings window.
[edit] Wind Power
Determines the wind velocity on the area. Choose the attribute from the list. Because our area is a cave, we’ll set things up to imitate a draft. In order to do so, click on the right-hand column opposite the Wind Power attribute and choose Breeze from the list:
The values you can assign to this attribute are:
- None – no wind,
- Breeze – a little breeze,
- Light – a light wind,
- Medium – a medium wind,
- Heavy – a heavy wind,
- Very heavy – gusting winds.
It’s worth mentioning that objects with physics assigned to them can be blown away by the wind in the area.
[edit] Day/Night Cycle
Determines whether an area has a day/night cycle. Choose the attribute from the list. Because our area is a cave, we can turn the cycle off. In order to do that, click on the Day/Night Cycle attribute in the right-hand column and choose False from the list:
The values you can assign to this attribute are:
- False – there is no day/night cycle in the area,
- True – there is a day/night cycle in the area.
[edit] Is Night
Determines whether the area includes periods of night. Choose the attribute from the list. Because there is no night on our area, choose the False attribute from the list. In order to do that, click on the right-hand column and choose False from the list:
The values you can assign to this attribute are:
- False – area does not include periods of night,
- True – area includes periods of night.
[edit] Glow intensity
Determines the intensity of the glow effect in the area. Enter the value 1 here. In order to do that, click on the right-hand column opposite the Glow intensity attribute.
[edit] Glow threshold
Determines the distance from the player at which the glow effect starts in the area. Enter 0.2 here. To change the setting, click on the right-hand column opposite the Glow threshold attribute.
[edit] Descriptive properties
Determines the description of our area. Choose from the list by clicking on the appropriate option. In order to do that, click on the right-hand column and tick the small box next to the option of your choice:
If you want to select all the options, click on the box next to the asterisk:
Because our area is a cave, choose the Underground option:
The values you can assign to this attribute are:
- Interior – the area is the interior of a building, etc.,
- Underground – the area is a cave, etc.,
- Natural – the area is outdoors, e.g. forests, swamp or the streets of a city.
[edit] Gameplay Section
[edit] Loading Screen
Determines what picture will appear when the area is being loaded. In order to do that, click on the right-hand column opposite the Loading Screen attribute:
This list contains all the pictures available in The Witcher game. Choose Random from the list. This means that during the loading screen will display a random picture. Click on the small red icon next to the list of choices:
This will open the loadscreen.2da file, the database containing the definitions of all loading screen pictures in The Witcher.
[edit] No Resting Allowed
Determines whether the player can rest (meditate) in the area. Select the attribute. To change the setting, click on the right-hand column opposite the No Resting Allowed attribute. Because the player will be able to rest in our area, choose false from the list:
The values you can assign to this attribute are:
- False – player can rest (meditate) in the area,
- True – player cannot rest (meditate) in the area.
[edit] Safe during day
Determines whether it’s safe in the area during the day. Select the attribute. To change the setting, click on the right-hand column opposite the Safe during day attribute. Because our area is a cave, let’s assume it is always unsafe there. Thus, choose the False option:
The values you can assign to this attribute are:
- False – it is always unsafe in the area during the day,
- True – it is always safe in the area during the day.
Remember that when it’s safe, the player cannot use weapons or signs.
[edit] Safe during night
Determines whether it’s safe in the area during the night. Select the attribute. To change the setting, click on the right-hand column opposite the Safe during night attribute and choose the False option:
The values you can assign to this attribute are:
- False – it is always unsafe in the area during the night,
- True – it is always safe in the area during the night.
[edit] Audio Section
[edit] Environmental Audio (EAX Room)
Determines what kind of background sounds can be heard in the area. This determines how sound spreads in different surroundings. The same sound spreads differently in a small room than in a big hall or a cave. Select the attribute. To change the setting, click on the right-hand column opposite the Environmental Audio (EAX Room) attribute and choose the GENERIC option:
This list is very long and contains an option for practically every kind of surroundings. Click on the small red icon next to the list:
This will open the eax_rooms.2da file, the database containing all the background sounds available in The Witcher game. If you don’t know what kind of background sound to assign to the area, choose the GENERIC option.
[edit] Battle music
Contains the music that will be played during a fight. Select the attribute. To change the setting, click on the right-hand column opposite the Battle music attribute. For example, choose mus_bat_boss1:
Click on the small red icon next to the list of choices:
This will open the ambientmusic.2da file, the database containing all the music available in The Witcher game.
[edit] Music during day
Contains the music that will be played during the day. Select the attribute. The list contains the same pieces of music as the Battle music attribute. For our area, choose amb_catacombs from the list. When you click on the small red icon next to the list of choices, it will open the ambientmusic.2da file.
[edit] Music during night
Contains the music that will be played at night. Select the attribute. The list contains the same pieces of music as the Battle music and Music during day attributes. Assign the amb_dungeon piece here. When you click on the small red icon next to the list of choices, it will open the ambientmusic.2da file.
[edit] Music delay
Determines the time between the end of music and when it starts again. The time is measured in seconds. Click on the right-hand column by the Music delay attribute, type in 2 and press ENTER. This means that music will begin playing again 2 seconds after it stops.
[edit] Scripts Section
All the attributes of this section are responsible for scripts run when an event related to an area occurs – when the player enters the area, for instance. More about scripting has been written in another chapter of this manual. Here I’m only going to describe the intended use of the respective attributes.
• On Battle Begin. The script is run at the beginning of a fight.
• On Enter. The script is run when the player enters an area.
• On Exit. The script is run when the player leaves an area.
• On heartbeat. The script is run every 5 seconds.
• On user defined. script is defined by the user.
In order to assign a script, click on the small yellow icon located in the right-hand column next to the event to which you want to assign the script. For instance, if you want to assign a script to the On Battle Begin event, click on the yellow icon located in the right-hand column opposite the attribute:
This opens the standard Windows window used for loading files. Go to the Data\Scripts folder (this contains all the script files), select the file of your choice and click on Open.
That’s it. You’ve set the attributes for the module and the area. Now you can save the module. In order to do that, choose Save Module from the Module menu:
The module, including all changes, will be saved. Now we are going to add lighting to our cave. Before we do that, though, I’m going to describe the various tools located on the toolbar found at the top of the Area Editor:
[edit] Area Editor tools
Each icon represents a tool. To choose a tool, left-click on the respective icon. If you hover the cursor over an icon and wait a moment, a short tooltip will be displayed underneath. The tools are as follows:
[edit] Basic Editing tools
[edit] Select
This is the tool for selecting objects. Use it to select objects located in the area. In order to perform this action, first you have to choose the selection tool by clicking on this icon and then on the object you want to select. If you double-click the object, a Properties window containing the object’s attributes will appear on the right side of the screen.
You can also select more than one object located in the area. You can do this in several ways. First of all, you can press and hold CTRL, then click on the objects you want to select. If several objects are already selected and you wish to deselect one, press SHIFT and then click on the object. You can also select several objects by “drawing” with the mouse. Click and hold the left mouse button and move the mouse so that you “draw” a rectangle that encompasses the objects you wish to select. This is how it looks:
At this moment we’ve got only one object in this area, the Start Point, so only this object can be selected. Once selected, the object can be found inside a white frame:
A selected object is also marked green in the Module Explorer window:
When the Start Point is selected, the Module Properties in the Module Explorer window also gets selected. This happens because double-clicking on the Start Point opens the Properties window containing the module attributes. The Start Point is the only object that cannot be removed from the area after it has been added to it. You can only move it or place it in a different area. Object can be also selected in the Module Explorer window.
[edit] Move
This tool is used to move objects. In order to do so, first choose the tool by clicking on this icon and then on the object you want to move. The object will be selected, as evidenced by the white frame and three axes placed around it:
These are the axes along which the object can be moved. You can move the object along the X axis (the red line), the Y axis (the green line) and the Z axis (the blue line). Move the cursor over the axis along which you want to move the object. The selected axis will turn white:
This means that the object will be moved along this axis. Click and hold the left mouse button and move the mouse in the direction of your choice. When the object gets to its destination, release the left mouse button.
[edit] Rotate
This tool is used to rotate objects. In order to do so, choose the tool by clicking on this icon and then on the object you wish to rotate. The object will be selected, as evidenced by the white frame and three circles displayed around the object:
These circles represent the axes you can use to rotate objects. You can rotate along the X axis (the red circle), the Y axis (the green circle) and the Z axis (the blue circle). Move the cursor over the axis along which you want to rotate the object. The selected circle will turn yellow:
This means that the object will be rotated along this axis. Click and hold the left mouse button and move the mouse in the direction of your choice. When the object has been rotated, release the left mouse button.
That’s it when it comes to the Editing Tools. The other tools are used to add or create various objects in the area. They are as follows:
[edit] Object manipulation tools
[edit] Create Placeable
This tool is used to add placeables (chairs, tables, pots, chests, fires, etc). By using this tool you can add some detail to various rooms in caves, crypts, and so on. In order to add an object, click on the small downward arrow on the tool icon:
This opens a menu. Click on Select new Placeable template:
This opens the following window:
This window contains all available placeables, displayed as a tree and divided into categories. In order to see the whole category, click on the small ‘+’ sign next to the category name:
Then double-click on the object of your choice:
The object becomes “stuck” to the cursor. Now click on the spot where you want to place the object. The object will be added to the area:
The new object will also appear in the Module Explorer window:
Objects in the Module Explorer window are added in their respective branches. In this case, it’s the Placeables branch because this is the kind of object we’ve just added to our area. This is a very useful way of displaying objects, because it keeps things orderly while you’re working on the area, especially when it is large and full of objects.
As we’ve added one object, let me explain what we can do with it. Right-click on the area. It doesn’t matter whether you do this in the Area Editor window or in the Module Explorer window. This opens a menu:
Now I’m going to describe the respective commands:
[edit] Open
Opens the Properties window containing the object’s attributes on the right-side of the screen. I’ve described these attributes in another chapter of this manual. In order to open this window, you can also double-click on the name of this object in the Module Explorer window or in the Area Editor window,
[edit] Revert
This is not used.
[edit] Focus on Object
Centers the view on the selected object. This is a very useful command when there are a lot of objects in the area and we want to find just one. Search for it in the Module Explorer window, right-click on it and select Focus on Object. This way we can find the object very quickly,
[edit] Export Placeables Position
Exports the X, Y, Z positions of an object to a text file. When you choose this command, it opens the standard Windows window used for saving files. Enter a name for the file and click on Save. The file can later be opened using a notepad:
This file contains the name of the object and its exact X, Y, Z coordinates in the area (found in square brackets),
[edit] Delete Instance
Removes the object (its copy, to be precise) from the area. When you choose this command, a window will appear:
Click on Yes and the object will be removed. Remember: Each of the available objects has its own template. The object added to an area is only a copy based on this template. You can also remove an object by clicking on DELETE. Select the object in the Area Editor window and click on DELETE. This will open the Removing objects window:
Click on Yes and the selected objects will be removed.
[edit] Update From Template
Updates the object’s attributes from its template. If you introduce some changes to the attributes of an object added to the area, they will only apply to that object; if you introduce any changes to the template of an object, they won’t apply to the objects already placed in the area. If you want to update any objects from a modified template, you have to use the Update From Template command,
[edit] Edit Template
Opens the object template on the right side of the screen. This window contains an object’s attributes. Remember: every object added to an area is only a copy based on its template.
[edit] Move To Layer
Moves the object onto the selected layer. Layers have been written in another chapter of this manual.
Let me get back to the menu that’s going to appear when you click on the downward arrow icon located next to the tool for adding placeables:
Under the Select new Placeable template command there is a list of the recently used objects. Each time when you select an object in the Select window and click on the new Placeable template command, the object will be added to this list. Thus, you don’t have to go to the Select new Placeable template command each time. Note that one object is already selected:
This is useful when you want to add a number of objects of the same type to an area. Instead of choosing the object several times via the Select new Placeable template command, you can choose it from the list of the recently used objects. Once you’ve done this, it is enough to click on the icon for adding placeables:
The tiny selection arrow located next to the tool icon is unnecessary this time:
Next, just click on the spot where you want to place the object.
[edit] Placeable attributes
All that is left to be discussed here are placeables’ attributes. Double-click on the object. A Properties window containing the placeable’s attributes will open on the right side of the screen:
Now I’m going to describe the respective attributes:
[edit] General Section
• Name. Contains the name of the object.
• Tag. Contains the object’s identification tag. Tags are mainly used with scripts.
• Description. Contains a description of the object.
• Comment. Contains a space in which to write a comment. This is not used by the game, it’s just an information field. You can write whatever you want here, for example information on the module.
• TemplateResRef. Contains the template for the object. If you want to change to a different object template, click on the small yellow icon located in the right-hand column opposite the TemplateResRef attribute:
This opens the standard Windows window used for loading files. Go to the Data\Templates\Placeables folder, select the object of your choice and click on Open.
[edit] Position Section
• Model Scale. Determines the scale of a specified placeable. The object is scaled evenly on the X, Y, Z axes. In order to change the scale of the object, click on the right-hand column opposite the Model Scale attribute and enter the value by which you want to alter the object.
• XPosition. Contains the position of the placeable on the X axis. This attribute is automatically updated whenever you move the object.
• YPosition. Contains the position of the placeable on the Y axis. This attribute is automatically updated whenever you move the object.
• ZPosition. Contains the position of the placeable on the Z axis. This attribute is automatically updated whenever you move the object.
[edit] Transition Section
• Waypoint Tag. Contains the identification tag which is used when the player teleports to a new area. Any placeable can serve as the destination point of the teleportation. Remember that the tags of the objects to and from which the player teleports must be the same. More about movement between areas has been covered in another chapter of this manual.
[edit] Attributes Section
• Action. Not used.
• Model name. Chooses the 3D model of the specified placeable. In order to select a different model, click on the small yellow icon located in the right-hand column opposite the Model name attribute:
This opens the standard Windows window used for loading files. Go to the Data\Meshes folder (which contains all the object models), select the file of your choice and click on Open.
• Effect Name. Chooses a special effect attached to the specified placeable. This could, for example, be a burning torch which is created when fire is applied to a wooden object. In order to add a special effect, click on the small yellow icon located in the right-hand column opposite the Effect Name attribute:
This opens the standard Windows window used for loading files. Go to the Data\FX folder (which contains all the special effects), select the file of your choice and click on Open.
• Plot. Determines whether the specified placeable is related to the storyline. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Plot attribute and select the appropriate option. The values you can assign to this attribute are:
- False – object is not related to the plot,
- True – object is related to the plot.
• Durability. Determines how durable the specified placeable is. In order to set the durability, click on the right-hand column opposite the Durability attribute and enter a value.
• Usable. Determines whether the specified placeable can be used by the player. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Usable attribute and select the appropriate option. The values you can assign to this attribute are:
- False – object cannot be used,
- True – object can be used.
• Usable when empty. Determines whether the specified placeable can be used once empty. This refers to objects like barrels or chests. Depending on its settings, after you remove the contents of the object it will either be possible or impossible to open it again. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Usable when empty attribute and select the appropriate option. The values you can assign to this attribute are:
- False – object cannot be used again once empty,
- True – object can be used again once empty.
• Static placeable. Determines whether the specified placeable is static. A static object cannot be moved. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Static placeable attribute and select the appropriate option. The values you can assign to this attribute are:
- False – object is not static,
- True – object is static.
• Hilight. Not used.
• No preload. Determines whether the specified placeable is to be loaded in advance, i.e. along with the module itself, or when it becomes needed in the game. When an object is loaded along with the module, it can speed up the module performance, but may slow the loading of the module. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the No preload attribute and select the appropriate option. The values you can assign to this attribute are:
- False – object will not be loaded in advance.
- True – object will be loaded in advance.
• Use Physics. Determines whether the specified placeable is affected by the game’s physics system. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Use Physics attribute and select the appropriate option. The values you can assign to this attribute are:
- False – object is not affected by the game’s physics system,
- True – object is affected by the game’s physics system.
• PWK collides with Physics. Not used.
• Improvised Weapon. Not used.
• Conversation. Contains a file with a conversation. A “conversational” object could be, for example, a statue bearing a caption. I’ve written about conversations in another chapter of this manual. In order to assign a file with a conversation, click on the small yellow icon located in the right-hand column opposite the Conversation attribute:
This will open the standard Windows window used for loading files. Go to the \Data\Dialogues\ folder (which contains all the files with a conversation), select the file of your choice and click on Open.
• Open State. Determines the initial state of the specified placeable. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Open State attribute and select the appropriate option. You can choose from the following (the names speak for themselves):
- Default,
- Open,
- Closed,
- Destroyed,
- Activated,
- Deactivated,
- Dead.
• Sound Type. Determines the kind of sound that will be played when the player interacts with a placeable (for instance, opens a chest). Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Sound Type attribute and select the appropriate option. You can choose from the sounds produced by the following placeables (the names speak for themselves):
- corpse,
- stone_plate,
- trap_spike,
- trap_knife,
- trap_blade,
- secr_stonewall,
- door_tomp,
- door_wooden,
- door_wooden2,
- door_fence,
- door_fence2,
- destroy_wall,
- chest_open,
- gate_wood.
Click on the small red icon located in the right-hand column opposite the Sound Type attribute:
This will open the placeableobjsnds.2da file, the database containing the definitions of all the sound types.
• Usable in combat. Determines whether the specified placeable can be used during a fight. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Usable in combat attribute and select the appropriate option. The values you can assign to this attribute are:
- False – object cannot be used during a fight,
- True – object can be used during a fight.
• Door cursor. Determines whether a door cursor is to be displayed when you run the cursor over the specified placeable. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Door cursor attribute and select the appropriate option. The values you can assign to this attribute are:
- False – a door cursor will not be displayed,
- True – a door cursor will be displayed.
[edit] Inventory Section
• Has Inventory. Determines whether the specified placeable contains equipment. Choose the attribute from the list. To change the setting, click on the right-hand column opposite the Has Inventory attribute and select the appropriate option. The values you can assign to this attribute are:
- False – object does not contain equipment,
- True – object contains equipment.
• Items. Determines the equipment that can be found inside the specified placeable. In order to add some equipment, click on the small red icon located in the right-hand column opposite the Items attribute:
More about the creation of equipment has been covered in another chapter of this manual.
• Store. Contains the storage template file. A store can be a chest in which Geralt (the player) can store items he doesn’t need at the moment. In truth, stores are created by means of the shop template, that’s why the storage template is assigned to this attribute (the store does not have its