Western Press

Western Press

评价数不足
Custom Characters: Animation and Sound Variants
由 bandit1games 制作
Western Press characters support variations of each animation type (idle, shoot, wounded and die), as well as accompanying sounds. This guide explains how to implement them.
   
奖励
收藏
已收藏
取消收藏
Preface
For an overview on the entire character creation process, check out the video below. This guide assumes you're familiar with character creation, and are so bold as to demand more from it.

https://youtu.be/qhmBq9WP7xM
Introduction
So, you've made your character, and you love them. But sometimes you feel the two of you drifting apart. While playing a match, you win (as you always do), and their shoot animation begins.

"I've read this sentence 25 times." you practically yawn to yourself. You just want more. Is that so much to ask? NOT ANYMORE IT ISN'T!

Right, so let's get to it.

Importing Your Textures
Nothing has changed here. Be sure to define each <texture> you want to import. If you have JSON files to accompany, simply enter your pivotLeft and pivotTop. If you don't have JSON files, then you'll need to specify your frameWidth and frameHeight as well.

<texture name="idle.png" pivotLeft="14" pivotTop="43" /> <texture name="shoot 1.png" pivotLeft="18" pivotTop="58" /> <texture name="shoot 2.png" pivotLeft="13" pivotTop="52" /> <texture name="shoot 3.png" pivotLeft="11" pivotTop="65" /> <texture name="wounded.png" pivotLeft="34" pivotTop="41" /> <texture name="die.png" pivotLeft="52" pivotTop="41" />

Alright, so you've got all of your textures defined. Hold the line, stay with me.

Adding Multiple Sounds (Optional)
If you've made additional sounds to pair with your additional animations, add references to these in the sound section of your character.xml.

(This is not required for using multiple animations, so don't stress if you haven't created any.)

Import all of your sound files by creating a tag entry for each sound:

<shootSound name="Character Shoot 1" /> <shootSound name="Character Shoot 2" /> <shootSound name="Character Shoot 3" /> <dieSound name="Character Die" />

This will import three shoot sounds, and one die sound. Remember not to include the sound file's extension in the name. (Note: supported audio file types are: .wav, .mp3 and .ogg.)

Of course if you want to add more dieSounds, simply make additional entries for each sound file you wish to import. The same applies for woundedSounds.

Adding Multiple Animations
Now we're into the exciting part! Adding animation variants is as easy as creating additional animation entries in your character.xml file. For example:

<idle texture="0" /> <shoot texture="1" loop="false" actionFrame="9" shootSoundIndex="0" shootSound="1" /> <shoot texture="2" loop="false" actionFrame="5" shootSoundIndex="1" shootSound="1" /> <shoot texture="3" loop="false" actionFrame="12" shootSoundIndex="2" shootSound="1" /> <wounded texture="4" loop="false" /> <die texture="5" loop="false" dieSound="0" />

So, we're creating one idle, three shoots, one wounded and one die. (Note: This process is exactly the same for having variants of the other animations.) You should be familiar with everything here, however the enthusiasts among you might have noticed a cheeky extra tag in there, shootSoundIndex. The value you enter here references one of the sound files of that type that you've imported, in order, starting from 0. The default value is 0. So adding

shootSoundIndex="1"

means that this shoot variant will play the second <shootSound> that you defined earlier on. Remember, this is the index of the type of sound you're referencing. So if you had three shootSounds and three dieSounds, to reference the second of each would be:

shootSoundIndex="1"

and

dieSoundIndex="1"

It doesn't matter how many of the other types there are, you're just counting from 0 of the type you're after.


Once More, with Feeling
For the sake of completeness, here's our brand new character.xml, with three shoot variations. You can have as many variants as you'd like, and you can do this with any of the animation/sound types. So go absolutely mental. If you want. Also, characters can't be uploaded to the Workshop if they're larger than 5 megabytes. So just cool your jets a bit, alright? Calm down.

<?xml version="1.0" encoding="utf-8"?> <character guid=""> <name>Variant Character</name> <textures> <texture name="idle.png" pivotLeft="14" pivotTop="43" /> <texture name="shoot 1.png" pivotLeft="18" pivotTop="58" /> <texture name="shoot 2.png" pivotLeft="13" pivotTop="52" /> <texture name="shoot 3.png" pivotLeft="11" pivotTop="65" /> <texture name="wounded.png" pivotLeft="34" pivotTop="41" /> <texture name="die.png" pivotLeft="52" pivotTop="41" /> </textures> <shootSound name="Variant Character Shoot 1" /> <shootSound name="Variant Character Shoot 2" /> <shootSound name="Variant Character Shoot 3" /> <dieSound name="Variant Character Die" /> <animations> <idle texture="0" /> <shoot texture="1" loop="false" actionFrame="9" shootSoundIndex="0" shootSound="1" /> <shoot texture="2" loop="false" actionFrame="5" shootSoundIndex="1" shootSound="1" /> <shoot texture="3" loop="false" actionFrame="12" shootSoundIndex="2" shootSound="1" /> <wounded texture="4" loop="false" /> <die texture="5" loop="false" dieSound="0" /> </animations> <taunts> <taunt>You dummy.</taunt> <retort>Me dummy.</retort> <wounder>Which shoot did I use?</wounder> <wounded>Hurt dummy.</wounded> <winner>Dummy wins.</winner> </taunts> </character>

Epilogue
And so, just as the sun sets on us all, so too does it set on this guide. As even the most glorious of things must come to an end, eventually. (See: Watchmen: Ultimate Cut[en.wikipedia.org] and November Rain.)

As always, if you have any questions either jump on the forums or ask them here in this guide. We look forward to playing your characters over and over again to behold and stand in awe of the variations of your works!

2 条留言
daberoni 2018 年 2 月 6 日 上午 10:54 
what if you can't afford aseprite
Bruhl 2016 年 5 月 6 日 上午 6:15 
Great explanation, thanks!