Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TETR.IO Connected Skin Generator

Generate a Tetr.io connected skin from minimal input as possible. You only had to draw each piece of mino and garbage to generate connected skin.

You're still required to use TETR.IO PLUS to be able to use skins.

Tutorial Video

https://youtu.be/4WbTkecoOTM?t=97 (starts at 1:37)

Usage Guide

If you don't fancy installing python yourself or are unfamiliar with python, you may try using one of the executables that are available on the releases tab, just run the executable, GUI will then appear, simple as that.

Linux was packaged on WSL using pyinstaller and never tested before since I don't use any linux os, I can't guarantee if this works for you.

Otherwise follow along this guide.

Running from source

Requirements

Installation

After you downloaded python, make sure to check Add Python to PATH before installation.

After python is installed on your machine, open command prompt and type:

pip install pillow

And then, download this repository as zip. If you don't know how to

Usage

Assuming you already created your skin from the template that I provided and have installed python, simply type:

[windows] python main.py
[linux]   python3 main.py

on the current folder where this script is located. A GUI will then appear.

Name Keys

Skin files should be named correctly in order for the script to detect and use them, it only support .png and .jpg formats. You can find example skin for each method in the example_skin folder.

Here are the list of name keys.

Method Essential Optional Input Output Notes
Universal s t o i singular 3x3 input chunk.png garbage 3x3 will be used for garbage, otherwise, it will use o and i.

All images must be symmetrical and identical, garbage is not required to be identical but requires symmetrical

After the image is generated, you had to color and merge the result/garbage on your own.

Singular will be generated if you didn't provide one.
Standard s z l j t o i gb gbd u_disabled s_singular z_singular l_singular j_singular t_singular o_singular i_singular gb_singular gbd_singular input result_1x.png u_disabled is a chunk that was generated by the Universal or Mixed method, or through the chunk disabled generation option, you can use this result for the disabled, otherwise, one will be generated depending on the choice that you picked.

Each pieces/images must be symmetrical.

Each minos may have different variation.

Singular will be generated if you didn't provide one.
Mixed s1 s2 t1 t2 t3 t4 o1 i1 i2 3x3_1 3x3_2 3x3_3 gb_singular
singular
input result_1x.png garbage 3x3 and gb_singular will be used for garbage, otherwise, it will use o i and/or singular.

Symetric is not needed for this one, but identical is required.

Singular won't be generated if not provided.
Advanced s1 s2
z1 z2
l1 l2 l3 l4
j1 j2 j3 j4
t1 t2 t3 t4
o1 o2 o3
i1 i2
gb1 gb2 gb3
gbd1 gbd2 gbd3
t5 t6 t7 t8 t9 t10 u_disabled s_singular z_singular l_singular j_singular t_singular o_singular i_singular gb_singular gbd_singular input result_1x.png u_disabled is a chunk that was generated by the Universal or Mixed method, or through the chunk disabled generation option, you can use this result for the disabled, otherwise, one will be generated depending on the choice that you picked.

Symmetric and identic are not needed for this method.

t5-10 are used for corner turn for T-shape, it won't be generated if not provided.

Singular won't be generated if not provided.

GUI info

Generate

Generate skin based on the skin location and options that you selected.

Merge

Merge result.png and disabled.png, by default this uses export location instead of the skin location. This is optional for Standard and advanced as you can provide u_disabled instead.

Skin Generation Method

By default, this uses automatic, which guess what kind of skin you are trying to export by preserving file names. Refer to the name keys for more info on each method.

Disabled Generation

Wherever to generate or use flat color for disabled mino. This option is ignored for universal, mixed, standard, and advanced (if you have u_disabled file).

Export 1x

Small QOL as TETR.IO PLUS fails to import if you try to drag and drop the 2x file.

Help

If you require further assistance, you can contact me through my discord (K·#4963) or any social media that I had.

to-do

  • Possibly a support for GIF format.
  • Possibly a web.
  • A generation method from just a singular block

Notes

GUI will autofill the Skin location if there's only a single folder inside the directory. This, however, does not have checks unlike the CLI version.

Some part of the skin were intentionally left empty because only several portion are visible when rotated/skimmed.

I was using Python 3.8 and Pillow 9.1.1 for this script, result might differ if you use a lower version than this. This isn't the case if you used the executable.

Changelogs

July 2 2022:

  • Added Mixed example skin
  • Added an example skin of ghost minos
  • Add support for singular garbage for Mixed method
  • Bug fixes: ValueError: bad transparency mask when tried to paste RGB on RGBA images, oversight on Mixed method checks

July 1 2022:

  • Added Mixed skin generation method
  • Added Advanced skin generation method and example skin
  • First major release as all essential features have been added
  • Code improvement
  • Bug fixes: checks will start from longest name first as it conflict with others, double append that caused by automatic method which result in double s name keys

June 29 2022:

  • Added GUI. Since I'm using WSL, I can no longer try to run the linux executable
  • Added Universal skin generation method

June 28 2022:

  • Attempted cross platform support (windows/linux)
  • Bundled an executable for windows and linux, both were tested and works

June 27 2022:

  • Initial release

About

Generate a Tetr.io connected skin from minimal input as possible

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages