-
Notifications
You must be signed in to change notification settings - Fork 18
Stamina Wheel Texture Format
For legacy texture format, see below.
The stamina wheel texture consists of one file, located at
paraglider/textures/gui/stamina_wheel.png. The texture is divided into prearranged tiles as highlighted below.
Tiles are grouped by rows, which represents the number of wheels. The first row is used on 1-wheel arrangement, the second row on 2-wheel, and the third row on 3-wheel arrangement. Two tiles on the top right corner are used for extra stamina wheel. (yellow stamina wheels gained from Enduring Elixir)
Each column of a row represents the specific part of a wheel, on different state.
- First column is used for background part.
- Second column is used for background part, where the wheel is "incomplete".
- Third column and onward is used for the indicator. This part of the texture is tinted with specific color to create the appearances like normal green color and blinking.
- Extra wheel has only background and the indicator, since extra wheels are always rendered complete and has only one layer.
One layer of wheel always equals 1,000 stamina. With default config options the most amount of stamina a player can get is 3,000, or 3 full wheels, but it is possible for a player to gain additional stamina with altered config options, or external max. stamina sources. Max. stamina exceeding 3 wheels will be displayed with "colored wheel" mode, in which the third (outermost) wheel will be tinted with predefined set of colors, along with a number indicator, to display 4 or more wheels equivalent of stamina value to player without drawing any extra wheels.
Let's suppose a player has 1,500 max. stamina, around 1,250 current stamina, and is on a state that drains stamina (such as using a Paraglider). The stamina widget will use the texture in the following way.
- Since the player has 2 wheels (more than 1,000, not exceeding 2,000), the second row of the texture will be used.
- For the background, the full part (1,000 ~ 1,500) will be drawn with the first column, while the incomplete part (1,500 ~ 2,000) will be drawn with the second. This results in a background wheel where only left side has a half wheel.
- For the indicator, the whole innermost ring is drawn with the third column, and about a quarter of the second ring is drawn with the fourth column. A blinking color is added into the end of indicator since the player is on a state that drains stamina.
Let's see the same example, but with a different texture. The texture below is from Stamina Wheel: Iron, an official alternative texture of stamina wheel widget. (CurseForge|Modrinth)
- Same as before, the second row of the texture will be used.
- For the background, the full part will be drawn with the first column, while the incomplete part will be drawn with the second. Same logic as before, but since the texture has special texture for incomplete part of the wheel, it is now drawn with two wheels, but only the left part open on the outer wheel.
- The indicator is drawn the same way as before.
Stamina wheel widget has a size of 20 * 20 (in standard pixels). Extra stamina wheel has a size of 10 * 10 (in standard pixels). The default texture, however, uses resolution 4x the standard pixel size.
The stamina wheel texture consists of 4 files, with locations as listed below. Note that all the textures are pure white; legacy stamina wheel widget doesn't distinguish background and foreground parts. Instead, they are constructed using the same base texture.
| Path | Description |
|---|---|
paraglider/textures/stamina/first.png |
First layer (innermost) of the stamina wheel |
paraglider/textures/stamina/second.png |
Second layer of the stamina wheel |
paraglider/textures/stamina/third.png |
Third layer (outermost) of the stamina wheel |
paraglider/textures/stamina/extra.png |
A layer of extra stamina wheel (yellow stamina wheels gained from Enduring Elixir) |
A stamina wheel is drawn by combining each individual layers. For each layer, the textures are tinted with specific color to create the appearances like normal green color, blinking, transparent background, etc..
The "max stamina" defined by the config will always equal the total amount of stamina of three whole wheels. Thus, it is necessary for the initial stamina to exactly equal one third of the max stamina, if one wants initial stamina to be displayed as one whole wheel.
One layer of wheel always equals 1,000 stamina. With default config options the most amount of stamina a player can get is 3,000, or 3 full wheels, but it is possible for a player to gain additional stamina with altered config options, or external max. stamina sources. Max. stamina exceeding 3 wheels will be displayed with "colored wheel" mode, in which the third (outermost) wheel will be tinted with predefined set of colors, along with a number indicator, to display 4 or more wheels equivalent of stamina value to player without drawing any extra wheels.
Although the stamina wheel uses hi-res texture, stamina wheel widget has a size of 20 * 20 (in standard pixels). Extra stamina wheel has a size of 10 * 10 (in standard pixels). Note that the placement of extra wheels can be in sub-pixel positions.