[Mod] Player textures by hash code [player_hash_skins]

Post Reply
User avatar
Hiradur
Member
Posts: 26
Joined: Sat Feb 22, 2014 17:44

[Mod] Player textures by hash code [player_hash_skins]

by Hiradur » Post

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_ ... master.zip (0.4.8 or later)
Last edited by Hiradur on Wed Apr 30, 2014 10:21, edited 2 times in total.

User avatar
ak399g
Member
Posts: 160
Joined: Tue Jul 30, 2013 02:36
In-game: SAFR
Contact:

by ak399g » Post

pics or didn't happen

otherwise, sounds cool!
Last edited by ak399g on Sun Mar 16, 2014 16:46, edited 1 time in total.
aka SAFR

User avatar
rubenwardy
Moderator
Posts: 6431
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

This is quite an interesting concept!

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

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.

User avatar
thetoon
Member
Posts: 106
Joined: Tue Dec 11, 2012 12:55

by thetoon » Post

If I got it right, it's a bit like "gravatar-for-minetest", right?

User avatar
rubenwardy
Moderator
Posts: 6431
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

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.

Sokomine
Member
Posts: 4184
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

by Sokomine » Post

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.
A list of my mods can be found here.

User avatar
thetoon
Member
Posts: 106
Joined: Tue Dec 11, 2012 12:55

by thetoon » Post

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.

User avatar
Hiradur
Member
Posts: 26
Joined: Sat Feb 22, 2014 17:44

by Hiradur » Post

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.

User avatar
tinoesroho
Member
Posts: 570
Joined: Fri Feb 17, 2012 21:55
Location: Canada

by tinoesroho » Post

rubenwardy wrote:This is quite an interesting concept!

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

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!
We are what we create.

I tinker and occasionally make (lousy) mods. Currently building an MMO subgame and updating mods. Pirate Party of Canada member. Sporadic author. 21 years old.

My github:
https://github.com/tinoesroho/

User avatar
rubenwardy
Moderator
Posts: 6431
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

by rubenwardy » Post

Almost,

Code: Select all

shirt_base.png ^ shirt_up_overlay.png

User avatar
Krock
Developer
Posts: 4589
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests