RefToString

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Generates a unique identifier string for a reference/object. The result string is intended to be used as a key in StringMap-type arrays. This makes up for the inability to use references as keys in arrays.

Syntax

[help]
(string_var) reference.RefToString anyForm:ref

Example

let svDocBase := RefToString DocMitchell ; "FalloutNV.esm:104C0C"
let svDocRef := DocMitchellRef.RefToString ; "FalloutNV.esm:104C0F"
let arrVar[objRef.RefToString] := Caps001
let refVar := arrVar[objRef.RefToString]
let strVar := objRef.RefToString
let intVar := arrVar[strVar] 

Notes

  • The generated string identifier is load-order-independent, and remains valid even if the load order has changed.
  • For references, the syntax matters. Passing the reference as a parameter (base syntax) results in the string for the base form, not the reference.

See Also