[Mod] Different textures for players [player_textures]

User avatar
Lone_Wolf
Member
Posts: 2578
Joined: Sun Apr 09, 2017 05:50
GitHub: LoneWolfHT
IRC: LandarVargan
In-game: LandarVargan

Re: [Mod] Different textures for players [player_textures]

by Lone_Wolf » Post

holli wrote:Hi Lone_Wolf,

the online skin converter works fine. Many thanks for that. Do you know any cmd line program or script ([ba]sh/python/whatever) to this job in a "mc2mt_convrt -i mc_player_xyz.png -o player_xyz.png" way?

Thanks,

Holli
I sadly do not. That site is the fastest way I know of...
My ContentDB -|- Working on CaptureTheFlag -|- Minetest Forums Dark Theme!! (You need it)

dawgdoc
Member
Posts: 260
Joined: Mon Feb 27, 2017 01:10
GitHub: dawgdoc

Re: [Mod] Different textures for players [player_textures]

by dawgdoc » Post

holli wrote:Hi dawgdoc,

But my question is, it is possible to extend the mod so that it automatically search the database on the site mentioned above (http://minetest.fensta.bplaced.net), download the skin file automatically and use it as custom player skin.
The thing with the ftp server was only an idea for easy file access...
@holli See if the Skinsdb does what you are looking for. According to the readme file --
Download scripts included for the Minetest skin database
Flexible skins API to manage the database
Give a man a fish, feed him for a day. Give a kid a fish, it's going to die.

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Different textures for players [player_textures]

by bell07 » Post

Download scripts included for the Minetest skin database
Means offline-updater. The skins needs to be pre-downloaded, before the server is started. You can just use my mod_with_skins I update sometimes with all skins downloaded (current count 1340 skins)
Flexible skins API to manage the database
This means the API for the internally loaded skins table. Good example for API usage is the character_creator registers per-player private skin for compatibility. This way each player can decide if he uses skins from skinsdb or the configured skin from character_creator. The configuration is started by the character_creator-skin selection.

holli
Member
Posts: 15
Joined: Sat Mar 31, 2018 20:04
In-game: holli
Location: Lower Saxony, Germany
Contact:

Re: [Mod] Different textures for players [player_textures]

by holli » Post

Hi dawgdoc,
hi bell07,

thanks for your replies. Downloading the whole database (or a kumulative update) and restarting the server to apply the changes is not really a convenient way.

I was searching for a funcionality like in MC. Every user have its own (and only one) skin stored on a database server somewhere in the internet. Every server the user logs in is searching this database for the users skin, downloads/caches and displays it as player skin without any user action.

Ok, the biggest difference to MC for that is that in MC every user has a unique player ID witch is used to select the correct skin. In Minetest such ID does not exists, so identification is only available through the player name witch is not unique and this issue can easily be used to prank someone.

So the database server must have a security feature to prevent overwriting an existing player skin file. The server could ask for a password on upload. If the file name already exists and the password doesn't match, the upload will declined. Otherwise the file will be stored with the password if not set. The sever sends the player password as download password for the file. If the password not match and the download fails use the default skin.
Further the server have to check if the filename matches "player_<name>.png". The server can ask for the player name, so renameing the file is quite easy. Also the server has to check the bitmap size (64x32px) of the png and reject the file if not match before storeing it to the database.

Checking for skin file could be like this:
The client (=game server) send somewhat like "https://skindb.minetest.net/?file=playe ... w=<pw_hash>" (don't know if the expression is correct) through tcpip socket and gets a stream as answer. Contain the first 4 bytes ?PNG, store the stram as player skin file, if not, decline the download and use the default skin. The client should contact the skindb every time the player logs in to recognize skin changes.

I am not sure if the client call is correct or totally bullshit, but I hope you understand what I mean. The database don't need to be a real database, just a bunch of player skin files to be browsed and a textfile containing file name and it's password hash to be compared. (=> game server and skindb have to use the same password encryption! :-)

If I had the skills, I would do it by myself. Sadly I do not. :-( But I wonder that no one had this idea before.

Greetz,

Holli

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Different textures for players [player_textures]

by bell07 » Post

skinsdb supports (per player multiple) private skins. Just place "textures/player_<playername>_X.png", "textures/player_<playername>_X_preview.png" and "meta/player_<playername>_X.txt" files to the mod folder (X means a counter). But you need all files on the server. Dynamically loading textures from other server is technically limitation as I know.

Please note MT is not MC. MT follow other visions the MC. Idea was already happen, but MT is a decentral open source project, each server follow an other vision, implements other ideas, plays an other (sub)game. There is no reason and no way to force them to use anything. The MT users (or only me?) are mostly Open Source Enthusiasts that means we do not like unique persona ID's
And I do not like the idea to be trackeable if I play a game on my private LAN server at home, because the skins are requested from any server

holli
Member
Posts: 15
Joined: Sat Mar 31, 2018 20:04
In-game: holli
Location: Lower Saxony, Germany
Contact:

Re: [Mod] Different textures for players [player_textures]

by holli » Post

Hi bell07,
There is no reason and no way to force them to use anything.
The ability of using a feature or a mod (like a "central" server for skins) is no enforcement to use ist. It's still a feature or a mod and everyone can decide to use it or not.
Please note MT is not MC.
I know and I have my reasons to play MT instead MC.
The MT users (or only me?) are mostly Open Source Enthusiasts that means we do not like unique persona ID's
...me too! Having a "skin server" that containes player names (for the skin file names) and passwords (to protect them against greefing, pranks or anything else) doen't mean to have an unique ID. Every player (=> the human being behind the MT character) can have uncounted player names and much more skins (=textures).

Please remind yourself why you decided to create a mod that provides custom skins for players. What is wrong with the standard texture? ...
...
...
...
You're right! It's the same for everybody. It is not individual like yourself, 'cuz you are an individuum that don't want to be the same like all the others...it was and is your deepest wish to be different. Why do you want a different player texture? What's the reason? Right - it's yours. You created it, it's your own player texture noone else have. That differs you from any other player in the minetest world(s) you play.
I believe there is another wish inside you: everyone who knows you in a minetest world is supposed to recognize you at the lookout in another minetest world. So what's the difference to an unique ID?

Every server admin can decide to install a mod to provide useful features or not. The admin decide by hisself wich feature is useful and wich is not. To say "unique IDs are bad, nobody have to provide a central skin server" is a restriction to any server admin who think that this feature is very useful.
On the other hand it is totally inconvenient for every server admin who decide to make his server public to manually store player textures of all his unknown users... "Store your skin on <skin server> and it will be used on my server" is more convenient - also for the players:
<a> "I loaded my skin to <skin server> and I have my skin in every minetest world and every minetest (sub)game." - <b> "That's quite cool, but <minetest server> don't use these skins."

If any admin will be forced to use a feature on his server, it will be forced by the users!

And I do not like the idea to be trackeable if I play a game on my private LAN server at home, because the skins are requested from any server


There are two mistakes in your thought: The first mistake is: on your local server you can store any used player texture and turn off the internet access for it. Provide a VPN tunnel for non local players on your "private" server is the better idea for every private non local game party.
The second is that you won't be tracked if the skin server ist not tracking you. Build your own skin server and everything is fine!

<offtopc>
But you're right that anybody can traceing (not tracking) you in the internet. You cannot be anonymous. The IP provides by your isp combined with the timestamp is your unique ID in the internet. You can use the TOR browser, you can do everything what's your paranoid mind offers you, but you cannot prevent that your isp is "wiresharking" all your internet packages. Please wake up. "1984" is already running!

By the way: even if you will be tracked on skin download or not: who is interested in such useless data?!? Tracking you must earn lots of money!
</offtopic>

Another reason for a central skin server is that the server only holds the skins for the players joined. An external bash (or vb) script can delete the files, that was not used for a long time (e.g. by checking timestamp of the player file in <world>/players). Why holding tons of files never used? To download and update a whole player skin database/package where most player never joining "my" server is not really practicable and a server restart for that an absolutely no-go.

Please note: an ID ist not only a number or a hash like on your passport. It could also be an indiviual look...

So long,

Holli

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Different textures for players [player_textures]

by bell07 » Post

I did not said the idea is fully useless, but it is not an must-have in minetest. In MC the "Private skins" are forced to all players, in MT you can choose between "Private skins" (player_textures, skinsdb), "Public Skins Collection" (skinsdb), "Character Creator", "Clothing" and other skinning strategies.

But the real reason why the "Private Skins Server" is not implemented is because not possible at the time. Minetest does not allow to load textures at runtime. Texture-ressources are loaded at init time only, so all skin files needs to be on Minetest Server at game start time. If it gets possible probably I get the ambition to implement it to skinsdb because of fun on development.

To get the "unique private skin" on "supported servers" it is just enough to send the skin file with player name PM to the server owner. If the file is placed in the right folder and the server restarted (usually once each day for backup reasons) the skin is applied to you player. This way is not really more effort then maintenance the central skin server infrastructure.
What's the reason? Right - it's yours. You created it, it's your own player texture noone else have. That differs you from any other player in the minetest world(s) you play.
That is NOT the reason why I forked u_skins and rewrote it to skinsdb. I am not able to create own high quality skins and no interest on them. My reason for skinsdb is to be able to change skins each time depending on my current moon / temper. Downloading all >1000 good skins created by other people, be able to update them, and have them available any time in game for selection, is exactly what I need.
I do not play on foreign servers, mostly I play only on my private server in my home LAN with my child's. Sometimes we use the character_creator (can be used with skinsdb in parallel) or since I found the novaskin.me editor my childs creates and uses some private "player_playername" skins.

holli
Member
Posts: 15
Joined: Sat Mar 31, 2018 20:04
In-game: holli
Location: Lower Saxony, Germany
Contact:

Re: [Mod] Different textures for players [player_textures]

by holli » Post

Hi bell07,
Minetest does not allow to load textures at runtime. Texture-ressources are loaded at init time only, so all skin files needs to be on Minetest Server at game start time
I couldn't believe that and so I tested it with the player_texture mod. You're right. No skin file copied to the texture directory while the server was active was loaded correctly. The runtime used a randomly generated one color skin instead.

This behaviour strongly suggests that all skins are loaded into memory at server start. This is not only inefficient, it's pure wasting of ressources!

Why don't start the "skin load initialization" on player logon and load only the skins of connected players? Maybe it is possible to load the skins kumulative.

Could this be done in the init.lua script of the player_texture mod triggered by the player logon event? Maybe it's also possible that the player logout event triggers the unload of his skin from memory.

I can understand that the minetest engine was designed to load and hold only one player skin for all players into memory, so the initialization at startup makes sense for that purpose.
But if you run a public server with many unknown users who can log on and off at every time it is a completely useless behaviour. In case (and that's fact) that minetest becomes more and more common and that more and more minetest servers will be exist, it becomes more and more relevant to have a "central" server for skins to prevent tons of useless and unneeded traffic, that downloading and updating all existing skins on all existing servers (that uses this mod) means.

Or could it be possible that every user hold his own skin local on his machine and the client send its skin to the server? So no central skin server is needed and every user can have his own skin(s)...it's just an idea.

I hope my explanations are accureate enough for you. English ist not my native language. So, if you be offended by any phrase of mine, believe me, that was not my intention and only caused of my bad english although I get help from google traslater.

Greetz,

Holli

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] Different textures for players [player_textures]

by bell07 » Post

This behaviour strongly suggests that all skins are loaded into memory at server start. This is not only inefficient, it's pure wasting of ressources!
Found this related issue, already closed with "Won't add": https://github.com/minetest/minetest/issues/6464

There is no skins specific behavior implemented but generic for all textures, sounds, models. At init time the ressources needs at least to be registered, to know in which folder the file is placed. The "player_bell07.png" could be in textures folder of ANY mod, or in ressources pack on client. Therefore fully dynamic load would need a search trough all folders for the file each time, if requested.

But of course dynamic loading textures is usefull for multiple features, for dynamic maps generation for example. See https://github.com/minetest/minetest/issues/3528
In case (and that's fact) that minetest becomes more and more common and that more and more minetest servers will be exist, it becomes more and more relevant to have a "central" server for skins to prevent tons of useless and unneeded traffic
It is again an issue connected not only to skins but to all textures usages. Sofar started already the Public Remote Media Server Project but I did not played with them yet.
I hope my explanations are accureate enough for you. English ist not my native language
Same to me, I did never learned English. Google Translator ist my friend ;-)

@Admins, is the off-topic about dynamic textures load for skins ok in this topic? May this discussion should be moved to own topic in discussion sub-forum?

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

Re: [Mod] Different textures for players [player_textures]

by rubenwardy » Post

holli wrote:This behaviour strongly suggests that all skins are loaded into memory at server start. This is not only inefficient, it's pure wasting of resources!
During a client connection, it needs to receive all textures. They can either receive them using a remote HTTP server or, more commonly, from the server directly.

If Minetest does store the textures in memory then it's to make this faster - it actually saves resources by using more memory to reduce disk I/O. Ideally you should be able to disable the server sending media directly, and not have to have this cache.
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

holli
Member
Posts: 15
Joined: Sat Mar 31, 2018 20:04
In-game: holli
Location: Lower Saxony, Germany
Contact:

Re: [Mod] Different textures for players [player_textures]

by holli » Post

Hi bell07,
hi rubenwardy,
@Admins, is the off-topic about dynamic textures load for skins ok in this topic? May this discussion should be moved to own topic in discussion sub-forum?
I don't think that this is totally offtopic, 'cuz the initial question of mine was if it able to enhance this mod to load player skins dynamicly [from a central "skin server"] when the player joins.

Long story short, the answer is
During a client connection, it needs to receive all textures.
or even "No!"

But I hope that some active developers read this thread and thinking about the usefullness of a different behaviour for loading dynamically player skins and how to implement this in minetest. :-)

I think, we can close this subthread now. It seems that everything about that was spoken and the answer is clear.

Live long and prosper,

Holli

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests