SetDisplayName - ObjectReference
Jump to navigation
Jump to search
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.
Syntax[edit | edit source]
Bool Function SetDisplayName(String asName, Bool abForce) native
Parameters[edit | edit source]
- 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[edit | edit source]
True if the reference's name was successfully changed, or False otherwise.
Examples[edit | edit source]
; 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[edit | edit source]
- 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.