You are on page 1of 6

Storm of Zehir Tutorial - Party Conversation and Party Creation Nathaniel Chapman Last Modified: Nov.

13, 2008 3:01 PM

STORM OF ZEHIR COMMUNITY TUTORIAL


OVERLAND MAP
One of the primary new features of Storm of Zehir is the Overland Map - which itself consists of several subsystems. This is a guide for community builders on how to incorporate the Overland Map into your own module or campaign.

The Map Itself


The Overland Map is a representative, not-to-scale map of the terrain you are travelling across. To see how the Overland Maps for SoZ are constructed, you can open up the campaign's modules, found at the following locations: <Your Game Directory>\Modules\F_X2.mod <Your Game Directory>\Modules\G_X2.mod Within each of these modules, the overland map areas are f00_overland and g00_overland, respectively. Note that the Overland Map has many complex features and many complex gameplay situations throughout the campaign for Storm, and that this is just a primer on the systems. We recommend that you dig into the modules themselves and post on the Neverwinter Nights 2 Forums if you have additional questions.

Area Properties
In the area properties for each of these areas, the "Overland Map" checkbox is checked - this indicates that the area is an Overland Map and activates certain UI features. Additionally, it allows you to check if an area is an Overland Map through script. You should check this box on any Overland Maps you create. Scripts Overland Maps will also need certain scripts attached to their events in order function properly. As you can see on the two Overland Maps, these scripts are: On Client Enter Script - nx2_ol_client_enter On Exit Script - ka_olmap_exit On Heartbeat Script - nx2_ol_hb

These scripts allow you to call your own scripts from them, as well - if you want to add a custom On Client Enter script, simply attach a local string variable with the name "sSpawnScript" and set the value to the name of the script you would like to run. You can also specify a local string variable named "sHeartbeatScript" and with a script name as its value to run a custom Heartbeat script. Local Variables There are additional local variables you can choose to set on your area, in addition to the ones described above. These are: Name nEncounterTable Type Integer Description This references a row in om_encounter_table.2da and specifies the table used to spawn neutral encounters. You can either use the om_encounter_table and other encounter tables from our campaign or you can create your own.
Page 1 of 6

Obsidian Entertainment Confidential

Storm of Zehir Tutorial - Party Conversation and Party Creation Nathaniel Chapman Last Modified: Nov. 13, 2008 3:01 PM

sSpecialEncounterTable sHeartbeatScript sSpawnScript nTotalGoodies nDetectDC

String String String Integer Integer

This is the name of the Special Encounter Table for the area. Special Encounters are discussed in detail below. This is the name of a custom On Heartbeat script you would like the area to run in addition to nx2_ol_hb. This is the name of a custom On Client Enter script you would like the area to run in addition to nx2_ol_client_enter. This is the total number of Goodies you would like to spawn on the map. Goodies are discussed in detail below. This is the Difficulty Class required to Spot an encounter on this Map. When an encounter is spotted, that encounter will spawn further away from the player. When a spot fails, the encounter will spawn closer to the player.

Terrain Triggers
Upon examining either of the Overland Maps in the toolset, you will notice large triggers that cover most of the walkable surface of the map. These are terrain triggers, and they define the boundaries of the terrain types on the overland map. Terrain triggers set the following information within their area: Terrain Type - The Terrain Type of a trigger (e.g. swamp, jungle, etc.) determines the party's movement rate within that terrain, what music plays when the player is in that terrain, as well as which random encounter map the party is redirected to when they have an encounter. Random Encounter Table - Each Terrain Trigger pulls from one of the encounter tables defined in om_encounter_table.2da. You can share encounter tables across different terrain types and terrain triggers, or create separate encounter tables for each trigger as you see fit. Random Encounter Chance - This is the chance per heartbeat (6 seconds) that a random encounter will spawn while the player is in the trigger. Higher random encounter chances make an area more dangerous, logically.

When making an overland map, you should do your best to cover the entire map with terrain triggers and to paint their boundaries as close to the visual boundaries of the terrain as possible. This will give players the proper sense of moving through the different types of terrain as they traverse the Overland Map. Leaving large gaps between triggers will keep encounters from spawning when the player is in those gaps, making the map feel sparse and uninteresting. Tag Terrain triggers must have the tag "nx2_tr_terrain". This is used to differentiate them from other triggers for various purposes. Scripts Terrain triggers should have the following scripts assigned to their events: On Enter - nx2_tr_terrain_en On Exit - nx2_tr_terrain_ex On Heartbeat - nx2_tr_terrain_hb

Obsidian Entertainment Confidential

Page 2 of 6

Storm of Zehir Tutorial - Party Conversation and Party Creation Nathaniel Chapman Last Modified: Nov. 13, 2008 3:01 PM

Local Variables These local variables, when placed on a terrain trigger, control the parameters of that trigger: Name nTerrain Type Integer Description This integer references a row in om_terrain_rate.2DA as well as a constant within ginc_overland.nss. The default terrain types contained within SoZ are: 1 - Jungle 2 - Desert 3 - Beach 4 - Road 5 - Plains 6 - Swamp 7 - Hills 8 - Forest 9 - Mountain nEncounterChance Integer This is the percent chance (out of 100) that a random encounter will be generated every 6 seconds when the player is in the given trigger. In general, values between 10 and 20 are low, values from 20 to 30 are moderate, and anything greater is fairly high. This integer corresponds to a row in om_encounter_table.2DA. Encounter tables determine what types of encounters will spawn within the given terrain trigger. Note that the trigger an encounter spawns in may be different than the one the player is currently standing in. For instance, if the player is standing nearby a Forest, but is on Plains, if an encounter spawns in the Forest it will pull from the Forest table, not the Plains table.

nEncounterTable

Integer

om_terrain_rate.2DA This file, contained within the SoZ campaign, (found at <Your Game Directory>\Campaigns\Neverwinter Nights 2 Campaign_X2\) defines the values associated with the various terrain types. There are 3 columns associated with each terrain type: Terrain_Type - This is a plaintext name for the terrain type, used for easy reference. Make sure you do not put spaces in the name of the terrain, as 2DA files are space and tab delimited. Movement_Rate - This is the Movement Rate factor applied to the player when they enter the associated Terrain Type. For SoZ, we used .5 as the fastest rate (used in the road terrain type) and .2 as the slowest (used in Jungle and Swamps). This movement rate is then factored in with the characters Survival skill and base movement rate to generate the speed with which they use on the map. Be careful when adjusting this value! It can make animations appear very strange if you make it too low, or can cause the player to appear to be moving too fast if you set it too high.
Page 3 of 6

Obsidian Entertainment Confidential

Storm of Zehir Tutorial - Party Conversation and Party Creation Nathaniel Chapman Last Modified: Nov. 13, 2008 3:01 PM

Music_Track - This column contains an integer that corresponds to a row within ambientmusic.2da. This is the musical track that plays when the character enters the terrain.

Static Locations
Static Locations are the places, like Towns, Cities, Temples, and more that are always visible to the player as they traverse the map. These are not the hidden locations that appear due to the player's Search skill - those are explained later. While there are many ways that you could set these sorts of locations up on the Overland Map, I will explain the way that it is done for the SoZ campaign - which may save you lots of work. Static Locations consist of several pieces on both the Overland Map and on the destination area with which they correspond. There needs to be a Placeable representing the location on the Overland Map, an exit waypoint indicating where the player returns to on the overland map when leaving the associated area, a mapnote, a conversation that pops up when you interact with the placeable, and an appropriately-tagged waypoint in the destination area. Overland Map Placeable The first thing that is required for a Static Location is the Overland Map placeable indicating the location itself. You can use one of our scaled down Overland Map placeable appearances (they have their own category in the Toolset's Global Placeable list) or you can create one of your own. Your overland map placeable should have the following things set on its blueprint: Tag and Resref - If you are going to use SoZ's method of transitioning the party to an area from the Overland Map, the Overland Map placeable's tag and resref should be in the following format: XXX_plc_to_YYYY Then, when the script "ka_olmap_visit" is run from the placeable's conversation, it will automatically send the player to the waypoint with the tag: YYYY_wp_from_XXXX XXXX and YYYY can be any labels you like, however they cannot contain underscores. Conversation - It should have its conversation set in its blueprint. This conversation will fire when the player clicks on the placeable, and will handle the work of transitioning the player to the necessary area (or handle other things as the case may be - get creative with your Conversations for additional variety). Has Inventory - This should be flagged false (unchecked) in most cases - otherwise it will cause an unpleasant chest-opening sound when interacting with the placeable. Plot - Flagging Overland Map placeables Plot is a good idea in case they somehow are exposed to damage. Static - Make sure Static is flagged false, so that characters can interact with them. Usable - And, make sure usable is true, also so that characters can interact with them.

The placeable should also have the following scripts set: On Heartbeat - kp_mapnote_hb On Used - gp_talk_object

Obsidian Entertainment Confidential

Page 4 of 6

Storm of Zehir Tutorial - Party Conversation and Party Creation Nathaniel Chapman Last Modified: Nov. 13, 2008 3:01 PM

Map Note You should place a Map Note waypoint near the center point of the Overland Map placeable. This waypoint should be tagged "ol_mapnote", and should have "Has Map Note" checked, "Map Note Enabled" unchecked and "Map Note Text" set to the name of the Overland Map placeable. Exit Waypoint This is a waypoint that the player will be sent to when leaving the associated location. Unless this is a special case location, the waypoint should have the following tag: XXXX_wp_from_YYYY Which mirrors the format used for the Placeable itself. The door on the other side can then either use the ka_olmap_visit script or a standard transition to move the player to this waypoint. Destination Waypoint This waypoint should be contained within the area represented by the Overland Map placeable. The waypoint should be placed where the party is entering the area from, and should be tagged: YYYY_wp_from_XXXX As described under the section on the Overland Map placeable. Conversation This conversation should handle describing the Overland Map area to the player and should allow them to enter the area (of course, you may require conditions/skill checks/ quest states/etc. to allow the player to enter). On the appropriate node, you should fire the script ka_olmap_visit and, assuming that everything has been set up properly, the player should be properly transitioned to the correct area and waypoint! For examples of these conversations, please check out any of the conversations attached to the overland map placeable in the F_X2 or G_X2 modules.

Hidden Locations
Hidden Locations are much like Static Locations except that they are, well, hidden. Players must come within a certain range of them and their spot skill must exceed a DC specified on the location in order to find them. In order to create a Hidden Location, you will need to go through all of the same steps as creating a Static Location, except you should create your Overland Placeable as a blueprint, not as an actual in-game placeable. Instead, you will place a Hidden Location Marker at the location you would like the Overland Map placeable to appear when discovered. The Hidden Location Marker is a placeable with the Ipoint appearance (making it invisible to players in-game). It should have the following properties set: Appearance - Again, make sure the appearance is set to Ipoint so that it does not show up in-game. Resource Name/Tag - These should both be set to XXXX_ip_to_YYYY, using the same XXXX and YYYY values used for your Overland Map Placeable's blueprint. Properly tagging both the hidden location marker and the Overland Map Placeable is required to make the Overland Map placeable spawn properly.

Scripts The Hidden Location Marker should only have one script applied: gb_hidden_loc_hb on the Marker's On Heartbeat event.
Obsidian Entertainment Confidential Page 5 of 6

Storm of Zehir Tutorial - Party Conversation and Party Creation Nathaniel Chapman Last Modified: Nov. 13, 2008 3:01 PM

Local Variables The follow local variables should be set on Hidden Location Markers: Name iSpotDC Type Integer Description This integer is the number of ranks in Search required to discover the Hidden Location. However, players will automatically reveal any location which they move directly on top of. If you want this to only be revealed through script (and do not want any player to be able to detect it even by walking across it) set iSpotDC to 100. fDist Float This is the distance (in meters) that the player must be from a placeable in order to spot it. As stated above, if the player is directly standing above it (and its iSpotDC is not 100) then the player will be able to detect it regardless of their Search score.

Obsidian Entertainment Confidential

Page 6 of 6