Visual novel engine
, officially abbreviated as Nscr, also known under its production title Scripter4, is a game engine developed by Naoki Takahashi between 1999 and 2018 functioning with its own script language which facilitates the creation of both visual and sound novels. The SDK is only available for Windows. From version 2.82, NScripter supports both Japanese characters - these are two bytes long - and any single-byte character; before that, it only supported Japanese characters. This engine was very popular in Japan because of its simplicity and because it was free for amateur game makers. Additionally, there are forks available to extend NScripter's capabilities to display characters from another language, run a game on other platforms, etc.
NScripter.
NScripter's development ranged from none }} to none }}; it was first called by its production title Scripter4 because it was the successor to Scripter3, Naoki Takahashi's previous engine. 23 February 2018 was the date of the release of the final version of NScripter.
Characteristics.
The script is executed by the engine in an interpreter. The syntax is very simple, similar to the BASIC language. The functions needed to create visual novels and sound novels, such as displaying text, sprites and CG, playing music and handling choices, are built into the engine as a basic API. As a result, game creation is simplified by the ability to write a script that calls these functions directly.
In order to meet specific needs, it is possible to use a method called 'system customisation' which modifies the behaviour of the engine itself in order to add features such as a save system, complex effects not provided in the basic API, or video management. To do this, external DLLs can be used. These functions can be used to create simulation games, etc.
On the other hand, before version 2.92, object-oriented elements were not incorporated into the software and NScripter did not handle parallelism at all. The statement was used to try to do structured programming within NScripter. Overall, NScripter specialises in the development of visual novels and sound novels, and the creation of these types of games is simplified.
In version 2.82, NScripter was given support for 1-byte characters - this allows writing in the core Latin alphabet and the English alphabet for English locutors.
Extension via Lua.
Since version 2.93 released in none }}, it is possible to extend the capabilities of NScripter by using Lua.
Lua is implemented as a DLL and is launched by NScripter itself. It is possible to call any function of this language from a conventional NScripter script and call an NScripter function on the Lua side which allows to transfer almost completely the game script itself to Lua. In addition to complex numerical operations that were not possible with conventional NScripter, this language provides full functionality typical of script languages such as file operations, block scoping, array methods and module libraries. Lua allows NScripter to support parallelism, which now makes it possible to manipulate every element of the game simultaneously and in parallel; for example, when an animation is played, NScripter does nothing else at the same time. This language greatly improves and simplifies the description of the various extensions, which were previously done using a method called 'system customisation', and offers the possibility to modify the behaviour of the engine itself, for example to change the behaviour at the end of the game. However, the use of Lua is not mandatory and the old system customisation method is still available.
Documentation.
NScripter has official documentation in electronic format and four official books dating from 2004, 2005, 2006 and 2007 respectively. The books are now only available as second hand copies. There are also unofficial electronic documentations like senzogawa's.
License.
Regarding the license, non-commercial use of the software is allowed, any non-commercial game can then be distributed without paying a royalty.
In none }}, the terms of use were simplified and participants in games and other contests can now use the software free of charge, regardless of whether they receive a cash prize and regardless of the form of distribution of the winning work. In addition, as long as they are distributed for free, they can be used regardless of the distinction between business and individual users and the method of distribution. Even if a work is included in a magazine supplement as freeware or shareware, it can be used for free.
However, in order to sell a work commercially, a royalty must be paid once a game is rated by a rating body such as the EOCS. Even in the case of amateur games and open source software/games, once a royalty reaches 400 000 yen or more, it will be treated as a commercial work and will be taken care of if there are any problems with the engine. In this case, if the developer wants to add a feature - such as an extension or obfuscation treatment for each work - it will be taken care of as part of the royalty.
It is possible to negotiate or even not pay the fee; NScripter's developer is especially supportive of game developers who are not looking to make a profit and those who are struggling to do so because of the royalty.
Creating a DLL extension and redistributing it under the GPL is disallowed, however the LGPL is considered acceptable.
Popularity.
This engine was very popular in Japan in the 2000s due to its simplicity and because it was free for amateur video game creators.
Examples of scripts.
The following examples use ONScripter-EN's variant of the NScript script language.
Simple script.
This simple script defines some basic parameters and displays a text.
 ;templatestyles src="Template:Hidden begin/styles.css"/ ;Script
caption "Example" ;Name of the graphical window
versionstr "Example"," version 1.0-en" ;Defines the string of text used to describe the game version in the About menu.
savename `Save`,`Load`,`File ` ;Defines the titles of the save and load menus as well as the text string designating a save file in
savenumber 15 ;Defines the maximum saves number.
rmenu `Save`,save,`Load`,load,`Erase window`,windowerase,`Quit`,end ;Names the buttons of the menu appearing when the user right-clicks.
game ;Closes the block defining all of the game parameters and begins the game.
`An example text...@ then a text that appears after user interaction.\ And finally another page of text.\
end ;Exits from the game.
Script with choice and background image.
Any visual novel that is not linear or called 'kinetic novel' has choices. This script also contains the instructions used to display a background image and, in addition to that, with a fade-in effect per pixel.
 ;templatestyles src="Template:Hidden begin/styles.css"/ ;Script
[…] (see the *define block from the previous example)
/!\ Code line added to the define block *define /!\
effect 2,10,1000 ;Defines effect number 2 (effects 0 and 1 are reserved for not displaying a transition), which is a fade-in per pixel.
game ;Closes the block defining all of the game parameters and begins the game.
bg "background-image.png",2 ;Transition to make 'background-image.png' appear with the effect number 2.
`[Character 1]
`So...@ do you prefer reading or watching films?@
br ;Line break to make space between the choices and the question
select "Reading", *choice1, "Watching films", *choice2 ;Displays 2 possibles choices
`[Character 2]
`I prefer reading.@
`[Character 1]
`Me too! What's your favourite book?@
br ;Line break
`And the conversation went on for another 2-3 hours...\
end ;Exits from the game.
`[Character 2]
`I prefer watching films.@
`[Character 1]
`Me too! What's your favourite film?@
br ;Line break
`And the conversation went on for another 2-3 hours...\
end ;Exits from the game.
Notable games using NScripter.
Most of the games running on NScripter are amateur video games, so few NScripter games are notable. Most of the notable games below are commercial games and therefore commercial successes.
NScripter2.
, also known by its production title Sunday Game Engine (SGE), is the successor to the NScripter game engine, it is developed by Naoki Takahashi. The SDK is only available for Windows.
Development and release.
In none }}, the prototype version of the engine was released under the name Sunday Game Engine. Since then, development has continued and the official beta version of the engine was made available on 31 August 2012.
User's guide.
As of none }}, NScripter2 was still at the stage where only the engine itself and minimal documentation have been released. The developer intended to update and simplify it but the engine has not been updated since none }}.
Syntax.
The syntax differs from NScripter although it is still inspired by the BASIC language - more precisely Visual Basic and QuickBasic - ; for example, the functions no longer start with an asterisk (*) but with an at symbol [Email] the beginning function is no longer " but " and, another example, in order to be more coherent with Lua, the command to leave the program is no longer " - the command that ends an 'if' condition in Lua - as it is in BASIC but ".
There is an unofficial extension for the libre text editor Atom that facilitates the development of scripts for NScripter2.
License.
Fundamentally, the same licensing terms as NScripter apply, i.e. the engine is free for amateur games and non-commercial works. It is possible to use NScripter2 to develop commercial works, but a royalty must be paid.
Scripter3.
, officially abbreviated as Scr3 is a free proprietary game engine developed by Naoki Takahashi between none }} and none }} functioning with its own script language which facilitates the creation of both visual and sound novels. The SDK is only available for Windows. It is the predecessor of NScripter, another Naoki Takahashi engine with a more flexible syntax and more functionalities; for example, NScripter natively supports images in JPEG/JPG format while Scripter3 needs a DLL named 'jpeglib.dll'.
Characteristics.
Scripter3 reads script files in plain text format with Shift-JIS encoding and TXT extension, the engine will read in order first the 0.txt file up to the 99.txt file, but can also read obfuscated scripts with .scp extension - equivalent to nscript.dat for NScripter -; priority is however given to plain text files. It is possible to display characters from the core Latin alphabet and the English alphabet, or misc. characters such as French quotation marks, but these must be full-width characters.
Scripter3 handles the text but does not handle the rest of the graphic part of the text boxes, which is essential for any visual novel to establish a contrast between decor and text. Developers have to incorporate the text box graphics directly into each background image, so there is often a copy of a background image without a text box and another with one. As a result, if the player right-clicks to hide the text, the text box remains displayed, because it is integrated into the background image.
The engine is able to read audio CDs, this allowed especially the creators of amateur video games to read audio CDs of other productions, often commercial, for example for parodies, etc.
Its successor, NScripter, has kept more or less the same instructions, so the two engines are relatively compatible with each other; for example, some instructions remain unchanged like the text instructions such as @, \, etc., we also find in both engines the *start label, the caption instruction, etc., while some instructions change like the bp command which is renamed to background in NScripter.
Popularity.
Scripter3 was very popular during the years when Naoki Takahashi was still developing it, however, the engine has almost disappeared from the Internet and everything related to it is now only available on archive websites. Many users assisted each other on the official forum, the developer himself was present, watching day after day as his program became popular. According to the little information still online, when Scripter3 was in its golden age, it was more popular than the competing engine KiriKiri. After the last version of Scripter3 was released on 27 November 1999 and the developer recommended to switch to NScripter, the community behind Scripter3 switched to NScripter, which was available since 6 September 1999.
Related engines.
The original NScripter engine has been recreated many times, cloned to add new features or to liberate itself from the proprietary license of the engine.
ONScripter.
ONScripter is a libre software developed to be a free and compatible equivalent of NScripter. It has been developed by Studio O.G.A. since 6 February 2002 and its latest version was released on 16 August 2022. Although ONScripter can display single-byte characters for writing with the core Latin alphabet and the English alphabet, there are still many bugs; empty or incomplete lookback mode, etc. These problems have not been fixed. These problems were not fixed because the English-language branch of ONScripter, ONScripter-EN, fixed these problems and was therefore recommended