The following function checks to see if a hotspot has been found. It is meant to be placed on the ConditionalScript field of a world map.
// kc_hotspot_show
//
// global conditional script for world map hotspots. Returns TRUE if this hotspot should be displayed
// on the world map.
// EPF 12/8/05
#include "kinc_worldmap"
int StartingConditional(string sHotspot)
{ This is the heart of the world map functions. Not that all the includes and constants work for the OC only.
// kinc_worldmap // // Functions and constants for the NWN2 world map functionality // EPF 12/8/05 #include "ginc_debug" // the below files contain all the encounter logic #include "kinc_module1000" #include "kinc_module1100" #include "kinc_module1200"
The script ka_hotspot_click_force gets called when the devs needed to make sure a certain NPC is along for the ride. Otherwise, it seems to work very similar to ka_hotspot_click.
I've removed a number of the plot checks to avoid spoilers.
// ka_hotspot_click_force //
Another tool for creating hak files is Ranmanu's Encapsulated Resource File Editor.
Edits, imports or exports data from Encapsulated Resource File files also known as ERF files (.HAK, .MOD, .ERF and .NWM).
Can be used for NWN1 (ERF version 1.0) as well as NWN2 (ERF version 1.1).
Get it from the vault:
tani's ERFinder is a great tool for creating hak files.
Heed submitted a great walkthrough of how custom content should be installed and deployed in NWN2.
There are several ways to get custom content into the game, but not all are equal. Some have advantages over others and some can actually break your game install making you unable to patch your game. This document will describe various methods and highlight best practices.
You can make a creature lay down by placing the following two commands on a dialog node:
ga_play_ca_snd with the sAnim set to "laydownB"
ga_play_custom_animation with the sAnim set to "proneB"
Make them stand up by using:
ga_play_custom_animation with sAnim set to "standupB"
Note that this only work for NPCs you can select via a tag.
These get get saved to the Bioware Database, which is included in NWN2. They can be accessed via the SetCampaign* and GetCampaign* functions. This is a physical write to the hard drive, and can bog down servers if there are a lot of requests happening at once.
It is worth noting that variable names cannot be longer than 32 characters, or the setting of the variable will fail.
Globals get saved to a globals.xml file that gets placed in your save game directory when you save the game. You can set and get global variables with the SetGlobal* and GetGlobal* functions.
KublaKhan1797 asked a question about variable scope on the official boards, and ScarfaceDM gave a nice summary:
Recent comments
5 years 3 weeks ago
5 years 3 weeks ago
5 years 3 weeks ago
5 years 9 weeks ago
5 years 10 weeks ago
5 years 26 weeks ago
5 years 27 weeks ago
5 years 31 weeks ago
5 years 31 weeks ago
5 years 34 weeks ago