[Mod] Player textures by hash code [player_hash_skins]

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

[Mod] Player textures by hash code [player_hash_skins]

by Hiradur » Sun Mar 16, 2014 13:00

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

by ak399g » Sun Mar 16, 2014 16:46

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: 5544
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sun Mar 16, 2014 16:56

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.
 

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

by thetoon » Sun Mar 16, 2014 17:28

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

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

by rubenwardy » Sun Mar 16, 2014 18:04

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: 3616
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

by Sokomine » Sun Mar 16, 2014 18:41

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.
 

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

by thetoon » Mon Mar 17, 2014 10:14

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.
 

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

by Hiradur » Mon Mar 17, 2014 11:14

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.
 

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

by tinoesroho » Mon Mar 17, 2014 14:16

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: 5544
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Mon Mar 17, 2014 17:34

Almost,

Code: Select all
shirt_base.png ^ shirt_up_overlay.png
 

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

by Krock » Mon Mar 17, 2014 20:00

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.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 


Return to Mod Releases



Who is online

Users browsing this forum: Bing [Bot] and 5 guests