- Weapon category. Create a new clone of the weapon that you want to base it off of. Set weapon_bag\behavior\enable_auto_target_search: true. You may also have to edit some other values to make it behave how you want. We will call this weapon B.
- Ebps category. Create a new hardpoint in combat_ext\hardpoints\1.hardpoint\2.weapon and assign weapon B. You can copy the heading and origin values from 1.weapon (we will call this weapon A, which you should leave untouched.)
- Ability category. Create a new toggle ability. In action_list\start_self_actions make a change_weapon for hardpoint 1 that changes to weapon B. In action_list\end_self_actions make a change_weapon for hardpoint 1 that changes to weapon A.
In short the howitzer entity will have 2 weapons on its 1st hardpoint; weapon A (the default) and weapon B (the clone). The toggle ability will be able to switch between these weapons.
This is a simple way to do it. The ones used in the default game such as the Sherman AP/HE system uses a more complicated method that includes upgrades and timed abilities which you can use as reference if you'd like to do that. Things may not be perfect when using weapon B in conjunction with barrage abilities.