How is ship cost determined?
I've been paying more attention to the cost of certain ships. It would seem obvious that the more slots a ship has, the more expensive it will be. However, there seems to be a lot of inconsistencies with this. The jump from 15 to 20 slots may only be 800,000 Units, but from 20-30 becomes 5 million Units.
Is there a set calculation for how much ships cost? Does affiliation with a race determine how expensive their ships may be?
Each additional slot increases the cost by a factor. I don't have exact values. It may be similar to the exosuit upgrades, in which you pay 10k for the first, 10k * 2 for the second, 10k * 3 for the third, etc. Obviously ships have higher cost per slot, but the idea is that it scales as the slots increase. It's not mathematically exponential, but it gets pricey quite fast.
This applies to the baseline, non-upgraded, per-slot cost. As MageXy commented, the value of any upgrades is also added to the price. I've seen identical ships with the same slot count but different upgrades sell for different prices. At 25 slots, two ships differed by at least a million credits, so upgrades can make quite a difference. I'd prefer a non-upgraded ship most of the time anyway, as found/bought ships tend to be a mess in terms of component linking. YMMV.