Garry's Mod

Garry's Mod

[ArcCW] Arctic's Customizable Weapons (Base)
Alex Jul 1, 2023 @ 8:00pm
Why are my attachments showing up in other slots?
More specifically, I was messing around with some weapons and added a "rate of fire" slot where you could increase/decrease your gun's RPM. Just to mess around, basically.

But I noticed that this, and sometimes other slots I've made, are showing up in other slots as well.

For example, the RPM attachments are showing up in the optics slot on a lot of guns. Even though those guns only accept the "optic" attachment type in their lua for that slot, and the RPM slot itself doesn't have anything related to optics in its code.

If I attach the RPM thing to a gun, it goes into both the Rate of Fire slot as well as the Optic slot. If I attach an optic in the optic slot, then it overrides the Rate of Fire slot.

I've no idea why this is the case, nor do I have any console errors anywhere that are even remotely related to ArcCW.

It varies depending on the guns, though. One weapon pack I modified to add some slots, is completely unaffected by this bug and works just fine. Another pack, it's my "extended magazine" slot (it just adds a multiplier to the current mag's ammo, I called it "Feed System") that overrides the optics.

To provide some examples:

Example 1: CS+ Weapon Pack
Affects all guns in this pack the same way, using AK-47 as example. My "Rate of Fire" slot is affecting "Optics".
SWEP.Attachments = { { PrintName = "Optic", -- print name DefaultAttName = "Iron Sights", Slot = {"optic", "optic_lp"}, -- what kind of attachments can fit here, can be string or table Bone = "v_weapon.AK47_Parent", -- relevant bone any attachments will be mostly referring to Offset = { vpos = Vector(0, -6.823, -1.384), -- offset that the attachment will be relative to the bone vang = Angle(-90, 0, -90), wpos = Vector(6.099, 0.699, -6.301), wang = Angle(171.817, 180-1.17, 0), }, InstalledEles = {"mount"}, CorrectivePos = Vector(0, 0, 0), CorrectiveAng = Angle(2, 0, 0) }, { PrintName = "Reload System", Slot = "reloadsystem", DefaultAttName = "Standard Reload" }, { PrintName = "Feed System", Slot = "extmagazine", DefaultAttName = "Standard Feed System" }, { PrintName = "Rate of Fire", Slot = "rpm", DefaultAttName = "Standard RPM" },

An attachment from my Rate of Fire slot
att.PrintName = "25%" att.Icon = Material("entities/acwatt_fcg_auto.png") att.Description = "Increases the firearm's rate of fire." att.Desc_Pros = { } att.Desc_Cons = { } att.AutoStats = true att.Slot = {"rpm"} att.Mult_RPM = 1.25 att.Mult_CycleTime = 0.8

Example 2: CoD WaW Weapon Pack
Affects all guns in this pack the same way, using SVT-40 as example. My custom "Feed System" slot is affecting "Optics".
SWEP.Attachments = { { --1 PrintName = "Optic", -- print name DefaultAttName = "Iron Sights", Slot = {"optic", "optic_lp"}, -- what kind of attachments can fit here, can be string or table Bone = "tag_weapon", -- relevant bone any attachments will be mostly referring to Offset = { vpos = Vector(-7, 0, 2.05), -- 4.6 offset that the attachment will be relative to the bone vang = Angle(0, 0, 0), wpos = Vector(4.5, 1.35, -5.4), wang = Angle(171, 179, 0) }, CorrectivePos = Vector(0, 0, 0), CorrectiveAng = Angle(0, 0, 0), InstalledEles = {"mount"}, MergeSlots = {10} }, { PrintName = "Reload System", Slot = "reloadsystem", DefaultAttName = "Standard Reload" }, { PrintName = "Feed System", Slot = "extmagazine", DefaultAttName = "Standard Feed System" { PrintName = "Rate of Fire", Slot = "rpm", DefaultAttName = "Standard RPM" },
An attachment from my Feed System slot
att.PrintName = "NUTZ Feed System" att.Icon = Material("entities/acwatt_perk_extendedmags.png") att.Description = "Extended magazine. Go NUTZ(tm)." att.Desc_Pros = { } att.Desc_Cons = { } att.AutoStats = true att.Slot = {"extmagazine"} att.Mult_ClipSize = 2

I don't see anything that should conflict. So why do they take up optics, and why does it vary on the gun or gun pack which attachment takes up optics?
Last edited by Alex; Jul 1, 2023 @ 8:00pm
Showing 1-3 of 3 comments
Fesiug  [developer] Jul 1, 2023 @ 11:05pm 
you have to reload the attachment table after modifying one, go to Options > ArcCW > Developer > Reload Attachments
Alex Jul 1, 2023 @ 11:16pm 
Originally posted by Fesiug:
you have to reload the attachment table after modifying one, go to Options > ArcCW > Developer > Reload Attachments
Even though I'm restarting the game?
Alex Jul 2, 2023 @ 12:15am 
Regardless, it still made no difference.
Showing 1-3 of 3 comments
Per page: 1530 50