Author Topic: Simple tutorial to add effects to animations  (Read 479 times)

0 Members and 1 Guest are viewing this topic.

Offline Bumbleguppy

  • Forum Moderator
  • Full Member
  • *
  • Topic Author
  • Posts: 148
  • Country: us
  • Karma: +9/-0
    • View Profile
    • Awards
Simple tutorial to add effects to animations
« on: 02 February 2018, 00:24:25 »
Do you know what an AIF file is? I don't.

Are you an expert with 3DSMax? I haven't touched it in 15 years. I downloaded Blender, but the learning curve is too steep for what I want to do (or what I am capable of lol).

DISCLAIMER: This method bypasses the ArtManager's source/asset functionality. Every time you do a fresh build of your mod after using this method, the ArtManager will ask if you want to delete the unassociated resource that is the animation you added. Just click no every time. It's annoying, but if you aren't a real developer and just want quick and dirty, it's a small price to pay.


I am assuming you are familiar with ArtManager and other tools already.

So here is the poor (or dumb like me) person's way to add a particle effect to an animation.

Here's the example. There is now a Saberlion Hero since Anniversary Edition, Creatures/Monsters/Saberlion/um_saberlion.dbr, and I want to give it an ice breath skill.

You could make it a wave and add a line effect to the skill file, but why do that when you can get a genuine looking breath effect? So let's add a snow breath effect animation to the Sabrelion.

We will need the animation files in a bit. Use ArcExplorer to extract the creature meshes and animation files somewhere.

Navigate to Creatures/Saberion/Saberlion01.msh in your Viewer.exe located in your install directory for TQ.

Here's the saberlion with the menu bar ->View/Attach Points enabled. Attach points are arbitrary points on the mesh usually attached to a "bone" in the mesh but always specified with an alignement to the mesh or bone XYZ alignment. Here is the Viewer.exe result of the Saberlion mesh using it's native "saberlion_attalpha.anm" animation. I have highlighted the "HeadEffect" attach point using the menu bar -> Select... -> HeadEffect -> Select.




Now the Ice Sprite already has an animation with a baked in ice breath particle effect, let's just use that? What the...?




You can use that if you want, but that's not what I am envisioning. :)

Here's the ice sprite in the Viewer.exe. Notice I have selected "HeadEffect" attach point again (which is important to know later) and it is highlighted. Now also look closely and notice the three arrows in the white box of the highlighted attachment? Those are the X,Y,Z axis of the attach point. Notice the green one? That is the "Y" axis. These colors match the colors in the PSEditor's three XYZ axis, too.




Here is the effect that the ice sprite frost breath animation calls in the PSEditor. Notice that it flows along the green "Y" axis? When it is attached in the animation file to the ice sprite "HeadEffect", the effect will orient itself to the attach point of the mesh. So if the effect is along the "Y" axis and the attach point is aligned with the "Y" axis facing the player, everything looks great.




Now navigate to Creatures/Monsters/Sprite/anm/spriteice_skill_castprojectile.anm. Open it with a GOOD text editor. I am using Notepad++ because it works and it's free. Here's what we see:




Scroll all the way to the bottom and see all the callback point stuff like "RightHandHit", "SwipeRight" etc. There is the entry I am looking for "CreateEntity". That's the language to add something to the animation from outside like an effect. Highlight and copy the CreateEntity and everything between the following braces { }.


Now navigate to Creatures/Monsters/Saberlion/anm/saberlion_attalpha.anm, this is the animation I chose to use. You could use any, but this looks more like a breath attack so I am using this one. Open this in your text editor and scroll all the way to the bottom.

Place your cursor at the the last place in the file and create a new line there. Paste the CreateEntity stuff you copied from the ice sprite animation.


Notice I matched the "frame" in the CreateEntity part with the moment in the animation I want it to go off, in this case it's the RightHandHit callback point.


Now, save the saberlion animation file somewhere making sure to maintain the ".anm" file extension.


Remember, this is the poor (or dumb) person's way. Not the RIGHT way, whatever that is. If I knew that, I wouldn't be writing this tutorial.

Copy and paste your new animation NOT in your working directory, but in the Documents/My Games/CustomMaps/YourMod/Resources/Whatever folder of your existing mod, e.g. Creatures/Monsters/Saberlion/anm/.


Open up your existing mod in Art Manager. In the menubar, select "Archive" -> "Build". This automagically injects your animation file into your compiled mod's .arc file that matches the directory in the Resources that you pasted the animation into. This is not the usual build command, I have only ever used the "Archive->Build" for doing this.

Now go to the Saberlion animation directory in Art Manager. Creatures/Monsters/Saberlion/anm. Open the "anm_saberlion.dbr" file.

In the All Groups -> Animation Sets -> Unarmed tab scroll down to "unarmedSpecialAnim1" row. Double click in the 4th column and click the "...". Navigate to the new animation you just archived and select it.

Two rows below that is the unarmedSpecialRef1 slot. In the fourth column enter "Icebreath". Remember the case, it doesn't matter what it is as long as it's the same wherever you use it later.

In the skill file that the ice sprite's use "Records\Skills\Monster Skills\Attack_Projectile\IceSprite_FreezingBlast.dbr", there is an entry to add Skill Config -> skillSpecialAnimationName. Enter "Icebreath" here as well. Don't worry, the ice sprites will still use their animations because it is their default for spellcasting in this case. That could cause problems sharing a monster skill between monsters, but just be careful and check. You could always copy the ice sprite skill and give it another name no problem.


In the Saberlion Hero's (Creatures/Monsters/Saberlion/um_saberlion.dbr) skill tree enter the ice sprite breath skill. Enter it in the saber lion's skill config as you wish.

Build your mod.

Bam. Saberlion hero has ice breath now.
« Last Edit: 02 February 2018, 00:43:56 by Bumbleguppy »

Tags: