PART 7: Positioning of objects on a figure-image


So we now know that an action-object-file is required to "define the positioning of any object, weapon or shield, for any figure-image performing a specific action".

Ok, but what about the 4 different camera-angles and 12 different frames for each action ?

Well, if we look into any of these text files, for either shield or weapon objects, we see that they ALL contain 48 lines (although the number of parameters per line are slightly different for weapon and shield action-object-files).

The 48 lines in each of these action-object-files should be thought of as 4 groups of 12 lines, representing -

- 1st 12 lines; parameters for each of the 12 frames for camera-angle 1
- 2nd 12 lines; parameters for each of the 12 frames for camera-angle 2
- 3rd 12 lines; parameters for each of the 12 frames for camera-angle 3
- 4th 12 lines; parameters for each of the 12 frames for camera-angle 4

Let's call each set of 12 lines an 'action object set', and each line an 'action object line'.

(apologies for all the terminology/definitions - it IS important to track of what I'm trying to say - if only for me!)


Thus, we have finally reached the point whereby we can say that - "an action-object-line serves to define the position of a specific object, within one specific frame in the movement-cycle, for the figure image of a specific unit, performing a specific action, for a specific camera-angle".


Phew! At this point I should also say that whilst all of this 'MTW animation system' may appear to be overly complicated, it is also EXTREMELY FLEXABLE.

To continue, however, action-object-lines for shields contain 9 parameters, whilst for weapons they only have 5. Why? We'll see why a bit later. For now lets just say they represent xy-coords in order to provide a degree of 'fine tuning' for any object on any figure-image frame.


Let's now look at a few examples of these action-object-lines, for both weapons and spears. Let's use the Spearmen specific-unit to illustrate. Spearmen have 1 shield and 1 weapon defined for them. Let's also consider three actions for the Spearmen - 'stand', 'walk' and 'die', but only for camera-angle 1 (ie: we'll only look at the 1st action-object-set - the 1st 12 lines - we'll ignore the other 36 lines).


So, the 6 files we'll be looking into are -

a) Textures\Men\Items\Shield3\Spearmen\stand.txt
b) Textures\Men\Items\Weapon6\Spearmen\stand.txt
c) Textures\Men\Items\Shield3\Spearmen\walk.txt
d) Textures\Men\Items\Weapon6\Spearmen\walk.txt
e) Textures\Men\Items\Shield3\Spearmen\fight.txt
f) Textures\Men\Items\Weapon6\Spearmen\fight.txt


We don't have to understand (yet) all the numeric parameters contained in these files. Some things should become evident. So, what do the 1st 12 lines (the action-object-set) of these files actually contain -


Example 1: Action stand
-----------------------


Shield3 Weapon6

10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0
10 -38 8 -38 10 -15 8 -15 1 -3 -25 -3 -5 0


Ok, so the numbers above represent positions on a figure image.

The first thing we see is that each action-object-set is different for weapon and shield. In other words, these 2 objects are in different positions on the figure image. Obvious! The shield is in one hand and the spear is in the other!!

The next thing we see is that each action-object-line is the same, for each shield and weapon set. In other words for all 12 frames representing the 'movement sequence' for Spearmen standing. What does this tell us? It tells us that the shield and weapon images remain in exactly the same place RELATIVE TO THE FIGURE IMAGE. In other words THEY DONT MOVE. As these 2 sets are specifically for a spearman standing still - only to be expected.

Why 'relative to the figure image'? Well, in this example all 12 frames for the figure-image don't move much either (the head bob's back and forth but that's about all!). However, IF the 12 frames in the movement-sequence for Spearmen standing were redrawn to show the whole figure moving slightly back and forth (let's say to stretch their legs!) then the above 2 set's of parameters would probably have to be amended slightly to ensure the weapon and shield stay in-sync with each new/redrawn figure-image for each frame in the movement-cycle.

Example 2: Action 'walk'
------------------------


Shield3 Weapon6


7 -35 7 -30 15 -18 15 -13 0 -9 -22 -16 -17 0
6 -38 5 -35 16 -16 15 -13 0 -9 -21 -17 -18 0
6 -39 5 -38 15 -15 13 -14 0 -10 -20 -18 -19 0
7 -39 5 -39 15 -14 13 -14 0 -10 -19 -18 -19 0
7 -38 5 -37 15 -14 13 -13 0 -9 -19 -18 -18 0
7 -37 6 -34 16 -15 14 -12 0 -9 -20 -19 -17 0
6 -35 6 -30 16 -18 15 -13 0 -8 -22 -19 -17 0
7 -33 8 -26 14 -20 14 -13 0 -7 -24 -19 -17 0
8 -30 9 -23 13 -21 14 -14 0 -6 -25 -18 -16 0
9 -28 11 -20 11 -22 12 -15 0 -6 -25 -17 -15 0
9 -29 11 -22 10 -21 11 -14 0 -7 -23 -17 -13 0
9 -31 11 -24 11 -19 12 -12 0 -8 -22 -18 -13 0


Now the Spearman is walking we see a slight change in the parameters for both the weapon and the shield. This tells us that the positions of each object differ for each frame of the movement-cycle for Spearmen walking. This makes sense. We'd expect both objects to swing/shuffle as the figure walks. They would'nt remain 'still' for this specific action.

Two things to note with the parameters in these 2 action-object-sets -

First, the values don't change much. In other words the 'movement' of these objects is not great in respect to the figure-image.

Second, the parameters in the first and last action-object-lines stay relatively close together (in terms of the numeric values specified). This is VERY IMPORTANT, and is generally the case for most actions!

Why? Well, consider each of the 12 action-object-lines in an action-object-set that represent object positioning for a movement-cycle - CYCLE being the operative word! As these movement cycles are looped continuously for the animations, you have to ensure any object ends up in roughly the same place from where it started. If the parameters for object-action-line 12 were VASTLY different to those in object-action-line 1 you would witness great 'jumps' in the positioning of an object within a movement-cycle. Not conjucive to smooth animation!

The exception to the rule is our final example.


Example 3: Action 'die'
-----------------------


Shield3 Weapon6

10 -25 13 -34 14 -27 15 -36 0 -3 -34 4 -23 0
7 -25 8 -34 18 -21 19 -29 0 -6 -33 2 -30 0
11 -25 12 -33 18 -17 16 -26 0 -6 -30 1 -32 0
19 -23 15 -31 17 -20 13 -27 0 -5 -23 -4 -25 0
23 -14 22 -22 12 -19 10 -27 0 -5 -5 -10 -5 0
24 -1 29 -8 9 -10 13 -18 0 2 -2 -11 -10 0
22 3 27 4 18 -19 22 -19 0 6 5 -10 1 0
9 -1 10 4 33 -6 35 -1 0 9 5 -8 3 0
9 -1 10 3 32 -6 34 -3 0 8 5 -8 3 0
9 0 10 3 32 -6 34 -3 0 8 5 -8 3 0
9 0 10 3 32 -6 34 -3 0 8 5 -8 3 0
9 0 10 3 32 -6 34 -3 0 8 5 -8 3 0


So now we have the 'die' action.

Now we see that the parameters are changing rapidly at first, then eventually remain constant. In other words, the object images for both shield and weapon move about a bit at first then remain in the same place (all relative to the frame of course!). This also makes sense.

Obviously, as our Spearman is dying the movement-cycle for the figure-image will show him dropping to the ground then remaining there. Therefore the first few action-object-lines change position rapidly in order to show his objects falling with him. The last few action-object-lines are the same, which tells us the objects ar'nt moving (these last few lines actually position the objects on the ground - whilst the final 4/5 cycles of the figure-image show him oozing blood!).

Our Spearman has now died and after this movement-cycle all animation ends in respect of this single figure-image in the specific-unit Spearmen. Note - he is only one of the figure-images in this unit of 100 or whatever. However, he is now replaced by an image in the Deadpage (more of this later!).

Therefore, the 'die' action is the one movement-cycle whereby the final positions of the figure-images objects are totally unrelated to the starting position. Why? Because this specific movement-cycle for the action 'die' in NOT looped continuously - it only happens once. Cat's may have nine lives; Spearmen don't!

'Hands on' Example!
-------------------

If you feel adventurous and are eager for more punishment, try the following example! It's for the Pikemen specific-unit (as the change/amendment to the weapon is far more visible).

We are going to change the Pike parameters for the 'stand' action, in order to make it 'sway' a little instead of remaining still.


1) Make a backup of the 'Textures\Men\Items\Weapon7\Pikemen\stand.txt' file.

2) Replace EACH of the 4 action-object sets in this stand.txt file with the action-object-set below (in other words delete the whole contents of the original and copy the 12 lines below 4 times) -

9 -21 10 0 1
9 -21 10 0 1
9 -21 10 0 1
10 -21 9 0 1
10 -21 9 0 1
10 -21 9 0 1
10 -21 9 0 1
10 -21 9 0 1
10 -21 9 0 1
9 -21 10 0 1
9 -21 10 0 1
9 -21 10 0 1

3) Next time you play MTW in the Late Period (or if you wish - create a Historical Battle/Campaign and define a Pikemen unit) start a battle with an army that contains a Pikemen unit and see what happens to the weapon whilst the Pikemen are standing still.

4) Position the camera in front of, or behind,the middle of the unit. Watch the Pike! Notice how some figures 'sway the Pike inwards' whilst others 'sway it outwards'. Can you see why this is? (Remember: 4 camera-angles that serve to represent 8 animations).

Note: if you try this make sure you have 48 lines in the stand.txt file. Any less and you'll experience a crash to desktop whilst the battle is loading.

Example Summary
---------------

Well, we still don't know what these numbers represent. Hopefully, though, the above examples haven given a 'feeling' for how these parameters work in respect of object positioning on a figure-image.

I've tried to stress that the parameters in any single action-object-line are ALWAYS relative to the figure-image in the movement-cycle frame. Two things to note in this respect (which don't occur often and are only an 'aside') -

First, any object may appear to be 'not moving' in the animations, but the action-object-lines comprising the action-object-set may be slightly different. This is because the actual figure-image frame may be moving, and as the object must remain relative to each of these frames repositioning of the object may be necessary.

Second, and conversely, the object may appear to move in the animations, but the action-object-lines comprising the action-object-set may be exactly the same. Same reason as above!


As a final note to this PART - if you take a look at enough of these action-object-sets and action-object-lines, after a while you can often have a good 'guess' as to what the object is 'doing' - roughly speaking. Alternately ... doing this may drive you mad!!!