Adding magpulls to magazines
Avatar

Hello everyone,
I'm trying to add a magpull to a weapon's magazine (along with a custom weapon mod). The reload speed part works however the magazine doesn't have the magpull on it despite me making a custom mag model and implementing it into the script. Isthere anything in peticular I eed to do with the magpull group in the model. I noticed that unlike the other groups of the mag model of the sr2 the magpull has a string of numbers rather thana proper name.

Help would be appreciated.

Replies
Avatar

That string number is because the hashlist doesnt have the proper name for it.
It doesnt change anything
Just use those number string to your custom model too.

Avatar

Yes, be sure to change the name inside those object hierarchy too, as Blender will append all the name in hierarchy if it's different

Avatar

That's how I compiled the model. I simply used an already existing speedpull mag and just replaced the mags and bullets mesh with the desired weapon's meshes. however in-game the speedpull does not appear. The mag itself deos appear however.

Avatar

If you trying to add model(object) from model X to model Y it wont show up until you add it data to .object file but theres is still problem of missing materials that results in new model(object) not being able to use textures.

Avatar

Added it to the list, but it's still not showing.

Avatar

That could be due LODs (One of reason why object names using these random numbers) try renaming it in blender to that object name and try again.

Avatar

Renamed to g_magpul, still a no-show.

Avatar

Then i guessing you didn't check "Add new objects" in Model Tool.

Avatar

Did that now. Still nothing.


I guess I'll leave that for now. On another note, how do I add a custom icon for a weapon mod.
Avatar

UPDATE: I got it now. I just took the dirty apporach of merging the two groups into the g_mag group, complete with adjusted UVs and textures.
(I assume that the reason why the magpul wouldn't show up has to do with the model's root points and having no info about where to place the magpul.)

Avatar

Damn, I'm late to this

Merging it is 1 other way to fuse the mag and magpul, but I recently found another way that doesnt require modifying UV and textures.

So you leave the mag model alone, but make another mag model and replace the mag mesh with the magpul mesh.
On the mod lua hooks, tell the mag to add (adds syntax) the 'another mag model' that's been replaced with magpul mesh.
That way, in the game, the weapon mag will have mag and a magpul, but in reality, the magpul is an added object through lua hook. The magpul mesh will even follow the mag in reload anim..
You only need to make sure the magpul mesh on the other mag model, is positioned correclty.

If you need example on the above method, you can check my Howa custom AR mod, on it's speed mag model.

Avatar

That's actually a good idea. Like rails being added when you equip gadgets on weapons. I'll keep that in mind.

Avatar

One thing I forgot to point out is, make sure on using the same mag base as the weapon you're building of, for the magpul.
Example: if you're making CMP magpul attachment, you'll make your magpul model with the base of the CMP standard mag base, that way when reload anim plays, both the mag and magpul will play the same anim.

Also custom icon for custom attachment, follow the same way as making custom weapon icon if you ever done one.
Or just look at any custom attachment example xd

Avatar
Also custom icon for custom attachment, follow the same way as making custom weapon icon if you ever done one.
Or just look at any custom attachment example xd

I have that figured out by now. My problem back then was that despite my custom icon being in the right place, with the right name and added in the main.xml, I still had a regular BLT mod that added the exact same weapon mod seperately from the override mod (essentially creating two new entries in the weapon customisation menu). For some reason that suppressed the appearance of the custom icon. It's shite like this that makes me question my sanity sometimes. I feel like in terms of BeardLib mods we need a lot more documentation.

Avatar

Currently for BeardLib mod doc, we only got template mod, which we could find in here: https://modworkshop.net/mydownloads.php?action=browse_cat&cid=12
Or by searching Template on search downloads

For now, it really boils down to seeing the template, and learning by doing or disassembling existing mod.. at least thats how I do it..

Or you could always start 1 doc on how to create beardlib mod by yourself xd

Avatar

I'm back again Alcat. I was about to write how the model is still not working before I realized where I had gone wrong. All this time I tried to add the magpul as a new group rather than simply replacing the mags mesh and treating the magpul as if it was the mag itself. So now that's working.
Now there's a new problem: The magpul does not move with the mag. In my code the magpul is the mag and the VHS's stock magazine is added via the lua because if I do it the other way around neither the mag nor the magpul moves. Any ideas?

Avatar

You're doing the opposite of it xd

The stock magazine is by default on the blueprint/main,xml, and the magpul is added via lua.
Add the magpul through the default mag object itself.
So self.parts.wpn_blabla_defaultmag.adds = {"magpul_object"} like so

Avatar

Huh, thats weird
The other way around is exactly how I do it on my Howa rifle mod.

I'm pretty sure it'll work, especially with guns that only have 1 magazine option.

Just to be sure, the way I did it on Howa:
The stock magazine is by default on the blueprint/main,xml, and the magpul is added via lua.
Add the magpul through the default mag object itself.
So self.parts.wpn_blabla_defaultmag.adds = {"magpul_object"} like so
And because you only added the magpul name in the lua, you must initiate the magpul object on the main.xml
It'll be more clear if you take a look at my Howa main.xml

Avatar

Update: I'm an idiot.
In the main.xml I based both the speedpull mag and the magpul on the AUG's speedpull mag (wpn_fps_ass_aug_m_quick) rather that the VHS' standard mag (wpn_fps_ass_vhs_m). Naturally the game won't find any AUG animations on the VHS so it won't animate those parts at all.
Mod should be done in 15 minutes.

45 1203