Page 1 of 1

[Mod] Player textures by hash code [player_hash_skins]

PostPosted: Sun Mar 16, 2014 13:00
by Hiradur
This mod calculates a hash code of a player's name and chooses a texture for him according to this hash code.
This means everybody is given a kind of random skin. It still creates a personal identity because this skin will be the same every session and across all servers that use this mod if the user uses the same username.

There are 8 different skins (derived from the default skin) available.

Dependencies: default

License:
Code: WTFPL, Textures: CC-BY-SA (original author Jordach)
Additional note: Some code is taken from PilzAdam's players_texture mod.

GitHub: https://github.com/Hiradur/player_hash_skin

Download, rename to player_hash_skin: https://github.com/Hiradur/player_hash_skin/archive/master.zip (0.4.8 or later)

PostPosted: Sun Mar 16, 2014 16:46
by ak399g
pics or didn't happen

otherwise, sounds cool!

PostPosted: Sun Mar 16, 2014 16:56
by rubenwardy
This is quite an interesting concept!

You can combine textures in Minetest (laying one over the other) like this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
bottom_layer_texture.png ^ top_layer_texture.png


This will allow you to have even more combinations.


ak399g wrote:pics or didn't happen

otherwise, sounds cool!


There isn't really much to show. Each player just gets a skin from picked from their name.

PostPosted: Sun Mar 16, 2014 17:28
by thetoon
If I got it right, it's a bit like "gravatar-for-minetest", right?

PostPosted: Sun Mar 16, 2014 18:04
by rubenwardy
thetoon wrote:If I got it right, it's a bit like "gravatar-for-minetest", right?


Not really. The player has no choice in which skin they get. The skin they get depends on their user name.

PostPosted: Sun Mar 16, 2014 18:41
by Sokomine
Intresting concept. Lately, requests for skins have been very prominent on most server's chats and in the forum.

There is one central entity we might use in order to distribute skins and determine who wants which one: The forum. Players who do have an account here might write in a special thread (which might be read by a mod) which skin they want for which server. Perhaps in the form link to the thread where the server is introduced, link named the way the player's name is written on the server, followed by a :, followed by the image the player wants as skin for that server. If the player wants to, there could also be a catch-all.

Something like that ought to be moderately safe (player names may not always equal forum names), but then - what kind of security does one need for a skin? Reading those webpage(s) containing that special thread and looking for links to your own server ought to be well withhin the gasp of any scripting language you like. Doesn't even have to be lua as those changes will take effect only after a server restart.

Only real problem might be that too many skins accumulate and thus media data gets increased considerably.

PostPosted: Mon Mar 17, 2014 10:14
by thetoon
rubenwardy wrote:Not really. The player has no choice in which skin they get. The skin they get depends on their user name.


Yeah, that's exactly one (actually, at least three different) option offered by gravatar.

PostPosted: Mon Mar 17, 2014 11:14
by Hiradur
rubenwardy wrote:You can combine textures in Minetest (laying one over the other) like this:

bottom_layer_texture.png ^ top_layer_texture.png


Thanks, I might include this in later versions. If only I enjoyed making textures more...

Sokomine wrote:Intresting concept. Lately, requests for skins have been very prominent on most server's chats and in the forum.

There is one central entity we might use in order to distribute skins and determine who wants which one: The forum. Players who do have an account here might write in a special thread (which might be read by a mod) which skin they want for which server. Perhaps in the form link to the thread where the server is introduced, link named the way the player's name is written on the server, followed by a :, followed by the image the player wants as skin for that server. If the player wants to, there could also be a catch-all.

Something like that ought to be moderately safe (player names may not always equal forum names), but then - what kind of security does one need for a skin? Reading those webpage(s) containing that special thread and looking for links to your own server ought to be well withhin the gasp of any scripting language you like. Doesn't even have to be lua as those changes will take effect only after a server restart.

Only real problem might be that too many skins accumulate and thus media data gets increased considerably.


In my opinion the best solution to the custom skin problem would be a webpage hosted on the server itself with a script where players can upload their desired skin.
This mod aims to make it easier for administrators who don't have (or don't want to take) the time to insert custom skins for every player while making players look different. It also keeps traffic smaller.

PostPosted: Mon Mar 17, 2014 14:16
by tinoesroho
rubenwardy wrote:This is quite an interesting concept!

You can combine textures in Minetest (laying one over the other) like this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
bottom_layer_texture.png ^ top_layer_texture.png


This will allow you to have even more combinations.

So, "shirt_up_overlay.png ^ shirt_base.png" should work? That would explain what I've been doing wrong!

PostPosted: Mon Mar 17, 2014 17:34
by rubenwardy
Almost,

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
shirt_base.png ^ shirt_up_overlay.png

PostPosted: Mon Mar 17, 2014 20:00
by Krock
The idea with an identity isn't bad, but what when someone doesn't like his texture and another player has the same and wants to keep it?
Changing skins here doesn't seem to be possible, also a mirror isn't avaliable to see how someone looks like.