SetDisplayName - ObjectReference

Revision as of 04:14, 30 January 2020 by imported>Thesparalius
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

SKSE Member of: ObjectReference Script

Changes a reference's display name. This is the name seen when aiming at the reference in the game world, and when the reference is placed into an inventory.

SyntaxEdit

Bool Function SetDisplayName(String asName, Bool abForce) native

ParametersEdit

  • asName: The name to set.
  • abForce: If this argument is True, and the reference already has its name changed by a quest alias, then this function will overwrite that name change. If this argument is False, then this function will only make changes if the reference's current display name doesn't come from a quest alias.

Return ValueEdit

True if the reference's name was successfully changed, or False otherwise.

ExamplesEdit

; rename the amulet
If myAmuletOfTalos.SetDisplayName("Amulet of the Ninth Divine", False) == False
   Debug.Trace("Failed to rename the amulet. A quest alias may already be renaming it.")
EndIf

NotesEdit

  • This function uses the same system that quest aliases use to rename forms ("ExtraTextDisplayData" internally). This is why this function can conflict with quest alias name changes.
    • It is not known whether a newly-applied quest alias would overwrite changes made by this function. Further research is required.

See AlsoEdit