Results 1 to 11 of 11

Thread: Need help with Exporting New Animations

  1. #1

    Default Need help with Exporting New Animations

    I must be doing something worng...but I can't quite put my finger on it!

    I have downloaded Vercingetorix's animation tools and extracted all the animations from the packed archive. These have come out in a sub folder of anims ( so I now have data/animations/data/animations ...all the files)

    Using the animation editor exe file, I was able to read an animation ( I used fs_spearman ) and then add a new animation called fs_spearman2

    The game happily used this animation when I changed the carthaginian militia animation from fs_spearman to fs_spearman2 in the descr_model_battle file. I made no other changes. Confirmed to me that descr_skeleton is not really a factor...

    so...I figured I would take the nexst step!

    The actual skeleton animation set is made up of a whole load of individual CAS files which contain the animations for each models various movements.

    I tried to load one up using the import script for Max 6, but got an error stating the 'root bone' was missing or some-such thing. I guessed the animation routine needed a model to work on, so I imported my 'skeleton' models mesh and re-imported the animation. It worked. I could run the animation in Max no problem.

    When I tried to export this new animation, though, I ran into problems.

    I exported the CAS file I had ( which contained, I presume, my mesh and a series of keyframe animations on the underlying bones ) I ran the update batch file and tried to run the game. This resulted in a total lock up...... needed to re-boot.

    Now I am stuck!

    Questions:

    1) Does the model I imported to run the animations have any bearing on this? I assumed it wouldn't since the animations are common to multiple models.

    2) Did I do something wrong by just exporting the whole lot to the animation CAS file? Should I remove the mesh first and just export the bones?

    3) I tried scaling the skeleton in the animation file before export. Could this have any impact? I would have thought this would have re-located the pivot points but not had any overall impact on anything else. The animation still played in Max.....

    I have had a look around, but can't find any tutorials on doing this other than Vercingetorix's basic instructions to use the tools. This bit works fine... it's just what comes next that is baffling me
    Careless Orc Costs Lives!

  2. #2
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Need help with Exporting New Animations

    I read it quickly so I'm not sure if this covers all your questions:

    Editing animations
    1. Import a model

    2. Import a valid animation (ie do not try to import a slinger animation for a pike model)

    3. Edit animation.

    4. Export animation. The tool only looks at the translation and rotation of the bones. How the mesh looks like does not matter.

    Since I am able to translate bones, I guess that scaling is not a problem.

  3. #3
    Member Member MR EGG's Avatar
    Join Date
    Jan 2003
    Location
    WOOLACOOBE N,DEVON
    Posts
    126

    Default Re: Need help with Exporting New Animations

    Hello Bwian
    did you try running the game before you added your new animations?
    what I mean is did you run the animeditor and so fourth and then try the game with original files before adding your animations? if so did it ctd ?if that worked how or what did you do?
    Sorry about all the questions but it's really annoying me

    thanks M.EGG

  4. #4
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Need help with Exporting New Animations

    Pay attention to your own thread, Mr Egg.

  5. #5

    Default Re: Need help with Exporting New Animations

    Thanks for the replies Gentlemen!

    Duke Johns point about the valid animation for the model might well be it. My undead warrior was based on a peasant model, and the bone naming and detail layout may well differ. I will re-run my steps with that in mind!

    Mr Egg ... Short answer is yes....with a bit of No ;)

    I extracted all the animations from the DAT file and ran the game to check everything still worked.
    Next I used the animeditor tool to create a new animation which was a COPY of an original one. It was basically just a re-name. I amended the text file to look for it, and that ran OK. This confirms to me, anyway, that the basic tool is not at fault....but rather my application of it!
    The last step was to change one of the animation CAS files and update the DAT file using the batch file that the tool creates for this purpose. This was when I got the hard-lockup.

    What I SHOULD have done here was to create my copy animation and run the batch updater WITHOUT MAKING A CHANGE to confirm that this wasn't breaking the DAT file. Will do that tonight :D

    I will let you guys know how I get on!
    Careless Orc Costs Lives!

  6. #6

    Default Re: Need help with Exporting New Animations



    OK..this is not good.

    I am not sure now if I actually EVER had a new skeleton that worked. If I did, I cannot reproduce it. I also noted that there is no batch file to add the new animation. It looks like the program does it automatically.

    Now...first things first...the file structure:

    When I run the Idx Extractor, I get the following:

    Rome Total War/data/animations/data/animations

    The extracted files and subfolders with the animations are in the second set of subfolders. Do I need to move these files ? When I try to, the AnimEditor cannot find any of the animation files when I attempt to create a new skeleton. This tells me that the program is happy with this slightly odd folder setup!

    Once I have run the AnimEditor ( version 0.44 ) I get a folder created amongst the subfolders named the same as my new animation.

    If I LEAVE THAT WHERE IT IS CREATED, the game crashes with a de-bug message stating that it cannot find my new skeleton. If I move this animation folder on it's own down to the ORIGINAL data/animations folder, the game locks up when I start it.

    If, however, I run the 'update' batch file, I get a whole load of files that it can't find, MIXED IN WITH some files that it is adding.... Once I have done this, the animation seems to work.

    The problem is, I can't see what files it has added that I missed....or why it missed them. As a double 'confusion' factor, there are 77 files in the new animation folder for my anim....and the descr_skeleton says 66....
    Last edited by Bwian; 01-10-2005 at 20:09.
    Careless Orc Costs Lives!

  7. #7
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Lightbulb Re: Need help with Exporting New Animations

    The problem is, I can't see what files it has added that I missed....or why it missed them. As a double 'confusion' factor, there are 77 files in the new animation folder for my anim....and the descr_skeleton says 66.
    I think that while a skeleton is linked to 77 animations not all of them are actually used. Get used to the concept of garbage files littering your R:TW installation. Any way do not worry about the number of animations.

    If, however, I run the 'update' batch file, I get a whole load of files that it can't find, MIXED IN WITH some files that it is adding.... Once I have done this, the animation seems to work.
    Yes, it seems that you need first need to run the update batch file to add the animations. Since the 'replace' command is used (read the readme) it tries to find the new animations, but since this is the first time you update they aren't there, and the DOS window displays that it cannot find the files. Nothing to worry about.

    Here is a quick guide:

    Step 0: Preparations
    Get the XIDX tool and the AnimEditor made by Vercingetorix. Read the readme's before using them!
    Copy the following files located in Data\animations\:
    - pack.dat
    - pack.idx
    - skeletons.dat
    - skeletons.idx
    skeletons.idx

    And paste them into a modding directory, ie a directory where you place files that you are modding. Always backup!

    Step 1: extract animations
    With the XIDX tool extract the animations. A directory called Data + lots of subdirectories are created.

    Step 2: duplicate animation
    Pick a skeleton that suits your type of soldier. Then run AnimEditor which should be placed in the modding directory in which is also placed the Data directory created by XIDX. A DOS window pops up. Press n (read readme!). Then type in the skeleton that you want to duplicate. Then give the duplicate a new name, let's say DuplicateSkeleton. Type q to quit.

    AnimEditor has now created a directory with the new name you have just typed in, DuplicateSkeleton. This new directory is located in Data\animations

    Step 3: Edit animation
    With 3ds Max edit the animations located in the new directory.

    You might want to skip this step in the first run just to make sure that you have understood everything.

    Step 4: Update animation files
    Then back in the modding directory run DuplicateSkeleton_UpdateAnims.bat. You should notice a size difference in the pack files.

    Copy/paste
    - pack.dat
    - pack.idx
    - skeletons.dat
    - skeletons.idx
    skeletons.idx

    into your R:TW installation; Data\animations

    Step 5: Assign skeleton
    In model_battle.txt you can assign your new skeleton to a soldier.



    It should work. Please fill in any gaps so that we can have a complete guide.

  8. #8

    Default Re: Need help with Exporting New Animations

    OK...some progress has been made :D

    By running the 'update' batch file, it seems to add in some animations that the initial adding had missed. This has cured my problems with the game locking up, and it appears that my animations are now being used. If I had made some changes and then updated the thing with the batch file, I would not have had this trouble :D

    There is still a problem though...

    I scaled up the imported mesh by a factor of about 2,I selected EVERYTHING in the file, mesh, skeleton, etc. and applied the uniform scale. Then I exported this to replace the barbarian standard bearer I was messing about with.

    If I have got this correct.... the result should be a larger model... No

    By scaling the skeleton in this way, I appear to have changed nothing. I know it was looking at my revised anim, since in the first go, I had inadvertantly moved the 'root' away from the origin, and this displaced the model to leave the standard bearer floating in space!

    Do I need to move the pivot points or do something else here? My simple 'scale' approach is not doing the trick.
    Last edited by Bwian; 01-10-2005 at 21:07.
    Careless Orc Costs Lives!

  9. #9
    Senior Member Senior Member Duke John's Avatar
    Join Date
    May 2003
    Location
    Netherlands
    Posts
    2,917

    Default Re: Need help with Exporting New Animations

    Scaling the skeleton in the model is useless. You should scale all animations, or just 1 (idle for example) to try it out.

  10. #10

    Default Re: Need help with Exporting New Animations

    Thats what I was trying to do....but I am a bit confused over exactly what is what here.

    when I try to import just an animation, it gives me an error
    'cannot import animation without the scene root bone'

    It works OK, though, if I import the model first. This obviousely contains a skeleton for the animation to work on. I left the mesh alone, and tried moving each of the pivot points. I only worked on one single animation....the SG 01 Stand Idle.cas for simplicities sake...and to avoid doing lots of work for nothing ;)

    So...with a model loaded, and an animation in Max ... what should I do next?

    I tried:

    1) Scaling the whole thing - mesh, skeleton...everything
    2) Going into Hierarchy tab and trying to move the pivots ( affect pivot only ) and then moved all the pivot points
    3) Moving in Hierarchy with 'affect Hierarchy' checked

    Then I exported my animation to replace the one in the 'standard bearer new' folder. I verified that 'pack.dat' had changed. Finally..I re-ran the update batch file and tried it in game.

    Rather frustratingly, every time I do this, I end up with a completely unchanged standard bearer! The only change I have been able to make was by accident! When I scaled the whole thing, I moved the root bone in the scene, and this lifted the model off the ground!

    I am so close to cracking this.....but my lack of Max skill is showing ;) I haven't used it for animation very much, since I am mainly a mesh-modeller :D
    Careless Orc Costs Lives!

  11. #11

    Default Re: Need help with Exporting New Animations

    Tried something else....and that didn't work either :S

    Tried importing the indvidual modified CAS animation files into the DAT file through animation editor, but that made no difference.

    Duke John.... can you give me a quick rundown on exactly what you did to move the pivots around in the animation files? What I am doing in Max to shift pivots has worked before..and the animations play with the shifted skeletons in max...just don't show up changed in the game.

    I will go back through the whole process tonjight to check for silly errors, etc. but so far, my attempts to actually change an original animation have met with no success.

    Do I need to give my custom animation a unique name?

    I have given the SKELETON a new name, but have simply been changing the animation in Max and exporting the animation only to overwrite the animation in the sub-folder containing my new skeletons CAS files. I wondered if the same animation was used multiple times, whether I was creating a duplicate animation name within the DAT file.

    If I can just get this to work ONCE then I will be off and running
    Careless Orc Costs Lives!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO