Too Risky:
Your tech is fairly solid, but there's lots of steampunk piping that doesn't tolerate piercing damage from high-velocity projectiles very well. Anyone shooting a handgun tends to get blasted with steam or engulfed with a cloud of ammonia. The ship can fix minor damage on its own, but the short-term effects of firing a portable weapon inevitably harm everyone present.
Further, your ships are semi-sentient. The ships follow rules. Generally, the ships do their job and ignore the squabbles of mere mortals. THEY, however, might not appreciate piercing bullets being fired inside them, and they express their unhappiness by deliberately jetting steam, blowing valves (in other words, they "shoot" back) or gassing such violators of the rules.
Kevlar (or equivalents):
You don't need anything as grand as a force field to stop a bullet. armor designed to protect the crew from high-velocity debris and explosions stops bullets easily by suddenly becoming rigid but doesn't stop slow velocity swords and spears (or possibly even thrown weapons like spears and throwing axes). Guns might still exist, but if 60% of shots automatically fail, the utility of the guns would be limited. The die-hards could still carry them, but they will be weakened to the point of relative ineffectiveness.
And yes, Dune-style forcefields that stop fast projectiles/beams but allow slow ones would be good for this, too.
Flame throwers would be a good alternative to get around both of these, but they are generally big, short-ranged, and/or cause a lot of collateral damage.
Too expensive:
Anything sufficiently high-tech (like handheld plasma guns) is too complicated for the players to build without the appropriate parts, and small parts for these devices simply don't exist. Or, for fun, they CAN get these weapons, but they constantly burn out or need replacements that can't be found. This prices the guns out of practical use, but doesn't stop determined gamers from getting them and using them for the occasional boss battle.
Powerful Melee weapons:
Everyone has advanced armor - every suit on every ship is armor. You need it to survive the rough, possibly airless, or fiery environment. Guns work fine, but everyone is armored. But if you want to fight people, semi-sentient plasma-based lightsabers, Vibro blades, power fists, or industrial cutters are powerful enough to penetrate the armor.