Overview
You may know me for the many faction mods that I made for Reassembly. This guide will give you a simple yet thorough walkthrough on making a faction that will push the meta-game to its limits, and even beyond.
An Overview
Modding: taking the very code of a game, and rewriting it to expand your game. With the introduction of the Steam Workshop, it has become much easier to share the stories you write, and the mods you have designed.
Some games, such as Reassembly, are so easy to mod, that you don’t even need elaborate software or programming experience: just a text editor and easy-to-access documentation.
Several games, such as Skyrim, Sims, and Spore, do require some programming experience, and also require specific complex software to work on.
Luckily, Reassembly is easy to make a mod for. Not only that, but you can actually start making a mod from one of your own saved games.
This guide will help you make your own faction, and make it a resident of your own universe.
Starting Your Mod
A “mod” in Reassembly is essentially a directory containing modified data files. Mods data files are in the same format and may override any of the data files packaged with the game – the exact method by which mod data overrides or is merged with package data and other mod data is dependent on the data type and is described below. Mods are written in Plain Text format, and can be edited with a simple program such as Notepad++, which is simple and very useful for modding the game.
There are two methods of creating a mod in Reassembly. This guide will cover just the first method, for simplicity’s sake.
Reassembly can export an existing save slot as a mod that adds the ships from that save slot as a new faction. From the save slot selection screen (right after Start from the main menu), right click on the slot and select “Export as Mod” or “Export as Mod (create blocks.lua)”. The latter option creates a modifiable blocks.lua file which you can then use to modify block properties, and is the preferred option when creating a completely new faction.
Before you actually export your fleet into a mod, you will need to make sure you have used every possible block from the parent faction’s palette. That includes every size variation. You should also precolor your fleet, so they don’t look like you just copied them off a vanilla faction. Make them stand out!
If you want some prebuilt ships to be used in the mod, make the ships before exporting. Just be careful about the designs breaking once the fleet is exported. If you want to make the ships from scratch, just export a fleet with one (or more, depending on total P of parts you’ll use) ship carrying the entire palette.
The Blocks (Part One)
After extracting your fleet into a mod, with it’s block files created as well, it is now time to design the core of the mod: a file named “blocks.lua”.
By default blocks are built into the game binary. To generate blocks.lua, set cvar
(kWriteBlocks=1) and restart the game. The best way to learn about the block file format is to
study the descriptions for familiar weapons in this file.
The default the written blocks.lua file will be located in the “data” folder which is located…
- …In Windows: C:/Users/You/Saved Games/Reassembly/
- …In Mac: /Users/You/Library/Application Support/Reassembly/
- …In Linux: /home/You/.local/share/Reassembly/
The block file format syntax, like other Reassembly data files, is inspired by the programming
language Lua. This is the description for the basic Plasma Cannon – a relatively small,
octagonal, turreted projectile weapon. – as an example.
Blocks are defined as Lua table literals. As such, the information is given in a key-value setup encased in {curly brackets}, where a key is defined and set to some value using =, eg. {key=”value”}. Lua tables can also contain tables, eg. {table={thing=3}}, and don’t require types to be specified for the values associated with keys, as Lua is a weakly typed scripting language.
The block should be identified with a unique number. New blocks (including new blocks added to default factions) should be given id numbers between 1 and 199. If you need to add more than 200 blocks, use numbers between 17000 and 26000.
Blockshape and blockscale together specify the shape and scale of a block. A list of all shapes
will be written to the log when kWriteBlocks=1. The durability and density fields are multiplied with
the area of the block to calculate the health (hit points) and mass of the block, respectively.
Although health may be specified, it is always overridden by the value computed from durability.
Colors are in hexadecimal RRGGBB format – the same as HTML or CSS colors except with a 0x prefix instead of #. The color of each block slowly phases between fillColor and fillColor1. Certain colors (e.g. laser color) contain an alpha component AARRGGBB where 0xff is fully opaque and 0x00 is fully transparent.
The P value of a block may be specified as “points”. Otherwise, it is calculated based on a number of other fields. There are also several fields that will be calculated if no value is provided. Auto-calculated fields include cannon and laser power, generator powerCapacity, shield and thruster color, color, block grow rate, resource capacity, durability, and density.
The group field should be set to the faction to which the block belongs. To make a block
purchasable in the Upgrade / Data Bank screen, it must also be used in a ship in that faction.
The Blocks (Part Two)
There are a variety of shapes to make blocks with.
0. none specified is a simple square block
1. OCTAGON (8 sided regular polygon)
2. THRUSTER (chunky thruster)
3. CANNON (standard fixed cannon block)
4. MISSILE (well, uh, it’s, uh, a missile)
5. RECT (weird block that has interesting ratios of sizes to compensate for situations of cruel and unusual geometry)
6. HEXAGON (6 sided regular polygon)
7. TRI (isoceles triangle)
8. COMMAND (the iconic not quite box, not quite octagon shape used by most command blocks)
9. SENSOR (unused block, throws assert errors, probably don’t use this)
10. WING (causes a physics crash on creation and locks up the game – don’t use!!)
11. ADAPTER (weird block that can be used to change from odd numbers of attachment points to even and vice versa)
12. CUSTOM (causes a physics crash on creation and locks up the game – don’t use!!)
13. PENTAGON (5 sided regular polygon)
14. RHOMBUS_72_108 (one of the penrose rhombus tiles, this is ‘penrose one’, it’s the thicker rhombus)
15. RHOMBUS_36_144 (one of the penrose rhombus tiles, this is ‘penrose zero’, it’s the skinnier rhombus)
16. THRUSTER_PENT (used by penrose tiling thrusters that need to fit in a more friendly manner for their unique geometry)
17. DISH_WEAPON (used by some weapon mods eg damage amplifier)
18. DISH_THRUSTER (used by most thrusters)
19. RIGHT_TRI (right angled isoceles triangle)
20. RECT_LAUNCHER (shape for ideal launching of things eg. missiles, drones, staggered off from main body, TWO LAUNCH POINTS)
21. RECT_CANNON (base cannon for the modular weapons)
22. RECT_CANNON_BOOST (used by some weapon mods eg range amplifier)
23. invalid, not recognised, causes a physics crash
24. RECT_LONG (adjustable on one dimension only)
25. ISOTRI_72 (half of a thick rhombus, end point angle is 72 degrees)
26. ISOTRI_36 (half of a thin rhombus, 36 degrees)
27. RIGHT_TRI2L (right angled scalene triangle, forms an L when shortest side is aligned with bottom edge of screen)
28. RIGHT_TRI2R (the mirrored version of the L forming scalene triangle)
29. SEED_1 (same shape as gem 1, but with special anchor point at base to connect to terrain)
30. SEED_2 (same shape as gem 2, but with special anchor point at base to connect to terrain)
31. SEED_3 (same shape as gem 3, but with special anchor point at base to connect to terrain)
32. SEED_4 (same shape as gem 4, but with special anchor point at base to connect to terrain)
33. RECT_LONG_NARROW (the same but narrower I guess)
34. RECT_LAUNCHER1 (shape for launching things, ONE LARGER LAUNCH POINT)
35. RIGHT_TRI_22_5L (as before, 22.5 degree angle)
36. RIGHT_TRI_22_5R (as before and so on and so forth)
37. DISH_MISSILE (used by faction 8 drones)
38. RECT_ROOT (a thin rectangle that connects one side of x attachment points to one side of one attachment point, used to anchor buildings)
39. GEM_1 (weird organic shape, narrow to wide with one connector at the end)
40. GEM_2 (weird organic shape, narrow to wide with two sides and connectors at the end)
41. GEM_3 (weird organic shape, narrow to wide with three sides and connectors at the end)
42. GEM_4 (weird organic shape, narrow to wide with four sides and connectors at the end)
43. ISOTRI_25 (narrow, 25 degrees)
44. ISOTRI_25_MISSILE (it’s a triangular missile!)
45. ISOTRI_13 (narrower, 13 degrees)
46. ISOTRI_13_MISSILE (doesn’t seem to be used but is a narrower missile than the 25-degree triangle missile)
47. ISOTRI_6 (really narrow, 6 degrees)
48. HEPTAGON_LAUNCHER (a flower of missiles and pain)
49. HEPTAGON (7 sided regular polygon)
50. GEM_2_LAUNCHER (end attach points are for launched blocks only)
51. GEM_3_LAUNCHER (end attach points are for launched blocks only)
52. GEM_4_LAUNCHER (end attach points are for launched blocks only)
53. RECT_QUARTER (the same as RECT_LONG but much much smaller)
54. ISOTRI_3 (the narrowest, 3 degrees, Blockscale of 2 or higher strongly required)
55. ISOTRI_25_WEAPON (used by some weapon mods such as the rate amplifier on Faction 4)
56. NONAGON (9 sided regular polygon)
57. ISOTRI_80 (almost but not quite a right angled triangle)
58. THRUSTER_RECT (an even chunkier thruster)
59. SQUARE_HALF (half the size of a regular block, so closer to 1/4 in volume)
60. SQUARE_LAUNCHER (the unfortunate fact is this will never be able to use all its launch points)
61. SQUARE_MISSILE (pretty much only used for faction 6 drones)
62. RIGHT_TRI_30L (sort of different with one less attachment point?? 30 degree angle)
63. RIGHT_TRI_30R (and then mirrored)
64. OCTAGON_1 (an octagon with one attachment point)
65. SQUARE_1 (a square with one attachment point)
66. CANNON2 (fixed shotgun/gauss beam block)
67. RECT_V1 (causes a physics crash on creation and locks up the game – don’t use!!)
68. MISSILE_LAUNCHER (a missile with launcher attachment points!!!)
69. MISSILE_SHORT (stubby missile, has launch attach points??)
The Blocks (Part Three)
Blocks are made special with a variety of features.
COMMAND: The “brain” of ships. Required!
THRUSTER: Provides movement. 10000 in “thrusterForce” translates to 10k in-game.
GENERATOR: Produce and/or store energy. Causes block to explode on destruction.
TURRET: Mounts a weapon as a turret. “turretSpeed” controls turret swivel speed.
DTURRET: Ditto to TURRET, I guess?
OTURRET: Ditto to TURRET, I guess?
LAUNCH: Used by launched blocks. Full info unknown.
LAUNCHER: Launches predefined blocks.
CANNON: Makes the weapon fire projectiles.
LASER: The weapon fires a solid (or pulsed) laser that hits instantly.
SENSOR: Affects AI awareness?
SHIELD: A bubble of safety.
TORQUER: A thrust-free way to rotate the ship.
EXPLODE: Explodes. ‘Nuff said.
ASSEMBLER: If the ship loses blocks, they’re rebuilt over time.
REGROWER: Similar to ASEMBLER, but for “plants” and buildings.
CANNON_BOOST: Modifies attached weapon.
INVULNERABLE: “I AM BULLET-PROOF!”
NOREGEN: Cannot recover lost health.
REPLICATE: Similar to LAUNCH(ER)?
ENVIRONMENTAL: Supports Vegetation
TRACTOR: Collects resources in range
ROOT: Attachment point for buildings.
GROW: It’s not fully assembled.
PHOTOSYNTH: Produce resources independently.
AUTOFIRE: Fire in reaction to nearby targets.
AUTOLAUNCH: Ditto?
FREERES: If block UNGROWs, it won’t drop resources.
FACTORY: The block is a Ship Production Unit
SELFFACTORY: The ship is a Ship Production Unit. (Warning: Unstable)
SEED: Don’t grow until attached to an ENVIRONMENTAL block.
PROTOTYPE: Unknown
ENERGIZE: Unknown
UNIQUE: Unknown
PERSISTENT: Unknown
LIGHTNING: Unknown
VISIBLURB: Unknown
SUBCOMMAND: Unknown?
UNGROW: Decay into resources. Decays into nothing if FREERES is also defined.
CHARGING: Press-and-hold action
MELEE: Collisions deal more damage, and take reduced collision damage. Can easily become overpowered, especially if “meleeDamage” is defined.
TRANSIENT: Used by blocks captured by ships with the TRACTOR_TRANSIENT flag.
NOCLIP: Disables collisions with
INVISIBLE: Can’t be seen?
SPECTER: Ditto?
JAMMER: Disrupts nearby enemy ships?
TELEPORTER: Teleport with an energy cost proportional to “teleporterPower” times mass.
DEACTIVATES: Block deactivates when destroyed. Due to a glitch, blocks with this feature are unbreakable.
TELESPAWN: Summon fully-built ships
INTLINES: Outlines do not merge.
ONEUSE: Only works one, I guess?
PERISHABLE: Lives for a limited time, then ungrows (or explodes).
Special Variables
There are several variables that affect a block’s properties. But did you know that there are several other less-known variables that actually affect the block’s abilities.
Not many people know about this variable. This can affect the power consumed depending on the user ship’s mass. the default teleporterPower is 4.0, but changing this value can lead to strange results.
So you made a set of armored hull blocks with high durability (>10). To make them even more durable, you can add the “armor” variable. What this does can be explain as this: You fire a projectile that deals 20 damage to a block. Set the variable to 10, and the projectile will still deal full damage. Set it to 19, and it still hits. Setting it to 20 or higher, and that 20-damage projectile will simply bounce off without dealing any damage. To make things more interesting, this variable can be applied to shields, too. Lasers and explosions ignore this variable completely.
This variable defines the damage scale of melee-infused blocks. Basically, a meleeDamage variable of 5 means a 500% damage multiplier. A meleeDamage variable of 50 means a 5000% damage multiplier!
This variable is used by LAUNCHER blocks to make the blocks they launch spin! You can find this in the Shard Launchers used by the Bees.
Thee two variables are used by the Tinkrell thrusters and the Maneuver Thrusters of the Bees. When a thruster with these variables are activated, the thruster’s force is temporarily boosted for the time defined. It is unknown if all thrusters have this ability, or just the ones defined with these variables. Making “thrusterBoost” a negative number creates a “build-up” curve within “thrusterBoostTime”, where theusters start off slow and build strength as they are functioning.
Want to prebind certain weapons. This variable can be quite useful for that job.
Factions – factions.lua, ships/, extra_ships/
Ship files loaded from the ships/ directory must have the form _.lua, as in “8_interceptor.lua”. Ships are indexed by name in much the same way that blocks are indexed by block identifier number – therefore, mods that add a new ship with the same name and faction as a default ship will overwrite that default ship. To avoid conflicting with other mods, ships added to default factions should avoid generic names and consider including the name of the mod or mod author in the name.
New faction should be assigned numbers between 20 and 100. Faction numbers in this range are subject to relocation in the same manner as block ids – when the mod is installed through Steam Workshop the mod identifier will be added to the faction number to create a new, unique faction number. Therefore, multiple mods may e.g. define faction 20 without fear of conflicting.
The file factions.lua describes faction data not in the ships themselves. The “color0″ and “color1″ fields are used in combination with block colors when the player changes their faction color. Factions with “playable=1″ will show up on the faction select screen. “playable=2″ indicates that the faction is unlocked by default.
If a ship is not specified with the “start” field, the ship (or ships) closest to 300P will be used as the starter ship.
Ships loaded from the extra_ships/ directory are added to faction 10 (set by kExtraShipsFaction). The file name does not need to follow the same format as ships loaded from the ships/ directory.
New faction mods must also add their faction to “regions.lua” in order to see the faction in the game.
The “aiflags” field describes the default ai behavior of ships in this faction – individual ships are also subject to behavior randomization.
Each faction has a set of artificial intelligent parameters that make them behave how they are meant to behave.
- METAMORPHOSIS: Automatically changes its design occasionally
- FOLLOWER: Follows the player. If put in the aiflags of the faction, hilarity may ensue.
- ATTACK: Immediately initiate attack on sight of an enemy spaceship. Cannot use FACTORY, but can use SELFFACTORY
- FLOCKING: Align with and follow nearby allies
- RECKLESS: Favors fight over flight
- AGGRESSIVE: Decreased delay before initiating attack
- CAUTIOUS: Increased delay before initiating attack
- SOCIAL: Alerts nearby allies when attacking or being attacked
- PEACEFUL: Does not attack unless attacked
- WANDER: Wander randomly
- HATES_PLANTS: Kill nearby plants
- FORGIVING: Stop attacking after a short time.
- TRACTOR_TRANSIENT: Loot useful parts from wrecks
- DODGES: Dodge enemy attacks
- RIPPLE_FIRE: Ships use ripple fire
- SPREAD_FIRE: Spread weapon firing angles
- BAD_AIM: Blindly aim randomly
- POINT_DEFENSE: Use all weapons as point defense.
- INACTIVE: Ship is basically a vegetable
- SMART_FIRE: Adapt attack to target movement
- NO_PARENT: Automatically leave parent fleet when spawned.
- CHILDREN_SET: Children are manually set by the player; only applicable in Command Mode
- BLUEPRINT_SET: Ship Blueprint is manually set by the player; only applicable in Command Mode
- MUTATES: Spawned ships are randomly mutated
Mapping Your Faction
Okay, so you have a palette and a faction that defines it. What’s next? If you didn’t make many ships just to export the palette you want to modify, now is the time to make some more ships.
Now that you have your block palette, go to sandbox mode.
To test that your palette has in fact loaded into game, use either palette <your faction id> or minpalette <your faction number> in the sandbox.
palette will create all of the blocks you’ve defined.
minpalette will create only the smallest scale of each block you define. Remember! If you want a block to be resizable, you must declare it multiple times and vary only the blockscale parameter. You can control how much a block can be scaled by how many or how few duplicates of the block you specify in blocks.lua.
Now that you have your palette, it is time for what you will probably consider to be either the most fun part or the most tedious part, depending on what you get out of the game, and that’s to design a whole bunch of different ships and stations for your faction to use.
In the sandbox, hit the number key 3 to enter Construct mode. This turns the entire world into something you can drag blocks around and edit. All the editor commands you’re used to work the same, more or less. Assemble ships as you see fit (make sure to vary the P value for ships) and don’t forget to make a few stations! Stations are made exactly the same way as ships, but must have zero thrusters. None. Absolutely immobile. Torquers are fine, though.
When you’re happy with a ship/station design, double click it (or click and drag) to select the entire cluster. This next part is very important. Save your ship/station using ssave <name of ship/station>, where the name of your ship/station must follow this convention:
<faction number>_<lowercase name>
If you want to see how the AI uses your ship, select an entire ship and use the command activate! Make sure you saved a copy of the ship or otherwise kept an inert duplicate around before you do so, just in case it manages to get itself blown up somehow. fleet <regular faction number> and agent are good to spawn in some things to test your designs against.
If you are planning ahead, keep in mind that the player’s starting ship is whatever ship comes closest to 300 P without going over. If you want the player to have some form of control over their starting ship, save multiple designs that tie for “closest to or exactly 300P”, and the game will randomly choose the design to designate the starting ship (restarting the game allows for another design to be chosen, but it’s not uncommon for the game to randomly choose the same design twice in a row.).
The regions.lua file is used to generate the map when a new game is created. It is also referenced as individual sectors are explored and generated. A “region” is a group of map sectors that are generated with the same parameters. There is typically at least one region per faction, but there may be several and region may generate more than one faction of ships or no ships at all. During generation, each region definition is expanded into several regions, each of which covers at least one sector. A description of which region definition corresponds to each sector is then written to map1.lua in the save directory.
For example…
The “ident” field uniquely identifies the region and is stored in the save game directory (in map1.lua). As with block and faction ids, mods should avoid changing region identifiers as doing so can break existing save files. Region identifiers are subject to relocation in the same manner as block idents and faction numbers.
“count” determines the number of actual regions generated by this definition. “radius” and “position” are both in the range [0-1] and specify ranges for the radius of each generated region and its distance from the origin of the containing region, respectively.
The “fleets” field defines a P curve for ships generated by each faction – in this case sectors at radius 0 from each region (i.e. the center) will generate 1000P of ships and sectors at the edge will generate 600. See the regions.lua file for documentation and examples of other region fields.
Playing as your Faction
The last step to making sure your faction works is to find it in your world. Choose one of your more advanced games, preferably one you already maxed the P of, and send that fleet to a new world (use the wormhole for more stable results). Now look for your custom faction. Enter debug mode wit “” and use the reveal command. Search for your faction by hovering over a map pixel. The sidebar will label the pixel selected with the faction that is controlling it. For example, hovering over a red-orange pixel will say “Controlled by Red”. Once you found a sector with your new faction, go there and destroy a ship with at least 1001P (There is a textual error saying that you can kill a 1000P ship to unlock the faction. Beware of troll capitals that are exactly 1000P!)
Once you unlock the faction, start a new game with it and test out everything to make sure it’s what you are expecting. Tweak everything before finalizing your mod for publication.
Sharing your Faction
Congratulations, you have created a mod that adds a new faction into the game. There is one more thing to do before publishing your mod…
…adding a preview image of at least 200×200 pixels.
Once you do that, you can start Reassembly, click on “Mods”, find your mod in the menu, and click “Publish”. After publishing, your default browser will automatically launch the Workshop page of your newly published mod. Add a description, describe it, and check if the mod requires any other mods.
Epilogue
I hope this guide has helped you create a new faction, design new blocks, and publish your work to the Steam Workshop for others to enjoy.
Playing against a new faction, or playing as a new faction, adds new experiences and new stories for your world to tell. Thank you for your time to study this guide to make your own unique mods, and enjoy the wonderful interstellar tidepool that is Reassembly.
References, Works Cited, and More Information
These are links to additional guides and information that are also helpful when making your mod.