Novelscript docs ================ Novelscript is an simple novel engine emulator. It's function is somewhat limited, But still somewhat able to do it's job. Supported commands & Arguments ============================== DIALOG ====== - w "" Prints a text into dialog box with specified TPS (Type per seconds) - fw "" Prints a text into dialog box in an instant. - br Making newline into dialog box. - cl Clear text in dialog box, at the same time hide the dialog box - s Wait for before executing next command - cl_menu Clear selection menu. CONFIG ====== - set_ns Automatically Next in When is 0, It is expected from user to tap to continue. - set_tps Set type per seconds when command "w" is executed. Default is 40 - set_bg "" The UI background color. could be an hex value, an "rgb()", Or a name. - set_color "" The UI front color. could be an hex value, an "rgb()", Or a name. - set_fi "" Set front image fadein for . Default is 70. - set_fo "" Set front image fadeout for . Default is 70. - title "" Set title of the novelscript, If needed. Misc ==== - load "<url>" Load novelscript from an URL. - l_img "<url>" Load an front image then shows it up. - h_img <wait> Hide the front image. <wait> is boolean value (true/false). - c_img "<url>" Change front image souce without fadein or fadeout. - m_play "<url>" Play a music from <url>. The current music will be overriden. - m_stop Stop playing the current music. - s_play "<url>" Play a sound from <url>. The current sound will be overriden. - add_menu "<novelscript-url>", "<buttonname>" Menu to add into interactive box. When clicked, It loads a pointed novelscript. Example: w "What's your favourite food?" add_menu "ff_soup", "Soup" ; When "Soup" is clicked, It will run 'load "ff_soup"'. ; So does the following with it is provided values. add_menu "ff_Steak", "Steak" add_menu "ff_Omelet", "Omelet" - c_url "<novelscript-url>" Change the current novelscript URL in Player's Browser URL box. - refresh Refresh Player's browser page. This is useful after setting c_url, when needed. - cd "<dir>" Change current directory to <dir> Useful for shorting the usage of loading certain assets. Example: ; Without using cd m_play "story/1.opus" load "story/1" ; After using cd cd "story" m_play "1.opus" load "1" - %js Execute an JavaScript code. An novelscript functions such as w could also be executed inside this command. Example: w "Working...." ; Here's the JavaScript code starts %js // Now write stuffs here. alert("Hello world!"); %js ; End of JS code. ; You could also insert more %js codes. w "Did you get that alert?" Other ===== - t_s "<text>" What small text that you would like to show after the big text? - t "<text>" What to write in a bigger text? - d "<text>" After the bigger text, What's the text for small one? - cl_t - cl_d - You know what these three command does already. cl_t_s - License ======= The novelscript engine is licensed under BSD-3-Clause. Copyright 2023 Yonle <yonle@lecturify.net> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.