Table of Contents

Class EntityBehaviorNameTag

Namespace
Vintagestory.GameContent
Assembly
VSEssentials.dll

Displays name above entity.
Uses the "nametag" code Open in GitHub

[DocumentAsJson]
[AddDocumentationProperty("selectFromRandomName", "Randomly choose and set the entity's display name to one of the specified names", "System.Single[]", "Recommended", "", false)]
public class EntityBehaviorNameTag : EntityBehavior
Inheritance
EntityBehaviorNameTag

Examples

"behaviors": [
 {
     "code": "nametag",
     "showtagonlywhentargeted": true,
     "selectFromRandomName": ["Yern", "Gild", "Hans", "Hector", "McCrae", "Yoskolo", "Grit", "Bounder"]
 },
],

Fields

selectFromRandomName (Recommended)

Randomly choose and set the entity's display name to one of the specified names

Field Value

Single[]

RenderRange (Optional) (Default: 999)

The maximum range the nametag is visible from

[DocumentAsJson("Optional", "999", false)]
public int RenderRange { get; set; }

Field Value

int

ShowTagOnlyWhenTargeted (Optional) (Default: false)

Whether or not to show the nametag constantly or only when being looked at.

[DocumentAsJson("Optional", "false", false)]
public bool ShowOnlyWhenTargeted { get; set; }

Field Value

bool

TriggeredNameReveal (Optional) (Default: false)

Whether the real name on entity is only revealed after certain conditions are met

[DocumentAsJson("Optional", "false", false)]
public bool TriggeredNameReveal { get; set; }

Field Value

bool

UnrevealedDisplayName (Optional) (Default: nametag-default-unrevealedname)

The name that is shown when the real name is not yet revealed. Only used if TriggeredNameReveal is true.

[DocumentAsJson("Optional", "nametag-default-unrevealedname", false)]
public string UnrevealedDisplayName { get; set; }

Field Value

string