Project Zomboid

Project Zomboid

62 ratings
How Create an Animation
By Tchernobill
Welcome to this guide, where you will finally make your own animations and you will learn basic concepts about animations on Project Zomboid.
(Original Author: Dislaik)
4
   
Award
Favorite
Favorited
Unfavorite
Downloads
You can download Blender on his official page[www.blender.org].

Animation Template[github.com]
IK Animation Template[github.com]
Mod used in this guide[github.com]

Credits to AuthenticPeach and iBrRus who worked on a template and with it, I could understand how animations work and create a branch of their work.
Blender
Assuming you're a newbie and don't have any experience with blender, a short description will be given of what is and how to use it, otherwise skip to #Animation.

Blender is a free and open-source 3D computer graphics software toolset, in which we'll create our beautiful and cool animations for Project Zomboid. Still, before starting, we need to know some aspects necessary to understand what we are doing.

I know, you don't want to waste time on this, you want to create great things now! but believe me... "If be stuck you don't want, read the manual you must."
These are essential knowledge to start creating animations, you can read the manual as much as you want and improve your animation technique.
Animation
Open with blender the file ANIM_TEMPLATE.blender
The template comes with almost everything ready, all you have to do is create your animation.

NLA editor already has an action strip, we just need to edit it. The frame range was changed to 120 for sheer convenience, you can set the range you want.
(Action Strip -> "Start Editing Stashed Action" -> Action Editor)

Now we starting to create our animation
(Mode Pose -> Select Bone -> Rotate (Press R) -> Click/Enter (Confirm))

At this point, you just have to play with the positions of the bones until you get the desired result.
Once we have our animation (which is sucks btw lol), you noticed that the action strip is called "Bob_Idle" right? remember this, later I will explain the importance of action names, and we will change it to "AnimationGuide".
(Action Strip -> "Rename" -> "AnimationGuide")

When you go to export, you must have these settings or very strange things will happen.
(Export -> FBX (.fbx) -> Export FBX)
AnimSets
AnimSets folder has many xml files, those files register the animations used in the game, you can check it by going to ../ProjectZomboid/media/AnimSets. The player folder is the one that interests us, once inside we can see all the player's animations. If we are interested in adding or replacing one of these animations, we must go to its corresponding category.

Remember about "Bob_Idle" action strip on blender? If we had exported with that name, the animation would have been replaced, but we are looking to add a new animation to the idle category, how is this achieved? Well, through a bit of code and a special function called setVariable

We create an xml file that should contain the following
<?xml version="1.0" encoding="utf-8"?> <animNode> <m_Name>Test_Idle</m_Name> <!-- File name (optional)--> <m_AnimName>AnimationGuide</m_AnimName> <!-- Action name (Important!)--> <m_SpeedScale>1.00</m_SpeedScale> <!-- Speed animation --> <m_BlendTime>0.20</m_BlendTime> <!-- Transition between animations --> <m_Conditions> <!-- Condition to access this animation (Important!)--> <m_Name>IsAnimationGuide</m_Name> <m_Type>BOOL</m_Type> <m_BoolValue>true</m_BoolValue> </m_Conditions> </animNode>
Testing
This is the result obtained, you can see the alternation of the two animations found in the idle category.
You can get the mod used in this guide in the section #downloads
FAQ
  • How I can import the default animations of the game?
    I'm not quite sure how to answer this question, but I'm working on an addon for Blender to import DirectX (.x) files.
License
Copyright © 2022-2023 Matías N. Salas.

How Create an Animation is a guide for Project Zomboid. You have legal permission to copy, distribute and modify if you got authorization from the author, otherwise, according to Steam Online Conduct and Steam Subscriber Agreement, it will be removed via DMCA request, It will apply in the same way to other external platforms. (Websites, Blogs, Forums, Google Ads, etc...)