Sandbox Tutorial

How to add a new faction using the built in tools

This is a basic overview for people getting started, and describes the method used to create the ships that shiped with the game. See the Editor Overlay page for complete sandbox/console documentation.

1. Add your blocks to your mod’s blocks.lua file. See Modding Docs for instructions on setting up. They should all be in the same group/faction, e.g. 20.
2. Select the “Sandbox” button from the Reassembly main menu
3. Move the deploy location away from the “In the Beginning was the Command Line” by double clicking somewhere. Pan with WASD.
The deploy location
4. Use the “minpalette [faction]” command to load all blocks from your faction and place them in the sandbox at the deploy location. You can also use the “palette [faction]” command, which also loads large hull blocks. console
palette
5. Switch to construction mode (press ‘3’) and assemble ships from these blocks (Alt-drag to clone). Start with a command block, which will be in the upper left corner.
6. Test ships by flying them around. Selecting a ship and pressing ‘1’ to switch to fly mode.
7. Test ship AI by activating the ships with the “activate” command (use “deactivate” to deactivate). Spawn a bunch of enemies with “fleet <faction>” (e.g. 8 is the starting player faction, 3 is reds). Make sure to clone the ships or save them first so they don’t get destroyed.
9. Save ships using “ssave [faction]_[ship_name]“. You can also load with “sopen [action]_[ship_name]” (e.g. “sopen 8_fighter“). Ships loaded using this command spawn deactivated. Ships from custom factions should be automatically saved into the same mod directory as the custom ship (e.g. C:/Users/<You>/Saved Games/Reassembly/mods/your_mod/ships/20_coolship.lua). Ships from built in factions will be saved to the data directory (e.g. .../Reassembly/data/ships/8_valkyrie.lua) and can be moved into your mod from there.
shipsave
8. Save the contents of the sandbox with ‘Ctrl-S’, or via the “level_save” command. You can specify a number like “level_save [num]” to save several levels. Use “clear 0; level_load [num]” to clear everything and load.
9. Test your faction by generating a sample world region using the “region [faction]” command. This will spawn on top of the current sandbox contents so make sure to save your ships first and maybe use the “clear” command to clear it out. This command will directly load your “regions.lua” file. Changes to “factions.lua” require a game restart to load, and changes to “blocks.lua” require the “reload” command to reload. You can quickly generate and observe a large number of regions by running “clear 0; region [faction]” and then pressing ‘/’ repeatedly to rerun the last command.

FAQ

Q. How do I see ships from the built-in factions?
A. Use the “fleetpalette -10” command to spawn all ships from built in factions. This will also load ships from any loaded mods. Load a specific faction with positive numbers e.g. “fleetpalette 8” will load all ships from the starting player faction.

Q. How do I specify which ships will spawn as stations?
A. Stations are selected automatically from among ships with a FACTORY block. The level generator will first look for stationary ships (with no thrusters) and fall back on mobile ships.

Q. Any other editing commands in the sandbox?
A. All the editing commands from the in-game construction interface work in the sandbox, so Undo (Ctrl-Z), Copy (Ctrl-C), Paste (Ctrl-V), Mirror (m), etc. work as usual.