[Mod] Simple Skins [1.0] [simple_skins]

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Simple Skins [0.7] [simple_skins]

by FreeGamers » Post

bosapara wrote: I discovered some good thing, preview can be generated even without preview images:
Nice! Exactly what I was looking for. SkinsDB is inefficient with preview images. Simple_skins could use this dynamic image preview generation function, Oh but its not added... it also has a lot of unused space!

I used the code that bospara shared to create a version that looks a bit nicer and I rearranged allthe SFINV elements and added back some meta data that was cut from the simple_skins version. I didn't think the back of the skin was as important as the front so I removed that element. I ended up with a version like this:

Here is the source, so your skins interface can look as beautiful as mine:
https://www.notabug.org/FreeGamers/Sara ... s/init.lua

I only use sfinv because I think its the easiest for anyone to understand, so I did not test this with any other inventory mod.

Image
Attachments
Screenshot_2019-11-28_22-43-19.png
Screenshot_2019-11-28_22-43-19.png (56.11 KiB) Viewed 2024 times
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Simple Skins [0.7] [simple_skins]

by bosapara » Post

FreeGamers wrote: I only use sfinv because I think its the easiest for anyone to understand, so I did not test this with any other inventory mod.

Looks good too. I prefer this version of GUI:

Image

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Simple Skins [0.7] [simple_skins]

by FreeGamers » Post

bosapara wrote:re:
Bosapara, one thing I noticed was that the right leg texture doesn't get flipped so we end up with two leg's that are both the same texture orientation. Its not a big deal but its something I noticed. Is it something simple to fix?
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Simple Skins [0.7] [simple_skins]

by bosapara » Post

FreeGamers wrote: Bosapara, one thing I noticed was that the right leg texture doesn't get flipped so we end up with two leg's that are both the same texture orientation. Its not a big deal but its something I noticed. Is it something simple to fix?
Of course, its possible to fix. Use the code below.

Image

Code: Select all

local head = "[combine:8x8:-8,-8="..skins.skins[name]..".png"
local body = "[combine:8x12:-20,-20="..skins.skins[name]..".png"
local left_leg = "[combine:4x12:-4,-20="..skins.skins[name]..".png"
local right_leg = "[combine:4x12:-4,-20="..skins.skins[name]..".png^[transformFX"

local left_hand = "[combine:4x12:-44,-20="..skins.skins[name]..".png"
local right_hand = "[combine:4x12:-44,-20="..skins.skins[name]..".png^[transformFX"

local back_head = "[combine:8x8:-24,-8="..skins.skins[name]..".png"
local body_back = "[combine:8x12:-32,-20="..skins.skins[name]..".png"
local legs_back = "[combine:4x12:-12,-20="..skins.skins[name]..".png"

local left_leg_back = "[combine:4x12:-12,-20="..skins.skins[name]..".png"
local right_leg_back = "[combine:4x12:-12,-20="..skins.skins[name]..".png^[transformFX"


local left_hand_back = "[combine:4x12:-52,-20="..skins.skins[name]..".png"
local right_hand_back = "[combine:4x12:-52,-20="..skins.skins[name]..".png^[transformFX"

image[3,1;2,2;".. head .. "] image[3,2.75;2,3;".. body .. "] image[3,5.35;1,3;".. left_leg .. "] image[3.82,5.35;1,3;".. right_leg .. "] image[2.2,2.75;1,3;".. left_hand .. "] image[4.63,2.75;1,3;".. right_hand .. "] image[7,1;2,2;".. back_head .. "] image[7,2.75;2,3;".. body_back .. "] image[7,5.35;1,3;".. left_leg_back .. "] image[7.82,5.35;1,3;".. right_leg_back .. "] image[6.2,2.75;1,3;".. left_hand_back .. "] image[8.63,2.75;1,3;".. right_hand_back .. "]


User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [Mod] Simple Skins [0.7] [simple_skins]

by FreeGamers » Post

Perfect! Thanks!
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
ufa
Member
Posts: 75
Joined: Mon Feb 27, 2012 14:19

Re: [Mod] Simple Skins [0.6] [simple_skins]

by ufa » Post

TenPlus1 wrote:
Wed Nov 08, 2017 20:50
Each of the textures have the author name in the metadata and are from minecraftskins.com and free for use.

I tried to download and install a skin from this site, and got this in attached image
Why? Isn't it compatible?.
Attachments
screenshot_20200528_180630.png
screenshot_20200528_180630.png (462.06 KiB) Viewed 2024 times

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Simple Skins [0.6] [simple_skins]

by bosapara » Post

ufa wrote:
Thu May 28, 2020 21:07
TenPlus1 wrote:
Wed Nov 08, 2017 20:50
Each of the textures have the author name in the metadata and are from minecraftskins.com and free for use.

I tried to download and install a skin from this site, and got this in attached image
Why? Isn't it compatible?.
You must crop it from 64x64 to 64x32

Image
Attachments
skin.png
skin.png (42.11 KiB) Viewed 2024 times

User avatar
ufa
Member
Posts: 75
Joined: Mon Feb 27, 2012 14:19

Re: [Mod] Simple Skins [0.7] [simple_skins]

by ufa » Post

it worked, thank you

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Update to version 0.8

by TenPlus1 » Post

- Added character model and skin preview in formspec when enabled (minetest 5.4dev only)
- 'simple_skins_preview' setting added for above.
- Skins tab/button has translation added.
Last edited by TenPlus1 on Sat Nov 07, 2020 11:04, edited 1 time in total.

Bread
Member
Posts: 41
Joined: Tue Mar 17, 2015 14:29

Re: [Mod] Simple Skins [0.8] [simple_skins]

by Bread » Post

I would like to translate the tab title "Skins" into other language.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Simple Skins [0.8] [simple_skins]

by TenPlus1 » Post

@Bread - This has been added in latest update :)

Bread
Member
Posts: 41
Joined: Tue Mar 17, 2015 14:29

Re: [Mod] Simple Skins [0.8] [simple_skins]

by Bread » Post

Thank you TenPlus1. I confirmed it.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Updated to Version 0.9:

by TenPlus1 » Post

- Added Unified Inventory support (thanks Opvolger)

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Updated to Version 1.0

by TenPlus1 » Post

- Added skin limit in settings (default is 300)
- Added skin description sanitizer to stop formspec issues

Thanks to smk for ideas :)

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: [Mod] Simple Skins [1.0] [simple_skins]

by sirrobzeroone » Post

Hi Tenplus1

Quick question does this function do what I think it does ie return the width and height of the png file in pixels oor somethign else? i really could use this function in comboblock so I can auto-set base texture pack size - so if it does do that and if it's okay I'll borrow it place it in it's own file and clearly label as MIT code and credit yourself and Zeg9? Not sure who wrote/created it?

Should add this function to the handy code snips thread :).

Code: Select all

-- Read the image size from a PNG file. (returns width, height)
local PNG_HDR = string.char(0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A)
local function read_image_size(filename)

	local f = io.open(filename, "rb")

	if not f then return end

	f:seek("set", 0x0)

	local hdr = f:read(string.len(PNG_HDR))

	if hdr ~= PNG_HDR then
		f:close() ; return
	end

	f:seek("set", 0x13) ; local ws = f:read(1)
	f:seek("set", 0x17) ; local hs = f:read(1)
	f:close()

	return ws:byte(), hs:byte()
end
edit: i was checking out simple skins code to see if I could update my fly swim 3d armour mod to support it.

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: [Mod] Simple Skins [1.0] [simple_skins]

by TenPlus1 » Post

Yeah that's exactly what it does, was hoping to squeeze in minecraft 1.7 and 1.8 skin support if the model supported it at on point :)

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Skin Packs!!!

by TenPlus1 » Post

A few players have been asking for additional skin packs to save them adding skins manually, so here's a quick example mod for a skin pack to show modders how it's made (starting at character_32.png) to add your own collections :)
Attachments
simple_skins_pack1.zip
(7.17 KiB) Downloaded 62 times

isaiah658
Member
Posts: 168
Joined: Sun Jan 24, 2016 14:58
Contact:

Re: Skin Packs!!!

by isaiah658 » Post

@TenPlus1 Here are the textures we discussed to resolve any copyright issues with existing skins. I was going to do a pull request, but remembered I deleted my notabug account so I'm submitting it this way. I've included the updated meta files and license file. The only thing not included that you probably should do is to update the screenshot.png file at some point.
Attachments
Simple Skins Texture Redo.zip
(48.31 KiB) Downloaded 52 times

User avatar
TenPlus1
Member
Posts: 3715
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Update:

by TenPlus1 » Post

- All unlicensed skin textures replaced thanks to Isaiah658, many thanks :)
- Updated screenshot.jpg

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 26 guests