Displaying a message box as book

Hi,

I've been searching for a while, but didn't manage to find anything. It doesn't sound too complicated, but considering I know nothing about scripting in Ruby/RGSS3, I wouldn't really know.

I'm looking for a script that allows me to display a message box looking like a book.

What I'm imagining is a function which I can call in an event, opening a message window that displays text over a custom background graphic.

The function call might look something like this:

page1 = "This is the first page"page2 = "and the second page"page3 = "and eventually the last page"bg_image = "book01" #background image to be displayed - an open book with empty pagesdisplay_book(page1, page2, page3, bg_image)It would be important to me to be able to choose the background image in the function call, since I'd like to use multiple images. Not all books look alike, after all.

I'd like to have each page in a separate string variable, as it allows for more control.

Since a book can have more than two pages of text, it should be possible to browse using the arrow keys, or at least go through the pages by hitting enter.

This is only for books laying about - they will not be picked up (so no reading from the inventory is necessary) and they will not be memorized (so no notebook menu item or something is required).

book-sample.jpg


Does anyone know a script that can do this?
You could do it using Show Picture and not have to use scripts at all. You'd just need to set up your backgrounds, and set up your text with transparent backgrounds, and display the two pictures with an event call. Using a single picture each time that has the book image AND the text would make your download file much larger than a single image with the book background and multiple images with each version of text you want to show.
You could do it using Show Picture and not have to use scripts at all. You'd just need to set up your backgrounds, and set up your text with transparent backgrounds, and display the two pictures with an event call. Using a single picture each time that has the book image AND the text would make your download file much larger than a single image with the book background and multiple images with each version of text you want to show.
Indeed, which is why I'd like to have like 5 or 6 different background images from which I can choose (empty books), while the text is stored in strings in the event and rendered by RPG Maker (via draw_text or something like that).

I do NOT want to have the text as image. That would still make hundreds of text images. If I wanted to edit one, I'd have to search for the correct one, edit it and re-upload it into RPG Maker. I'd rather have something flexible where I can store the text directly in the event.
Have you looked at/for actual BOOK scripts? They use an external file to store all the text rather than variables, then you just have a script call to tell them which book/pages to show.
Have you looked at/for actual BOOK scripts? They use an external file to store all the text rather than variables, then you just have a script call to tell them which book/pages to show.

I did search, yes. I found a rather powerful notebook script, but as far as I understood, it won't display the text as book. And it adds a menu item, which I do not want or need. I found a script that displays book images. I can do that without a script, but it's not what I want (too many images). I also found something that lets me read books that are items in the inventory. Not what I need (and I think not in the desired format).

I've also seen an RPG Maker XP script that uses text files. I think it was an encyclopedia script or something. I do not really know Ruby/RGSSx scripting though, I'm far from being knowledgeable enough to script this on my own or derive it from other scripts.

Also consider, I currently have 233 books in the game, and the game's content is about 1/4 complete. So you can estimate how many books there will be in the end. It's easier to edit it if it's stored within the event, as it removes the neccesity of searching for the book's text. I need to keep this organized, and to me, that means, keep the texts at the place where they are used.

Anyway, I guess it would still be fine that way if it's all that exists. I just don't know if that's not a performance problem if the game has to search through a text file with that much text in it.

Original thread: https://forums.rpgmakerweb.com/threads/displaying-a-message-box-as-book.37255/