buried in the official Toolset documentation is a section about naming conventions for scripts. I've replicated it here for easy reference.
All scripts in NWN2 are are prefixed with one of the following:
Use the following for item scripts:
|
i_<Item Tag>_ac |
script to execute when item activated |
|
i_<Item Tag>_aq |
script to execute when item acquired |
|
i_<Item Tag>_ua |
script to execute when item unacquired |
|
i_<Item Tag>_eq |
script to execute when item equipped |
|
i_<Item Tag>_ue |
script to execute when item unequipped |
The module events will be written to automatically execute the proper script.
Conversations have 2 script types.
|
a_<Speaker>… |
actions taken |
|
c_ <Speaker>… |
conditional (Text appears when...) |
Scripts for events on objects should have a prefix to indicate the Object Type. If an object has multiple events, a suffix should be added each script to indicate the Event Type.
|
Object Type |
Abbreviation |
|
Area |
use area num |
|
Creature (Being) |
b |
|
Door |
d |
|
Encounter |
e |
|
Merchant |
m |
|
Placeable |
p |
|
Trigger |
tr |
|
Event |
Abbreviation |
Area** |
Creature |
Door |
Encounter |
Merchant |
Placeable |
Trigger |
|
|
X |
|
|
|
|
|
||
|
click* |
ck |
|
|
X |
|
|
|
X |
|
close* |
cs |
|
|
X |
|
X |
X |
|
|
combat round end* |
ce |
|
X |
|
|
|
|
|
|
conversation |
co |
|
X |
|
|
|
|
|
|
damaged |
da |
|
X |
X |
|
|
X |
|
|
death |
de |
|
X |
X |
|
|
X |
|
|
disturbed |
di |
|
X |
|
|
|
X |
|
|
enter |
en |
X |
|
|
X |
|
|
X |
|
exhausted* |
ed |
|
|
|
X |
|
|
|
|
exit |
ex |
X |
|
|
X |
|
|
X |
|
fail to open |
fa |
|
|
X |
|
|
|
|
|
heartbeat* |
hb |
X |
X |
X |
X |
|
X |
X |
|
lock |
lo |
|
|
X |
|
|
X |
|
|
open |
op |
|
|
X |
|
X |
X |
|
|
perception |
pe |
|
X |
|
|
|
|
|
|
physical attacked |
at |
|
X |
X |
|
|
X |
|
|
rested |
re |
|
X |
|
|
|
|
|
|
spawn |
sp |
|
X |
|
|
|
|
|
|
spell cast at |
ca |
|
X |
X |
|
|
X |
|
|
unlock* |
ul |
|
|
X |
|
|
X |
|
|
used |
us |
|
|
|
|
|
X |
|
|
user defined* |
ud |
X |
X |
X |
X |
|
X |
X |
* These abbreviations don’t use the first 2 letters of the event name.
** Areas don’t need abbreviations.
Boldfaced events are defaults and are assumed if no event is given.
Scripts not covered above should use these prefixes
|
inc_ |
include file |
|
ai_ |
artificial intelligence (combat ai) |
|
n_ |
extra miscellaneous script |
Recent comments
3 years 42 weeks ago
3 years 42 weeks ago
3 years 42 weeks ago
3 years 48 weeks ago
3 years 48 weeks ago
4 years 12 weeks ago
4 years 13 weeks ago
4 years 17 weeks ago
4 years 17 weeks ago
4 years 20 weeks ago