Custom Portraits - EverestAPI/Resources GitHub Wiki
Create a file named Portraits.xml in your Graphics folder (see here for how to set that up).
Note
If your Portraits.xml file is not in the top level of the Graphics folder (giving it a unique path is recommended for maps) then it needs to be added to your map's metadata.
This will replace the vanilla Portraits.xml file so include the vanilla portraits in your own one if you plan to use them.
Follow this example, replacing all instances of {yourportrait} (including {}) with the name of your portrait:
<?xml version="1.0" encoding="utf-8" ?>
<Sprites>
<portrait_{yourportrait} path="{yourportrait}/" sfx="{yourportrait}" textbox="{yourportrait}">
<Center />
<sfxs>
<normal index="1"/>
</sfxs>
<Loop id="idle_normal" path="normal" delay="0.1" frames="0"/>
</portrait_{yourportrait}>
</Sprites>portrait_{yourportrait} corresponds to YOURPORTRAIT in [YOURPORTRAIT right normal]
-
pathindicates the folder within the Portraits atlas (Graphics/Atlases/Portraits/), not includingGraphics/Atlases/Portraits/Make sure to include the/at the end! -
sfxrefers to the audio event used, and is appended toevent:/char/dialogue/ -
textboxis the path to the textbox texture relative toGraphics/Atlases/Portraits/textbox -
phonestaticcan be either "mom" or "ex" (Optional) -
glitchycan be "true" or "false" (Optional)
the Center tag is recommended to center the portrait in the textbox
There are three different prefixes that can be used for animation ids:
-
begin: played before the idle or talk animation -
idle: played when not talking -
talk: played when talking
Each group of animations (or expression) also needs an assigned index in the sfxs element, which is used as the dialogue_portrait audio parameter
The dialogue_end audio param will be set to 1 if the audio is ending.
TextBoxes will also use an additional _overlay sprite if present.
MiniTextboxes will use the associated _mini sprite if present.