Difference between revisions of "ValidateModIndex"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Jazzisparis
imported>Jazzisparis
 
Line 1: Line 1:
{{Function
{{Function
  |origin = JIP
  |origin = JIP
  |summary = If the mod placed at the specified index at the time the current game was saved, is no longer at the same index, this function will return the current, corrected index, or -1 if the mod is no longer loaded.
  |summary = Attempts to resolve a <i>mod index</i> 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).
  |name = ValidateModIndex
  |name = ValidateModIndex
  |returnType = validatedIndex:int
  |returnType = validatedIndex:int

Latest revision as of 17:56, 7 June 2015

< [[::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