Intro:
This is a plugin that allows you to create books that the player can read in game via events, or common events.
It brings up a book scene, which lets you go through a book page by page.
Changelog:
- KRBook.js replaced by EISLibrarium.js
- Add multiple language support
- Fix issues with searching
- Add support for languages without spaces (Japanese, etc).
The new plugin has the same features, plus more, to support devs in creating an interesting game.
Version: 1.02
Script Files:
View attachment KRBook.js (Old Version)
View attachment EISLibrarium.js (New Version)
JSON File Template (Download this if you want a file to start from.
)
Librarium.json (
Right Click "raw" then
save link as to download.)
Website
For the most recent version, check out the website post here :
http://endlessillusoft.com/eis-librarium/
Companion Tool: http://endlessillusoft.com/eis-librarium-writer/
Features:
- Displaying books in game
- Unlimited amount of books
- Unlimited amount of pages
- JSON file type
- Can call via events or common events
- Works with Yanfly's Message Core
New Features
- Automatic word wrapping (brings the new word to the second line, instead of cutting off part of the word)
- Supports text codes
- Background image for the book scene
- Show book text in the message window
- Grab book text content to store in a variable
Instructions:
- Install the script with the same name: KRBook.js or EISLibrarium.js.
- If you want to show one of your books, call it by title using the KR.Helpers.startBookScene(title) script function.
Your title should be in quotes, and it is not case sensitive.
- Create a .json file with the file name that you want to use.
Create the necessary .json structure shown in the feature example window, or copy and paste the code snippet as a starting point.
Need to maintain the structure of the file, or else it won't work correctly.
- Yanfly's Message Core Specific (Not Required For Librarium):
Type <wordwrap> at the beginning of your 'pageText' to enable word wrapping.
- Type <br> or <linebreak> to insert a linebreak in the 'pageText'.
- Have fun!
Script Calls (Librarium)
/*
//=============================================================================
// Script Calls
//=============================================================================
*
* SceneManager.startBookScene(title)
* This script call will open the book scene, so that players can view a book
* of your choice. You need to pass the title of your book in quotes.
* Example:
* SceneManager.startBookScene("lilia");
* Titles are not case sensitive.
*
* Librarium.getBookContents(title);
* This script call will return the book contents, which you can store in a
* variable for example.
* Example:
* Librarium.getBookContents("lilia");
*
* Librarium.showInMessageWindow(title)
* Shows the book contents in the message window used for showText commands.
* The text doesn't have word wrapping like the scene, so you'll need a plugin
* that supports word wrapping. (Yanfly)
* Example:
* Librarium.showInMessageWindow("lilia");
*/
Code:
- //Single Book Item -- Can copy and paste this to the end of the list in the book file after adding a , to the last entry
- {
- "title": "Empty Book",
- "pages": [
- {
- "pageNumber": 1,
- "pageText": "This is the first page."
- },
- {
- "pageNumber": 2,
- "pageText": "This is page 2 of the book"
- }
- ]
- }
- //Book File Setup -- Save this to JSON file in your data folder with the specified file name you declare in the plugin.
- [
- {
- "title": "A Testing Guide",
- "pages": [
- {
- "pageNumber": 1,
- "pageText": "This is the first page."
- },
- {
- "pageNumber": 2,
- "pageText": "This is page 2 of the book"
- }
- ]
- },
- {
- "title": "Lilia",
- "pages": [
- {
- "pageNumber": 1,
- "pageText": "Lilia was a made from the town of Chrystal."
- },
- {
- "pageNumber": 2,
- "pageText": "This is page 2 of the book. This is a very long string of text however, so hello there!"
- },
- {
- "pageNumber": 3,
- "pageText": "Chrystal is a village of extreme wonder, \\I[33] and it was treated as such by many. One had to be careful how they treated the villages there; it was certaintly not easy to get along."
- }
- ]
- }
- ]
复制代码
Setup Example Windows:
Spoiler
In-game Examples:
Spoiler
Librarium Scene
Credits:
Free for both commercial and non-commercial use.Credit with the name Kino.
Thanks:
Thank you to anyone who decides to use this script; I appreciate it!
If there are any bugs/issue, please contact me via message on the forums. I want to try and make the script as extensible/flexible as possible, so if you have an ideas also
please message me.
本贴来自国际rpgmaker官方论坛作者:Kino处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/eislibrarium-1-02-updated.58851/