-
-
Notifications
You must be signed in to change notification settings - Fork 49
Adding Custom Characters
Taken from here.
Custom Characters: Add the png and xml files of your character in ‘assets/shared/images’ before this will work. (You can put them inside a folder if you want) OR you need to create a new week folder ‘assets’ and add the png and xml files.
Go to characterList.txt in ‘assets/preload/data’ and add your new characters name (lowercase).
Open source/Character.hx and copy a character's case statement, change it to your new character's name and change the location to your sprite sheet and xml file name. Example:
Change the animation names accordingly to your xml file. The animation's name is the one in the second space inside the brackets like “Dad idle dance”. Or vice versa and make the xml animations names the same as the ones in Character.hx.
Change the offset if your character is jiggling around the first values is the x axis and the second is the y axis.
Go to HealthIcon.hx and add a new line for your new character. Example:
(‘monster-christmas’, <- that's the name of the character. (lowercase) ‘[19,20 ]’, <- that's the location of the icon in ‘assets/preload/images/iconGrid.png’ the icons are ordered by starting at 0 and going from left to right. To add a new icon in iconGrid just draw one aligned to the other ones
OR use adobe animate, export the character's head and copy it into the iconGrid. The rest of the line of code leave it like how you copied it.
Now compile the game and open the song and press ‘7’ and go to the ‘Song’ tab and change the character you want to your new character. Press ‘Save’ to save the changes in the json file and replace the old json in your songs folder in ‘assets/data’ with the new one you saved.