pub struct NpcView {Show 22 fields
pub id: String,
pub label: String,
pub role: String,
pub x: f32,
pub y: f32,
pub building_id: Option<String>,
pub entity_id: Option<EntityId>,
pub life_state: Option<LifeState>,
pub hp_pct: Option<f32>,
pub can_trade: bool,
pub buy_templates: Vec<String>,
pub tile_id: Option<String>,
pub behavior_state: Option<String>,
pub presentation_state: Option<String>,
pub sprite_mode: Option<String>,
pub paperdoll_ref: Option<String>,
pub draw_scale: f32,
pub yaw: Option<f32>,
pub perception_fov_deg: Option<f32>,
pub perception_sight_m: Option<f32>,
pub perception_hear_m: Option<f32>,
pub quest_verbs: Vec<NpcQuestVerb>,
}Fields§
§id: String§label: String§role: String§x: f32§y: f32§building_id: Option<String>Postcard always serializes optional fields (no skip_serializing_if) so decode stays aligned.
entity_id: Option<EntityId>Authoritative sim entity for wildlife / combat targets.
life_state: Option<LifeState>§hp_pct: Option<f32>§can_trade: boolTrue when this NPC has buy/sell/teach offers (npc_has_market).
buy_templates: Vec<String>Exact item template IDs this NPC buys, for worker-route sell pickers.
tile_id: Option<String>Gfx sprite sheet id (assets/gfx/sprites/). Client falls back to npc.{id} / npc.{role}.
behavior_state: Option<String>Wildlife FSM state (idle, chase, combat, …) when behavior-driven (debug).
presentation_state: Option<String>Canonical gfx presentation key (combat, pursue, walking, talking, …).
sprite_mode: Option<String>Resolved gfx sprite mode for tile_id (server-computed).
paperdoll_ref: Option<String>Paperdoll skin id (assets/paperdoll/skins/). Client prefers this over tile_id when baked.
draw_scale: f32World draw size in map cells (from paperdoll skin draw_scale; 1.0 = one cell).
yaw: Option<f32>Authoritative body yaw (radians) for wildlife LoS debug (F7).
perception_fov_deg: Option<f32>Active visual acquire cone (degrees); 360 when engaged.
perception_sight_m: Option<f32>Sight radius used for acquire/tracking (meters).
perception_hear_m: Option<f32>Hearing radius from behavior (meters); omitted when deaf.
quest_verbs: Vec<NpcQuestVerb>Per-observer quest verbs for this NPC (offer / talk / give). Empty for wildlife.