RefMap Array

From the Fallout3 GECK Wiki
Jump to navigation Jump to search

The Reference-Map array interface is a utility added by the JIP NVSE Plugin. A Reference-Map (abbreviated as RefMap) is a special type of array variable, where the keys are references (object references/base forms). This is intended for cases where it is necessary/more convenient to use reference-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[edit | edit source]

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 reference, instead of a numeric index. Internally, the elements in a RefMap are ordered by Reference ID (ascending).