Category:RefMap Array Functions (JIP)

From GECK
Jump to: navigation, search

The Reference-Map array interface is a utility added by the JIP LN NVSE Plugin. A RefMap is a special type of array variable, where the keys are refs (object references/base forms). This is intended for cases where it is necessary/more convenient to use ref-type (instead of numeric- or string-type) values as keys - which is not possible when using the NVSE array_var interface.

(Note that RefMap variables are not related, in any way, to array_vars, and can only be manipulated using the RefMap set of script commands)

Properties

A RefMap variable is not an ordinary script variable - it is a special case of an Auxiliary-Variable, and has the same general properties (see article), with two main differences:

  • A RefMap is not "owned" by any Object - it is defined by a Name only, which must be unique.
  • The Key of each element in a RefMap array is (obviously) a ref, instead of a numeric index. Internally, the elements in a RefMap are ordered by FormID (ascending).