This repository was archived by the owner on Mar 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Creating A Character
swordcube edited this page Dec 11, 2022
·
4 revisions
File Structure:
assets/your-mod/data/characters/your-character
- config.xml
- script.hx
- spritesheet.png
- spritesheet.xml
assets/your-mod/images/icons
- your-character.png (Has to be an even grid, having a grid of icons that's like: 180x150 for each icon won't work correctly)
This method allows you to make characters with XML data. You can combine the script method with this to achieve more things.
Example XML:
<!DOCTYPE plasma-character >
<character spritesheet="spritesheet" is_player="false" sing_duration="6.1" icon="dad" flip_x="false" dance_steps="idle" >
<animations>
<animation name="idle" anim="Dad idle dance" indices="" fps="24" looped="false" offsetX="0" offsetY="0" />
<animation name="singLEFT" anim="Dad Sing Note LEFT" indices="" fps="24" looped="false" offsetX="-9" offsetY="10" />
<animation name="singDOWN" anim="Dad Sing Note DOWN" indices="" fps="24" looped="false" offsetX="0" offsetY="-30" />
<animation name="singUP" anim="Dad Sing Note UP" indices="" fps="24" looped="false" offsetX="-6" offsetY="50" />
<animation name="singRIGHT" anim="Dad Sing Note RIGHT" indices="" fps="24" looped="false" offsetX="0" offsetY="27" />
</animations>
<global_pos offsetX="0" offsetY="0" />
<scale x="1" y="1" />
<scroll x="1" y="1" />
<color r="175" g="102" b="206" hex="" />
<camera offsetX="0" offsetY="0" />
</character>character node:
- spritesheet (Optional) - The name of the spritesheet the character should use. Defaults to "spritesheet"
- is_player - Determines if this character is a player character or not. (Defaults to
false) - sing_duration (Optional) - Determines how long this character should hold a note for. Defaults to
4. - icon - The health bar icon used for this character.
- flip_x (Optional) - Flips the sprite horizontally. Defaults to
false. - dance_steps (Optional) - A list of animations the character loops through when bopping to the beat of the song.
-
animationnode: -
- name - The name of the animation.
-
- anim - The name of the animation in the spritesheet.
-
- indices (Optional) The specific frames for this animation.
-
- fps - The framerate of the animation.
-
- looped - Determines if this animation loops or not.
-
- offsetX - The X offset of this animation.
-
- offsetY - The Y offset of this animation.
I'm gonna write this later