-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,41 @@ | ||
# Creating Characters | ||
|
||
gggggggod there's fucking NOTHING to note here. | ||
Creating characters thru the engine is not available yet, so you have to manually add the files yourself.<br> | ||
All you need is the spritesheet and an XML file for the data.<br> | ||
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: | ||
```xml | ||
<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: | ||
- ``sprite`` determines which sprite to load, if you have a spritesheet with a different name. | ||
- ``isPlayer`` determines whether your character is a player character or not *(for example, boyfriend is a player character)*. | ||
- ``x`` and ``y`` determine the character's position in the stage. *(keep in mind that stages can override these values)* | ||
- ``scale`` determines the scale of the character. | ||
- ``camx`` and ``camy`` adjusts the character's camera point. | ||
- ``flipX`` can be used if your sprite is facing the wrong direction. | ||
- ``antialiasing`` determines if your sprite should use antialiasing or not. | ||
- ``gameOverChar`` defines the separate character to be used on the Game Over screen *(for example bf-dead)* | ||
- ``icon`` can be used if your character icon has a different name. | ||
- ``color`` defines the color of it's Health Bar part. | ||
- ``holdTime`` defines how many steps it should wait until resuming to it's idle. | ||
|
||
These are about all properties you can apply to the character node.<br> | ||
You can obviously apply more properties and access them in Scripts, see <a href="../Scripting/PlayState Scripts/Character or Stage Scripts.md">Character/Stage Scripts</a>. | ||
|
||
As for animation nodes, they're pretty self-explanatory but here's a list of properties of them too: | ||
- ``name`` defines the internal name of the animation *(used for scripting)* | ||
- ``anim`` is the prefix for finding the animation in the spritesheet. | ||
- ``indices`` indicates which frames to play from the previously found frames. | ||
- ``type`` determines the type of the animation. either ``beat`` or ``loop``. | ||
- ``fps`` is the framerate of your animation. | ||
- ``x`` and ``y`` are the animation offset. *(offset is only applied when the animation is played)* | ||
- ``forced`` whether or not to force animation playback while a different one is already playing. | ||
- ``loop`` to make your animation loop. |