Communication, whisper stones & player trade
Players talk and trade in-world over the same TCP session as gameplay intents. Designer notes: docs/player-chat-and-trade.md.
Channels
| Channel | How | Range / privacy |
|---|---|---|
| Nearby | t focuses CHAT input |
≤15 m + LOS; clarity bands at 5 / 10 / 15 m; walls/rooms block |
| Whisper | Near a player → f → Whisper |
Private (no eavesdrop); 1.5 m interact radius to send or stay in mode |
| Whisper stone | g picks a pouch contact |
Region-wide; both must hold a matched pair and be online |
There is no directed “Speak” verb on f. Loud speech is always Nearby (t). Tab while whispering returns to Nearby.
Whisper range cancel
Directed whisper uses the same interact radius as Trade. When the peer walks out of range (or leaves AOI), each client with Whisper mode open drops back to Nearby and logs Whisper … ended — out of range. Whisper-stone threads are unaffected.
Unified CHAT column (gfx)
Always visible beside Quests:
- Inline Nearby / Whisper / Stone input (no composer popup)
- Colored lines: you = mint; peers = stable pastel from entity id
- Inbound trade requests:
Yaccept ·Ndecline - Soft synthesized tones: trade offer, whisper, nearby speech, trade open/decline
- Nearby / Direct speech shows a short comic
…bubble above the speaker (same color as the chat line)
Player trade
- Requester:
f→ Trade → CHAT shows “request sent” - Peer: CHAT “X wants to trade — [Y]/[N]”
- Accept opens the trade window (equal columns); mutual
TradeRequestalso opens it - Present (
p): stack of 1 presents immediately; stack of 2+ uses a quantity prompt ([/]/ digits /a= all) - Ready (
r) when both agree; Esc cancels
Declining escalates a per-pair cooldown (15 → 30 → 60 → 120 → 240 → 300 s). Accept resets the streak. Tunable in server-settings.yaml → social.* / content-admin Social / trade. Walking out of interact range cancels an open trade (server-side, same as other pair sessions).
Whisper stones
- Harvest blank stones (whisper shrine / nodes)
- Both present blanks in a trade and ready → matched pair lands in each whisper pouch (zero carry mass)
g→ select contact → Enter opens stone chat- Destroying your stone cuts the link
Protocol
| Intent / message | Role |
|---|---|
Intent::Say { channel, text, to_entity, … } |
Nearby / Whisper / WhisperStone |
ServerMessage::Chat |
Per-recipient delivery (text already garbled for Nearby) |
TradeRequest / TradeRespond / TradePresent / TradeUnpresent / TradeSetReady / TradeCancel |
P2P escrow |
StowWhisperStone / DestroyWhisperStone |
Pouch management |
Acoustics: crates/sim/src/chat_acoustics.rs, region_chat.rs. Trade + stones: region_trade.rs, whisper_stones.rs. Client UI: crates/client-lib/src/social.rs, gfx hud/chat.rs.
Gfx keys
| Key | Action |
|---|---|
t |
Focus Nearby chat in CHAT |
g |
Whisper-stone contact picker in CHAT |
f |
Use nearest — players → Whisper / Trade only |
Y / N |
Accept / decline inbound trade |
| Tab | While whispering or on stone: return to Nearby |
| Esc | Unfocus chat / cancel trade |
' |
Hide / show the bottom system LOG (more sidebar room; remembered in client config) |
Related
- NPC talk / shop: separate from player CHAT (
fon NPCs → verb menu) - Economy markets / broker listings: 10 economy and markets
- Banks & storage: 08 inventory carriers and storage