Editing Associating data with a reference

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 23: Line 23:
*You can use [[ToString|ToString($)]] to obtain the name of a reference as a string. However, all references with identical names will share the same key.
*You can use [[ToString|ToString($)]] to obtain the name of a reference as a string. However, all references with identical names will share the same key.
*You can use [[GetFormIDString]] to return the unique form id as a string for any reference. However, form ids may change on game load with load order. Hence, if the data must be persistent some additional complex scripting is required.
*You can use [[GetFormIDString]] to return the unique form id as a string for any reference. However, form ids may change on game load with load order. Hence, if the data must be persistent some additional complex scripting is required.
*You can use [[GetLocalRefIndex]] to obtain the numeric form id of a reference, without the load order prefix. However, using this alone will mean references from different mods may override each other. It is possible to workaround this by storing them in a nested array, using [[GetSourceModIndex]] followed by [[GetNthModName]] to create a load order protected parent stringmap. This is somewhat convoluted, although a UDF([[Example UDF: GetRefData|example]]) could simplify implementation.
<pre>
<pre>
let MyKey := $SomeActor ; or:
let MyKey := $SomeActor ; or:
Line 54: Line 53:


==NX Variables==
==NX Variables==
Added by the [[NX]] plugin for NVSE, these are probably the most powerful way to associate data with a reference. Of course, the plugin is then required by all users.
Added by the [[NX]] plugin for NVSE, and are probably the most powerful way to associate data with a reference. Of course, the plugin is then required by all users.
*Any number of persistent variables of either numeric, form or string may be stored on any reference.
*Any number of persistent variables of either numeric, form or string may be stored on any reference.
*NX variables are fully accessible to all mods without needing masters. If attempting to retrieve a variable that does not exist, the value 0 is simply returned.  
*NX variables are fully accessible to all mods without needing masters. If attempting to retrieve a variable that does not exist, the value 0 is simply returned.  

Please note that all contributions to the Fallout3 GECK Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see GECK:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)