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 = ""
);


Parameters

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


Description

Finds the nNth available resref starting with sPrefix.


Remarks

  • 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.

Version

This function was added in 1.85.8193.31 of NWN:EE.


Example

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