Page 1 of 1

Display title of books / Chests

PostPosted: Wed Nov 30, 2016 13:43
by hajo
"Book with text" is the tooltip for any book that is not empty.
It would be much more useful to display the actual title of that book as tooltip.

Same problem with chests - currently, an extra sign is needed,
and that gets unwieldy with more than a few chests.
So, I propose to add a title-field to chests.

Also, how about using different wood-textures on chests ?
Maybe also allow to add dye to paper, and books.

Re: Display title of books / Chests

PostPosted: Wed Nov 30, 2016 16:05
by octacian
Right now, AFAIK, item tooltips cannot be renamed without reloading the game. Sofar (I think) had a PR open give mods the ability to rename items without reloading the game, but I can't seem to find it so may be wrong. Will look through the PR list though, and see what I can find.

With chests, the name could be shown as a part of the infotext, which could be changed with some type of tool, IDK, maybe a "Chest Renamer."

Re: Display title of books / Chests

PostPosted: Sat Dec 03, 2016 03:59
by hajo
endev15 wrote:Right now, AFAIK, item tooltips cannot be renamed without reloading the game.

Placeable Books by everamzah has something similar:
when placed, a closed book shows its title,
and an open book shows the first few lines of content.

But in the inventory, books are still "book with text".

With chests, the name could be shown as a part of the infotext, which could
be changed with some type of tool, IDK, maybe a "Chest Renamer."

Labeller / MagicMarker might be a good idea for a mod.

Looking at some code, there is a description, and the infotext.
Often containing the same text, but I think the description is used for the tooltips.

Re: Display title of books / Chests

PostPosted: Sun Dec 04, 2016 22:30
by Wuzzy
For items, the problem has been identified a while ago and sofar has posted an (unfinished?) implementation:

https://github.com/minetest/minetest/pull/3449

So far, the code is not yet included in Minetest.


Named chests are a nice idea. If I remember correctly, there are even mods which implement this, but nobody bothered to improve Minetest Game with this.

Re: Display title of books / Chests

PostPosted: Mon Dec 26, 2016 18:18
by Sokomine
My chesttools mod adds editable nametags for placed chests. There are many other mods which do similar things. Technic has a huge amount of chest types. All these mods add further functionality apart from just adding an editable name tag. Maybe that's why nobody ever included that functionality in minetest_game.
There are also mods which add diffently colored chests. Realtest is very nice in that regard as it adds chests for each of its wood and mineral types.

Re: Display title of books / Chests

PostPosted: Tue Jan 03, 2017 18:55
by sorcerykid
The reason that books can only show a single tooltip is because the tooltip is derived from the definition of the node itself. For example:

minetest.registered_nodes["default:book"].description = "My Favourite Book"

would change the tooltip for all "default:book" inventory items. There is no conceivable way to allow for alternate tooltips without a change to the engine itself (or significant hacking of the formspec at runtime).

Re: Display title of books / Chests

PostPosted: Wed Jan 04, 2017 02:00
by GreenDimond
Technic lets you name gold chests (and maybe other chests?).