diff --git a/init.lua b/init.lua index 17dfa6b..c6d2931 100644 --- a/init.lua +++ b/init.lua @@ -1,6 +1,4 @@ -local mod_path = minetest.get_modpath(minetest.get_current_modname()) - -local mcl_skins_enabled = minetest.settings:get_bool("mcl_enable_skin_customization", true) +local mcl_skins_enabled = core.settings:get_bool("mcl_enable_skin_customization", true) local function process_skin(skin) local name = skin.texture .. ".png" @@ -11,11 +9,11 @@ local function process_skin(skin) end local function init_simple_skins() - local f = io.open(minetest.get_worldpath().."/skins.txt", "r") + local f = io.open(core.get_worldpath().."/skins.txt", "r") + local skins - local skins = nil if f then - skins = minetest.deserialize(f:read("*all")) + skins = core.deserialize(f:read("*all")) else -- shouldn't get here though :-/ return diff --git a/mod.conf b/mod.conf index 15e72ec..20e3b22 100644 --- a/mod.conf +++ b/mod.conf @@ -1,4 +1,4 @@ -name = skr +name = mcl_custom_world_skins author = covertiii -description = Override MC2 Skins +description = Load Custom VoxeLibre Skins from World Folder depends = _world_folder_media,mcl_player,mcl_skins diff --git a/readme.md b/readme.md index a84f627..cd7bf00 100644 --- a/readme.md +++ b/readme.md @@ -1,8 +1,8 @@ -# Simple Skins Redo (skr) +# VoxeLibre Custom World Skins -This is a skin mod for MineClone2. It allows server admins to upload and configure custom player skins in the world folder instead of a mod or game folder. This is so updates to mods or games won't overwrite custom skins. Created because of the popular demand of my kids :-). +This is a skin mod for VoxeLibre (formerly MineClone2). It allows server admins to upload and configure custom player skins in the world folder instead of a mod or game folder. This is so updates to mods or games won't overwrite custom skins. Created because by the popular demand of my kids for wanting custom skins on our home server. -This depends on `_world_folder_media` and MineClone2. +This depends on `_world_folder_media` and VoxeLibre. ## First time usage @@ -12,7 +12,7 @@ This depends on `_world_folder_media` and MineClone2. ## Adding Textures - 1. Upload custom 64x32 png texures to `/_world_folder_media/textures` + 1. Upload a 64x32 png texures to `/_world_folder_media/textures` 2. Create or update a skins.txt file in the the `` folder to configure the skins. Here's an example: ``` @@ -34,14 +34,8 @@ return { In texture = "name", the "name" must be the name of the texture file without the .png file extension. -## Using Minecraft Skins - -If you are getting MineCraft skins from somewhere like: https://www.minecraftskins.com/ you'll need to convert them into MineClone2 skins. Minecraft skins are 64x64 and MineClone2 only supports 64x32. - -Download the skin texture and you can convert with ImageMagick like this: - -`convert minecraft_skin.png -crop 64x32+0+0 mineclone2_skin.png` - -Then move the MineClone2 skin to `/_world_folder_media/textures/` and add an entry in `/skins.txt`. +## Using 64x64 Skins +If you are getting MineCraft skins from somewhere like: https://www.minecraftskins.com/ you'll need to convert them. Minecraft skins are 64x64 and VoxeLibre only supports 64x32. +You can convert using this tool: https://godly.github.io/minetest-skin-converter/ which will copy the lower half of the texture onto the texture.