Skip to content

Entity Settings

Entity settings provide a JSON-driven way to modify the behavior and properties of entities, including vanilla entities and entities added by other mods, without directly modifying their source definitions.

Currently it allows for:
- Assign factions to entities - Applying bonus alignment rewards on kill - Attaching speechbanks to entities for dialogue and interaction

Entity Settings are defined and configured using JSON files located within a data pack under:
- data/<namespace>/npcs/entity_settings/<entity>.json
- Where the namespace and entity fields are the entity's in-game namespace:path id.

Entity Settings JSON format

Each entity type may define a single settings file describing that entities's settings.

  • The root object
    • faction: namespace:faction (required)
      • The faction this entity belongs to.
      • Used for alignment gain/loss and interaction logic.
    • kill_bonus: int (default: 0)
      • Alignment awarded when this entity is killed.
      • Only written if greater than 0.
    • speechbank: namespace:path (default: null)
      • Speechbank used for dialogue, requires a full resource location path.
      • If omitted, the entity will not have a speechbank set.

Example entity settings

The following example assigns faction alignment, bonus alignment on kill, and a speech bank to an entity:

data/lotr/npcs/entity_settings/bree_brewer.json
{
  "faction": "lotr:bree",
  "kill_bonus": 2,
  "speechbank": "lotrextended:bree/man"
}