Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

πŸ“˜ Chapter 1: What Scripts Are

Imagine your character is like an actor in a play. Normally, they follow the script you wrote in their Personality and Scenario fields. But what if you wanted them to change their lines on the fly depending on what the user says? That’s where scripts come in.

A script is just a tiny set of instructions you write in a very basic form of JavaScript. Think of it like a recipe card:

  • If this happens β†’ do that.
  • If the user says β€œhello” β†’ make the character smile.