GeneralAnimationPlugin
Dependency plugin for using a set of common animation files with many compatible skeleton characters/minis. Includes converter for quick creation of animation files.
About this mod Author’s original text
General Animation Plugin
This unofficial TaleSpire plugin is for adding general animations to TaleSpire
which can then be applied to any character that has a compatible skeleton.
Now comes with a BVH to TS JSON converter for quick animation creation (see end of this document)
Change Log
1.1.0: Added BVH Converter
1.0.0: Initial Release
Install
Install using R2ModMan or similar and place animation files in
\Steam\steamapps\common\TaleSpire\TaleSpire_CustomData\Animations\
(The LoadAnimation can actually load animation files from any location but this is the recommended location)
Usage
The General Animation Plugin is intended to be a dependency plugin used by other plugins to implement animations.
It does not currently have any triggers for triggering animations on it own. However, it does have the complete
animation engine for processing animations when they are applied.
There are two types of animation possible: scripted animation and manual animation. However, both animation style
(described below) require a common initial step. This step involves getting a reference to the rigged Game Object
and registering its bone structure.
CreatureBoardAsset asset;
CreaturePresenter.TryGetAsset(LocalClient.SelectedCreatureId, out asset);
GameObject go = GameObject.Find("CustomContent:" + asset.Creature.CreatureId);
AddCharacter(go);
The above code assumes the character has been added using Custom Mini Plugin in which case the Rigged Object has a
name that starts with "CustomContent" and ends with the corresponding creature id. If animations are to be applied
to content that was not imported with Custom Mini Plugin then change the above code to determine the correct GameObject
Object in some other way. The last line of AddCharacter(go) registers the character bones which needs to be done
prior to any animation.
The process for scripted animation and manual animation is described below.
Scriped Animation
Scripted animation is a two step process. First a AnimationSequence is loaded from a JSON file which contain a single
animation or a pose (see additional comments about poses below). The second step is to apply the AnimationSequence to
a specific character. Note that a character's bones have had to have been registered in order for this animation process
to work. To load an AnimationSequence we can use code similar to:
AnimationSequence animSequence = LoadAnimation(dir + "Animations/CanCan.json");
To apply the animation to an actual character, we can use code similar to:
animGuid = ApplyAnimation(animSequence, "CustomContent:" + asset.Creature.CreatureId);
Once again the above code assumes the mini content was loaded using Custom Mini Plugin. If that is not the case then
the second parameter needs to be modified to the name of the game object that is to be animated. This parameter should
match the name of a character that was registered using the AddCharacter() method (see above).
Once the animation completes, it will be automatically removed from the animator. If the animation needs to be stopped
before it has been completed, the following code can be used:
StopAnimation(animGuid);
Manual Animation
The plugin provides two methods for manual animation: Bend() and Shift()
The Bend method is used to bend (rotate) a character's bone.
Bend(characterName, boneName, angles, delta)
The characterName parameter is the character that is to be animated and must match the name of a character whose bones
have been registered. The boneName parameter is the name of the bone that is to be animated. The angles parameter is
a Vector3 parameter indicating the x, y and z angles. The delta parameter indicates if the angles are absolute values
or delta values. If delta is false (default) then the method will set the bone angles to the provided values. If the
delta parameter is true then the method will change the current bone angles by the amount specified in the angles property.
Note that this method is not a transition. It sets the value of t
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: