General overview
- Your ID consists of 6 digits in a hexadecimal system (e.g. 1fd68d) that can be represented as color i.e. your ID is literally your color
- Each character icon has a color and a range assigned to them
- Script will use your ID color to find closest character icon withing its color range
- Each assigned character icon has a distance, this number shows how "close" your ID color is to that character
- 0-2 - no perceptible difference
- 3-10 - slight difference
- 10-15 - more similar than different
- If ID color does not match any character's range, then random NPC icon will be assigned
- Each icon can have an alt which depending on the config will be assigned randomly or by distance of your ID (e.g. distance <= 5 assign alt1, distance <= 10 assign alt2, distance > 10 assign default)
- Script uses
cieDE2000
algorithm to find "closeness" of the colors because it is the most accurate algorithm that takes into account human perception of colors and not just raw numbers - Script only works for generals that have config files made for them
- Config contains images encoded as base64 and their color
- Icons are separated by 2 categories, characters and NPCs
Making a config
- Download editor https://files.catbox.moe/t9tobb.html
- Open in a browser
- Editor UI
Icons
- Use high quality sources for icons, preferably ripped icons from the game that everyone can recognize, from wiki or some official source, make sure they are of the same size
- Icons should be scaled to 20x20
- Crop them as close to face as possible
- Use Lanczos downscaling algorithm (check Useful Info for batch script)
Colors
- Colors should loosely relate to a character its being assigned to (general rule, if you can't make a guess looking at the color then this color does not match the character)
- Try to look for a "official" color, some games use unique color per character in promotion materials, if not possible then try to find most iconic but also keep in mind already existing colors, if you have an option to select blonde hair color but there are already 5 blonde characters then try selecting something else.
- Disable any filters that alter color perception on your screen like night mode/GPU filters/monitor built in "gamer" color scheme etc...
Groups
- In general it is recommended to group characters with <5 range (see FAQ for explanation)
- Its ok to not group characters if both of them have enough IDs on their own
- Try to adjust group color sensitivity so that it does not have weird unrelated colors and it does not have visibly much more colors than other groups
Alts
- You can select character/NPC and open
Alts
menu - Each alt can have its own name and
distance
- If you want to for alts to be selected randomly then leave
distance
at 0 - If you want to select distance thresholds to activate this alt then select with the slider
- In general getting distance ~1 is extremely rare so if you want to have a "rare" variant use at least 2
Name
- You can have same icon with different names e.g.
Bricky;Woody;Grassy
just use;
as a separator and random name will be selected
FAQ
>Why even use NPCs can't we have only playable characters?
Because unless you deliberately cover full range of colors with characters, you will have "dead" zones that does not match to any character, or you'd have to make character range so loose that it will start matching completely unrelated colors to it.
NPCs are here to fill all those unmapped gaps.
>What are the chances of getting X icon?
Depends purely on the config and how much characters/NPCs there are.
The thing is that some colors (perceptually) are more common than others, this is not an issue of how IDs are being generated, its a human perception of colors that is biased towards green.
As you can see a big portion of hue space ~(65-165) looks like green, while something like yellow and orange are just ~15 degrees each, naturally "green" characters will be more common.
>Why do you need to group characters
Because if we have 3 or more characters with the similar colors then one character can get stuck between 2 others and will have a much smaller chance of being selected.
This is rough visualization of why it happens, green circle is a range of each individual character, but character in the middle only have yellow range because his neighbors are consuming parts of its range making its chances of getting matched much lower.
Such characters should be grouped by a config author to create a blue range so all of them have an equal chance of being selected.
Useful info
Script for batch conversion of a full size icons into 20px icons. You need to install ImageMagick
Script for batch cropping and conversion of a full size icons into 20px icons.