SetDisplayName - ObjectReference

From Creation Kit
Jump to: navigation, search

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.

Syntax

Bool Function SetDisplayName(String asName, Bool abForce) native

Parameters

  • 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 Value

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

Examples

; 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

Notes

  • 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 Also