There is mod Better Attachments by Dana. It uses OnEntitySpawned hook to find and modify weapon attachments (aimcone, aimsway, recoil, etc).
Does this way still work? I did same thing in my code, but attachments changed only on server-side.
void OnEntitySpawned(BaseNetworkable entity)
{
if (entity is ProjectileWeaponMod)
{
ProjectileWeaponMod attachment = entity as ProjectileWeaponMod;
if (!attachment) return;
if (attachment.ShortPrefabName == "silencer.entity")
{
attachment.recoil.enabled = true;
attachment.recoil.scalar = 0.00f;
attachment.recoil.offset = 0.00f;
attachment.aimsway.enabled = true;
attachment.aimsway.scalar = 0.00f;
attachment.aimsway.offset = 0.00f;
}
}
}