For the complete documentation index, see llms.txt. This page is also available as Markdown.

NPC Toolkit

Reusable NPC behaviours and dialogue UI for SDK7 scenes.

Use reusable NPC behaviours and dialogue UI for SDK7 scenes.

Project information

Maintained by: Decentraland

View source

License: Apache-2.0. Check upstream terms before reuse; code and assets may have different terms.

Explore the code

These links point to a specific source snapshot so the explanations remain useful as upstream development continues. They are learning references, not a security assessment.

Separate revealing dialogue from advancing it

handleDialogClick, rushText, and confirmText first reveal the remaining characters if text is still typing. Subsequent input advances the script or selects a numeric dialogue branch, with callbacks for game actions.

Project context: Read this alongside the toolkit's Dialog data and npcDialogComponent state to understand how UI input drives a conversation.

Source references:

Connect proximity and pointer input to an NPC interaction

addClickReactions and addTriggerArea configure pointer callbacks and a child sphere trigger, with settings for click-only activation and continuing dialogue when the player walks away. activate and endInteraction coordinate the active NPC, cooldown, dialogue, and optional player-facing behavior.

Project context: These functions rely on the toolkit's callback maps and tracking system.

Source references:

Last updated