Fallout 4



This article explains how the functionality of the system can be applied to external weapon mods. This doesn't require any creation kit or scripting work. You just need to have the weapon animations and some annotations added in a specific way. Then you create .ini file with your weapon FormID inside and that's all, it will Just Work.

Obviously you need a basic understanding of how animation files are structured and work.

I will explain the process step by step using the lever action rifle as the example.

There are two ways for you to edit animation files.

1) You are an animator and do animations in 3ds max, meaning you have full control over them. I will explain doing this using another approach, but don’t worry, read 'till the end and it should be the easiest thing for you to do.

2) You are mod author or mod user who has a basic understanding of Creation Engine animations.

Part 1
Go and download hkxpack, this is a very handy tool to convert animation (ie hkx) files to xml format.

Part 2
Vanilla weapons have 3 reload files for different graphs - 1st person mode + 1st person power armor, 3rd person mode and 3rd person power armor. You should check which of them the mod you are working with has, because editing each of them is necessary. At the time of writing this article, weapon mods usually don't have 3rd person power armor animation support, but the bullet counted reload system supports it.

Go and unpack all of the needed reload files to xml format, so that it's human readable. Below you can see the image of animation file annotations for the vanilla lever action rifle and the edited version for this mod.





As you have noticed, we have some changes and added annotations here. First one is 'reloadStart.' It basically tells the system something like “hey, watch me, I'm the reload you should handle.” As from v.1.02 of the mod the annotation is replaced with 'Event00', so instead of 'reloadStart' you should add 'Event00'

Look closely to Cullbone annotations, this annotation is the signal that in this timeframe the reload animation can be interrupted. In other words, the bullet counted reload system sees it, then checks if the correct amount of bullets were loaded and if so interrupts the animations. Make sure at leaset one uncullbone happens before system detects cullbone for interrupt

As well, we have a 'reloadComplete' annotation just one nano second (or whatever si unit is that) before each shell insert sound is played, that annotation is making sure the ammo counter is increased by one for each round inserted.

Just add those annotations in the same way to your file, including positions and relative timing.


Part 3
Pack those files back to .hkx-format files.


Part 4
Go to you fallout 4/Data directory. If you have installed the mod, you can see a 'BCR' folder there. The purpose of that directory is to contain .ini files that are basically just a collection of FormIDs for weapons that use the bullet counted reload functionality.

For your mod, just make a new .ini file in that directory. The name must be the exact same as your mod's esp. For instance, if its “mycoolmod.esp” then the .ini file name must be “mycoolmod.esp.ini”. Then open your new .ini file and add a line containing “[Weapons]” (without quotations.) In the next line, add “weaponFormID_weapName = “ followed by the FormID of your weapon. You can have as many weapon FormIDs there as you want.

Below you can see an example for the lever action rifle.




Important notes:


The animation is interrupted natively using the 'reloadEnd' annotation, meaning that If you are an animator, make sure that the place where bone cullbone is happening blends well with 'reloadEnd' part, otherwise the interrupt may look unnatural.
Or after v2.00 do what's described in "Using advanced functionality with Tactical Reload" section below

For 3rd person animations, you only need to edit reload file in "player" subfolder, nps dont need this, they never gonna reload gun untill the magazine is empty.

If you are editing existing mod animation using hkxpack and there are any glitches in animation, that means that adding annotations isn't enough and animation missing something else, so directly editing animations may be required.


Using advanced functionality with Tactical Reload:

Download Tactical Reload mod, then endorse it, it's cool.As you probably already have guessed Tactical Reload files are neccessary for this functionality to work, so make sure you have it's .esm active when testing and also notify your mod users that they will need to do same thing as well.

1) After you do initial setup described in previous sections of this article, you just need to put the animation you want reload to be transitioned when BCR stops it in WPNReloadToIdle.hkx.
2) Open relevant BCR .ini file for your weapon and add (PostReloadAnim) after weapon name.

For example, lever action rifle string with this functionality looks like this:

[Weapons]
weaponFormId_LeverActionRifle(PostReloadAnim)=2c8b0


3) regenerate animation data and that's all, it should just work.

BUT 

unfortunately it's not always that easy, we aren't 100% sure why, but sometimes regenerating anim data is not enough and if you did everything above and transition to your end animation doesn't work, you will need to make following steps.

  • Open your .esp
  • Open weapon's subgraph
  • Add path to Pistol subfolder in Animation Paths (Again, we aren't sure why this fixes it and will try to further investigate it)


And that's it.

Good Luck.

Article information

Added on

Edited on

Written by

shavkacagarikia

1 comment

  1. Pyskiper
    Pyskiper
    • premium
    • 14 kudos
    For the cullbone annotation, does it have to be MagazineChild2 or can it be also MagazineChild3 or WeaponBolt or something else?
    Because for me MagazineChild2 is visible and would be bad if it becomes invisible during the animation