How can I determine a planet's mass based only off of information about its orbit and its parent star? I'm coding a video game with procedurally generated planetary systems and I want some and I want to make sure I'm at least somewhat scientifically correct. I've reached the part in my code where I know where a planet should be orbiting but don't know what mass to give it.
At this point, I have the mass of the star (in solar masses) and the orbital period (in Earth years) and orbital velocity of the planet (measured in Earth orbital velocities).
If there's no precise way of determining the planet's mass, is there a way to know more or less what range the mass should be in?
 A: The simple two-body problem won't give you bounds or constraints on planetary masses. However, one has to take into account the effects of planet-planet interactions which change the scenario. In particular, one has to take into account the effect of orbital resonances ( see the wikipedia page on this topic ) which may destabilize planetary orbits. The effect of a resonance does depend on the masses of the planets as well as on their period. 
At the level of a realistic videogame I would use this information just to avoid positions resulting integer ratios of orbital periods and, after deciding distances, I would avoid to use masses resulting in a planet-planet maximum force much larger than the maximum value one can find in the Solar System (it should be the case of Jupiter-Saturn, but I did not check all the possible pairs).
A: When a body is in orbit around a planet, the centrifugal force is balanced by the gravitational force:
$$
{{mv^2}\over{r}} = {{GMm}\over{r^2}}
$$
where $M$ is the mass of the planet and $m$ the mass of the orbiting body.
You can transpose this to get the velocity for a given radius or whatever you want.
$$
v = \sqrt{GM\over{r}}
$$
However, you will immediately notice that the mass of the body ($m$) appears on both sides of the equation and so cancels out.
So all objects at a given radius move at the same speed. Therefore, you can't get an object's mass from knowing its orbit.
If you want to test this experimentally, simply step outside the ISS. You will float along beside it in exactly the same orbit, despite being hundreds of times lighter.
