Hi Tanauser,
Finally got a chance to put your animation in game. This is the medium
difficulty option. For this I pretended that the musketeers were your
bluecoat model and I wanted to create a custom animation family for them
and have all others use the vanilla MTW2_Musketeer family.
My setup is this: I mod descr_skeleton.txt in the vanilla \data folder.
(Probably you could copy to your mod folder and io_filefirst would find it
there but my experiments from last summer were done this way so I'm
following that again.) I also mod the battle_models.modeldb file in the
vanilla \data\unit_models directory. This is non-negotiable I believe, the
game only parses this file in that directory unless something changed in
the 1.2 patch and nobody told me.
(1) Create a new directory in Caliban's animation directory. I called it
MTW2_Winchester. (Again, you might be able to do this in your mod
folder, I just didn't do it that way before.) I put your file
MTW2_Musket_attack_missile_reload.cas
with the changed reload animation in it.
(2) Edit the vanilla descr_skeleton.txt file (maybe a copy in a mod folder
would work, a good experiment to try). This is what I put in, I named
the animation family "MTW2_Winchester".
Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
type MTW2_Winchester
reference_points siege_engines/UnitModelsRefPoints/Arquebus_Ref_Point.modelReferencePoints
parent MTW2_Musket
;locomotion_table soldier
anim default data/animations/MTW2_Musket/MTW2_Musket_basepose.cas
anim stand_a_idle data/animations/MTW2_Musket/MTW2_Musket_stand_A_idle.cas -fr -evt:data/animations/MTW2_Musket/MTW2_Musket_stand_A_idle.evt
anim attack_missile_reload data/animations/MTW2_Winchester/MTW2_Musket_attack_missile_reload.cas -fr -evt:data/animations/MTW2_Musket/MTW2_Arquebus_attack_missile_reload.evt
;;;;;;;; weapon
type MTW2_Winchester_Primary
suppress_refpoints_warning
parent MTW2_Musket_Primary
suppress_refpoints_warning
anim default data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim stand_a_idle data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim stand_a_to_ready data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim stand_b_to_ready data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim stand_c_to_ready data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim ready data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim ready_to_stand_a data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim attack_missile_ready data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim attack_missile_hold data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim attack_missile_release data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
anim attack_missile_reload data/animations/MTW2_Musket/weapon/w_MTW2_Musket_default.cas
Basically, all I did was copy the Arquebus entry, including the weapon bit,
and just renamed the red parts. Note that the parent keyword just
defaults everything back to MTW2_Musket. Since we don't have
a non-standard skeleton we DON'T have to copy everything to the
new directory. (If you had gone with the bone_lever option, that's the
really difficult way. All the animations have to be copied and the new
skeleton exported to, and the entry for this file gets really large.)
(3) Assign this new animation family to your unit in battle_models.modeldb.
For my experiment I just assigned it to the Musketeers.
Code:
10 musketeers
1 4
54 unit_models/_Units/RN_Light_Lmail/musketeers_lod0.mesh 121
54 unit_models/_Units/RN_Light_Lmail/musketeers_lod1.mesh 900
54 unit_models/_Units/RN_Light_Lmail/musketeers_lod2.mesh 2500
54 unit_models/_Units/RN_Light_Lmail/musketeers_lod3.mesh 6400
4
5 spain
71 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_spain.texture
72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture
40 unit_sprites/spain_Musketeers_sprite.spr
8 portugal
74 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_portugal.texture
72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture
43 unit_sprites/portugal_Musketeers_sprite.spr
5 milan
71 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_milan.texture
72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture
40 unit_sprites/milan_Musketeers_sprite.spr
6 venice
72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_venice.texture
72 unit_models/_Units/RN_Light_Lmail/textures/RN_Light_Lmail_normal.texture
41 unit_sprites/venice_Musketeers_sprite.spr
4
5 spain
67 unit_models/AttachmentSets/Final European CB Gun_spain_diff.texture
67 unit_models/AttachmentSets/Final European CB Gun_spain_norm.texture 0
8 portugal
70 unit_models/AttachmentSets/Final European CB Gun_portugal_diff.texture
70 unit_models/AttachmentSets/Final European CB Gun_portugal_norm.texture 0
5 milan
67 unit_models/AttachmentSets/Final European CB Gun_milan_diff.texture
67 unit_models/AttachmentSets/Final European CB Gun_milan_norm.texture 0
6 venice
68 unit_models/AttachmentSets/Final European CB Gun_venice_diff.texture
68 unit_models/AttachmentSets/Final European CB Gun_venice_norm.texture 0
1
4 None
15 MTW2_Winchester
20 MTW2_Non_Shield_Fast 1
19 MTW2_Musket_Primary 1
18 MTW2_Sword_Primary
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
(4) Last step. Backup the pack.dat, pack.idx, skeleton.dat, and skeleton.idx
in your mod folder America\data\animations directory then delete them so
the game rebuilds the animation packs.
I played Spain (with Musketeers so using the new anim) against England
with Arquebusiers (not using the new anim).
Please don't think this worked the first time for me. I fussed around
with it for two hours with endless CTDs before it worked. I think the
main thing is you can't skip the matching weapon section in descr_skeleton.txt
even though you don't use it.
Give it a try and post back how it goes.
Bookmarks