[Mod] Placeable Books [books]

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

[Mod] Placeable Books [books]

by everamzah » Post

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.
Attachments
books.zip
0.3.1
(126.1 KiB) Downloaded 603 times
screenshot_20160726_171110.png
screenshot_20160726_171110.png (51.64 KiB) Viewed 4621 times
screenshot_20160726_141356.png
screenshot_20160726_141356.png (252.08 KiB) Viewed 4621 times
Last edited by everamzah on Thu Jul 28, 2016 09:13, edited 11 times in total.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Placeable Books [books]

by azekill_DIABLO » Post

god, they are ugly! but +1
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
cd2
Member
Posts: 562
Joined: Mon Jun 01, 2015 06:30
GitHub: cdqwertz
In-game: cd cd2
Location: Linux
Contact:

Re: [Mod] Placeable Books [books]

by cd2 » Post

+1

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

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Placeable Books [books]

by everamzah » Post

Yes, I'd like to use this as an opportunity to use/learn Blender. Thanks for the positive replies.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Placeable Books [books]

by azekill_DIABLO » Post

sry for the ''they are ugly :D''
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Placeable Books [books]

by azekill_DIABLO » Post

here are two models that you could use! i made them today. They are CC by NC
Attachments
book.zip
(137.05 KiB) Downloaded 343 times
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Placeable Books [books]

by everamzah » Post

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.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Placeable Books [books]

by azekill_DIABLO » Post

your welcome!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Placeable Books [books]

by everamzah » Post

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

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Placeable Books [books]

by everamzah » Post

Books placed in-world now work as they do in hand. I uploaded books.zip if anyone wants to try them out.
Last edited by everamzah on Tue Jul 26, 2016 17:41, edited 2 times in total.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Placeable Books [books]

by azekill_DIABLO » Post

i make them CC BY-SA 3.0 sorry i don't know very well the license!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Placeable Books [books]

by everamzah » Post

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.

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Placeable Books [books]

by everamzah » Post

Image
Image

Wow, azekill, these look pretty sweet! I haven't tried to export to .obj and check 'em in game yet.
Attachments
b2.png
b2.png (7.41 KiB) Viewed 4621 times
b1.png
b1.png (10.26 KiB) Viewed 4621 times

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Placeable Books [books]

by everamzah » Post

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
Attachments
screenshot_20160726_133216.png
screenshot_20160726_133216.png (274.22 KiB) Viewed 4621 times
screenshot_20160726_133214.png
screenshot_20160726_133214.png (268.05 KiB) Viewed 4621 times

User avatar
D00Med
Member
Posts: 949
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

Re: [Mod] Placeable Books [books]

by D00Med » Post

I like the new textures!, nice work
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Placeable Books [books]

by azekill_DIABLO » Post

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 :)
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] Placeable Books [books]

by azekill_DIABLO » Post

Spoiler
everamzah wrote: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
very nice!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
cd2
Member
Posts: 562
Joined: Mon Jun 01, 2015 06:30
GitHub: cdqwertz
In-game: cd cd2
Location: Linux
Contact:

Re: [Mod] Placeable Books [books]

by cd2 » Post

everamzah wrote:Update:
Image
+1

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [Mod] Placeable Books [books]

by taikedz » Post

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.

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Placeable Books [books]

by everamzah » Post

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.

User avatar
Fixer
Member
Posts: 905
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] Placeable Books [books]

by Fixer » Post


hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] Placeable Books [books]

by hajo » Post

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)?

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [Mod] Placeable Books [books]

by taikedz » Post

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

User avatar
SuperPantsofDoom
Member
Posts: 37
Joined: Sun Dec 20, 2015 00:10
In-game: aslar

Re: [Mod] Placeable Books [books]

by SuperPantsofDoom » Post

this is going to be in my sub game for sure
check out my subgame yentest viewtopic.php?f=50&t=16014

User avatar
theblackwolf
Member
Posts: 63
Joined: Thu Oct 13, 2016 23:54
In-game: TheBlackWolf_MT

Re: [Mod] Placeable Books [books]

by theblackwolf » Post

Ah this is really neat good job! :D I think I'll add it to the final cut of my project. ;)
Follow me on Twitter at @BlackWolf_UwU

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests