Skip to content

A Few Resources for Scripters

TarotRedhandTarotRedhand Member Posts: 1,481
edited September 2018 in Builders - Scripting
Here is just a short list of resources for scripting in NwN. Not wanting to be accused of spamming these boards I've held off posting this for a while. This collection of links to scripting resources is part informational and part unashamed self-promotional in nature. But I hope you find it all to be of use.

Obviously no list of resources would be anywhere near complete without mention of the lexicon. This vereable document contains most of the reference material that you'll need when writing scripts. This includes amongst other things tutorials, vfx references and explanations of the functions. The only fly in the ointment is that there are 2 versions available. There is the constantly updated but online version that contains information on all of the new EE functions. Then there is the offline version which is complete up to version 1.69. This version has around 97% of the same information as the online version and is in the form of a windows chm help file. On the other hand the offline version is much quicker than the online version and can be more convenient to use. Personally I don't see this as being a matter of choice. Use the online version if you either need info on the EE script functions, you experience some unexpected behaviour or you can't use a chm file. Otherwise use the offline version. Here is the online lexicon and here is
the offline lexicon 1.69 (chm version).

Next on this list are two script generators. Back in the day Lilac Soul wrote a small program that could generate simple scripts in response to user input. For the first time in NwN it was possible to create a fully working module without any scripting knowledge. Or at least better modules. More recently this was updated to cover all the enhancements that had been added to NwN up to and including those of NwN v1.69. For what it is designed for, this works well. My personal recomendation is to use this as a learning tool rather than to rely on it completely. You will find that there are things that you want to do and it just can't do. In the long run you will be better off learning to script. The second script generator was created by some the staff at the Univerity of Alberta in Canada. This is a much more complex beast. It is called ScriptEase 2 and replaces having to write your own scripts with a visual interface (as can be seen on the page linked to). It is (AFAIK) still being used as part of the university's (quoting the web page) "CMPUT 250 (Computers and Games) multidisciplinary game design course". Having experimented with it I am of the opinion that it is not really designed for general day to day scripting. Rather it should be regarded as a (greatly expanded) replacement for the toolset's plot wizard. A couple of other things to note are that while there are tutorials available on the website there really isn't enough documentation to exploit all of its strengths. Also the learning curve is just as steep as if you wanted to learn scripting itself. Anyway, here is the lstk script generator and here is the ScriptEase program.

Back when the current vault was being created, permission was sought and granted for the contents of the ign vault to be migrated across. This happened shortly before the old ign vault closed down. This migrated stuff is kept in a separate location to what you see on the vault today. Some time later, somebody decided to bundle all of the script section up into a single download. Because they hadn't saught my permission to include my scripts I had a bit of a hissy fit (it can happen to even the best of us and I am not in that list) and eventually my scripts were removed from this download. All the rest of those scripts are still available (all 3870+ of them) in a single 980 meg 7z. While at first sight this may appear to be a great idea, there is something you need to be aware of. Each script is in its own folder in the archive. Rather than these folders being called by the title of the thing it contains, the folder is identified by the old ign vaults entry number (so you have folders 1 to 3879). This makes finding things a little difficult to say the least. On the plus side, inside each folder there is a web page that has the original ign information. If you want this large 7z and have a fast enough internet connection it can be found here.

In the early years of NwN Bioware had their own forums (nwn.bioware.com - do not use it's long dead). These were split into sections similar to what are found on here today. In the scripting subsection of these bioware forums a small part was dedicated to 2 different scripting FAQs (aka Frequently Asked Questions). Neither of these FAQs resurfaced when the subsequent forums (there were 2) were created. Fortunately I was able to find them on the wayback machine. In order to make them more accessible I copied the information, edited (mainly spell-checking) and tdied them up. I then prepared them for and saved them as pdf files. The preparation was so that when saved the questions appear as bookmarks when the pdf files are viewed using a proper pdf reader (e.g. adobe acrobat reader or the Foxit reader). I have included a few related documents in the download. The Scripting FAQs can be found here.

Towards the end of the life of that original bioware forums life we had an inkling that they would disappear. That being the case I went through a number of threads dedicated to completed and working scripts. This being before it was common for word processing software to commonly have the facility to save in pdf, I saved these as plain text files. I also created plain text indexes for these so that it made finding what is wanted easier. The final thing I did was to give all the scripts the same programming style so that it made reading them easier. More recently I found links to an old site that Lisa (made some great costumes, holdables and placeables for NwN) and friends used to have. This was by the wayback machine again. On this site I found around 45 scripts that I hadn't seen before. So I followed the same routine as with the earlier scripts (minor edits, layout, indexes, etc.) If you want
the bioware scripts look here and the other scripts look here.

No apologies this final paragraph is purely self-promotional in nature. While the tutorials in the lexicon will doubtless teach you how to script I felt that they didn't go far enough. So I wrote my own which seem to have been well recieved so far. This series are the TR's Basics ebooks. As it stands there are four in the series - "TR's Basics - Variables, Types and Functions (TBC)", "TR's Basics - Decisions", "TR's Basics - Boolean Algebra" and "TR's Basics - Mostly Operators". They are intended to be read in that order and not the order they were uploaded in. My hope is that these are good enough to serve as reference ebooks and not "just tutorials". I hope to create a few more in the future when RL gives me enough free time (if anyone tells you writing tutorials is quick and easy, ignore them).

And that's it for now. I hope you found something useful here.

TR

Comments

  • ShadooowShadooow Member Posts: 402
  • TarotRedhandTarotRedhand Member Posts: 1,481
    Forgot to mention the external NWScript compiler by @Glorwinger. This version has been updated for NwN EE. It is a command line compiler with a large number of switches. Get it here - NWNSC - NWN Enhanced Edition Script Compiler.

    TR
  • CalgacusCalgacus Member Posts: 273
    This is good stuff but is there a good guide to working with scripts outside the toolset script editor? Efficient workflows etc? Should we use the toolset to unpack and repack mods/haks/erfs? Nims tools? NWHak? etc etc I have only ever worked in the toolset except to mod a few 2DAs and never did any of the graphics stuff except once long ago when I made some cloak textures and I forget how I did that except that I did it in Gimp.
Sign In or Register to comment.