Introduction to A.P.E.
A.P.E. (Anachronox Programming Environment) is the scripting language layer that controls most of the standard interactivity within the world. If you can click something in the world that triggers a dialog, interface, or event, then chances are APE has played a major part in it. Now before you hop straight into APE, there are a few things you should know about it.
APE was originally written as a simple dialog parser. However as more interactivity was needed it was added to, and slowly it evolved into a relatively powerful scripting language. This evolution is important to understand when looking at the
structure of the language. The first major thing you might notice is that there are two types of functions in APE, a window and a switch, and instead of function names there are sequences. These sequences are comprised of a bank and entry number. A typical window header might
look like this:
#window 123:1024In this case #window is the type "123" is the bank, and "1024" is the entry. Typically a single bank number is used for an entire map or project. The APE lessons will get into all of this in much greater detail, so don't worry if this doesn't make sense at the moment.
The next major thing you might notice is that most of APE's power is external from APE itself. Since APE was originally only for dialog, additional features have been written into functions called externs. You can simply call these externs from APE to do an unlimited amount of things, from setting the XYZ of an entity, to adding to inventory, to fading out the screen. There are dozens and dozens of APE externs available, and with the DLL structure of Anachronox, it is even possible to add your own.
Lastly, if this is your first time looking at APE, I highly recommend you start with the Ape Lessons.
If you have any APE specific questions, drop me a line at thezealot@thezealot.com. I will try to answer them, as time permits. Please make sure you scour the documentation for your answer first, before mailing.