Space Engineers

Space Engineers

Not enough ratings
Auto Stone and Gravel Removal
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
359.867 KB
3 Jan, 2015 @ 6:30pm
1 Change Note ( view )

Subscribe to download
Auto Stone and Gravel Removal

Description
Purpose
Script that will check all cargo and production blocks. Find excess gravel and stone (more than two thousand kg of gravel or equivalent in stone). Then it will move the excess material to a named connector and eject into space.
Features
  • Detects if ship has excess stone and gravel and ejects into space via a connector
  • Will retain enough gravel for one large reactor. Will split stacks if required to maintain stock level
  • Safety System check (see setup below) so connector can be used as a dock normally
  • Fast relooping if ejection job has been processed to clear backlogs
Configuration
For this script to function you’ll need the following on the same ship/station you wish to use this script:
  • One connector named “Rear Dock”
  • One Programming Block
  • Three Timer Blocks named “Stone Manager Timer Job ”, “Stone Manager Timer Job 2” and “Stone Manager Timer Job 3”
Once you have placed the blocks and named them. Set the actions for Timer Job and Timer Job 3 so that it runs the Programming Block. Timer Job 1 is recommended it runs every 5-10 minutes if you are using the connector as a normal docking port.
Timer Job 2 should toggle the “Throw Out” action on your “Rear Dock” connector. Set this for about 15-20 seconds. Timer Job 3 should be 1 second longer than Timer Job 2.

Optional Safety System
If you plan to use the connector normally for docking then its highly recommended you add the built in safety system. You will require the following:
  • One Interior Light named “Docking Light”. This light will be used to determine if it’s safe to eject.
  • One sensor block, configure the sensor block so that it can detect ships etc. Have the sensor turn the “Docking light” on when it detects an object and turn it off when its clear to eject.
  • Four additional Interior Lights named “Ejector Light 1”, “Ejector Light 2”, “Ejector Light 3” and “Ejector Light 4”. Create a block group for these lights. This will be your warning lights when ejecting.
The script will check to see if the “Docking Light” is on. If it’s off then the script will believe it’s safe to eject. Timer Job 2 should now be edited to turn off the ejector light block group.
18 Comments
Arkus Drakonis 16 Sep, 2020 @ 6:41pm 
Update Script is needed please
Antharann Fireblade 20 Sep, 2019 @ 7:24am 
hey, you think you could update this script? i wanted to use it but realised its outdated.
Imminent Orbit 3 Mar, 2015 @ 8:44pm 
Ah, it seems that it didn't work because the connector was already full. Moving everything out of it allowed it to run.
Imminent Orbit 3 Mar, 2015 @ 8:25pm 
I'm trying this on a small ship, so I commented out the light portion, since it was causing an exception. When I try running this, though, it never ejects, it just immediately resets the original timer without ejecting.
Gustavianien 3 Mar, 2015 @ 2:06pm 
I have done everything word by word but still it gives me the error not set to an instance.
Nashable  [author] 19 Feb, 2015 @ 7:19am 
@Spencer - I mention timer blocks in my instructions. Have you set those up?
Spencer 18 Feb, 2015 @ 9:25am 
well " did the trick however not sure if i need to tie the programable block to a timer to make the script active full time?
Spencer 18 Feb, 2015 @ 9:00am 
hmm i have the names correct unless i gotta use the '' and it gives me same error not set to an instance
ChoMar 26 Jan, 2015 @ 11:11pm 
Yes, i did. Doublechecked.
The Script works, with a selfstarting timer everything seems good...
Nashable  [author] 26 Jan, 2015 @ 8:57pm 
@Chomar - Did you use the names given in the config? The timer blocks are triggered by the programming block script but can only do that if given the correct names.