Introduction to scripting

Scripts are the glue that holds Blades of Avernum together. Every message box that pops up is the result of a script. Whenever you talk to a non-player character, all lines of dialogue are present in a script. Even the actions of the monsters you fight are controlled by a script. It's simply impossible to create a Blades of Avernum scenario without any scripts. There are many guides available that can help teach you scripting. Many are linked on the resources page.

I highly recommend that you read the Editor documentation at some point in the future, as it contains the the official documentation on AvernumScript. However, since you're reading this tutorial, it's likely that you'd rather learn 'on the job' rather than reading the manual. That's fine! As a first-time designer, you don't need to know everything about AvernumScript. You will need to know some basics, though. This tutorial will guide you through the most common scripting tasks as we finish our little scenario:

AvernumScript is rather simple, as far as scripting languages go, but if you've never programmed before, it might take a while to wrap your head around it. Don't fear! This tutorial will guide you through everything, step by step. Remember, if you ever run into problems, with scripting or any other aspect of scenario design, you can always ask for help on the Blades of Avernum Editor forum. Most questions get answered very quickly.

Editing AvernumScript involves editing plain-text files (files that end in .txt). Any program that edits plain-text files, such as Wordpad, will work for writing AvernumScript (using word processors like Microsoft Word is not recommended, as these don't use the plain-text format). When I work on AvernumScript, I use an editor called Programmer's Notepad 2. Programmer's Notepad 2 offers several advantages over simpler editors like Wordpad (which comes with all Windows computers). In particular, I wrote a scheme file that performs 'syntax highlighting' — AvernumScript keywords are highlighted, making scripts easier to read and debug. I considered making a short Programmer's Notepad 2 tutorial, but the product still has a few bugs and other kinks to sort out. If enought people are interested, however, I would be willing to write a tutorial demonstrating how to install the AvernumScript scheme.

Time to learn about the most common instance where scripting is necessary: special encounters.