Go to file
Jordan Irwin 3d65e647b6 Set executable bit for genpreviews script 2021-08-12 16:18:53 -07:00
doc Added screenshot of node 2014-07-05 16:51:14 -07:00
locale Add Spanish translation 2021-08-12 15:12:19 -07:00
textures Include default skin (CC BY-SA 3.0) by Jordach... 2021-08-12 14:14:30 -07:00
LICENSE.txt Update README & some other info 2021-06-07 13:23:22 -07:00
README.md Link to ContentDB & forum in README 2021-08-12 16:17:29 -07:00
TODO.txt Unregister skins if their texture is not cached 2021-08-12 15:39:31 -07:00
api.lua Check for armor.set_skin_mod method to set skin_mod to "wardrobe" manually 2021-06-08 16:55:54 -07:00
changelog.txt Increment version to 1.5 2021-08-12 16:02:11 -07:00
formspec.lua Suppress building placeholder if preview image not available 2021-08-12 15:56:28 -07:00
genpreviews.py Set executable bit for genpreviews script 2021-08-12 16:18:53 -07:00
init.lua Suppress building placeholder if preview image not available 2021-08-12 15:56:28 -07:00
mod.conf Increment version to 1.5 2021-08-12 16:02:11 -07:00
node.lua Add localization support 2021-08-12 15:11:25 -07:00
screenshot.png Add screenshot 2021-06-07 15:05:10 -07:00
settings.lua Add option to show preview images 2021-06-07 12:15:38 -07:00
settingtypes.txt Add option to show preview images 2021-06-07 12:15:38 -07:00
skins.txt Rename default skin to "Sam" 2021-04-22 02:00:05 -07:00

README.md

Wardrobe mod for Minetest

Description:

Forked from prestidigitator's wardrobe mod.

Provides a simple way to change skins on the default character mesh.

screenshot

Usage:

Changing skins is done via a "wardrobe" node, which brings up a form with skin names when you right-click on it. Choosing a skin instantly changes your character's appearance, and this change is kept if you log out.

Registering skins:

There are two ways to register skins:

  1. adding the filenames to skins.txt located in this mod's directory or the world path (see "Skins file syntax" below)
  2. using the wardrobe.registerSkin method:

wardrobe.registerSkin(texture, displayname)

  • texture: real filename of texture (e.g. "my_skin.png")
  • displayname: text shown to player (e.g. "My Skin")

Minetest recognizes skins located in a mod's textures sub-directory (e.g. <mod_path>/textures), <minetest_install>/textures, & textures installed to the current user's home directory:

  • on Linux/Unix-like systems, this is ~/.minetest/textures
  • on Windows, this is %AppData%/Minetest/textures (only if built with -DRUN_IN_PLACE=FALSE flag)

Skins file syntax:

A comment line starts with two dashes (like in Lua), but must be the only thing on the line:

-- This is a comment and has no effect.

Except for empty lines and comments, each line names a texture (file) and a name, separated by optional whitespace and a colon (:):

texture_file_name.png: My Skin skin_other_texture_file_name.png: Other Skin

The first string (e.g. "texture_file_name.png") will be passed to the Minetest API just like any other node or item texture. Generally it is simply the whole file name of an image in a mod "texture" directory or texture pack. The second string (e.g. "My Skin") is presented to the player in-world as the name of the texture. If this name is omitted, as in:

texture_file_name.png skin_other_texture_file_name.png

Then a name is constructed by removing any ".png" suffix any optional "skin_" or "wardrobe_skin_" prefix, and replacing underscores with spaces. So the above skins would be named "texture file name" and "other texture file name", respectively.

To remove a skin that was added elsewhere (for example, to remove a skin in a particular world), prepend a minus sign (-) to the line:

-skin_other_texture_file_name.png

This would remove the "skin_other_texture_file_name.png" skin no matter where it was specified or what name it was given.

Settings:

wardrobe.skins_per_page
  - determines how many skins are shown on each page
  - type:    int
  - min:     1
  - max:     8
  - default: 8

wardrobe.previews
  - determines if preview images are shown in form
  - type:    bool
  - default: true

Crafting:

Spoiler:

Key:

GW: any wood planks
GS: any stick
GL: any wool

Wardrobe node:

╔════╦════╦════╗
║ GW ║ GS ║ GW ║
╠════╬════╬════╣
║ GW ║ GL ║ GW ║
╠════╬════╬════╣
║ GW ║ GL ║ GW ║
╚════╩════╩════╝

Licensing:

  • Code: MIT
  • Textures by prestidigitator: CC0
  • character.png skin by Jordach (CC BY-SA 3.0) copied from player_api

Requirements: