PART 9: Mounts (camels and horses)


Up to this point we have only considered infantry figures. Now let's take a look at the cavalry.

There are 5 generic-unit folders that contain images for mounts -

1) Armhorse (an armoured horse)
2) Camel (an african camel)
3) Ehorse (an East-european style horse)
4) Khorse (a Knights horse)
5) Lihorse (a light horse)

Mounts are ALWAYS generic. Therefore, unlike the generic-unit folders for figure-images

(infantrymen/cavalrymen), the generic-unit folders for mount-images contain nothing else. There is

nothing specific to associate with a mount within its folder.

These folders each contain a hi res and a low res BIF, depicting 16 images only.

These 16 images represent 4 actions, and 4 camera-angles per action, for any mount.

Mount-images only have 4 actions associated with them (stand, walk, run and die). Why? Because

although the figure-images of the cavalryman may have multiple actions associated with them, the

mount-image is not capable of some of these actions (eg: fight, shoot).

Therefore, an appropiate action for the mount must be considered depending on the actual action of

the cavalryman.

For example -

- figure-image action stand/shoot/fight = mount-image action stand
- figure-image action run/charge = mount-image action run
- figure-image action walk = mount-image action walk
- figure-image action die = mount-image action dies .... and so on and so forth

Therefore we can see that mount-images, just like figure-images, are also 'action driven', but are

directly related to the action being performed by the cavalyman.

As all mounts are generic, any specific-units (representing a cavalryman - not an infantryman!)

may be associated with any mount. This association is, again, contained in the crusader_prod11.txt

file.


Mount definitions
-----------------

Where are the actions and image-rectangles for mount-images defined? In there own text file within

the same 'Textures\Men\ActionsPage' folder that also contains the specific-unit definitions. Let's

call these text files the 'mount definition' file. For mounts the names of the mount-definition

files are exactly the same as those of the generic-unit folders for mounts.

The contents of these mount-definition files contain similar lines and parameters as for

specific-units (an action followed by 4 camera-angle parameter lines), BUT ARE USED FOR 2 SLIGHTLY

DIFFERENT PURPOSES -

1) the actions do NOT represent the mount actions, but the actions of any specific-unit that may

be associated with this mount.
2) the xy-coords are NOT used for the positioning of weapons/shields, but for the positioning of

the Cavalrymans image-reactangle relative to the image-rectangle of the mount.


For example, consider the mount-definition file 'Textures\Men\ActionsPage\Lihorse.txt' for the

action standing_shoot -

"standing_shoot
14 54 195 1 138 29
21 50 195 125 246 175
19 44 165 124 121 175
12 40 37 95 65 142"


The parameters still represent 2 xy-origin-coords, and 4 xy-coords for the image rectangle.

However, considering the first parameter line, this now reads as -

"for any cavalryman image that is performing a standing_shoot action for camera-angle 1, use the

mount image (in this example in the Lihorse BIF) as defined by the image-rectangle 195/1 138/29,

then position the cavalryman relative to the point 14/54 in the mounts image-rectangle"

Note that any shield or weapon should have already been positioned on the cavalrymans

image-rectangle mount positioning takes place.

So, the xy-origin's for figure definitions serve to position objects on a figure-image. The

xy-origins for mount definitions serve to position a figure-image, together with his objects, on a

mount-image.

Note: the figure-image is ALWAYS rendered 2nd (ie: over the mount-image).


Positioning a figure on a mount
-------------------------------

Now lets take a look at the actual positioning process for mount and cavalryman.

If we rescale and reorient the values for the mounts image-rectangles in the example above we get

-

"standing_shoot
14 54 0 0 30 58
21 50 0 0 52 51
19 44 0 0 45 52
12 40 0 0 29 48"

We now see the xy-origins lie (generally) within the figure and somewhere near the 'top middle'!

They actually define a point just above the centre of the saddle on the mounts image-rectangle,

which is covenient for the positioning of the cavalyman.


Now let's take a look at a cavalryman (we'll use HorseArchers) that will use these 4

action/camera-angle image-rectangles for this mount. The file

'Textures\Men\ActionsPage\HorseArchers.txt' for the action standing_shoot contains -

"standing_shoot
16 62 210 1 170 30
13 62 28 59 58 100
7 62 254 1 212 24
8 60 26 102 48 141"

Rescale and reorient -

"standing_shoot
16 62 0 0 30 41
13 62 0 0 31 42
7 62 0 0 24 43
8 60 0 0 23 40"

Now look at the actual sizes of the image-rectangles (30/41, 31/42 etc) and consider the centre of

these image-rectangles. In order to position a figure relative to a mount, the MTW engine aligns

the centre of the image-rectangle for the cavalrymans figure-image over the xy-origin of the mount

figure-image. Is it as simple as this ? NO! But this is enough info to serve our purposes.

So, are ALL cavalryman generic-units and mount generic-units interchangeable ? Yes, it appears so

(allthough I hav'nt checked every combination!). Therefore if you want to create a new specific

unit by placing a Turkish Archer on a Knights horse - you can do so. Don't ask me what this new

specific-unit would represent; it's only an example.


'Hands on' example
------------------

To illustrate the above (and because its also a bit of fun!) try the following simple examples -

1) take a backup copy of the mount-definition file in 'Textures\Men\ActionsPage\Lihorse.txt'

2) amend the xy-origins for the 4 camera-angles for the stand action from

"stand
14 54 195 1 138 29
21 50 195 125 248 175
19 44 165 124 121 177
12 40 37 95 66 142"

to

"stand
14 0 195 1 138 29
21 0 195 125 248 175
19 0 165 124 121 177
12 0 37 95 66 142"

then see what what happens on the battlefield for any Cavalry specific-unit using this mount (eg:

Hobilars, HorseArchers, etc whilst they are standing.

3) amend the xy-origin again to


"stand
14 100 195 1 138 29
21 100 195 125 248 175
19 100 165 124 121 177
12 100 37 95 66 142"

and check again.

4) play around if you wish but don't forget to replace the backup copy after you've finshed.


(TIP: we can 'play about' with positioning values whilst in the same battle. Start a battle,

pause, Ctrl/Esc to desktop, change the values in whatever files your 'playing with', save them,

select the MTW battle again from the taskbar - the changes will take effect immediately. A lot

quicker than starting a new battle every time you change something!)


Example summary
---------------

There are two points to note from this example -

1) it's now obvious that the mount is positioned in respect to the cavalryman figure-image.
2) the algorithm used to position a mount image-rectangle relative to a cavalrymen image-rectangle

is actually more complex than we have specified above (but I have'nt worked out the exact formula
yet).