Results 1 to 4 of 4

Thread: Porting animations between mods.

Threaded View

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

    Icon1 Porting animations between mods.

    FOLLOW THE COLORS

    1 - Play the mod you want to extract the animation from, memorize the name of the unit you want the animation from. Open the export_units.txt file and search for the unit name.

    You will find something like in this example:

    Code:
    {Mercenary_Wardogs}Wardogs
    Memorize the text inside the brackets {}

    Open export_descr_units.txt file. Search for the name from the brackets, there is your unit entry.
    Check the armour_ug_models line, here's one example:

    Code:
    armour_ug_models haradrim_heavy, haradrim_heavy_upg
    Memorize the first name. The second one is the armor upgrade model, wich uses the same animation so just ignore it.

    Open the battle_models.modeldb file. Search for the name you just memorized. There is the entry of your unit. Each entry looks like this example:

    Code:
    11 Chaos_hound 1 1 
    49 unit_models/_units/wardogs/Chaos_hounds_lod0.mesh 10000 
    2
    3 hre
    62 unit_models/mounts/mount_light_wolf/textures/khornhond.texture 
    69 unit_models/mounts/mount_light_wolf/textures/khornhond_normal.texture 
    44 unit_sprites/hre_mount_light_wolf_sprite.spr 
    5 slave
    62 unit_models/mounts/mount_light_wolf/textures/khornhond.texture 
    69 unit_models/mounts/mount_light_wolf/textures/khornhond_normal.texture 
    44 unit_sprites/hre_mount_light_wolf_sprite.spr 
    0 
    1 
    8 elephant 
    17 Warhammer_dog1.25 0  
    0 0 -1 0 0 0 0 0 0
    The name in bold is the skeleton of your unit. Memorize it.

    2 - Check the /data/animations folder inside the mod you want to extract the animations from, there is the 4 files you need:

    pack.dat
    pack.idx

    skeletons.dat
    skeletons.idx


    3 - Create a folder in your desktop (or wherever you want) called "skeletons" or whatever you want. Copy the skeletons.dat and skeletons.idx from the mod and paste inside the "skeletons" folder you just created.

    4 - Download this tool.

    5 - Open the tool, navigate to animations/skeletons tools. Click Unpack DAT, select the skeletons.dat file from STEP 3 (wich is in your desktop or wherever you placed it). Wait for the extraction.

    6 - Check the the "skeletons" folder you created. There is now lots of unpacked files there, these are the skeletons. There is also a skeletons.list file there, this .list file can be opened with any simple text editor (like notepad). This list tell the tool what files to repack when the repack process is done (later).

    Look in this list for the line of the skeleton you want. You got the skeleton name in STEP 1. You will find the exact same name.
    Copy and paste the line into a new .txt file.

    Also copy the skeleton file itself (wich is inside the same folde of the .list file) and paste it somewhere.

    YOU NOW HAVE BOTH THE SKELETON FILE AND ITS TEXT LINE. KEEP THEM.

    7 - Repeat STEP 3 and 5 now for the pack.dat and pack.idx files. MUST BE A NEW FOLDER!

    8 - Check the folder you created in STEP 7. There is now pack.list file there as well as one or more folders. This pack.list file contains the paths for the animations files. These animations are inside folders. This pack.list file has a similar function to the skeletons.list one.

    If the descr_skeleton.txt file of the mod is updated according to the animations in it then just open it and look for the skeleton name, you will find there the entry with the names of the folders and files you need. If the descr_skeleton.txt is not updated, then you're mostly blind about how to find the animations linked to the skeleton. BUT, these animations are generally inside a folder with the same name of the skeleton, so its it ends up being quite obvious.

    Open the pack.list you got from STEP 7. In this file you'll find the paths for the animations files contained in the folders.

    Example, you want the animations for the dwarf diplomat, you should take the following lines, all the bold ones:

    Code:
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Princess/Strat_princess_conduct_diplomacy.cas|Unmapped|0.600000024mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Princess/Strat_princess_die_backward_1.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Princess/Strat_princess_die_forward_1.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Princess/LID 01 Standing idle.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_backward_1.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_basepose.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_conduct_diplomacy.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_forward_1.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_no_mp_idle.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_no_mp_to_stand_A.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_selected.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_idle.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_idle_selected.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_lf_idle_1.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_lf_idle_2.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_lf_idle_3.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_to_no_mp.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_to_walk.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_to_walk_backward.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_turn_90_ccw.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_stand_A_turn_90_cw.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_unselected.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_walk.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_walk_backward.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_walk_backward_to_stand_A.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Diplomat/Strat_Diplomat_walk_to_stand_A.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Merchant/Strat_Merchant_aquire.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Merchant/Strat_Merchant_aquire_impact.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Merchant/Strat_Merchant_basepose.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Merchant/Strat_Merchant_die_backward_1.cas|Unmapped|0.600000024
    mods/Anim_Step_A/data/animations/Stratmap_Dwarf_Merchant/Strat_Merchant_die_forward_1.cas|Unmapped|0.600000024
    As you can see these lines contain folder paths and file names, quite self explanatory. Copy all the lines related to the animation. And copy also the folders containing the animations you want.

    Paste them somewhere

    YOU NOW HAVE BOTH THE ANIMATION FOLDERS/FILES AND ITS TEXT LINE. KEEP THEM.

    9 - Now you need to UNPACK the animations and skeletons of your OWN MOD. Do it, creating new folders in your desktop like you did before, so everything is kept organized.

    Once you have your files unpacked, you need to edit YOUR .list files by adding the lines you previously got from the OTHER MOD. Do it for both the pack.list and skeletons.list, accordingly.
    You can place the new lines on the botton end of each list.

    Now paste the skeleton file and the folders/files you got from the other mod INSIDE THE FOLDERS WHERE THE UNPACKED ANIMS AND SKELETONS FILES ARE. Accordingly. The structure is the same you dealt before.

    WARNING: The file paths in pack.list must match the actual folder organization inside the pack. If you change the actual location of the files, you need to change also the paths in the .list file. I recomend you keeping it exactly as it is in the other mod, BOTH THE FOLDER/FILES POSITION AND THE PATHS IN THE .LIST FILE, so to avoid typos and confusion.

    10 - Now your pack has the files you want, and they are listed in the .list files, so the REpack process will repack everything including the new anims. Use the tool again but now click the PACK DAT button.
    It will ask for the .list files for both repacking the anims and the skeletons. navigate to them (the ones of your mod, NOT from the source mod where you got the anims from), and select them.

    The new packs will have "created" in their names. Rename them to the original name. you can also now delete the original files.

    Thats it, you have new pack.idx, pack.dat, skeletons.idx and skeletons.dat files and they contain the new anims you wanted.

    Place these files in your mod (data/animations)

    When creating your new unit, take the entry from the battle_models.modeldb file of the mod you took the animation from. The bold part in this example:

    Code:
    11 Chaos_hound 1 1
    49 unit_models/_units/wardogs/Chaos_hounds_lod0.mesh 10000
    2
    3 hre
    62 unit_models/mounts/mount_light_wolf/textures/khornhond.texture
    69 unit_models/mounts/mount_light_wolf/textures/khornhond_normal.texture
    44 unit_sprites/hre_mount_light_wolf_sprite.spr
    5 slave
    62 unit_models/mounts/mount_light_wolf/textures/khornhond.texture
    69 unit_models/mounts/mount_light_wolf/textures/khornhond_normal.texture
    44 unit_sprites/hre_mount_light_wolf_sprite.spr
    0
    1
    8 elephant
    17 Warhammer_dog1.25 0  
    0 0 -1 0 0 0 0 0 0
    battle_models.modeldb is a tricky file, you need to edit the other lines too, but this is up to another tutorial.

    THE END.
    Last edited by leo.civil.uefs; May 02, 2022 at 01:06 PM.

Posting Permissions

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