-
Notifications
You must be signed in to change notification settings - Fork 13
Resource pack syntax
Since symbolchat 1.2.0 the symbol tabs and the symbol fonts can be modified using resourcepacks. This page contains information on how that works. You can also look at the data of the built in tabs and fonts for reference.
Creating a custom symbol tab requires creating a file in assets/[namespace]/symbol_tabs/tabname.json. The basic syntax looks like this:
{
"icon": "π",
"order": 1,
"symbols": [
"[namespace]:[symbols file]"
]
}-
iconIcon of the tab. If this is a single codepoint/symbol it is directly used as the icon. Otherwise it's treated as an identifier pointing to a gui sprite texture -
orderSymbol tabs are sorted in ascending order -
type(Defaults to"symbols") When set to"kaomojis", makes the buttons in the tab occupy the whole width -
search_bar(Defaults tofalse) When true, the tab has a search bar -
symbols: Thesymbolslist references identifiers of symbols files located inassets/[namespace]/symbols/[symbols file].txt. All symbols (more specifically, all codepoints) inside that file will be added to the tab. If the symbols consist of more than one codepoint (like for kaomojis), the file can instead be specified with a type like this:
{
"split": "line",
"id": "[namespace]:[symbols file]"
}Where split can be "codepoint" (default) or "line".
Using the predefined symbol list identifiers symbol_chat:favorites and symbol-chat:custom_kaomojis will always contain the favorited symbols and custom added kaomojis from the config.
Fonts are defined in assets/[namespace]/symbol_fonts with the following format:
{
"order": 220,
"mappings": {
...
}
}order defines the sorting in the font dropdown.
mappings defines the key value pairs how characters will be changed. This can have different formats:
- Single codepoint mapping, either with string or a codepoint integer on the right side:
{
"A": "π°",
"B": 120433, // Decimal of hex 1D671 which is the codepoint number of π±
"W": "VV" // Mapping single codepoint V to conver to multiple
}- Multiple codepoints in two strings (Must have same codepoint length)
{
"ABCDEFGHIJKLMNOPQRSTUVWXYZ": "π°π±π²π³π΄π΅πΆπ·πΈπΉπΊπ»πΌπ½πΎπΏππππππ
ππππ"
}- Codepoint range (At least one side has to have a defined length, the other side can be open ended)
{
"A..Z": "π°..", // Left side defines length
"a..": "π..π£", // Right side defines length
"0..9": "πΆ..πΏ", // Both sides define length (must match)
"0..": "πΆπ·πΈπΉπΊπ»πΌπ½πΎπΏ", // Also possible
"0123456789": "πΆ..πΏ" // Works too
}- List
{
"0..9": ["zero","one","two","three","four","five","six","seven","eight","nine"]
}