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. | ||
<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, | 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. |