Jump to content

Tutorial: Adding a Custom Idle Animation


Recommended Posts

  • Developer

WARNING: This tutorial is a work in progress. It has been posted here to help get some feedback from people on adding new custom animations. Use at your own risk.

 

This tutorial will show you how to add a custom idle animation that will work with with any character in the game. 

 

This tutorial requires the following:

- The PC Public Preview version of the Don't Starve Steam Workshop Mod Tools

- The sample animation mod which can be found here.

 

1. The first step is to launch Spriter from the Don't Starve Mod Tools in Steam.

post-283016-0-64366200-1401924481_thumb.

 

2. Now open the 'sample_animation.scml' file in the 'mods/sample_animation' folder.

post-283016-0-87153300-1401924482_thumb.

 

3. You can now animate the character. Make sure not to change the default pivots.

post-283016-0-81591900-1401924483_thumb.

 

4. Now save your changes.

post-283016-0-39511400-1401924485_thumb.

 

5. Start the game. You should now see your new animation play whenever the character is idle.

post-283016-0-04278400-1401924487_thumb.

 

Happy modding! :-)

 

Link to comment
Share on other sites

  • Developer

Does the animation only show when the character is Idle? what about the walking animation?

The example shows you how to hook up a new idle animation. If you wanted to hook up a new walking animation you would need to change the script so that it hooks into the "walk" states.

Link to comment
Share on other sites

@Cheerio With your sample untouched,this is what i get.

 

...m/steamapps/common/dont_starve/data/scripts/util.lua:276: Could not find an asset matching anim/sample_animation.zip in any of the search paths.

 

I have uninstalled mod tools and re installed.Spriter just not exporting the zip?

What to do?

 

Re installed the game and all seems to be ok now.

Link to comment
Share on other sites

post-267484-0-27634100-1402035747_thumb.

 

It's happening~!

 

But... I'm gonna be little miss negative, and say... at this point... it's impractical, at best, and damn-near impossible at worst, to get a proper animation out of this.

 

 

We need a bone rig to be able to animate properly. My suggestion would be to place bones at the pivot points, for rotation to match up... but there's still an issue of disparity between the degree of rotation that will need to be applied to each bone for it to function as a workable rig...

Perhaps by providing us with a default rigged character, you could account for the needed offsets, since you would know for certain what the exact rotation values were?

We'll also need the different rigs set up for front, back, and side, of course.

 

What capacity will there be for adding to these animations - by that, I mean adding symbols and bones.

As mentioned, animating the character riding a mount - how would we go about adding an animation that required more than just the player character's art assets?

Furthermore, will we be able to extend the pool of art ourselves? If, for example, our animation called for a different facial expression than we have available, could we add something of that nature ourselves?

 

More of an extension of the previous paragraph, but of particular interest, is how creating custom tool action animation will work. The hammer, for instance, has a smear as part of the animation. This is included in the texture sheet, so it is symbol-swapping when the animation needs it...

How will we be able to animate things to work alongside the new character animations?

Link to comment
Share on other sites

All the stuffs right up dere

 

And, if you try to make character-specific animations for a character with sprites that are a different size (Making them with an scml)...

 

post-286034-0-37541400-1402037570_thumb.

 

Works with Wilson, just not my character. I just wanted a bow animation. ._.

 

this may just be me, though.

Link to comment
Share on other sites

And, if you try to make character-specific animations for a character with sprites that are a different size (Making them with an scml)...

 

attachicon.gifnobow.jpg

 

Works with Wilson, just not my character. I just wanted a bow animation. ._.

 

this may just be me, though.

It could also be a problem with the build for custom character making. It isn't supported by Krane tools either.

Link to comment
Share on other sites

  • Developer

attachicon.gifLittle Witch Amazed Eyesparkle.gif

 

It's happening~!

 

But... I'm gonna be little miss negative, and say... at this point... it's impractical, at best, and damn-near impossible at worst, to get a proper animation out of this.

 

 

We need a bone rig to be able to animate properly. My suggestion would be to place bones at the pivot points, for rotation to match up... but there's still an issue of disparity between the degree of rotation that will need to be applied to each bone for it to function as a workable rig...

Perhaps by providing us with a default rigged character, you could account for the needed offsets, since you would know for certain what the exact rotation values were?

We'll also need the different rigs set up for front, back, and side, of course.

 

What capacity will there be for adding to these animations - by that, I mean adding symbols and bones.

As mentioned, animating the character riding a mount - how would we go about adding an animation that required more than just the player character's art assets?

Furthermore, will we be able to extend the pool of art ourselves? If, for example, our animation called for a different facial expression than we have available, could we add something of that nature ourselves?

 

More of an extension of the previous paragraph, but of particular interest, is how creating custom tool action animation will work. The hammer, for instance, has a smear as part of the animation. This is included in the texture sheet, so it is symbol-swapping when the animation needs it...

How will we be able to animate things to work alongside the new character animations?

Yo should be able to hook up bones to the pivot points in Spriter. We haven't used bones for any of the animations in Don't Starve. I asked some of the animators about it and they said it's because they get more control and can work much quicker without bones. 

 

If you want to add an animation that works across all characters, you have to stick with all the symbols made available by the characters that ship with Don't Starve. 

 

If you want to add an animation that only works with a specific character, you could then add symbols to that character's build which you could then use in your custom animations.

 

As for the symbol swap for hand held items, we handle that by having a dummy symbol in the build that gets animated and the frame of the dummy symbol then gets matched to the frame of the handheld item. Then in game, we hide the dummy symbol and attach the pivot of the hand held item to the pivot of the dummy symbol. 

And, if you try to make character-specific animations for a character with sprites that are a different size (Making them with an scml)...

 

attachicon.gifnobow.jpg

 

Works with Wilson, just not my character. I just wanted a bow animation. ._.

 

this may just be me, though.

Could you upload your mod for me along with the scml with the new animation so that I could take a look?

Link to comment
Share on other sites

Yo should be able to hook up bones to the pivot points in Spriter. We haven't used bones for any of the animations in Don't Starve. I asked some of the animators about it and they said it's because they get more control and can work much quicker without bones. 

 

Spriter is really made to be used with bone rigs. In my experience, especially with the 'pro' version, you can work exponentially faster with a bone rig, and it saves you lots of time.

Your artists use Flash, as I recall, so it's probably more a matter of how they're used to working. It can be difficult to adjust workflow, when you have a system that works.

 

For Spriter, I would definitely encourage the "default" base/sample rig to be pre-rigged, for consistency/predictability.

 

If you want to add an animation that only works with a specific character, you could then add symbols to that character's build which you could then use in your custom animations.

 

Is adding those symbols as simple as putting the extra images in the Spriter project folders when building the character?

 

As for the symbol swap for hand held items, we handle that by having a dummy symbol in the build that gets animated and the frame of the dummy symbol then gets matched to the frame of the handheld item. Then in game, we hide the dummy symbol and attach the pivot of the hand held item to the pivot of the dummy symbol. 

 

It would be very helpful if all the dummy symbols were included in the base "sample" file. The dummy symbols can receive their own animation input, right? (Always loved the little bouncy backpack.)

Link to comment
Share on other sites

Yo should be able to hook up bones to the pivot points in Spriter. We haven't used bones for any of the animations in Don't Starve. I asked some of the animators about it and they said it's because they get more control and can work much quicker without bones. 

 

If you want to add an animation that works across all characters, you have to stick with all the symbols made available by the characters that ship with Don't Starve. 

 

If you want to add an animation that only works with a specific character, you could then add symbols to that character's build which you could then use in your custom animations.

 

As for the symbol swap for hand held items, we handle that by having a dummy symbol in the build that gets animated and the frame of the dummy symbol then gets matched to the frame of the handheld item. Then in game, we hide the dummy symbol and attach the pivot of the hand held item to the pivot of the dummy symbol. 

Could you upload your mod for me along with the scml with the new animation so that I could take a look?

Could I send it via PM because for some reason I'm irrationally uncomfortable with posting stuff like this in a public thread? Seriously, I have no idea why. It just stresses me.  Sorry for the late reply. Didn't get a notification and kind of forgot.

Link to comment
Share on other sites

Could I send it via PM because for some reason I'm irrationally uncomfortable with posting stuff like this in a public thread? Seriously, I have no idea why. It just stresses me.  Sorry for the late reply. Didn't get a notification and kind of forgot.

I'm curious, did you manage to get this to work with custom characters?

Link to comment
Share on other sites

I have make a new animation to replace running animation for my character (character create with this template)... the animation work in game when I move my character but the holding hand(the hand hold weapon, torch...) didn't hide,  it hide the current wearing armor and hat..

like this..

koB3igT.jpg

 

 

Is there a way to fix this?

Link to comment
Share on other sites

Spriter is really made to be used with bone rigs. In my experience, especially with the 'pro' version, you can work exponentially faster with a bone rig, and it saves you lots of time.

 

OMG Dana is so right. I'm trying ( and damn hard for three months!) on making one of my characters, as a lot of the forum gurus know.  I am quite new. 

So naturally I ran into "new guy" problems.

I went to the Spriter forums to look up some tutorials. Each and every one points to the use of bone rigs. and how easy it is to use them, to rotate, to move body parts, etc. While it, at least to me, is a nightmare. A living giant flesh eating bacteria sort that collects taxes and calls me about outdated credit relations. 

 

SO yah, I agree with DanaAdams, bones support would be much appreciated. I'll make an idol for anyone who makes a pig build with bones in it to, I swear, Gold and everything. 

Link to comment
Share on other sites

@RedRock911,

 

The problem is that you can't add bones to decompiled animations. Because bones have a parent-child relationship with the sprites connected to them, the sprites positions(as well as other attributes) are based on those of the parent bone. Trying to add a bone after a bunch of keyframes have already been added results in the kind of thing that my avatar icon displays on my profile page.

Link to comment
Share on other sites

@RedRock911,

The problem is that you can't add bones to decompiled animations. Because bones have a parent-child relationship with the sprites connected to them, the sprites positions(as well as other attributes) are based on those of the parent bone. Trying to add a bone after a bunch of keyframes have already been added results in the kind of thing that my avatar icon displays on my profile page.

That's a shame. Almost every tutorial on the Spriter site seems to bring up how easy it is to animate with that system. Would flash be a better program to use?

Link to comment
Share on other sites

@RedRock911,

 

Flash is certainly a more robust program, that's for sure.  It would even allow you to convert Klei's animations back perfectly, without having the weird glitchyness you get with converting to spriter ( since Flash supports 2d transformation matrixes, you can do things like skew (imagine setting a block of Jello on a table and pushing the top in one direction.  See this link -- think about how you'd transform a square sprite into any of those shapes that aren't "rectangly"(that needs to be a word)... exactly, you can't!)

 

The downside is you'd have to figure out how to compile your flash animations into Klei's own format.  I'm unsure if they've released their own internal tools for that.  It's also 'spensive.

 

 

Bones do make it very easy to animate-- but I mean, that's just it.  It makes it easy to animate, not easy to inject bones into something that is already animated.  I used bones in 1 or 2 places in my treeslacoil mod, like for the spherical thing that pops out of the magnechest,  That ball and the rod it's connected to didn't exist in the animation I based it on, though(the chest open animation), so I didn't have much of a problem there.  I'm not gonna lie though, Spriter can get really frustrating at times.  It's certainly got a number of bugs. (Ever tried to select and move several timeline(non-keyframe) frames at once?  Good luck with that!)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...