Make your own free website on Tripod.com
NPC ACTIVITIES
By
Deva Bryson Winblood
Click here if you want to return to the projects home page for Deva and Jeremy.

INTRODUCTION:

    NPC Activities is with out a doubt the most successful release I have made to the Neverwinter Nights community in terms of popularity.   At the time this introduction is being written it is currently the 2nd most downloaded script of all time from http://nwvault.ign.com

    NPC ACTIVITIES is a scripting package that goes FAR beyond the WalkWayPoints() provided with Neverwinter Nights.   Like WalkWayPoints(), I opted to use waypoints to handle most of the setup needs for NPCs.   This turned out to be a good move as it makes it very quick and easy to setup extremely complex NPCs with little or no scripting abilities required.

   NPC ACTIVITIES features 183 commands which require no scripting, as well as many additional commands that were supplied by extended libraries.   It features 82+ page documentation which has received a lot of praise for how detailed it is.   The documentation covers adding your own libraries and custom scripts if you are a scripter and wish to do so.

   WHY DID I MAKE NPC ACTIVITIES WHEN I CAN SCRIPT?:  Well, any self respecting programmer knows that programs are especially good for one thing.  If you are repeating the same steps over and over again then you should write a program to handle it instead of doing it yourself.   I found myself rewriting the same parts of code over and over again to get NPCs to behave the way I wanted.   I also had tried WalkWayPoints() and it just did not satisfy the needs I had in mind.   I tried other NPC systems and they still required scripting which was not their downfall.  It still required a lot of repetitive scripting.   So, I named a script GENERIC NPCS and started trying an ecosystem approach in what was called NPC ACTIVITIES 1.0 and was never released to the public.   It resulted in a cow walking out of the barn on its own and going over near a guard tower and falling asleep.   Now, while I found this all very amusing and unpredictable it just did NOT work for what I needed.   So, with NPC ACTIVITIES 2.0 I decided I would take the Bioware WalkWayPoints() model and extend it as much as I could.  There was great potential to store commands on the name of the waypoints and it was not being used.  So, I released NPC ACTIVITIES 2.0.   Some people used it but, it did not catch on that quickly.   I had things I needed to add and change so I released NPC ACTIVITIES 3.0.   This one began to generate some interest.  It generated enough interest that I was under a lot of pressure to release NPC ACTIVITIES 4.0.   4.0 was a success but, was very rushed and I stressed out and spent many nights programming until 3 or 4 in the morning.   5.0 I kept quiet about progress wise until I was almost 100% done so, I would not have to deal with the pressure.   I designed 5.0 to be extendable, and customizable without requiring a complete rewrite.  So, while a 6.0 is feasible (there are some engine things I could improve) it is not ultimately neccessary as I can continue to extend 5.0.   Other people can do so also.

   I was thinking of my children and wife when I made 3.0.  I was thinking they might want to make their NPCs move about and do neat things and none of them know any scripting.  Therefor, it is easy to use.

EASY:  NPC ACTIVITIES is easy to use.  It has so many features that when you look at the 82 page document you may thing "WHOA THAT'S TOO MUCH" but, the documents all offer features and some of the documentation may not pertain to you.  Each of the 183 commands are described in detail, there are many examples, etc.

MODULES THAT I KNOW USE NPC ACTIVITIES: (If you have one please send me the link)
The Graveron Seduction by G.R. "LeBlaque" Matthews.
The Graveron Seduction - Multi by G.R. "LeBlaque" Matthews.

LINKS RELATED TO NPC ACTIVITIES & INFORMATION:

NPC ACTIVITES current release  DOWNLOAD

 

VERSION HISTORY FROM OUT OF THE DOCUMENTATION:

5.5       Version 5.5 – Bioware introduced an additional WalkWayPoints() into the default

            OnPerception script nw_c2_default2.  This was affecting Shadows of Undrentide

            users.   I remedied this by creating a gennpc_onper script and making it be the

            script that comes with 1.30.  This will work for SoU users as well.

5.4              Version 5.4 – 5.3 was recompiled on a SoU machine and seemed to demand SoU

be installed in order to use it.  Therefor, part of what this release offers, is a new

recompile done on a purely NWN 1.30 machine.  Updated Visual Effects tables

and added in Beam Effect Numbers, and Duration effect numbers.

5.3       Version 5.3 -     Patch 1.30 and Shadows of Undrentide seems to have unstabilized

            some things.  I recompiled all the scripts and repackaged it up.  Built a simple test

            module and tested the scripts.

5.2       Version 5.2       - Some of the updates did not correctly make it into the file

            that was uploaded though they were here and correct.

5.1       Version 5.1       -  Release 5.0 had some issues with SIT since the GetTag()

                        was corrected by Bioware.  I was using a workaround to the problem

                        with GetTag() in 1.28 NWN.  So, I had to reverse that.  Also compiled

                        the scripts in this version using Torlack’s scripts and fixed an issue

                        with some of the changes I found in 5.0.

5.0       Version 5.0       -  CORE FUNCTIONS COMPLETE (next releases will be

                        focusing on NPC ACTIVITIES PROFESSIONS)

                        Modified npcact_wrap9 so, that custom spawn scripts works.

                        Fixed infinite loop problem with gossip command.

                        Made GetNearestObjectByTag() be used first before resorting to using

                        the standard function GetObjectByTag().

                        Made it possible to completely disable GetObjectByTag() in this script.

                        Modified GetUnstuck() function per discussion with Lupus Yonderboy.

                        Modified GetDistanceBetween() to go back to using the function

                        used in older versions GetDistanceToObject().  This was done to address

                        a bug introduced with version 1.29 of NWN.

                        Added several new custom libraries.

5.0b9   Version 5.0b9 – Beta 9 – This is hopefully the last beta before going final on the

             core functions.  It also offers several additional npcactdlln# libraries.

5.0b8   Version 5.0b8 – Beta 8 – Added final command # for library execution and froze

             existing commands in place.  New commands will be implemented by way of

             libraries.   Completed the creating your own commands portion of the

             documentation.

5.0b7    Version 5.0b7 – Beta 7 – The new commands LYRIC and RWL were not

             working properly.  Was due to an error the compiler did not catch.  This has

             been fixed.  These commands are interesting enough that Beta 7 is being

             released on the same day as Beta 6.

5.0b6   Version 5.0b6 – Beta 6 – Sorted the detailed command descriptions in the

             documentation and cleaned up some of it.  Added the TT command, and

             the FOTG command.   Added GONG OnUse script.

5.0b5   Version 5.0b5 – Beta 5 – Adjusted Anti-stuck again so that NPC will never walk

              more than 8 meters towards a random object.  This will prevent NPC from

             accidentally wandering too close to other hostile NPCs simply because of the

             anti-stuck behavior.  Adjusted Cc command so, that if NPC issues Cc for the

             clothing NPC is already wearing NPC will no longer strip the clothing off.

             Added the CP (Create Placeable), DO (Destroy Object), RWL

             (Random Word List), AO (Attack Specific Object), LYRIC (sing song with

 custom lyrics), and SITS (Sit specified length) commands.  Added the following:

 added a placeable use script NPCACT_USE_ANVIL which was put

 in for making a blacksmith pound on an anvil. Added a list of what spells can be

cast using the CAST command.  (THIS WAS A BIG UPDATE!!)   Looked into and hopefully resolved an issue with the VFX command that kept it from working properly. The VFX command is for PERMANENT effects.  A new command EFF has been added to provide TEMPORARY, and INSTANT effects.  It will be

 explained in the command section. In addition the ANIM command has been

 provided so a specific animation can be requested for a specific amount of time.

 Adjusted to WOPC and WOCR commands again.  They work completely now.

5.0b4    Version 5.0b4 – Beta 4 – Adjusted Anti-Stuck to not walk full distance to doors

              so that it would not trigger opening the doors.  Made adjustments to abbreviated

             commands beginning with S so that they would not also call the SAY command.

             Made adjustments to the ATTACK PLACEABLE command.

5.0b3   Version 5.0b3 – Beta 3 – Heavy documentation update.  Tweaked some settings

              based on feedback from users.  Adjusted some settings for WOPC and WOCR.

              Problem at NIGHT when only POST_ is used with NPCs just standing at their

              POST_ and no longer walking.  Resolved.

5.0b2     Version 5.0b2 – Beta 2 – Forgot to turn off debug messages in b1.  Released

              with debug messages turned off.

5.0b1     Version 5.0b1 – Beta 1 – First Beta release featuring 100% completion

              of core functionality and backwards compatibility.

5.0a2     Version 5.0a2 – Alpha 2 – released only to three people.

4.5.0      Version 4.5.0 – Provided a placeable to use to force NPCs in areas with

               no PCs to fire heartbeats.

4.4.0            Version 4.4.0 – Provides a fix to the Too Many Instruction Errors

     If for some reason you continue to experience this error go into

     The NPCACTIVITIESH file and change the NPCACT_MAX_SCAN = 20

     Line to a smaller number such as NPCACT_MAX_SCAN = 15  Keep this

     Number as high as you can but, reduce it until the TMI errors go away.

     ERROR STILL TRYING TO FIX:  Occasionally, NPCs vanish completely

     When they are transitioning to a waypoint they cannot reach.  I am looking

      Into this and will upload another version when I find it.  I have read people

      Having this happen and I have had it happen twice.

4.3.0      Version 4.3.0 - Provides fixes to the SIT command and some other

              updates.

4.2.1      Version 4.2.1 – Offers a custom library NPCACTDLLMOVE which

              currently has two move circuit commands for no pause moving.  It fixes

              an issue with the Run, Walk, Teleport, options.  It adds some script changes

              that should prevent NPC from breaking off conversation and running back to

              waypoints.

4.1.0      Version 4.1.0 – A major flaw in the hours of operation portion of the

              waypoint was fixed.  Before the fix only the A hours of operation functioned

              properly.  Some custom traps added.

4.0.0      Version 4.0 – First public release of NPC ACTIVITIES 4.0

                 LAG 4 command still faulty and no CRSP support yet

3.0.3b    Version 3.0.2b of NPC Activities bundled with this document.  This document

              is why the revision of the number.  There is no code change from 3.0.2b.

3.0.2b    Resolved issue of NPCs walking away in the middle of conversation

3.0.1b    Problems with RC## command resolved

              Problems with & IF commands resolved

              Implemented SUM# command.  It is now active.

              Implemented CLO# command.  It is now active.

3.0b       First public release version

2.0         Version used by the author prior to 3.0

1.0         Ecosystem based predecessor