From NWN Lexicon
Jump to: navigation, search

A pointer to an object in the module. Objects can be areas, areas of effect, creatures, doors, encounters, items, placeables, stores, triggers, waypoints, and even the module itself.

You can use ObjectToString to see how the game references these. PCs are referenced from 7FFFFFFF (or 0x7FFFFFFF if you were able to define it yourself as an int) downwards, while objects start at 0 (or 0x00000000 if you were able to define it as an int) and work upwards. This may be useful for when GetIsPC fails in some game edge cases - see that article for details. The player ID is generated on login, and retained until the server is restarted.

You can't do StringToObject or IntToObject so these numbers are otherwise only useful for debugging. Instead you can save/load these with SetLocalObject and GetLocalObject or loop them with various other functions.

To see a bit about this see the NWNXEE source code.


See Also