Death Configuration

Configure what happens when a citizen is killed — item drops at the citizen's location, messages to the killer, and server commands triggered on death.

How to Access Death Config

Death configuration is found at Edit Citizen → Behaviors → Advanced Configuration → Death Config.

ℹ️

Takes Damage Required

For death to occur, the citizen must have Takes Damage enabled in the Behaviors screen. A citizen with Takes Damage disabled is invulnerable and the Death Config will never trigger.

Overview

The Death Config has three independent systems that can each be configured:

  • Drop Items — Items spawned at the citizen's location when it dies.
  • Death Messages — Chat messages sent to the player who killed the citizen.
  • Death Commands — Commands run when the citizen dies.
Screenshot

Item Drops

Configure items that spawn at the citizen's location when it dies. Each entry has two fields:

FieldDescription
itemId The item identifier to drop (must be a valid Hytale item ID)
quantity How many of this item to drop

Example: Loot Drops

Item 1: itemId = "gold_coin"      quantity = 5
Item 2: itemId = "health_potion"  quantity = 1

Death Messages

Death messages are sent to the player who killed the citizen. They support the same color tags and placeholders as regular citizen messages (see Color Formatting and Placeholders).

Message Fields

FieldDescriptionDefault
message The message text. Supports {RED}, {#hex}, {PlayerName}, {CitizenName}. Required
delaySeconds Seconds to wait before sending this message after the citizen dies 0.0

Example: Death Messages

Message 1: "{RED}You have defeated {CitizenName}!"   — Delay: 0.0s
Message 2: "{GOLD}+50 XP awarded to {PlayerName}."  — Delay: 0.5s

Death Commands

Death commands run when the citizen dies. They use the same format as Command Actions — including runAsServer, delaySeconds, {PlayerName} / {CitizenName} placeholders, and the {SendMessage} prefix.

Example: Award XP on Kill

Command 1: give {PlayerName} diamond 1  — runAsServer: true  — Delay: 0.0s
Command 2: xp add {PlayerName} 50      — runAsServer: true  — Delay: 0.5s

Selection Modes

Both death messages and death commands have their own independent selection mode, controlling how entries are chosen when the citizen dies:

ModeBehavior
All Every entry triggers (default). All messages are sent and all commands are run.
Random One entry is picked at random.
Sequential Entries cycle in order. Each kill advances the position by one.
Tip: Combine all three systems for rich kill rewards — congratulate the player with a message, award XP via a command, and drop loot at the death location. All three fire independently on the same death event.
💡

Respawn on Death

If you want the citizen to respawn after dying, enable Respawn on Death in the Behaviors screen and set a respawn delay. The Death Config fires before the citizen respawns.