This is an ABP file edit. Give this video a watch; it explains everything about it and how to add modded ABP's as apart of your project.
https://www.youtube.com/watch?v=z_ZrH0gUcr0
it works for same-faction units using a weapon they 'shouldn't' normally be ale to use(for example, VolksGrenadiers and FG42 assault rifles); and it also works for using weapons across different factions, but the video doesnt explain the little difference:
*usually*, The only thing you need to do after following the directions in that video; is that you manually add in the faction shortname to the modded aBP file directory lines.
for example after following the instructions in the video; if you wanted a SOVIET PPSH on USF assault engineers youd need to add "Soviet" to the cloned abp file directory lines so the game knows where to look to find the weapon to actually animate it for the model. otherwise youll get the Blue Box of death when you go to test it.
In addition; if you dig around the Archive viewer a bit you'll find that theres already examples of "crossfaction' weapon swaps, for example commandos already come prepackaged with the ability to equip USF thompsons, Tommys have the ability to use the M1 Garand. This is without any modding.
For example; below is the the Tommy ABP file; note how it's directory line is: --"..\\..\\..\\aef\\weapons\\rifle_m1_garand\\rifle_m1_garand", and not just \\weapons\\rifle_m1_garand\\rifle_m1_garand".
Below is the ABP of the Commando model; notice how they already have the ability to wield Garands, Thompsons, and the GERMAN G43. Notice how the directory is
"..\\..\\..\\german\\weapons\\rifle_g43_sniper\\rifle_g43_sniper",
and not just "..\\..\\weapons\\smg_mk2_sten\\smg_mk2_sten",
Like the "same faction" weapons in the same file. If you're using a weapon from the faction the unit comes from you dont need to add the faction 'prefix'
Finally; if you follow all this and get blue boxes still; you may have to mess with the "motion trees" in the top of the ABP file;
"..\\..\\..\\common\\NewMotionTree.abp", but thats unit to unit. Some units are still on the 'old' motion tree and require you to change that in order for the unit to use "new motion tree" weapons, which are typically weapons released on or after WFA, on that particular unit. You shouldnt need to change the motion tree unless you are using a soviet/ostheer weapon on a WFA or british unit.
Hope that help
Oh thank you so much for your help and I managed to use ggp40 on the Russians, but I have a question? The explosive tip is separated from the rifle by a space and looks like floating. Is this a flaw in the animation or did I do something wrong?
Another thing: is it possible to make the animation of the grenade on rifle inverted with the ggp 40? For example, I wanted the tip of the grenade launcher in the shape of a cup, but with normal shooting animation.