Crossbow Expert is a reasonable thing to ask to apply to pistols.
You get
1. You can make ranged attacks in melee range without disadvantage
2. If you make an attack with a weapon, you can make a hand crossbow attack with a loaded hand crossbow as a bonus action.
3. Crossbow specific stuff.
If we extend 2 to work with pistols, this does what you want, at a modest cost.
However on a battlesmith, getting your iron defender to attack requires a bonus action. So don't do this.
A rapier+pistol works reasonably well; use pistol at range, rapier at melee. Use bonus action on your pet.
That being said I personally rewrote the two weapon fighting as follows:
If you used the above rule, you could cut with the rapier, fire the pistol, bonus fire the pistol (no attribute to damage).
(The second point is worded so that you cannot double-xbow-expert even with auto-loading crossbows, but permits TWF to stack with frenzy, war cleric, quickened booming blade, and other bonus action melee weapon attacks.)
You get
1. You can make ranged attacks in melee range without disadvantage
2. If you make an attack with a weapon, you can make a hand crossbow attack with a loaded hand crossbow as a bonus action.
3. Crossbow specific stuff.
If we extend 2 to work with pistols, this does what you want, at a modest cost.
However on a battlesmith, getting your iron defender to attack requires a bonus action. So don't do this.
A rapier+pistol works reasonably well; use pistol at range, rapier at melee. Use bonus action on your pet.
That being said I personally rewrote the two weapon fighting as follows:
(the only offhand weapon is a dagger)Two-Weapon Fighting: (rule enhancement)
On your turn you may do at most one of the following:
* If you make an attack with a light melee weapon in one hand as part of an action, you can make an attack with a light weapon in the other hand as a bonus action.
* If you make an attack with a light melee weapon as part of a bonus action, you can make an attack with a light melee weapon in the other hand as part of that bonus action as well.
You do not add your attribute bonus to damage with any attacks granted by this rule.
Instead of 2 light weapons, you can use a one-handed weapon and a weapon with the offhand property and gain the above benefits.
If you used the above rule, you could cut with the rapier, fire the pistol, bonus fire the pistol (no attribute to damage).
(The second point is worded so that you cannot double-xbow-expert even with auto-loading crossbows, but permits TWF to stack with frenzy, war cleric, quickened booming blade, and other bonus action melee weapon attacks.)