IntroductionONScripter (O-N-Scripter) is a program that interprets and executes scripts written for NScripter (Details) in its own way. It can run games on Windows, Android, iOS, etc. using the exact same game data. Show
I accept behavior reports, bug reports, feature addition requests, and patches at any time, so please send them to [Bug Tracking System]. Please uncheck the box in the middle of the options field before submitting your report. You can send your reports directly to the email address listed at the bottom of this page. Source packageBinary package (Android and Zaurus packages are tested by ME��
ONScripter-EN is a variant of ONScripter, which has been extended by Uncle Mion san to handle English scripts well. It has more supported NScripter commands than ONScripter. It also seems to be able to execute conventional Japanese scripts without problems. Features
How to runRequirementsThe following programming languages and libraries are required. The versions listed are for my development environment, but you don't need to adapt to this version. Required
Recommended
Optional
ONScripter has been tested on Linux (Debian Buster), Android (Sony (8.0)), iOS (iPad2), and sometimes on Windows. How to buildUnpack ONScripter source package in an appropriate location. Type " make -f Makefile.Linux " on Linux, or type " nmake -f Makefile.Win " on Windows. On Windows, the path to the header files and libraries for bzip2, SDL, SMPEG, etc., should be modified in Makefile.Win depending on your environment. How to run[Required] Copy the necessary archives of a game to the same location. Usually, you need a script file (0.txt or nscript.dat) and archive files (arc.sar or *.nsa or *.ns2). If there are multiple archive files such as arc1.nsa to arc9.nsa, you need to copy them as well. In some games, images and sounds are placed outside archive files. In that case, you also need to copy them all. The easiest way is to copy the directory including sub-directories where a game is installed. [Required] Following Displaying Kanji using TrueType font, put a Japanese TrueType font file renamed as "default.ttf". [Optional] If you want to play music files instead of CD audio tracks, please follow the instructions in Using music files instead of CD audio to prepare music files. [Required] Run ONScripter. It reads from nscript.dat and archives in the same directory, and the game will start. Since ONScripter outputs save files and status files in the same directory, please be sure that the directory is writable. MiscellaneousKeyboard shortcutAll operations including mouse operations can be performed by keyboard short-cuts, though the shortcut keys defined in the script have higher priority.
Command line options
How to play on different platforms at the same timeYou can share save files among different platforms such as desktop PC (Windows, Linux, MacOSX), smartphone (Android, iPhone), etc. To do this, you need to prepare game data on all platforms and move all output files generated from ONScripter (or NScripter) from one platform to another. NScripter or ONScripter generates/updates following files. Some may not be generated depending on games.
The format of a save file may change when a newer version of NScripter (or ONScripter) is released. So, ONScripter generates a save file having extra information about the version number of a save file in the header. A save file without a version number is also generated under "sav" directory if it exists and it is compatible with a save file generated from the latest NScripter. Note that the version number of a save file is different from the version number (e.g. 20120225) of ONScripter. ONScripter can load any save files with version number and save files in the latest format without version number. From ONScripter to ONScripterSimply copy all the above mentioned modified files including save*.dat. ONScripter_dir/* �� ONScripter_dir/*From NScripter to ONScripterSimply copy all the above mentioned modified files including save*.dat. NScripter_dir/* �� ONScripter_dir/*From ONScripter to NScripterCopy all the above mentioned modified files excluding save*.dat. ONScripter_dir/* -> NScripter_dir/* Copy save files under "sav" directory ONScripter_dir/sav/save*.dat -> NScripter_dir/save*.datNotice
Reading from the registrygetreg command reads data from the registry of Windows. ONScripter emulates this command by reading from registry.txt (text file) that describes the data. The format of registry.txt is as follows. Letters are case sensitive. Be careful not to have extra spaces. If you use Kanji characters, use Shift JIS code set. [the second argument of getreg command (excluding quotation marks around)] the third argument of getreg command = string to be compared (including quotation marks around) Example of registry.txt [software\StudioOGA\ONScripter] "INSTALL"="FULL" [software\StudioOGA\�Τޤ�] "Download log file"="c:\nomad_down.log" "Upload log file"="c:\nomad_up.log" You can share a registry file among games if ONScripter is launched with --registry option. Without --registry option, it looks for registry.txt in the current directory. Loading DLLexec_dll command executes DLL (Dynamic Link Library) that is built to run on Windows. ONScripter emulates this command by reading from dll.txt (text file) that describes the relationship between the name of a DLL and its return value. So, DLL is not executed and the return value is fixed. The format of dll.txt is as follows. Letters are case sensitive. Be careful not to have extra spaces. If you use Kanji characters, use Shift JIS code set. [Name of DLL] str = "string" (string value received in getret command) ret = integer (integer value received in getret command) Example of dll.txt [test.dll] str = "����/��Ϻ/��ޤ�/������" ret = 1 [test2.dll] str = "StudioOGA" ret = 2 You can share a dll file among games if ONScripter is launched with --dll option. Without --dll option, it looks for dll.txt in the current directory. Online modification of volume and variablesThis is a temporary function and might be modified or removed in the future. It is enabled by setting '--edit' option when launching ONScripter. If you press z key when waiting for key-in, you will enter edit mode and the title bar becomes as follows. [EDIT MODE] MP3 vol (m) SE vol (s) Voice vol (v) Numeric variable (n) If you further press any of m, s, v, n key, you will enter sub edit mode where you can change corresponding variables. You can escape from edit mode by pressing ESC key. If you press 'n' key, you have to choose a variable first and then change its value. You can use '0' to '9', '-', BackSpace, Esc, Return keys when you change numeric variables. '-' key is accepted when you are editting a numeric variable and the value is 0. If the value is other than 0, you need to clear the value by pressing BackSpace key and then press '-' key. Displaying Kanji characters using TrueType fontJapanese TrueType font is required to display Kanji characters. For example, msgothic.ttc under c:\Windows\Fonts in Windows 7, or freely available TrueType fonts shown below can be used. Genjyuu gothic It is a round gothic style font derived from Gennokaku gothic. Among them, I recommend GenJyuuGothicX-Monospace-Bold.ttf because it is bold, beautiful, and easy-to-read. M+ and IPA compositional font Re-distributable fonts based on M+ font and IPA font. Among them, I recommend Migu-2M-bold.ttf because it is bold, beautiful, and easy-to-read. IPA font Re-distributable Gothic and Mincho font. Mika-chan font Handwritten font.Because SDL_ttf renders Kanji characters badly when TTF_STYLE_BOLD is enabled, ONScripter just ignores "bold" settings. If you use a small device like smartphones, it is better to use a bold TrueType font such as Migu-2M-bold.ttf mentioned above and HG Gothic E (HGRGE.TTC). TrueType font file should be renamed to default.ttf and be placed in the same directory where a script file is placed before launching ONScripter. Using sound files instead of CD audioCreate a directory named "cd" in the directory where scripts and archives are placed, and put sound files as follows. The behavior of a command to play the first CD audio track, i.e. play "*1", is changed to play "track01.mp3". This is the default behavior unless "--cdaudio" option is specified. In case of missing sound files, "play" command is just ignored. Playing MIDIMIDI is played by SDL_mixer. When playing MIDI, a temporary file "tmp.mus" is created because SDL_mixer can only load MIDI data from a file. Playing MIDI using a software sound module on Unix (tested on Linux and Zaurus) (default) Playing MIDI using timidity, a software sound module incorporated in SDL_mixer. In this case, you need to download a set of sound patches timidity.tar.gz and expand them under, for example, /usr/local/lib/. Playing MIDI on Windows You need to download a set of sound patches timidity.tar.gz and expand them under c:\. Playing MIDI using a hardware sound module on Unix (tested on Linux) playmidi ���γ�����������ѤǤ��� MIDI player �ȡ��뤷���Ķ��ѿ� MUSIC_CMD �����ꤷ�Ƥ������������� MUSIC_CMD=/usr/bin/playmidi�������Ǥϡ����ꥢ����³�dz���������Ҥ���MUSIC_CMD �� '/usr/bin/midiplay -q -o /dev/ttyS0' �����ꤷ��ư���ǧ�Ƥ��ޤ��� playmidi�ϡ������ͥ��ǧ������� MIDI �ݡ��Ȥ��Ф��Ƥ������դǤ��ޤ���midiplay�ϥ��ꥢ���ľ�ܽФ��ޤ��� ���ꥢ��ݡ��Ȥ�MIDI�ݡ��Ȥˤ��� patch��Ȥ��С�playmidi �Ǥ⥷�ꥢ����³������Ȥ������Ǥ�����̤��ǧ�Ǥ��� Compression of archivesThe screen size of Linux Zaurus (320x240) or PSP (360x270) is smaller than the size expected in the script. By resizing the images in the archives beforehand, you can keep the size of the archives small and use the storage efficiently. Images with SPB format are stored as BMP format unless -e option is specified. Usagesarconv src_screen_width dst_screen_width src_SAR_filename dst_SAR_filename nsaconv [-e] [-ns2] [-ns3] src_screen_width dst_screen_width src_NSA_filename dst_NSA_filename src_screen_width can be 640 or 800. dst_screen_width can be any width such as 176(iPod), 320(QVGA), 360(PSP), 384(PSP), 640(VGA). ExamplesConverting a SAR archive from 640x480 to 320x240. > sarconv 640 320 arc.sar zaurus_dir/arc.sar ... Converting a NSA archive from 800x600 to 320x240. > nsaconv [-e] 800 320 arc.nsa zaurus_dir/arc.nsa > nsaconv [-e] 800 320 arc1.nsa zaurus_dir/arc1.nsa ... Converting a NSA (ns2) archive from 800x600 to 640x480. > nsaconv [-e] -ns2 800 640 arc.nsa zaurus_dir/arc.nsa > nsaconv [-e] -ns2 800 640 arc1.nsa zaurus_dir/arc1.nsa ... You have to manually distinguish the version (1 or 2 or 3) of NSA archive. The use of ns2 command in the script indicates version 2, while the use of ns3 command indicates version 3. If you cannot check the script, please try without -ns2 first. If it fails, please try with -ns2 or -ns3. With the -e option, wav and bmp files are compressed in nbz format. This sets a special value, incompatible with NScripter, for the flag indicating the compression type of NSA archive. This extension may conflict with an extension by NScripter in the future. In that case, it can be solved by modifying the converter and reconverting archives. Since reconverting doesn't affect save files, etc., those who use ONScripter in Zaurus are advised to convert with this option. Since wav is compressed with bzip2, archives become quite small in games that heavily use wav. As a disadvantage, the game speed is slightly slower because it additionally decodes bzip2, but it's not noticiable. With the -j option, bmp files are converted to jpeg files while keeping the filenames unchanged. Except, bmp files using palette color are not converted. The option -q sets the quality of jpeg compression ranging from 0 to 100. Small value indicates low quality but small file size. The default value is 75. The option --disable-rescale is required when a rescaled archive is used. You can enjoy a game in 320x240 resolution on Linux if ONScripter is compiled with -DPDA. Problem of chattering MP3 music on Windows platformWindows �ǥ���ѥ���Ѥ� SMPEG �ΥХ��ʥ����äƤ���ȡ�MP3 �ˤ�äƤϲ����֤Ĥ֤ĤȤ���Ʊ��դ���ޤ�������ϡ�SMPEG �� MSVC �ǥ���ѥ��뤹����κ�Ŭ��������ǡ��������̤�� MSVC �� global optimization �������������������ʬ�ǥ���ѥ��뤹�뤳�ȤDz��Ǥ��ޤ��� ��������ե�����: audio/mpeglayer3.cpp #pragma optimize( "g", off ) void MPEGaudio::layer3reorderandantialias(int ch,int gr, REAL in[SBLIMIT][SSLIMIT], REAL out[SBLIMIT][SSLIMIT]){ ...... } #pragma optimize( "g", on ) How to write an English novelThis feature is an extension to NScripter proposed by Chend (chendo[at]gmail.com). He has contributed to ONScripter greatly by proposing specifications and sending patches. ����ѥ������ ENABLE_1BYTE_CHAR ��������뤳�Ȥǡ�`(back quote) �� �߹����⤷�����̤� ` �ޤǤ�1byte ʸ���ǵ��Ҥ��줿�ƥ�����ʸ�Ȥߤʤ� ��ɽ������褦�ˤ��ޤ������δ֤Ǥ�Ⱦ�ѥ��ڡ�����ɽ���Ȥ���ͭ���ˤʤ�� �������ƥ���������ѿ�ɽ����̵���ˤʤꡢ�ޤ��������ֻ���Ⳬ�ϰ��֤ˤ�� �Ƥ�̵���ˤʤ�ޤ����ƥ���������ǿ����Ѥ�����ϡ�/ �ǹԤ�ʬ����ʤ� ���Ƥ���������������������å��Ԥ�(@)���ڡ����Ԥ�(\)ľ��ζ�������å� ʸ����̵��(_)��ͭ���Ǥ��� �����ܲȤ� ` �˲�����ǽ���꿶�ä����ˤϡ�����⤷�����̤�ʸ���� �ѹ�������ǽ��������ޤ��������Τ褦�� ENABLE_1BYTE_CHAR �λ����ͭ ̵�ǻȤ�ʬ������褦�ˤ��뤫�⤷��ޤ����ݾڤθ¤�ǤϤ���ޤ��� �ޤ�������ѥ������ ENABLE_1BYTE_CHAR �ȹ�碌�� FORCE_1BYTE_CHAR ����ꤹ��ȡ����Ƥ�ɽ����Ⱦ�Ѥˤ��뤳�Ȥ���ǽ�ˤʤ�ޤ�������Ū�ˤϡ� �嵭�˲ä��ơ�������å���˥塼��ɽ�����Ѹ�ˤʤꡢ�ޤ������ѿ���ɽ�� ��Ⱦ�Ѥˤʤ�ޤ��� �ʲ��˥�����ץ����ޤ��� *define clickstr `.?"`, 2 savename `Save the scene`, `Load the scene`, "Memory " rmenu `Save to file`,save,`Load from file`,load game *start `Hi, this was test. `Hi, this is test again. `_"He said so." `_"She said so." `Does it work?? br selgosub `Say "Turn to the right."`, *right, `Say "Turn to the left."`, *left , "`Do nothing.", *nothing end *right `You turned to the right. return *left `You turned to the left. return *nothing `You didn't do anything. return Memoevent_modeThe values in the table below are used exclusively.
The values in the table below are used conjunction with the values in the table above.
Order of rendering layersIn the table below, the lower layer is hidden by the upper layer. The initial value of "humanz" is 499. Text is always rendered at the top when appeared.
|