From NWN Lexicon
Jump to: navigation, search
Nwnee logo.jpg Note: This article documents Neverwinter Nights: Enhanced Edition new content or changes/updates/fixes to 1.69 functions. These are all listed under the category and patches pages.
Returns the given objects' UUID.
string GetObjectUUID(
    object oObject


A target object, for which the UUID is returned by this function.


Returns the given objects' UUID. This UUID is persisted across save boundaries, like Save/RestoreCampaignObject and save games.

Thus, reidentification is only guaranteed in scenarios where players cannot introduce new objects (i.e. servervault servers).

UUIDs are guaranteed to be unique in any single running game.

If a loaded object would collide with a UUID already present in the game, the object receives no UUID and a warning is emitted to the log. Requesting a UUID for the new object will generate a random one.

This UUID is useful to, for example:

- Safely identify servervault characters
- Track serialisable objects (like items or creatures) as they are saved to the campaign DB - i.e. persistent storage chests or dropped items.
- Track objects across multiple game instances (in trusted scenarios).

Currently, the following objects can carry UUIDs:

 Items, Creatures, Placeables, Triggers, Doors, Waypoints, Stores, Encounters, Areas.

Will return "" (empty string) when the given object cannot carry a UUID.


Information icon.png This section of the article is a stub. You can help the NWN Lexicon by expanding it.




Information icon.png This article is in need of examples. You can help the NWN Lexicon by showing how to use this code effectively.

See Also

functions: ForceRefreshObjectUUID, GetObjectByUUID, GetRandomUUID

author: Shadguy