pub struct Actor {Show 15 fields
pub id: ActorId,
pub entity: String,
pub name: Option<String>,
pub skin: Option<NpcSkin>,
pub anchor: AnchorId,
pub offset: [i32; 3],
pub facing: Option<Facing>,
pub vulnerable: bool,
pub equipment: Option<MobEquipment>,
pub attributes: Option<MobAttributes>,
pub tier: Option<EncounterTier>,
pub health_bar: Option<HealthBar>,
pub drops: Vec<MobDrop>,
pub traversal: Option<BodyTraversal>,
pub on_kill: Option<OnKill>,
}Expand description
A scripted stage actor (DSL v0.6, spec-0014): a NoAI/Silent/no-loot puppet,
distinct from a stage-2 Npc (no dialogue, any mob type). Emitted with tag
dw_actor_<id>, Invulnerable unless vulnerable (a damageable puppet stays
knockback-immune — the tower-defense creep). skin re-dresses it as a
minecraft:mannequin, exactly as a stage-2 NPC skin. The puppet is summoned by
a spawn-actor effect (not at load), moved by move-actor, and can be replaced
by a real-AI twin with unleash-actor.
Fields§
§id: ActorIdUnique actor id (actor/<kebab>).
entity: StringThe vanilla entity to puppet, e.g. minecraft:warden. Validated against the
pinned 1.21.11 entity registry (DW0173).
name: Option<String>Optional custom name shown above the puppet.
skin: Option<NpcSkin>Optional player-model skin (mannequin), as a stage-2 NPC (DW0190).
anchor: AnchorIdThe anchor the puppet is summoned on (resolved across areas, like an
open-gate / move-npc destination).
offset: [i32; 3]Integer [x, y, z] block offset from anchor (spec-0066, default
[0, 0, 0]): the puppet stands at the Mark the two fields spell, so
a rank of bodies is one anchor and an offset apiece.
facing: Option<Facing>Initial facing (default south). The puppet spawns yawed this way.
vulnerable: boolIf true, the puppet is damageable (a tower-defense creep) but stays
knockback-immune; default false (fully Invulnerable).
equipment: Option<MobEquipment>Gear the actor wears and holds, in the same shape a wave mob uses
(MobEquipment). Emitted into BOTH the staged puppet and the
unleashed twin, so the dormant elite the player has been circling is
visibly the same armoured thing that stands up. Drop chances are zero —
wave gear and actor gear are never farmable (no-grind constitution).
attributes: Option<MobAttributes>Attribute overrides, in the same shape a wave mob uses (MobAttributes,
the v0.4 surface — one type, one rule set, so the two surfaces cannot
drift). Emitted into BOTH the staged puppet and the unleashed twin, so the
elite the party fights is the elite the author tuned; without it an actor
was stuck at vanilla base values while every wave mob could be tuned,
which is what blocked elite authoring. A vulnerable actor’s
knockback-immunity is emitted first and is not authorable.
tier: Option<EncounterTier>How hard this actor’s fight is meant to be (DSL v0.8, spec-0023) — the
same EncounterTier vocabulary a Wave declares. Absent =
EncounterTier::Ordinary, byte-identical to every pre-0.8 campaign.
A wave is not the only shape an elite takes. The set-piece souls fight —
the armoured thing kneeling among the graves that stands up when you hit
it — is an actor: staged by spawn-actor, given AI by
unleash-actor, killed by hand rather than by a kill objective. Before
this field nothing anywhere stated what such a fight was billed as.
Like the wave field this is a declaration, not a knob: the compiler
never scales an actor from it, and emission is unchanged whichever tier is
declared. Its readers are the health-bar advisory (DW0912) and the drop
rule — only a billed fight leaves anything behind.
health_bar: Option<HealthBar>A health bar over this actor’s fight (DSL v0.31, spec-0073) — the same
HealthBar a Wave declares. It reads the
bodies whose health can move: the unleashed twin, or the puppet itself when
the actor is vulnerable. A bar on an actor that is neither is DW0909.
Absent = no bar, byte-identical.
drops: Vec<MobDrop>What this actor leaves behind when a player kills it. Only an
elite/boss actor may
declare it (DW0491). Emitted into BOTH the staged puppet and the
unleashed twin, exactly as equipment is — the drop belongs to the body,
not to one of its two lifecycles. A despawn-actor strips the
declaration off the body before removing it, so re-caging an elite (a
souls re-seat) never scatters its axe.
traversal: Option<BodyTraversal>What this body can do when it moves (DSL v0.11, spec-0034) — the same
BodyTraversal a stage-2 Npc carries, because traversal belongs to
the body and not to the stage that declares it. Absent = the class the
compiler derives from entity (or from minecraft:mannequin when skin
is set).
on_kill: Option<OnKill>What happens each time a player is credited with killing this actor’s
body (spec-0074) — effect root R9, the same OnKill a
wave declares. Absent = no bundle, and the actor’s emission is
byte-identical.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Actor
impl<'de> Deserialize<'de> for Actor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Actor
impl JsonSchema for Actor
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read more