I'm working on an astroid mining game where there's the player controlled ship that can split astroids into smaller ore chunks to then collect and bring back to a base station for processing. I'd like to have a percent composition for these astroids that provides a weighted loot drop table for what ores each astroid drops when split by the player. In addition to this, I'd like to be able to shift the weights of the drops in the table based on the distance the player is from the base station. For example:
Near to Base Station
IRON - 0.80
SILVER - 0.15
GOLD - 0.05
Far from Base Station
IRON - 0.50
SILVER = 0.30
GOLD - 0.20
It'd be simple to create multiple drop tables with these values preset, however I'd like to interpolate the values and change them relative to the distance the player is from the base station. What would be a good approach to achieving this behavior?