12. Handwritten Notes & Paper Documents (GiveHandnoteToPlayer)
This subsystem wraps PreBuiltItemHelper.CreateHandnote and CreatePaperWithText, allowing NPCs to leave physical, readable notes or printed documents on the counter or in the player's inventory (such as V's Encrypted Note in Act 4 of CyberpunkMercV).
SDK Methods
| Method Signature | Return Type | Description |
|---|---|---|
CreateHandnoteItem(string title, string body, string signature, int fontIndex = 0) | GameItem | Creates a handwritten note item with a title, body text, signature, and handwriting font (0..2). |
CreatePaperNoteItem(string title, string body) | GameItem | Creates a printed paper document item. |
SpawnItemOnCounterOrStore(GameItem item, bool isStolen = false, bool isContraband = false) | bool | Spawns the item onto the counter if a client is present, or adds it to the store inventory (GraphUtils.EmporiumTryAdd). |
GiveHandnoteToPlayer(string title, string body, string signature, int fontIndex = 0) | bool | Creates and delivers a handwritten note in a single call. |
Code Example
csharp
NpcFrameworkSdk.GiveHandnoteToPlayer(
title: NpcFrameworkSdk.T("V 的加密便条", "V's Encrypted Note"),
body: NpcFrameworkSdk.T(
"铁子,大恩不言谢。
我的私人全息通讯号是:2077077
随时通过店内电话打给我。",
"Preem work covering for me, choom.
My private holophone number is: 2077077
Ring me on the store phone anytime."),
signature: "V (Vincent)",
fontIndex: 1
);