Make a cosmetic move
Give a tag or colour a moving effect with one line, pick from the eighteen shipped animations, or write your own.
Add one line, animation: <id>, to a tag or colour and it is drawn moving in menus and in chat. Eighteen animations ship, and you can write more.
Players never pick an animation. It is a movement declared once and borrowed by cosmetics.
Animate a cosmetic#
Open the file
Edit lang/<language>/cosmetics/chat-colors.yml (or tags.yml, nick-colors.yml, rank-colors.yml).
Name the animation
Add animation: with an id from the table below to the entry.
Reload
Run /cca reload.
chat_colors:
aurora:
category: premium
name: '{primary}&lAURORA'
gradient: ['#00f260', '#0575e6', '#8a51c4']
animation: flow
icon: END_RODShadow colours, fonts and modifiers do not read animation:. An id nothing declares is not an error: the cosmetic is drawn in its own colour, standing still.
Check that it works#
Open the menu of that type: the entry moves while you look at it. In chat, every new line is a later frame of the same movement, but a line already sent never moves. A message that has been delivered cannot be repainted, so /cc preview and chat show one frame each.
The eighteen that ship#
| Ids | Kind | What it looks like |
|---|---|---|
rush, flow, drift (fast to slow) | gradient shift | the colours slide along the text |
shine, house | gradient shift | gold and white; your palette (follows colors.yml) |
spectrum, rainbow | rainbow | every hue in turn |
cycle_own, cycle | cycle | the whole text changes colour together (cycle uses your palette) |
ember, wave, sweep | wave | a brightness ripple runs along the text |
glow, pulse, breathe | pulse | the text breathes brighter and darker |
static, sparkle, flicker | flicker | characters dim at random |
Thirteen of them borrow the colour of the cosmetic that names them: a gradient is used as it is, a single colour moves with white, and no colour moves white and {primary}. So the same animation reads differently on every cosmetic. shine, cycle and house carry their own colours, and rainbow and spectrum ignore colour.
Going further#
Write your own animation#
Add an entry to lang/<language>/cosmetics/animations.yml:
animations:
shine:
type: gradient_shift
period: 60
colors: ['#ffd700', '#ffffff', '#ffd700']
intensity: 1.0period is the ticks for one full cycle (20 is one second). colors is optional. An entry that names an unknown type is reported in the console and skipped.
Make animations lighter#
One server timer drives every animation, set in config.yml:
animations:
tick: 2tick is the ticks between frames, 2 by default. Raise it to 4 and every cycle has half the frames, which halves the work and the redraws of open menus. 1 is smoother and costs more.
Technical details
| Key | What it does |
|---|---|
type | gradient_shift, rainbow, cycle, wave, pulse or flicker |
period | ticks for one full cycle; below 1 is read as 1; default 40 |
colors | stops, in the colour grammar; leave out to borrow the cosmetic's colour |
intensity | 0 to 1; default 1.0 |
Only gradient_shift and cycle read colors. wave, pulse and flicker dim the colour already there (intensity is the depth, or how many characters for flicker), and rainbow reads only intensity, as saturation. At intensity: 1.0, flicker dims about one character in six.
A cycle holds period / tick frames: flow (period 70) at tick 2 is 35 frames. A frame depends only on the animation, the colour, the length and the frame, so players share the work. The cache keeps up to 4096 frames and drops one five minutes after it was last read; /cca reload empties it.
Tags are cached before their animation is applied, so a player's tag keeps moving across chat lines. An animated rank colour skips the characters in rank-colors.keep (the brackets by default).
Something missing on this page? Tell us on Discord