View unanswered posts | View active topics It is currently Thu Nov 15, 2018 4:45 pm

Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Modding support coming soon 
Author Message
Site Admin
User avatar

Joined: Thu Jan 16, 2014 2:45 pm
Posts: 560
Location: Los Angeles
Reply with quote
I'm working on adding better modding support and steam workshop integration to Reassembly. People will be able to add new blocks or factions, edit cvars etc, and share them easily.

Q. How to create mods?
A. A 'mod' is basically your version of the data/ directory from the game package. The game will be able to load several mods simultaneously as long as they don't conflict. The Mod creation and installation process will be similar to Crypt of the Necrodancer so I'm just going to link their doc: .

Q. How do we avoid conflicts between block ids, faction ids, etc from different mods?
A. The mod system will virtualize block and faction ids to avoid conflicts. Ids from 200 to 65536 are reserved for the game - mods can add blocks with these ids and they will replace the default blocks. Blocks created with ids outside of this range will not conflict with blocks created by other mods with the same id - so several mods can create block id '1'. Similarly with faction numbers, 1-20 map to the built in factions and the rest will be virtualized.

Q. Do you need steam to use mods?
A. You will be able to publish mods as e.g. zip files on the internet and install mods so published without steam. Steam workshop does provides a nice place to share mods, community ranking, and eases the installation process.

Q. Documentation !!#@%#
A. We are working on official docs for the block file format, sandbox commands, etc - they should be ready around when the modding system is done.

Q. When will it be ready?
A. Before the end of April - see also . It will probably take a few additional patches to work out all the kinks since modders will be able to exercise the game code in all kinds of new ways.

Tue Apr 07, 2015 1:13 pm

Joined: Mon Mar 30, 2015 9:10 pm
Posts: 33
Reply with quote
Awesome news, great job

Tue Apr 07, 2015 1:51 pm
User avatar

Joined: Thu Feb 05, 2015 6:07 am
Posts: 365
Reply with quote
Cool!! :mrgreen:

Reassembly Web Dev Kit, by TTFTCUTS!

Muzzle Brake. Because not everyone is a fan of Noisy Crickets!

Empire of the Red Sun

Tue Apr 07, 2015 1:53 pm

Joined: Thu Mar 05, 2015 12:10 pm
Posts: 236
Reply with quote
When will we expect modding support to go live?


Tue Apr 07, 2015 2:27 pm
User avatar

Joined: Sat Jul 12, 2014 3:36 pm
Posts: 326
Reply with quote
Sandbox Documentation? Very nice.

Tue Apr 07, 2015 3:35 pm

Joined: Wed Feb 04, 2015 6:33 am
Posts: 88
Location: Russia
Reply with quote
It is cool, but for me editing game files is more easier than your way :) .

Wed Apr 08, 2015 2:59 am
User avatar

Joined: Thu Jan 23, 2014 6:19 pm
Posts: 380
Location: Undercover
Reply with quote
There are a few of the variation of code that are not possible yet...

Can you take a look: viewtopic.php?f=2&t=1422


Someone may adopt:

Wed Apr 08, 2015 3:21 am
User avatar

Joined: Fri Apr 10, 2015 10:53 pm
Posts: 2
Location: At your base, because it are belong to us.
Reply with quote
Good to see this will be implemented with Steam integration. Just a question, though: how will this affect the multiplayer features (wormholes/tournaments)?

Also, first post on forums hi guys

In dire need of ship ideas.

Yes, I am a pokemon. So?

Fri Apr 10, 2015 11:00 pm
Site Admin
User avatar

Joined: Thu Jan 16, 2014 2:45 pm
Posts: 560
Location: Los Angeles
Reply with quote
Re: async multiplayer: at least for the first update, ships using new blocks won't be downloaded as agents. Eventually i'd like them to be share with other players using the same mods, but that will have to come later.

I'm still chugging through the modding code - every place that loads files has to be updated, there is a new GUI for browsing/uploading mods, workshop integration, bunch of places where faction info was just hardcoded and has to be extracted into moddable files...

Anyway it has gotten to the point where most of the functionality is in and I'm fixing bugs. I wrote some documentation today - it's not done but I thought I would throw it up here for comment. The documentation refers to a bunch of stuff that isn't released yet! Major file changes include removal of the ships.lua file (which was just redundant) and the addition of a new factions.lua which replaces several cvars and also includes per-faction color/ai info which was previously hard coded.

# Reassembly Modding

## Introduction

This document describes the process of creating mods for the game Reassembly and documents
several of the data file formats loaded by the game.

## Mod Creation

1. 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/

2. create a folder for your mod inside this directory (e.g. .../Reassembly/mods/mynewmod/)
3. copy and modify files from the "data" directory into this folder as appropriate
4. 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.
5. 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.
6. 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.

## Modable files

Reassembly's data files can be overridden or extended via mods. The format of each file depends on
its contents, but they are all parsed using the same system and have the same basic syntax. 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.

Since it is relatively easy to misplace a comma or brace, be sure to check the game log for
syntax errors during mod file parsing.

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 below.

### 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.

name="Plasma Cannon",
blurb="Basic turreted damage dealer",

#### Block Identifiers

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 60000.

The range 200-17000 is reserved for built-in default blocks and mods defining blocks within this
range will overwrite those blocks. Mods modifying default blocks, should be careful not to change
the blocksize or blockshape of the block to avoid breaking existing ships.

#### 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
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 hexidecimal 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.

The P value of a block 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 buyable
in the Upgrade / Data Bank screen, it must also be used in a ship in that faction - see the next section.

### Factions - factions.lua, ships/, extra_ships/

Ship files loaded from the ships/ directory must have the form <faction_number>_<ship_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 "color0" and
"color1" 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, and the "start" field specifies the starting player ship for
that faction.

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.

### Audio - audio.lua, audio/

### 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" }

### 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 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.

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 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.

### Font - blockfonts/

In-game block fonts are used most prominently to write "Reassembly" on the title screen. Fonts
can be created or modified with the "sfont" console command. Use the "write" command to add text
to the game.

### Misc - cvars.txt

Cvars are a general mechanism for loading game variables from a file. They can also be 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 settings.

Mon Apr 13, 2015 7:00 pm
User avatar

Joined: Fri Jan 24, 2014 10:11 pm
Posts: 1294
Location: Ames, IA
Reply with quote
I don't have a clue about burst lasers and burstyness properties, I'm trying to adjust faction 14's laser to need to charge more than .1 seconds, but I don't know what to change

The game where I originated as a member of this community. . VISUAL BASED MOD KIT!!
Shellcore command EP2

Mon Apr 13, 2015 7:25 pm
Display posts from previous:  Sort by  
Reply to topic   [ 17 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software