Monogatari is a simple web visual novel engine, created to bring Visual Novels to the web.
Release post available here.
Don't worry, the only file that's changed is the monogatari.js
file so the changes are simple to apply. If you haven't made any modifications to the file, just download the new one and replace yours with it.
wait
statement so you can wait a few moments before proceeding to the next statement.This release changes quite a lot, the easier way to upgrade is to download this new version and then start porting your game to the new one.
Once you've downloaded and unpacked this new release, you can start by copying your media files, the directory structure is still the same so copying over the img
, video
and audio
directories should be just fine.
Several options were added to the options.js
file so the best is to change the values on the file to match your previous one. The storage
variable is now located in it's own file storage.js
, simply move your previous storage object to this new file.
All items related to the script
are still inside the script.js
file, for that one you can simply copy the values of all the variables defined there.
The main.css
file now has some relevant selectors for the style, you can either take advantage of them to restructure your custom style or simply replace the whole file.
The index.html
file was also changed in some structural ways so instead of replacing it, make the same changes you made before to this one.
Bottom line is, try not to replace the new files with your previous ones, instead, copy the respective elements where they belong. Upgrading is still pretty much a manual work but hopefully that'll change in the future. If you need any help porting from a previous Monogatari version, don't doubt to contact me!
This is a maintenance update fixing 3 bugs present in the v1.3.3 release:
The only changed file was the monogatari.js
file inside the js
directory, if you haven't made changes to this file, updating your project is as simple as replacing your old monogatari.js
file with the new one.
If you have made changes to it, then here are the steps you need to do in order to fix those bugs:
This one is easy, just find (individually) and change the following statements from a var
to a let
:
From:
Line 1685
var choice = label[engine["Step"]]["Choice"][i];
Line 1712
var condition = statement["Conditional"];
Line 1731
var inputValue = $_("[data-ui='input'] input").value();
To:
let choice = label[engine["Step"]]["Choice"][i];
let condition = statement["Conditional"];
let inputValue = $_("[data-ui='input'] input").value();
Find the following code:
Line 876
function assertAsync (callable, args = null) {
And replace it with this one:
function assertAsync (callable, args) {
if (typeof args === "undefined") {
args = null;
}
Find the following block:
Line 533
if (typeof engine.ShowMenu != 'undefined') {
if (!engine["ShowMenu"]) {
stopAmbient();
playing = true;
$_("section").hide();
$_("#game").show();
analyseStatement(label[engine["Step"]]);
engine["Step"] += 1;
}
} else {
console.warn("The ShowMenu property is missing in the engine configuration.");
}
Replace it with this one:
function showMainMenu () {
if (typeof engine.ShowMenu != 'undefined') {
if (!engine["ShowMenu"]) {
stopAmbient();
playing = true;
$_("section").hide();
$_("#game").show();
analyseStatement(label[engine["Step"]]);
engine["Step"] += 1;
} else {
$_("[data-menu='main']").show();
}
} else {
console.warn("The ShowMenu property is missing in the engine configuration.");
}
}
showMainMenu ();
Now, find the 3 lines that contain this code, they should be around Line 666 and 682, depending on the space you left while changing the previous code:
$_("[data-menu='main']").show();
And replace those 3 with a call to the new function:
showMainMenu ();
And finally, thanks a lot to my Patrons who support the development of Monogatari and all my projects!
Class
property for custom individual styling