mckaygerhard
df94cf3900
* tune up python original script and made a better one * document the new script and also provide option to parse arguments for separator * new script made in bash due error on following issues - * closes https://codeberg.org/minetest-stuffs/minetest-skindb-skindata/issues/3 * closes https://codeberg.org/minenux/minenux-skindb-webdb/issues/9
164 lines
6.6 KiB
Markdown
164 lines
6.6 KiB
Markdown
# minetest-skindb-skindata - miscelaneus files
|
|
|
|
SKIN database data for minetest.org - miscelaneous scripts
|
|
|
|
## Information
|
|
|
|
This directory contains some tools to help on skins build,
|
|
mostly generate meta txt files for each png skin and also
|
|
the generate preview png file for each png skin.
|
|
|
|
Skins mod used those files for minetest skin changing,
|
|
this data is full compatible with any kind of mod like
|
|
the `skindb`, `u_skindb` or `simple_skin`
|
|
|
|
## Technical information
|
|
|
|
Is based on now defunct skin database (http://minetest.fensta.bplaced.net),
|
|
that will be now at https://skindb.sourceforge.io/
|
|
|
|
Here there are two sections, one for scripts and the other about the files
|
|
that defines the texture and details of the skins. First section will
|
|
explain all the skins related formats, second one will provide scrips
|
|
to download from new site, convert formats and generate previews.
|
|
|
|
### player skin
|
|
|
|
Skin is a couple of two files, one is the png skin texture file that
|
|
will be put here in [../textures/ directory](../textures/README.md).
|
|
and the other is the meta txt information details that
|
|
that will be put at [../meta/ directory](../meta/README.md).
|
|
|
|
In following sections will be detailed those files.
|
|
|
|
#### filename meta txt
|
|
|
|
The defunct skin database (http://minetest.fensta.bplaced.net), uses the
|
|
a unique format, each line is as of `key = "string",` with a comma at the end.
|
|
if no value is given will be `unknow+<id>` and for license will be `CC-BY-NC-3.0`
|
|
|
|
* filename must match the file skin png file
|
|
* filename must start with "character" string
|
|
* filename format must be `character_<id>.txt`
|
|
* filename skin must be `../textures/character_<id>.png`
|
|
* file contents must be as:
|
|
* name : must be alphanumeric
|
|
* author : must be alphanumeric
|
|
* description : must be alphanumeric and maximun of 46 chars
|
|
* comment : must be alphanumeric and maximun of 46 chars
|
|
* license : must be alphanumeric and format must be as https://spdx.org/licenses/
|
|
|
|
```
|
|
name = "<name>",
|
|
author = "<author>",
|
|
description = "<description>",
|
|
comment = "<comment>",
|
|
license = "<SPDX licence identifier>",
|
|
```
|
|
|
|
For examples check [../meta/character_1.txt](../meta/character_1.txt) that must match
|
|
the corresponding skin file [../textures/character_1.png](../textures/character_1.png)
|
|
|
|
#### filename meta new
|
|
|
|
New sites simplifies the meta file with only lines to parse, this
|
|
format manage each line is as of `key` directly without a comma at the end
|
|
|
|
* filename must match the file skin png file
|
|
* filename must start with "character" string
|
|
* filename format must be `character_<id>.txt`
|
|
* **BUT filename skin is `character.<id>.png`**
|
|
* file contents must be as:
|
|
* line 1 : must be alphanumeric ans is assumed as the skin name only
|
|
* line 2 : must be alphanumeric and is assumed as the skin author only
|
|
* line 3 : must be alphanumeric and format must be as https://spdx.org/licenses/
|
|
|
|
```
|
|
<name>
|
|
<author>
|
|
<SPDX licence identifier>,
|
|
```
|
|
|
|
For example you can check the new recent skindb mod.
|
|
|
|
#### png texture character
|
|
|
|
The file follow the format of the template description provided by
|
|
AntumDeluge at the https://opengameart.org/content/minetest-character-template
|
|
|
|
Here are a source file to perform a skin [template.xcf](template.xcf)
|
|
|
|
![template_colormap.png](template_colormap.png)
|
|
|
|
![template.png](template.png)
|
|
|
|
### extra scripts
|
|
|
|
Those scripts helps for development ad generate extra files,
|
|
are originaly from first repository
|
|
|
|
#### skinsdb_download_terrastudios
|
|
|
|
Those scrips download skins from new trolltest site "skinsdb.terraqueststudios.net"
|
|
that uses a new format, we provide both ways to run thos scrips, the shitty python
|
|
and also a pure bash one that only uses few standar dependencies available in older or newer OSs.
|
|
|
|
* [skinsdb.terraqueststudios.net.sh](skinsdb.terraqueststudios.net.sh) bash
|
|
made, can be run with two arguments, first one is for format, `n` will use
|
|
the new skindb format, second argument `.` will use new skindb separator format,
|
|
by default will write meta information file as old format with `_` separator.
|
|
It requires [wget](https://www.gnu.org/software/wget/), [jd](https://jqlang.github.io/) and [codeutils](https://www.gnu.org/software/coreutils/)
|
|
* [skinsdb.terraqueststudios.net.py](skinsdb.terraqueststudios.net.py) ptyhon
|
|
made, can be run with two arguments, first one is for format, `n` will use
|
|
the new skindb format, second argument `.` will use new skindb separator format,
|
|
by default will write meta information file as old format with `_` separator.
|
|
It requires [request](https://requests.readthedocs.io/en/latest/) and [pybase64](https://github.com/mayeut/pybase64)
|
|
|
|
The bash script is made cos is a lie that those guys said that python is
|
|
all provided, also bash runs in older or newer systems, but more slower,
|
|
python one is more faster cos writes files using system lib but is
|
|
more delicate in such way.
|
|
|
|
**IMPORTANT** both files will write the skins starting from id 1 but as id 32,
|
|
this cos the first 32 ids are reserved for the simple_skins as minetest-skin-pack-1
|
|
|
|
#### generate_previews.sh
|
|
|
|
it will generate a mini crop file of the skin, basically
|
|
will reduce proportionaly to a 16x16 charactyer body.
|
|
this script is used to generate the previews needed by the mod
|
|
|
|
It requires `blender` with the 2.x `python` API (2.6x is tested)
|
|
This script can also use `pngcrush` and `imagemagick`
|
|
to reduce output size, it can enable them inside script and will
|
|
be written to `.previews/`
|
|
|
|
* [generate_previews.sh](generate_previews.sh)
|
|
|
|
Older script uses blender, it can be found browsing the
|
|
files at commit 3af03cae719b4e2c65856cf7eee71348d2907000
|
|
or using this link https://git.minetest.io/minetest-stuffs/minetest-skindb-skindata/src/commit/3af03cae719b4e2c65856cf7eee71348d2907000/misc/generate_previews.sh
|
|
or using this link https://codeberg.org/minetest-stuffs/minetest-skindb-skindata/src/commit/3af03cae719b4e2c65856cf7eee71348d2907000/misc/generate_previews.sh
|
|
|
|
#### set_meta.sh
|
|
|
|
Its used to create a simple dialog that will ask for details
|
|
of the png already found parsed as argument, and will
|
|
generate the meta data information txt file.
|
|
|
|
Means to be used locally and required `yad` gtk tool
|
|
|
|
* [set_meta.sh](set_meta.sh) to fill all the meta key but will be ask for png file and details
|
|
* [set_meta_missing.sh](set_meta_missing.sh) to fill missing keys, assume name and author exits
|
|
|
|
In next section the files of skins are explained
|
|
|
|
## LICENSE
|
|
|
|
* (c) 2011 AntumDeluge CC0
|
|
* (c) 2024 PICCORO Lenz McKAY CC-BY-SA-NC
|
|
* (c) 2014 Dean Montgomery (????)
|
|
* (c) 200X ? MirceaKitsune (WTFPL)
|
|
* (c) 200x ? Zeg9 (WTFPL): skin_previews.blend
|
|
* (c) XXXX of any author inside meta/*.txt
|