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


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

NOTE: 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: Includes nw_i0_generic.
nw_i0_genericContains a slew of useful functions.
nw_i0_henchmanThis is the include file for the henchmen who can join the player.
nw_i0_ochrejellyHandles the "Split" functionality of the Ochre Jellies.
nw_i0_plot
nw_i0_plotwizardDeclarations and definitions of functions used by the plot wizard.
nw_i0_spellsSpell related functions.
nw_i0_tool
nw_j_artifactArtifact plot functions.
nw_j_assassinAssassin plot functions.
nw_j_complex
nw_j_fetch
nw_j_guard
nw_j_rescue
nw_j_story
nw_j_theftTheft plot functions.
nw_o0_itemmakerGeneral Magic Item + Reagent smith system. Uses CustomToken #777.

NOTE: 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_assocLibrary holding generic code for associates.
x0_i0_behaviorLibrary holding code for creature behaviors.
x0_i0_caltropsSmall include library for caltrops effect.

NOTE: This file includes nw_i0_spells.
x0_i0_campaign Include library for setting variables solely for specific campaigns. These use the "Campaign" var functions.

NOTE: This file is included in x0_i0_partywide, which is included in x0_i0_common.
x0_i0_combatLibrary for the XP1-specific modified combat AI.

Includes x0_i0_talent.
x0_i0_commonCommon functions used across multiple include files.

NOTE: This file includes x0_i0_partywide and x0_i0_transport.
x0_i0_corpsesInclude library 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 for nw_i0_generic. Included in x0_inc_generic, as that's the first base library.
x0_i0_deckmanyLibrary for the deck of many things.

NOTE: This file includes x0_i0_henchman and x0_i0_treasure.
x0_i0_destroySmall include 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_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 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_highlightSmall library 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_modesSmall include library for various behavior modes, such as stealth mode, detect mode, etc.
x0_i0_npckilledSmall library 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.

NOTE 2: This file is included in x0_i0_common.
x0_i0_petrifySmall library for petrification-related functions.
x0_i0_plotgiverShared routines for plotgiver NPCs.

NOTE: This file includes x0_i0_common.
x0_i0_positionInclude file for functions that can be used to determine locations and positions.
x0_i0_projtrapSimple library for projectile traps.
x0_i0_secretShared functions for secret/hidden items.

NOTE: This file includes x0_i0_common.
x0_i0_seennodeSeen Conversation Node include file
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.
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_stringlibThis library contains general string-manipulation functions for convenience.
x0_i0_talentLibrary for talent functions.

NOTE: This file includes x0_inc_generic.
x0_i0_transformSmall include library 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_treasureInclude library for XP1 treasure generation system.

NOTE: This file includes nw_o2_coninclude.
x0_i0_voice
x0_i0_walkwayInclude library holding the code for WalkWayPoints.
x0_inc_genericNOTE: 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_portalThis include file is for the portal stone.

NOTE: This file includes x0_i0_henchman.
x0_inc_skillsThis header file is for all the designer driven skills.

NOTE: This file includes nw_i0_plot.
x0_inc_statesDetermines and stores the behavior of the associates used by the PC.
x1_inc_cutsceneThis is the cutscene include file that contains many useful functions when doing cutscenes.
x2_am_incGeneric system for TownLife 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 requried 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_cutsceneThis is the cutscene include file that contains many useful functions when doing cutscenes.
x2_inc_globalsNOTE: 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_itempropHolds item property and item modification specific code.
x2_inc_plotThis include file has all the commonly needed functions required for this module.
x2_inc_restsysWandering monster rest system include.
x2_inc_shifterThis file holds functions tied to the XP 2 shifter class and its abilities.
x2_inc_spellhookThis file acts as a hub for all code that is hooked into the nwn spellscripts.

NOTE: This file includes x2_inc_craft.
x2_inc_summscaleThis file holds 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.
(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_fighter1NOTE: 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: 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_classweapSpawns 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 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 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: This is not a true include file as it contains a void main() function.
nw_s0_gateGate spell.

NOTE: 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: This is not a true include file as it contains a void main() function.
nw_s0_summonHandles various summon creature spells.

NOTE: 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