Monogatari Documentation
HomepageGitHubDiscordTwitter
master
master
  • Welcome
  • Getting Started
    • Step 1: Setup Your Environment
    • Step 2: Download Monogatari
    • Step 3: Get Familiarized
    • Step 4: Make Your First Visual Novel
  • Upgrading from v1.4.1
  • F.A.Q.
  • Diagnosing Errors
  • Building Blocks
    • Script & Labels
    • Characters
    • Variables & Data Storage
    • Actions
      • Life Cycle
    • Components
      • Life Cycle
      • Built-in Properties
      • Built-in Functions
  • Script Actions
    • Choices
    • Clear
    • Conditionals
    • Dialogs
    • End
    • Gallery
    • Hide Canvas
    • Hide Character
    • Hide Image
    • Hide Particles
    • Hide Video
    • Input
    • Functions
    • Jump
    • Next
    • Placeholder
    • Play Music
    • Play Sound
    • Play Voice
    • Show Canvas
    • Show Background
    • Show Character
    • Show Image
    • Show Message
    • Show Notification
    • Show Particles
    • Show Scene
    • Show Video
    • Stop Music
    • Stop Sound
    • Stop Voice
    • Vibrate
    • Wait
  • Components
    • Credits Screen
    • Quick Menu
    • Loading Screen
    • Main Screen
    • Choice Container
    • Save Slot
    • Text-Box
  • Configuration Options
    • Game Configuration
      • Asset Preloading
      • Internationalization
      • Saving
      • Skip Main Menu
      • Storage
    • Player Preferences
    • Split Files
  • Style & Design
    • Responsiveness
    • CSS Classes
    • HTML Data Attributes
    • Icons
    • Image Menus
  • Releasing Your Game
    • Chrome App
    • Desktop App
    • Mobile
    • Web
  • Advanced: Monogatari Development
    • Core Libraries
      • Artemis
      • Kayros
      • Pandora
    • Actions
    • Components
    • Translations
    • Events
  • Releases
    • v2.0.0.alpha.8
    • v2.0.0.alpha.7
    • v2.0.0.alpha.6
    • v2.0.0.alpha.5
    • v2.0.0.alpha.4
    • v2.0.0.alpha.3
Powered by GitBook
On this page
  • Initialization, Setup, and Binding
  • Asset Preloading
  • Actions
  • Configurations
  • Localization
  • Save file Loading
  • Other:

Was this helpful?

  1. Advanced: Monogatari Development

Events

Monogatari has a lot of useful events that fire when certain engine events happen. These can be used to run your own custom functions with monogatari.on ().

For example, the following code will create a function that will be run every time the didLoadGame event fires:

monogatari.on ('didLoadGame', () => {
  // Something here
});

Below is an in-progress list of all events Monogatari has.

Initialization, Setup, and Binding

Event

Description

Details

willInit

willSetup

didSetup

willBind

didBind

didInit

Asset Preloading

Event

Description

Details

willPreloadAssets

assetLoaded

assetQueued

didPreloadAssets

Actions

Event

Description

Details

willRunAction

didRunAction

willRevertAction

didRevertAction

Configurations

configurationElementWillUpdate

configurationElementUpdate::<Options.js Key>

configurationElementDidUpdate

Localization

Event

Description

Details

willLocalize

didLocalize

Save file Loading

Event

Description

Details

willLoadGame

Event fires at the start of a save file load

After the player clicks to load the game but before the game finishes loading.

didLoadGame

Event fires after a save file load

After a save file has finished loading and all storage variable are set, but before anything is drawn to the screen and before players have control.

Other:

Event

Description

Details

didFinishTyping

Event fires after dialog text finishes

After every line of dialog in Monogatari's typewriter animation finishes and the player is able to click to get a new line. This includes at the end of the animation, as well as after clicking to skip the animation, or after every fed line if typewriter animation is disabled.

PreviousTranslationsNextv2.0.0.alpha.8

Last updated 4 years ago

Was this helpful?