Space Engineers

Space Engineers

Not enough ratings
Mini Miner MK2
   
Award
Favorite
Favorited
Unfavorite
Type: Blueprint
File Size
Posted
833.109 KB
28 Jul, 2015 @ 2:12pm
1 Change Note ( view )

Subscribe to download
Mini Miner MK2

Description
This "Mini Miner" is a derivative of the original Blue Miner. It is not meant as an improvement to the original, neither as a fancy ship design. It is to show the script it has in a working ship. This is the first script I publish. Feel free to copy and adapt as you like. If you have any sincere questions on the script, please leave a comment.

Although I am new to C#, I am not at all new with respect to programming and software engineering. I occasionally do some teaching, and I aspire to create my own high level visual scripting mod to some game (this or Minecraft) for educational purposes.

The miner itself has the following differences with the original Blue Miner:
- It is 3 blocks shorter, but at the expense of the oxygen generator and the battery. So you need to carry some oxygen bottles in the cargo hold. It is meant to operate from a mother ship close by.
- It has two stone ejectors to immediately filter out all the mined stone.
- It has an antenna.
- It has a programmable block (with required timer) that has multiple functions.

The programmable block has 2 functions:
- Unlock the ship when it is docked, let it fly a very short distance, flashing red light in the meantime. It can unlock from both a merge block and connectors, or any combination.
- All the blocks can be renamed.

How to use the “release” function:
- The script can be configured by using groups, no need to edit the script itself.
- It is therefore vital to properly name the programmable block. Its name needs to consist of the ships name followed by a hyphen ( ‘-‘), followed by any name for the PB. The example is “MM01 – Ship Computer”. Case and spaces are ignored.
- All connectors/merge blocks that need to be unlocked are grouped in “MM01 Release Connectors”.
- All thrusters that need to be fired are grouped in “MM01 Release Thrusters”. These thrusters are fired with 3kN.
- All lights that need to flash red are grouped in “MM01 Release Lights”. These lights will be reset in the state before the release sequence started.
- The timer is vital to have the release sequence be stopped. It needs to be named “MM01 Release Timer”.
- In every name, case and spaces are irrelevant. Also the place of the ships name is not relevant, except for the PB, it should be the only part before the hyphen ‘-‘.
- Unfortunately it is not possible to rename groups with a script, so when the rename function is used, the groups should be changed by hand.

How to use the “rename” function:
- Run the PB by hand with the argument “rename:<old name>:<new name>”, for instance “rename:MM01:MyMiner”.
- Every occurrence of <old name> in each of the blocks names will be replaced by <new name>.
- If your blocks don’t yet have your ships name in them, you can use “name:<old name>:<new name>”. Every block whose name does not contain <old name> will have <new name> prefixed to it (with an extra space).
- This can be repeated, so when new blocks are added, you can run the PB to have these new blocks properly prefixed.
- Be very careful not to run the name function when your ship is docked, i.e. attached to the grid of another ship or your station! All blocks of the other ship/station, get your ship’s name prefixed! The “rename” function is somewhat safer.