giving and showing
give (giving) parses give X to Y, give Y X, and
offer X to Y. The recipient must be a person (a person, the actor
trait), so give the sword to the door refuses with not_actor ("You
can only give things to people."). Giving does an implicit take if the item is not in
hand. The default NPC accepts anything: the item moves into their
inventory and the player sees given. Three data-driven wrinkles read
from the recipient's actor data: an item-count capacity (inventory_full)
and a weight capacity (too_heavy), both phrased as the NPC declining,
and a preferences object whose refuses list blocks matching items with
not_interested while likes/dislikes color acceptance as
gratefully_accepts / reluctantly_accepts.
show (showing) parses show X to Y and show Y X. It is
purely social: nothing moves, nothing changes hands. The viewer must be a
person in the same room (viewer_too_far otherwise); the item is
implicitly taken if needed. The default reaction is shown (or
wearing_shown when the item is currently worn), and a viewer with a
reactions object in its actor data reacts by item-name match (the
modern replacement for reactions is an on showing it clause on the
viewer, which can do anything).
The author writes:
create the Ferry Dock
a room
A weathered dock; the ferry rocks at its mooring.
create the ferryman
a person
in the Ferry Dock
A stooped ferryman, palm out, endlessly patient.
after giving it
phrase fare-paid
The ferryman bites the token, nods, and pockets it.
end after
on showing it
phrase ferryman-appraises
The ferryman leans in, squints, and names a price you pretend not to hear.
end on
create the bone token
aka token
A ferry token carved from bone.
create the silver locket
aka locket
Your mother's locket. It does not leave your neck.
on giving it
refuse locket-keepsake
end on
phrase locket-keepsake:
You close your fist around the locket; some things are not for trade.
create the player
starts in the Ferry Dock
carries the bone token
carries the silver locket
The player sees:
> give the locket to the ferryman
You close your fist around the locket; some things are not for trade.
> show the locket to the ferryman
The ferryman leans in, squints, and names a price you pretend not to hear.
> give the token to the ferryman
You give the bone token to the ferryman.
The ferryman bites the token, nods, and pockets it.
Both sides of the transaction are consulted: the locket's item-side guard
vetoes the trade, the ferryman's after giving it reacts once it commits,
and his on showing it replaces the flat shown line entirely. For a
transaction richer still (a guard who takes the bribe and opens the
gate), the Sharpee Way is a capability behavior registered for
giving on the recipient, which takes over the whole exchange.
give (giving-*) | show (showing-*) | |
|---|---|---|
| Refusals | no_item · no_recipient · not_actor · self · not_holding · recipient_not_visible · recipient_not_reachable · inventory_full / too_heavy (capacity, phrased as declining) · not_interested (preferences.refuses) | no_item · no_viewer · not_actor · self · not_carrying · viewer_not_visible · viewer_too_far |
| Success | given · gratefully_accepts / reluctantly_accepts (likes/dislikes) · accepts and refuses exist for story use — stdlib itself never picks them | shown · wearing_shown (worn item) · reactions matches: viewer_recognizes · viewer_impressed · viewer_unimpressed · viewer_examines · fallback viewer_nods |
| Events | given / give_blocked | shown / show_blocked |
Interceptors: on giving it / after giving it and on showing it /
after showing it, on the item or on the recipient/viewer.