Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

.animinstances file - M2TW

From TWC Wiki
Revision as of 06:45, 16 April 2017 by Makanyane (talk | contribs) (trying to clarify - god I hate this stuff...)
Jump to navigationJump to search

The .animinstances file is one of the M2TW battlemap building world files.

The function of the file is to provide some of the information for the animated transitions that occur when some objects switch from undamaged to damaged group, or in the case of gates, open or close. Not all multi-group objects have an animation. The objects that have the most obvious animation are the wall breach areas and gates. Walls typically pass through a number of animations as they switch between damaged states, the animation is not strictly required, it is possible to create a wall which changes state without using an animation. Gates do require an animation especially for the open/close situations - the 'open' position of the gate is actually part of the animation not one of the objects' groups - not having the open animation A. looks stupid as some troops will walk through the gate, B. messes up the battle as some troops will get stuck at the closed gate!

Related Files

.mesh Files

The .mesh files, located in data/blockset/culture/animations/etc contain the bone assignments for each vertex involved in the animated model, the texture name/path to be used, and the UV mapping used.

.anim Files

The .animfiles, located in data/blockset/culture/animations/etc contain the key frames for the animation, its rotations and movements.

Relationship to .worldcollision Volume

Experimentation shows that the animinstances file does not contain the co-ordinate data for the animation in relation to the settlement plan. Moving the objects collision volume in the.worldcollision file results in the animated version moving to the new position of the collision volume.

In this example the normally visible structural groups have been moved backwards in the ms3d file the pathfinding and docking information has been left as it was, and the collision volume has been moved forward and right:

Objectmoved.jpg

Interestingly the unit that deployed the ladders to the old docking position then abandoned them - they wouldn't climb ladders with the collision volume in different location....

When the wall gets to the damage level where the animated transition comes in the wall appears in the collision volume location. Collisionmoved.jpg

Textures

The texture for the animated section seems to be set in the animation mesh, not in .world or .animinstances.

Worldtexture.jpg

The above is a quick test changing the texture used for the wall in the .world file to the litter texture. While the animation is in progress that same bit of wall switches texture back to the normal one

Animtexture.jpg

which isn't now specified for it in the .world file...

data\blockset\north_european\animations\wall_animations\castle_large_stone_wall\wall_large_castle_straight_animation_a.mesh

and other similar meshes for the various stages include the reference to

Blockset\textures\walls_castle_large_stone.texture

and the equivalent normal.texture, and is presumably changeable with a hex editor.

YOU can help us improve this Wiki! ~ Look for ways to help and editing advice. ~ If you need further advice, please post here.