Skip to content

NameplateManager ​

Inherits: CanvasLayer

Manages the creation, positioning, and cleanup of UI nameplates for various entities in the game.

Description ​

This class handles:

  • Creating appropriate nameplates for different entity types (companions, minions, bosses, pets)
  • Positioning nameplates in screen space based on entity's 3D position
  • Scaling nameplates based on camera distance
  • Draw order based on distance to camera (closer = on top)
  • Priority drawing for targeted entities
  • Safely handling entity/nameplate lifecycle to prevent freed instance errors
  • Providing methods to add, remove, and clear nameplates

The manager uses a deferred removal system to prevent modifying collections during iteration and includes multiple validity checks to handle cases where entities or nameplates are freed.

Variables ​

Dictionarynameplates{}
Arraypending_removal[]
boolcombat_visibility_enabledfalse # Whether "show in combat only" is active
intactive_combat_count0
CameraControllercamera_controller
WorldContainerworld_container
PartyManagerparty_manager

Methods ​

voidconnect_signals( system_hub: GameHost.SystemHub )
voidenable_processing()
voiddisable_processing()
voidadd_nameplate( owner: Variant )
voidremove_nameplate( owner: Variant )
voidclear_all_nameplates()
voidshow_floating_text( owner: Variant, text: String, color: Color )

Signals ​

effect_tooltip_requested( effect: EffectInstance ) ​

Tooltip signals - route from nameplates to UIManager

hide_tooltip( force_hide: bool ) ​

Asks the interface to hide the tooltip (force hides it at once).

Variable descriptions ​

Dictionary nameplates = ​

Dictionary to store owner -> nameplate mappings (Entity or InteractableObject)

Array pending_removal = [] ​

Array for safely queuing owners for removal without modifying the dictionary during iteration

bool combat_visibility_enabled = false # Whether "show in combat only" is active ​

Combat visibility tracking

int active_combat_count = 0 ​

Track number of active encounters

CameraController camera_controller ​

SystemRefs

WorldContainer world_container ​

The container of the current world.

PartyManager party_manager ​

The manager of the party.

Method descriptions ​

void connect_signals( system_hub: GameHost.SystemHub ) ​

Connect to the PartyManager's signal for entity being freed

void enable_processing() ​

Enable nameplate processing - call this when level is fully loaded

void disable_processing() ​

Disable nameplate processing - call this during loading

void add_nameplate( owner: Variant ) ​

Creates and adds a nameplate for the given owner (Entity or InteractableObject)

void remove_nameplate( owner: Variant ) ​

Removes a nameplate for the specified owner (Entity or InteractableObject)

void clear_all_nameplates() ​

Removes all nameplates and clears the dictionary

void show_floating_text( owner: Variant, text: String, color: Color ) ​

Floats text up from the owner's nameplate marker (Entity or InteractableObject)