Skip to content

Releases: Ratman463/LingChat-ScriptEditor

LingChat Script Editor v0.0.0

19 Feb 11:28
5f4da04

Choose a tag to compare

A visual script editor for LingChat, an LLM (Large Language Model) based game. This application allows users to create and customize game scripts with an intuitive visual interface.

Note 1: This release includes story preview experimental feature, please fire new issue if any problems encountered
Note 2: All data is stored at scripts folder. The structure must not be modified, otherwise LingChat will not recognzie it

Run the Application

  1. Extract the downloaded archive (or install via the setup exe)
  2. Run LingChat Script Editor.exe
  3. The backend server will start automatically

Project Structure

LingChat-ScriptEditor/
├── frontend/                    # Vue.js + Electron frontend
│   ├── src/
│   │   ├── components/          # Vue components
│   │   │   ├── ChapterFlowCanvas.vue    # Main editor canvas
│   │   │   ├── ChapterNode.vue          # Chapter node component
│   │   │   └── EventCanvas.vue          # Event editing canvas
│   │   ├── views/               # Page views
│   │   │   ├── HomeView.vue     # Script selection
│   │   │   └── EditorView.vue   # Main editor
│   │   ├── stores/              # Pinia state management
│   │   └── config/              # Configuration files
│   ├── electron/                # Electron main process
│   └── public/                  # Static assets
│
├── backend/                     # FastAPI Python backend
│   ├── src/
│   │   ├── main.py              # FastAPI application
│   │   ├── models.py            # Pydantic models
│   │   └── routers/             # API routes
│   │       ├── scripts.py       # Script management
│   │       ├── assets.py        # Asset management
│   │       └── characters.py    # Character management
│   ├── scripts/                 # Game scripts (user data)
│   └── run.py                   # Entry point
│
├── README.md                    # This file
└── README_BUILD.md              # Build instructions

Script Format

Scripts are stored in YAML format with the following structure:

scripts/
└── my_script/
    ├── story_config.yaml        # Script metadata
    ├── Characters/              # Character definitions
    │   └── CharacterName/
    │       ├── settings.txt     # Character settings
    │       └── avatar/          # Expression images
    ├── Assests/                 # Assets
    │   ├── Backgrounds/
    │   ├── Musics/
    │   └── Sounds/
    └── Charpters/               # Chapter YAML files
        └── intro.yaml

Example Chapter (YAML)

events:
  - type: scene
    background: "school.png"
    music: "morning.mp3"
  
  - type: dialogue
    character: "Alice"
    expression: "happy"
    text: "Good morning!"
  
  - type: choice
    text: "How do you respond?"
    options:
      - text: "Say hello"
        next: "chapter2.yaml"
      - text: "Walk away"
        next: "chapter3.yaml"
  
  - type: end
    next: "chapter2.yaml"

Supported Event Types

Event Type Description
scene Set background and music
dialogue Character dialogue with expression
choice Player choice with branching
narration Narrative text
condition Conditional branching
ai_mode Enable AI-driven dialogue
end Chapter end with next chapter link

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments