Overview
Factory / 3D Printer GuideHello everyone!This guide discusses the Factory / 3D Printer script. The script is intended to be your blueprint producing machine. Utilizing 3 large grid pistons and one welder this script will weld over a 7x7x4 building area, with the ability to add more pistons for a larger area! The only requirements are the pistons (w/ appropriate x,y,z orientations), the welder, conveyors, and a programming block.It also comes with user-friendly output and optional LCD logging for displays.
Build
This section discusses how to build your factory. The examples here are large grid so the measurements and size of the build may vary if you are building a small grid version. At the time of writing this the large grid welders have a 3×3 welding area.
The following components are the only requirements:
- at least 3 Pistons (oriented in the 3 axis – x,y,z).
- 1 Welder.
- 3 curved conveyor tubes (for connecting pistons and welder).
- 1 Programming Block (for the script of course :p).
Reference
Step-by-step
- Build the area for the factory. Start with a flat plane. The building area is a 7x7x4 (length, width, height) cubic area. The picture below shows the build area in red (7×7). You will require about a 10×10 grid for ample space around your factory’s build area.
- Build your pistons.
Depending on if you are building a Welding Factory or a Grinding/Drilling Factory you may want to build your factory “bottom up” or “top down” (respectively).- Welding Factory. The first piston should be “top up” and Your first piston must be connected to a conveyor system with access to resources to allow flow of components to the factory.
- Build the Y piston. The Y piston should be 2×2 (x, z) blocks away from a corner of your desired build area. Follow the picture for reference.
- Build the Z piston. The Z piston should be connected to the Y piston by a curved conveyor tube. The orientation does not matter as much here as long as the piston is horizontal. Think of this piston as the one the moves the printer forward across the building area.
- Build the X piston. The X piston should be connected to the Z piston by a curved conveyor tube. The piston only needs to be horizontal and should be close to the corner of your desired build area.
- Grinding/Drilling Factory.
- The first pistons should be X and Z pistons. Following the same strategy as the X and Z pistons from the welding factory build (see above). Make sure that these pistons are connected to some form of cargo system to allow for mass storage of all those materials your going to get without a sweat!
- Build the Y piston. The Y piston should be connected to the X or Z piston by a curved conveyor tube. The piston only needs to be vertical and should be close to the corner of your desired grind/drill area.
- Welding Factory. The first piston should be “top up” and Your first piston must be connected to a conveyor system with access to resources to allow flow of components to the factory.
- Add the welder.
There are two options for welders.- Small Grid Welder (slower welding, more precise, error free). First build a large grid advanced rotor. Add a small rotor head to the advanced rotor (can be done using the control panel). Set share inertia tensor and rotor lock to avoid Le Klang. Finally build your small grid welder on the small rotor head.
- Large Grid Welder (faster welding, less precise, error prone). The welder should be downward facing and attached to the X piston by a curved conveyor tube. It should be one block below the height of the X/Z pistons.
- Small Grid Welder (slower welding, more precise, error free). First build a large grid advanced rotor. Add a small rotor head to the advanced rotor (can be done using the control panel). Set share inertia tensor and rotor lock to avoid Le Klang. Finally build your small grid welder on the small rotor head.
- Add a Programmable Block. Add this script Save + Compile/Exit.
- Control. You will likely want to utilize a button panel or a flight seat for hotbar control of your factory.
The script accounts for multiple pistons on any X, Y, or Z plane. By simply adding a new piston on any given plane, you can easily increase the effective area!
This setup is fairly rigid, but allows for the iterative 3D printer feel that I was going for and maximizes a single welder’s capabilities.
You can add multiple welders/grinders/drills to the main welder and increase the weld area that way as well (and weld speed).
Setup
- Tag Factory blocks Follow the “tagging” naming convention and add the “[factory]” tag to all of the piston blocks associated with the factory/3D printer, the welders, the programming block used to run the factory, and finally an LCD panel if you wish to have a screen show logging (not required).
- Further Tagging. Again we need to add tags, but this time only to pistons that will tell the script what their orientation is. Add the “[x]”, “[y]”, “[z]” tags to their corresponding pistons. The most important one is the “[y]” tags as they must be accurate, however the “[x]” and “[z]” tags are interchangeable and will simply iterate in a different order :).
Setup should look something like this…
My Piston 1 [factory] [x]
My Piston 2 [factory] [y]
My Piston 3 [factory] [z]
My Welder [factory]
My Programming Block [factory]
My LCD [factory] (optional)
When adding the [x], [y], and [z] tags think of them in this fashion. The [y] piston is your vertical (up/down) piston. The [z] piston is your forward/backward piston and the [x] is your left/right piston.
Usage
To use your factory simply pass arguments to your programming block.
Arguments come in two types: Commands and Toggles.
Commands are as simple as passing the string (word) to the programming block.
Here is a list of commands:
- run: Initiates the factory. NOTE: This will automatically turn on your welder(s)/grinder(s)/drill(s) when started and will turn them off once complete.
- return: Returns all pistons to the retracted position. This is commonly used after a build is complete to reset for the next build. NOTE: This will automatically turn off your welder(s)/grinder(s)/drill(s).
- stop: Stops all movement of the pistons. Can be used in case of emergency or when you wish to pause building (lack of resources, time, etc). Using a “build” command should allow the script to continue where it left off. NOTE: not fully tested. NOTE: This will automatically turn off your welder(s)/grinder(s)/drill(s).
- *NEW*: skip:y,z: Provides the convenience of “skipping” to a desired y and z iteration before executing the run command. y and z must be replaced with the integer iteration desired (For example: skip:3,2). Script will automatically trigger the “run” command once the desired iterations have been reached.
Toggles are also passed to the programming block as an argument but take on a unique form like:
key:value.
Currently the only toggle available is:
“toggle:large”. This tells the script if it is welding a small grid or a large grid. Simply run the script with a toggle:large argument and the script will toggle on/off large/small grid settings. NOTE: more fine-tuning/testing is needed to optimize the settings for the different grid sizes.
Left my drill alone at an ice lake for about an hour and came back to 500K Ice and counting 🙂
Custom Configuration
This sections talks about how you can customize this script to your liking.
For now we will touch on the two simple settings.
Once you save/compile the script, you can check your programming block’s CustomData. Within you will find a few configuration settings and their descriptions.
Configurations
- mode. Can be weld, grind, or drill. Use the different modes to tell the factory which block(s) should be running and which blocks should be off.
Note: Can be useful when using multiple tools on a single factory build!
- welding_speed. This allows you to tell the script how fast to move the pistons while running. The script will account for multiple pistons in a given direction.
Note: Until I optimize the settings for the different grid sizes, you may find this useful for fine-tuning of your own.
Update Log
1.1 – Minor updates
- Accounted for small grid welders.
- Script improvements.
- Fixed other bugs along the way.
2.0 – Major update (not really, but new version is not compatible with the last so it’s convention 8D )
- Compatible with grinders and welders. The “build” command has been changed to “run”. For any existing builds you must clear the PB.CustomData (be sure to copy it somewhere else first if you want to save em) and allow the script to recreate it.
- Added mode configuration. If you want to take advantage of the new modes, try a setup with the Y pistons’ piston-head facing down (see pictures here and in the guide).
2.1 – “Skip” feature request.
- You can now skip to an specified y and z iteration.
Previously if you stopped your factory in the middle of an operation and wanted to continue, you would have to start all over. This feature will move the factory to the desired y and z iterations and then automatically transition to the run command where it will continue (with the x iteration) as if it just reached the y and z iteration!
Thanks to @Bluebarry Cat!
Simply run with the following command:
skip:y,z – NOTE: Replace y and z here with the integer iteration you wish to skip to.
For example:
skip:3,2
This command will move your factory to Y iteration: 3 and Z iteration: 2. Once the factory reaches the desired iterations, it will trigger the “run” command automatically.
2.1.1 – Bug fix
- Thanks to @Bluebarry Cat for helping me diagnose some bugs in the new feature.
- This update features bug fixes, optimizations, and removal of that annoying compiler warning ;).
- For fun I updated the LCD output.
2.1.2 – Bug fix
- Thanks to @Bluebarry Cat for helping me diagnose some bugs in the new feature (again).
- This update features bug fixes including a lock on the last z interval that prevented the factory to continue, not turning off drills/grinders on the stop command, and other minor optimizations.
2.1.3 – Added debug outputs
- This update features extra outputs to the debugging menu for better tracking of behavior.
Enjoy!