TAA_BookMenu (v1.5.2)

taaspider

Veteran
Veteran
Joined
Jan 27, 2017
Messages
111
Reaction score
130
First Language
Portuguese
Primarily Uses
RMMV
By the way, I wrote something to load books from text files, one file per book; it's not complete (missing custom background support) and not web-safe (using node's fs module), but would there be any interest in this?
That's an interesting add on, maybe more people would like to use that feature. If you're ok with it, I suggest adding that to my project on github as a saparate plugin, and we can link it back as an add on in the opening post for those who'd like to use it. :)
Keep in mind that my repository is set with GNU General Public License v3.0, so if you want it to be more restrictive in terms of licensing you'll need to upload it elsewhere.

If you like, you can also create your own post for the add on in the forums. That would actually be nice to facilitate bug reporting and keeping a changelog updated.

In any case, if you want to share it, I'll be happy to link it into the opening post, just send me the link! :D
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
Since it's a (relatively simple) addon to your plugin and not a standalone plugin, I don't mind it being open source but would probably prefer MIT license or similar. I think that should let you include it in your repository as long as the difference is noted. I have no plans to upload it to GitHub myself, however.

Anyway, I'll let you know if/when I think it's in a state suitable for release.
 

Aandel

Veteran
Veteran
Joined
May 30, 2012
Messages
31
Reaction score
2
First Language
Portugues
Primarily Uses
RMMV
Hello



sorry my poor english!

Regarding its plug-in, TAA_BookMenu (v1.4.0).
Is there a possibility to hide specific categories?
What I want to do is create two separate libraries. In one library, one type of book is selected, while in another, other types of books.


Thank you very much for the plugin!
 
Last edited:
Joined
Jun 9, 2020
Messages
1
Reaction score
0
First Language
English
Primarily Uses
RMMV
I'm having issues with the word wrap.
So to be clear.
* I am using Yanfly's Message Core Plugin
* I've got the word wrap turned on in the plugin menu.
* I'm loading TAA_Book Menu first then Yanfly's message core plugin.
* I've got the word wrap variable turned on in TAA_BOOK Menu.

The text stil isn't word wrapping when I bring up the book menu.

Thoughts?
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
I was wondering, would it be possible for you to load the book data in DataManager.loadDatabase instead of DataManager.createGameObjects? The latter method interferes with my localization plugin (unless using plugin manager books) because the books load asynchronously and are not ready when the localization manager needs to find them.

However, doing it in DataManager.loadDatabase then means you can also alias DataManager.isDatabaseLoaded to make it block until they actually finish loading.
 

Aandel

Veteran
Veteran
Joined
May 30, 2012
Messages
31
Reaction score
2
First Language
Portugues
Primarily Uses
RMMV
Hi!
Another problem that I am unable to solve is: I don't use the RPGMV Menu.
My menu is for events.
In this case when I use the plugin call: OpenBookMenu All Categories are open, even with the Load Closed Categories option in the true position.
What I would like to ask for is a script or plugin call that closes all Categories before calling the Menu Thank you very much
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
95
Reaction score
41
First Language
French
Primarily Uses
RMMV
Hello,
an other question concerning books.

I have character books to add some knowledge to the lore. But what if I want to update a character ?
Since it's using the bookname, I can't update my Book having the same name.

is there a way to do it ?

thanks
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
This is untested, but... if using JSON (or my book files method which I will likely post today or tomorrow) as the source you can have multiple books with the same title but a different key, so maybe you could have multiple copies of the book, each with more info added, and when they learn more info, remove the book with less info and add the book with more.

It might not even work for the way you're using it, but it might be something to consider?
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
95
Reaction score
41
First Language
French
Primarily Uses
RMMV
This is untested, but... if using JSON (or my book files method which I will likely post today or tomorrow) as the source you can have multiple books with the same title but a different key, so maybe you could have multiple copies of the book, each with more info added, and when they learn more info, remove the book with less info and add the book with more.

It might not even work for the way you're using it, but it might be something to consider?
That would be a good idea yes.
Is it only possible with the JSON file ?
I was using the plugin parameters until then
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
When using plugin parameters, it automatically uses your book title as the book's unique ID, so there's no way to have two books with the same title. The JSON method lets you set the book's unique ID to whatever you want.

I do think plugin parameters is more convenient than JSON though, as JSON is a little tricky to edit.
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
95
Reaction score
41
First Language
French
Primarily Uses
RMMV
I'll give it a try before having too many books.
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
If you're only planning to deploy to desktop and have no plans for web deployment, you could also try my SFG_BookFiles add-on which I just posted.
 

taaspider

Veteran
Veteran
Joined
Jan 27, 2017
Messages
111
Reaction score
130
First Language
Portuguese
Primarily Uses
RMMV
Ohhh, thanks for bringing that up, as I hadn't even thought of it. Then I'll have to either avoid using inline images or ensure something else requires them.
Just released version 1.4.1, and added a script call to make people's life easier. Before exporting your game, use the console to call $gameSystem.createExportDummy(). It will create a new map with a single tile and event with show picture commands for each inline image, so that the exclude unused files won't delete said images.

Also, there's a bunch of fixes and changes, including preloading of inline images, as discussed with @PLUEVNR . I'll update the opening post tomorrow, but the new version is already available on github.

Regarding its plug-in, TAA_BookMenu (v1.4.0).
Is there a possibility to hide specific categories?
What I want to do is create two separate libraries. In one library, one type of book is selected, while in another, other types of books.
The plugin was originally created with the idea of a single library, which would be expanded as the player explores the game's world. So, having multiple separate libraries is not really a feature I intended for it.
However, if you don't need the game to remember books read, you can do this using common events: create a separate common event for each library. On each common event, trigger plugin commands to forget all categories (LibraryData Forget Category categoryName) and one to learn the desired category (LibraryData Learn Category categoryName). Then call the common events when you want to load each library.

This procedure is untested, but it should work. You're actually working with a single library, but changing what is shown depending on the event called. If you want to have each library grow individually though, with books being learned throughout the game, that would require large changes to the code, which I won't implement any time soon.


The text stil isn't word wrapping when I bring up the book menu.
Have you remembered to add the "<WordWrap>" tag at the beginning of your texts?
I just tested it here and it works perfectly. Please make sure you're following Yanfly's plugin instructions as well.

In this case when I use the plugin call: OpenBookMenu All Categories are open, even with the Load Closed Categories option in the true position.
What I would like to ask for is a script or plugin call that closes all Categories before calling the Menu
I cannot reproduce this error. I tested the plugin command using the demo project, and calling OpenBookMenu with the Load Closed Categories set to true works as intended: all categories are closed when the menu loads. Please double check your configurations and make sure you're using the most recent version. If the error persists, try to duplicate it in a clean project and send me the files.

I have character books to add some knowledge to the lore. But what if I want to update a character ?
Since it's using the bookname, I can't update my Book having the same name.

is there a way to do it ?
Updating a book text is something the code was not really designed to do. It expects book texts to be fixed.
It could be done rather easily with a JSON file as source, as pointed by Solar_Flare. You could have multiple copies of your book and lear/forget then as the game progresses, thus making the player think the book was updated. To allow a similar method with the Plugin Manager as source would require big changes, which I'm also not planning to do any time soon.

If you're only planning to deploy to desktop and have no plans for web deployment, you could also try my SFG_BookFiles add-on which I just posted.
Nice!! I'll also add a link for it in the opening post! :)
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
Hi, new version looks nice, but just wondering whether you saw this post or not.

EDIT: Also, the new markAsRead functionality seems to be broken? Including "false" crashes, while if I omit the parameter it doesn't seem to be marked as read.
 
Last edited:

Aandel

Veteran
Veteran
Joined
May 30, 2012
Messages
31
Reaction score
2
First Language
Portugues
Primarily Uses
RMMV
Hi!
After checking every detail here, I realized that I added extra spaces after each title and this ended up causing the problem that when I opened the Menu, each Category appeared open!
Solved the issue! Vlw for the support and thank you very much
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
95
Reaction score
41
First Language
French
Primarily Uses
RMMV
Thanks for the update.
Good thing you did it that fast since I have to change my parameters to the JSON file :)
This plug in add so much to my game

Edit :
I've got this error when I start the game
1592131612552.png
I'm using JSON to setup the books.
The error doesn't appear when I use the plugin manager

Edit 2 : and it works in your demo, so the error is on my side. But I have no idea where it comes from

Edit 3 : If I copy your books.JSON it works so I imagine it comes from mine. Maybe a syntax error but I don't know where

Edit 4 : FOUND THE ISSUE
I was writing
Code:
%img("filename")
instead of
Code:
%img(\"filename\")
by the way, is there a possibility to add quotes in a text. Like
Code:
he's a kind of "insert random text here"
 
Last edited:

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
95
Reaction score
41
First Language
French
Primarily Uses
RMMV
Double posting but no the same issue, sorry

I've detected a minor error after using the plugin command
Code:
LibraryData UnreadBooks show
I've got 6 books in a category but when I'm in game in the book menu, it's written (7) next to my category. And I really have 6 books inside this category

When I'm learning books one by one, there's no error
 

taaspider

Veteran
Veteran
Joined
Jan 27, 2017
Messages
111
Reaction score
130
First Language
Portuguese
Primarily Uses
RMMV
Hi, new version looks nice, but just wondering whether you saw this post or not.

EDIT: Also, the new markAsRead functionality seems to be broken? Including "false" crashes, while if I omit the parameter it doesn't seem to be marked as read.
Sorry, I was kinda in a hurry yesterday and ended up not properly testing. Also, I did saw your post, but it evaded me when writing the changelog and posting here in the thread. Anyways, I've uploaded a hotfix in the same version fixing the ReadBook feature and changing the function used to load books. Not sure if what I did solve your issue, let me know if it doesn't.

For anyone who already downloaded version 1.4.1, please do it again now for the fixed version.

I've got 6 books in a category but when I'm in game in the book menu, it's written (7) next to my category. And I really have 6 books inside this category
From your first post, yes, definitely something on your JSON. I prefer using it to working with the Plugin Manager interface, but it can be tricky.
If you want to use double quotes inside your JSON text, simply escape it with a \, like you did for inline images:
Code:
he's a kind of \"insert random text here\"
Same goes if you want to use engine escape codes, like \C[n] to change text color, for example. Since \ is a special character you need to escape it too:
Code:
text in a different \\C[1]color\\C[0]
Manual line breaks can be added with \n, unless you're using other plugins that change that behavior, like Yanfly's Message Core.

As for the mismatched count on books from a category, can you PM me your JSON file so I can have a look?
 

Solar_Flare

Veteran
Veteran
Joined
Jun 6, 2020
Messages
533
Reaction score
235
First Language
English
Primarily Uses
RMMV
Anyways, I've uploaded a hotfix in the same version fixing the ReadBook feature and changing the function used to load books. Not sure if what I did solve your issue, let me know if it doesn't.
Looks like that fixes ReadBook, and my localization plugin also properly picks up my library now without any modifications to your code. The only other thing is if using files as a source (whether JSON or BookFiles) the timing might cause it to sometimes notice it and sometimes miss it. For my purposes I've added this code to my local copy of BookFiles:

JavaScript:
const old_isLoaded = DataManager.isDatabaseLoaded;
DataManager.isDatabaseLoaded = function() {
    if($dataBooks && $dataBooks._source === 'Book Files' && !$dataBooks._doneLoading) return false;
    return old_isLoaded.call(this);
};
You might consider doing something similar for the JSON source. Obviously it's not needed with the Plugin Manager source.

This means that if it takes a long time to load the books, the game will display "Now Loading..." until it's finished. I guess you can decide whether you actually want this; the books aren't needed at the title screen, after all.
 

PLUEVNR

Veteran
Veteran
Joined
Jan 15, 2020
Messages
95
Reaction score
41
First Language
French
Primarily Uses
RMMV
Thanks for the tips !

I sent you my JSON.
everything is working fine except the
Code:
LibraryData UnreadBooks show
 

Users Who Are Viewing This Thread (Users: 1, Guests: 1)

Latest Threads

Latest Profile Posts

Working on a Patch to integrate AlphaABS into random generated Dungeons. Was a bit tricky, but the outcome is a real Life Changer!!

Will release it the next days!
Been pretty busy... but I got a better headset for recording and listening today. Dad says that he'll consider taking me to Great Wolf Lodge for the first time once I finish summer classes (my final semester!) I'll be taking my plushie friends with me: Bendy, Lolbit, and Helen Henny. (I WUV PLUSHIES!)
SF_Monster3,4 added!


My only regret is the portal mirror effect is too subtle to show up in these GIFs. It probably just needs more sparkles. :LZSwink:
Microsoft: Hey, let's waste money advertising the Xbox Series X when nobody has any in stock, we don't seem to be making more, we aren't taking preorders and you can't get on a waiting list. BEST. IDEA. EVER.

Forum statistics

Threads
105,647
Messages
1,015,259
Members
137,321
Latest member
raku007
Top