Astromining

I need to create a mining station that can mine minerals from asteroids. It will fire a beam at them and increase your resources. Only problem is, I want only about 40% of the hits to generate 1 resource, and I need asteroids to run out of minerals. How do I do it?

------------------
Vast__

The best way would probably be to copy the basic asteroids, and make the station similar to the astrominer.

Take the build flags and the engage key flags from the astrominer, and copy them to the station. Set "OnlyEngages." This way, the station will attack only asteroids.

I'm not sure a beam is a good choice, though, since the beam might decide to target a nearer enemy instead of an asteroid. Instead, you could create a small "fighter ship" with the same build/engage settings, with an extremely high turn rate. (Unset flags CanBeDestination, CanEngage, CanBeEngaged, CanEvade, and CanBeEvaded). Some value should be put in the damage field as well.

Then, in the collide action of the small fragment, you should have the Alter Resources/Die Expire.

I'm not sure how well that would work (there are definitely problems), but it should get you a little further on your way.

------------------
(~%) ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 93:33:b4:fc:b8:03:b4:45:15:31:99:1a:a3:1f:a5:ac.
Are you sure you want to continue connecting (yes/no)?

The problem is, that means I can't put weapons (like for defence) on the station. I though perhaps a special weapon activated by On Activate could create something invisible like the astrominer.

------------------
Vast__

You probably should just create a couple astromining ships for the purpose.

Get two copies of the Astrominer, mark one as full, and one as empty (in dev notes). Attribute Flags should be as follows:
Empty: CanTurn, HasDirectionGoal, DoesBounce, CanEngage, CanBeHit, AppearsOnRadar
Full: CanTurn, HasDirectionGoal, AppearsOnRadar

...and Engage Flags as follows:
Empty: CanOnlyEngage, default engage key, Level Keys A, C (should be unique)
Full: CanOnlyEngage, Engage Key A, B, C, D

On the Full version, give it a small Arrive distance, and as its Arrive Action, use Alter Resources and Alter Basetype to Empty Astrominer Reflexive.

Copy the default asteroid set, and on the smallest, give it a collide action to Alter Basetype to Full Astrominer inclusive of build flags A-C-.

In the map, add 3-5 astrominers near the astromining station, with StaticDestination and their initial destination set to the astromining station.

------------------
(~%) ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 93:33:b4:fc:b8:03:b4:45:15:31:99:1a:a3:1f:a5:ac.
Are you sure you want to continue connecting (yes/no)?