Page 1 of 4

[mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sun Dec 20, 2015 22:02
by VanessaE
Image

kaeza's/VanessaE's signs_lib mod

This is kaeza's and my signs library mod, originally forked from PilzAdam's version and rewritten mostly by kaeza to include a number of new features, then rewritten again a couple more times (finding its way into street_signs for a while, where it grew nicely :-) ).

Originally the purpose of the above upstream mods was to just make default signs show their text, via an entity placed right in front. This library is a modernized, feature-enhanced version of that code, which not only allows creation of simple graphical signs, fully writable ones with visible text, and signs with both features, but which allows that text to be colored, and any reasonable size and text amount can be set in any given node definition, with two font resolutions available. Text can be placed anywhere on a sign, in any orientation, with any clipping shape you like, by simply designing the sign's model and text entity properly.

Almost any sign (any shape/model) can be placed-on and thus attached to almost any kind of suitable vertical or horizontal pole or fencepost (or things that resemble them, such as a Pipeworks pipe or tube), as well. Most signs that use the standard rectangular model can also be hung from a ceiling, or standing upright as a yard sign, as well as on posts/poles and walls. Holding shift while placing will force the sign to be placed flat on the target surface, bypassing post/yard/ceiling detection.

Full multi-color text is a key feature of this mod - simply write your text like normal, plus a "#" sign and number 0-9 or letter a-f (e.g. a single hexadecimal digit with a decimal value of - to 15), to change the color of the text that follows it. By default, the text will be displayed in whatever color the sign's default is set for in it's node definition (usually black or white). The color palette follows the good old industry-standard 16-color CGA console palette that we're all familiar with (e.g. the standard Linux terminal/DOS command prompt colors).

Arrow symbols are available by writing "^1" through "^8" (narrow shape) or "^a" through "^h" (wide shape).

Writable signs can be configured to allow for a double-wide font mode (accessible to the user via a switch in the sign's dialog box).

If a sign is writable, its text is visible even when it's flat on a ceiling or floor.

In the case of signs that sit on a pole or post, do note that the pole/post occupies its usual node space, while sign itself still occupies the node space in front of/next to that post. But this probably won't matter in practice, since the idea of a sign is to be read (so you wouldn't want to obscure/obstruct it anyway).

All signs can be designed and configured to allow any or all of these options, and MUCH more.

For complete details on how to use this library with your own mods, see README.md, MODELS.md, and API.md.

Depends: Minetest 5.0 or later, minetest_game default, basic_materials

Recommends: basic_signs, street_signs

Download: https://github.com/mt-mods/signs_lib/ar ... master.zip
...or browse the code: https://github.com/mt-mods/signs_lib

Install: Just copy the mod folder to the usual place and enable it.

License: LGPL v3 for code, CC-by-SA 4.0 for media and everything else.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon Dec 21, 2015 00:51
by redblade7
Great idea!

Does signs_lib revert whatever happened to homedecor c. March 2015, where the side-to-side unlocked wooden signs don't work anymore? (I noticed the tickets for the homedecor bugs were closed in light of this new mod's creation.)

Also, if I was to update homedecor on my server and install signs_lib, should the existing signs be preserved?

Thank you!

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon Dec 21, 2015 05:10
by VanessaE
This isn't a new mod, really. It's the exact same code that was in the homedecor modpack, merely split off into a separate package.

That aside, I don't seem to have any trouble placing signs at all.

The reason you're having trouble placing the initial sign is because signs_lib is letting the engine handle the facedir prediction. Signs were never meant to be placeable at a right angle to the wall you're pointing at.

Build your wall, then place a block of anything 1 meter behind where you want the sign to go. Then place a sign against it and remove the block. Go around to the back side of the sign, point at it, and hold shift while you place another sign, and it'll be placed flat against the back. Both sides are then writable.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon Dec 21, 2015 11:40
by u34
is there a solution for umlaute for german users like ü, ä, ö and ß.
how can I enable such signs?

by the way, the game voxelands supports umlaute. Great feature there.

Image

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon Dec 21, 2015 11:48
by Fixer
Great work!

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Tue Dec 22, 2015 19:23
by Martno
It would be awesome if this mod would handle UTF-8 characters. Is it possible?

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Wed Dec 23, 2015 00:32
by kaeza
Martno wrote:It would be awesome if this mod would handle UTF-8 characters. Is it possible?
It's possible, but given that each char is a separate texture, this would increase the distribution size too much. If implemented, will probably include only the characters used in most western scripts (english, spanish, italian, etc.). Textures for other scripts (cyrillic/CJK/etc) would have to be distributed separately.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Wed Dec 23, 2015 03:33
by VanessaE
I agree that UTF-8 would be too much.

Support for the full ISO-8859-1 character set should be enough for the main signs_lib distribution.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Thu Jan 21, 2016 14:37
by Martno
I understand. ISO 8859-1 would be much better (that would give me enough character to substitute the missing ones)
I think I can make the missing textures for myself (because I need the missing charcters for my game) but I don't know how to add them to the mod (what code changes would be needed) because I'm a noob at modding. Could somebody explain it to me (if it's not to much to ask). If it's too complicated or hard to explain in a couple of sentence, then never mind.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Thu Jan 21, 2016 14:57
by VanessaE
It should just be a matter of naming the glyph textures properly, as hdf_xx.png where xx is the ASCII code, in hex, of the character you want to add.

I don't THINK any changes to signs_lib's code are needed, but perhaps you might have to change the range on line 228 also. If you do, a check for non-existent glyph files within that loop might be needed too. That said, I don't know what would be needed to get Minetest to actually USE that encoding in the formspec.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Thu Jan 21, 2016 16:15
by Martno
Thank you!

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Fri Jan 22, 2016 18:51
by Fixer
VanessaE wrote:I agree that UTF-8 would be too much.

Support for the full ISO-8859-1 character set should be enough for the main signs_lib distribution.
Will be nice to have both ISO-8859-1 and UTF-8 versions. There are players with non-western charsets (Cyrillic, Chinese, Japan, India, and many other).

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Fri Jan 22, 2016 19:08
by VanessaE
There's no way this mod will ever support the full UTF-8 character set - not with its render-to-sprite-entity method of displaying the text, anyway. If the engine ever gets real text displayed on signs (i.e. without this hack), that may change.

Getting even ISO-8859-1 working is dependent on what character codes Minetest gets from the OS (or irrlicht?) when international text is submitted in a formspec.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Fri Jan 29, 2016 03:18
by redblade7
After recent server and mod updates I've run into a problem with signs, but I'm not sure if homedecor/signs_lib is to blame or not.

Before I file anything on github, does installing signs_lib affect the normal wooden signs in any way (the one in the top left corner)? The problem I'm having is true of those signs too.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Fri Jan 29, 2016 05:27
by VanessaE
As long as you're using the current code, it shouldn't have any negative effect on old signs, particularly if you're talking about a world that's never had any version of signs_lib installed. That said, what's the problem?

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Fri Jan 29, 2016 05:52
by redblade7
VanessaE wrote:As long as you're using the current code, it shouldn't have any negative effect on old signs, particularly if you're talking about a world that's never had any version of signs_lib installed. That said, what's the problem?
The server has the latest versions of homedecor_modpack and signs_lib, and existed before signs_lib was spun off.

When signs are placed in certain areas (not sure what the differences are), the following happens:

1. The text correctly shows on the sign
2. Teleport/travelnet/turn around, walk away, walk back to the sign
3. The text on the sign will be partially visible, the visible portion changing as you move the mouse
4. Repeat step #2
5. The text on the sign is completely invisible.
6. Have fun playing Minetest
7. Quit the game
8. Come back later
9. Return to step #1

I'm not sure if this is related, but all signs placed directly on the ground are always completely blank.

This started sometime in January 2016, either in installing/updating a mod on the server, or updating the Github version of Minetest, which I recompile when doing that.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Fri Jan 29, 2016 06:39
by VanessaE
You're talking about z-fighting. That's a minor bug in signs_lib, the entities that display the text just need to be moved a little further out from the sign (they're so close that they just exceed irrlicht's/minetest's positioning precision limit, that's all).

It's just a glitch I've been meaning to fix, just never got around to it.

Text disappearing entirely is due to how minetest manages loading and displaying entities, and is not affected by signs_lib (as far as I know).

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sat Jan 30, 2016 00:10
by redblade7
VanessaE wrote:You're talking about z-fighting. That's a minor bug in signs_lib, the entities that display the text just need to be moved a little further out from the sign (they're so close that they just exceed irrlicht's/minetest's positioning precision limit, that's all).

It's just a glitch I've been meaning to fix, just never got around to it.
OK, I can file a bug on Github then, but which project, homedecor_modpack or signs_lib?
Text disappearing entirely is due to how minetest manages loading and displaying entities, and is not affected by signs_lib (as far as I know).
This only happens to the signs affected by the glitch (and ground-mounting of signs_lib signs always appear blank) so I'd imagine it's part of the same problem.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sat Jan 30, 2016 00:37
by VanessaE
file it against signs_lib (and wholly replace your homedecor modpack while you're at it - signs_lib isn't part of it anymore).

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Mon Feb 01, 2016 03:54
by redblade7
VanessaE wrote:file it against signs_lib (and wholly replace your homedecor modpack while you're at it - signs_lib isn't part of it anymore).
I upgraded homedecor_modpack when I first installed signs_lib.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sat Feb 27, 2016 09:04
by redblade7
redblade7 wrote:
VanessaE wrote:You're talking about z-fighting. That's a minor bug in signs_lib, the entities that display the text just need to be moved a little further out from the sign (they're so close that they just exceed irrlicht's/minetest's positioning precision limit, that's all).

It's just a glitch I've been meaning to fix, just never got around to it.
OK, I can file a bug on Github then, but which project, homedecor_modpack or signs_lib?
Text disappearing entirely is due to how minetest manages loading and displaying entities, and is not affected by signs_lib (as far as I know).
This only happens to the signs affected by the glitch (and ground-mounting of signs_lib signs always appear blank) so I'd imagine it's part of the same problem.
I took a look at the affected signs, and noticed that in every case, the signs are facing east.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Tue Mar 15, 2016 00:27
by Nachtschatten
Not sure if this is a problem on my side, but as far as I can see, the Github repository suddenly only contains a few recent commits by kaeza from the 14th of March. Is that just me, or what's going on?

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Tue Mar 15, 2016 01:16
by VanessaE
Kaeza just collapsed all the old history, since it's all contained in Home Decor's repository anyway, and then added a couple new commits.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Sat Jun 11, 2016 04:04
by amadin
.

Re: [mod] kaeza's/VanessaE's signs library [signs_lib][git]

Posted: Fri Sep 09, 2016 10:20
by VanessaE
Sorry for the uncustomary delay, I've been busy with non-Minetest stuff for a while. I'm not sure I understand what you mean by "indent" in this case.

Meanwhile, a few new features have gone in:
  • Default metal signs in minetest_game have visible text now.
  • Those signs are now used for crafting the colored metal ones in lieu of the previous steel ingot recipies.
  • Some of the colored metal signs have a new default text color (instead of black) to fit their existing style.
  • For coders, you can now specify a default text color and relative location for the text entity. See comments in https://github.com/minetest-mods/signs_lib/issues/5 regarding the text position, and simply add defaultcolor = "<hex digit>" default_color = "<hex digit>" to your node definition to set the color.
For now, the placement behavior and overall style of the default metal signs is unchanged from upstream, aside from having a new texture and visible text. That is, there are no automatic metal yard signs, metal hanging signs, etc. yet, but this will change in the future.