Skip to content

DM Entity Possession System #78

Description

@FirebrickRed

Summary

Allow DMs to "possess" entities and control them directly - walking in their shoes, speaking as them, and accessing their inventory. Essential for immersive roleplay and dynamic NPC control.

Phase: 4 - DM Tools
Systems: DM Tools, Entity System

Prerequisites

Goals

  • Right-click entity to possess/unpossess
  • Player becomes invisible, entity follows player movement
  • Special "DM Wand" item for quick possession (optional alternative to right-click)
  • Access entity inventory and stat block while possessed
  • Sneak to exit possession
  • Prevent non-DM players from possessing

Cleanup Tasks

  • Delete listeners/NpcListener.java - Replace with new possession system using DndEntityInstance
  • Delete CustomNPCs/NpcManager.java - Replaced by EntityLoader
  • Delete CustomNPCs/NpcData.java - Replaced by DndEntity
  • Delete CustomNPCs/Hadozee.java - Example replaced by generic entity spawning

User Experience

# DM right-clicks on town guard
> "You are now possessing Marcus the Brave"
> Player becomes invisible
> Guard armor stand follows player movement

# DM opens inventory while possessing
> Shows entity stat block + inventory (Issue #74 format)

# DM right-clicks item (future: shop commands)
> Can adjust prices, manage shop inventory

# DM sneaks
> "You are no longer possessing Marcus the Brave"
> Player visible again, guard stays at last position

Technical Details

  • Permission check: jkvtt.dm before allowing possession
  • Invisibility: PotionEffect.INVISIBILITY while possessing
  • Movement sync: BukkitRunnable every tick teleports ArmorStand to player location
  • Inventory access: Show stat block from DndEntityInstance template
  • State tracking: Map<UUID, DndEntityInstance> for active possessions

DM Wand (Optional Enhancement)

  • Blaze rod with NBT tag "dm_wand"
  • Right-click entity to possess (alternative to direct right-click)
  • Shift-right-click in air to list nearby entities
  • Easier for DMs to avoid accidental interactions

Next Steps

After completing this issue, tackle:

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    dm-toolsDM-specific commands and featuresenhancementNew feature or requestnpc/entityFor issues pertaining to npc's or monsters and is referred to as entities in the mod pack

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions