Dungeons and Dragons is a high fantasy game. The world is fantastical, with magic and adventurers and where mounds of gold weigh practically nothing at all.
What it doesn’t have a lot of is guns. Nevertheless, I’ve had many new players ask if their character can have a firearm. For the longest time this sort of irritated me. In a world of dragons and magic that can manipulate the actual fabric of reality the first thing they thought was, “I want a gun!” How anachronistic. You might think me a hypocrite. After all, D&D already has elves, barbarians and, let’s not forget, magic. What’s the fuss adding one other nonsensical item? Ultimately, though, that wasn’t my issue. My problem was balancing the damn things. Teams of people spent years balancing the existing rules. Adding a gun into the mix would complicate things more than I was interested in tackling.
Then one day I made up my own class. I called it a shadow weaver—a magic user that pulls literal shadows up and weaves rope, cloth and sometimes a cat o’ nine tails that could consume people with black fire. You might wonder where I had the time to make up a whole bunch of new spells and abilities and how I convinced my dungeon master to approve my weird invented class. But I didn’t do any of that.
I played a wizard. Just a normal, from-the-Player’s–Handbook wizard. I made it look and feel like a shadow weaver by describing how I prepared my spells and cast them with the details of shadows. Consider my cat o’ nine tails that enveloped those hit with black fire. That was just the Burning Hands spell. When I’d cast it, instead of saying “I cast Burning Hands,” I would describe reaching into my shadow and retrieving the vicious weapon and attempting to lash the foes before me. (Only then would I mention that I’d just cast Burning Hands. For clarification.)
I can do this because the game’s mechanics operate underneath a high fantasy skin. This is why most of the spells include a visual description, or why the arcane focus and material components are interchangeable. It’s just a context within which the mechanics function.
How do guns fit into all this? Due to the relative simplicity of 5th edition Dungeons & Dragons, re-skins are much more doable. The simplest solution would be to make your gunslinger either a sorcerer or a warlock. When the gunslinger shoots, they’re just casting spells through their gun shaped spell focus. This will require the gunslinger to only pick spells that can be re-skinned to look like gunshots. But, again, this is a fantasy world. A Chromatic Orb is just elemental ammunition you slap into your gun. An Eldrich Blast with Eldritch Spear is an extended barrel and scope.
I’m not saying it’s impossible to create your own custom class or to find a way to balance guns. Rules for guns are even in the Dungeon Master’s Guide. What I am saying is before you take all the time and effort to create something new, see if you can find a creative way to use the existing tools. If nothing else, the pride of making something your own can be worth it.