• Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

In this release of Tablisknu, we are finally moving out of the beta version stage of Tablisknu with a new feature that I am excited to introduce to you now that I have been able to test and document it: blueprints!

A blueprint is a, well, blueprint, for a skin, meaning that you can create and modify a blueprint using the syntaxes Tablisknu provides and then use it to generate an actual skin that you can put on your players. I won't go too in depth here about the specifics of each of the syntaxes since they're already documented (though I hope to create some examples in the future for you guys to follow), but here's a brief explanation:

(Italicized names indicate the names in the documentation of syntaxes)

This update introduces two new types: the `blueprint` (Blueprint) type, and the `argb` (ARGB Color) type. The `blueprint` type is fairly self explanatory; `argb` is a new color type I introduced as skins support transparency in their second layer (including semitransparency), and you can also use transparency in the first layer when combining multiple blueprints. Normal Skript colors will be converted to `argb`s when used in these syntaxes; there is also a `transparent` literal for the fully transparent color, and you can also write hex codes using the syntaxes
code_language.skript:
rgb RRGGBB
where RR, GG, and BB are the hex values for the red, green, and blue respectively, and
code_language.skript:
argb AARRGGBB
where AA is now the alpha value, which specifies how transparent/opaque the color is (00 is fully transparent, FF = 255 is fully opaque).

To create blueprints, you can use the Create Blueprint effect:
code_language.skript:
create [(slim)] [(head|body|right arm|left arm|right leg|left leg) [(front|back|right|left|top|bottom) face]] blueprint from (file|url) %string% in %object%
to load a blueprint from an image file locally or online or from a skin, and you can also get a new (blank) blueprint using the Blank Blueprint expression:
code_language.skript:
blank [(slim)] [ (head|body|right arm|left arm|right leg|left leg) [(front|back|right|left|top|bottom) face]] blueprint

There are three effects for modifying blueprints:
Color Blueprint
code_language.skript:
color %blueprint% as %argb%
Recolor Blueprint
code_language.skript:
recolor %argb% in %blueprint% as %argb%
Overlay Blueprint on Blueprint
code_language.skript:
overlay %blueprint% on %blueprint%

The Body Part of Blueprint
code_language.skript:
[(second layer)] (head|body|right arm|left arm|right leg|left leg) [(front|back|right|left|top|bottom) face] pixels of %blueprint%
Face of Body Part Blueprint
code_language.skript:
(front|back|right|left|top|bottom) face pixels of %blueprint%
and Rectangle of Blueprint
code_language.skript:
pixels %number%, %number% to %number%, %number% (of|in) %blueprint%
expressions give you a blueprint containing a section of the specified blueprint; modifications to the new blueprint are also made to the original blueprint.

The Copy of Blueprint expression
code_language.skript:
blueprint copied from %blueprint%
gives you a new blueprint copied from the specified blueprint such that modifications made to the new blueprint won't be made to the original.

The settable Color of Pixel in Blueprint expression
code_language.skript:
color of pixel %number%, %number% (of|in) %blueprint%
allows you to modify blueprints at the pixel level.

Finally, the Retrieve Skin effect
code_language.skript:
retrieve [(slim)] skin from (file|url) %-string% [[with] timeout %-timespan%] into %object%
retrieve skin (from uuid %-string%|of %-offlineplayer%|from blueprint %-blueprint%) [[with] timeout %-timespan%] into %object%
has new syntax that allows you to retrieve an actual skin from a blueprint that you have created. Excluding the existing syntaxes not related to blueprints, the added syntax is
code_language.skript:
retrieve skin from blueprint %blueprint% [[with] timeout %-timespan%] into %object%

And that's it! I'm excited to see how you guys will use this new feature, and I hope that you'll enjoy it!
This beta version fixes an issue with the latest versions of Spigot 1.14.3, as well as the yellow and white full color skins.

There's also a secret new feature included that's already tested but I needed to release these bug fixes sooner than I was willing to document it, so maybe you'll go peeking into the source code to find out what it is :emoji_stuck_out_tongue:.
  • Like
Reactions: Ayham Alali
This update fixes an incompatibility issue with Skript 2.4 caused by depending on Skript's Color class which was changed in Skript 2.4. It also corrects the white full color skin to actually being fully white.
This update contains important bug fixes, most significantly (#1) an issue where a player leaving and joining caused stack traces in console, and (#2) an issue with recent versions of Skript 2.3 where using the Retrieve Skin effect would clear all local variables.
This update adds a couple of interesting features. First, the retrieve skin effect is now documented (totally a feature and not something that I thought was already done) and now you can actually retrieve player skins in offline mode as well (previously it would try to use the garbage UUID of the player, it now looks up the actual UUID from the player's name before retrieving the skin).

The most interesting feature of this update is the inclusion of full color skin presets.
`Full Color Skin`
code_language.skript:
%color% skin
maroon skin
navy skin
olive skin
This is basically a skin that's fully one color. This is intended to be used for tabs, if you don't have specific icons that you want to show, but you don't want to just use the boring default white tabs, you can now add some color to your tablist! You can use all of the normal colors of wool, as well as a few extra because the Spigot Javadocs tricked me into adding them.

There's also this:
`All Full Color Skins`
code_language.skript:
all full color skins
If you're too lazy to actually choose specific colors for your skins, you can just loop through this to assign colors to your tabs. As an example:
code_language.skript:
command /colorful_tablist:
    trigger:
        enable array tablist
        set {_skins::*} to all full color skins
        set {_i} to 1
        loop integers from 1 to 4:
            loop integers from 1 to 20:
                set icon of tab loop-value-1, loop-value-2 to {_skins::%{_i}%}
                add {_skins::%{_i}%} to {_skins::*}
                add 1 to {_i}
If you want to get fancy, you could randomly select colors from this expression or something like that, but I'll leave that to you.

Lastly, this update adds a warning when you're using syntaxes that can hide players in the tablist (this can be actual syntaxes to hide players in the tablist, or syntaxes that allow you to create an array tablist with dimensions different from the default 4x20). This is just to warn inexperienced users of Tablisknu about the possibilities of issues with skins. If you want to disable this warning, you'll have to set the 'display_tablist_syntax_warning' option in the config to false. If that option isn't in the config, you just have to add a line with it yourself.