Making Custom Animations


Author: Drejn

Original location (if transcribed): http://forums.runicgames.com/viewtopic.php?f=57&t=55272


Introduction

This tutorial is aimed toward properly placing, swapping and replacing animations

Tools Needed

1) OgreCommandLineTools
2) Model with animations

Really, that's just all you need.

Walkthrough

For the purpose of this tutorial we will use the BOSS_ROBOT model.

So first step, let's locate the Model in the MEDIA folder:

31342243.png

First, since we don't want to do messy things into the MEDIA folder where original files are stored, let's copy our BOSS_ROBOT folder in our mod folder being sure to provide an appropriate path for it:

mechanics.png

Now, what we want to do it's change the ATTACK1 animation to the SPECIAL_ROCKETS animation, just because we like to be fancy.

To do this we will need to locate 3 files inside our BOSS_ROBOT folder:

22820553.png

1. ATTACK1.SKELETON = It's the file containing the animation details of the ATTACK1 animation. This is the file we are going to swap.

2. BOSS_ROBOT.ANIMATION = It's the file that handles all animations related to the model. It tells the game what file to use by passing the .SKELETON file name and its "inner name". It also stores info about effects and sound effects applied during the animation. Each animation has also pointed its duration, but from my testing it doesn't actually affects the duration itself (seems the duration pointed in the .SKELETON file overrides it)

3. SPECIAL_ROCKETS = It's the file containing the animation details of the SPECIAL_ROCKETS animation. This is the file we want as our attacking animation.

Now that we have all the files at our hand, let's extract (if you didn't already) the OgreCommandLineTool folder in the .zip file we downloaded (check Tools Needed if you didn't). Doesn't matter where you place it, but let's go inside to take a look at that folder:

80825323.png

The OgreXMLConverter.exe file it's what we are going to need to make the modification we need for our Animations: this tool allows us to convert .MESH and .SKELETON files into human readable .xml files.

Now, it's useless to double click on it because it won't do anything (no need to get into details here).

We will start by modifying our ATTACK1.SKELETON file, and we do this by Dragging and Dropping the file on top of the OgreXMLConverter.exe file:

immagineffz.png

After few seconds a new file will be created in our BOSS_ROBOT folder, called ATTACK1.SKELETON.xml:

questtemplari.png

Let's open the ATTACK1.SKELETON.xml file with a Text editor. For the purpose of this tutorial i will be using Block Note as my text editor, but you can use whatever you prefer. To open it, just drag and drop it into your text editor and this should be our result:

ruax.png

It will show us all the bones position, but that's not what we are interested. Let's go find a line called <animations> :

screen1yb.png

What we need to do is change the animation name string so that it won't conflict with our new animation later. So let's give it the name of "Attack":

screen2al.png

We are done with this file, so we can save and close it. To make our modifications applied to the ATTACK1.SKELETON file we just Drag and Drop the ATTACK1.SKELETON.xml file into the OgreXMLConverter.exe file, just as we did for the ATTACK1.SKELETON.

You won't notice any differences in the file, but you can test if it got applied by deleting your xml and trying to convert the ATTACK1.SKELETON again into xml.

Let's rename our ATTACK1.SKELETON to ATTACK.SKELETON to be sure it won't conflict and we will be done with this.

Now we need to repeat the same step for the SPECIAL_ROCKETS.SKELETON file that we took for the ATTACK1.SKELETON file:

1) Drag and Drop the SPECIAL_ROCKETS.SKELETON file into the OgreXMLConverter
2) Open the newly created SPECIAL_ROCKETS.SKELETON.xml file with a text editor
3) Locate the <animation> line inside the SPECIAL_ROCKETS.SKELETON.xml

This time we will change the animation name to the one we wanted to assign to, so in this case Attack1:

screen3er.pngscreen4dlj.png

Save and Close the editor. Once again Convert the SPECIAL_ROCKETS.SKELETON.xml back by dragging and dropping it into the OgreXMLConverter. After that just rename the SPECIAL_ROCKETS.xml to ATTACK1.SKELETON.

Alternatively, you could open the BOSS_ROBOT.ANIMATION file and make it point to your SPECIAL_ROCKETS.SKELETON file instead of renaming it:

screen5dh.pngscreen6x.png

Done, you can open the editor and test it and be happy with your custom animation!

Remember - The new files must be in your mod folder as shown in the tutorial, or else they will appear as blank animations. A restart is also needed to make them fully working.


Please don't forget to assign tags to your article!
Click the "Tags" link at the bottom of this page

Zpbsrvz.png

If you found this article helpful, please click the "Rate" button below to vote it up. It'll give the authors a better idea of how they're doing.
(You need to be signed in to wikidot to rate pages here)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License