Closed thereddduke closed 2 years ago
I'll look in to it. Thanks for the report.
There are two issues here:
I will fix the first issue. I'd also like to fix the second, but can make no promises.
In the meantime, custom books do work so long as the JSON is strictly valid. You can use a service like https://jsonformatter.curiousconcept.com/ to fix the JSON for you. Paste the JSON in the box, hit 'Process' then click the 'Copy to clipboard' button next to the output to copy the valid JSON.
I have fixed up the first example you provided using this method, which now works. (Tested in latest version)
{
"pages":[
"{\"text\":\"\nQuando le arche del nord giunsero\n\ne i nostri padri sulla terra tiepida\n\nposarono i primi passi della nostra storia\n\nRhelica era già dimora di altre forze\n \"}",
"{\"text\":\"\nben più antiche e potenti,\n\nemissari del vortice della creazione\n\nYingr, il grande Dio che risiedeva\n\nnel maelstrom sopra il grande monte.\n \"}"
],
"title":"Kalakenheim",
"author":"Ignoti"
}
Thank you dearly for your answer :)
Unfortunately this still appears to have not solved the problem. I dont really know what I'm missing. I've pasted the command as you told me to in the JSON validator, then downloaded directly from there the JSON file and renamed it. Babel ran correctly but, when I tested the datapack, the books were not spawning. I tried this process on the master version and the windows versione 0.4. I'll leave here the JSON used.
{ "pages":[ "{\"text\":\"Quando le arche del nord giunsero\n\ne i nostri padri sulla terra tiepida\n\nposarono i primi passi della nostra storia\n\nRhelica era già dimora di altre forze\n \"}", "{\"text\":\"ben più antiche e potenti,\n\nemissari del vortice della creazione\n\nYingr, il grande Dio che risiedeva\n\nnel maelstrom sopra il grande monte.\"}" ], "title":"Kalakenheim", "author":"Ignoti" }
Thank you dearly for you help :)
The JSON you posted is still invalid. Compare the version you posted to the one I posted.
I've also tried with yours and it doesn't really make any difference. The book just doesn't want to spawn.
Do they spawn with the orginal library?
Yesterday they spawned. I'll do a quick check right now
They do spawn with the original library.
I dont know if this might be the case but could it be that its just really rare for a book to spawn if there's only on the library? At the moment I'm testing with 1/5 books at most.
No, the number of books in the library shouldn't effect the spawn rate.
OK, there must be something else going on. Could you please attach your output zip file to a comment? I will take a deeper look in to it over the weekend.
Hello JiFish, how are you? I just wanted to ask if there were any update on the issue. I dont want to press you, just as we spoke of looking further into it in the weekend I was wondering if you maybe had the time. Thank you dearly for your help :)
OK, I've had a chance to look in to this. There are two additional problems.
Firstly, the JSON validator I pointed you to didn't do a great job of fixing up the JSON. The newlines didn't have enough escape characters. It should look like this. (Note \\n
instead of \n
.)
{
"pages":[
"{\"text\":\"\\nQuando le arche del nord giunsero\\n\\ne i nostri padri sulla terra tiepida\\n\\nposarono i primi passi della nostra storia\\n\\nRhelica era già dimora di altre forze\\n \"}",
"{\"text\":\"\\nben più antiche e potenti,\\n\\nemissari del vortice della creazione\\n\\nYingr, il grande Dio che risiedeva\\n\\nnel maelstrom sopra il grande monte.\\n \"}"
],
"title":"Kalakenheim",
"author":"Ignoti"
}
Secondly, Babel isn't handling non-ASCII characters properly. This is a bug #4 . I have already written a fix for this. Here it is fully working:
Thank you for letting me know about the bugs. I am hopefully going to find time to release a new version with fixes for all the problems during next week. Then everything ought to work as described in the readme. But please keep in mind: this is a hobby. I can't make any promises as real life comes first.
If you're absolutely desperate and can't wait you could work around the problems by:
\n
are changed to \\n
in your book filesI will keep this issue open so I can let you know when version 0.5 is released.
Hello,
Thank you really much for all the effort and help, its really nice to see mod developers caring about their projects. Since the issue is solvable I should be able to go on with the developing of the modpack with the indication you've given to me. To be honest I kinda am in a hurry (our project should be released in the near future so as soon as I get these books done its ready to go), but I perfectly understand that its an hobby, and I'm really grateful for all the effort you've putted nontheless.
Thank you very much, really :) I will update you if I discover something new.
Have a nice week!
It works...
I just cant describe how happy I am atm :, )
I have released version 0.5, which now properly supports json copied directly from https://minecraft.tools/en/book.php - no need for any fixes or modifications. It also includes the other fixes from the thread.
Thank you again for bringing the problems to my attention. If you get a chance, please give the new version a go and let me know how you get on with it. :)
Oh, and please link me to your mod-pack when it's finished. I'd be interested to see it!
Of course, the books are in Italian but maybe we will be able to do something about the localization. As soon as its ready I will post it here :)
Thank you dearly for all the support :)
Hello,
I'm currently working on a modpack and I was planning to add lore books to the dungeon loot tables I've made some attempts to customize this datapack with the said books but its doesn't seem to work. Starting with what said in the readme, I've just pasted the minecraft's command without the first part, but babel.exe closes immediately without leaving any message and it fails on generating the datapack. I've then tried to replicate the syntax on the classing books since those seem to work but, again, although the babel.zip datapack generates successfully, once installed in my minecraft world it doesn't do anything.
I would be really happy with this datapack, its really nice and basically exactly what I was searching, but currently I seem to be exerimenting some troubles.
The minecraft version is 1.16.5. The vanilla datapack (with all the Project's Gutenberg books) works perfectly, but as soon as I try to customize it is fails. I've also tried both with the windows version and the python one.
I'll leave here both the syntaxes used in the.json versions and in the books.json generated with the datapack.
First attempt (using https://minecraft.tools/en/book.php)
Second attempt (replicating datapack's syntax)
books.json result with second attempt (sorry, there are some other books that I've not included in the previous examples)
Thank you dearly for your help.
:)