Jump to content

Replacing a reloading animation (custom gun) with a custom one?


Recommended Posts

 

 

 

If it is just 'reload" animation that you wanna change, u can try to create ur own custom animation based on the handmade rifle and just modified the reload portion using animation subgraphs. Create an additive to the default animation. You can take a look at the wiki page https://www.creationkit.com/fallout4/index.php?title=Subgraphs

 

It a pretty troublesome steps since u may need to generate animation metadata ....

I have seen this "out of position" issue on animation and its due to mixing different animations made for different gun. For a start, make sure R91 is using its own correct default animation. The holding of the weapon, moving , etc should be correct. Then take the 'reload' of 'Heckler und Koch - MP4 Complex' and add as additive to the default R91. If done correctly, everything will be fine (holding, moving etc) cos u only modified the reload. Then check the reload, since its for different gun, maybe pulling of the gun slide etc is wrong and we can work from there ...

 

Gotcha. I will try and do that and report back. I remember when I was doing the subgraphs, I did indeed pretty much just copy over the entire mp5 animation folder, which may have probably included the said holding animations.

 

 

Was messing around u can take a look:

 

https://drive.google.com/file/d/1eQIug3mVnXn_M8f4Er9UndwPii396WCN/view

 

 

Only added 3rd person view and only for player. I added the extra keyword to the 'R91' weapon, probably missing some other weapons but if u search it thru console command, u should see 3 entries, for me, its the last one. You should get the reload animation of ' 'Heckler und Koch - MP4 Complex' '

 

Since you r using the animations of other MA, maybe its good to ask them for permission? Finally, u can do the same for first person view and other NPCs ...

 

Oh wow, thank you so much! I was in the process of doing it but looks like you were faster. This will be a good reference point. :)

Also the original R91 Expanded mod already included 1st person reload anims, so we're good in that department.

 

As for the reload itself: I tested it and the animation looks to be fitting now. The bolt pulling is a bit off but eh, can't do much about it, unless I somehow manage to edit the animation itself. However, there is for some reason no reload sound in 3rd person.

 

The magazine also completely dissapears when its pulled out and appears only when its put in, during the animation...

 

Any ideas how could these two issues be fixed?

 

EDIT: Also how would one add these animations to NPCs? I assume it's through adding the Synth and Human subgraphs in CK?

Link to comment
Share on other sites

 

 

 

 

If it is just 'reload" animation that you wanna change, u can try to create ur own custom animation based on the handmade rifle and just modified the reload portion using animation subgraphs. Create an additive to the default animation. You can take a look at the wiki page https://www.creationkit.com/fallout4/index.php?title=Subgraphs

 

It a pretty troublesome steps since u may need to generate animation metadata ....

I have seen this "out of position" issue on animation and its due to mixing different animations made for different gun. For a start, make sure R91 is using its own correct default animation. The holding of the weapon, moving , etc should be correct. Then take the 'reload' of 'Heckler und Koch - MP4 Complex' and add as additive to the default R91. If done correctly, everything will be fine (holding, moving etc) cos u only modified the reload. Then check the reload, since its for different gun, maybe pulling of the gun slide etc is wrong and we can work from there ...

 

Gotcha. I will try and do that and report back. I remember when I was doing the subgraphs, I did indeed pretty much just copy over the entire mp5 animation folder, which may have probably included the said holding animations.

 

 

Was messing around u can take a look:

 

https://drive.google.com/file/d/1eQIug3mVnXn_M8f4Er9UndwPii396WCN/view

 

 

Only added 3rd person view and only for player. I added the extra keyword to the 'R91' weapon, probably missing some other weapons but if u search it thru console command, u should see 3 entries, for me, its the last one. You should get the reload animation of ' 'Heckler und Koch - MP4 Complex' '

 

Since you r using the animations of other MA, maybe its good to ask them for permission? Finally, u can do the same for first person view and other NPCs ...

 

Oh wow, thank you so much! I was in the process of doing it but looks like you were faster. This will be a good reference point. :smile:

Also the original R91 Expanded mod already included 1st person reload anims, so we're good in that department.

 

As for the reload itself: I tested it and the animation looks to be fitting now. The bolt pulling is a bit off but eh, can't do much about it, unless I somehow manage to edit the animation itself. However, there is for some reason no reload sound in 3rd person.

 

The magazine also completely dissapears when its pulled out and appears only when its put in, during the animation...

 

Any ideas how could these two issues be fixed?

 

EDIT: Also how would one add these animations to NPCs? I assume it's through adding the Synth and Human subgraphs in CK?

 

Since the reload animation file was taken from the 'MP5' mod, the sound etc refers to that mod. If u unpack the reload animation to XML, u can see something like

 

<hkobject>
<hkparam name="time">0.03333333507180214</hkparam>
<hkparam name="text">SoundPlay.WPNHuKMP5ClothStartReload</hkparam>
</hkobject>
<hkobject>
<hkparam name="time">0.30000001192092896</hkparam>
<hkparam name="text">SoundPlay.WPNHuKMP5BoltOpen</hkparam>
</hkobject>
<hkobject>
<hkparam name="time">0.5333333611488342</hkparam>
<hkparam name="text">SoundPlay.WPNHuKMP5ClothMagOut</hkparam>
</hkobject>
under its annotation. Thus at specific time, respective sounds r played. So maybe the easier way is to include the 'MP5' mod as one of the masters or u can migrate all these 'Sound Descriptor' from the mod to ur mod ...
As for the magazine issue, may have to check the R91 weapon nif, maybe there is a mismatched between the magazine naming in the nif and the 'magazine bone' in the animation file?
(Updated: I take a look at the 'mp5' animation. After the first frame, the 'weapon bone' jumps to the chest of the character and that's y it appears "missing". Not sure y it works for the mp5 mod thou. )
If u look under human subgraphs additive, 'HumanRaceSubgraphDataAdditiveR91', the entry, 3d without any 'Actor Keyword', that will affect NPC. So modifying the reload will affect the NPC. The actor keyword , 'AnimArchtypePlayer' will affect the player as what I have done and 'AnimSynth' will affect Synth. Basically the most/best matching subgraph entry will be used. E.g I added the 'Anime91MOD' Target Keyword'. This keyword was added to the weapon and thus it has the new reload animation. If this keyword was removed from the weapon, it will use the default R91 reload animation instead ....
Link to comment
Share on other sites

Since the reload animation file was taken from the 'MP5' mod, the sound etc refers to that mod. If u unpack the reload animation to XML, u can see something like

 

 

<hkobject>
<hkparam name="time">0.03333333507180214</hkparam>
<hkparam name="text">SoundPlay.WPNHuKMP5ClothStartReload</hkparam>
</hkobject>
<hkobject>
<hkparam name="time">0.30000001192092896</hkparam>
<hkparam name="text">SoundPlay.WPNHuKMP5BoltOpen</hkparam>
</hkobject>
<hkobject>
<hkparam name="time">0.5333333611488342</hkparam>
<hkparam name="text">SoundPlay.WPNHuKMP5ClothMagOut</hkparam>
</hkobject>
under its annotation. Thus at specific time, respective sounds r played. So maybe the easier way is to include the 'MP5' mod as one of the masters or u can migrate all these 'Sound Descriptor' from the mod to ur mod ...
As for the magazine issue, may have to check the R91 weapon nif, maybe there is a mismatched between the magazine naming in the nif and the 'magazine bone' in the animation file?
(Updated: I take a look at the 'mp5' animation. After the first frame, the 'weapon bone' jumps to the chest of the character and that's y it appears "missing". Not sure y it works for the mp5 mod thou. )
If u look under human subgraphs additive, 'HumanRaceSubgraphDataAdditiveR91', the entry, 3d without any 'Actor Keyword', that will affect NPC. So modifying the reload will affect the NPC. The actor keyword , 'AnimArchtypePlayer' will affect the player as what I have done and 'AnimSynth' will affect Synth. Basically the most/best matching subgraph entry will be used. E.g I added the 'Anime91MOD' Target Keyword'. This keyword was added to the weapon and thus it has the new reload animation. If this keyword was removed from the weapon, it will use the default R91 reload animation instead ....

 

I see. I will try to migrate those sounds over then. Thank you for the Subgrapghs tips as well!

 

Hmm... I actually stumbled upon another mod (G3, which is aesthethically even closer to the R91) that makes use of the same MP5 animation,but it says in credits that the author has managed to "adapt it to the weapon magazine".

 

https://www.nexusmods.com/fallout4/mods/42624

 

So I did the same process as before (copying only reload.hkx, making subgraphs, metadata, correct keywords etc.) and managed to get it work and voila... the magazine animates correctly too now! BUT looks like there is a new problem:

 

While my character holds the weapon correctly (shooting, aiming, idle etc.), but when he reloads - the gun moves back into his arms again, like the picture I posted in the first page... really no idea why it's doing that again, and just for the only animation that I use/need. :/

Link to comment
Share on other sites

Not sure but on pure animation point of view, the 'WeaponMagazine' bone is really out of position till the moment when the magazine is being place back on the weapon. I m sure fixing that will fix the issue, Its the same as the 'bolt' pulling. Since the animation was made for the 'mp5' mod, the pulling action position has to be altered to fit that of R91.

 

I can take a look at 1st person view of the reload ....

 

Updated: I fixed the magazine issue. Its not perfect since that will require proper alignment of the magazine bone (eg when the weapon is slightly titled, the magazine should tilt as well) but at least u can see the magazine being taken out and thrown to the ground ...

 

The updated reload animation:

https://drive.google.com/file/d/1X_1XD_qkfIDuNE0DH9LBBhZsA7jzQ2O4/view

 

 

Anyway, its a win for me too cos in the process of doing this, I discovered/learnt something that I wanna do previously but missing the knowledge ...

Link to comment
Share on other sites

Yup, just tested it and it's working pretty well. The angled magazine does not bother me much, since I am so happy that at least it shows up now. xD

Just wanted to thank you a lot. I really appreciate helping you above and beyond like that. And I learned some new stuff as well. :smile:

 

Also what program did you use for opening and editing the .hkx format? Just in case I'd like to try and fix the magazine angle too in future and maybe even add the reload sound from the original R91 mod to the .hkx file, after I learn enough.

 

BTW: Regarding the subgrahps for Synths and NPCs - it's okay to use the same Reload.hkx file you provided for them as well, right? They don't need any "separate" special .hkx versions or anything?

I also assume I need to generate metadata again for Synths and NPCS too?

Link to comment
Share on other sites

Alright, I tried to open the file and do it myself by converting hkx to xml with at least two programs but to no avail.

 

HKXpack .jar file won't open no matter how many times I click on it. I have the newest Java installed.

 

F4AK doesn't work either and throws off an runtime error, everytime I try to start it. Even when I put WPNreload.hkx in and click convert, I get an Unicode error and nothing happens. :/

Link to comment
Share on other sites

Use HKXpack

 

https://github.com/Dexesttp/hkxpack

 

java -jar hkxpack-cli.jar pack to convert xml to hbx

 

java -jar hkxpack-cli.jar unpack to convert hbx to xml

java -jar

 

However take note, it is not 100% true conversion since cloth nodes, physics and some other things may have missing data as mentioned at the site.

 

The reload animation can be used for other character.

Link to comment
Share on other sites

Aye that is what I am using. But it says "unable to access jarfile hkxpack-cli.jar" in the command prompt. (using the 64bit version since I am on a 64 system)

 

Am I even using it the right way? I admit I am pretty new to using jar based programs in general.

 

EDIT: Nvm. Managed to get it to work. I had to use the "cd" prompt and navigate the cmd to the correct folder first. Then it finally managed to unpack xD

 

Now just gotta figure out how to fix the angled magazine and then the R91 is perfect....

Link to comment
Share on other sites

You need to edit and regenerate the animation at source if u wanna fix the angle issue just like if u wanna move the hand that pull the bolt ...

 

Anyway this should be better:

https://drive.google.com/file/d/1IKftChIfNYUsjm9khZfC_EPK4USN-f7k/view

 

For the bolt pulling, that really need to redo and align the hand and alot of work so can't help on that ...

Got it. Works and looks perfectly now. :smile: The bolt doesn't bother me too much, since not even the G3 mod seems to have managed to fit it properly with the animation. Unless someone makes a full fledged R91/G3 type of weapon with custom anims, this will have to do.

 

I even finally managed to fix the sound! Although there is a few sound options there regarding a "Cloth" reload which I have no idea what its for, so I left it alone.

 

I was thinking, would you be okay if I released this under your and mine name, after I get all the permissions, fix up the .esp and the subgraphs for NPCs and Synths?

You did like 80% of the work pretty much, and I'd love to see it spread further. :smile:

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...