Page 1 of 5

[Mod] Skinsdb [skinsdb]

Posted: Thu Jun 15, 2017 16:41
by bell07
I forked the u_skins (viewtopic.php?f=9&t=8816) a time ago to get skins updated from database. Since I am on smart_inventory I moved the unified inventory integration to optional.
Now I reworked the whole mod, added a sfinv tab and renamed it to skinsdb:

- Uses Players-attribute to store the skin
- Skins Metadata (Author, License) supported
- Public skins - Skins available for all players
- Private skins - Skins available for the owner-player only
- Hidden skins - useable but not in inventory list
- Multiple private skins per user supported

- Skins format 1.0 and 1.8 supported
- character_creator supported as "Enhanced private skin"
- homedecor's wardrobe supported als "hidden Skin"

- unified_inventory Tab (optional)
- sfinv Tab (optional)
- smart_inventory supported
- Chat commands to list, show, set skins or start an inventory independant UI

- Work together with 3d_armor
- Work together with clothing

- Skins API for flexible enhancement of any type
Spoiler
Image
Image
Image
Image
Source: https://github.com/minetest-mods/skinsdb
Donwload: https://github.com/minetest-mods/skinsd ... master.zip

API: https://github.com/minetest-mods/skinsd ... ter/API.md
Examples for usage how it works is the skinsdb's internal skinslist: https://github.com/minetest-mods/skinsd ... inlist.lua
And the character_creator integration: https://github.com/minetest-mods/charac ... t.lua#L225

Dependency:
default
intllib?
unified_inventory?
3d_armor?
clothing?
sfinv?

License: GPLv3.

Help needed
Please provide skins that I can add to this mod!

Since the Skin updater scripts are removed, there is no easy provided skins anymore with this mod. Installing skins is manual effort on files level.
For the new Content database I think we need to add some pre-installed skins to the package. I think at least 4 (2x male, 2x female). Since 1.8er skins are supported I prefer this format.
This is an appeal for default skins to be pre-installed with this mod. I need the
- Skin file (png)
- Skin preview file (front foto) to be shown in inventory *_preview.png
- Skin name
- Author
- License

Re: [mod] Skinsdb [skinsdb]

Posted: Thu Jun 15, 2017 18:12
by azekill_DIABLO
great! it's really cool!

Re: [mod] Skinsdb [skinsdb]

Posted: Sun Jun 18, 2017 16:09
by bell07
- Removed unneeded "default" dependency.

- Added support for per-player private skins. That means the next skins file naming is supported:
  • character_[number].png - Public skin, available for all users
  • player_[nick].png or player_[nick]_[number].png - one or multiple private skins for player "nick"
  • *_preview.png - Preview files for public and private skins
  • meta/*.txt - Metadata file for each skin[/code]
A player see only own + the public skins in his skins selection.
This is possible only in sfinv and smart_inventory. Sorry for unified_inventory users, I do not know how I can do dynamically per-player pages with unified_inventory-API

Re: [mod] Skinsdb [skinsdb]

Posted: Sun Jun 18, 2017 19:07
by GamingAssociation39
Is it possible to add support for my laptop/computer mod? Or help to incorporate it into the interface?
viewtopic.php?f=9&t=17910

Re: [mod] Skinsdb [skinsdb]

Posted: Sun Jun 18, 2017 21:42
by bell07
@GamingAssociation39 which Player-Skins functionality do you see ingame usable on a virtual laptop? I do not have any idea at the time...

My next milestone I reached, but not in master because of other projects dependencies at the time:

The character_creator is now usable with the skinsdb in parallel. The mod attach a skin to the skins list (in sfinv + smart_inventory), if the skin is selected the creator formspec appears. For unified_inventory the "Skin" does not appear in the list, but an own cc-inventory button already exists. The skinsdb and character_creator does working proper together with this change in unified_inventory too.
Image
The character_creator does not provide any skin preview so the existing "Button" picture is used, that looks strange especially in Armor preview at the time.

If anyone like to test the development, the next updates needed:
3d_armor - if used - with https://github.com/stujones11/minetest- ... r/pull/110
skinsdb - https://github.com/bell07/minetest-skin ... or_support - will be merged to master after the 3d_armor change
character_creator - https://github.com/bell07/character_cre ... pr_skinsdb - the enhancement, will be proposed as PR after skinsdb changes are in master
smart_inventory - if used - as of today or later in master
sfinv or unified_inventory - if used - current stable

Re: [mod] Skinsdb [skinsdb]

Posted: Sun Jun 18, 2017 22:08
by GamingAssociation39
bell07 wrote:@GamingAssociation39 which Player-Skins functionality do you see ingame usable on a virtual laptop? I do not have any idea at the time...

My next milestone I reached, but not in master because of other projects dependencies at the time:

The character_creator is now usable with the skinsdb in parallel. The mod attach a skin to the skins list (in sfinv + smart_inventory), if the skin is selected the creator formspec appears. For unified_inventory the "Skin" does not appear in the list, but an own cc-inventory button already exists. The skinsdb and character_creator does working proper together with this change in unified_inventory too.
Image
The character_creator does not provide any skin preview so the existing "Button" picture is used, that looks strange especially in Armor preview at the time.

If anyone like to test the development, the next updates needed:
3d_armor - if used - with https://github.com/stujones11/minetest- ... r/pull/110
skinsdb - https://github.com/bell07/minetest-skin ... or_support - will be merged to master after the 3d_armor change
character_creator - https://github.com/bell07/character_cre ... pr_skinsdb - the enhancement, will be proposed as PR after skinsdb changes are in master
smart_inventory - if used - as of today or later in master
sfinv or unified_inventory - if used - current stable
What if it's used to create skins and enable different skins like you already have right now.

Re: [mod] Skinsdb [skinsdb]

Posted: Mon Jun 19, 2017 05:24
by bell07
You can try to integrate it but I do not see the value. If anyone like to change his outfit he uses Wardrobe not a laptop.

By the way, any idea how the wardrobe could be integrated to the skinsdb?
1. if wardrobe found - disable the inventory selection and use the wardrobe selection for skinsdb skins (including private player skins and character_creator - wardrobe enhancement for skins preview required)
2. Both should work together independently but the skinsdb should know the wardrobe skins as valid
3. Wardrobe and inventory should share the same skins collected from both mods?
4. ???

Re: [mod] Skinsdb [skinsdb]

Posted: Wed Jun 21, 2017 19:39
by Andrey01
I see here are huge amount of skins!! 848 PAGES!

Re: [mod] Skinsdb [skinsdb]

Posted: Wed Jun 21, 2017 19:49
by bell07
@Andrey01, no they are "only" 848 skins on next pages. It is a smart_inventory "feature" to display the count of items and not the count of pages. Maybe I'll change it in feature. You can checout all of them from "mod_with_skins" branch.

created an API documentation: https://github.com/bell07/minetest-skin ... ter/API.md
Examples for usage how it works is the skinsdb's internal skinslist: https://github.com/bell07/minetest-skin ... inlist.lua
And the character_creator integration: https://github.com/bell07/character_cre ... t.lua#L225

Re: [Mod] Skinsdb [skinsdb]

Posted: Mon Jul 24, 2017 03:46
by lonestar
Just to let ya know, this is not working with 3D armor, just shows a solid colored model.

Re: [Mod] Skinsdb [skinsdb]

Posted: Mon Jul 24, 2017 07:19
by bell07
Thanks for the feedback. Hm, I do not have any issues, cannot reproduce them. Maybe one if the components is to old in your setup?
Which versions do you use?
Minetest / minetest_game - 0.4.16 ?
3d_armor? Latest stable is 0.4.9, but I use the git-version. So if 0.4.9 does not work, try the git/master version.
skinsdb? It is rolling release so please update to the last git/master version

Which Skins do you use?
Please let me know if updating the mods solves your issue. If updating does not help, look to the debug.txt and provide the error messages about not loaded textures.

Re: [Mod] Skinsdb [skinsdb]

Posted: Mon Jul 24, 2017 12:29
by texmex
Thank you for making this. I especially appreciate the sfinv support. 3d_armor support works fine for me.

Two ideas:
  • Would you consider a wardrobe node that has to be crafted and placed by players in order to access the skin switching feature (preferrably looking like the sfinv version of the formspec), or is this out of scope?
  • Would you consider an opt-in feature that assigns every new player a random skin instead of having everyone being skinned as Sam?

Re: [Mod] Skinsdb [skinsdb]

Posted: Mon Jul 24, 2017 13:31
by bell07
To cover the wardrobe idea was on my roadmap but I did it not for two reasons: 1. I do not use them, 2. I do not have idea how it should work together with the other mods (Uses skinsdb global list? skinsdb-per-player list? Does have own wardrobe skins list? Ways to pass skins per player between databases) So I gived up. If anyone is interested to develop them I can support them. The wardrobe should be a separate mod that uses the API for skinsdb.
- Own skins should be applied to database using skins.new() and readed trough skins.get_skinlist() for selection.
- Skin should be set trough skins.assign_player_skin()

EDIT:
bell07 wrote:By the way, any idea how the wardrobe could be integrated to the skinsdb?
1. if wardrobe found - disable the inventory selection and use the wardrobe selection for skinsdb skins (including private player skins and character_creator - wardrobe enhancement for skins preview required)
2. Both should work together independently but the skinsdb should know the wardrobe skins as valid
3. Wardrobe and inventory should share the same skins collected from both mods?
4. ???
EDIT-END



The random-skins assignment is out of scope too. (Which list should be used?). But you can develop a simple mod for this (untested code):

Code: Select all

minetest.register_on_newplayer(function(player)
	local skinlist = skins.get_skinlist()
	local randomskin = skinlist[math.random(#skinlist)]
	skins.set_player_skin(player, randomskin)
end)

Re: [Mod] Skinsdb [skinsdb]

Posted: Mon Jul 24, 2017 14:41
by texmex
Cool, thank you bell07, I'll try it out.

Re: [Mod] Skinsdb [skinsdb]

Posted: Mon Jul 24, 2017 15:04
by texmex
May I also suggest:
  • renaming character_1.png to character.png and character_1_preview.png to character_preview.png, so that texture packs that overwrites the default character skin also overrides this skin.
  • that the pagination only shows when there's several pages of skins available

Re: [Mod] Skinsdb [skinsdb]

Posted: Mon Jul 24, 2017 15:56
by bell07
Thanks for suggestions. Both done ;-)

Re: [Mod] Skinsdb [skinsdb]

Posted: Mon Jul 24, 2017 16:59
by Krock
Interesting to see this mod evolving with each fork. I see that you used my mod as base to extend its functions. The last "edge" that could be touched with this mod would be inventory_plus support. It is already quite old but that doesn't change anything that people still like it.

EDIT: Remove bad joke

Re: [Mod] Skinsdb [skinsdb]

Posted: Tue Jul 25, 2017 02:12
by lonestar
bell07 wrote:Thanks for the feedback. Hm, I do not have any issues, cannot reproduce them. Maybe one if the components is to old in your setup?
Which versions do you use?
Minetest / minetest_game - 0.4.16 ?
3d_armor? Latest stable is 0.4.9, but I use the git-version. So if 0.4.9 does not work, try the git/master version.
skinsdb? It is rolling release so please update to the last git/master version

Which Skins do you use?
Please let me know if updating the mods solves your issue. If updating does not help, look to the debug.txt and provide the error messages about not loaded textures.
Minetest Ver: 0.4.16
skinsdb ver: latest, downloaded from git
skins used: what is included in the mod

Modpack - 3d Armor [0.4.9]

debug.txt -- https://pastebin.com/L2HN5rkj

Re: [Mod] Skinsdb [skinsdb]

Posted: Tue Jul 25, 2017 05:09
by bell07
Krock wrote:Hint: You could gain a few points on /r/ProgrammerHumor for the [Bad UI] dropdown selection of the page you would like to select. Try using text boxes, where people can enter their desired page directly. Formspecs must not close when hitting enter - we have a feature for this now.
I do not understand the joke :-(

The dropdown is strange in unified_inventory because of useless player inventory at this page I cannot disable + and/or a bug that the dropdown is displayed under the items in inventory.
But I like more the dropdown way to direct jump to a page without switching from mouse to keyboard. And without the text field the hinting-enter is not necessary.
At the other site feel free to provide pull requests, I am smart_inventory user so there is no dropdown in my inventory :-/
lonestar wrote:generateImage(): Could not load image "character_1056.png.png" while building texture; Creating a dummy image
Please try the latest git version of 3d_armor modpack. There is a change missed in your version since Jun 21, 2017
I updated the dependency info in first post.

Re: [Mod] Skinsdb [skinsdb]

Posted: Fri Aug 04, 2017 15:30
by Stix
@bell07 i tried this mod in singleplayer with smart_inventory and there was no skins. i know this mod automatically pulls skins from addi's mt skins database, so is there a option thats off by default to enable skin-pulling from the data-base?

Re: [Mod] Skinsdb [skinsdb]

Posted: Fri Aug 04, 2017 15:43
by bell07
The mod does not pull automatically the skins, but provides updaters that are able to do it.
Sometimes I update the skins for me using the bash-script and pull them to the "mod_with_skins" branch. You can use this branch so you do not need to update by self. The link to the mod_with_skins ZIP-File is provided in the first post.
If you checked the mod from git directly, just change the branch by command line

Code: Select all

git checkout mod_with_skins

Re: [Mod] Skinsdb [skinsdb]

Posted: Fri Aug 04, 2017 15:50
by Stix
ok, thx! that was the information i needed.

.

Posted: Wed Aug 09, 2017 08:51
by usename
.

Re: [Mod] Skinsdb [skinsdb]

Posted: Tue Aug 22, 2017 22:32
by mcskindownload
Thanks a lot of!

Re: [Mod] Skinsdb [skinsdb]

Posted: Thu Aug 24, 2017 12:29
by ManElevation
nice!