Difference between revisions of "Buildref"

From the Fallout3 GECK Wiki
Jump to navigation Jump to search
imported>Odessa
(New page)
 
imported>Odessa
(Proper capitalization redirect)
 
Line 1: Line 1:
{{Function
#redirect [[BuildRef]]
|origin = NVSE
|summary = Takes a mod index as an integer set by [[GetModIndex]] and the decimal converted formID of an object, which may be either a reference or base form, and returns a reference to it.
 
This can be used to reference forms contained in non-dependent external modules, and unnamed persistent references, but great care must be taken as invalid usage may crash the game.
 
Added by NVSE V2b1.
|name = BuildRef
|returnType = form
|arguments = {{FunctionArgument
  |Name = ModIndex
  |Type = int
  }}{{FunctionArgument
  |Name = DecimalFormID
  |Type = int
  }}
|example = int iModIndex
ref rRainySmiles
 
if IsModLoaded "SomePopularCompanionMod.esp"
    set iModIndex to GetModIndex "SomePopularCompanionMod.esp"
    set rRainySmiles to BuildRef iModIndex 1068677
endif
}}
 
==Notes==
* Remember that if one uses an invalid decimal form ID then it will likely crash the game. This may be an issue if the form is non existent or different in past or future versions of the referenced module, or if two distinct modules are given the same file name.
* If referencing 'FalloutNV.esm', some discrepancies exists in the form ID numbering of different localizations (generally any English version vs any non English one).
 
==See Also==
*[[IsModLoaded]]
*[[GetModIndex]]
*[[GetLocalRefIndex]]
[[Category:Functions_(NVSE)]]

Latest revision as of 11:23, 30 March 2014

Redirect to: