Results 1 to 9 of 9

Thread: Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

  1. #1

    Default Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

    I am trying to learn how to import the animations of one mod into another mod. Specifically, in this case I am trying to learn how to import the animations of the Teichon archer from The Great Conflicts mod into Stainless Steel 6.4.

    I have tried to follow the instructions in Briarius’s post many times, but cannot figure it out. To start with, I am just trying to get step one to work: Getting Medieval 2 to automatically rebuild the animations file on loading screen start-up.

    I unpack the pack.dat and skeleton.dat files in the SS6.4/data/animations folder using the M2WMT tool. I then delete the pack.dat and skeleton.dat files from that folder. I also add [util] no_animdb=true to the SS6.4 default.cfg.

    Now, as I understand it, when I start SS6.4, there is supposed to be some sort of lag as the loading screen comes up because the animations are rebuilding, but this lag does not happen, and the new pack.dat and skeleton.dat files do not appear in my SS6.4 data/animations folder. And of course, the game crashes upon loading of Custom Battle as there are no animations.

    Clearly I am doing something wrong.

    I realize that this is only the first step to importing animations, but I’ve really been wanting to learn for many years now. I have already mastered the importation of unit models and therefore have many wonderful new unit models in my SS6.4 already. In fact, there are almost no vanilla unit models in my SS6.4 any longer. And I understand about the animations in the bmdb. If I can figure out how to get the game to rebuild the animations file, then I think I will only have to learn exactly how to import the new .cas into the desc_skeleton.txt file and where to put the new .cas files, and I think it must not be too difficult and I can hopefully figure that out.

    All in all, I think importing animations as I wish to do must be a fairly simple procedure, at least according to Briarius, but so far I haven’t been able to figure out the first step. If anyone could please help me I would very much appreciate it.
    Roland searched the continent for the man who'd done him in
    He found him in Mombasa in a barroom drinking gin
    Roland aimed his Thompson gun. He didn't say a word
    But he blew Van Owen's body from there to Johannesburg
    - Warren Zevon - Roland the Headless Thompson Gunner - 1978

  2. #2

    Default Re: Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

    I have also tried using the M2TW Animations Released by Caliban instead of using the M2TWT tool. I pasted the Caliban animations into the SS6.4 data/animations folder, deleted the pack.dat, pack.idx, skeleton.dat, skeleton.idx files from the same folder, and then restarted the game to see if it rebuilds the animations, but once again, it did not, and I got a crash when I clicked on a unit to fill the roster for a Custom Battle.

    I have also several times tried deleting the above files from the Medieval 2 Total War data/animations folder, but then the game crashes on the loading screen.

    I guess what I'm getting at here is that it is NOT through lack of effort that I am having extreme difficulties. I've even experimented with trying to learn how to import animations several times in the past but always with no success. Once again, if anyone can give me a pointer, I would much appreciate it.

    It also seems like there should be a good, simple, easy to understand tutorial somewhere on this if it is as easy to do as Briarius claims it to be. It just seems that many novice modders like myself must have wanted to import animations in years past, but perhaps for some reason that is not the case. Of course, I realize that at this point in such an old game the modding community has gotten quite small, but still, a simple and easy to understand tutorial on such a useful topic would seem to be invaluable, but I guess that at this point, perhaps only to me. Oh well, thanks again if anyone can help!!!
    Last edited by Kilgore Trout; July 17, 2020 at 05:29 AM.
    Roland searched the continent for the man who'd done him in
    He found him in Mombasa in a barroom drinking gin
    Roland aimed his Thompson gun. He didn't say a word
    But he blew Van Owen's body from there to Johannesburg
    - Warren Zevon - Roland the Headless Thompson Gunner - 1978

  3. #3

    Default Re: Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

    You do not need to rebuild the animations packs and in fact you cannot do this with only unpacked files. I'll explain what I mean by this at the end of this message but in the meantime I'll just run down the steps to successfully port animations between mods.

    1. Make two new working folders in your mod (the "to" mod) named "skeletons" and "animations". Make the same folders in the "from" mod. Move skeletons.dat/.idx and pack.dat/.idx into the appropriate folders for each mod.

    2. Use Modeler's Toolbox to unpack the copied .dat files in their respective folders for both mods.

    3. Locate the animations and skeleton files that need to be ported in the unpacked files of the "from" mod. This is sometimes easier said than done so I'll provide a bit more detail: check the ported unit's bmdb entry. This will show the "skeletons" that it uses. These aren't skeletons in the sense of the actual 3D bones, joints, etc. but rather refers to animation linkages. You can find these files in the unpacked "from" mod's skeletons working folder which you've unpacked in step 2. Open these skeletons files in Notepad++ or etc. and you will be able to find the animations files that it links to. You need to port all of these. If you're really lucky, the "from" mod will contain its original descr_skeleton file and you can also look up the needed animations in there. If you're really, really lucky, the "from" mod will use clearly named folders in their unpacked pack.dat to designate all the new animations you need. In my experience, you will almost never get this lucky and so will need to look up the needed animations in descr_skeleton or directly in the unpacked skeleton files.

    4. Once you've found the necessary unpacked skeleton and animations files, simply copy/paste them into your "to" mod's corresponding skeletons and animations working folders with the correct subfolder directory.

    5. Open the skeletons.list and pack.list files in the working folders. All the files you copy/pasted in step 4 have entries in these list files which also need to be copy/pasted into your "to" list files. The line numbers in these files do not matter. The directories in these files are critically important. They must match where you pasted the ported animations and skeletons files in your "to" working folders. Save the list files.

    6. Use Modeler's Toolbox to re-pack the "to" mod's skeletons and animations packs. It will give you files that end in "_created" or some such. Delete the original packs in your working folder and rename the new ones to match the original names. Make backups of your original packs in your animations folder and then paste in your new skeletons and animations packs. Remove the animations packs of the "from" mod so that they're no longer present in your mods folder (or anywhere near your Medieval II install directory), this is to be sure that your mod is actually using the new animations in its own pack files and not pulling the animations from the "from" mod's packs (which is completely possible).

    7. Launch the mod and see what happens. If everything works well, dance for joy because it's not every day something works correctly on the first try. Most likely, you will get a crash on startup because you didn't port a needed animation file or your directories were incorrect when you repacked your animations pack. These errors will show up in your log so check that to fix them.

    That's it. Now I'll provide some more background information.

    Spoiler Alert, click show to read: 

    Rebuilding the packs in the way you were attempting to do is only possible using "virgin" animations files and the corresponding descr_skeleton file to coordinate those virgin animations files. This is the method to use for adding completely new animations to the game, but it is not needed for porting animations between mods. The .cas files that you get out when you unpack using Toolbox are not the same as "virgin" files that were used to create the pack originally. You can see this if you open the files in Notepad, the data looks totally different. Jojo is currently working on an unpacker that will spit out .cas files in their original format, but we don't currently have access to such a tool and at any rate it is not needed for porting between mods (unless you want to actually edit the other mod's animations, skeletons, or audio events). The unpacked .cas files can still be re-packed and work fine which is what we're doing with the steps above.

    Here's how all the linkages work: bmdb references "skeleton" files. As I mentioned, these aren't 3D skeletons so much as linkages to animations. If you look in descr_skeletons, you will find these entries and see how they are linked to animations .cas files (as well as audio .evt files). When an animator is making new animations, they reference them in descr_skeletons, and put their virgin .cas files in with Caliban's virgin files in a dummy mod's animations folder. Then they remove the animations packs from the root M2 directory (and possibly from other mods that have animations files with conflicting names) and launch the game. This builds the pack files from the virgin .cas files referenced in descr_skeletons. I'm guessing the guide you found explained a similar process.

  4. #4

    Default Re: Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

    Thank you so much Callistonian. Your instructions are clear and I think I can do this. I will give it a try and post here again with the results within the next day or two. Thanks again!
    Roland searched the continent for the man who'd done him in
    He found him in Mombasa in a barroom drinking gin
    Roland aimed his Thompson gun. He didn't say a word
    But he blew Van Owen's body from there to Johannesburg
    - Warren Zevon - Roland the Headless Thompson Gunner - 1978

  5. #5

    Default Re: Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

    Actually, I'm afraid I didn't get very far. I was able to unpack pack.dat and skeletons.dat in the "to" mod, which is SS6.4, and I was able to unpack the skeletons.dat in the "from" mod, which is The Great Conflicts, but I was unable to unpack the pack.dat in the "from" mod. I keep getting the following error message:

    The unpacking process has failed during the extraction process of the DAT file: this can be caused by either invalid file format, mismatching number of entries between IDX file and DAT file, or system errors (file sharing, input/output, or security permissions).

    I'm thinking of posting in the The Great Conflicts forum and asking about how to unpack that file.
    Roland searched the continent for the man who'd done him in
    He found him in Mombasa in a barroom drinking gin
    Roland aimed his Thompson gun. He didn't say a word
    But he blew Van Owen's body from there to Johannesburg
    - Warren Zevon - Roland the Headless Thompson Gunner - 1978

  6. #6

    Default Re: Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

    Did you put pack.dat and skeletons.dat in separate folders before you attempted to unpack them? Are you using the original pack.dat that you downloaded for the mod or are you using a pack.dat which you've already experimented on with your previous attempts? If you still get that error, then yes, you should probably ask if others have had the same problem in that mod's forums.

  7. #7

    Default Re: Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

    Thanks again Callistonian! Yes, I put them in separate folders, and yes, I am using an original copy not a copy I have previously messed with. I have already posted a question in one of The Great Conflict Mods forums. If they respond and I can get that particular pack.dat unpacked, then that would be wonderful as that is the particular model that I most want to import animations for at the moment. Otherwise, I will most likely just try to follow your above instructions with a model from another mod from which I imported units but did not import the original animations. So one way or another I will soon be either dancing for joy or perhaps posing one or two more simple questions. But once again, I want to say that your instructions are quite clear, at least as I understand them thus far, and this looks like something I should be able to achieve without too much difficulty, at least with the right mod with the right files!
    Roland searched the continent for the man who'd done him in
    He found him in Mombasa in a barroom drinking gin
    Roland aimed his Thompson gun. He didn't say a word
    But he blew Van Owen's body from there to Johannesburg
    - Warren Zevon - Roland the Headless Thompson Gunner - 1978

  8. #8

    Default Re: Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

    Callistonian - Great news - I am now dancing with joy! Success! I did it! While I could not unpack the pack.dat from The Great Conlicts, I looked at the desc_skeleton from the Russian mod New Teuton, which I know is very well done and up to date, and even though the animation fast_longbowmen_string, which is what I needed for the Teichon archer model that I wanted to import from The Great Conflicts, was not found in the bmdb of New Teuton, it was listed in the desc_skeleton of New Teuton. So I unpacked the pack.dat from New Teuton to get those cas files. Hooray! Thanks again for your invaluable help!
    Roland searched the continent for the man who'd done him in
    He found him in Mombasa in a barroom drinking gin
    Roland aimed his Thompson gun. He didn't say a word
    But he blew Van Owen's body from there to Johannesburg
    - Warren Zevon - Roland the Headless Thompson Gunner - 1978

  9. #9

    Default Re: Advice requested on getting the game to rebuild animation files using [util]no_animdb = true in .cfg

    I'm glad you got it working. Remember to test all the animations for the new skeleton you're using. As I said, the bmdb links to a skeleton which in turn links to animations .cas files (and audio .evt files), you will not be able to see animations .cas files directly in bmdb.

Posting Permissions

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