#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.


NameDescription
inc_mf_combatMindflayer combat round include file. Perform specific Mindflayer combat actions.

NOTE: This file includes nw_i0_generic and nw_i0_spells.
inc_xp2_familiarFunctions to determine familiar and animal companion types for dialogue files.
nw_i0_2q4luskanGeneric plot and global setting functions for 2Q4 (Luskan plot include).
nw_i0_assocGeneric associate commands.

NOTE: This file includes nw_i0_generic.
nw_i0_genericContains a slew of useful functions.

NOTE: This file includes x0_i0_anims and x0_i0_behavior.
nw_i0_henchmanThis 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_ochrejellyHandles the "Split" functionality of the Ochre Jellies.
nw_i0_plotContains a slew of useful functions.

NOTE: This file contains several constants and functions that are also present in nw_i0_tool.
nw_i0_plotwizardDeclarations and definitions of functions used by the plot wizard.
nw_i0_spellsSpell related functions.
nw_i0_toolNOTE 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_artifactThese functions are specific to the Official Campaign.

NOTE: None of the functions contained in this file have prototypes.
nw_j_assassinThese functions are specific to the Official Campaign.

NOTE: None of the functions contained in this file have prototypes.
nw_j_complexThese functions are specific to the Official Campaign.

NOTE: None of the functions contained in this file have prototypes.
nw_j_fetchThese functions are specific to the Official Campaign.

NOTE: None of the functions contained in this file have prototypes.
nw_j_guardThese functions are specific to the Official Campaign.

NOTE: None of the functions contained in this file have prototypes.
nw_j_rescueThese functions are specific to the Official Campaign.

NOTE: None of the functions contained in this file have prototypes.
nw_j_storyThese functions are specific to the Official Campaign.

NOTE: None of the functions contained in this file have prototypes.
nw_j_theftThese functions are specific to the Official Campaign.

NOTE: None of the functions contained in this file have prototypes.
nw_o0_itemmakerGeneral Magic Item + Reagent smith system. Uses CustomToken #777.

NOTE: This file includes nw_i0_plot.
nw_o2_conincludeHandles the random treasure distribution for treasure from creatures and containers.
x0_i0_animsLibrary for playing random animations.

NOTE: This file includes x0_i0_modes, x0_i0_position, x0_i0_voice, and x0_i0_walkway.
x0_i0_assocGeneric 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_behaviorLibrary holding code for creature behaviors.
x0_i0_caltropsLibrary for caltrops effect.

NOTE: This file includes nw_i0_spells.
x0_i0_campaignLibrary for setting variables solely for specific campaigns. These use the "Campaign" variable functions.
x0_i0_combatLibrary for the XP1-specific modified combat AI.

NOTE: This file includes x0_i0_talent.
x0_i0_commonCommon 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_corpsesLibrary for creating corpses, blowing things up, etc.

NOTE: This file includes x0_i0_position.
x0_i0_dbThis file is an include wrapper for all the database functions, to provide any additional uniqueness support that may be required.
x0_i0_debugSmall library of debugging functions.
x0_i0_deckmanyLibrary for the Deck of Many Things.

NOTE: This file includes x0_i0_henchman and x0_i0_treasure.
x0_i0_destroyLibrary to handle destroying multiple objects with the same tag. Also has some utility functions for handling multiple objects with the same tag.
x0_i0_enemyLibrary with functions for finding and identifying enemies.

NOTE: This file includes x0_i0_match.
x0_i0_equipLibrary that handles equipping weapons functions.

NOTE: This file includes x0_i0_assoc and x0_i0_enemy.
x0_i0_henchmanThis 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_highlightLibrary to generate highlights on objects.
x0_i0_infdesertDesert-specific include file for the infinite desert system.

NOTE: This file includes x0_i0_position, x0_i0_spawncond, and x0_i0_stringlib.
x0_i0_infiniteLibrary for an infinite space system.

NOTE: This file includes x0_i0_common and x0_i0_infdesert.
x0_i0_matchLibrary 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_modesLibrary for various behavior modes, such as stealth mode, detect mode, etc.
x0_i0_npckilledLibrary to handle process of awarding victory after death in battle with NPCs, and also to handle NPC resurrection by the player.
x0_i0_partywideInclude library for party-wide functions.

NOTE: This file includes x0_i0_campaign.
x0_i0_petrifyLibrary for petrification-related functions.
x0_i0_plotgiverLibrary for plotgiver NPCs.

NOTE: This file includes x0_i0_common.
x0_i0_positionLibrary file for functions that can be used to determine locations and positions.
x0_i0_projtrapLibrary for projectile traps.
x0_i0_secretLibrary for secret/hidden items.

NOTE: This file includes x0_i0_common.
x0_i0_seennodeHelper function for creating the local variable name used in the seennodeX scripts.
x0_i0_spawncondThis 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_spellsExpansion 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_stringlibLibrary of general string-manipulation functions for convenience.
x0_i0_talentLibrary for talent functions.

NOTE: This file includes x0_inc_generic.
x0_i0_transformLibrary for "transforming" objects -- ie, placeables that 'transform' into a creature, like the skeleton bones object.
x0_i0_transportFunctions for making creatures travel/transport to new locations.
x0_i0_treasureLibrary for XP1 treasure generation system.

NOTE: This file includes nw_o2_coninclude.
x0_i0_voiceLibrary of functions to play the various voicechats.
x0_i0_walkwayLibrary holding the code for WalkWayPoints.

NOTE: This file includes x0_i0_spawncond.
x0_inc_genericNew 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_henaiThis is a wrapper overtop of the 'generic AI' system with custom behavior for Henchmen.

NOTE: This file includes x0_i0_henchman.
x0_inc_portalLibrary functions for the portal stone.

NOTE: This file includes x0_i0_henchman.
x0_inc_skillsLibrary functions for all the designer driven skills.

Uses CustomTokens #2001-2004.

NOTE: This file includes nw_i0_plot.
x0_inc_statesDetermines 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_cutsceneLibrary file for cutscene functions.
x2_i0_spellsExpansion 2 and above include file for spells.

NOTE: This file includes x0_i0_spells and x2_inc_itemprop.
x2_am_incGeneric system for town life and encapsulates all 'townie' behavior.
x2_inc_banterInclude file for party banter and other group communication things.

NOTE: This file includes x0_i0_henchman.
x2_inc_beholderInclude file for several beholder functions.

NOTE: This file includes x0_i0_spells.
x2_inc_componThis include file has routines to handle the distribution of components required for the XP2 crafting system.
x2_inc_craftCentral include for crafting feat and crafting skill system.

NOTE: This file includes x2_inc_itemprop and x2_inc_switches.
x2_inc_cutsceneLibrary file for doing cutscenes.
x2_inc_globalsMany 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_intweaponCentral 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_itempropLibrary for item property and item modification specific code.
x2_inc_plotLibrary file with a couple PC and NPC related functions.
x2_inc_restsysLibrary file for the wandering monster rest system.
x2_inc_shifterLibrary file of functions tied to the XP 2 shifter class and its abilities.
x2_inc_spellhookLibrary 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_summscaleLibrary of functions related to scaling up a summoned creature to match the master's level. (i.e. Epic Shadowlord)
x2_inc_switchesThis 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_toollibAdvanced VFX functions for XP2 Chapter 3 and global use.
x2_inc_treasureXP2 Disposeable Treasure System.

NOTE: This file includes x2_inc_itemprop.
x2_inc_ws_smithMain include file for the weapon upgrade smith.

NOTE: This file includes x2_inc_itemprop.
x3_inc_horseHorse specific functionality.

NOTE: This file includes x0_i0_position, x0_inc_henai, and x3_inc_skin.
x3_inc_skinThis file contains several functions for handling player skins and variables stored on them.

NOTE: This file includes x3_inc_string.
x3_inc_stringThis 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)).

NameDescription
nw_all_feedback5Player transports to last recall-bind position.

NOTE: This is not a true include file as it contains a void main() function.
nw_c3_waypoint1Do 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_lv123NOTE: This is not a true include file as it contains a void main() function.
nw_ch_ac7Henchman death script.

NOTE: This is not a true include file as it contains a void main() function.
nw_ch_fighter1This 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_racesnhThis is the template function for the conversation editor.
nw_o0_deathHandles 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_respawnGeneric 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_classweapThis 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_featSpawns 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_skeletonTurns 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_conecoldCone 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_gateGate 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_grshconjGreater shadow conjuration spell.

NOTE: This is not a true include file as it contains a void main() function.
nw_s0_prissprayPrismatic 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_summonHandles 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_alcoholHandles 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