A mesh file for a prop may consist of one or more objects which can be
individually moved and rotated using keyframe animation. In order to animate
the prop, an animation file (*.anm) is required which contains a static
animation for each prop object. The mesh file contains a list of group names for
the individual objects and the animation file must contain a static animation
with a matching group name for the object to be animated.
A scene file (*.flm) is usually designed to work with a group of props of the
same type, e.g. blades, bats, guns, et. cetera. A group of compatible props is
defined with an *.ini file in data/props folder.
Any compatible prop you have created can be added to such a list and used in
a scene. You can add an incompatible prop to this list and it will animate, if
the mesh group names match the anm group names, but it will probably not look
If you are creating new, interchangeable props, you can create your own prop
group list like mine:
1.0 The first step is to create a prop. It may consist of one or more mesh
objects. Each mesh object must be inside an empty pivot object. The group
names needed for animation can be set inside the ID property browser on the
"objects" dictionary. You can use the same group names as used in the target
animation file which you will be using. On the scene list, the flags
"has_static_anim, has_shapes, has_childmesh, has_rooms" should be turned on.
Once this is done and the tm_preflight script gives you a green board, you can
export the mesh and inject the prop into game using MED.
(note: Mesh objects in the game have a section called "convex hull." If you
import to Blender and then export it, the "convex hull" data will be lost. This
does not appear to cause any problems, as far as I can tell. I have no idea how
this is used in the game, if indeed it is used.)
2.0 Once your prop mesh is ready and has been committed to the game, you can
create the animation you want. You need to have an existing anm file (I call it
the target file) with the same number of armatures and static animations as the
one you want to create. Begin by importing the target animation file, then
modify the animation as desired. If you want, you can delete all the action
keys and start building your animation from scratch. The only restriction is
that with exportanm5.1.1 and earlier, you cannot change the number of frames in
the animation. Before exporting the animation, make sure the grpNames for each
prop object in the ID property browser matches the corresponding group in the
mesh file. You can change these later, if you wish.
3.0 Create a new scene using flmreaderzero and edit the names of the prop list
and animation names used by the scene.
If you re-import an animation to blender for additional editing, you may
sometimes find that it will not play in blender. Before giving up, try saving
and reloading the blend. If it plays in blender the same as it did in the game,
you can proceed with your edits, then export the animation with anmedit(5.1.1
Sometimes you can speed up the process by directly editing the mesh and anm
files in a hex editor, such as 010 Editor, but you need the Lionhead Movies
template files. If you need to fix the group name in the mesh file or animation
file, this is the quick way to do it. If you forgot to set a flag in the anm
header or mesh header, this is the quick way to do it.
Here is the file structure for my animated airplane scene which shows a
guy sitting in the plane with the prop turning. Not all of the pieces are in
place, but enough has been done and tested to prove that it will work.
| +-- 001 (rural field)
| | |
| | +-- 001_plane_warmup.ini
| +-- interactions
| +-- 001
| +-- 001_plane_warmup.flm
| +-- planes.ini (p_jenny_v1, p_jenny_v2)
| +-- p_jenny_v1.ini
| +-- p_jenny_v2.ini
| +-- p_jenny_v1.msh
| +-- p_jenny_v2.msh
| +-- thumbs
| +-- props
| +-- p_jenny_v1.dds
| +-- p_jenny_v2.dds
This structure can be expanded indefinitely to create as many scenes as you
want. You can add plane props, flm's, and anm's as required.