Jump to content

[TEMPLATE] Custom Player Animation


PanAzej
 Share

Recommended Posts

Took me a few days, but here it is:

image.thumb.png.5ae2093aa07210746ab974d879da8510.png 

20170306085823_1.jpg

x2.thumb.png.12f55ef7829acb4b298e8e0a80d8f858.png

x2.thumb.jpg.fc74cba1db7a4950e4d4fbecc54b3d4b.jpg

Download:

custom_player_animation_11112020.zip

 

I made this public, so that anybody can make their custom player animation.

Yes, you need all of those symbols at once for animation to work properly.

I coded a simple custom action, which allows you to test your custom animation with a simple right-click.

Since the action doesn't have any facing directions, you need to rotate the camera with Q or E.

Have fun.

Edited by PanAzej
Added "hairfront" symbol, added mount animation
  • Like 16
  • Thanks 4
Link to comment
Share on other sites

19 minutes ago, minespatch said:

I'm curious if this will work with tall characters(Maxwell size).

Hmm... You mean, like the DS-singleplayer Maxwell that you start the game nearby?

Because Maxwell in playable form uses the same animations as the rest of characters.

 

If you mean the first, then, well... I'm afraid I don't understand. Because if you want to make a new "Maxwell"-like character, then you can just make a brand new animation, without being limited by pre-defined symbols.

Or you want to make a tall, Maxwell-sized custom playable character? Then, good luck, because you'd have to redo every single animation. It's definitely doable, but would take a ton of work.

In my opinion not worth it, but hey, I'm a lazy bum.

Edited by PanAzej
  • Like 2
Link to comment
Share on other sites

I want to make a tall sized single-player Maxwell sized character. So, the first question. Mainly since the character I want to make would be tall compared to the smaller other ones. So yeah, sounds like a lot of work but I want to try anyways.

Link to comment
Share on other sites

7 minutes ago, minespatch said:

I want to make a tall sized single-player Maxwell sized character. So, the first question. Mainly since the character I want to make would be tall compared to the smaller other ones. So yeah, sounds like a lot of work but I want to try anyways.

Since Singleplayer has less animations, it should be easier. Though let's not talk about that Shipwrecked business, I don't know how to exactly touch that.

And I'm not exactly sure if this build will work in ol' Don't Starve. Try equipping hand-swappable item, a hat, a backpack and a one-man-band while this build is being used to see if everything works properly.

Most of the stuff should work, I'm not sure how hats will be handled though, since some layers were renamed, from what I remember... Well, you could just rename some layers to get it working anyways.

Oh, and you'll need more symbols to redo the animations. You can decompile some animations with ktools to get them, though.

Like I said, it'll be a crapload of work. Good luck!

Edited by PanAzej
  • Like 2
Link to comment
Share on other sites

Just now, minespatch said:

I just need a starting point but thanks for the heads up for what I want to look out for. I might try doing this twice(hence the reason I want to experiment) but it's worth the try.

I'd make a simple action for you, so you could test easily... But I don't know much about making actions for singleplayer.

I know a lot of stuff about multiplayer, though singleplayer - not so much.

Hmm... I remember seeing a character named "Wonnie Wames Wio", which added some new animations and stuff. You could look it up, maybe it'd help you a bit.

  • Like 2
Link to comment
Share on other sites

On 6.03.2017 at 3:55 PM, SuperDavid said:

This template contains all the stuff for an anim then tools, hats & armor don't go invisible, right? And dang this is awesome thanks man :D!

 

1 hour ago, makar5000 said:

So if I'm moving hands, for example, I'll need to moove the rest too?(Such as light and cane?)

Yeah, "animation parts" are called "symbols". Well, technically, the folders with graphics are "symbols".

All of those symbols are animated at all times in every in-game animation. They are just:

- using blank frames and get overriden with equipped item's symbol (That's why you use owner.AnimState:OverrideSymbol in onequip function in items - you replace a symbol in the player's build so that it becomes visible.)

- are being hidden (This one may not work with standard autocompiler though, let me know if it works or not. Hiding symbols is used by hats, for example.).

Still, Spriter kinda doesn't work properly while adding other graphics from a symbol, I may look into it sometime. (In some cases it ignores existing symbol and makes a new one, internally, in its *.scml. It wouldn't be a problem if not for the fact that pivot placement is crucial in making a player animation.) It can be fixed by hand though, through editing the *.scml file manually.

Here, have a dirty example animation (only one-sided).

swiggity.scml

<default> has no dignity confirmed

  • Like 3
Link to comment
Share on other sites

1 hour ago, PanAzej said:

 

Yeah, "animation parts" are called "symbols". Well, technically, the folders with graphics are "symbols".

All of those symbols are animated at all times in every in-game animation. They are just:

- using blank frames and get overriden with equipped item's symbol (That's why you use owner.AnimState:OverrideSymbol in onequip function in items - you replace a symbol in the player's build so that it becomes visible.)

- are being hidden (This one may not work with standard autocompiler though, let me know if it works or not. Hiding symbols is used by hats, for example.).

Still, Spriter kinda doesn't work properly while adding other graphics from a symbol, I may look into it sometime. (In some cases it ignores existing symbol and makes a new one, internally, in its *.scml. It wouldn't be a problem if not for the fact that pivot placement is crucial in making a player animation.) It can be fixed by hand though, through editing the *.scml file manually.

Here, have a dirty example animation (only one-sided).

swiggity.scml

<default> has no dignity confirmed

Am  I doing everything right? For now only one-sided.

customanim.scml

  • Like 2
Link to comment
Share on other sites

4 hours ago, makar5000 said:

Am  I doing everything right? For now only one-sided.

customanim.scml

Looks nice! Yup, all symbols seem to be alright, there's no new folders in the *.scml after lantern_overlay. 

Did you try compiling it and using in-game?

3 hours ago, Romanful said:

So in simpler terms, this mod lets custom made animations easier to make? I don't really understand 

Yes, basically. You can make an animation and quickly test it in-game with this template.

Otherwise you would have to do some research and chores like copy-pasting a lot of values from decompiled/recompiled files.

For example, to get hand slot item's positions I had to find how the default symbol is named in animation files, then make my own item symbol with that name, then use its graphics with player animations to decompile them and then get position values, so that I could copy-paste them to the template.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

2 minutes ago, SuperDavid said:

Can I ask a question? In your swiggty.scml which is very awesome btw you have stuff called swiggty_pre, swiggty_pst what are those for? Couldn't all the animation just be done in 1 thing like the swiggty animation :confused: & dang that animation's awesome :D!

"Swiggity" is a looping animation. "Swiggity_pre" happens while we're entering the state, while "swiggity_pst" plays while we're leaving the state.

There's also the fact, that switching symbols in Spriter without making a new animation is kinda glitchy at times, so I'd prefer to avoid that ;P

  • Like 2
Link to comment
Share on other sites

3 minutes ago, PanAzej said:

Alright, so Klei didn't update the autocompiler. Here's what you need:

scml.exe

Put this file in your Steam/SteamApps/common/Don't Starve Mod Tools/mod_tools directory.

And then compile the animation again.

What diffrents between this compiler, and the old one? Will it delete images in animations without need to replase them to blank imges?

  • Like 1
Link to comment
Share on other sites

9 minutes ago, makar5000 said:

What diffrents between this compiler, and the old one? Will it delete images in animations without need to replase them to blank imges?

The difference is: The old compiler didn't save layer names correctly. When you equip a handslot item, the game is told to hide "ARM_normal" layer (aka all symbols of the left arm not holding the item), and it can't do that if the layer isn't named exactly like this.

And no, you don't need to fix anything yourself in the animation. The problem is not on our end, but on the compiler's.

Edited by PanAzej
  • Like 1
Link to comment
Share on other sites

9 minutes ago, PanAzej said:

The difference is: The old compiler didn't save layer names correctly. When you equip a handslot item, the game is told to hide "ARM_normal" layer, and it can't do that if the layer isn't named exactly like this.

Thanks for your reply! Can I change the order of the images?

  • Like 1
Link to comment
Share on other sites

1 minute ago, makar5000 said:

Thanks for your reply! Can I change the order of the images?

Yes. You can change anything, but the names of layers/symbol names/default symbol's pivot placement. You can even add your own, custom symbols.

Edited by PanAzej
  • Like 2
Link to comment
Share on other sites

On 3/6/2017 at 8:18 AM, PanAzej said:

Took me a few days, but here it is:

spriter_shot.jpg

What is this abomonation?!

Although, thank you, this seems like it will be very useful in creating custom animations. Question though, are the head parts or any parts that are the same for all players synched here, or do all of them need to be animated separately?

  • Like 3
Link to comment
Share on other sites

2 hours ago, EuedeAdodooedoe said:

What is this abomonation?!

Although, thank you, this seems like it will be very useful in creating custom animations. Question though, are the head parts or any parts that are the same for all players synched here, or do all of them need to be animated separately?

I picked whatever body parts decompiled without bigger issues (aka, some parts had weird sizes after decompiling, Willow's torso for example).

Every symbol is on its own, Klei don't use bones or anything like that in their animations, so their animators have more freedom.

Though you can move more parts at once in Spriter, with no problems :V

Edited by PanAzej
  • Like 4
Link to comment
Share on other sites

  • Developer

@PanAzej, thanks for putting this together, looks great! I spent some time taking a look at Kzisor/Ysovuka's change, and I've merged that into the tools now, and just pushed that live to the tools on Steam.

So you should be able to remove the part about taking the custom scml.exe file.

  • Like 6
Link to comment
Share on other sites

3 hours ago, PeterA said:

@PanAzej, thanks for putting this together, looks great! I spent some time taking a look at Kzisor/Ysovuka's change, and I've merged that into the tools now, and just pushed that live to the tools on Steam.

So you should be able to remove the part about taking the custom scml.exe file.

Awesome, thank you!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...