How works the Door animation?

I always asked myself how the hell works the animations in this game and how i can add them to models.

When i search the files in the original .smod file i only see a static model (the doors for example) but i can’t find the code or the animated file.

Remember that issue you had with the ghost duplicating your models? It is the same thing here.

You will notice that at the top you have a “mixin”:"…" section. That basically copies those files into the current code. So if you are going to repeat the same thing for multiple objects, you can create a single file with all the shared info, and then add that using the “mixin”.
For example, in the archipelago mod, there is multiple different palm trees (shapes and sizes). But they all drop the same coconuts, have the same model scale (1:1), needs the same tool to be cut, and even have the same description texts. So I put all that in a mixin file, and included that in the trees files. The best thing is if one day I need to make a change, I will only mess with one file, instead of visiting all the tree files.

If you look at the doors, they got most of their code from a mixin, and the ghost also has another mixin, which includes the animations files.


Ohh ok i found it. But holy s** :open_mouth: (sorry)

It’s really complicate the opening and closing animation

Is it? You mean all the numbers and frames? Unless your animations is extremely simple, like just making an item be positioned in a certain way, you will need to use a software to generate all those value for you.
I use Blender with the stonehearth plugin. You animate your model in that and it exports that file for you.


Yes, that was what I thought… Seems that i have to update my Blender skills.