Skip to content

Code Editor

Code mode is GenPy's full-featured editor for writing and refining game scripts directly. It is the best choice when you want precise control over dialogue, flow, and scripting details.

What you can do in Code mode

  • Write and edit game script files directly
  • Keep several script files open in tabs and switch between them quickly
  • Jump to labels and characters from the file tree
  • Make changes that instantly appear in the rest of the workspace

Key features

  • Script syntax highlighting for keywords, strings, character lines, labels, comments, and more
  • Code folding for labels and nested blocks, so long scenes stay easy to scan
  • Auto-indentation that keeps your script structure clean as you type
  • Find and replace for quick fixes or large edits, including regular expression support
  • Multiple file tabs for moving between scenes without losing your place
  • Line numbers and a minimap to help you stay oriented in long files
  • Bracket matching for conditions, menus, and Python blocks
  • Quick navigation to labels and characters through the file tree

Code mode or Write mode?

Choose Code mode when you want to:

  • work directly with script syntax
  • build advanced logic such as conditions, Python blocks, variables, or custom screens
  • edit quickly with a keyboard-first workflow
  • fine-tune the exact wording and structure of your script

Choose Write mode when you want to:

  • see your story as visual cards instead of raw script
  • rearrange scenes and lines with less syntax on screen
  • stay focused on story flow and pacing
  • give non-technical collaborators an easier editing experience

INFO

Code mode and Write mode always stay in sync. You can switch views at any time without copying or rebuilding anything.

How it fits into your workspace

Edits you make in Code mode appear right away in other GenPy views. That means you can draft visually, then switch to code for precise adjustments, or do the reverse. This makes it easy to move between big-picture writing and detailed script control.

Tips for faster editing

  • Learn common shortcuts for find, replace, save, and tab switching
  • Right-click in the editor to open the context menu for quick actions
  • Use the file tree to jump straight to the label or character you need
  • Ask the AI assistant to help write scenes, clean up syntax, or suggest code patterns

TIP

If a scene starts to get complex, sketch it in Write mode first, then switch to Code mode to polish the logic and wording.

Built for GenPy creators.