@@ -168,9 +168,18 @@ Valid style modifiers are as follows:
---
-## Defined text colour modifier `{C:}`
+## Text colour modifiers `{C:}`/`{V:}`
-{C:colour-key} changes the color of the text, where *`colour-key`* is the **key** of a colour defined in [`G.ARGS.LOC_COLOURS`](#loc_colours-table).
+{C:colour} or {V:colour} changes the color of the text, where *`colour`* is one of the following:
+
+- the **key** of a colour defined in [`G.ARGS.LOC_COLOURS`](#loc_colours-table),
+
+- a 6-digit **RGB hex code** or an 8-digit **RGBA hex code**, or
+
+- the index of a custom colour provided as an entry in the [`loc_vars`](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) `vars.colours` table. See [Localization](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) for more details.
+
+> [!NOTE]
+> This functionality was added by Steamodded in 26.829.0. In older versions and in vanilla Balatro, `{C:}` only supports the first option, and `{V:}` only supports the third option.
### Examples
@@ -200,7 +209,7 @@ Valid style modifiers are as follows:
-## Defined background colour modifier `{X:}`
+## Background colour modifiers `{X:}`/`{B:}`
+
+{X:colour} or {B:colour} sets the background color of the text, where *`colour`* is one of the following:
-{X:colour-key} sets the background color of the text, where *`colour-key`* is the **key** of a colour defined in [`G.ARGS.LOC_COLOURS`](#loc_colours-table).
+- the **key** of a colour defined in [`G.ARGS.LOC_COLOURS`](#loc_colours-table),
-This modifier is usually combined with the text colour modifier to make
+- a 6-digit **RGB hex code** or an 8-digit **RGBA hex code**, or
+
+- the index of a custom colour provided as an entry in the [`loc_vars`](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) `vars.colours` table. See [Localization](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) for more details.
+
+> [!NOTE]
+> This functionality was added by Steamodded in 26.829.0. In older versions and in vanilla Balatro, `{X:}` only supports the first option. `{B:}` is not supported by vanilla Balatro; in older Steamodded versions, it only supports the third option.
+
+These modifiers are usually combined with a text colour modifier to make labels.
-This modifier uniquely strips all whitespace from the styled text, so text like {X:gold} W I D E {} is rendered as . This can be helpful for improving the readability of otherwise dense strings.
+The `{X:}` modifier uniquely strips all whitespace from the styled text, so text like {X:gold} W I D E {} is rendered as . This can be helpful for improving the readability of otherwise dense strings. The `{B:}` modifier instead leaves the styled text's whitespace unmodified.
### Examples
@@ -260,7 +325,7 @@ This modifier uniquely strips all whitespace from the styled text, so text like
@@ -309,108 +374,12 @@ This modifier uniquely strips all whitespace from the styled text, so text like
-
-
-## Variable/custom text colour modifier `{V:}`
-
-{V:index} changes the colour of the text to a custom colour provided as an entry in the [`loc_vars`](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) `vars.colours` table. See [Localization](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) for more details.
-
-*`index`* is the array index of the colour entry in the `vars.colours` table.
-
-### Examples
-
-
-
-## Variable/custom background colour modifier `{B:}`
->
-> [!NOTE]
-> This modifier is added by Steamodded and is not supported by vanilla Balatro.
-
-{B:index} changes the colour of the background to a custom colour provided as an entry in the [`loc_vars`](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) `vars.colours` table. See [Localization](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) for more details.
-
-*`index`* is the array index of the colour entry in the `vars.colours` table.
-
-Unlike the similar [Defined background modifier `{X:}`](#defined-background-colour-modifier-x), `{B:}` does **not** remove or change the whitespace of styled text, so displayed contents will remain the same as their input string.
-
-### Examples
-
-
@@ -481,7 +450,7 @@ Unlike the similar [Defined background modifier `{X:}`](#defined-background-colo
`{E:2}` applies a bumping animation to each letter in sequence.
-`{E:}` is incompatible with background modifiers `{X:}` and `{B:}`. If background modifiers are set, `{E:1}` will only show a pop-in effect with no motion, and `{E:2}` will be ignored.
+`{E:}` is fully compatible with background modifiers `{X:}` and `{B:}` *(Added by Steamodded)*. In vanilla Balatro, if background modifiers are set, `{E:1}` will only show a pop-in effect with no motion, and `{E:2}` will be ignored.
You can also apply a custom effect using [SMODS.DynaTextEffect](https://docs.smods.dev/Game%20Objects/SMODS.DynaTextEffect), in that case the modifier should be `{E:modprefix_key}`.
@@ -536,7 +505,10 @@ You can also apply a custom effect using [SMODS.DynaTextEffect](https://docs.smo
## Text hover tooltip modifier `{T:}`
-{T:tooltip-key} adds tooltip functionality to the text, which displays a small tooltip UI above the text when the text is hovered over. If `tooltip-key` can be the name of a key found in either `G.P_CENTERS` or `G.P_TAGS` or a description found in `G.localization.descriptions.Other`. *(Added in 1814a)* You can additionally use `T_set:set-key` to specify a set in `G.localization.descriptions` to pull from, and `T_vars:var1;var2;...` to replace any localizarion variables in the text.
+{T:tooltip-key} adds tooltip functionality to the text, which displays a small tooltip UI above the text when the text is hovered over. If `tooltip-key` can be the name of a key found in either `G.P_CENTERS` or `G.P_TAGS` or a description found in `G.localization.descriptions.Other` *(Added in 1814a)*. In the latter case, you can supply additional information as follows: {T:[key=tooltip-key;set=set-key;1=var1;2=var2;...]} *(Added in 26.829.0)*. The *set-key* is used to specify a set in `G.localization.descriptions` to pull from, and the variables *var1*, *var2*, etc. are used to supply any localization variables in the text.
+
+> [!NOTE]
+> The same effect can be achieved using {T:tooltip-key,T_set:set-key,T_vars=var1;var2;...} *(added in 1814a)*.
### Examples
@@ -562,7 +534,7 @@ You can also apply a custom effect using [SMODS.DynaTextEffect](https://docs.smo
```pas
- "Shop can have {C:perishable,T:perishable,T_vars:5;5}Perishable{} Jokers"
+ "Shop can have {C:perishable,T:[key=perishable;1=5;2=5]}Perishable{} Jokers"
```
@@ -575,7 +547,7 @@ You can also apply a custom effect using [SMODS.DynaTextEffect](https://docs.smo
```pas
- "{T_set:Blind,T:bl_arm}The Arm{}"
+ "{T:[key=bl_arm;set=Blind]}The Arm{}"
```
@@ -619,17 +591,30 @@ Vanilla Balatro only uses `s:0.8`, `s:0.85` and `s:1.1` text scales.
-## Text underline modifier `{u:}`
+## Text underline, strikethrough and overline modifiers `{u:}`/`{st:}`/`{ov:}`
>
> [!NOTE]
-> This modifier is added by Steamodded and is not supported by vanilla Balatro.
+> These modifiers are added by Steamodded and are not supported by vanilla Balatro.
+> *(Added in 26.829.0)*
> [!IMPORTANT]
-> This modifier requires the **lowercase** `u`, unlike other modifiers which must be UPPERCASE.
+> These modifiers must be **lowercase**, unlike other modifiers which must be UPPERCASE.
+
+### Basic usage
+
+{u:colour}, {st:colour} and {ov:colour} respectively add an underline, strikethrough, or underline to the text. The width of the line is 10% of the text's height.
+
+*`colour`* sets the colour of the line, where *`colour`* is one of the following:
+
+- the **key** of a colour defined in [`G.ARGS.LOC_COLOURS`](#loc_colours-table),
-{u:colour-key} adds an underline under the text.
+- a 6-digit **RGB hex code** or an 8-digit **RGBA hex code**, or
-*`colour-key`* sets the colour of the underline, where *`colour-key`* is the **key** of a colour defined in [`G.ARGS.LOC_COLOURS`](#loc_colours-table).
+- the index of a custom colour provided as an entry in the [`loc_vars`](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) `vars.colours` table. See [Localization](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) for more details.
+
+### Advanced usage
+
+By supplying a table to the text modifier, it is possible to customize the lines further: {u:[c=colour;s=size]}. *size* is a decimal value with a default of `0.1`. It indicates the thickness of the line relative to the height of the text. It is **required** to specify a *colour*.
### Examples
@@ -644,6 +629,32 @@ Vanilla Balatro only uses `s:0.8`, `s:0.85` and `s:1.1` text scales.
{u:red}Underlined text!
```
+
+
TBD
@@ -651,18 +662,27 @@ Vanilla Balatro only uses `s:0.8`, `s:0.85` and `s:1.1` text scales.
-## Text strikethrough modifier `{st:}`
+## Text outline modifier `{O:}`
>
> [!NOTE]
> This modifier is added by Steamodded and is not supported by vanilla Balatro.
-> *(Added in 1531zeebee)*
+> *(Added in 26.829.0)*
-> [!IMPORTANT]
-> This modifier requires the **lowercase** `st`, unlike other modifiers which must be UPPERCASE.
+### Basic usage
-{st:colour-key} adds a strikethrough line through the text.
+{O:colour} adds an outline to the text.
-*`colour-key`* sets the colour of the underline, where *`colour-key`* is the **key** of a colour defined in [`G.ARGS.LOC_COLOURS`](#loc_colours-table).
+*`colour`* sets the colour of the line, where *`colour`* is one of the following:
+
+- the **key** of a colour defined in [`G.ARGS.LOC_COLOURS`](#loc_colours-table),
+
+- a 6-digit **RGB hex code** or an 8-digit **RGBA hex code**, or
+
+- the index of a custom colour provided as an entry in the [`loc_vars`](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) `vars.colours` table. See [Localization](https://docs.smods.dev/API%20Documentation/Localization#loc_vars) for more details.
+
+### Advanced usage
+
+By supplying a table to the text modifier, it is possible to customize the outline further: {O:[c=colour;s=size]}. *size* is a decimal value with a default of `1.0`. It indicates the thickness of the outline. **Due to implementation constraints, large *size* values may lead to unexpected results.** It is **required** to specify a *colour*.
### Examples
@@ -674,7 +694,20 @@ Vanilla Balatro only uses `s:0.8`, `s:0.85` and `s:1.1` text scales.
@@ -977,13 +1010,9 @@ Vanilla Balatro only uses `s:0.8`, `s:0.85` and `s:1.1` text scales.
## Combinations
-Some style codes can be combined within one set of curly braces, like `{X:mult,C:white}`.
+Most style codes can be combined within one set of curly braces, like `{X:mult,C:white}`.
-- `{T:}`, `{f:}`, `{u:}`, `{button:}` and `{s:}` are compatible with all other modifiers.
-
-- Background modifiers `{X:}` or `{B:}` can be used in conjunction with text colour modifiers `{C:}` or `{V:}`.
-
-- Text motion modifier `{E:}` is incompatible with background modifiers `{X:}` and `{B:}` - if background modifiers are set, `{E:1}` will only show a pop-in effect with no motion, and `{E:2}` will be ignored.
+- All combinations that aren't explicitly listed here are valid.
- `{C:}` and `{V:}` are exclusive - if both are used, `{C:}` will be ignored.
@@ -991,6 +1020,8 @@ Some style codes can be combined within one set of curly braces, like `{X:mult,C
- `{element:}` does not interact with any other modifiers. Any additional modifiers will function as if `{element:}` wasn't present.
+- **In vanilla Balatro only**, the text motion modifier `{E:}` is incompatible with background modifiers `{X:}` and `{B:}` - if background modifiers are set, `{E:1}` will only show a pop-in effect with no motion, and `{E:2}` will be ignored. Modern versions of Steamodded fully lift this restriction.
+
### Examples
@@ -1526,4 +1557,4 @@ Steamodded automatically adds additional entries to `LOC_COLOURS` for all custom
- [SMODS.ConsumableType](https://docs.smods.dev/Game%20Objects/SMODS.Center/SMODS.Consumable)
- [SMODS.Suit](https://docs.smods.dev/Game%20Objects/SMODS.Rank-and-SMODS.Suit#api-documentation-smodssuit)
-which can be used as colour keys in the same way by `{C:}` and `{X:}`. When referring to custom Rarity, Gradient or Suit colours added by SMODS, the key must be prefixed with the [mod prefix](https://docs.smods.dev/API%20Documentation/Mod-Metadata#metadata).
+which can be used as colour keys in the same way by `{C:}`/`{V:}` and `{X:}`/`{B:}`. When referring to custom Rarity, Gradient or Suit colours added by SMODS, the key must be prefixed with the [mod prefix](https://docs.smods.dev/API%20Documentation/Mod-Metadata#metadata).