Existing mods are available on the Steam Workshop Page
Forum Threads
- Bug Reporting Guidlines – thread describing location of game save files, cvar files, etc.
- Game diagnostics – thread describing use of cvars and various built in performance/timing graphs.
- Modding subforum – community support. ( Outdated )
- Discord Server – Reach Arthur and fellow ( primarily English ) Reassembly players.
- Advanced Shapes Guide by Prototype – His guide is very comprehensive.
Code
- Scripting reference a Python script that can read Reassembly format text files.
Please don’t hesitate to email me at arthur@anisopteragames.com with any questions.
Reassembly Modding
This document describes the process of creating mods for the game Reassembly and documents
the data file formats loaded by the game.
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.
Reassembly data files are in plain text format. I recommend Notepad++ for editing these files. I personally prefer GNU emacs but the learning curve is pretty steep.
Data syntax
Reassembly data files are all parsed using the same system and have the same basic syntax, which is inspired by the programming language Lua. The exact format of each file depends on its contents. All data files are utf-8 encoded.
Comments – instructional text that is ignored when loading – start with ‘#’ or ‘–‘ and extend to the end of the line.
Data is strongly and strictly typed (like in C++, unlike Lua). For example, the “points” field within Block definitions is of integer type. Therefore, ‘points=5.6’ is a syntax error, as is ‘points=”5.6″‘. A correct definition would be ‘points=5’.
See the Appendix for complete data type definitions.
Since it is relatively easy to misplace a comma or brace, be sure to check the game log for
syntax errors while testing your mod.
Moddable files
Reassembly’s data files can be overridden or extended via mods.
An important component of the mod system is the ability to support multiple simultaneous mods.
Since many things in Reassembly are referenced using numeric identifiers and it would otherwise
be easy for multiple mods to accidentally pick the same identifiers, mods undergo a process
called Relocation when they are loaded
from the Steam Workshop. The details of this are described in Block Identifiers.
Currently moddable files include:
- Blocks
- Factions
- Regions
- Shapes
- Audio
- Text ( Messages, etc )
- Font ( Blockfonts and GUI )
- Shaders
- Cvars
Mod Creation Overview
When creating a block or faction mod for Reassembly, there are two main methods of getting started:
Faction Export Method
Reassembly can export an existing save slot as a mod that adds the ships from that save slot as a new faction. The ship files can either use blocks from the parent faction or, optionally, a new set of blocks can be automatically created from the parent blocks and then modified by the modder. 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)”. If you select create blocks.lua, you can then edit this file to change block statistics – see the section on Block creation below. The resulting mod should be immediately visible in the mod browser and can be published – although the game will need to be restarted to allow playing as or against the new faction.
Custom Method
- Create a folder called “mods” alongside the “data” folder in the system save location
Windows: C:/Users/*You*/Saved Games/Reassembly/
Mac: /Users/*You*/Library/Application Support/Reassembly/
Linux: /home/*You*/.local/share/Reassembly/
– - Create a folder for your mod inside this directory (e.g. …/Reassembly/mods/mynewmod/)
– - Copy and modify files from the “data” directory into this folder as appropriate
– - Your mod will be automatically loaded when the game starts and should be visible in the “mods” menu as a local mod.
Test the mod to make sure you are happy with it. Be sure to check the log for any errors in loading your mod. ( See: Troubleshooting )
– - Use the “Publish” button in the “mods” menu to upload the mod to the Steam Workshop. This should open the workshop web page for your mod, allowing the title and description to be edited.
– - The “Publish” button may be used again to upload revisions to your mod. Keep in mind that any changes will be downloaded by your mod’s subscribers – try not to break backwards compatibility.
Blocks – blocks.lua
Block mods can create new blocks or modify existing blocks. New blocks can be added to one of the base factions or attached to new factions.
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 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.
{881, name="Plasma Cannon", features=TURRET|CANNON, group=8, blockshape=OCTAGON, blockscale=2, durability=0.500, blurb="Basic turreted damage dealer", density=0.150, fillColor=0x113077, fillColor1=0x205079, lineColor=0x3390eb, cannon={ roundsPerSec=4.000, roundsPerBurst=3, muzzleVel=1400.000, spread=0.020, damage=120.000, color=47081, range=1200.000}}
Block Identifiers – IDs
The first and most important element of a block description is the block identifier – in this case 881. Ship and save files containing the block will refer to the block by this number only.
In general, changing the shape or size of the block will cause ships containing that block to load incorrectly. Certain block identifiers are “relocated” by the modding system for Steam Workshop mods to avoid conflicts between mods adding new blocks. Relocation essentially adds a per-mod id number to each new block in the mod.
- 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.
- The range 200 to 17000 and 65535+ are reserved.
Numbers in these ranges ( 1-199 and 17000-26000 ) are subject to relocation in the same manner as faction ids – when the mod is installed through Steam Workshop the mod identifier will be added to the block number to create a new, unique block number. Therefore, multiple mods may e.g. define block 100 without fear of conflicting.
NOTICE
- The ID range 200-17000 is reserved for built-in default blocks. Mods defining blocks within this range will overwrite those blocks. Mods modifying default blocks, should be careful not to change the blocksize or block shape of the block to avoid breaking existing ships.
- The ID range 65535+ is reserved for temporary blocks, and blocks from the workshop. ID’s in this range will cause problems with workshop ID reallocation, making your mod incompatible.
Block fields
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.
It is possible to directly set the “health” of a block, which indirectly sets it’s durability as to match the health that you wish to be generated.
Similarly.
It is possible to directly set the “mass” of a block, which indirectly sets it’s density as to match the mass that you wish to be generated.
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 – see the next section. – or be given the feature PALETTE. Conversely, to make a block unattainable by the player, you can use NOPALETTE.
Custom shapes – shapes.lua
Shape mods can create custom shapes by creating a shapes.lua data file within your mod folder.
For reference; the base game’s shapes.lua can be found in the data folder next to the mods folder in the system save location.
Shapes must be convex in order to avoid graphical and building glitches arising from the game’s method of filling blocks with color.
They can be concave, however visual appeal and usability are not guaranteed.
For example: A simple square, with connection ports in the center of each line, and with two scales:
{5001, { //-- Scale 1 ( Do not write this text ) {verts={{5, -5}, {-5, -5}, {-5, 5}, {5, 5}}, ports={{3, 0.5}, {0, 0.5}, {1, 0.5}, {2, 0.5}}} //-- Scale 2 ( Do not write this text ) {verts={{10, -10}, {-10, -10}, {-10, 10}, {10, 10}}, ports={{3, 0.25}, {3, 0.75} {0, 0.25}, {0, 0.75}, {1, 0.25}, {1, 0.75}, {2, 0.25}, {2, 0.75}}}},},
Once made, you can refer to the shape by it’s ID – in this case “5001”.
Shape ID’s should be in the range: 100 – 10000
“verts” defines each individual vertice of the square.
There are four points of a square, so we have defined four points in an { x , y } fashion.
Where you start does not matter, however you must place your vertices in the order in which they connect. The first and last vertice will connect automatically.
“ports” controls the location, and spacing of ports along each line of your shape. The format is { line number , port position ( as fraction ) , port type }
Note: Line numbering starts at 0.
More Port Work
Ports are spaced along a line, at the position of the percentage given. ( 0.5 = 50% = middle )
You need to denote each port individually, as well as it’s spacing across it’s line.
Normal size one blocks are 10 units wide ( -5 to 5 = 10 units ), and will usually have one port on each side.
Thusly, ports are given the fraction 0.5 placing them in the middle.
In order to make a shape with more than one port on a side, you will need to manually calculate their position.
- - - Port Fraction Formula: [ (1/n) / 2 ] n = ports wanted on a surface ( For equal spacing. ) Therefore: If I want 4 ports on a line. [ 1/4 / 2 ] = 0.125 Therefore, we start at 0, and add 0.125 for the first position, on the first side: therefore: { 0, 0.125 }, then add 0.125 twice more: { 0, 0.375 }, then twice more: { 0, 0.625 }, then twice more: { 0, 0.875 }, You will know this is correct, if adding 0.125 once more takes you to 1. [ 0.875 + 0.125 = 1 ] Four ports are now placed equally across line 0 ( The first pair of vert points ).
Even More Port Work
Ports can have multiple functions.
When making a custom shape, you can define port functions like so:
{ 0, 0.5} – Adds a normal port half way across the first surface.
{ 0, 0.5, MISSILE} – Adds a missile port half way across the first surface.
{ 0, 0.5, BOOSTER_OUT
PORT TYPES: THRUSTER_OUT: //Where thrust will be generated from. ( Thrust can only come from one port ) THRUSTER_IN: //Where a previous thruster can connect to a new thruster. WEAPON_OUT://Where projectiles are generated,- connects to WEAPON_IN WEAPON_IN: Linked onto a weapon_out in the case of a booster. LAUNCHER: Objects created by a LAUNCHER block will generate on these ports. MISSILE: Objects created by a LAUNCHER block will attach on this port, and use this port for thrust aswell. ROOT: A root port used by plants and structures to attach to ENVIRONMENT blocks. NONE: No port, not necessary to state this. Normal: Leave the port_type open to have it as a normal port. Remember: { SIDE , PORT_SPACING_FRACTION , PORT_TYPE } - - -
–
Factions – factions.lua, ships/, extra_ships/
Ship files loaded from the ships/ directory must have the form:
faction number_name.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 “primaries” field controls how many colors the player will be able to select when starting a game with that faction.
The “color0” and “color1” ( and “color2” if primaires=3 ) fields are used in combination with block colors when the player changes their faction color.
The “aiflags” field describes the default ai behavior of ships in this faction –
individual ships are also subject to behavior randomization.
Factions with “playable=1” will show up on the faction select screen, locked until a 1000P ship of the same faction is killed.
“playable=2” indicates that the faction is unlocked by default.
“playable=0” indicates that the faction cannot be unlocked.
The “start” field specifies the starting player ship for that faction.
start="8_interceptor.lua",
Ships loaded from the extra_ships/ directory are added to faction 10 (set by kExtraShipsFaction).
The file name need not follow the same format as ships loaded from the ships/ directory.
New faction mods must also add their faction to regions.lua – see the Map section.
Map – regions.lua
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 regions 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.
A mod can either completely redefine this file or add a new region to the default contents. Mods
that completely redefine the file are subject to extension by additive mods but two mods can not
simultaneously redefine the file. Mods which primarily add new factions are encouraged to extend
rather than replace to avoid conflicting with other faction mods.
The regions.lua file parses a single recursive Region definition structure. If the top level
region defines the totalSize parameter, it will replace the whole region definition. Region mods
that do not define totalSize will be merged with the existing region.
Region Definition Fields
{ ident = 208, count = 4, radius = { 0.1, 0.15 }, position = { 0.3, 0.8 }, fleets = { { 2, { { 0, 1000}, {1, 600} } } }, ambient = { 0 }, unique = { { "2_farmer", "2_farmer", "2_pship_farmer01", "2_pdepot_01big" } { "2_farmer", "2_farmer", "2_pship_farmer02", "2_pship_farmer02", "2_pdepot_01" } }, fortress = { "2_platform0", "2_platform1", "2_platform3" }, fortressCount = { 1, 3 }, }
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 it extends from the origin of the containing region to its perimeter, 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 600P worth of ships.
See the regions.lua file for documentation and examples of other region fields.
Audio – audio.lua, audio/
The audio.lua file defines sound effects and music files used by the game. The format of this file is documented in comments of audio.lua – there are many different events that are played at various points in the game. Sound samples are in Ogg Vorbis format.
Mods may override individual samples by creating the relevant file in the audio/ directory. They may also provide an audio.lua file which defines new samples or settings for particular audio events. Audio events are merged between mods so an individual mod should only override changed events.
Shaders – shaders.lua, shaders/
Reassembly loads GLSL version 1.2 shaders from this file which mods can override. Files are
merged together by key so mods should only define shaders that they change. Shaders can #include
files from the shaders/ directory for convenience.
Text – messages.lua, popups.lua, tips.lua, text.lua
These files define text that shows up in various places in the game. Text files loaded by mods
are merged with the default versions and with other mods so mod authors should only place new
contents in these files.
The text.lua file is the only one not present in the base game directory. This file allows
replacement of hard-coded game text and is intended for localization style mods. For example, to
replace the “Start” button on the main menu with a “Play” button:
{ “Start” = “Play” }
Font – blockfonts/, *.ttf
Both the in-world block fonts and the GUI TrueType fonts are moddable.
In-game block fonts are used most prominently to write “Reassembly” on the title screen. Fonts
can be created or modified in in the sandbox with the “sfont” console command. Use the “write”
command to add text to the game. There can be several fonts – the default font is “def”.
Reassembly uses five separate ttf fonts for drawing text in GUIs. There is the default font, a
title font, a monospace font, a fallback font for additional language support, and a symbol font.
To change these fonts, include the new .ttf font file in your mod directory and set the relevant
cvar (e.g. kDefaultFontFile, kTitleFontFile…) in your mod’s cvar.txt to the filename of the
.ttf file.
Misc – cvars.txt
Cvars are a general mechanism for modifying game variables. They can be loaded from a file or changed via the console “cvar” command. Many aspects of the game can be changed through cvars, for example the P cap (kPointMax), various C rewards and costs (kConquestC, kWormholeC, kRecruitCostC, …), graphics settings (kWorleyColorRadius, kProjectileGlow, kProjectileHalo), and many other things.
cvars are conventionally named kWhatDoesItDo. See cvars.txt for a complete list of available variables – this file is written to the system save directory on startup if it has not been modified. Cvars can also be set via the console command “cvar”. Individual cvars are documented on the Sandbox/console/cvar command reference page.
If you wish to save your current set of cvars – or wish to backup the normal ones before altering – go to the sandbox, and type into the console: “save_cvars” this will save all current cvars to the data folder within your system’s save location for Reassembly.
Warnings and Tips
A list of very important things to avoid, and be aware of when creating a mod.
- Take extreme care to make your users aware of any size changes you make to the galaxy.
As it will cause corruption to any saves not made with that galaxy size initially. - Blocks with both THRUSTER and CANNON or LASER will confuse the AI, and cause problematic behaviour.
- Additionally, negative thrust on a block will also confuse the AI.
- Giving a block both GENERATOR and THRUSTER will disable the generator’s normal explosion.
- Regions should not have a count greater then approximately 4, anything more runs the risk of crowding the galaxy. Especial if it’s radius is greater than [ 0.1, 0.15 ]
- Go to the Reassembly Discord Server and ask around if you are stuck.
Preview images
Once you have finished your mod, and are happy with it, you can attach a preview image to it by providing an image and calling it “preview.png”.
Note: File size must be under 5meg.
Troubleshooting
Within the game and within the Mods area, you will see all your loaded mods.
If you are experiencing issues loading a block, or with the entire faction or it’s regions check to see if there is an Errors message.
Clicking this message will display the errors, with an arrow directly under the problematic area.
Always check to see if there are missing commas, or unclosed brackets within your data files.
Also, make sure the data file itself is formatted as .lua unless otherwise necessary.
Appendix {#appendix}
Data type definitions. Values default to 0 unless otherwise specified.
int is an integer (-1, 0, 1…)
uint is an unsigned integer (0, 1, 2…)
float is a floating point (real valued) number (-1.5, 0, 1.5). 1, 1.0, and 1.000000 are all valid
floats representing the same number.
float2 and int2 are 2d vectors of float and int type respectively represented as {x, y}. A single value x means {x, x}.
List is a list with all elements of type T. Represented as {element0, element1, …}
Pair<T, U> is two items of type T and U, represented as {itemT, itemU}
structs are parsed as {field0=val0, field1=val1…}, fields may be in any order
Blocks are uniquely parsed as {ident, offset, angle, field0=val0, field1=val1…}
enums except for Shape define bitsets that are parsed as VAL0|VAL1|VAL2…
struct Block { uint ident; float2 offset; float angle; Command command; uint persistentIdent; uint8 bindingId; FeatureE features; float lifetime = -1; float growFrac = 1; float health = 100; FeatureE growFeatures; FeatureE launchFeatures; int explodeFaction; float launchLifetime = -1; float launchResources; float capacity; float growRate = 3.25; uint fillColor = 0x2d0833; uint fillColor1; uint lineColor = 0xffffff; uint thrusterColor = 0xece1c6; uint thrusterColor1; Block replicateBlock; Cannon cannon; Laser laser; Shield shield; int group; EShape shape; uint8 scale = 1; string name; int points; float durability = 1; float armor; // Never recommended. Included for complecency. float density = 0.1; string blurb; float powerCapacity; float thrusterForce = 10000; float thrusterBoost = 2; float thrusterBoostTime = 0.2; float torquerTorque = 10000; CannonBoost boost; float replicateTime = 1; float turretSpeed = 6; float turretLimit = 6.283; float generatorCapacityPerSec; float explodeDamage = 51; float explodeRadius = 30; float explodeStdDev; FeatureE deathFeatures; float launchSpeed = 100; float launcherPower; float launcherSpeed; float launcherOutSpeed; float launcherAngVel; float tractorRange = 400; float photosynthPerSec = 1; float seedLifetime = 60; float chargeMaxTime = 1; float chargeMin = 0.1; float teleporterPower = 4; float teleporterRadius; float meleeDamage = 5; int sort; float2 barrelSize; int barrelCount; float barrelTaper = 1; float elasticity = 0.4; }; struct Command { ECommandFlags flags; uint ident; uint parentIdent; int faction; float resources; float resourceCapacity; int energy; float sensorRadius = 2200; float disruptTime = 1; signed char currentChild = -1; float2 destination; uint objective; BlockCluster blueprint; BlockCluster nextprint; vector<BlockCluster> children; }; struct Laser { float pulsesPerSec; uint8 pulsesPerBurst = 1; EExplosive explosive; float burstyness; float pulseAvailability; float decay = 0.35; float power; float width; float damage; uint color = 0xffffff; float range; float explodeRadius; float immobilizeForce; float linearForce; float barrelTaper; }; struct Cannon { float roundsPerSec; uint8 roundsPerBurst = 1; EExplosive explosive; ESpreadPattern pattern = RANDOM; float burstyness; float muzzleVel; float spread; float rangeStdDev; float power; float damage; float range; float explodeRadius; uint color = 0xffffff; float projectileSize; float barrelTaper = 1; Cannon fragment; }; struct CannonBoost { float2 roundsPerSec = {1, 0}; float2 muzzleVel = {1, 0}; float2 power = {1, 0}; float2 damage = {1, 0}; float2 range = {1, 0}; float2 explodeRadius = {1, 0}; float2 spread = {1, 0}; }; struct Shield { float strength = 100; float armor; // Never recommended. Included for completency. float regen = 20; float delay = 3; float radius = 40; uint color; uint lineColor; uint damagedColor; float power = 1; }; struct GalaxyRegion { int ident; uint color; int faction; uint count = 1; float2 position; float2 radius = {1, 1}; float2 totalSize; int type; vector<pair<int, vector<float2>>> fleets; vector<int2> fleetCount = {{8, 15}}; // Min and max number of fleets float fleetFraction = 0.75; // Percentage of sectors that have ships in them. vector<string> fortress; // Entities that are spawned around capturable stations. int2 fortressCount = {3, 6}; // Min and Max number of fortresses around capturable stations. float2 fortressRadius = {500, 500}; // Distance from capturable stations. vector<int> ambient; // -1, 0, 1, 2, 3, ( Structures, nothing, green plants, red plants, blue plants ) vector<vector<string>> unique; // Specify unique ships that float uniqueFraction = 0.25; // Percentage of sectors with unique ships. float2 asteroidDensity = {0, 0.4}; // What percentage of a region will contain asteroids. ( 1 = 100% full of asteroids ) int2 asteroidSize; // Number of blocks per asteroid. EAsteroidFlags asteroidFlags; // See AsteroidFlags vector<GalaxyRegion> subregions; // }; enum FeatureE { COMMAND, // Designates a command block ( if this dies, ship dies). THRUSTER, // Thruster, provides thrust in a direction. GENERATOR, // Provides energy for weapons. PERISHABLE, // has limited lifetime. TURRET, // Turreted weapon - use with CANNON or LASER. LAUNCH, // Used internally for missiles/seeds that can be launched by player. #DO NOT USE, NOT NECESSARY.# CANNON, // Shoots projectiles. ( can be fragmentation ) LASER, // Shoots beams. ( can be healing beams ) AUTOFIRE, // Weapon automatically targets and fires at enemies. SHIELD, // Round shield, blocks enemy weapons. TORQUER, // Provides torque. (rotation) LAUNCHER, // Generates launchable objects. ( Missiles, mines, torpedoes, etc) and launches them on player input. EXPLODE, // Explodes on contact with enemy, or expiration. ASSEMBLER, // Allows cluster to reassemble ( regrow ), and use tractored parts to rebuild. REGROWER, // Allows cluster to reassemble ( regrow ), but can not tractor new parts to help rebuild. CANNON_BOOST, // Attaches to cannon blocks and increases their power. INVULNERABLE, // Block is indestructible. NOREGEN, // Does not regenerate health. PERSISTENT, // Used internally for map objectives - stations, agents. #Not Recommended Ever# ENVIRONMENTAL, // Allows plants/seeds/roots to attach to it. TRACTOR, // Can harvest resources. ROOT, // Can attach to asteroids/ENVIRONMENTAL. GROW, // Currently growing. #Not Recommended Ever# PHOTOSYNTH, // Generates Resources. AUTOLAUNCH, // Launches automatically, without being triggered. FREERES, // Does not use resources or drop resources. ( good for drones / missiles ) FACTORY, // Can spawn child blocks. SEED, // Can plant itself on asteroids/ENVIRONMENTAL, will thruster if also THRUSTER. MELEE, // Does damage on contact with enemy. UNGROW, // Currently ungrowing. ( Not useful practically ) UNIQUE, // Special feature for use in editor - can't be duplicated. CHARGING, // Charging weapon - use with CANNON or LASER. TRANSIENT, // Used internally to mark blocks only attached temporarily, not part of blueprint. SELFFACTORY, // Can spawn own design. NOCLIP, // No collisions. INVISIBLE, // Don't render block. BUMPER, // Disables collision damage. TELEPORTER, // Can teleport ship. DEACTIVATES, // Deactivates instead of being destroyed. (like stations) TELESPAWN, // Like FACTORY but spawns ships by teleporting them in, already grown. NOCLIP_ALLY, // Blocks with this flag will not collide with friendly blocks. INTLINES, // Draws the lines between blocks. ONEUSE, // Block will act once, then ungrow. ( Cannon, Laser, drone ) NORECOLOR, // Will not be recoloured when the player chooses their colours in the spawn screen. NOPALETTE, // Will not appear in the player's database at all. LAUNCHER_BARRAGE, // Will grow all launchables and fire them at once. ALWAYSFIRE, // Will always fire, and be ignored by the AI. PALETTE, // Will appear in the player's database without needing to be on a ship. NEVERFIRE, // Will never fire, and be ignored by the AI. }; enum EShape { SQUARE, OCTAGON, THRUSTER, CANNON, MISSILE, RECT, HEXAGON, TRI, COMMAND, SENSOR, WING, ADAPTER, PENTAGON, RHOMBUS_72_108, RHOMBUS_36_144, THRUSTER_PENT, DISH_WEAPON, DISH_THRUSTER, RIGHT_TRI, RECT_LAUNCHER, RECT_CANNON, RECT_CANNON_BOOST, RECT_LONG, ISOTRI_72, ISOTRI_36, RIGHT_TRI2L, RIGHT_TRI2R, SEED_1, SEED_2, SEED_3, SEED_4, RECT_LONG_NARROW, RECT_LAUNCHER1, RIGHT_TRI_22_5L, RIGHT_TRI_22_5R, DISH_MISSILE, RECT_ROOT, GEM_1, GEM_2, GEM_3, GEM_4, ISOTRI_25, ISOTRI_25_MISSILE, ISOTRI_13, ISOTRI_13_MISSILE, ISOTRI_6, HEPTAGON_LAUNCHER, HEPTAGON, GEM_2_LAUNCHER, GEM_3_LAUNCHER, GEM_4_LAUNCHER, RECT_QUARTER, ISOTRI_3, ISOTRI_25_WEAPON, NONAGON, ISOTRI_80, THRUSTER_RECT, SQUARE_HALF, SQUARE_LAUNCHER, SQUARE_MISSILE, RIGHT_TRI_30L, RIGHT_TRI_30R, OCTAGON_1, SQUARE_1, CANNON2, RECT_V1, MISSILE_LAUNCHER, MISSILE_SHORT, COMMAND_MISSILE, }; enum ECommandFlags { NONE, METAMORPHOSIS, // Ai will occasionally change blueprints. FOLLOWER, // Follows player. ATTACK, // Special flag for tournament mode, attack ruthlessly. FLOCKING, // Align with nearby allies. RECKLESS, // Run away less. AGGRESSIVE, // Initiate attack more easily. CAUTIOUS, // Initiate attack less easily. SOCIAL, // Call for help when attacked. PEACEFUL, // Never initiate attack. WANDER, // Wander randomly if nothing else to do. ( recommended ) HATES_PLANTS, // Kill plants if in range. FORGIVING, // Stop attacking more easily. TRACTOR_TRANSIENT, // Grab blocks from the environment and use them. DODGES, // Dodge projectiles. RIPPLE_FIRE, // Use ripple fire on weapons. SPREAD_FIRE, // Use spread fire on weapons. BAD_AIM, // Aim poorly. POINT_DEFENSE, // Act like a point defense drone. INACTIVE, // Become a vegetable. SMART_FIRE, // Use spread fire when enemy is expected to dodge. NO_PARENT, // Don't follow leader. CHILDREN_SET, // Don't change children - set by player. BLUEPRINT_SET, // Don't change blueprint - set by player. HANGOUT, // Used to make the Anisoptera ship spin in circles. ;-) PACIFIST, // Never attack even when attacked. ALWAYS_KITE, // Always attack from max range. ALWAYS_RUSH, // Always attack at closest range regardless of incoming damage. ALWAYS_MANEUVER, // Always dodging while attacking. FIRE_AT_WILL, // Ignore parent ship target. }; enum EExplosive { ENABLED, // Will explode. PROXIMITY, // Will snap it's explosion to the closest object relative to explode radius. FINAL, // Will explode at the end of it's range / when the bullet's damage output is exhausted. // NOTE: Frag_* are not explode flags, but fragmentation flags. FRAG_PROXIMITY, // Fragments when within proximity to an object. FRAG_FINAL, // Fragments at the end of it's range / when the bullet's damage output is exhausted. FRAG_IMPACT, // Fragments upon contact with an object. }; enum EAsteroidFlags { EXPLOSIVE, PENROSE, SQUARE, HEXAGON, TRIANGLE, OCTAGON, UNIFORM_SIZE, UNIFORM_TYPE, SIZE_IMPORTANT, NO_RANDOMIZE_FLAGS, };
Great to see the site has been updated with all the new additions from the recent updates. Hope new stuff keeps coming, at least for the near future. 😀
A pleasure.
– Laps
My pleasure as well
The weapons in my mode don’t appear in the sandbox palette.
The weapon is
{17016, scale=1 name=”RailCannon”, features=CANNON|TURRET, group=26, blockshape=SQUARE,
point=30, durability=0.800, blurb=”Long Range small turret.”, density=0.5, fillColor=0x150e52,
fillColor1=0x635b8b, lineColor=0x3390eb, cannon={roundsPerSec=50, roundsPerBurst=1,
muzzleVel= 5000, power=10, damage=50, color=0x6fa286fc, range=5000}},
Make sure the group=26 is correct? The sandbox palette should contain all blocks with the same group.
whenever i try to load my mod, error text came up saying that it dose not have a starter ship. so i went into sandbox and open the palette for the modded blocks and its showed that there is no palette by my factions name
Who can help me to register an account, I can not register here….. Thank you ha!
How would i go about making a launcher that replicates a specific design? i tried to do a “replicate=*Core block with blueprint*”, but the error message tells me that the block i am replicating is somehow overwriting itself?
What if your palette doesn’t show in the sandbox?
I’m having trouble making new ships with modded blocks. I created a mod that adds several weapons, and they don’t show up in the in-game pallet for purchase. I’ve been advised to create a ship for each faction that uses my blocks in order to make them show up. However, when I attempt to save a ship in the sandbox, it simply tells me. “Error saving: ‘(null)’ : Can’t save relocated ship. [DESERIALIZE] Lost _ blocks patching. (Cl_0: 265, 0P)”. I’m using the ssave tool. That’s as much information as I currently can give you. Thanks!
This error message means that the ships you are saving use blocks from a steam workshop mod (relocated blocks). Your mod ships should contain only blocks from your mod and built in blocks. You can identify steam workshop blocks because they have very large id numbers (million+).
Also don’t forget to give the ship a name when you save it: “ssave warlord” to name it warlord.
Thanks. I’ll try and fix that, when I was making the weapons I set the IDs really high. That’s probably the problem.
The relocation system takes care of is collisions between mods so you can pick something easy to remember. 1-100 for example.
I am having problems with blocks not showing in the pallet. anyone have tips for things not shown in this article?
Make sure your faction has a ship using every block
you misunderstood me. I am having a problem with newly made blocks (Out of game) not appearing in the in-game pallet.
If your block is not showing up in the “palette” or “minpalette” sandbox commands, most likely there is a syntax error in your blocks.lua. Check the log for your mod (in the mods screen). Also, make sure that the “group” field of the block is set to the correct faction number.
If your block shows up in the “palette” command but not in the in-game databank, this is most likely because your faction does not have a ship using that block. Only blocks which are used in a ship show up.
So how do i get the New blocks into the Faction without access to them? Does it involve the sandbox?
I’m trying to boost my p in a world (not mod it higher, give myself more instead of collecting r and buying it) and i don’t see any obvious save files in there specifically to edit. For mac users, how do I get there and edit the value within the save?
Thanks!
If you look on the steam workshop i made a mod a couple months back Its called “Free Ship Power Upgrades” and it does exactly what you want here’s a link
http://steamcommunity.com/sharedfiles/filedetails/?id=586174340
if you need a download just ask me ill provide 🙂
Sorry gave you a broken link xD http://steamcommunity.com/sharedfiles/filedetails/?id=586420216&searchtext= here’s the new one xD
What are these fortress lines in region.lua and what does each of them mean?
Fortresses are mini enemy stations that spawn in a circle around deactivated player stations. The Sentinel and Farmer default factions have them.
thank you!
i’m on a mac and i’ve edited the cars.txt so that kWriteBlocks=1 but blocks.lua is not generating. can anyone help?
This happens to me too…
I may be a bit late, but you may be looking in the wrong data file. There is a data file located in C:\Users\(ComputerNameHere)\Saved Games\Reassembly\data. The “blocks.lua” and “blockstats.lua” should be written to this folder. If not, make sure you still have kWriteBlocks still equal to 1 in your cvars.txt, and launch your game. Upon closing it, it should generate.
M wont show up in the universe probably im using blocks that came from the steam workshop
i forgot to add “my fleet\faction wont show up to the universe because i use steam workshop blocks?
Thanks for all the info!
I tried to ssave my palette ship as what the SANDBOX TUTORIAL page said, but it warned that “cannot save relocated ship”. How could I fix it? Nothing else seems to be wrong. Thanks.
This means that the ship contains blocks from a steam workshop mod. Make sure the ship only contains default blocks, or blocks from a local mod that the ship is part of.
cannon color seems to be different from the normal color sheme… no prefix and no rrggbb style, how does it work?
It uses the same scheme as other colors.
Colors are represented internally as “unsigned int” and when they are printed it either uses hex (0x123abc) for very large numbers or decimal (123456) for smaller numbers. Some colors, for example pure dark blue (0x000040) are below the decimal threshold and come out like “64” instead.
I have no idea what the problem is, so I included as much information as possible. I am making a mod that involves custom blocks with custom names. everything else about the mod works except the blocks, all I get is the default block selection with the default names (some of those blocks shouldn’t be included in the mod). all I tried to change was some reload times and damage numbers. here is an example of what Im doing and what I want to happen
{10, bindingId=2, shape=RECT_LAUNCHER, name=”Plasma Torpedo Launcher”, features=LAUNCHER,
group=20, points=21, durability=0.500, blurb=”Launches homeing plasma torpedos”, density=0.150,
fillColor=0x067381, fillColor1=0x067381, lineColor=0x067381, thrusterColor=0xc204d5,
thrusterColor1=0x4d4d4d, replicateBlock=
{command={}, shape=MISSILE, features=COMMAND|THRUSTER|TORQUER|EXPLODE, group=20,
lifetime=10.000, points=2, durability=0.400, density=0.150, fillColor=0x073485,
fillColor1=0x644491, lineColor=0xc470f3, capacity=100.000, thrusterForce=2600.000,
thrusterColor=0x90611069, thrusterColor1=0x90985fa8, torquerTorque=4000.000,
explodeDamage=30.000, explodeRadius=25.000}, replicateTime=1.500, launcherPower=20.000,
launcherOutSpeed=50.000}
there is no indication in game that anything I did here changed anything.
what am I doing wrong and how do I fix it?
I dont know how I fixed it, but I fixed it… all the weapons have their custom names and damage values
I don’t know what I did wrong, but a new mod I’m working on just refuses to work, I’ve done absolutely everything I can think of, but it gives me a simple error about not locating a “{” at the start of the file (line 0), even though it is literally “{}” right now…
Which file are you editing? Can you post the exact error message?
exact same error
{
{94, bindingId=1, shape=CANNON, scale=4, name=”POOSHKA”,
features=CANNON, group=20, points=482, durability=0.250, blurb=”BOOM”,
density=0.150, fillColor=0x113077, fillColor1=0x1e4c79, lineColor=0x3189eb, thrusterColor=0xececec,
thrusterColor1=0x4d4d4d, cannon={roundsPerSec=0.500, explosive=FINAL, muzzleVel=1800.000,
power=316.000, damage=50000.000, color=0x5a8e9, range=3000.000, explodeRadius=50000.000}}
{
{94, bindingId=1, shape=CANNON, scale=4, name=”POOSHKA”,
features=CANNON, group=20, points=482, durability=0.250, blurb=”BOOM”,
density=0.150, fillColor=0x113077, fillColor1=0x1e4c79, lineColor=0x3189eb, thrusterColor=0xececec,
thrusterColor1=0x4d4d4d, cannon={roundsPerSec=0.500, explosive=FINAL, muzzleVel=1800.000,
power=316.000, damage=50000.000, color=0x5a8e9, range=3000.000, explodeRadius=50000.000}}
}
Sorry if I’m a bit late! You forgot a closing bracket to complete your code.
Ya Me To Its So Stress Full Ive Been Trying To get this to work for all of the day!
error:/blocks.lua: Expected ‘{‘ While parsing block
Loaded 0 blocks from ‘/blocks.lua’ (reloc 0)
I Have a Question, I created a block it has no errors i am pretty pleased with that but when i go in a game with my mod my created blocks it not in Upgrades or pallete D: If semone could explain me why or what i have done wrong please answer , Thanks 🙂
Each block needs to be in a ship design for a faction in order to show up in the block palette for that faction.
is it possible to mod in cannon boost blocks that work on turrets (worlds deadliest pd triangle)
Yes, a cannon boost doesn’t have to be part of the barrel. It can just plug into the side of the block, it will then contribute its stats to the turret.
What exactly does “Bursteyness” and “Pulse availability do?”
Also, I’m getting the error /blocks.lua:0 expected ‘{‘ while parsing SerialBlock
I assume it has something to do with me missing a { somewhere, but I can’t find anything, I have this (Just added on to the end of an exported save with Blocks.lua):
{78,}, …..
{79,},
{80, bindingId=1, name=”Cytoscrambler”, features=TURRET|LASER|CHARGING, group=21,
<>},
{81, bindingId=1, name=”Plasma Blade”, features=MELEE, group=21,
<>},
{82, bindingId=1, scale=2, name=”Molecular Dissasembler”, features=TURRET|LASER|CHARGING, group=21,
<>}}
The error is on the very first line (hence the : 0). I think I am seeing the just end of the file but blocks.lua needs to start with a {, since it represents a list of blocks. So:
{
{78, name=”foo”},
{79, name=”bar”},
}
Something like that. There error looks like it saw the first { and then found something other than a { when trying to read the first block.
Burstyness, together with roundsPerSec (*average* rounds fire per second) and roundsPerBurst, controls when projectiles come out of cannons. A cannon with burstyness of 0 fires at a constant rate. A cannon with burstyness of 1 fires all rounds in the burst simultaneously, like a shotgun. Burstyness of 0.5 spends half of the cycle time firing and half waiting.
Burstyness can also apply to pulse lasers, of which pulseAvailability is a also a property. PulseAvailability defines the fraction of time that the laser is on – i.e. the length of each pulse. 0.5 means that each pulse of time t if followed by the laser being off for time t. Other properties that control laser pulsing are pulsesPerSec (analogous to roundsPerSec), pulsesPerBurst (analogous to roundsPerBurst), and burstyness.
I see, thanks!
Looking at the documentation, it looks like the block shapes are predetermined in hard code. Would there be a possiblity for system to edit/create custom block shapes?
I do believe its possible, but I don’t know how to. At the bottom of C:\Users\(ComputerNameHere)\Saved Games\Reassembly\data, you should see shapes.lua. This contains code that defines the points at which the shapes can be attached, as well as the defining parts of the actual shape.
Is it possible to edit modules in mods?
Say for example if a mod contains a turret module that works fine, but for some reason has max rotation speed and no energy cost, how would I add the energy cost and tone down the rotation?
Also, is it possible for modded fleets to get uploeaded as agents into other players games? Even if the “victim” does not have mods?
Alright so I have some questions:
1: When making a block, does it matter the order in which you add the component text in? Do you type the shields after the cannon? Or before? Because I once added in a shield on an existing block and it broke the game.
2: How do you get buildings to spawn? I have a design that uses a block with a root feature (no thrusters). I put it in a ships folder with all the other ingame ships. It just spawns as a station, not a building. It was a faction 2 design (maybe you have to set something for it to spawn as a building?)
1. The order doesn’t matter – if you get a combination that doesn’t work check the log for error messages and if you still can’t get it to work send me an email with the block description.
2. Game should detect/spawn buildings automatically. The root block needs to be oriented correctly (yellow port towards asteroid). You also need to change the faction region definition in regions.lua to set ambient = {-1} (see the definitions for the faction 6 and 12).
Ok, so the regions thing worked but wasn’t such a good idea for faction 2 as the buildings also spawned on the station’s environmental armor blocks too. The game crashed 😛
Pingback: Reassembly Adds Mod Support Via Steam | IndieHangover
Your mod will be automatically loaded when the game starts and should be visible in the “mods” menu as a local mod. Test the mod to make sure you are happy with it. Be sure to check the log for any errors in loading your mod.
There is no “mods” menu?
You currently need to opt into the Beta build on Steam to get the Mods menu (leave the access code field blank).
What if i downloaded the nonsteam version? How would I go about doing this?
Any way to get mods if game bought on App Store?
Pingback: Reassembly, les mods maintenant disponible ! | spaceunivers.com