Write the project's help overlay
r3_help_writeSet the instructions that ship WITH a project — controls, what to press, what it does. R3 renders them in a modal behind a floating "?" button and the H key, in the editor and in the live portal alike, so whoever opens your preview link can read them. This is the built-in surface for that, so a Code component needs no overlay of its own.
The body is markdown — headings, bullets, code, links: the controls as a player needs them, e.g. "## Controls\n\n- Space — jump".
A project has ONE help. Call this again and it replaces the text rather than adding a second. REPLACING needs baseVersion, the codeVersion r3_component_read gave for the Help: text is never merged, so a write on an older version is refused with the current text. The first Help needs none. The optional title is the modal's heading ("Controls", "How to play"); leave it out to keep "Help".
Kept at once in the project's live copy: every R3 tab with the project open shows it now. The result gives you the component's entityRef — pass that to r3_component_set to change the trigger key, move or hide the button, or have the help open automatically on load.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Heading shown at the top of the modal, e.g. "Controls". Default "Help". | |
| markdown | Yes | The help text, as markdown. Replaces whatever is there. | |
| projectId | Yes | The project to write into, from r3_project_create or r3_project_load. | |
| baseVersion | No | REQUIRED when the project already has a Help: its codeVersion, from r3_component_read. Leave it out for the first Help. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seq | No | ||
| name | Yes | ||
| title | Yes | ||
| action | Yes | ||
| answer | Yes | This answer in words: what was done, what R3 measured, decided or refused, and what to do next. The same text as the result's text block. Read it: the fields beside it are the data, this is the guidance. | |
| warnings | No | ||
| entityRef | Yes | ||
| projectId | Yes | ||
| codeVersion | Yes | ||
| componentId | Yes |