Results 1 to 8 of 8

Thread: Animations and Skeleton Unpacking Tool

  1. #1
    The Holy Pilgrim's Avatar In Memory of Blackomur
    Citizen

    Join Date
    Feb 2009
    Location
    Someplace other than here
    Posts
    11,913

    Default Animations and Skeleton Unpacking Tool

    Hello everybody,

    After quite some time of holding on to this, I've decided to release this to the general public.

    What we have here is a tool that can successfully extract and repack skeletons and animations from any mod, AND IT WORKS!

    I've used this for countless personal mods and I've even sent the tool to members who asked me for the tool. So now, here it is, for public use.

    INSTRUCTIONS

    Extract the all of the files and folders to your "mod_folder/data/animations" folder. In order to extract skeletons, just run the "Extract_skeletons.bat" file. To extract the animations, just run the "Extract_animations.bat" file. Doing so will give you all of the raw data files of any mod.

    When you extract the skeletons, a file called "list.txt" will pop up. This list contains the name for every skeleton that is in the current skeleton.dat file. Whenever you add a skeleton to the mod, you must add the file's name to the "list.txt" file. When you are ready to repack your files, delete the "skeleton.dat" and "skeleton.idx" files and run the "pack_skeletons.bat" file. This will create a new "skeleton.dat" and "skeleton.idx" file.

    The same thing goes for animations. There will be a file called "anim_list.txt." That is the file that contains the path of every animation that will be included in the new "pack.dat." When ready to repack, just delete the "pack.dat" and "pack.idx" files and run the "pack_animations.bat" file. It will then proceed to pack all of the animations from the paths specified in the "anim_list.txt." It will also create a new "pack.dat" and "pack.idx" file.

    That's all there is to using the tool. Simple enough for beginning modders and useful enough for projects that call for the resources of other mods.

    KNOWN BUGS
    Forsome reason, the only two skeleton files that have never worked for this tool are the goblin_halberd and dwarven_halberd skeletons from TATW, but all others have worked with this tool without fail.

    CREDITS AND DISCLAIMERS
    This tool is not mine; I did not make and I do not claim to have made it. This tool was given to me long ago by Isilendil (now Werebear), and even then, I still do not know who the original author was.
    Under no circumstances is this tool permitted to be used for the taking of another mod's material for public release UNLESS YOU HAVE PERMISSION FROM THE CREATOR OF THE CONTENT TO DO SO. Stealing the work of another modder without permission or necessary credits can and will result in infraction.

    Please use this tool responsibly and have fun modding

    DOWNLOAD
    at the bottom of this post
    Attached Files Attached Files

  2. #2

    Default Re: Animations and Skeleton Unpacking Tool

    Okay, I tried this out and while it extracts everything successfully, I can't seem to be able to animerge it with anything. It doesn't go through.

  3. #3
    The Holy Pilgrim's Avatar In Memory of Blackomur
    Citizen

    Join Date
    Feb 2009
    Location
    Someplace other than here
    Posts
    11,913

    Default Re: Animations and Skeleton Unpacking Tool

    If it's what I think it is, then I believe that you can extract animations the "normal" way, and then use this tool to repack them correctly.

    This tool does not need the other part to work. You can use it to just extract or to just pack, depending on your preferred methods.

    I'm afraid that I have never quite tooled with animerge, so I have no troubleshooting experiences with it.

  4. #4

    Default Re: Animations and Skeleton Unpacking Tool

    Quote Originally Posted by The Holy Pilgrim View Post
    Hello everybody,

    After quite some time of holding on to this, I've decided to release this to the general public.

    What we have here is a tool that can successfully extract and repack skeletons and animations from any mod, AND IT WORKS!

    I've used this for countless personal mods and I've even sent the tool to members who asked me for the tool. So now, here it is, for public use.

    INSTRUCTIONS

    Extract the all of the files and folders to your "mod_folder/data/animations" folder. In order to extract skeletons, just run the "Extract_skeletons.bat" file. To extract the animations, just run the "Extract_animations.bat" file. Doing so will give you all of the raw data files of any mod.

    When you extract the skeletons, a file called "list.txt" will pop up. This list contains the name for every skeleton that is in the current skeleton.dat file. Whenever you add a skeleton to the mod, you must add the file's name to the "list.txt" file. When you are ready to repack your files, delete the "skeleton.dat" and "skeleton.idx" files and run the "pack_skeletons.bat" file. This will create a new "skeleton.dat" and "skeleton.idx" file.

    The same thing goes for animations. There will be a file called "anim_list.txt." That is the file that contains the path of every animation that will be included in the new "pack.dat." When ready to repack, just delete the "pack.dat" and "pack.idx" files and run the "pack_animations.bat" file. It will then proceed to pack all of the animations from the paths specified in the "anim_list.txt." It will also create a new "pack.dat" and "pack.idx" file.

    That's all there is to using the tool. Simple enough for beginning modders and useful enough for projects that call for the resources of other mods.
    First of all I would applaud the spirit of releasing internal tools. Even if you are "late" in doing so, releasing tools and code to them can only help to advance the field of modding because they represent in depth knowledge about how the game & modding works.

    However secondly I also feel I have to advise against the use of this tool. Allow me to explain my views, based on my analysis of the contents of the download.

    What this tool actually amounts to
    Unless I am missing something here this is a slightly modified version of XIDX version 0.97 which is still available for download from the TWC, plus a few wrapper batch files which use some XIDX features to produce/consume the file lists. Off the top of my head the modifications are:

    • Disabled path rewriting by XIDX, (which is a feature of the original to improve interoperability in a Windows environment)
    • Changed some RTW file version constants used by the program to M2TW equivalents.


    This means that where the original could do things with RTW packs this one is supposed to handle M2TW ones only.

    What this means
    Unfortunately if I am right it is also utterly incompatible with RTW now.

    Additionally the first change is somewhat dubious. On the one hand it was never a very good idea for XIDX to second guess what you meant, but while the change will stop XIDX from messing with the path names you supply it does not seem to have been done with any great understanding of why XIDX did it in the first place. The reason is a bug fix for limited/broken-by-design behaviour of the Windows commandline environment which XIDX was always meant to interoperate with (the examples given by the original XIDX Readme bear this out, it refers to taking the output of a DIR command and feeding it to XIDX, but DIR exhibits nasty behaviour which requires you to change the paths if you want to generated IDX/DAT files to be portable). So with this new version of XIDX 0.97 you are officially forced into the, tedious and error prone manually maintain-a-list-of-files-because-using-the-commandline-looks-harder-than-it-actually-is way of doing things.

    The kicker, or: why you should not use this tool
    First of all there is a much improved version of XIDX out there, with bugfixes and support for both M2TW and RTW file formats and support for event packs as well. It even runs on other platforms besides Windows. See the linky in my signature for details. It's been out there for close to a couple of years now.

    While XIDX 0.97 may be quite outdated this may not matter to you. However it also suffers from a number of subtle and not-so-subtle memory management issues. This equates into: XIDX 0.97 is buggy in a number of ways and none of them are fixed in this yet-another version of XIDX. Examples are: allocates memory for each entry in an IDX/DAT archive, but only uses the memory for the first one (which is "harmless", all it does is push up the memory requirements), various segfaults (XIDX 0.97 comes with its own string class, which comes with its own segfaults which is a decidedly unfortunate trait). The tool still only works properly on Windows, it relies on the Windows shell (commandline) to copy files around, for example. Additionally it has some edge cases with handling of file names which may trigger funny now-you-see-me-now-you-don't behaviour with files.

    Fortunately the XIDX version we developed over at Europa Barbarorum fixes most if not all of them, which if nothing else is a good reason to use our version instead of the broken old one. This is also the reason why I think you should use our version instead of this new-yet-outdated alternative: we have the same features as well (use the -m switch) but fewer bugs.

    The above is why you should use our version, and why you should not use the old one(s). Here's why you should discourage the use of the version presented in the thread: there are now 3 different versions of XIDX, subtly different too because this version will not advertise the fact that it is different from the old one. This means that people cannot use the "XIDX" tool interchangeably, because while the EB version remains compatible with the old XIDX v 0.97 this one breaks compatibility for no good reason (the EB one uses extra commandline switches which would be ignored by the old version of XIDX). This has consequences, for a start:

    • It can lead to hard problems to debug, for no other reason than "you're accidentally using an incompatible version of XIDX".
    • It also leads to confusion because searching for "a tool to repack animations" is now going to turn up three different ones, and if you didn't know in advance you really wanted to use our EB version you may pick the wrong one (e.g. the old XIDX v 0.97 to work with M2TW animations or this version of XIDX 0.97 to work with RTW ones).
    • Old modding tutorials were written with the old XIDX v 0.97 in mind, and this tool does nothing to advertise the fact it is incompatible. This means people need to exercise more caution with the tools, which requires an understanding that is usually a bit beyond the scope of the tutorial itself.



    KNOWN BUGS
    Forsome reason, the only two skeleton files that have never worked for this tool are the goblin_halberd and dwarven_halberd skeletons from TATW, but all others have worked with this tool without fail.
    A reason could be the names of the skeletons coincide with the names of directories (to store animations, for example), which is why the XIDX version by the Europa Barbarorum team features a -b switch to workaround this issue when packing/extracting files!

    CREDITS AND DISCLAIMERS
    This tool is not mine; I did not make and I do not claim to have made it. This tool was given to me long ago by Isilendil (now Werebear), and even then, I still do not know who the original author was.
    Well the tool's source code does explain this, albeit with some information elided. But here's the deal: XIDX 0.97 was originally written by Vercingetorix, and released under the GPL v2 (or at your option a later version). Which is something that technically should've been mentioned. I guess that means Isilendil/Werebear probably made the changes to work with M2TW versions of the files instead of the RTW ones.

    Quote Originally Posted by warman222 View Post
    Okay, I tried this out and while it extracts everything successfully, I can't seem to be able to animerge it with anything. It doesn't go through.
    Which is no surprise as there is nothing in XIDX that deals with modifying files beyond a somewhat dubious animation scaling bodge. In particular XIDX has no idea what the contents of a skeleton file are (or indeed what skeleton files are at all). It just thinks "blobs of data" and "this blob of data should go over there". That's about as sophisticated as the tool's source code is.
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  5. #5
    leo.civil.uefs's Avatar É nóis que vôa bruxão!
    Join Date
    Sep 2010
    Location
    Brazil
    Posts
    3,135

    Default Re: Animations and Skeleton Unpacking Tool

    does anyone know anything about animations getting bugged while packing/unpacking with tis tool? And a possible solution for this?

  6. #6

    Default Re: Animations and Skeleton Unpacking Tool

    Quote Originally Posted by leo.civil.uefs View Post
    does anyone know anything about animations getting bugged while packing/unpacking with tis tool?
    No. Hypothetically the scaling feature could introduce bugs mainly to do with animation speed/distance calculations because IIRC they are not updated when the scaling factor is applied. So there's that. You would know if you used that feature, though: if you need to ask you're not using it.

    However judging by your previous posts I'm getting the impression that the problem is between your ears. XIDX only cares about the IDX file format (a glorified list of files), not what goes into the DAT (the actual file contents from the files you pack). XIDX doesn't know anything about animations, and you really really want to avoid any feature of it that pretends otherwise. XIDX will not detect you packing files of the wrong format, XIDX will not stop you from trying because XIDX is not even aware of the file formats.

    It seems as if you keep trying to use every possible variant of XIDX to pack your custom M2TW animations without converting them to the correct file format first. Let's put it this way: if your animation has names for bones, a basepose, a version stamp, timing information for each frame (key) and all the other meta data, then it's most definitely the wrong file format.

    See for yourself: extract Vanilla animations using XIDX, then open them in a hexeditor. Compare that with your own animations in a hexeditor and judge for yourself.

    And a possible solution for this?
    Don't use this tool? Don't pack animations of the wrong file format but convert them to the correct format first?
    -Tellos Athenaios
    CUF tool - XIDX - PACK tool - SD tool - EVT tool

    ὁ δ᾽ ἠλίθιος ὣσπερ πρόβατον βῆ βῆ λέγων βαδίζει” – Kratinos in Dionysalexandros.

  7. #7

    Default Re: Animations and Skeleton Unpacking Tool

    Hi, im trying to add marka horse animations to DLV using this tool with this method :http://www.twcenter.net/forums/showt...nimation-files!
    But when i repack DLV skeletons with marka's and launch the game i have an unspecified error and game crash directly. Someone know how to add some existing skeletons to an other mod easly?
    I can see when extracting skeletons from idx and dat it give me no formated files, may i have to convert skeletons files before repacking? if yes how?

  8. #8

    Default Re: Animations and Skeleton Unpacking Tool

    Excuse Me.
    You could help me?
    After unpacking the file animation «M2TW Animation Tool», I knock error when importing .cas animation in 3ds Max script Cas_utilities.ms.


    MTW2_axe.
    http://www.mediafire.com/download/eg...5g/MTW2_axe.7z

    P.S. Sorryfor my English. I use a translator.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •