NWScript Dissassembly

After Neverwinter Nights just came out, I started dissembling the NWScript bytecode that it uses internally for its game engine, with the intention of writing a command-line script compiler some day. I since stopped work on it since I had a few other things to do. It seems that the great Torlack (who now works at BioWare) beat me to it, but I thought I’d put up my results for download anyway. For budding dissasemblers (like myself :-), I’ve also put up all the scripts I used to try to figure out the bytecode, which may be more important than the bytecode itself for some people.

Note that BioWare provides their own command-line compiler now anyway, if you have a version more recent than 1.40 or something like that—see utils\clcompile.exe.

I find it interesting that BioWare chose their own scripting format for NWN considering that they used the very flexible and extensible Lua for Baldur’s Gate I/II (which is also used in a number of other games; in fact, one of the Monkey Island games had a bar named Lua as a dedication to the Lua community for their great efforts). While NWScript is OK as a language, I certainly wonder why they didn’t stick with Lua …

Anyhoo, feel free to download the results of my peeking and poking.

blog comments powered by Disqus