I propose a complete script to add ore into asteroids and an extraction capacity to the ship.https://dropbox.com/s/eas84cb13cen5r1/scenar_minerai.lua?dl=0
To use it, you have to place it in the script folder and to add this code in the Init function of your script :
From now, it is only available for the first playerspaceship, but i think it is easy to adapt for many playerspaceship (if someone knows how, please say it to me).
Also, from now, the script is in french, but it is not difficult to translate it I think (if you want, I can help you).
Each Asteroid can contain a ore, with a concentration. In the script, you have to complete two tables (or you can just use mine) , one for "classic" asteroid, one for asteroid within nebula, to describe each ore you want in your scenario , with some parameters :
- Name of the ore
- Probability to find it
- difficulty to scan it
- Max of concentration
You also have to complete a scan table (or use mine) to give scanning parameters of each scan difficulty.
At the beginning of the game, all asteroids are empty, and the GM can add ore to an asteroid (or to a lot of asteroids), randomly selected or selected by the GM.
The relay knows the part of asteroid around the playerspaceship and around the probes which contains Ore
The science can scan asteroids to know their composition.
The engineer can extract ore if the ship is nearest than 1U from the asteroid, and if the asteroid is scanned. The engineer see the stock of the ship. He/She can also unload ores, in a station or in space. From now, their is no impact of this action in the game.
The weapons can destroy asteroid near than 2.5 U, by using a HVLI for all of them.
The Helm... pilots the ship ^^
The script doen't add effect on the game, but it is easy to make that. For example, I added in my scenario a capacity to transform Ore into special EMP, then a capacity for the weapons to launch the special EMP to disable some beams and tube launcher for a target.
Please be free to use it and to comment it.