Codename Logo Codename Logo

Creating Characters

APIWiki

Creating Characters

Creating characters thru the engine is not available yet, so you have to manually add the files yourself.
All you need is the spritesheet and an XML file for the data.
The spritesheet goes in ./images/characters/ and the XML file in ./data/characters.

Writing the XML file is pretty simple, here is what Dad's XML data looks like:

<character isPlayer="false" flipX="false" holdTime="6.1" color="#AF66CE">
    <anim name="idle" anim="Dad idle dance" fps="24" loop="false" x="0" y="0"/>
    <anim name="singUP" anim="Dad Sing note UP" fps="24" loop="false" x="-6" y="50"/>
    <anim name="singLEFT" anim="dad sing note right" fps="24" loop="false" x="-10" y="10"/>
    <anim name="singRIGHT" anim="Dad Sing Note LEFT" fps="24" loop="false" x="0" y="27"/>
    <anim name="singDOWN" anim="Dad Sing Note DOWN" fps="24" loop="false" x="0" y="-30"/>
</character>

There's a lot to unpack, but we'll go over the <character> node's properties first:

These are about all properties you can apply to the character node.
You can obviously apply more properties and access them in Scripts, see Character/Stage Scripts.

As for the <anim> nodes, they're pretty self-explanatory but here's a list of properties of them too:

Health Icons

In this engine, health icons have a bit more functionality than the ordinary engine. Such as:

Adding more than just a neutral and a losing icon.

Meaning that you can also add a winning icon (by making the icon image 450x150 instead of 300x150), but it doesn't stop at just the winning icon, because you can add as many icons as you like (for example pre winning or pre pre losing etc)
Keep in mind that the width of the icon image is determined by 150 * the amount of icons you want to have.

Script Event for when the icon changes it's icon state.

Using this event in a Global Script to run code for when the icon changes it's state: onHealthIconAnimChange.

Written by: Frakits & Ne_Eo & Nex_isDumb
Last updated: 2024-09-23