Animation tips anyone?


#1

Im trying to train my animation skills, Im planning to make a mod with some additional animations. How can I make one with two character models involved? Im using Blender btw


#2

:eyes: that is very suspicious … :jubilant:
I hope your mod is SFW :merry:

Other than that, there are some really good threads dealing with that:

and this is very useful too:

These threads themselves contain more links and tips, etc… So you can start digging them :smiley:


#3

Making two entities interact is not easy, since both have to synchronize their AI in a sense.

If you’re planning to add animations for conversations, those are made individually (only one hearthling), then the game starts an animation before the other hearthling has finished their emote, and it looks like they’re really talking.

I think for the rescuing mechanic it’s really one hearthling carrying another one (done by code, their animations are individual). That one uses a state machine. Thankfully the carried hearthling can’t run away (that feature had so many bugs/edge cases in the past…).


#4

What Im planning is a mod that adds finishing moves in combat. I always found the way enemies just poof out of existence when they die kind of bland. So, instead of doing that, a northern footman with a claymore deflects an Orc’s axe attack, chops his left arm and then pierces him with his sword… and then the orc poofs out of existance. Or a Knight with a shield and mace, he punches the orc in the face with his shield, making him fall over and then crushes his chest in a mighty strike. Or a footman with an axe and dagger, he is agile and ninja - like (in my opinion), so he dodges the orc’s attack, rolls into his back, hits the back of his knee with the axe, making him kneel, and then drives his dagger into his throat.

Yeah, they are pretty gruesome (no blood, though), so I dont know if it fits with the whole PG clean aesthetic, and it is a very ambitious job for a first - timer, but I would like to begin modding these things.


#5

Hmm… it might be possible to change the AI action that performs the attack to play an animation in the target (although the whole combat system has many files, so maybe it’s not so easy).

The mobs run the death effect on their own when their health reach 0, and from that action you wouldn’t be able to know which weapon the hearthling was using (what if several hearthlings are attacking the same mob? probably you’d only want to play 1 animation).


#6

Yes indeed. So is there a way to make the animation happen when only one hearthling is attacking? (I mean is it written somewhere the amount of enemies a mob is taking hits from)

Appart from that, You have a very fair point. If I wanted different animations for different weapons wouldn’t it be necesary to give each weapon type a different value so the outcome is a different animation triggered?

Its gonna be tricky


#7

I mean, the cool thing about mods is that people can choose the ones they want (or not!) So even though it wouldn’t immediately fit SH’s atmosphere, etc… It would still be an awesome choice for those that want it :slight_smile: So don’t worry about that when modding :smiley: Just always make sure to warn people about the content of your mod (and, of course, don’t break any rules regarding obscene content, hate speech, etc…)

As for your idea, here’s an approach I’d think could be cool:

By tweaking the code a bit, perhaps it would be possible to create a “defeated” state for enemies - similarly to how hearthlings get “downed” instead of insta-killed. That defeated state could be random (have a chance to happen or not), and could even be modified by certain things (that would also require a lot more code, though), like attacker weapons, levels, etc…

once in the defeated mod, the mob could (for example) be like “dizzy” and standing and then a hearthling would “reserve” it (preventing others from attacking it) and perform a “finishing blow” on it. That way, you could control the positioning and which animation each part would play (and then have individual animations for both the entity being killed and the performer of the blow).

That’s an approach… but I gotta say…

This involves a lot of custom code…
and this would involve a lot of animations, especially if you want to give unique animations to different weapon combinations, etc…

So I’d classify that as an ultra-complex project.
But could be really awesome!


#8

I mean, I didn’t fix into the code (because I have no idea how to code) So I was basically playing with an idea. Until then, Guess Ill have to get an easier project, like hearthling reskins or something like that


#9

Well, yes. I wouldn’t recommend anyone to start with something that complex.

But on the other hand, Stonehearth is a great place to get started/learn a bit, it’s not overly complex and you can grasp things and start getting nice results in no time with patience, practice and dedication. I barely code before either and a year later I feel I’m in a much better place than a year ago (thanks to SH) :smiley:

But you could totally start with something similar, like just additional combat animations (instead of finishing moves with specific code)
There aren’t many animators around in the modding scene and focusing your skills on that could earn you a lot of potential – for code and such, you can always (for example) partner with someone else, so you’d provide the animations and ideas, etc… So don’t give up your idea, just write it down for now and maybe start simpler :slight_smile:


#10

What if…
There were hearthlings who had a “musician” trait…
And when Idle can trigger an animation of them playing an instrument according to their faction…
(Lyre for the ascendancy, Zither for Rayya’s Children and Flute for the Northern Alliance)
And nearby hearthlings can get a morale boost or letdown depending on wether they liked the song or not?

In terms of code how ambitious is that? I mean, The morale system seems straight forward, but Ill leave it to the ones who know how to code to judge


#11

Seems quite doable with very little (if any) extra code.

Trait: you can add the trait without code.

Playing: You can make the playing of the instrument be a skill, like a combat skill - but that works similarly to the buffs/AOE heals from the cleric. That covers pretty much everything: the effect (done via buff), the animation (played when using the skill), etc.

I think the only code you’d need would be to link the trait to the ability to use that skill (probably a little lua script to inject the ability & the ai into the character with the trait)


#12

Also I would need to configurate the area of music. (16/25/36 square tiles) The thing about making the playing a skill would make sense in a context of code, but I imagined it more like “something they just do” instead of the progessive system of XP that the combat tree implies. Simply an idle animation that has effects on hearthlings all around.


#13

But it would work like that.

I’m just saying that you can use that code, but wouldn’t work like a combat skill. It would be something they would do if on cooldown and if they perceive unbuffed friendlies nearby. It would play your animation, your sounds and have a range that you can easily determine. And anyone could do it regardless of xp or combat or anything like that :stuck_out_tongue: it just uses the code, doesn’t necessarily carry all that with it


#14

Cool, got it!

Let’s give it a go