Neverwinter Vault

Expand AllContract All -Site -My Profile -Features

Neverwinter Nights 2

-NWN2 Files -NWN2 Game Info -NWN2 Resources -NWN2 Community

Neverwinter Nights

-NWN Files -NWN Game Info -NWN Resources -NWN Community

Vault Network
RPG Vault
VN Boards
IGN Vault
Vault Wiki
· Age of Conan
· Anarchy Online
· Asheron's Call
· Dark Age of Camelot
· City of Heroes
· D&D
· EVE Online
· EverQuest
· EverQuest 2
· Final Fantasy
· Guild Wars
· Lineage 2
· Lord of the Rings Online
· Middle Earth
· Neverwinter Nights
· Pirates of the Burning Sea
· Rise of the Argonauts
· Star Wars Galaxies
· Tabula Rasa
· The Matrix Online
· The Witcher
· Titan Quest
· Two Worlds
· Vanguard
· Warhammer
· World of Warcraft

Planet Network
Planet Hub

IGN
Games
Cheats
Entertainment

The Web   The Site  



NWN OTHER

- Jump to comments -
Title  NSM - bytecode assembler for NWScript
Author  Wu
Submitted / Updated  11-08-2008 / 11-09-2008
Category  Application
Format  Exe File
Description
NSM - A commandline bytecoder for NWScript!

NWScript is a scripting language used in the game Neverwinter Nights. The script source (.NSS) can be compiled into binary form (.NCS) in the Aurora Toolset or via commandline tools (CLCOMPILE.EXE or NWNNSSCOMP.EXE).

The binary form can also be decompiled into byte codes by NWNNSSCOMP.

For those who are interested, this program demonstrates how to assemble the bytecodes into the binary form using a batch file and FASM.

The sample bytecode source file (example.nsm) looks like this:

consts "Hello World!"
GetFirstPC
SendMessageToPC
retn

and means in terms of nwscript:-

void main()
{
SendMessageToPC(GetFirstPC(),"Hello World!);
}

So what does this all mean? Probably not much. It is an alternate way to code scripts and may allow (possibly, I think) one to produce binary output that are not possible before.

ps. The output produced by NSM is for Neverwinter Nights v1.69 and may not work in earlier versions.

ps2. The files inside the include directory are scripts that translate bytecodes. NW.INC in particular contains the byte code definitions. NWFUNC.INC holds the NWScript engine routines, and NWCONST.INC the constants.

Updates
9/11/2008:
- Fixed JMP, JSR, JZ, JNZ
- Added support for parameters
- Fixed declaration of floats

Files

NameTypeSizeDownloads
nsm.rarnsm.rar
Submitted: 11-08-2008 / Last Updated: 11-09-2008
rar119.83Kb99
NSM bytecoder for NWScript. To extract you can use Winrar (www.rarlab.com) or 7-zip (www.7-zip.org).
SCORE OUT OF 10
10
1 votes
View Stats
Cast Your Vote!

PORTFOLIO
Add this entry to your portfolio so you can track it
Manage your existing portfolios or create a new one.
SCREENS
No Images




You Must Be Logged In to Participate.
Comments (2):

Posted by whuetsi at 2008-11-10 00:26:56    
Thanks! Unfortunately pointer operations are still not possible because stack instructions only accepts immediate constants and not memory addresses.

Probably the only dubious advantages of coding in byte code is a smaller output binary size (even smaller than using NWNNSSCOMP) and the ability to pass variable number of arguments to subroutines.

My skills are rather limited, but I hope I can add type checking and ability to support the full range of parameter types for the engine routines, such that one can write lines like this:
SendMessageToPC GetFirstPC,"Hello World!"


Posted by Saduj at 2008-11-09 10:57:02    Voted 10.00 on 11/09/08
Very cool, i can see how this could have a lot of potential.
_________________________
Carcerian/Saduj's Submissions: (169 Portrait/Soundset Unlocker) (12 NWN Fonts) (30 NWN Fonts) (Auto-Emotes) (Custom Dragon Disciples) (Dynamic Wildshape) (Keyring) (NPC Schedules) (Sacred Shields) (Spawning Undead) (Shayans Subrace Engine for 169)

You must be Logged In to post comments in this section.

 
Most recent posts on the MMO General Boards
Analyst: Star Wars: The Old Republic Could...Analyst: Star Wars: The Old Republic Could Sell 3M: more numbers
- last reply by Acao on Aug 15, 2011 06:15 PM
which class will your first character be
- last reply by Blisteringballs on Aug 15, 2011 05:50 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 05:00 PM
New Community Content!
- posted by Vault_News on Aug 15, 2011 04:00 PM
NWN Idea Database Update
- posted by Vault_News on Aug 15, 2011 03:46 PM
Missing Votes for NWN2 Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:40 PM
Missing Votes for NWN Hall of Fame
- posted by Vault_News on Aug 15, 2011 03:39 PM
Random Questions and game altering suggest...Random Questions and game altering suggestions!!!
- last reply by ArkadyTepes on Aug 15, 2011 03:22 PM
State of the game?
- last reply by LyricOpera on Aug 15, 2011 01:37 PM
Yesterday streaming, now demanding downloa...Yesterday streaming, now demanding download :(
- last reply by Sinane-tk on Aug 15, 2011 10:23 AM
 

   


IGN Entertainment
By continuing past this page, and by your continued use of this site, you agree to be bound by and abide by the User Agreement.
Copyright 1996-2011, IGN Entertainment, Inc. | Support | Privacy Policy | User Agreement | RSS Feeds
IGN’s enterprise databases running Oracle, SQL and MySQL are professionally monitored and managed by Pythian Remote DBA.


NWN2 Hall of Fame

HOF NWN2 Tutorials


View all Hall of Fame entries


Neverwinter Nights 2

TOP NWN2 Modules

NEW Modules

NEW Reviews

NEW INTL. Modules

TOP Hakpaks

TOP Gameworlds

TOP Tutorials

TOP Prefab:Areas

TOP Blueprints

TOP Plugins

TOP UI

TOP Other

TOP Visual Effects

TOP Scripts

TOP Tools

TOP Movies

TOP Models

TOP Characters





Hall of Fame

HOF NWN Modules


View all Hall of Fame entries


TOP NWN Modules

NEW NWN Modules

NEW Reviews

TOP Intl. Modules

TOP NWN Hakpaks

TOP NWN Gameworlds

TOP NWN Models

TOP NWN Portraits

TOP NWN Scripts

TOP NWN Prefabs

TOP NWN Other

TOP NWN Movies

TOP Sounds

TOP NWN Textures

TOP NWN Creatures

TOP NWN Characters