Client Based Skins

User avatar
Jordach
Member
 
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Client Based Skins

by Jordach » Fri May 17, 2013 15:20

To improve on the skins system, I thought a little in-depth last night.

Basically, instead of the server having a file, the client uploads it to the server and caches it until it is changed on the client side, which works in the following directory:

minetestx.x.x/textures/personal/skins

Which then you can place your skins in there and then you just add this line to the conf:

Code: Select all
player_skin = <this is the name>.png
skin_2d = false

To use the default skin, use:
Code: Select all
player_skin =

When the string is empty, Minetest will use the default skin.
To have classic 2D skins, you do this:
Code: Select all
player_skin = <this is the name>.png
player_skin_back = <name>.png
skin_2d = true

This would make a skin system completely de-centralised, and the server holds a cache'd version, unless the client reminds the server to update the cache'd copy.

Because there maybe questionable content, I assume that someone may want to disable the custom skins locally, so you would add to the conf:
Code: Select all
see_custom_skins = false
To disable, and to enable:
Code: Select all
see_custom_skins = true
Viewing custom skins is enabled by default.

The Minetest server can disable the custom skins with the following line:
Code: Select all
enable_player_skins = false

Enabling them is simple:
Code: Select all
enable_player_skins = true

But, by default, the setting is classed as true.

Also: You could do the same method with texture packs:
minetest.x.x.x/textures/personal/packs/<names of texture packs, essentially the all folder but with different names.>

Which you could then switch pack with the conf line:
Code: Select all
texture_pack = sphax
texture_pack = misa
texture_pack =

^ The above indicates that no texture pack will be used. If it's empty.

The Good:
- Great for people who want custom skins, 2D and 3D, but don't want to use the finite selection from Zeg's Skins Mod.
- No risk of the skin system going offline.
- You could in theory have one skin on one server and another skin on another.

The BAD:
- Possible chance of infected .png files, but I suspect doing this is probably difficult.
- If the Minetest server is using remote_media, then skins might not be written there and therefore skins might not be displayed.
Last edited by Jordach on Sat May 18, 2013 12:28, edited 1 time in total.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
Location: Germany
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Fri May 17, 2013 15:23

The bad:
- Too high security risks for the server
- Inappropriate skins
- More / slower traffic for the server and client (upload of clients is usually slower than download)
 

User avatar
Jordach
Member
 
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Fri May 17, 2013 15:25

PilzAdam wrote:The bad:
- Too high security risks for the server
- Inappropriate skins
- More / slower traffic for the server and client (upload of clients is usually slower than download)

Just finished it. Most skin files weigh in the kilobytes.

EDIT: Reminder, most servers are Linux based, so their infection rate is probably reduced.
Last edited by Jordach on Fri May 17, 2013 15:32, edited 1 time in total.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

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

by rubenwardy » Fri May 17, 2013 15:31

There could be a minetest.get_texture call that retrieves a texture from a player's texture manager.
 

User avatar
deasanta
Member
 
Posts: 20
Joined: Tue May 28, 2013 03:15
Location: New Zealand
GitHub: deasanta
IRC: deasanta
In-game: deasanta

by deasanta » Tue May 28, 2013 04:25

Can the image be uploaded to the server by the client then reprocessed by the server to sanitize it using safer code? The vulnerability normally lies in the viewer / image handler or its related libraries.
Are there safer formats that can be used – example - bmp can upload then the server can resave and served as a png?
See below:
http://irrlicht.sourceforge.net/changes.txt
- Updated to latest PNG library (1.2.18), fixing a vulnerability.
Also changed some data structures which should make the library 64bit
compatible.
 

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

by tinoesroho » Tue May 28, 2013 05:10

What I'd be concerned about is inappropriate skins being displayed in a game that attracts a very young audience. :-(
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
sfan5
Moderator
 
Posts: 3817
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

by sfan5 » Tue May 28, 2013 05:14

PilzAdam wrote:- Too high security risks for the server

I don't see a security risk there, MC also uses png and didn't have any problems
PilzAdam wrote:- More / slower traffic for the server and client (upload of clients is usually slower than download)

I selected 29 Skins, they were 28,8 KB which means that one skin < 1 KB.
Also Skins need to be 64x32, there could also be a size limit of e.g. 2.5 KB
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

User avatar
Jordach
Member
 
Posts: 4523
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Tue May 28, 2013 10:41

tinoesroho wrote:What I'd be concerned about is inappropriate skins being displayed in a game that attracts a very young audience. :-(
tinoesroho, in MC you rarely see them, its usually about 1-4 players per server who have that, and then they get a ban warning if they continue to use it. If they don't they end up banned.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

by Evergreen » Tue May 28, 2013 11:07

Jordach wrote:
tinoesroho wrote:What I'd be concerned about is inappropriate skins being displayed in a game that attracts a very young audience. :-(
tinoesroho, in MC you rarely see them, its usually about 1-4 players per server who have that, and then they get a ban warning if they continue to use it. If they don't they end up banned.

Very true. I hope this feature gets worked on.
Last edited by Evergreen on Tue May 28, 2013 11:08, edited 1 time in total.
Back from the dead!
 

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

by tinoesroho » Tue May 28, 2013 18:35

Rapid skin swapping for the win!

... um, yeah. Should there be an option to upload it to a moderation queue the server admins can see? Yes. Should it be enabled by default? I don't think so. Great idea, but-
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
Calinou
Moderator
 
Posts: 3157
Joined: Mon Aug 01, 2011 14:26
Location: Troyes, France
GitHub: Calinou
IRC: Calinou
In-game: Calinou

by Calinou » Tue May 28, 2013 19:30

Jordach wrote:
tinoesroho wrote:What I'd be concerned about is inappropriate skins being displayed in a game that attracts a very young audience. :-(
tinoesroho, in MC you rarely see them, its usually about 1-4 players per server who have that, and then they get a ban warning if they continue to use it. If they don't they end up banned.


+1, I've played on a lot of Minecraft servers, very few players use inappropriate skins.

Note that skins must be 64×32 in Minecraft, so it limits the impact of that kind of skins.
 

snowflake
Member
 
Posts: 215
Joined: Mon Nov 16, 2015 16:50

Re: Client Based Skins

by snowflake » Mon Apr 04, 2016 13:26

i done everything u told but when i join a sever , i dont get that skin , how am i able to put the skin on in server?
 

User avatar
benrob0329
Member
 
Posts: 1313
Joined: Thu Aug 06, 2015 22:39
Location: Michigan
GitHub: Benrob0329
IRC: benrob0329
In-game: benrob03

Re: Client Based Skins

by benrob0329 » Mon Apr 04, 2016 13:40

It's a feature discussion, not a how to.
Social: YouTube Peertube Matrix Room: #minetest:matrix.org | Games: The Infinite IKEA
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
MineYoshi
Member
 
Posts: 5371
Joined: Wed Jul 08, 2015 13:20

Re: Client Based Skins

by MineYoshi » Mon Apr 25, 2016 19:49

azekill_DIABLO wrote:imagine somone load a GIANT skin!! it does lot of lag!

IF there is a limit of size to a skin, that trouble don't going to exist :F
 

User avatar
azekill_DIABLO
Member
 
Posts: 7489
Joined: Wed Oct 29, 2014 20:05
Location: OMICRON
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: Client Based Skins

by azekill_DIABLO » Tue Apr 26, 2016 10:56

MineYoshi wrote:
azekill_DIABLO wrote:imagine somone load a GIANT skin!! it does lot of lag!

IF there is a limit of size to a skin, that trouble don't going to exist :F


you're true
 


Return to Feature Discussion



Who is online

Users browsing this forum: No registered users and 2 guests