Monogatari Documentation
HomepageGitHubDiscordTwitter
v2.1.0
v2.1.0
  • 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 Character Layer
    • Hide Image
    • Hide Particles
    • Hide Video
    • Input
    • Functions
    • Jump
    • Next
    • Placeholder
    • Play Music
    • Play Sound
    • Play Voice
    • Show Canvas
    • Show Background
    • Show Character
    • Show Character Layer
    • 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
  • Creating the Gallery
  • Unlocking Gallery Images

Was this helpful?

  1. Script Actions

Gallery

An Image Gallery of images for your players to unlock

PreviousEndNextHide Canvas

Last updated 5 years ago

Was this helpful?

New to Monogatari v2 is an Image Gallery feature. With it you can create a gallery of images that your players can unlock by going through the game and seeing all the images, like you will find in many visual novels.

Creating the Gallery

By default, the Image Gallery doesn't appear, since it would be pretty disappointing to your players to see a Gallery button on the main menu and have nothing inside of it.

This is easily fixed by simply declaring some images! First you put some images in the Gallery folder. If you don't already have a Gallery folder because you previously updated the Engine Folder from an earlier version of Monogatari v2, then you may create a new one.

Once you have an image or images in the gallery folder, you'll declare them in script.js .

monogatari.assets ('gallery', {
	'someImage': 'happy-shine.png'
});

Once that's done, you'll see that a new option has appeared on the Main Screen of your game.

Unlocking Gallery Images

By default, on a fresh new game, all gallery images are locked, as these are rewards for the player for having completed parts of the game and met certain conditions.

In order for the player to see this locked image, the player must reach a part of the script that enables it. To make this possible for your player, you'll include "gallery unlock" in your game script.

"y You've unlocked the gallery image",
"gallery unlock someImage", //unlocks the image
"y Great job!"

Once the player crosses over this line in the script, it will unlock the gallery image!

Monogatari gallery unlocks are not dependent on any save files, so if you, for whatever reason, want to lock the player out of being able to see any of the gallery images for any reason, like as part of, for instance, a story event that master resets the game, which includes losing the gallery, you may re-lock images by writing "gallery lock someImage" in your script.

"y This will lock the image away so that you can't see it anymore.",
"gallery lock someImage",
"y Goodbye, Protagonist-sama. I'll never forget you."

Monogatari's Default Main Menu with no Gallery
The "gallery" folder is located inside of your "assets" folder in your game's directory.
Monogatari's Default Main Menu with the Gallery option available.
The default Gallery screen with one image, with that one image being locked.
The default Gallery screen with one image, with that one image being Unlocked.