メインコンテンツまでスキップ

Dungeon NPC Instance

Dungeon NPC Instance

An NPC of a dungeon run, whatever made it: the definition is any entity definition (Typewriter's own entities, MythicMobsNPC, BetterModel, ...). Unlike the group instances of the engine, which fix the NPC to the world typed in the entry, this one is shown per run, in the world of that run, to the members of the run only. Where it stands: in a fixed dungeon, at [spawnLocation] shifted into the slot of the run; in a generated dungeon, at the NPC marker of a room template that points at this entry (the NPC is not shown in a run that has no such marker).

フィールド

フィールド型デフォルト説明
definitionRef<out EntityDefinitionEntry>—NPC type to spawn: any entity definition.
showRangeOptional<Var<Double>>—Distance, in blocks, within which a member of the run sees the NPC. Empty = the default show range of the entities.
activityRef<out SharedEntityActivityEntry>——
groupRef<out GroupEntry>—Who shares this NPC. Empty (the default) = the members of the run: one NPC per run. Pick a group entry only to share one NPC among the members of that group inside the same run.
allowedDungeonIdsList<Ref<DungeonInstanceEntry>>emptyThe dungeon instances whose runs show this NPC, to the members of the run only. EMPTY = every run of every dungeon. In a FIXED dungeon, the coordinates of the spawn location apply to EVERY fixed dungeon concerned: restrict this list when the dungeons differ. In a generated dungeon the position comes from the NPC marker of a room of the run, and the NPC is not shown in a run without such a marker.
spawnLocationPositionORIGINWhere the NPC stands in a FIXED dungeon, in the world of its template; the slot of the run shifts it. The same coordinates are used in every fixed dungeon that shows this NPC (see the allowed dungeons). A generated dungeon ignores this field: its NPC marker decides.
TypeWriter 共通フィールド(children)
フィールド型デフォルト説明
childrenList<Ref<out AudienceEntry>>empty—

How to use it​

An NPC shown per run, in the world of that run, to the members of that run only. The definition is any entity definition: Typewriter's own entities, MythicMobsNPC, BetterModel. Pick it by reference.

FieldWhat to know
spawnLocationFixed dungeons only: where the NPC stands in the template world. The slot of the run shifts it.
allowedDungeonIdsThe dungeon instances whose runs show the NPC. Empty = every run of every dungeon. The same spawnLocation is used in every fixed dungeon concerned, so restrict the list when the dungeons differ.
groupEmpty (default) = the members of the run, one NPC per run. Pick a group entry only to share one NPC among the members of that group inside the same run.
showRangeDistance within which a member sees the NPC. Empty = the default range of entities.

In a generated dungeon, spawnLocation is ignored: the NPC stands at an NPC marker of a room template that points at this entry, and is not shown in a run that has no such marker. If several markers or rooms name the same instance, only the first one in layout order counts.

A member who leaves the run, or a player who was never a member, does not see the NPC. A reload keeps one NPC per member, not a duplicate.

Limits
  • An entity activity with absolute positions is not shifted into the slot or world of the run. Leave activity empty unless you know it only moves relatively.
  • A MythicMobsNPC definition used here must have ticking off (with it on, a real mob is created per viewer), and MythicMobsNPC must be 5.0 or later (per-run visibility fix). The server holds one carrier mob per member, hidden from non-members.

See Entities in dungeons.