Supposing your spaceship was long and narrow, what type of weapon would be most practical on a spaceship made of the materials we make spaceships out of today with scaled hull thickness to equal the relative size of a large aircraft carrier (so if the thickness of a space shuttle hull is 1 unit at its current size, the hull thickness would scale with its increasing size proportionally to x units)? At first, given the long corridors that would occur in a long and narrow spaceship, I assumed that some sort of gun or ranged weapon would be most effective. However, reconsidering it I think there may be a danger of breaching the hull with kinetic weaponry and creating a lot of heat with laser based weaponry (given that heat dispersion is a major concern for spacecraft as well). Are range based weapons best, or is something like a knife just more practical as a means of avoiding damaging critical ship components or putting holes in the hull by mistake. Defending from mutineers and enemy boarding action is the primary goal.
No matter if there is gravity or not:
(Taken from here)
Try expanding foam: you can very quickly fill the area around someone. Within a confined space station, even an inflatable object made of tear-resistant material becomes a useful area denial weapon.
A machine gun that fires rubber bullets at high speeds would be enough to stop organisms from physically boarding the ship, unless their armor is as strong as the ship's hull. If it isn't, just increase the mass or speed of the bullets.
Nets and Rope: Or, if there are few organisms approaching your ship, like maybe one or two, Nets and Rope would work. Keep it like the old times :P
Blinding light (which wouldn't damage the ship) could also be useful. Considering that the outer hull of the ship should be resistant to the sun's rays, you could mount a high intensity light ray gun on the outside, aimed to blast anything coming near. Worse case, it hits your own ship, but then again, your ship is resistant to the sun's rays.
You have magnets? Okay then. Create an entry way into your ship that combatants must travel through. Possibly a tunnel or something of the sort. Cap the ends of the tunnel with very magnetic magnets. They come barging in? Release the magnets and squish 'em.
How to prevent a Mutiny:
You said that all personnel wear magnetic boots? Well, make the floor an electromagnet, and if your crew mutiny's, just turn on the electromagnet and poof, they're all stuck to the ground.
Does this help? Any questions?
My suggestions assume the boarding party are human.
I’d recommend looking at weapons and defences used on ships to prevent hijacking by pirates.
These include the long-range acoustic device (LRAD), which is a sonic gun, laser (to blind and dazzle), electric fencing, projectile launchers using compressed air, “rubber ball grenades” and special foams.
Tasers would also be useful as personal sidearms, as might “beanbag guns” (similar to shotguns, except they fire beanbags at high speed).
As there’s no real gravity in your ship, melee weapons would be nearly useless, as you wouldn’t be able to get any real force behind an attack.
Likewise, the recoil from gunpowder-based weapons (pistols, rifles, shotguns) and automatics would make them useless in microgravity. And the rounds could likely puncture the ship’s hull, although special ammunition (like glaser safety rounds) could reduce the risk of that.
Equipment that could deny entry or movement would also be useful - like a “razor wire bomb”, netting or piano wire.
Another way would be to use powerful strobe lighting to induce seizures.
I’d avoid using “poison gas” or smoke of any kind. Unless the gas is designed to become inert quickly, the crew would just have poisoned their own air supply.
- If there's gravity:
Chemical weapons like poison gases would work. Energy guns that relied on low-level nervous system disrupting shocks might work as well. Perhaps some sort of kinetic-energy blast. You could also use chambers that empty of all air, creating vacuums, as a trap. Any modern-age projectile weapons might work, but I think that short-range weapons (blunt or sharp, possibly electrified or poisoned) would be most reliable for a gravity situation.
- If there isn't gravity:
Things like knives would be less reliable, but since things wouldn't get pulled down, assuming there were long corridors, primitive ranged weapons would be effective (guns, bows, some kinds of edge propelled by mechanical or chemical force.) You could, of course, walk by using some sort of magnetic system. If you had magnets, though, you could use the same concept behind induction burners and then fry enemy gadgets. You wouldn't want to use an electro-magnetic pulse (EMP) because it would also disable the ships electronics (unless you used a target-specific ion gun.)