ResManFindPrefix(string, int, int, int, string)

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.

Finds the nNth available resref starting with sPrefix.

string ResManFindPrefix(
    string sPrefix,
    int nResType,
    int nNth = 1,
    int bSearchBaseData = FALSE,
    string sOnlyKeyTable = ""


resref prefix to filter resref list with
blueprint resource type constant for the blueprint
blueprint resource index
optional parameter to specify searching base game resrefs
optional parameter to specify keytable to search


Finds the nNth available resref starting with sPrefix.


  • Set bSearchBaseData to TRUE to also search base game content stored in your game installation directory.
  WARNING: This can be very slow.
  • Set sOnlyKeyTable to a specific keytable to only search the given named keytable (e.g. "OVERRIDE:").

Returns "" if no such resref exists.

Does not seem to return the resrefs in any particular order.


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

functions: ResManGetAliasFor() TemplateToJson()

author: Shadguy