Animation Tweaks of Existing CiV Units

Nomad or What

Wayfarer
Supporter
Joined
Nov 25, 2012
Messages
713
Location
Wherever the winds take me
Thanks to Deliverator's brilliant work with NexusBuddy improvements (see this thread), existing CiV unit .gr2 animations can now be extracted and imported into Blender. Many aspects of 3D custom modeling that were formerly difficult or virtually impossible are now much easier by virtue of the ability to extract an animation. This is particularly dramatic when coupling animations to effects, since new effects cannot presently be created for CiV.

For fantasy modding, since many units are not humanoid, custom animations are paramount. That is why it's such a breakthrough. The typical unit in CiV has roughly 45 animations; many of the unique custom animations have about 10-15, which is why they appear somewhat "clunky" in the game. In addition, custom models are usually tied to a CiV unit's effects, creating unusual sounds and oftentimes ridiculous visual effects. The best thing to do is to practically eliminate them from the .ftsxml "triggers" file altogether to make it look decent.

Now all of that has changed, as this thread will demonstrate increasingly over time. The potential is virtually limitless. Imagine, for example, extracting the 45 animations from a CiV Swordsman, adding the bones and mesh of a pair of wings to it, and tweaking the animations. Once exported back to a .gr2 animation it will still behave like a CiV Swordsman in all regards, but with wings! Now you have a full-fledged "CiV" Angel or Demon animation set that can easily be re-skinned to heart's desire. What about a Troll? Extract the Aztec Jaguar animations, extend the arm bones a bit to get the "knuckledragging" effect, tweak the animations, export, and voilà! A perfect set of Troll animations or any similar beast of that type. Mûmakil, anyone? African Forest Elephant animations, make the elephant bigger and modify the riders a bit, done.

The best part is that since we can extract the animations, we can now also study the effects - particularly the timings - and tweak them accordingly. Plasma rays will shoot from hands at the precise time, as will the sounds. Lengthen an animation or shorten it to match your custom sounds; it's up to you.

So, those are potential ideas. I would love to hear a "dream sheet" of animations that you would like. I would also hope that there will be others modifying animations, because I certainly can't build them all myself! Post on this forum your ideas, tweaks, and creations - however minor - and I will present them in this original post.

I will begin with something simple: a single animation tweak of the Scout unit that I use for the Gandalf Wizard and Sorceress models. The base animations have two attacks with a staff plus the city attack. I don't particularly like the way the "spell" effects erupt from the staff with the base Scout animations, so I decided to tweak one of the scout attacks to look like a spellcast emitting from the outstretched hand instead. I also tweaked the .fxsxml file so that all of the attack animations use this attack. Finally, I adjusted the timing of the plasma ray effect so that it emitted at the appropriate timing of the animation. It looks like this:

Spoiler :


Basically, the unit still uses Scout animations for everything except attacks, using a single unique animation partial to this type of unit. That was easy, huh?

You can download the animation, as well as sample .fxsxml and .ftsxml files (to assist with understanding how the technique is performed) from here.

Planned animations:
Hunter (uses both sword and bow attacks)
Ranger (mounted unit that uses both bow and sword attacks)
Angel/Demon (land version using a mash of CiV Swordsman animations and the Angel unit wing animations)
Troll (Tweaked CiV Aztec Jaguar animations for a "Knuckledragger" unit with hulking frame and longer arms)
Mûmakil (Tweaked African Forest Elephant animations)
Sorcerer (Various glowing hand movements for attacks)

...plus your ideas. Let's see them! :cool:
 
Last edited:
So hang on... you've got the custom animation working with the effects and all the normal animations? That screenshot looks amazing, if I saw that with my poor little scout ingame I would be tiptoeing very carefully away hoping neither of them saw me...
 
Nice! It's always a pleasure when people realise the potential of new modding capabilities. :D

I'm working on flag bearing unit based on the Landsknecht. The plan is to add a flag mesh and additional bones to the pike and then animated the flag bones to simulate the flag blowing in the breeze. I'll then replace the combat animations in the .fxsxml with the flag-upright animations so that the flag bearer keeps the flag upright while the other models in the unit do the fighting.
 
So hang on... you've got the custom animation working with the effects and all the normal animations?

Yes, the unit is a Scout except for one animation and its associated event codes. When I create the Hunter unit I will be only modifying one animation to create a ranged bow attack for a unit that is otherwise a Swordsman (or maybe adding a sword attack for a unit that is otherwise an Archer; not sure yet which way I will spin it). These are the event codes for the Sorcerer; you can see the Scout animations used for everything but the custom animation attack:

Spoiler :

<Animation file="Scout_IdleA.gr2" ec="1000"/>
<Animation file="Scout_FidgetA.gr2" ec="1040"/>
<Animation file="Scout_IdleA_Trans_IdleB.gr2" ec="1020"/>
<Animation file="Scout_IdleB.gr2" ec="2000"/>
<Animation file="Scout_FidgetB.gr2" ec="2040"/>
<Animation file="Scout_IdleB_Trans_IdleA.gr2" ec="2020"/>
<Animation file="Scout_Fortify.gr2" ec="1500"/>
<Animation file="Scout_Fortify_Idle_Trans_IdleA.gr2" ec="1580"/>
<Animation file="Scout_Fortify_Idle.gr2" ec="1520"/>
<Animation file="Scout_Fortify_Idle_Fidget.gr2" ec="1540"/>
<Animation file="Scout_Fortify_Idle_Trans_Combat_Ready_Idle.gr2" ec="1560"/>
<Animation file="Scout_Combat_Ready_Idle.gr2" ec="1620"/>
<Animation file="Scout_Combat_Ready.gr2" ec="1600"/>
<Animation file="Scout_Combat_Ready_Idle_Trans_IdleA.gr2" ec="1640"/>
<Animation file="Scout_Shuffle.gr2" ec="1450"/>
<Animation file="Scout_Run.gr2" ec="1400"/>
<Animation file="Scout_Stop_Run.gr2" ec="1440"/>
<Animation file="Scout_Run_Stop_IdleB.gr2" ec="2440"/>
<Animation file="Scout_Charge_Run.gr2" ec="1120"/>
<Animation file="Spell_AttackA_anim.gr2" ec="1100, 1140, 1160, 1180, 2100"/>
<Animation file="Scout_Victory.gr2" ec="1800"/>
<Animation file="Scout_Bombard_Defense.gr2" ec="1280"/>
<Animation file="Scout_Bombard_Defense_Idle.gr2" ec="1285"/>
<Animation file="Scout_Bombard_Defense_Trans_IdleA.gr2" ec="1290"/>
<Animation file="Scout_Death_A.gr2" ec="1200"/>
<Animation file="Scout_Death_A_Idle.gr2" ec="1220"/>
<Animation file="Scout_Death_B.gr2" ec="2200"/>
<Animation file="Scout_Death_B_Idle.gr2" ec="2220"/>


Nice! It's always a pleasure when people realise the potential of new modding capabilities. :D

I'm working on flag bearing unit based on the Landsknecht. The plan is to add a flag mesh and additional bones to the pike and then animated the flag bones to simulate the flag blowing in the breeze. I'll then replace the combat animations in the .fxsxml with the flag-upright animations so that the flag bearer keeps the flag upright while the other models in the unit do the fighting.

That will be an awesome unit and definitely one that I can use! Can't wait!
 
When I create the Hunter unit I will be only modifying one animation to create a ranged bow attack for a unit that is otherwise a Swordsman (or maybe adding a sword attack for a unit that is otherwise an Archer; not sure yet which way I will spin it).

I'd recommend sword attacks for the archer, as a Hunter would mainly fight from distance but be tougher at close range than a simple archer.

I'm working on flag bearing unit based on the Landsknecht. The plan is to add a flag mesh and additional bones to the pike and then animated the flag bones to simulate the flag blowing in the breeze. I'll then replace the combat animations in the .fxsxml with the flag-upright animations so that the flag bearer keeps the flag upright while the other models in the unit do the fighting.

That sounds awesome! Do you think you might do one with a hanging flag as well? The two together would allow for a ton of standard-bearer heroes of all kinds.
 
I'd recommend sword attacks for the archer, as a Hunter would mainly fight from distance but be tougher at close range than a simple archer.

The Composite Bowman looks like a decent unit to use since it already has a sword. There is also the Handaxe barbarian that could be used. Alternately, I could just use an axe instead of a sword for the melee attack.
 
The Composite Bowman looks like a decent unit to use since it already has a sword. There is also the Handaxe barbarian that could be used. Alternately, I could just use an axe instead of a sword for the melee attack.

The English Longbowman has an axe, I believe. Also the Crossbowman has a short sword.

If you want some more practice doing one animation, I'd recommend a priestly complement to the spell attack you already did - sort of like the Great Prophet arms to the sky pose.
 
OK, so I decided on the Inquisitor as my base unit because it has very few base animations and it should be relatively straightforward to modify. Also, it uses a cape and I want that animation for the hunter as well as for some other future units, too. For the hunter's ranged attack I am going to use the Composite Bowman unit, so I will need it's attack as well as its shuffle and transition to idle animations. I will use the Aztec Jaguar unit for the melee attacks, so I will need its charge, attack, and transition to idle animations. Maybe later I will incorporate a fidget animation or two, but for now I will keep it simple.

CiV for some reason is not very consistent with bone names between units; I was hoping that there would be a "base" from which most other units are derived but that doesn't seem to be the case. Fortunately, the armature does follow a standard hierarchy so I can basically just rename bones as appropriate to ensure that they are consistent across all three units. The unique bones for each unit will need to be appended to the base Inquisitor so that it can use a bow and weapon properly. Although I won't need the bone_MACE bone for a hunter, I will keep it for use with a future spellcasting unit that will use this model as a base. Any bones that have no mesh will simply be invisible in the game, so this won't be a problem. After combining all of the bones my armature looks like this:

Spoiler :

Code:
point_WORLD (OBJECT BONE)
Base Human (NO MESH)
	CHARACTER_REORIENT (NO MESH)
		Base HumanPelvis
			Base HumanSpine1
				Base HumanSpine2
					bone_CAPE_01
						bone_CAPE_02
							bone_CAPE_03
								bone_CAPE_04
					Base HumanRibcage (NO MESH)
						Base HumanLCollarbone
							Base HumanLUpperarm
								Base HumanLForearm
									Base HumanLPalm
										point_BOW
											point_BOW_bendTOP
											point_BOW_bendTOP01
											point_STRING
						Base HumanRCollarbone
							Base HumanRUpperarm
								Base HumanRForearm
									Base HumanRPalm
										point_HAND (NO MESH)
						Base HumanNeck1
							Base HumanNeck2
			Base HumanLThigh
				Base HumanLCalf
					Base HumanLFoot
			Base HumanRThigh
				Base HumanRCalf
					Base HumanRFoot
			bone_QUIVERCB
			bone_SWORDCB
	Point_PROJECTILE (NO MESH)
	bone_MACE
	Spear Constraint (NO MESH)
		Spear


I have a total of 31 actual vertex groups that could possibly be used, just under the 32 limit. After moving the child bones into place to match the parent bones on the Inquisitor, my hunter base unit is ready to go!

The next thing I needed to do was rename the armatures of all the bowman and jaguar base models to be consistent with the hunter base and then create the .gr2 base model for all of them. I needed to do this since I will need to rename the armatures on the animations I wish to use, re-save their animations to .gr2, then export another .na2 file from it using the renamed base model. This gives my animations identical armatures to the hunter unit. For now, I have only done this to the bowman "attack_a" animation.

Finally, using my base hunter unit I imported the new .na2 attack_a animation into Blender and tested the animation. There was a very slight error with the feet placement but that was an easy fix. Other than that, the animation performed beautifully. I also needed to append the Inquisitor's flowing cape animation and tweak it slightly as well, but now I have the hunter's first attack animation!



Although this may look like a rig of the Inquisitor mesh to a Composite Bowman unit, it is actually a mash of the composite bowman attack animation and the Inquisitor's cape animation. Once the set is complete, it will be a unique base rig for a hunter unit that can attack with both a bow and a sword (or axe), and has a flowing cape and hood similar to a scout. A very useful unit for a progression of the Scout!

Once I am finished with this project I will create a basic tutorial outlining the basic concepts.
 
Wow - very nice job, Nomad! I look forward to seeing this guy.

Might want to reskin him from bright red though - not exactly good camouflage.

I won't use this as a skin at all actually; it is still the Inquisitor unit. I am just using the existing mesh as a placeholder to design the animations for a base rig. Once the animations are done I will make an Orc, Human, and Elven version using the same base unit rig. :)
 
What's wrong with the Inquisitor model as the human version? I think it would make a very nice Vandarian Ranger, once reskinned green or brown.

I suppose I could keep it as it will already be the default for those that wish to use it; I was planning on a unit with boots and trousers vice a robe for a human hunter (I will also add a dagger and/or handaxe on the belt), but I suppose that is only preference. I do plan on keeping it for the Spellcaster unit base, though, so it won't be discarded entirely.

Here are my thoughts:
Human - Comp. Bow & Axe w/ Dagger on belt
Elf - Longbow & Sword w/ Handaxe on belt
Orc - Bow & Double Blade Axe w/ Handaxe on belt

My Goblins use the barbarian Handaxe unit for it's hunter, so I probably won't change it.
 
While experimenting with trying to rig a mesh to your Scorpion animations, the thought occurred to me... is there any chance you could combine the Scorpion walking animation with tank turret attack animations for the purposes of rigging up multi-legged walking tanks? :3

(Admittedly, the leg-body positioning might be too different to do a proper walking tank, but it'd be a step forwards... :p)
 
While experimenting with trying to rig a mesh to your Scorpion animations, the thought occurred to me... is there any chance you could combine the Scorpion walking animation with tank turret attack animations for the purposes of rigging up multi-legged walking tanks? :3

(Admittedly, the leg-body positioning might be too different to do a proper walking tank, but it'd be a step forwards... :p)

That is completely possible if we are talking "you" in the generic sense, because I don't think I would ever get to it! :lol: The difficulty would only be with how detailed you wanted to make the animations. Since the scorpion animations are limited and don't use transition animations, I actually think that it would be easier to use the tank animations as the base and incorporate the scorpion leg bones to it, animating when necessary.
 
Top Bottom