#includes
#includes are files that are included in a *.nss for additional scripting functionality; they allow you to reuse existing source code without having to copy and paste it all over your scripts within a module. BioWare provides many #include files which they use for the official campaigns.
Such a file is also referred to as a library file.
Note: Some functions listed in this section are described as "Internal" functions. This means that the function, although it does exist and can be used, will not appear on the list of functions at the side of the toolset, even if the relevant file is #included. These are functions intended to be used only from within default Bioware library and event scripts. They are often specific to the original campaign modules and useless outside that context. But many are general purpose enough that you may find a use for them in your own scripts anyway. Sometimes they are called undocumented, unsupported, or private functions, but there is nothing private about them aside from their intended use privately in Bioware scripts.
Name | Description |
---|---|
inc_mf_combat | Mindflayer combat round include file. Perform specific Mindflayer combat actions. NOTE: This file includes nw_i0_generic and nw_i0_spells. |
inc_xp2_familiar | Functions to determine familiar and animal companion types for dialogue files. |
nw_i0_2q4luskan | Generic plot and global setting functions for 2Q4 (Luskan plot include). |
nw_i0_assoc | Generic associate commands. NOTE: This file includes nw_i0_generic. |
nw_i0_generic | Contains a slew of useful functions. NOTE: This file includes x0_i0_anims and x0_i0_behavior. |
nw_i0_henchman | This is the include file for the henchmen who can join the player. NOTE 1: This file contains a couple of functions that are also present in x0_i0_common. NOTE 2: None of the functions contained in this file have prototypes. |
nw_i0_ochrejelly | Handles the "Split" functionality of the Ochre Jellies. |
nw_i0_plot | Contains a slew of useful functions. NOTE: This file contains several constants and functions that are also present in nw_i0_tool. |
nw_i0_plotwizard | Declarations and definitions of functions used by the plot wizard. |
nw_i0_spells | Spell related functions. |
nw_i0_tool | NOTE 1: This file contains several constants and functions that are also present in nw_i0_plot. The nw_i0_plot include file is more complete than this one. NOTE 2: None of the functions contained in this file have prototypes. |
nw_j_artifact | These functions are specific to the Official Campaign. NOTE: None of the functions contained in this file have prototypes. |
nw_j_assassin | These functions are specific to the Official Campaign. NOTE: None of the functions contained in this file have prototypes. |
nw_j_complex | These functions are specific to the Official Campaign. NOTE: None of the functions contained in this file have prototypes. |
nw_j_fetch | These functions are specific to the Official Campaign. NOTE: None of the functions contained in this file have prototypes. |
nw_j_guard | These functions are specific to the Official Campaign. NOTE: None of the functions contained in this file have prototypes. |
nw_j_rescue | These functions are specific to the Official Campaign. NOTE: None of the functions contained in this file have prototypes. |
nw_j_story | These functions are specific to the Official Campaign. NOTE: None of the functions contained in this file have prototypes. |
nw_j_theft | These functions are specific to the Official Campaign. NOTE: None of the functions contained in this file have prototypes. |
nw_o0_itemmaker | General Magic Item + Reagent smith system. Uses CustomToken #777. NOTE: This file includes nw_i0_plot. |
nw_o2_coninclude | Handles the random treasure distribution for treasure from creatures and containers. |
x0_i0_anims | Library for playing random animations. NOTE: This file includes x0_i0_modes, x0_i0_position, x0_i0_voice, and x0_i0_walkway. |
x0_i0_assoc | Generic code for associates. NOTE: This file contains several constants and functions that are also present in x0_inc_states. In general, this file is more useful than x0_inc_states. |
x0_i0_behavior | Library holding code for creature behaviors. |
x0_i0_caltrops | Library for caltrops effect. NOTE: This file includes nw_i0_spells. |
x0_i0_campaign | Library for setting variables solely for specific campaigns. These use the "Campaign" variable functions. |
x0_i0_combat | Library for the XP1-specific modified combat AI. NOTE: This file includes x0_i0_talent. |
x0_i0_common | Common functions used across multiple include files. NOTE 1: This file contains a couple of functions that are also present in nw_i0_henchman. NOTE 2: This file includes x0_i0_partywide and x0_i0_transport. |
x0_i0_corpses | Library for creating corpses, blowing things up, etc. NOTE: This file includes x0_i0_position. |
x0_i0_db | This file is an include wrapper for all the database functions, to provide any additional uniqueness support that may be required. |
x0_i0_debug | Small library of debugging functions. |
x0_i0_deckmany | Library for the Deck of Many Things. NOTE: This file includes x0_i0_henchman and x0_i0_treasure. |
x0_i0_destroy | Library to handle destroying multiple objects with the same tag. Also has some utility functions for handling multiple objects with the same tag. |
x0_i0_enemy | Library with functions for finding and identifying enemies. NOTE: This file includes x0_i0_match. |
x0_i0_equip | Library that handles equipping weapons functions. NOTE: This file includes x0_i0_assoc and x0_i0_enemy. |
x0_i0_henchman | This include file REPLACES the original henchman include file (nw_i0_henchman) from campaign one; both should not be included in the same script. NOTE: This file includes nw_i0_generic, nw_i0_plot, nw_i0_spells and x0_i0_common. |
x0_i0_highlight | Library to generate highlights on objects. |
x0_i0_infdesert | Desert-specific include file for the infinite desert system. NOTE: This file includes x0_i0_position, x0_i0_spawncond, and x0_i0_stringlib. |
x0_i0_infinite | Library for an infinite space system. NOTE: This file includes x0_i0_common and x0_i0_infdesert. |
x0_i0_match | Library for 'matching' functions. These functions check to see whether a given value matches one of a long set of constants, so they're simple but big and ugly. |
x0_i0_modes | Library for various behavior modes, such as stealth mode, detect mode, etc. |
x0_i0_npckilled | Library to handle process of awarding victory after death in battle with NPCs, and also to handle NPC resurrection by the player. |
x0_i0_partywide | Include library for party-wide functions. NOTE: This file includes x0_i0_campaign. |
x0_i0_petrify | Library for petrification-related functions. |
x0_i0_plotgiver | Library for plotgiver NPCs. NOTE: This file includes x0_i0_common. |
x0_i0_position | Library file for functions that can be used to determine locations and positions. |
x0_i0_projtrap | Library for projectile traps. |
x0_i0_secret | Library for secret/hidden items. NOTE: This file includes x0_i0_common. |
x0_i0_seennode | Helper function for creating the local variable name used in the seennodeX scripts. |
x0_i0_spawncond | This library separates out the spawn-in conditions from nw_i0_generic for improved clarity. This cannot be dual-#included with nw_i0_generic. NOTE: This file includes x0_i0_combat. |
x0_i0_spells | Expansion 1 and above include file for spells. NOTE: This file includes nw_i0_spells, x0_i0_henchman, x0_i0_match, x2_inc_itemprop, and x2_inc_switches. |
x0_i0_stringlib | Library of general string-manipulation functions for convenience. |
x0_i0_talent | Library for talent functions. NOTE: This file includes x0_inc_generic. |
x0_i0_transform | Library for "transforming" objects -- ie, placeables that 'transform' into a creature, like the skeleton bones object. |
x0_i0_transport | Functions for making creatures travel/transport to new locations. |
x0_i0_treasure | Library for XP1 treasure generation system. NOTE: This file includes nw_o2_coninclude. |
x0_i0_voice | Library of functions to play the various voicechats. |
x0_i0_walkway | Library holding the code for WalkWayPoints. NOTE: This file includes x0_i0_spawncond. |
x0_inc_generic | New functions breaking down some of the 'big' functions in nw_i0_generic for readability. NOTE: This file includes x0_i0_debug and x0_i0_equip. |
x0_inc_henai | This is a wrapper overtop of the 'generic AI' system with custom behavior for Henchmen. NOTE: This file includes x0_i0_henchman. |
x0_inc_portal | Library functions for the portal stone. NOTE: This file includes x0_i0_henchman. |
x0_inc_skills | Library functions for all the designer driven skills. Uses CustomTokens #2001-2004. NOTE: This file includes nw_i0_plot. |
x0_inc_states | Determines and stores the behavior of the associates used by the PC. NOTE: This file contains several constants and functions that are also present in x0_i0_assoc. In general, x0_i0_assoc is more useful. |
x1_inc_cutscene | Library file for cutscene functions. |
x2_i0_spells | Expansion 2 and above include file for spells. NOTE: This file includes x0_i0_spells and x2_inc_itemprop. |
x2_am_inc | Generic system for town life and encapsulates all 'townie' behavior. |
x2_inc_banter | Include file for party banter and other group communication things. NOTE: This file includes x0_i0_henchman. |
x2_inc_beholder | Include file for several beholder functions. NOTE: This file includes x0_i0_spells. |
x2_inc_compon | This include file has routines to handle the distribution of components required for the XP2 crafting system. |
x2_inc_craft | Central include for crafting feat and crafting skill system. NOTE: This file includes x2_inc_itemprop and x2_inc_switches. |
x2_inc_cutscene | Library file for doing cutscenes. |
x2_inc_globals | Many of the functions in this library are specific to the Official Campaign, but it does contain some useful generic database wrappers. NOTE: This file includes x0_i0_henchman. |
x2_inc_intweapon | Central include file for the intelligent weapon functionality in Hordes of the Underdark. NOTE: This file includes x2_i0_spells and x2_inc_itemprop. |
x2_inc_itemprop | Library for item property and item modification specific code. |
x2_inc_plot | Library file with a couple PC and NPC related functions. |
x2_inc_restsys | Library file for the wandering monster rest system. |
x2_inc_shifter | Library file of functions tied to the XP 2 shifter class and its abilities. |
x2_inc_spellhook | Library file that acts as a hub for all code that is hooked into the nwn spellscripts. NOTE: This file includes x2_inc_craft and x3_inc_horse. |
x2_inc_summscale | Library of functions related to scaling up a summoned creature to match the master's level. (i.e. Epic Shadowlord) |
x2_inc_switches | This file provides a basic interface for switching different Hordes of the Underdark subsystems on/off and allows centralized access to certain "expert" functionality like overriding AI or Spellscripts. |
x2_inc_toollib | Advanced VFX functions for XP2 Chapter 3 and global use. |
x2_inc_treasure | XP2 Disposeable Treasure System. NOTE: This file includes x2_inc_itemprop. |
x2_inc_ws_smith | Main include file for the weapon upgrade smith. NOTE: This file includes x2_inc_itemprop. |
x3_inc_horse | Horse specific functionality. NOTE: This file includes x0_i0_position, x0_inc_henai, and x3_inc_skin. |
x3_inc_skin | This file contains several functions for handling player skins and variables stored on them. NOTE: This file includes x3_inc_string. |
x3_inc_string | This file contains several useful string processing functions. |
(none) | Functions which do not appear in #include files. |
The following files are not truly include files as they contain a void main() function. They have been pulled out of the previous file listing and moved down here. They should not even be on this page but have been left here for back compatibility of the Lexicon.
NOTE: Many of the files listed here are not true include files as they contain a void main() function. Files with a void main() function WILL NOT work when included in a script that already has a void main(). If you attempt to do so you will get compile error (ERROR: DUPLICATE FUNCTION IMPLEMENTATION (main)).
Name | Description |
---|---|
nw_all_feedback5 | Player transports to last recall-bind position. NOTE: This is not a true include file as it contains a void main() function. |
nw_c3_waypoint1 | Do my patrol route, if my heartbeat is on. When get to the end of the waypoints, will start back the other way. NOTE: This is not a true include file as it contains a void main() function. |
nw_cd_lv123 | NOTE: This is not a true include file as it contains a void main() function. |
nw_ch_ac7 | Henchman death script. NOTE: This is not a true include file as it contains a void main() function. |
nw_ch_fighter1 | This file is basically useless. The entire contents of the void main function have been commented out. The two functions are prototyped but not defined.
NOTE: This is not a true include file as it contains a void main() function. |
nw_d2_racesnh | This is the template function for the conversation editor. |
nw_o0_death | Handles the default behavior that occurs when a player dies. NOTE 1: This file includes x3_inc_horse. NOTE 2: This is not a true include file as it contains a void main() function. |
nw_o0_respawn | Generic On Pressed Respawn Button. NOTE 1: This file includes nw_i0_plot. NOTE 2: This is not a true include file as it contains a void main() function. |
nw_o2_classweap | This file is EXACTLY the same as nw_o2_feat. NOTE 1: This is not a true include file as it contains a void main() function. |
nw_o2_feat | Spawns in a magical SPECIFIC weapon suited for that class. Will spawn in either a generic or specific, depending on the value. NOTE 1: Only works on containers. NOTE 2: This file is EXACTLY the same as nw_o2_classweap. NOTE 3: This file includes nw_o2_coninclude. NOTE 4: This is not a true include file as it contains a void main() function. |
nw_o2_skeleton | Turns the placeable into a skeleton if a player comes near enough. NOTE: This is not a true include file as it contains a void main() function. |
nw_s0_conecold | Cone of cold spell. NOTE 1: This file includes x0_i0_spells and x2_inc_spellhook. NOTE 2: This is not a true include file as it contains a void main() function. |
nw_s0_gate | Gate spell. NOTE 1: This file includes x2_inc_spellhook. NOTE 2: This is not a true include file as it contains a void main() function. |
nw_s0_grshconj | Greater shadow conjuration spell. NOTE: This is not a true include file as it contains a void main() function. |
nw_s0_prisspray | Prismatic spray spell. NOTE 1: This file includes x0_i0_spells and x2_inc_spellhook. NOTE 2: This is not a true include file as it contains a void main() function. |
nw_s0_summon | Handles various summon creature spells.
NOTE 1: This file includes x2_inc_spellhook. NOTE 2: This is not a true include file as it contains a void main() function. |
nw_s3_alcohol | Handles getting drunk from beer, spirits and wine. NOTE: This is not a true include file as it contains a void main() function. |
author: NWN Lexicon Group, editor: Kookoo, Mistress, contributor: Kookoo