logo logo

Functions Module Documentation

Documentation and program are © by Ingmar Stieger (Papillon). Version 0.2 of 31.12.2003.

Table of Contents:

I. What does this module do?
II. Using the module

I. What does this module do?

This is an experimental module that gives access to some new functions to use with items. Note the "experimental" ! You can use the functions, but they will likely crash your server if you don't use them properly (as demonstrated in the demo module "function_demo.mod"). Consider this a tech demo.

Licence
This module is distributed unter the terms of the GNU GENERAL PUBLIC LICENSE included in licence.txt.

II. Using the module

A. Importing the erf

  1. Place the file "functions_include.erf" into the C:\Neverwinternights\NWN\erf directory.
  2. In the toolset, open up the module into which you wish to install the scripts.
  3. Under the File Menu, click Import. A window will pop up.
  4. Make sure the contents of the C:\Neverwinternights\NWN\erf directory are showing in the window
  5. Select "functions_include.erf" from the list
The following script should now be imported: nwnx_functions.

B. Using the new functions

The functions below are implemented. Here is a lexicon containing information on their purpose and use:

void SetLockUnlockDC_(object oObject, int iDC)

Set the DC for unlocking oObject.

int GetArmorAC_(object oObject)

Get the AC of armor oObject

void SetArmorAC_(object oObject, int iAC)

Set the AC of armor oObject. Note: this will only be updated when the clients either leaves the game or the current area.

void SetGoldPieceValue_(object oObject, int iValue)

Set the gold piece value of oObject

void SetTag_(object oObject, string sValue)

Set tag of oObject to sValue Note: If you set change a tag, you won't be able to retrieve it with GetObjectObjectByTag() later on (in the same session, that is).

string GetDescription_(object oObject)

Get description of oObject. Currently only works for items.