GetCampaignJson(string, string, object)

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.

This will read a json from the specified campaign database.

json GetCampaignJson(
    string sCampaignName,
    string sVarName,
    object oPlayer = OBJECT_INVALID


a campaign database name
the campaign variable name to use
optional player character object to associate with the json campaign variable


This will read a json from the specified campaign database.


The database name:

  • is case insensitive and it must be the same for both set and get functions.
  • can only contain alphanumeric characters, no spaces.

The var name must be unique across the entire database, regardless of the variable type. If you want a variable to pertain to a specific player in the game, provide a player object.


This function was added in 1.85.8193.31 of NWN:EE.


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


JSON Functions