RefMapArraySetRef

From GECK
Jump to: navigation, search


A function added by the JIP NVSE Plugin.

Description

Sets the ref value of the element with a Key matching the specified Object, in the specified RefMap Array. If no such element exists, it is created.

Syntax

[help]
reference.RefMapArraySetRef arrName:string value:ref baseForm:ref 

Or:

reference.RefMapSetRef arrName:string value:ref baseForm:ref

Example

RaulRef.RefMapArraySetRef "someRefMap" Ammo127mm
RefMapSetRef "someRefMap" ArmorCombat CraigBoone 

Notes

  • As with most JIP functions, this can be called either on a reference with only one parameter, or with a base form as the second parameter (which ignores the calling reference).
  • When using the base form syntax, be extra careful to note that the order is value-key, and not key-value. That is, ensure that your "key" is the second parameter and the value you want to assign that key is your first parameter. The above example, for instance, is conceptually equivalent to a dictionary of the form "someRefMap[CraigBoone] = ArmorCombat".