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.

Difference between revisions of "Unit Animations - M2TW"

From TWC Wiki
Jump to navigationJump to search
(Porting Modded Skeletons)
 
(4 intermediate revisions by the same user not shown)
Line 10: Line 10:
  
 
The .cas files for the siege engines are in the same format as those supplied by Caliban, they are never packed.
 
The .cas files for the siege engines are in the same format as those supplied by Caliban, they are never packed.
 +
 +
==Scaling==
 +
The Caliban/full cas animations should be regarded as being as scale 1:1.  If descr_skeleton.txt specifies a scale other than 1 then all the animations packed by the game for that skeleton will be adjusted to that scale.  If the same animation is used by multiple skeletons which have different scales then multiple versions of that animation will be created at each of the scales.  Therefore the pack can contain multiple files that say they are, for example:<br>
 +
data\animations\MTW2_Spear\MTW2_Fast_Spear_run.cas<br>
 +
this doesn't cause a problem when using the packs, but can cause issues with tools attempting to unpack the segments, as files with the same name and folder path would overwrite each other.
  
 
==Porting Modded Skeletons==
 
==Porting Modded Skeletons==
Line 17: Line 22:
  
 
===Porting by Merging Packs===
 
===Porting by Merging Packs===
If you need skeletons and anims that exist in two or more separate packs you can merge them into one pack by using tools such as XIDX.  These 'unpack' the skeletons (which contain the .evt information) and the anims, they provide you with a list of skeleton names and animation names and you can then manipulate the lists to re-pack the skeletons and animations you want.  The unpackers do not change or decompress any contents from the packs they simply split the packs into chunks of the relevant length and write them as separate files.
+
If you need skeletons and anims that exist in two or more separate packs you can merge them into one pack by using tools such as XIDX.  These 'unpack' the skeletons (which contain the .evt information) and the anims, they provide you with a list of skeleton names and animation names and you can then manipulate the lists to re-pack the skeletons and animations you want.  The unpackers do not change or decompress any contents from the packs they simply split the packs into chunks of the relevant length and write them as separate files, the chunks are then combined back together when they are 'packed'.
  
 
===Porting by Converting back to Original Format===
 
===Porting by Converting back to Original Format===
Line 26: Line 31:
 
<big>'''NOTE'''</big> - The Unpackers e.g. XIDX will provide you with a large folder of '.cas' files - THESE ARE NOT THE SAME AS ORIGINAL/CONVERTED CAS FILES!
 
<big>'''NOTE'''</big> - The Unpackers e.g. XIDX will provide you with a large folder of '.cas' files - THESE ARE NOT THE SAME AS ORIGINAL/CONVERTED CAS FILES!
 
You need a full set of the correct type of 'cas' (unpacked OR original/converted), you can't mix and match some of each...
 
You need a full set of the correct type of 'cas' (unpacked OR original/converted), you can't mix and match some of each...
 +
 +
[[Category:M2TW Modding]]

Latest revision as of 08:00, 7 January 2023

Unit animations in M2TW are based on a skeleton system using a maximum of 24 bones.

There are two different ways of importing skeletons and animations to a mod.

Original Game

Although M2TW ships with a copy of descr_skeleton.txt it is not read by the game unless the pack and skeletons .idx and .dat files in data/animations are deleted. The game cannot rebuild the pack/skeletons files with the information originally shipped with the game.

Caliban from CA supplied a full set of original .cas and .evt files which can be added to the data/animations folder and will allow the game to rebuild the packs based on the contents of descr_skeleton.txt

The .cas files for the siege engines are in the same format as those supplied by Caliban, they are never packed.

Scaling

The Caliban/full cas animations should be regarded as being as scale 1:1. If descr_skeleton.txt specifies a scale other than 1 then all the animations packed by the game for that skeleton will be adjusted to that scale. If the same animation is used by multiple skeletons which have different scales then multiple versions of that animation will be created at each of the scales. Therefore the pack can contain multiple files that say they are, for example:
data\animations\MTW2_Spear\MTW2_Fast_Spear_run.cas
this doesn't cause a problem when using the packs, but can cause issues with tools attempting to unpack the segments, as files with the same name and folder path would overwrite each other.

Porting Modded Skeletons

The easiest way to get a newly created skeleton into the pack files is by letting the game rebuild from the full .cas and .evt files and descr_skeleton.txt.

Once the packs have been made the .cas and .evt files can be deleted from the modfolder.

Porting by Merging Packs

If you need skeletons and anims that exist in two or more separate packs you can merge them into one pack by using tools such as XIDX. These 'unpack' the skeletons (which contain the .evt information) and the anims, they provide you with a list of skeleton names and animation names and you can then manipulate the lists to re-pack the skeletons and animations you want. The unpackers do not change or decompress any contents from the packs they simply split the packs into chunks of the relevant length and write them as separate files, the chunks are then combined back together when they are 'packed'.

Porting by Converting back to Original Format

Using a combination of the original .cas and .evt files supplied by Caliban, original modded .cas files if available, or converted .cas files using JoJo's tool, or a full set of converted .cas files using IWTE, you can get the game to rebuild from a descr_skeleton.txt file. IWTE will write a descr_skeleton.txt file for each pack set it unpacks, you can then text edit the required skeletons into one file.

Gigantus's DEVKIT provides a mod-folder set-up with Caliban's animations and a mechanism for automatically getting the packs to regenerate.

NOTE - The Unpackers e.g. XIDX will provide you with a large folder of '.cas' files - THESE ARE NOT THE SAME AS ORIGINAL/CONVERTED CAS FILES! You need a full set of the correct type of 'cas' (unpacked OR original/converted), you can't mix and match some of each...