system
Given the following post, respond as if you're commenting on Reddit:
human
[General Sci-fi] How does gravity on space ships work?

I know how it works on ships that use centripetal force, but how does it work on most ships from Star Wars, Star Trek, Firefly, etc?
gpt
Usually via gravity generators that can produce gravity fields and/or whatever the force carrier particle for gravity is in that universe (gravitons, typically). Sometimes these fields/particles can be manipulated and projected elsewhere, such as from emitters in the deck plating, to make sure that 'down' is always towards the floor rather than whatever part of the ship the generator itself is. Handy when your ship is long, so your crew doesn't end up walking 'uphill' towards either end.

Some ships just use sheer acceleration to do it. In situations without FTL, travelling at a constant 1G of acceleration is usually the quickest and most comfortable way of handling long voyages where cryostasis isn't available. Technically, however, this isn't actually gravity in the same way that centripedal force isn't gravity.