I know I've probably annoyed everyone with questions, but does anyone know how to make a new category and an attachment in said category?
Avatar

I wanted to experiment with some very specific attachment ideas that wouldn't fit in any other category, other than maybe boosts. I don't want to spoil it, but it would be very cool.

I don't want it to use the "Extra" category, as then it could prevent certain weapon attachments that I would like available in tandem with the WIP attachments.

I need to know how to make a new attachment category for weapons, and new attachments to go into them. Model work NOT required. Thanks!

BeardLibSuperBLT
Avatar

The gadget attachment position is (literally) a copypasta from Pawcio. But the same principle applies for any new category of attachments.

You can name the category whatever you want, you just need to make sure you define its category in a localization file so it shows up.

For example, take this weapon mod with the category "magazine_holder". This is a cosmetic attachment that allows you to attach a space cosmetic magazine to the gun.

(There is more data to this attachment but I stripped it down to just the ID and the type for the sake of giving an example).

Spoiler!
<WeaponMod id="wpn_fps_ass_sleepo_beepo_magazine_holder"  type="magazine_holder"   ver="2">
</WeaponMod> 

This would be its corresponding category I need to define in the localization. The left side is the category name that needs to match with type="whatever", the right is the name that will appear in the menu.

Spoiler!
"bm_menu_magazine_holder"        	   : "Magazine Holster",
"bm_menu_magazine_holder_plural"        	   : "Magazine Holsters",
Avatar

worked flawlessly, thanks! Expect the mod soon, if you care to check it out.

Avatar

Do you know how to make an attachment have no model? I'm trying to make an internal attachment and basing it off of a weapon boost crashes the game. Basing it off of a default part of a weapon causes it to appear and be visible on other guns.

Avatar

Set the unit to payday 2's existing dummy unit that's just blank/invisible. You can either do this in the weapon mod itself or by forcibly overriding a weapon mod's unit to use the dummy part.

Spoiler!
<WeaponMod id="wpn_fps_pis_mk23_socom_irons" based_on="wpn_fps_pis_p226_o_standard" parent="barrel" a_obj="a_rds" type="sight"  unit="units/payday2/weapons/wpn_upg_dummy/wpn_upg_dummy" hidden="true" ver="2">
</WeaponMod>	
Spoiler!
<WeaponMod id="wpn_fps_smg_peacekeepermk1_receiver_lower" based_on="wpn_fps_m4_lower_reciever" type="lower_reciever" unit="units/mods/weapons/wpn_fps_smg_peacekeepermk1_pts/wpn_fps_smg_peacekeepermk1_receiver_lower" hidden="true"  ver="2">
	<override>
		<wpn_fps_m4_uupg_fg_rail_ext	 unit="units/payday2/weapons/wpn_upg_dummy/wpn_upg_dummy" />
		<wpn_fps_addon_ris 			  	 unit="units/payday2/weapons/wpn_upg_dummy/wpn_upg_dummy" />
	</override> 		
</WeaponMod>

Make sure the "based_on=whatever" is a real vanilla weapon mod or you'll crash upon equipping the gun.

Avatar

@rjc9000 omg thank you I was sick of digging through other mods to find the base

Avatar

@rjc9000 mod's done. Feedback would be appreciated https://modworkshop.net/mod/54291

15 322