Monogatari Documentation
HomepageGitHubDiscordTwitter
v1.0.0
v1.0.0
  • Getting Started
  • Configuration
    • Internationalization
    • Saving
  • Design
    • CSS Classes
    • HTML Data Attributes
    • Icons
    • Image Menus
  • Port
    • Ren'py
  • Release
    • Chrome App
    • Desktop
    • Mobile
    • Web
  • Script
    • Audio
    • Characters
    • Choices
    • Images
    • JavaScript
    • Labels
    • Messages
    • Scenes
    • Split Files
    • Text
    • Video
Powered by GitBook
On this page

Was this helpful?

  1. Script

Characters

Declaring characters is really simple!

First, you need an identifier, this is what you'll use for the "Say" and "Show" commands. We'll choose the identifier "e" for this tutorial.

var characters = {
    "e":{

    }
}

Each character has many properties, like the name that is shown to the player, and the color for it.

var characters = {
    "e": {
        "Name": "Evelyn", // The name that will be shown when this character speaks.
        "Color": "#00bfff" // It could also be an rgb or rgba value.
    }
}

Since we are building visual novels, we also need images for our characters! You need the Directory inside the img directory where your files will be placed, and assign a simple identifier to each file.

var characters = {
    "e": {
        "Name": "Evelyn",
        "Color": "#00bfff",
        "Directory": "Evelyn", // Optional*
        "Images":{ // Images Identifier for the "Show" statement.
            "Normal": "normal.png",
            "Mad": "hmph!.png",
            "Doubt": "uhh.png",
            "Disappointed":"ngggg....png",
            "Happy": "hehehehe.png"
        },
        "Face": "face.png" // Optional, side image to show when the character speaks.
    }
}
  • The directory attribute is a subdirectory of characters where the images will be pulled, if no Directory is given, it will be assumed to be the characters directory itself.

PreviousAudioNextChoices

Last updated 6 years ago

Was this helpful?