ValidateModIndex

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the JIP NVSE Plugin.

Description

Attempts to resolve a mod index which was stored during a previous game session to account for any changes to the user's load order. Given the stored mod index for a mod, returns the mod index currently associated with that same mod, or -1 if the index could not be resolved (for instance, because the mod is no longer loaded).

Syntax

[help]
(validatedIndex:int) ValidateModIndex modIndex:int

Example

Suppose ExampleMod.esp was at index 6 at the time the current save was made, but has since been moved, and its index is now 9. Loading the save and calling:
 
ValidateModIndex 6
 
with 6 being ExampleMod.esp last index, will return 9 - its current index.

See Also