CONTENT CONTRACT · VERSION 1
items_given
Items a player transferred to an NPC inventory, after the transfer committed.
Signature
{ actor: ActorRef, count: PositiveCount, item: ItemId, kind: "items_given", npc: NpcId, player: PlayerRef, position: Position, target: ActorRef }Fields
| Name | Type | Meaning |
|---|---|---|
actor | ActorRef | Player body that gave the items. Length: 1…256; Pattern: ^[\s\S]+$ |
count | PositiveCount | Number of items transferred. Range: 1…2147483647; Unit: count |
item | ItemId | Item transferred. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: item |
kind | "items_given" | Discriminant |
npc | NpcId | Recipient NPC definition at the transfer. Length: 1…129; Pattern: ^[a-z][a-z0-9_]{0,31}:[a-z][a-z0-9_]{0,95}$; Reference: npc |
player | PlayerRef | Player who gave them. Length: 1…256; Pattern: ^[\s\S]+$ |
position | Position | Recipient location at the committed transfer. |
target | ActorRef | The resolved recipient body. Length: 1…256; Pattern: ^[\s\S]+$ |
Validated example
{
"actor": "a1",
"count": 2,
"item": "core:wood",
"kind": "items_given",
"npc": "core:juana",
"player": "p1",
"position": {
"map": "m1",
"x_mm": 0,
"y_mm": 0,
"z_mm": 0
},
"target": "a2"
}