Space Engineers

Space Engineers

Not enough ratings
Rotating Ship Constructor Guide
By SCBionicle
This guide walks you through how to set up the rotating ship constructor script.

NOTICE: Credit should be given to Keen and the original creator of this design. I got inspired to do this by one of the videos that are shown on the main menu.

This script is inspired with the design shown in the main menu of Space Engineers in mind and is designed to be almost fully automated and finish building your small ship within minutes.

Version: 1.3.0

Link to the workshop page: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1912156094
   
Award
Favorite
Favorited
Unfavorite
How to set this up
  1. First off, make sure the save or server is in experimental mode and in-game scripts are enabled.
  2. Place a rotor sideways facing out towards an open space with a small rotor head with a projector on it. .jpg]
  3. Make a row of pistons facing downwards that are lined up ahead of the rotor and place welders on the ends of them that are at least 8 blocks above the rotor. (make sure they are connected to a conveyor system) (NOTE: these pistons can be stacked on top of each other so that they can extend further out, but be sure they there's a sensor and welder on the end to be properly detected as a piston arm).jpg]
  4. On each welder, place a sensor with the bottom side facing the end of the welder as the orientation of the sensor is important. .jpg]
  5. Add all the welders, sensors, LCD's (optional), and pistons to a group along with the projector on the rotor and the rotor itself. (remember this name for later)
  6. Make sure the rotor's torque is on max for both its running and stopping torque.
  7. Lastly, load the script onto the programmable block.
  8. But, this isn't done yet. We still need to configure the settings in the script. (See below)
Setting Up the Script
  1. First off, measure how far the piston needs to extend so that the welder is lined up with the projector.
  2. At the top of the script code, look for "maxPistonExtent" and set the value in meters of what you measured the extended piston should extend to. (Remember to end the number with an "f" without a space so that the script can compile)
  3. Under the "groupName" variable, replace the text inside the quotes with the block group name you assigned earlier.
  4. Now, press "check code" to see if there are no problems and press save and the script should be ready to go.

Note:
The rotor's speed and piston's speed are set automatically by the script and can be configured in the script. (See below)
Commands
Command
Description
start
Start the job (only works if there isn't any job running.)
stop
Stop the currently running job and return the pistons to the retracted position and stop the rotor when it's in the upright position
estop
Stops the current job in its tracks, freezing all pistons, shutting off welders, stopping the rotor, etc. The script will enter an error state and must be recovered before normal operation can resume. (See command below on how to recover)
recover
Puts the script in recovery mode as long as all equipment is set up and functional and returns all equipment to their off position. After completing this, the script will be ready for its next job.
How to Use
  1. Load a small ship into the projector.
  2. Align the ship so that the back of it is facing the projector and the bottom of the ship is facing the ground. (make sure the ship is centered as possible while the projection is still in front of the rotor and projector.
  3. Build some blocks from the projector that would attach to the projection so that the welders have a starting block to start on.
  4. Run the programmable block with the "start" argument.If something is not set up correctly, the script will display what is wrong in the terminal when you try to start a job.
  5. Sit back and relax while the ship is built in only a couple of minutes.
  6. The pistons will retract, the welders will deactivate, and the rotor will stop when the job is finished.
  7. Lastly, grind off the blocks that are attaching the ship to the rotor. (DO NOT GRIND THE PROJECTOR)
Configuration Variables
  • groupName - The group which the script will use to build the ship.
  • maxPistonExtent - The max total length of each piston arm will extend (manually setting it on the piston will be wiped as this script will set that itself)
  • maxPistonSpeed - How fast the pistons should move when the job is currently running.
  • retractPistonSpeed - How fast the pistons should retract when the job is stopped or finished
  • maxBottomSensorExtent - How far the sensor should extend its field to detect the ship below it (this shouldn't have to be changed on large grid welders)
  • sensorFrontBackExtend - How far the sensor field should extend in front and behind the sensor. (this shouldn't have to be changed on large grid welders)
  • surroundSensorExtent - How far the sensor field extends on the left and right of the sensor (this shouldn't have to be changed on large grid welders)
  • finishLingerTime - How long in approximate seconds the welding job should continue running after all blocks have been welded (this is good to make sure the functional blocks are completely welded)
  • targetRotorRPM - How fast the rotor should rotate when the job is running
  • rotorStopBuffer - Since the rotor can't be exactly in the zero'th position in a game, this is the range in radians of when the rotor should stop moving to make sure the ship is upright when the job is finished. (If the rotor keeps overshooting, increase this a tiny bit each time until it works)
  • doSafetyShutoffOfBuiltGrid - set to true to allow the script to set the ship's, of which is being constructed, batteries to be set to recharge and turn the thrusters off. This also runs when the job is finished if this setting is enabled.
  • buildingGridScanInterval - the interval in real-time seconds on which the safety shutoff (referenced above) is performed.
  • doNotZapPlayers - set to true if you don't want this script to harm friendly players when getting in the way of the welders. (NOTICE: this will only function if players are detected by the sensor)
(Optional) Timers
If you add timer blocks as part of the above group, they can activate at specified stages of the program. In order to specify which event starts/triggers them, you must add in one of the below tags to its custom name, otherwise, they won't activate. You can also put the "trigger" tag if you want the timer to trigger instead of starting a countdown.
  • done - the job is done in its entirety and the script is not longer updating, pistons are retracted and the rotor is off
  • started - a new job is successfully started
  • safetyshutdown - a safety shutdown on the built grid has occurred (see above for more details) (NOTICE: will only function if safety shutdown feature is enabled)
  • projectionplaced - the projection has been entirely filled in by the correct blocks and the program is moving on to making sure all blocks are functional
Sidenotes
An unintentional feature is that this script can toggle dummy08's Build and Repair Tool (mod) as one of the welders.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=857053359

Credit to Taidyr's Eitri Construction & Salvage Vessel in the preview image.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1704285538