Page 1 of 1

[Mod] Placeable Books [books]

PostPosted: Sat Jul 23, 2016 23:05
by everamzah
Depends: default
License: LGPL 2.1+
Description: Overrides default books such that they may be placed.
Download: books.zip
Git Repo: https://github.com/everamzah/books

Image

Place a book, written or otherwise, to place as a node. Right click to open, punch to close. Right click while open to show formspec. Infotext shows title and author when the book is closed; and the book text when it is open.

Placed books use a nodebox. The open book nodebox may benefit from an .obj file.

Re: [Mod] Placeable Books [books]

PostPosted: Mon Jul 25, 2016 09:45
by azekill_DIABLO
god, they are ugly! but +1

Re: [Mod] Placeable Books [books]

PostPosted: Mon Jul 25, 2016 10:11
by cd2
+1

I think the opened book looks a bit strange. You could use a mesh to make it a bit nicer :)

Re: [Mod] Placeable Books [books]

PostPosted: Mon Jul 25, 2016 10:57
by everamzah
Yes, I'd like to use this as an opportunity to use/learn Blender. Thanks for the positive replies.

Re: [Mod] Placeable Books [books]

PostPosted: Mon Jul 25, 2016 12:10
by azekill_DIABLO
sry for the ''they are ugly :D''

Re: [Mod] Placeable Books [books]

PostPosted: Mon Jul 25, 2016 12:23
by azekill_DIABLO
here are two models that you could use! i made them today. They are CC by NC

Re: [Mod] Placeable Books [books]

PostPosted: Mon Jul 25, 2016 13:38
by everamzah
azekill_DIABLO wrote:sry for the ''they are ugly :D''


Don't be! I know they are, that's why I noted that they're placeholders. When I'm done with the code (almost there!) I will work on the appearance. Thanks for the models, I'll check them out soon.

Re: [Mod] Placeable Books [books]

PostPosted: Mon Jul 25, 2016 13:47
by azekill_DIABLO
your welcome!

Re: [Mod] Placeable Books [books]

PostPosted: Mon Jul 25, 2016 14:56
by everamzah
The books now save their contents while placed. The infotext needs updating, then some refinement, and I think that will be it. Then I can move over to the appearance.

First I will modify the wool textures, then I will try to use an .obj in lieu of the nodebox for the open book. I'm not certain whether the closed book needs an .obj, as a nodebox could work for a solid shape.

azekill_DIABLO: I appreciate the models, and I haven't looked at them yet, but there is a problem. I licensed this LGPLv2.1+ as that is what minetest_game is. I have no illusions about getting this merged upstream, but nonetheless I'd like to stay inline with those licenses.

Therefore, if you want me to look at your models, you're going to have to re-license them as follows:
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/


As it is here: https://github.com/minetest/minetest_ga ... ME.txt#L44

Re: [Mod] Placeable Books [books]

PostPosted: Mon Jul 25, 2016 17:24
by everamzah
Books placed in-world now work as they do in hand. I uploaded books.zip if anyone wants to try them out.

Re: [Mod] Placeable Books [books]

PostPosted: Tue Jul 26, 2016 09:29
by azekill_DIABLO
i make them CC BY-SA 3.0 sorry i don't know very well the license!

Re: [Mod] Placeable Books [books]

PostPosted: Tue Jul 26, 2016 11:43
by everamzah
Alright, I'll check them out soon then. I'm done with the base code, so everything should work fine now. Except, I just remembered, perhaps some missing "\n" characters. Like it takes them out, or something. Maybe that's how it is in regular books.

I was pretty surprised that long lines count only as one, even if they were wrapped many times. It's obvious now that I think of it, but at the time couldn't figure out why so much text wasn't producing multiple pages. It appears you must hit enter whenever you're near the edge of the textarea.

So yeah, viewers can flip pages in multi-page placed books now. *\xD/*

Ps. Newlines are preserved. You really do need to hit enter near the end of the textarea border each line, though. Otherwise it doesn't count wrapped long-lines as greater than 1.

Now I'll work on the appearance. If books are separated into their own mod upstream, then there may come some name conflict issues. It may be prudent to change that now, but I'm uncertain.

Re: [Mod] Placeable Books [books]

PostPosted: Tue Jul 26, 2016 15:18
by everamzah
Image
Image

Wow, azekill, these look pretty sweet! I haven't tried to export to .obj and check 'em in game yet.

Re: [Mod] Placeable Books [books]

PostPosted: Tue Jul 26, 2016 17:37
by everamzah
Image
Image

I didn't have too much luck with the .obj. I still want to make the open book nodebox an .obj, if it will save vertices. These are five placeholder textures to fit, well, whatever works. I almost used the wool again, but something else, perhaps.

Update:
Image

Re: [Mod] Placeable Books [books]

PostPosted: Tue Jul 26, 2016 21:33
by D00Med
I like the new textures!, nice work

Re: [Mod] Placeable Books [books]

PostPosted: Wed Jul 27, 2016 08:53
by azekill_DIABLO
everamzah wrote:Image
Image

Wow, azekill, these look pretty sweet! I haven't tried to export to .obj and check 'em in game yet.


Thank you :)

Re: [Mod] Placeable Books [books]

PostPosted: Wed Jul 27, 2016 08:53
by azekill_DIABLO
+ Spoiler


very nice!

Re: [Mod] Placeable Books [books]

PostPosted: Wed Jul 27, 2016 11:10
by cd2
everamzah wrote:Update:
Image


+1

Re: [Mod] Placeable Books [books]

PostPosted: Thu Jul 28, 2016 04:51
by taikedz
Mucho fantastico - love it :D

The way books should have been from the start in my obsequious opinion :-p

everamzah wrote:Depends: default
License: LGPL 2.1+
Description: Overrides default books such that they may be placed.
Download: books.zip
Git Repo: https://github.com/everamzah/books

Image

Place a book, written or otherwise, to place as a node. Right click to open, punch to close. Right click while open to show formspec. Infotext shows title and author when the book is closed; and the book text when it is open.

Placed books use a nodebox. The open book nodebox may benefit from an .obj file.

Re: [Mod] Placeable Books [books]

PostPosted: Thu Jul 28, 2016 09:14
by everamzah
Thanks to taikedz for letting me know the books were not checking protection on dig. That's fixed, and git repo and books.zip are updated.

Re: [Mod] Placeable Books [books]

PostPosted: Wed Nov 09, 2016 16:27
by Fixerol

Re: [Mod] Placeable Books [books]

PostPosted: Wed Nov 09, 2016 16:47
by hajo
everamzah wrote:The books now save their contents while placed.

Is it possible to generate books with text, e.g. in a shop or library,
or as an item as part of "give_initial_stuff" (eg. guidebook)?

Re: [Mod] Placeable Books [books]

PostPosted: Wed Nov 09, 2016 21:41
by taikedz
You would need to create a special mod if you wanted books to have content upon give_initial

For shops, you can use a shop that actually takes an item from a chest, as opposed to giving a new instance of an item.

For selling written books, easyvend works as desired viewtopic.php?f=9&t=15472&p=233410

Re: [Mod] Placeable Books [books]

PostPosted: Tue Dec 06, 2016 23:48
by SuperPantsofDoom
this is going to be in my sub game for sure

Re: [Mod] Placeable Books [books]

PostPosted: Thu Dec 08, 2016 21:43
by theblackwolf
Ah this is really neat good job! :D I think I'll add it to the final cut of my project. ;)