Skip to main content

Intent

Enum Intent 

Source
pub enum Intent {
Show 67 variants Move { entity_id: EntityId, forward: f32, strafe: f32, vertical: f32, sprint: bool, seq: Seq, }, Stop { entity_id: EntityId, seq: Seq, }, Harvest { entity_id: EntityId, node_id: String, seq: Seq, }, Use { entity_id: EntityId, template_id: String, seq: Seq, }, UseGrant { entity_id: EntityId, grant_instance_id: Uuid, target_instance_id: Uuid, seq: Seq, }, Say { entity_id: EntityId, channel: ChatChannel, text: String, seq: Seq, }, Craft { entity_id: EntityId, blueprint_id: String, count: Option<u32>, seq: Seq, }, Interact { entity_id: EntityId, target_id: String, seq: Seq, }, ShopBuy { entity_id: EntityId, npc_id: String, offer_id: String, quantity: u32, seq: Seq, }, ShopSell { entity_id: EntityId, npc_id: String, template_id: String, quantity: u32, seq: Seq, }, ShopClose { entity_id: EntityId, npc_id: String, seq: Seq, }, TestDamage { entity_id: EntityId, amount: f32, seq: Seq, }, SetTarget { entity_id: EntityId, target_id: EntityId, seq: Seq, }, SetTargetSlot { entity_id: EntityId, slot_index: u8, target_id: EntityId, seq: Seq, }, ClearTarget { entity_id: EntityId, seq: Seq, }, ClearTargetSlot { entity_id: EntityId, slot_index: u8, seq: Seq, }, SetAutoAttack { entity_id: EntityId, slot_index: u8, enabled: bool, seq: Seq, }, Attack { entity_id: EntityId, target_id: Option<EntityId>, weapon_slot: Option<u32>, seq: Seq, }, Pickup { entity_id: EntityId, drop_id: Option<String>, seq: Seq, }, Cast { entity_id: EntityId, ability_id: String, target_id: EntityId, seq: Seq, }, BindActionSlot { entity_id: EntityId, slot_index: u8, ability_id: String, auto_enabled: bool, seq: Seq, }, UseActionSlot { entity_id: EntityId, slot_index: u8, seq: Seq, }, Dodge { entity_id: EntityId, seq: Seq, }, Lunge { entity_id: EntityId, forward: f32, strafe: f32, seq: Seq, }, DirectionalJump { entity_id: EntityId, forward: f32, strafe: f32, seq: Seq, }, Block { entity_id: EntityId, enabled: bool, seq: Seq, }, EquipMainhand { entity_id: EntityId, template_id: Option<String>, instance_id: Option<Uuid>, seq: Seq, }, EquipOffhand { entity_id: EntityId, template_id: Option<String>, instance_id: Option<Uuid>, seq: Seq, }, EquipWorn { entity_id: EntityId, slot: BodySlot, instance_id: Option<Uuid>, seq: Seq, }, MoveItem { entity_id: EntityId, item_instance_id: Uuid, from: InventoryLocation, to: InventoryLocation, to_parent_instance_id: Option<Uuid>, quantity: Option<u32>, seq: Seq, }, PlaceContainer { entity_id: EntityId, item_instance_id: Uuid, seq: Seq, }, PickupContainer { entity_id: EntityId, container_id: String, seq: Seq, }, SetContainerLocked { entity_id: EntityId, location: InventoryLocation, locked: bool, seq: Seq, }, DropItem { entity_id: EntityId, item_instance_id: Uuid, from: InventoryLocation, seq: Seq, }, DestroyItem { entity_id: EntityId, item_instance_id: Uuid, from: InventoryLocation, quantity: Option<u32>, seq: Seq, }, RenameContainer { entity_id: EntityId, item_instance_id: Uuid, location: InventoryLocation, name: String, seq: Seq, }, UpsertRotationPreset { entity_id: EntityId, preset: RotationPreset, seq: Seq, }, DeleteRotationPreset { entity_id: EntityId, preset_id: String, seq: Seq, }, AssignSlotPreset { entity_id: EntityId, slot_index: u8, preset_id: String, seq: Seq, }, SetHotbarSlot { entity_id: EntityId, slot: u8, ability_id: Option<String>, seq: Seq, }, AdvanceRotation { entity_id: EntityId, slot_index: u8, seq: Seq, }, NpcTalkOpen { entity_id: EntityId, npc_id: String, seq: Seq, }, NpcTalkSay { entity_id: EntityId, npc_id: String, message: String, seq: Seq, }, NpcTalkClose { entity_id: EntityId, npc_id: String, seq: Seq, }, AcceptQuest { entity_id: EntityId, quest_id: String, seq: Seq, }, WithdrawQuest { entity_id: EntityId, quest_id: String, seq: Seq, }, TrackQuest { entity_id: EntityId, quest_id: String, seq: Seq, }, QuestGiveItem { entity_id: EntityId, npc_id: String, template_id: String, quantity: u32, seq: Seq, }, HireWorker { entity_id: EntityId, def_id: String, wage_copper_per_interval: u32, lodging_container_id: Option<String>, job_yaml: Option<String>, seq: Seq, }, DismissWorker { entity_id: EntityId, worker_instance_id: String, seq: Seq, }, SetWorkerJob { entity_id: EntityId, worker_instance_id: String, job_yaml: String, seq: Seq, }, AssignWorkerLodging { entity_id: EntityId, worker_instance_id: String, lodging_container_id: String, seq: Seq, }, SetWorkerMode { entity_id: EntityId, worker_instance_id: String, mode: String, seq: Seq, }, GiveWorkerItem { entity_id: EntityId, worker_instance_id: String, item_instance_id: Uuid, quantity: Option<u32>, seq: Seq, }, TakeWorkerItem { entity_id: EntityId, worker_instance_id: String, item_instance_id: Uuid, quantity: Option<u32>, seq: Seq, }, RenameHiredWorker { entity_id: EntityId, worker_instance_id: String, name: String, seq: Seq, }, TeachWorkerBlueprint { entity_id: EntityId, worker_instance_id: String, blueprint_id: String, seq: Seq, }, BuyProperty { entity_id: EntityId, zone_id: String, seq: Seq, }, SellProperty { entity_id: EntityId, zone_id: String, seq: Seq, }, BankDeposit { entity_id: EntityId, npc_id: String, amount_copper: u64, seq: Seq, }, BankWithdraw { entity_id: EntityId, npc_id: String, amount_copper: u64, seq: Seq, }, BankClose { entity_id: EntityId, npc_id: String, seq: Seq, }, BankTransfer { entity_id: EntityId, npc_id: String, to_character_id: Option<Uuid>, to_name: String, amount_copper: u64, seq: Seq, }, StorageStore { entity_id: EntityId, npc_id: String, item_instance_id: Uuid, quantity: Option<u32>, seq: Seq, }, StorageTake { entity_id: EntityId, npc_id: String, item_instance_id: Uuid, quantity: Option<u32>, seq: Seq, }, StorageShip { entity_id: EntityId, npc_id: String, dest_building_id: String, item_instance_id: Uuid, quantity: Option<u32>, seq: Seq, }, StorageClose { entity_id: EntityId, npc_id: String, seq: Seq, },
}
Expand description

Client → server gameplay input (reliable, sequenced per entity).

Variants§

§

Move

Fields

§entity_id: EntityId
§forward: f32
§strafe: f32
§vertical: f32

Climb (+) or descend (−) on z axis (m/s intent).

§sprint: bool

Sprint multiplier when stamina allows.

§seq: Seq
§

Stop

Fields

§entity_id: EntityId
§seq: Seq
§

Harvest

Fields

§entity_id: EntityId
§node_id: String
§seq: Seq
§

Use

Fields

§entity_id: EntityId
§template_id: String
§seq: Seq
§

UseGrant

Apply a grant consumable onto a specific item instance (unique gear status bindings).

Fields

§entity_id: EntityId
§grant_instance_id: Uuid
§target_instance_id: Uuid
§seq: Seq
§

Say

Fields

§entity_id: EntityId
§channel: ChatChannel
§text: String
§seq: Seq
§

Craft

Start a blueprint craft (timed, like harvest).

Fields

§entity_id: EntityId
§blueprint_id: String
§count: Option<u32>

Batches to run back-to-back; None crafts as many as materials/stamina allow.

§seq: Seq
§

Interact

Door, NPC, enter/exit building.

Fields

§entity_id: EntityId
§target_id: String
§seq: Seq
§

ShopBuy

Buy from an NPC shop offer (ShopOpened catalog).

Fields

§entity_id: EntityId
§npc_id: String
§offer_id: String
§quantity: u32
§seq: Seq
§

ShopSell

Sell inventory to an NPC (ShopOpened buy list).

Fields

§entity_id: EntityId
§npc_id: String
§template_id: String
§quantity: u32
§seq: Seq
§

ShopClose

Close an open NPC shop UI (releases the NPC movement pin).

Fields

§entity_id: EntityId
§npc_id: String
§seq: Seq
§

TestDamage

Dev / test: apply damage to self (co-op testing).

Fields

§entity_id: EntityId
§amount: f32
§seq: Seq
§

SetTarget

Slot-1 combat target (plans/12 alias).

Fields

§entity_id: EntityId
§target_id: EntityId
§seq: Seq
§

SetTargetSlot

Target slot assignment (plans/12 §5.3). Slot 1 aliases SetTarget.

Fields

§entity_id: EntityId
§slot_index: u8
§target_id: EntityId
§seq: Seq
§

ClearTarget

Fields

§entity_id: EntityId
§seq: Seq
§

ClearTargetSlot

Fields

§entity_id: EntityId
§slot_index: u8
§seq: Seq
§

SetAutoAttack

Toggle per-slot auto-attack (plans/12 §4.2).

Fields

§entity_id: EntityId
§slot_index: u8
§enabled: bool
§seq: Seq
§

Attack

Melee attack — uses target_id or the player’s current target.

Fields

§entity_id: EntityId
§target_id: Option<EntityId>
§weapon_slot: Option<u32>
§seq: Seq
§

Pickup

Pick up a ground loot pile (nearest in range when drop_id omitted).

Fields

§entity_id: EntityId
§drop_id: Option<String>
§seq: Seq
§

Cast

Cast a spell or use a non-weapon ability template (plans/24 §4.3b).

Fields

§entity_id: EntityId
§ability_id: String
§target_id: EntityId
§seq: Seq
§

BindActionSlot

Bind an ability to a target slot action bar (plans/12 §4.2).

Fields

§entity_id: EntityId
§slot_index: u8
§ability_id: String
§auto_enabled: bool
§seq: Seq
§

UseActionSlot

Fire a bound consumable or ability from a slot (plans/24 §4.3c).

Fields

§entity_id: EntityId
§slot_index: u8
§seq: Seq
§

Dodge

Dodge — brief i-frames, stamina cost (plans/24 §4.3c).

Fields

§entity_id: EntityId
§seq: Seq
§

Lunge

Lunge — burst forward in movement/facing direction, higher stamina cost.

Fields

§entity_id: EntityId
§forward: f32

Last movement forward axis when idle (−1..1).

§strafe: f32

Last movement strafe axis when idle (−1..1).

§seq: Seq
§

DirectionalJump

Directional jump — leap one cell uphill over a medium cliff (plans/04 §4.5b).

Fields

§entity_id: EntityId
§forward: f32

Jump direction forward axis (−1..1).

§strafe: f32

Jump direction strafe axis (−1..1).

§seq: Seq
§

Block

Block — frontal mitigation while held (plans/24 §4.3c).

Fields

§entity_id: EntityId
§enabled: bool
§seq: Seq
§

EquipMainhand

Equip or clear mainhand weapon (plans/26 §C2b). None unequips. Two-handed weapons (hand_slots: 2) clear offhand on equip. Prefer instance_id so unique bindings travel with that weapon instance.

Fields

§entity_id: EntityId
§template_id: Option<String>
§instance_id: Option<Uuid>
§seq: Seq
§

EquipOffhand

Equip or clear offhand (shield / dual-wield). Rejected while mainhand is two-handed.

Fields

§entity_id: EntityId
§template_id: Option<String>
§instance_id: Option<Uuid>
§seq: Seq
§

EquipWorn

Equip a wearable (container, belt, armor, jewelry) to a body slot, or clear the slot when instance_id is None.

Fields

§entity_id: EntityId
§instance_id: Option<Uuid>
§seq: Seq
§

MoveItem

Move an item instance between root / worn / placed container inventories.

Fields

§entity_id: EntityId
§item_instance_id: Uuid
§to_parent_instance_id: Option<Uuid>

When moving into a container location, nest under this parent instance (None = container root).

§quantity: Option<u32>

Units to move; None moves the whole stack. Server clamps to volume/carry limits.

§seq: Seq
§

PlaceContainer

Place a placeable container from inventory onto the ground at the player’s feet.

Fields

§entity_id: EntityId
§item_instance_id: Uuid
§seq: Seq
§

PickupContainer

Pick up a placed container (with contents) into inventory.

Fields

§entity_id: EntityId
§container_id: String
§seq: Seq
§

SetContainerLocked

Lock or unlock a worn or placed container (requires matching key when locking/unlocking).

Fields

§entity_id: EntityId
§location: InventoryLocation

Worn slot or placed container id encoded as location.

§locked: bool
§seq: Seq
§

DropItem

Drop a non-container item on the ground at the player’s feet.

Fields

§entity_id: EntityId
§item_instance_id: Uuid
§seq: Seq
§

DestroyItem

Permanently destroy an item stack (not recoverable; no ground drop).

Fields

§entity_id: EntityId
§item_instance_id: Uuid
§quantity: Option<u32>

Units to destroy; None destroys the whole stack.

§seq: Seq
§

RenameContainer

Set a custom display name on a container instance (chest, pouch, backpack).

Fields

§entity_id: EntityId
§item_instance_id: Uuid
§name: String
§seq: Seq
§

UpsertRotationPreset

Create or update a rotation preset in the player’s library.

Fields

§entity_id: EntityId
§seq: Seq
§

DeleteRotationPreset

Remove a rotation preset from the library.

Fields

§entity_id: EntityId
§preset_id: String
§seq: Seq
§

AssignSlotPreset

Assign a library preset to target slot T1/T2.

Fields

§entity_id: EntityId
§slot_index: u8
§preset_id: String
§seq: Seq
§

SetHotbarSlot

Bind or clear a hotbar slot (19) to a learned / weapon ability or an inventory consumable (item:<template_id> — see hotbar_consumable_binding).

Fields

§entity_id: EntityId
§slot: u8

1–9

§ability_id: Option<String>

None clears the slot. Ability id, or item:<template_id> for consumables.

§seq: Seq
§

AdvanceRotation

Fire the next ready ability in a slot’s rotation (manual step).

Fields

§entity_id: EntityId
§slot_index: u8
§seq: Seq
§

NpcTalkOpen

Open a turn-based conversation with an NPC.

Fields

§entity_id: EntityId
§npc_id: String
§seq: Seq
§

NpcTalkSay

Send a player message in an open NPC conversation.

Fields

§entity_id: EntityId
§npc_id: String
§message: String
§seq: Seq
§

NpcTalkClose

Close an NPC conversation.

Fields

§entity_id: EntityId
§npc_id: String
§seq: Seq
§

AcceptQuest

Accept a discovered quest (adds to active list).

Fields

§entity_id: EntityId
§quest_id: String
§seq: Seq
§

WithdrawQuest

Withdraw from an active quest (resets progress; can re-accept).

Fields

§entity_id: EntityId
§quest_id: String
§seq: Seq
§

TrackQuest

Highlight an active quest in the HUD.

Fields

§entity_id: EntityId
§quest_id: String
§seq: Seq
§

QuestGiveItem

Turn in items for an active give_item objective while near an NPC.

Fields

§entity_id: EntityId
§npc_id: String
§template_id: String
§quantity: u32
§seq: Seq
§

HireWorker

Hire an NPC worker (fee + recurring wage).

Fields

§entity_id: EntityId
§def_id: String
§wage_copper_per_interval: u32
§lodging_container_id: Option<String>
§job_yaml: Option<String>
§seq: Seq
§

DismissWorker

Release a hired worker instance.

Fields

§entity_id: EntityId
§worker_instance_id: String
§seq: Seq
§

SetWorkerJob

Replace or assign a worker job YAML loop.

Fields

§entity_id: EntityId
§worker_instance_id: String
§job_yaml: String
§seq: Seq
§

AssignWorkerLodging

Point a worker at a camp bed / lodging container.

Fields

§entity_id: EntityId
§worker_instance_id: String
§lodging_container_id: String
§seq: Seq
§

SetWorkerMode

Switch companion vs job-loop automation mode.

Fields

§entity_id: EntityId
§worker_instance_id: String
§mode: String
§seq: Seq
§

GiveWorkerItem

Hand an item from the player’s inventory to a hired worker (e.g. a tool the worker must carry but not consume, like a handsaw for oak_to_lumber).

Fields

§entity_id: EntityId
§worker_instance_id: String
§item_instance_id: Uuid
§quantity: Option<u32>
§seq: Seq
§

TakeWorkerItem

Take an item from a hired worker’s inventory back into the employer’s root.

Fields

§entity_id: EntityId
§worker_instance_id: String
§item_instance_id: Uuid
§quantity: Option<u32>
§seq: Seq
§

RenameHiredWorker

Set a custom display name for a hired worker (shown in menus / route editor).

Fields

§entity_id: EntityId
§worker_instance_id: String
§name: String
§seq: Seq
§

TeachWorkerBlueprint

Teach a known blueprint to a hired worker (costs worker_train_copper).

Fields

§entity_id: EntityId
§worker_instance_id: String
§blueprint_id: String
§seq: Seq
§

BuyProperty

Buy an unowned crown property parcel (plan 37).

Fields

§entity_id: EntityId
§zone_id: String
§seq: Seq
§

SellProperty

Sell an owned property parcel back to the crown (plan 37).

Fields

§entity_id: EntityId
§zone_id: String
§seq: Seq
§

BankDeposit

Deposit physical coins into the bank ledger at a teller (plans/08 §8).

Fields

§entity_id: EntityId
§npc_id: String
§amount_copper: u64

Copper to deposit; 0 means deposit all on-person copper.

§seq: Seq
§

BankWithdraw

Withdraw copper from the bank ledger as physical coins at a teller.

Fields

§entity_id: EntityId
§npc_id: String
§amount_copper: u64

Copper to withdraw; 0 means withdraw all bank balance.

§seq: Seq
§

BankClose

Close the bank teller UI.

Fields

§entity_id: EntityId
§npc_id: String
§seq: Seq
§

BankTransfer

Magical clearinghouse transfer to another character’s bank ledger (plans/08 §8.3).

Fields

§entity_id: EntityId
§npc_id: String
§to_character_id: Option<Uuid>

Recipient character id (preferred when known).

§to_name: String

Fallback: match an online player’s display name (case-insensitive).

§amount_copper: u64

Copper to send (fee is extra, taken from sender bank balance).

§seq: Seq
§

StorageStore

Store an on-person item into the town storage vault at a storage manager.

Fields

§entity_id: EntityId
§npc_id: String
§item_instance_id: Uuid
§quantity: Option<u32>
§seq: Seq
§

StorageTake

Take an item from the town storage vault onto person.

Fields

§entity_id: EntityId
§npc_id: String
§item_instance_id: Uuid
§quantity: Option<u32>
§seq: Seq
§

StorageShip

Ship vault items to another storage building (distance fee + travel time).

Fields

§entity_id: EntityId
§npc_id: String
§dest_building_id: String
§item_instance_id: Uuid
§quantity: Option<u32>
§seq: Seq
§

StorageClose

Close the storage manager UI.

Fields

§entity_id: EntityId
§npc_id: String
§seq: Seq

Trait Implementations§

Source§

impl Clone for Intent

Source§

fn clone(&self) -> Intent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Intent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Intent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Intent

Source§

fn eq(&self, other: &Intent) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Intent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Intent

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.