Skip to content

Latest commit

 

History

History
3779 lines (3101 loc) · 157 KB

index.org

File metadata and controls

3779 lines (3101 loc) · 157 KB

Mindustry Modding Guide

Submit pull requests, issues or suggestions on Github: https://github.com/SimonWoodburyForget/mindustry-modding

Overview

Mindustry mods are simply directories of assests. There are many ways to use the modding API, depending on exactly what you want to do, and how far you’re willing to go to do it.

You could just resprite existing game content, you can create new game content with the simpler Json API (which is the main focus of this documentation), you can add custom sounds (or reuse existing ones). It’s possible to add maps to campaign mode, and add scripts to program special behavior into your mod, like custom effects.

Sharing your mod is as simple as giving someone your project directory; mods are also cross platfrom to any platform that supports them. Realistically speaking you’ll want to use GitHub, you should also checkout the Example Mod repository on GitHub: https://github.com/Anuken/ExampleMod

To make mods all you really need is any computer with a text editor.

Directory Structure

Your project directory should look something like this:

project
├── mod.json
├── content
│   ├── items
│   ├── blocks
│   ├── mechs
│   ├── liquids
│   ├── units
│   └── zones
├── maps
├── bundles
├── sounds
├── schematics
├── scripts
├── sprites-override
└── sprites
  • ~mod.json~ (required) metadata file for your mod,
  • content/* directories for game Content,
  • maps/ directory for Zone maps,
  • bundles/ directory for Bundles,
  • sounds/ directory for Sound files,
  • schematics/ directory for Schematic files,
  • scripts/ directory for Scripts,
  • sprites-override/ Sprites directory for overriding ingame content,
  • sprites/ Sprites directory for your content,

Every platform has a different user application data directory, and this is where your mods should be placed:

  • Linux: ~/.local/share/Mindustry/mods/
  • Steam: steam/steamapps/common/Mindustry/mods/
  • Windows: %appdata%/Mindustry/mods/
  • Apple: ~/Library/Application Support/Mindustry/mods/

Note that your filenames should be lowercased and hyphen separated:

  • correct: my-custom-block.json
  • incorrect: My Custom Block.json

Hjson

Mindustry uses Hjson, which for anyone who knows Json, is simply a superset of the very popular serialization language known as Json. – This means that any valid Json will work, but you get extra useful stuff:

# single line comment

// single line comment

/* multiline
comment */

key1: single line string

key2:
'''
multiline
string
'''

key3: [ value 1
        value 2
        value 3 ]

key4: { key1: string
        key2: 0 }

If you don’t know any of those words. – A serialization language, is simply a language which encodes information for a program, and encode means to translate informantion from one form to another, and in this case, to translate text into Java data structures.

mod.json

At the root of your project directory, you must have a mod.json which defines the basic metadata for your project. This file can also be (optionally) named mod.hjson to potentially help your text editor pick better syntax highlighting.

name: Mod Name
displayName: Mod [red]Name[]
author: Yourself
description: This is a useless description.
version: "1.0"
minGameVersion: "100.3"
dependencies: [ ]
  • name will be used to reference to your mod, so name it carefully;
  • displayName this will be used as a display name for the UI, which you can use to add formatting to said name;
  • description of the mod will be rendered in the ingame mod manager, so keep it short and to the point;
  • dependencies is optional, if you want to know more about that, go to the dependencies section;
  • minGameVersion is the minimum build version of the game.

Content

At the root of your project directory you can have a content/ directory, and this is where all the Json/Hjson data goes. Inside of content/ you have subdirectories for the various kinds of content, these are the current common ones:

  • content/items/ for items, like copper and surge-alloy;
  • content/blocks/ for blocks, like turrets and floors;
  • content/mechs/ for mechs, like tau and glaive;
  • content/liquids/ for liquids, like water and slag;
  • content/units/ for flying or ground units, like reaper and dagger;
  • content/zones/ for zones, configuration of campaign maps.

Note that each one of these subdirectories needs a specific content type. The filenames of these files is important, because the stem name of your path (filename without the extension) is used to reference it.

Furthermore the files within these content/<content-type>/* directories may be arbitrarly nested into other sub-directories of any name, to help you organize them further, for example:

  • content/items/metals/iron.hjson, which would respectively create an item named iron.

The content of these files will tend to look something like this:

type: TypeOfThing
name: Name Of Thing
description: Description of thing.
# ... more fields here ...
fieldtypenotes
typeStringContent type of this object.
nameStringDisplayed name of content.
descriptionStringDisplayed description of content.

Other fields included will be the fields of the type itself.

Types

Types have numerous fields, but the important one is type; this is a special field used by the content parser, that changes which type your object is. A ~Router~ type can’t be a ~Turret~ type, as they’re just completely different.

Types extend each other, so if MissileBulletType extends BasicBulletType, you’ll have access to all the fields of BasicBulletType inside of MissileBulletType like damage, lifetime and speed. Fields are case sensitive: hitSize =/= hitsize.

What you can expect a field to do is up to the specific type, some types do absolutely nothing with their fields, and work mostly as a base types will extend from. One such type is Block.

type can be refer to the actual type field of the object. A type may also refer to other things like float is a type so it means you can type 0.3 in a field.

Here you can see, the type of the top level object is Revenant, but the type of the bullet is BulletType so you can use MissileBulletType, because MissileBulletType extends BulletType.

type: Revenant
weapon: {
  bullet: {
    type: MissileBulletType
    damage: 9000
  }
}

Tech Tree

Much like type there exist another magical field known as research which can go at the root of any block object to put it in the techtree.

research: duo

This would put your block after duo in the techtree, and to put it after your own mods block you would write your <block-name>, a mod name prefix is only required if you’re using the content from another mod.

Research cost will be 40 + round(requirements ^ 1.25) * 6 rounded down to the nearest 10, where requirements is the build cost of your block. (in otherwords you can’t set ~requirements~ and ~research cost~ individually)

Sprites

All you need to make sprites, is an image editor that supports transparency (aka: not paint). Block sprites should be 32 * size, so a 2x2 block would require a 64x64 image. Images must be .png files with 32 bit depth.

Sprites can simply be dropped in the sprites/ subdirectory. The content parser will look through it recursively, so you can organize them how ever you feel.

Content is going to look for sprites relative to it’s own name. content/blocks/my-hail.json has the name my-hail and similarly sprites/my-hail.png has the name my-hail, so it’ll be used by this content.

Content may look for multiple sprites. my-hail could be a turret, and it could look for the suffix <name>-heat and what this means is it’ll look for my-hail-heat.

You can find all the vanilla sprites here:

Another thing to know about sprites is that some of them are modified by the game. Turrets specifically have a black border added to them, so you must account for that while making your sprites, leaving transparent space around turrets for example: Ripple

To override ingame content sprites, you can simply put them in sprites-override/.

Sound

Custom sounds can be added through the modding system by dropping them in the sounds/ subdirectory. It doesn’t matter where you put them. Two formats are needed:

  • .ogg required for Desktop/Android
  • .mp3 required for iOS

Just like any other assets, you reference them by the stem of your filenames, so pewpew.ogg and pewpew.mp3 can be referenced with pewpew from a field of type Sound.

Here’s a list of built-in sounds:

  • artillery
  • back
  • bang
  • beam
  • bigshot
  • boom
  • break
  • build
  • buttonClick
  • click
  • conveyor
  • corexplode
  • door
  • drill
  • empty
  • explosionbig
  • explosion
  • fire
  • flame2
  • flame
  • laserbig
  • laser
  • machine
  • message
  • missile
  • pew
  • place
  • press
  • release
  • respawning
  • respawn
  • shootBig
  • shoot
  • shootSnap
  • shotgun
  • spark
  • splash
  • spray
  • thruster
  • unlock
  • wave
  • windowHide

Dependencies

You can add dependencies to your mod by simple adding other mods name in your mod.json:

dependencies: [
  other-mod-name
  not-a-mod
]

The name of dependencies are lower-cased and spaces are replaced with - hyphens, for example Other MOD NamE becomes other-mod-name.

To reference the other mods assets, you must prefix the asset with the other mods name:

  • other-mod-name-not-copper would reference not-copper in other-mod-name
  • other-mod-name-angry-dagger would reference angry-dagger in other-mod-name
  • not-a-mod-angry-dagger would reference angry-dagger in not-a-mod

Bundles

An optional addition to your mod is called bundles. The main use of bundles are give translations of your content, but there’s no reason you couldn’t use them in English. These are plaintext files which go in the bundles/ subdirectory, and they should be named something like bundle_ru.properties (for Russian).

The contents of this file is very simple:

block.example-mod-silver-wall.name = Серебряная Стена
block.example-mod-silver-wall.description = Стена из серебра.

If you’ve read the first few sections of this guide, you’ll spot it right away:

  • <content type>.<mod name>-<content name>.name
  • <content type>.<mod name>-<content name>.description

Notes:

  • mod/content names are lowercased and hyphen separated.

List of content type:

  • item
  • block
  • mech
  • bullet
  • liquid
  • status
  • unit
  • weather
  • effect
  • zone
  • loadout
  • typeid

List of filenames relative to languages:

  • English bundle.properties
  • Czech bundle_cs.properties
  • German bundle_de.properties
  • Spanish bundle_es.properties
  • Estonian bundle_et.properties
  • Basque bundle_eu.properties
  • French BE bundle_fr_BE.properties
  • French bundle_fr.properties
  • Bergabung bundle_in_ID.properties
  • Italian bundle_it.properties
  • Japanese bundle_ja.properties
  • Korean bundle_ko.properties
  • Dutch BE bundle_nl_BE.properties
  • Dutch bundle_nl.properties
  • Polish bundle_pl.properties
  • Portuguese BR bundle_pt_BR.properties
  • Portuguese bundle_pt.properties
  • Russian bundle_ru.properties
  • Danish bundle_sv.properties
  • Turkman bundle_tk.properties
  • Turkish bundle_tr.properties
  • Ukrainian bundle_uk_UA.properties
  • Chinese CN bundle_zh_CN.properties
  • Chinese TW bundle_zh_TW.properties

Markup

The text renderer uses a simple makeup language for coloring text.

  • [name] sets the color by name, there’s a few built-in colors;
  • [#rrggbb] / [#rrggbbaa] sets the color by hex value, with each value being anything from 00 to ff:
    • rr is the red value,
    • gg is the green value,
    • bb is the blue value,
    • aa is the alpha value;
  • [] sets the color back to the previous color;
  • [[ escapes the left bracket, so you can write [[red] to write and it’ll render as [red].

Notes:

  • erros/unknown colors will be silently ignored.

Example:

[red]red
[#ff0000]full-red
[#ff000066]half-red
[#ff000033]half-half-red
[#00ff00]green
[]half-half-red

Built-in Colors

[clear]clear
[black]black
[white]white
[lightgray]lightgray
[gray]gray
[darkgray]darkgray
[blue]blue
[navy]navy
[royal]royal
[slate]slate
[sky]sky
[cyan]cyan
[teal]teal
[green]green
[acid]acid
[lime]lime
[forest]forest
[olive]olive
[yellow]yellow
[gold]gold
[goldenrod]goldenrod
[orange]orange
[brown]brown
[tan]tan
[brick]brick
[red]red
[scarlet]scarlet
[coral]coral
[salmon]salmon
[pink]pink
[magenta]magenta
[purple]purple
[violet]violet
[maroon]maroon

Schematic

Fields that require the type Schematic can either take a built-in loadout (see the Zone section) a base64 string, or the stem name of a .msch file in the schematics/ subdirectory.

As of now, the only purpose of schematics is to give a zone a loadout.

Scripts

Scripting in Mindustry is done with the Rhino JavaScript runtime. Scripts may be added to your mod by putting them in scripts/. Using the built-in extendContent function, you can extend existing Java types from JS, using allowed classes which are injected into your namespace.

For example:

  • scripts/silo.js
    // create a simple shockwave effect
    const siloLaunchEffect = newEffect(20, e => {
    
        // color goes from white to light gray
        Draw.color(Color.white, Color.lightGray, e.fin());
    
        // line thickness goes from 3 to 0
        Lines.stroke(e.fout() * 3);
    
        // draw a circle whose radius goes from 0 to 100
        Lines.circle(e.x, e.y, e.fin() * 100);
    });
    
    // create the block type
    const silo = extendContent(Block, "scatter-silo", {
    
        // override the method to build configuration
        buildConfiguration(tile, table) {
            table.addImageButton(
                Icon.arrowUpSmall,
                Styles.clearTransi,
    
                // configure the tile to signal that it has been
                // pressed (this sync on client to server)
                run(() => tile.configure(0))
            ).size(50);
        },
    
        // override configure event
        configured(tile, value) {
    
            // make sure this silo has the items it needs to fire
            if (tile.entity.cons.valid()) {
    
                // make this effect occur at the tile location
                Effects.effect(siloLaunchEffect, tile);
    
                // create 10 bullets at this tile's location with
                // random rotation and velocity/lifetime
                for (var i = 0; i < 10; i++) {
                    Calls.createBullet(
                        Bullets.flakExplosive,
                        tile.getTeam(),
                        tile.drawx(),
                        tile.drawy(),
                        Mathf.random(360),
                        Mathf.random(0.5, 1.0),
                        Mathf.random(0.2, 1.0)
                    );
                }
    
                // triggering consumption makes it use up the
                // items it requires
                tile.entity.cons.trigger();
            }
        }
    });
        
  • content/blocks/scatter-silo.hjson
    localizedName: "Scatter Silo"
    description: "A player-activatable block that scatters bullets everywhere upon use."
    
    category: turret
    size: 2
    
    update: true
    solid: true
    hasItems: true
    configurable: true
    
    requirements: [ "graphite/75"
                    "titanium/30" ]
    
    consumes: { items: { items: [ "scrap/10" ] } }
        

More examples:

GitHub

Once you have a mod of some kind, you’ll want to actually share it, and you may even want to work with other people on it, and to do that you can use GitHub. If you don’t know what Git (or GitHub) is at all, then you should look into GitHub Desktop, otherwise simply use your favorite command line tool or text editor plugin.

All you need understand is how to open repositories on GitHub, stage and commit changes in your local repository, and push changes to the GitHub repository. Once your project is on GitHub, there are three ways to share it:

  • with the endpoint, for example Anuken/ExampleMod, which could then be typed in the ingame GitHub interface, and that would download it;
  • with the zip file, for example https://github.com/Anuken/ExampleMod/archive/master.zip, which would download the repository as a zip file, and put in mod directory (unzipping is not required);
  • add the typic/tags mindustry-mod on your repository, which should cause the #mods Discord bot to pick it up and render it in it’s listh.

FAQ

  • time in game is calculated through ticks;
  • ticks sometimes called ~frames~, are assumed to be 60/1 second;
  • tilesize is 8 units internally;
  • to calculate range out of lifetime and speed you can do lifetime * speed = range;
  • Abstract what is abstract? all you need to know about abstract types, is this is a Java specific term, which means you cannot instantiate/initialize this specific type by itself. If you do so you’ll probably get an “initialization exception” of some kind;
  • what is a NullPointerException? This is an error message that indicates a field is null and shouldn’t be null, meaning one of the required fields may be missing;
  • bleeding-edge what is bleeding-edge? This is the developer version of Mindustry, specifically it’s refering to the Github master branch. Changes on bleeding-edge usually make it into Mindustry in the next release.

Change Log

This is a log of changes done on the Mindustry Master branch that affected the modding API. The sections are ordered by date commited, and provide a description of what was changed, with a link to the diff on Github.

2020

Mar 5

[ commit Tech tree balance ]
  • updated research cost formula

Feb 11

[ commit improved battery brightness display ]
  • added <name>-top region for battery;

Jan 24

[ commit fixed #1436 / fixed crawlers not exploding ]
  • added instantDisappear to BulletType;

Jan 23

[ commit implemented #1093 ]
  • added attribute to ThermalGenerator;

Jan 22

[ commit added default ore flags for modded ores ]
  • added oreDefault, oreThreshold and oreScale to Floor;

Jan 19

[ commit cleanup of scripts ]
  • added killShooter attribute for BulletType;

Jan 14

[ commit visual tweaks ]
  • added -spinner region to Separator;
  • removed spinnerRadius, spinnerLength, spinnerThickness, color from Separator;

Jan 08

[ commit make rebuildable a block attribute (#1338) ]
  • added rebuildable to Block;

Jan 07

[ commit cleanup ]
  • added drawCell, drawItems and drawLight to Mech;

Jan 04

[ commit merge remote-tracking branch ‘origin/master’ ]
  • added targetDistance to Weapon;

Jan 03

[ commit use findAll to iterate through mod content ]
  • content/ support for organizing .hjson files into directories;

2019

Dec 12

[ commit add liquid void block ]
  • added LiquidVoid block;

Dec 09

[ commit Removed unnecessary unit types ]

  • changed unit types names:
    • DraugMinerDrone;
    • SpiritRepairDrone;
    • PhantomBuilderDrone;
    • [ Dagger Crawler Titan Fortress Eruptor ] → GroundUnit;
    • [ Wraith Ghoul ] → FlyingUnit;
    • RevenantHoverUnit;

Dec 08

[ commit Merge branches master and rhino-js-suffering ]
  • scripts/ sub-directory and Rhino JS runtime was added;
  • displayName can now be used as field name in mod.json

Dec 04

[ commit Added experimental server block syncing ]
  • sync field for Block type was added;

Nov 26

[ commit Texture overrides / Potential mod texture binding optimizations ]
  • sprites-override/ subdirectory can now be used to override existing ingame sprites;

Nov 22

[ commit Switched to hjson extension ]
  • .hjson can now be used as a file extension;

Nov 22

[ commit Added optional mod minimum game version ]
  • minGameVersion can now be used within mod.json;

Nov 20

[ commit Better mod parsing ]
  • liquid/amount can now be used as a string for LiquidStack;
  • item/amount can now be used as a string for ItemStack;
  • mod.json now supports hjson;

World

Block

Extends BlockStorage

Block is the base type of all blocks in the game. All blocks have at least one sprite, which is picked relative to the blocks name.

Fields for all objects that are blocks.

fieldtypedefaultnotes
<r><10>
updatebooleanwhether this block has a tile entity that updates
destructiblebooleanwhether this block has health and can be destroyed
unloadablebooleantruewhether unloaders work on this block
solidbooleanwhether this is solid
solidifesbooleanwhether this block CAN be solid.
rotatebooleanwhether this is rotateable
breakablebooleanwhether you can break this with rightclick
rebuildablebooleantruewhether to add this block to brokenblocks or not (like ShockMine or NuclearReactor)
placeableOnbooleantruewhether this floor can be placed on.
insulatedbooleanfalsewhether this block has insulating properties.
healthint-1tile entity health
baseExplosivenessfloat0base block explosiveness
floatingbooleanfalsewhether this block can be placed on edges of liquids.
sizeint1multiblock size; 1 makes the block 1x1, 2 makes the block 2x2, and so on.
expandedbooleanfalseWhether to draw this block in the expanded draw range.
timersint0Max of timers used.
cacheLayerCacheLayernormalCache layer. Only used for ‘cached’ rendering.
fillesTiletrueSpecial flag; if false, floor will be drawn under this block even if it is cached.
alwaysReplacebooleanfalsewhether this block can be replaced in all cases
groupBlockGroupnoneUnless canReplace is overriden, blocks in the same group can replace each other.
priorityTargetPrioritybaseTargeting priority of this block, as seen by enemies.
configurablebooleanWhether the block can be tapped and selected to configure.
consumesTapbooleanWhether this block consumes touchDown events when tapped.
drawLiquidLightbooleantrueWhether to draw the glow of the liquid for this block, if it has one.
posConfigbooleanWhether the config is positional and needs to be shifted.
syncbooleanWhether to periodically sync this block across the network.
targetablebooleantrueWhether units target this block.
canOverdrivebooleantrueWhether the overdrive core has any effect on this block.
outlineColorColor404049Outlined icon color.
outlineIconbooleanfalseWhether the icon region has an outline added.
hasShadowbooleantrueWhether this block has a shadow under it.
breakSoundSoundboomSounds made when this block breaks.
activeSoundSoundnoneThe sound that this block makes while active. One sound loop. Do not overuse.
activeSoundVolumefloat0.5Active sound base volume.
idleSoundSoundnoneThe sound that this block makes while idle. Uses one sound loop for all blocks.
idleSoundVolumefloat0.5Idle sound base volume.
requirements[ ItemStack ]Cost of constructing and researching this block.
categoryCategorydistributionCategory in place menu.
buildCostfloatCost of building this block; do not modify directly!
buildVisibilityBuildVisibilityhiddenWhether this block is visible and can currently be built.
buildCostMultiplierfloat1Multiplier for speed of building this block.
instantTransferbooleanfalseWhether this block has instant transfer.
alwaysUnlockedbooleanfalse
layerLayernullLayer to draw extra stuff on.
layer2LayernullExtra layer to draw extra stuff on.

Sprites:

  • <name> the main sprite for the block.

** Consumers

This type is commonly used in block type with it’s field consumes, it’s a type that allows your block to consume something, and how this field works is up to the specific type extension you’re using.

fieldtypenotes
<10>
itemStringshorthand for items
itemsConsumeItemsconsume a number of different items
liquidConsumeLiquidconsume a single liquid
powerfloat or ConsumePowerconsume or buffer power
powerBufferedfloatamount of power buffered

Notes:

  • you shouldn’t have power and powerBuffered.

For example with ConsumeItems and ConsumeLiquid:

items: {
  items: [
    copper/10
    surge-alloy/5
  ]
  booster: true
  optional: true
}
liquid: {
  water/1.0
}

Consume

Abstract type which defines a type of resource that a block can consume.

fieldtypedefaultnotes
<10>
optionalbooleanconsumer will not influence consumer validity.
boosterbooleanconsumer will be displayed as a boost input.
updatebooleantrue

ConsumeItems

Extends Consume

Type to consume ItemStacks.

fieldtype
items[ ItemStack ]

ConsumeLiquid

Extends Consume

Type to consume a LiquidStack.

fieldtypedefaultnotes
<10>
liquidStringthe name of liquid type consumed
amountfloatamount used per frame
timePeriodfloat60how much time is taken to use this liquid, example: a normal ConsumeLiquid with 10/s and a 10 second timePeriod would display as 100 seconds, but without a time override it would display as 10 liquid/second. This is used for generic crafters.

ConsumePower

Extends Consume

Type to consume or buffer power.

fieldtypenotes
<10>
usagefloatThe maximum amount of power which can be processed per tick. This might influence efficiency or load a buffer
capacityfloatThe maximum power capacity in power units.
bufferedbooleanTrue if the module can store power.

BlockStorage

Abstract type that extends Content

Type for blocks which may store a buffer of items or liquid.

fieldtypedefault
<r>
hasItemsboolean
hasLiquidsboolean
hasPowerboolean
outputsLiquidbooleanfalse
consumesPowerbooleantrue
outputsPowerbooleanfalse
itemCapacityint10
liquidCapacityfloat10
itemfloat10
liquidPressurefloat1
consumesConsumers

Environment

Environmental blocks are blocks that must be placed from the editor, and they’re the ones that will generally dictate how the game can or will be played. These blocks wont appear on a map unless you’ve built a map to support them.

Floor

Extends Block

Type used for floors themselves or extended to make ores and other things.

fieldtypedefaultnotes
<r><10>
variantsint3number of different variant regions to use.
edgeStringstoneedge fallback, used mainly for ores.
speedMultiplierfloat1multiplies unit velocity by this when walked on.
dragMultiplierfloat0multiplies unit drag by this when walked on.
damageTakenfloat0damage taken per tick on this tile.
drownTimefloat0how many ticks it takes to drown on this.
walkEffectEffectrippleeffect when walking on this floor.
drownUpdateEffectEffectbubbleeffect displayed when drowning on this floor.
statusStatusEffectnonestatus effect applied when walking on.
statusDurationfloat60intensity of applied status effect.
liquidDropLiquidliquids that drop from this block, used for pumps.
itemDropItemitem that drops from this block, used for drills.
isLiquidbooleanwhether this block can be drowned in.
playerUnmineablebooleanfalseblock cannot be mined by players if true.
blendGroupBlockthisgroup of blocks that this block does not draw edges on.
updateEffectEffectnoneeffect displayed when randomly updated.
attributesAttributesarray of affinities to certain things.
oreDefaultbooleanfalsewhether this ore generates in maps by default.
oreScalefloat24ore generation param, for example thorium is 25.38, copper is 23.47.
oreThresholdfloat0.828ore generation param, for example thorium is 0.882, copper is 0.81.

Notes:

  • this type requires a sprite to be visible from the map editor.

Sprites:

  • <name><1..> for variant sprites of the floor;
  • <name>-edge optional edge sprite.

OverlayFloor

Extends Floor

For example:

  • tendrils

DoubleOverlayFloor

Extends OverlayFloor

For example:

  • pebbles

OreBlock

Extends OverlayFloor

fielddefault
<r>
variants3

Rock

Extends Block

fieldtype
variantsint

Defaults:

fielddefault
<r>
breakabletrue
alwaysReplacetrue

StaticWall

Extends Rock

Defaults:

fielddefault
<r>
breakablefalse
alwaysReplacefalse
solidtrue
variants2

Sprites:

  • <name>-large.png which is a 2x2 variant of the block.

StaticTree

Extends StaticWall

For example:

  • spore-pine
  • snow-pine
  • pine
  • shrubs

TreeBlock

Extends Block

Defaults:

fielddefault
solidtrue
layerpower
expandedtrue

Crafting

GenericCrafter

Extends Block

fieldtypedefaultnotes
<r>
outputItemItemStackone item stack
outputLiquidLiquidStackone liquid stack
craftTimefloat80
craftEffectEffectnone
updateEffectEffectnone
updateEffectChancefloat0.04

Defaults:

fielddefault
<r>
updatetrue
solidtrue
hasItemstrue
health60
idleSoundmachine
idleSoundVolume0.03
synctrue

GenericSmelter

Extends GenericCrafter

A GenericCrafter with a new glowing region drawn on top.

fieldtypedefault
<r>
flameColorColorffc999

Sprite suffix:

  • <name>-top

Separator

Extends Block

Separator takes liquid as an input, and will produce items from it’s stack randomly, using the amount of items in the stack as probability. Separator can’t accept items as input, as it will output all the items you put in it, regardless of what you put in results.

fieldtypedefaultnotes
<10>
results[ ItemStack ][required]
craftTimefloat
spinnerSpeedfloat3
colorColor858585

Defaults:

fielddefault
<r>
updatetrue
solidtrue
hasItemstrue
hasLiquidstrue

Sprite suffixes:

  • <name>-liquid
  • <name>-spinner

Sandbox

PowerVoid

Extends PowerBlock

Deafults:

fielddefault
<r>
consumesPowerMAX_VALUE

PowerSource

Extends PowerNode

Defaults:

fielddefault
<r>
maxNodes100
outputsPowertrue
consumesPowerfalse

ItemSource

Extends Block

Defaults:

fielddefault
<r>
hasItemstrue
updatetrue
solidtrue
grouptransportation
configurabletrue

ItemVoid

Extends Block

Defaults:

fielddefault
<r>
updatetrue
solidtrue

LiquidSource

Extends Block

Defaults:

fielddefault
<r>
hasLiquidstrue
updatetrue
solidtrue
liquidCapacity100
configurabletrue
outputsLiquidtrue

LiquidVoid

Extends Block

Defaults:

fielddefault
hasLiquidstrue
solidtrue
updatetrue

Logic

MessageBlock

Extends Block

fieldtypedefault
<r>
maxTextLengthint220
maxNewlinesint24

Defaults:

fielddefault
<r>
solidtrue
configurabletrue
destructibletrue

Defense

Wall

Extends Block

fieldtypedefault
<r>
variantsint0

Defaults:

fielddefault
<r>
solidtrue
destructibletrue
groupwalls
buildCostMultiplier5

DeflectorWall

Extends Wall – Wall that deflects low damage bullets.

fieldtypedefault
<r>
hitTimefloat10
maxDamageDeflectfloat10

SurgeWall

Extends Wall – Wall that creates lightning when shot.

fieldtypedefault
<r>
lightningChancefloat0.05
lightningDamagefloat15
lightningLengthint17

Door

Extends Wall

fieldtypedefault
<r>
openfxEffectdooropen
closefxEffectdoorclose

Defaults:

fielddefault
solidfalse
solidfiestrue
consumesTaptrue

Sprites:

  • <name>-open

MendProjector

Extends Block

fieldtypedefault
<r>
colorColor84f491
phaseColorffd59e
reloadfloat250
rangefloat60
healPercentfloat12
phaseBoostfloat12
phaseRangeBoostfloat50
useTimefloat400

Sprites:

  • <name>-top

OverdriveProjector

Extends Block

fieldtypedefault
<r>
colorColorfeb380
phaseColorffd59e
reloadfloat60
rangefloat80
speedBoostfloat1.5
speedBoostPhasefloat0.75
useTimefloat400
phaseRangeBoostfloat20

Defaults:

fielddefault
solidtrue
updatetrue
hasPowertrue
hasItemstrue
canOverdrivefalse

Sprites:

  • <name>-top

ForceProjector

Extends Block

fieldtypedefault
phaseUseTimefloat350
phaseRadiusBoostfloat80
radiusfloat101.7
breakagefloat550
cooldownNormalfloat1.75
cooldownLiquidfloat1.5
cooldownBrokenBasefloat0.35
basePowerDrawfloat0.2

Defaults:

fielddefault
updatetrue
solidtrue
hasPowertrue
canOverdrivefalse
hasLiquidstrue
hasItemstrue
consumescold-liquid

Sprites:

  • <name>-top

cold-liquid

  • temperature less then 0.5
  • flammability less then 0.1
  • booster true
  • optional true
  • update false

ShockMine

Extends Block

fieldtypedefault
cooldownfloat80
tileDamagefloat5
damagefloat13
lengthint10
tendrilsint6

Defaults:

fielddefault
<r>
updatefalse
destructibletrue
solidfalse
targetablefalse
layeroverlay
rebuildablefalse

Turrets

This section is for turret types. All turrets shoot BulletType, and this means LiquidTurret can shoot MissileBulletType and ItemTurret can shoot LiquidBulletType.

Turret

Abstract type which extends Block

The purpose of a turret type is to be a Block that shoots bullets. Turret is the base type for all turrets, it’s abstract meaning it shouldn’t be used directly, but everything which extends it will get it’s fields.

fieldtypedefaultnotes
<10>
heatColorColorturretHeatThe color of the -heat sprite.
shootEffectEffectnoneAn effect fired on tile in the direction the turret is aiming when it shoots.
smokeEffectEffectnoneAn effect fired on tile in the direction the turret is aiming when it shoots.
ammoUseEffectEffectnoneAn effect fired on the tile, when ammo is consumed.
shootSoundSoundshootA sound created from the tile when a bullet is fired.
ammoPerShotint1The amount of ammo used per shot.
ammoEjectBackfloat1The eject angle of shells in radians.
rangefloat50The range at which the turret can target enemies. Range is in tilesize so 8 is 1 tile.
reloadfloat10The amount of ticks it takes to reload.
inaccuracyfloat0The degrees of inaccuracy.
shotsint1The numbers of bullets fired at once.
spreadfloat4The angular spread of multiple bullets when shot.
recoilfloat1The recoil of the turret when fired.
restitutionfloat0.02The restitution from recoil after shooting. (time taken to recenter)
cooldownfloat0.02The amount of time it takes for the -heat sprite to become transparent.
rotatespeedfloat5The degrees per tick at which the turret can rotate.
shootConefloat8The angle used to determine whether the turret should be shooting.
shootShakefloat0The amount of camera shake.
xRandfloat0The random x axis multiplier, to make bullets appear to come out of multiple places. Used in Swarmer for example.
targetAirbooleantrueWhether this target can target air units.
targetGroundbooleantrueWhether this turret can target ground units or blocks.

Defaults:

fielddefault
priorityturret
updatetrue
solidtrue
layerturret
groupturrets
outlineIcontrue

Sprites:

  • <name> the turret sprite,
  • <name>-heat the heat map.

Sprites-Override:

  • block-<1..> global turret base override, where the number is the turrets size. Can be used to override existing turret bases, as well as adding larger ones.

CooledTurret

Extends Turret – This is a base type that turrets which use Liquid to cool themselves extend from.

fieldtypedefaultnotes
<10>
coolantMultiplierfloat5How much reload is lowered by for each unit of liquid of heat capacity.
coolEffectEffectshoot

Notes:

  • doesn’t take flammable fluid
  • doesn’t take hot fluid

ItemTurret

Extends CooledTurret

This type is a turret that uses items as ammo. The key to the ammo field should be the name of an Item, while the value may be any Built-in Bullets or a BulletType itself.

type: ItemTurret
ammo: {
  copper: standardCopper

  metaglass: {
    type: MissileBulletType
    damage: 2
  }

  surge-alloy: {
    type: LiquidBulletType
    damage: 3
  }
}

Here we’re using copper to shoot standardCopper (built-in bullet) and metalglass to shoot a custom bullet of type MissileBulletType.

fieldtypedefaultnotes
<10>
maxAmmoint30
ammo{ String: BulletType }String is the name of an Item, which will be used to select the type of bullet which will be shot.

Defaults:

fielddefault
hasItemstrue

LiquidTurret

Extends Turret

This type is just a turret that uses liquid as ammo. The key to ammo must be the name of a Liquid, while the value may either be the name of any Built-in Bullets or a BulletType itself.

For example you could do something like this:

type: LiquidTurret
ammo: {
  water: {
    type: MissileBulletType
    damage: 9000
  }

  slag: {
    type: LiquidBulletType
    damage: 0
  }
}
fieldstypenotes
ammo{ String: BulletType }object with Liquid names to bullet types.

Defaults:

fieldsdefault
hasLiquidstrue
activeSoundspray

DoubleTurret

Extends ItemTurret

ItemTurret that shoots from two side-by-side barrels.

fieldtypedefault
shotWidthfloat2

Default:

fielddefault
shots2

ArtilleryTurret

Extends ItemTurret – Artillery turrets have special shooting calculations done to hit targets.

fielddefault
targetAirfalse

BurstTurret

Extends ItemTurret – Turrets capable of bursts of specially spaced bullets, separated by long reload times.

fieldtypedefault
burstSpacingfloat5

PowerTurret

Extends CooledTurret – Turret which uses power has ammo to shoot.

fieldtypedefaultnotes
shootTypeBulletType[required]
powerUsefloat1

Defaults:

fielddefault
hasPowertrue

ChargeTurret

Extends PowerTurret

fieldtypedefault
chargeTimefloat30
chargeEffectsint5
chargeMaxDelayfloat10
chargeEffectEffectnone
chargeBeginEffectEffectnone

LaserTurret

Extends PowerTurret

fieldtypedefaultnotes
<10>
firingMoveFractfloat0.25rotatespeed fraction when turret is shooting
shootDurationfloat100

Defaults:

fielddefault
canOverdrivefalse
coolantMultiplier1

Doesn’t update shoot if:

  • liquid temperature greater or equal to 0.5
  • liquid flammability greater then 0.1

Distribution

Conveyor

Extends Block

fieldtypedefault
speedfloat0

Default:

fielddefault
<r>
rotatetrue
updatetrue
layeroverlay
grouptransportation
hasItemstrue
itemCapacity4
idleSoundconveyor
idleSoundVolume0.004
unloadablefalse

Sprite suffix:

ArmoredConveyor

Extends Conveyor -A type of conveyor don’t accept item coming from side

Router

Extends Block

Defaults:

fielddefault
solidtrue
updatetrue
hasItemstrue
itemCapacity1
grouptransportation
uploadablefalse

Junction

Extends Block

fieldtypedefaultnotes
<10>
speedfloat26frames taken to go through this junction
capacitycapacity6

Defaults:

fielddefault
updatetrue
solidtrue
grouptransportation
unloadablefalse

ItemBridge

Extends Block

fieldtypedefault
rangeint
transportTimefloat2

Defaults:

fielddefault
updatetrue
solidtrue
hasPowertrue
layerpower
expandedtrue
itemCapacity10
posConfigtrue
configurabletrue
hasItemstrue
unloadablefalse
grouptransportation

Sprites:

ExtendingItemBridge

Extends ItemBridge

Defaults:

fielddefault
hasItemstrue

BufferedItemBridge

Extends ExtendingItemBridge

fieldtypedefault
speedfloat40
bufferCapacityint50

Defaults:

fielddefault
hasItemstrue
hasPowerfalse

Sorter

Extends Block

fieldtypedefaultnotes
invertboolean[optional]

Defaults:

fielddefault
updatetrue
solidtrue
instantTransfertrue
grouptransportation
configurabletrue
unloadablefalse

OverflowGate

Extends Block

Type used for overflow and underflow gates.

fieldtypedefaultnotes
speedfloat1delta time multiplier for whether an item can be moved after an update cycle
invertbooleanfalsetrue makes it underflow

Defaults:

fielddefault
hasItemstrue
solidtrue
updatetrue
grouptransportation
unloadablefalse

MassDriver

Extends Block – Uses driverBolt to transfer items.

fieldtypedefault
rangefloat
rotateSpeedfloat0.04
translationfloat7
minDistributeint10
knockbackfloat4
reloadTimefloat100
shootEffectEffectshootBig2
smokeEffectEffectshootBigSmoke2
recieveEffectEffectmineBig
shakefloat3

Notes:

  • range is limited by driverBolt’s max range, which is hard coded, so you cannot change it.

Defaults:

fielddefault
updatetrue
solidtrue
posConfigtrue
configurabletrue
hasItemstrue
layerturret
hasPowertrue
outlineIcontrue

Sprites:

  • <name>-base

Liquid Blocks

LiquidBlock

Extends Block – For blocks that can carry liquids. Apart from the better defaults, it also fetches extra sprites.

Defaults:

fielddefault
updatetrue
solidtrue
hasLiquidstrue
groupliquids
outputsLiquidtrue

Sprites:

  • <name>-liquid
  • <name>-top
  • <name>-bottom

Pump

Extends LiquidBlock

fieldtypedefault
pumpAmountfloat1
fielddefault
layeroverlay
groupliquids
floatingtrue

Conduit

Extends LiquidBlock

fieldtype
leakResistancefloat

Defaults:

fielddefault
rotatetrue
solidfalse
floatingtrue

Sprites:

  • <name>-top-<0..6>

ArmoredConduit

Extends Conduit

Defaults:

fielddefault
leakResistance10

Sprites:

  • <name>-cap

LiquidOverflowGate

Extends LiquidBlock

Defaults:

fielddefault
rotatetrue

Sprites:

  • <name>-top

LiquidRouter

Extends LiquidBlock

LiquidTank

Extends LiquidRouter

LiquidJunction

Extends LiquidBlock

LiquidBridge

Extends LiquidBridge

fielddefault
hasItemsfalse
hasLiquidstrue
outputsLiquidtrue
groupliquids

LiquidExtendingBridge

Extends ExtendingItemBridge

fielddefault
hasItemsfalse
hasLiquidstrue
outputsLiquidtrue
groupliquids

Power

PowerBlock

Abstract type which extends Block

Defaults:

fielddefault
updatetrue
solidtrue
hasPowertrue
grouppower

PowerNode

Extends PowerBlock

fieldtypedefault
laserRangefloat6
maxNodesint3

Defaults:

fielddefault
expandedtrue
layerpower
configurabletrue
consumesPowerfalse
outputsPowerfalse

PowerDistributor

Extends PowerBlock

Defaults:

fielddefault
consumesPowerfalse
outputsPowertrue

Battery

Extends PowerDistributor

fieldtypedefault
emptyLightColorColorf8c266
fullLightColorColorfb9567

Defauts:

fielddefault
outputsPowertrue
consumesPowertrue

Sprites:

  • <name>-top light region on top of the battery.

PowerGenerator

Extends PowerDistributor

Power generators will produce power with their Consumers type.

fieldtypenotes
<10>
powerProductionfloatPower produced per tick at 100% (1.0) efficiency; 1 powerProduction is approximately 60 pu/s.

Defaults:

fielddefault
baseExplosiveness5
synctrue

ThermalGenerator

Extends PowerGenerator – Generates power with the attribute of a tile. Power production is powerProduction * attribute, and attribute must be greater then 0.01.

fieldtypedefaultnotes
generateEffectEffectnone
attributeAttributeheatThe attribute used to vary efficiency.

ItemLiquidGenerator

Extends PowerGenerator – Base of power generation blocks.

Notes:

  • item efficiency is always 0.0
  • liquid efficiency is always 0.0

(this type doesn’t produce power)

fieldtypedefaultnotes
<10>
minItemEfficiencyfloat0.2
itemDurationfloat70number of ticks during which a single item will produce power.
minLiquidEfficiencyfloat0.2
maxLiquidGeneratefloat0.4Maximum liquid used per frame.
generateEffectEffectgeneratespark
explodeEffectEffectgeneratespark
heatColorColorff9b59
randomlyExplodebooleantrue
defaultsbooleanfalse

Extra sprites:

  • <name>-top if hasItems is true
  • <name>-liquid

SingleTypeGenerator

Extends ItemLiquidGenerator – Generates power from an item.

BurnerGenerator

Extends ItemLiquidGenerator – Generates power from item flamability.

DecayGenerator

Extends ItemLiquidGenerator – Generates power from item radioactivity.

Defaults:

fielddefault
hasItemstrue
hasLiquidsfalse

SolarGenerator

Extends PowerGenerator – A generator that always produces 100% efficiency power.

Notes:

  • Lower targetting priority then other generators.

NuclearReactor

Extends PowerGenerator – Generates power relative to how many items are in storage, and explodes if it runs out of coolant.

fieldtypedefaultnotes
<10>
lightColorColor7f19ea
coolColorColorffffff00
hotColorColorff9575a3
itemDurationfloat120time to consume 1 fuel
heatingfloat0.01heating per frame * fullness
smokeThresholdfloat0.3heat at which blocks start smoking
explosionRadiusint40
explosionDamageint1350
flashThresholdfloat0.46heat at which lights start flashing
coolantPowerfloat0.5

Defaults:

fielddefault
itemCapacity30
liquidCapacity30
hasItemstrue
hasLiquidstrue
rebuildablefalse

Extra Sprites:

  • <name>-center top region
  • <name>-lights lights region

ImpactReactor

Extends PowerGenerator – Generator that uses power and has a startup time.

fieldtypedefaultnotes
<10>
plasmasint4number of plasma sprites
warmupSpeedfloat0.001
itemDurationfloat60
explosionRadiusint50
explosionDamageint2000
plasma1Colorffd06b
plasma2Colorff361b

Defaults:

fielddefault
hasPowertrue
hasLiquidstrue
liquidCapacity30
hasItemstrue
outputsPowertrue
consumesPowertrue

Sprites:

  • <name>-bottom bottom region
  • <name>-plasma-<i> plasma regions, where i is 0 to plasmas - 1.

PowerDiode

Extends Block

Defaults:

fielddefault
rotatetrue
updatetrue
solidtrue
insulatedtrue

Sprites:

  • <name>-arrow

LightBlock

Extends Block

fieldtypedefault
brightnessfloat0.9
radiusfloat200

Defaults:

fielddefault
hasPowertrue
updatetrue
configurabletrue

Sprites:

  • <name>-top

Production

Drill

Extends Block – Types which can be placed on ore blocks to extract the OreBlock’s item.

fieldtypedefaultnotes
<10>
tierintMaximum tier of blocks this drill can mine.
drillTimefloat300Base time to drill one ore, in frames.
liquidBoostIntensityfloat1.6How many times faster the drill will progress when boosted by liquid.
warmupSpeedfloat0.02Speed at which the drill speeds up.
drawMineItembooleanfalseWhether to draw the item this drill is mining.
drillEffectEffectmineEffect played when an item is produced. This is colored.
rotateSpeedfloat2Speed the drill bit rotates at.
updateEffectEffectpulverizeSmallEffect randomly played while drilling.
updateEffectChancefloat0.02Chance the update effect will appear.
drawRimbooleanfalse
heatColorColorff5512

Defaults:

fielddefault
updatetrue
solidtrue
layeroverlay
groupdrills
hasLiquidstrue
liquidCapacity5
hasItemstrue
idleSounddrill
idleSoundVolume0.003

Sprites:

  • <name>-rim
  • <name>-rotator
  • <name>-top

SolidPump

Extends Pump – Pump that makes liquid from solids and takes in power. Only works on solid floor blocks.

fieldtypedefault
resultLiquidwater
updateEffectEffectnone
updateEffectChancefloat0.02
rotateSpeedfloat1
attributeAttribute

Defaults:

fielddefault
hasPowertrue

Sprites:

  • <name>-liquid

Cultivator

Extends GenericCrafter

fieldtypedefault
recurrencefloat6

Defaults:

fielddefault
craftEffectnone

Sprites:

  • <name>-middle
  • <name>-top

Fracker

Extends SolidPump

fielddefault
itemUseTime100

Defaults:

fielddefault
hasItemstrue

Sprites:

  • <name>-liquid
  • <name>-rotater
  • <name>-top

Incinerator

Extends Block

fieldtypedefault
<r>
effectEffectfuelburn
flameColorColorffad9d

Defaults:

fielddefault
<r>
hasPowertrue
hasLiquidtrue
updatetrue
solidtrue

Unit Blocks

RepairPoint

Extends Block – Block which can repair units within range, with a laser.
fieldtypedefault
repairRadiusfloat50
repairSpeedfloat0.3
powerUsefloat

Defaults:

fielddefault
updatetrue
solidtrue
hasPowertrue
outlineIcontrue
layerturret
layer2power

Extra sprites:

  • <name>-base

UnitFactory

Extends block – A block can produce units

fieldtypedefault
produceTimefloat1000
launchVelocityfloat0
maxSpawnint4
unitTypeUnitTypenone

Defaults:

fielddefault
updatetrue
hasPowertrue
hasItemstrue
solidfalse
flagsproducer

Sprite suffix:

  • -top

CommandCenter

Extends Block – A block which can issue commands to your unit.
fieldtypedefault
topColorColorcommand
bottomColorColor5e5e5e
effectEffectcommandSend

Defaults:

fielddefault
flagscomandCenter
destructibletrue
solidtrue
configurabletrue

MechPad

Extends Block – A block which will spawn a player in a mech.

fieldtypedefault
mechMechnone
buildTimefloat60 * 5

Defaults:

fielddefault
updatetrue
solidtrue
hasPowertrue
layeroverlay
flagsmechpad

Storage

StorageBlock

Abstract type which extends Block

Defaults:

fielddefault
hasItemstrue

CoreBlock

Extends StorageBlock

fieldtypedefault
mechMechstarter

Defaults:

fielddefault
solidtrue
updatetrue
hasItemstrue
activeSoundrespawning
activeSoundVolume1
layeroverlay

Vault

Extends StorageBlock

Defaults:

fielddefault
solidtrue
destructibletrue
updatefalse

Unloader

Extends Block

A block which can take items from StorageBlock, like Vault, CoreBlock or Crafters.

fieldtypedefault
speedfloat1

Defaults:

fielddefault
solidtrue
health70
updatefalse
hasItemstrue
confugurabletrue

Sprites:

  • <name>-center

LaunchPad

Extends StroageBlock

A block which can launch materials.

fieldtypedefault
launchTimefloatnone

Defaults:

fielddefault
updatetrue
hasItemstrue
solidtrue

Attributes

An object with an array of attribute. Used in the Floor type to give a tile specific properties, like hottness or sporness for efficiency of various systems, like ThermalPumps and WaterExtractors.

array has 4 items:

  • index 0 is heat,
  • index 1 is spores,
  • index 2 is water,
  • index 3 is oil.

    For example, this would give you 100 heat, 1 spores, 0.5 water and 0.1 oil.

    {
        "array": [ 100, 1, 0.5, 0.1]
    }
        

    You could use it inside of Floor type as such:

    {
        "type": "Floor",
        "name": "magma",
        "attributes": { "array": [ 0.75, 0, 0, 0 ] }
    }
        

Attribute

New attributes cannot be added. List of built-in attributes:

  • heat
  • spores
  • water
  • oil

BuildVisibility

A flag used by the game to change a few special-case things. It may be one of the following strings:

  • hidden
  • shown
  • debugOnly
  • sandboxOnly
  • campaignOnly
  • lightingOnly

BlockGroup

Groups for blocks to build on top of each other:

  • none
  • walls
  • turrets
  • transportation
  • power
  • liquids
  • drills

Type

Item

Extends Content – It’s the object that can ride conveyors, sorters and be stored in containers, and is commonly used in crafters.

fieldtypedefaultnotes
<10>
colorColorblackhex string of color
typeItemTyperesourceused for tabs and core acceptance
explosivenessfloat0how explosive this item is.
flammabilityfloat0flammability above 0.3 makes this eleigible for item burners.
radioactivityfloathow radioactive this item is. 0=none, 1=chernobyl ground zero
hardnessint0drill hardness of the item
costfloat1used for calculating place times; 1 cost = 1 tick added to build time
alwaysUnlockedbooleanfalseIf true, item is always unlocked.

ItemType

  • resource can’t go in the core;
  • material can go in the core.

ItemStack

A ItemStack can be a string or an object. It’s used to describe the type and amount of items to a machine.

As a string:

copper/5

As an object:

item: copper
amount: 5
fieldtypenotes
itemstringThe name of an Item.
amountintThe amount of said item.

Liquid

Extends Content

Type which defines the properties of a liquid. Like Item this will go into it’s own subdirectory content/liquids/liquid-name.json, and from it’s stem name you can reuse it from your other mod content.

fieldtypedefaultnotes
colorColor[required] color of liquid
barColorColor[optional] color used in bars.
lightColorColorColor used to draw lights. Note that the alpha channel is used to dictate brightness.
flammabilityfloat0 to 1; 0 is completely inflammable, above that may catch fire when exposed to heat.
temperaturefloat0.50.5 is ‘room’ temperature, 0 is very cold, 1 is molten hot
heatCapacityfloat0.5used in cooling; water is 0.4, cryofluid is 0.9.
viscosityfloat0.5how thick this liquid is; water is 0.5, oil is 0.7.
explosivenessfloatexplosiveness when heated; 0 is nothing, 1 is nuke
effectStatusEffectnonethe associated status effect.

Sprites:

  • <name>, the sprite used when displaying the liquid from a menu.

LiquidStack

A LiquidStack can be a string or an object. It’s used to describe the type and amount of liquid to a machine.

As a string:

water/0.5

As an object:

liquid: water
amount: 0.5
fieldtypenotes
liquidstringThe name of a Liquid.
amountfloatThe amount of said liquid.

Weapon

Weapons are used by units and mechs alike. A weapon is a type used to shoot bullets bullets just like turrets (except that they don’t have an ~ammo~ mapping). Weapons can only shoot one type of bullet, which you define in the bullet field.

fieldtypedefaultnotes
<10>
nameStringused to fetch the sprite of the weapon
nimPlayerDistfloat20minimum cursor distance from player, fixes ‘cross-eyed’ shooting.
sequenceNumint0
bulletBulletTypebullet shot
ejectEffectEffectnoneshell ejection effect
reloadfloatweapon reload in frames
shotsint1amount of shots per fire
spacingfloat12spacing in degrees between multiple shots, if applicable
inaccuracyfloat0inaccuracy of degrees of each shot
shakefloat0intensity and duration of each shot’s screen shake
recoilfloat1.5visual weapon knockback.
lengthfloat3shoot barrel y offset
widthfloat4shoot barrel x offset.
velocityRndfloat0fraction of velocity that is random
alternateboolfalseshoot one arm after another, rather than all at once
lengthRandfloat0randomization of shot length
shotDelayfloat0delay in ticks between shots
ignoreRotationbooleanfalsewhether shooter rotation is ignored when shooting.
targetDistancefloat1if turnCursor is false for a mech, how far away will the weapon target.
shootSoundSoundpew

Sprite:

  • <name> or <name>-equip

UnitType

Extends Content

fieldtypedefault
typeBaseUnit
healthfloat60
hitsizefloat7
hitsizeTilefloat4
speedfloat0.4
rangefloat0
attackLengthfloat150
rotatespeedfloat0.2
baseRotateSpeedfloat0.1
shootConefloat15
massfloat1
flyingboolean
targetAirbooleantrue
rotateWeaponbooleanfalse
dragfloat0.1
maxVelocityfloat5
retreatPercentfloat0.6
itemCapacityint30
buildPowerfloat0.3
minePowerfloat0.7
weaponWeapon
weaponOffsetYfloat
engineOffsetfloat
engineSizefloat

Sprites:

  • <name>
  • <name>-leg
  • <name>-base

Mech

Extends Content

Mechs are the player controlled entities. They shoot bullets just like turrets from their weapon.

fieldtypedefaultnotes
flyingboolean
speedfloat1.1
maxSpeedfloat10
boostSpeedfloat0.75
dragfloat0.4
massfloat1
shakefloat0
healthfloat200
hitsizefloat6
cellTrnsYfloat0
mineSpeedfloat1
drillPowerint-1
buildPowerfloat1
engineColorColorboostTo
itemCapacityint30
turnCursorbooleantrue
canHealbooleanfalse
compoundSpeedfloat5
compoundSpeedBoostfloat5
drawCellbooleantruedraw the health and team indicator
drawItemsbooleantruedraw the items on its back
drawLightbooleantruedraw the engine light if it’s flying/boosting
weaponOffsetYfloat5
engineOffsetfloat5
engineSizefloat2.5
weaponWeaponnull

Sprites:

  • <name>
  • <name>-leg
  • <name>-base

Category

Categories for building menu:

  • turret Offensive turrets;
  • production Blocks that produce raw resources, such as drills;
  • distribution Blocks that move items around;
  • liquid Blocks that move liquids around;
  • power Blocks that generate or transport power;
  • defense Walls and other defensive structures;
  • crafting Blocks that craft things;
  • units Blocks that create units;
  • upgrade Things that upgrade the player such as mech pads;
  • effect Things for storage or passive effects.

Zone

Extends Content

A Zone is a type that takes a map (named the same as the json’s filename) and puts it into campaign. (a zone isn’t a map)

Every Zone has a Generator, which once initialized, MapGenerator will run through the map and do initialization related stuff. One of those notable things, is deleting all cores on in your map and placing a loadout on top of a random one of them. This allows your campaign map to have multiple core locations. (it doesn’t matter which core was previously on the map, ~loadout~ will dictate that)

It is entirely possible to produce a custom schematic, but take note that this schematic must contain a CoreBlock within it.

fieldtypedefaultnotes
<10>
baseLaunchCost[ ItemStack ]
launchCost[ ItemStack ]
startingItems[ ItemStack ]Items you start with on the map.
conditionWaveintMAX_VALUE
alwaysUnlockedbooleanfalseWhether this map is always unlocked
launchPeriodint10Rate of waves at which the core may be launched.
loadoutSchematicbasicShardCore layout placed by MapGenerators.
resources[ String ]Array of item names.
requirements[ Objective ]An array of requirements to unlock configuration.
configureObjectiveObjectiveZoneWave 15
defaultStartingItems[ ItemStack ]

Sprites:

  • zone-<name> preview
  • <name>-zone preview

Built-in loadouts:

  • basicShard
    bXNjaAB4nD2K2wqAIBiD5ymibnoRn6YnEP1BwUMoBL19FuJ2sbFvUFgYZDaJsLeQrkinN9UJHImsNzlYE7WrIUastuSbnlKx2VJJt+8IQGGKdfO/8J5yrGJSMegLg+YUIA==
        

    images/basicShard.png

  • advancedShard
    bXNjaAB4nD2LjQqAIAyET7OMIOhFfJqeYMxBgSkYCL199gu33fFtB4tOwUTaBCP5QpHFzwtl32DahBeKK1NwPq8hoOcUixwpY+CUxe3XIwBbB/pa6tadVCUP02hgHvp5vZq/0b7pBHPYFOQ=
        

    images/advancedShard.png

  • basicFoundation
    bXNjaAB4nD1OSQ6DMBBzFhVu8BG+0X8MQyoiJTNSukj8nlCi2Adbtg/GA4OBF8oB00rvyE/9ykafqOIw58A7SWRKy1ZiShhZ5RcOLZhYS1hefQ1gRIeptH9jq/qW2lvc1d2tgWsOfVX/tOwE86AYBA==
        

    images/basicFoundation.png

  • basicNucleus
    bXNjaAB4nD2MUQqAIBBEJy0s6qOLdJXuYNtCgikYBd2+LNmdj308hkGHtkId7M4YFns4mk/yfB4a48602eDI+mlNznu0FMPFd0wYKCaewl8F0EOueqM+yKSLVfJrNKWnSw/FZGzEGXFG9sy/px4gEBW1
        

    images/basicNucleus.png

Built-in zones:

  • nuclearComplexe
  • desolateRift
  • tarFields
  • overgrowth
  • stainedMountains
  • frozenForest
  • saltFlats
  • desertWastes
  • groundZero

StatusEffect

Extends Content

Not be be confused with Effect, a status effect will give an entity special properties. Status effects are used as transitions between intermediate effects. If some a wet unit gets shocked it then gets 20 damage.

fieldtypedefaultnotes
<10>
damageMultiplierfloat1
armorMultiplierfloat1
speedMultiplierfloat1
colorColorwhite
damagefloatDamage (or healing) per frame.
effectEffectnoneRandom effect (0.15% per frame), on affected units.
  • opposites: effect which reduces anothers lifetime.

Built-in status effects:

  • none – Does nothing.
  • burning
    fieldvalue
    damage0.06
    effectburning
    • opposites: wet freezing
    • tarred: 1 damage and keeps burning
  • freezing
    fieldvalue
    speedMultiplier0.6
    armorMultiplier0.8
    effectfreezing
    • opposites: melting burning
  • wet
    fieldvalue
    speedMultiplier0.9
    effectwet
    • opposites: burning
    • shocked: 20 damage
  • melting
    fieldvalue
    speedMultiplier0.8
    armorMultiplier0.8
    damage0.3
    effectmelting
    • opposites: wet freezing
    • tarred: keeps melting
  • tarred
    fieldvalue
    speedMultiplier0.6
    effectoily
    • burning: keeps burning
    • melting: keeps burning
  • overdrive
    fieldvalue
    armorMultiplier0.95
    speedMultiplier1.15
    damageMultiplier1.4
    damage-0.01
    effectoverdriven
  • shielded
    fieldvalue
    armorMultiplier3
  • boss
    fieldvalue
    armorMultiplier3
    damageMultiplier3
    speedMultiplier1.1
  • shocked – Does nothing.
  • corroded
    fieldvalue
    damage0.1

Graphics

Layer

Layers is an enumeration type, which the renderer will use to group rendering order:

  • block, base block layer;
  • placement, for placement;
  • overlay, first overlay stuff like conveyor items;
  • turret, “high” blocks like turrets;
  • power power lasers

Color

Color is a hexadecimal string, <rr><gg><bb> for example:

  • ff0000 is red,
  • 00ff00 is green,
  • 0000ff is blue,
  • ffff00 is yellow,
  • 00ffff is cyan,
  • ect..

CacheLayer

Flags used by for cache render:

  • normal normal layer;
  • walls walls layer;
  • water water layer, adding tile water shaders, and giving wave reflections;
  • tar tar layer, adding tar shaders, making it darker and giving it some bubble reflections;

Entities

BulletType

Abstract type which extends Content

BulletType can either be an object {} or a "string", where a string would be reusing Built-in Bullets and an object would be making a custom one.

There are two major categories of bullet types:

Here’s an example of a custom bullet:

{
    "type": "MissileBulletType",
    "lifetime": 1000,
    "speed": 2,
    "splashDamageRadius": 2,
    "splashDamage": 9,
    "frontColor": "ffff00",
    "backColor": "00ffff",
    "homingPower": 1,
    "homingRange": 20,
    "fragBullets": 3,
    "fragBullet": {
        "type": "LiquidBulletType",
        "liquid": "oil",
        "lifetime": 2,
        "speed": 1,
        "fragBullets": 2,
        "fragBullet": {
            "type": "LiquidBulletType",
            "liquid": "slag",
            "lifetime": 1,
            "speed": 2,
            "damage": 1,
        }
    }
}

images/green-cyan-oil-slag-missiles.png

fieldtypedefaultnotes
<25>
lifetimefloatamount of ticks the bullet will last
speedfloatinital speed of bullet
damagefloatcollision damage
hitSizefloat4collision radius
drawSizefloat40
dragfloat0decelleration per tick
piercebooleanwhether it can collide
hitEffectEffectcreated when bullet hits something
despawnEffectEffectcreated when bullet despawns
shootEffectEffectcreated when shooting
smokeEffectEffectcreated when shooting
hitSoundSoundmade when hitting something or getting removed
inaccuracyfloat0extra inaccuracy
ammoMultiplierfloat2how many bullets get created per item/liquid
reloadMultiplierfloat1multiplied by turret reload speed
recoilfloatrecoil from shooter entities
killShooterfloatwhether to kill the shooter when this is shot. (for suicide bombers)
knockbackfloatKnockback in velocity.
hitTilesbooleantrueWhether this bullet hits tiles.
statusStatusEffectnoneStatus effect applied on hit.
statusDurationfloat600Intensity of applied status effect in terms of duration.
collidesTilesbooleantrueWhether this bullet type collides with tiles.
collidesTeambooleanfalseWhether this bullet type collides with tiles that are of the same team.
collidesAirbooleantrueWhether this bullet type collides with air units.
collidesbooleantrueWhether this bullet types collides with anything at all.
keepVelocitybooleantrueWhether velocity is inherited from the shooter.
fragBulletsint9Number of frag bullets created.
fragVelocityMinfloat0.2Minimum random multiplier.
fragVelocityMaxfloat1Maximum random multiplier.
fragBulletBulletTypenullThe frag bullet that will be created, may be a string, an object or null. If field is null, no frag bullet is created.
instantDisappearbooleanWhether to instantly make the bullet disappear. (used in crawlers to make sure they explode)
splashDamagefloat0Area of effect damage when the bullet despawns or hits a target. Damage is calculated with linear interpolation, also known as lerp.
splashDamageRadiusfloat-1Use a negative value to disable splash damage. splashDamageRadius is a value used in the equation lerp(1 - distance / radius, 1, 0.4) which is a multiplier for splashDamage.
incendAmountint0
incendSpreadfloat8
incendChancefloat1
homingPowerfloat0Doesn’t do anything complicated; if homingPower larger then 0.01 it gets rendered in the UI, if homingPower is larger then 0.0001 it allows homingRange to work.
homingRangefloat50How close the bullet needs from a target in order to home/seek said target.
lightiningint
lightningLengthint5
hitShakefloat0

BasicBulletType

Extends BulletType

This types purpose is to give basic bullets their sprites. The bulletSprite will be used as the shape of the bullet. The visible pixels in your sprites will be tinted with backColor and frontColor respectively. For example if you had sprites router.png and router-back.png where Test Mod was your mods name, you could do this to include your bulletSprite:

{
    "type": "BasicBulletType",
    "bulletSprite": "test-mod-router"
}

images/router-bullets.png

fieldtypedefault
<r><10>
bulletWidthfloat5
bulletHeightfloat7
bulletShrinkfloat0.5Used to squishify the bullet as it gets closer to the target, where 0 is no shrink -0.5 is stretching and 0.5 is shrinking.
frontColorColorbulletYellowColor of front sprite.
backColorColorbulletYellowBackColor of back sprite.
bulletSpriteStringbulletMapping sprite used to make the shape of the bullet.

Sprites:

  • <mod-name>-<sprite-name> top layer bulletSprite
  • <mod-name>-<sprite-name>-back bottom layer bulletSprite

Built-in bulletSprites:

ArtilleryBulletType

Extends BasicBulletType

Makes special calculations to give the effect that the bullet is going up and back down.

fieldtypedefault
trailEffectEffectartilleryTrail

Defaults:

fielddefault
collidesTilesfalse
collidesfalse
collidesAirfalse
hitShake1
hitSoundexplosion
bulletSpriteshell

FlakBulletType

Extends BasicBulletType

fieldtypedefaultnotes
<10>
explodeRangefloat30The range at which the bullets explode from enemies.

Defaults:

fieldtype
splashDamage15
splashDamageRadius34
hitEffectflakExplosionBig
bulletWidth8
bulletHeight10

MissileBulletType

Extends BasicBulletType

Weave is simple a sin wave with the following equation.

rotation = sin(time/scale) * magnitude
fieldtypedefaultnotes
<10>
trailColorColormissileYellowBackColor of the trail effect.
weaveScalefloat0A larger weaveScale means a longer wave.
weaveMagfloat-1A higher weaveMag means a higher (wider) wave.

Defaults:

fielddefault
bulletSpritemissile

BombBulletType

Extends BasicBulletType

Defaults:

fielddefault
collidesTilesfalse
collidesfalse
bulletShrink0.7
lifetime30
drag0.05
keepVelocityfalse
collidesAirfalse
hitSoundexplosion

HealBulletType

Extends BulletType – Bullets that can heal blocks of the same team as the shooter.

fieldtypedefault
healPercentfloat3

Defaults:

fielddefault
shootEffectshootHeal
smokeEffecthitLaser
hitEffecthitLaser
despawnEffecthitLaser
collidesTeamtrue

LiquidBulletType

Extends BulletType

fieldtypedefaultnotes
<10>
liquidStringnull[required] name of Liquid

Defaults:

fielddefault
lifetime74
statusDuration90
despawnEffectnone
hitEffecthitLiquid
smokeEffectnone
shootEffectnone
drag0.009
knockback0.55

MassDriverBolt

Extends BulletType

Defaults:

fielddefault
collidesTilesfalse
lifetime200
despawnEffectsmeltsmoke
hitEffecthitBulletBig
drag0.005

Built-in Bullets

  • artillery:
    • artilleryDense artilleryPlastic artilleryPlasticFrag artilleryHoming artlleryIncendiary artilleryExplosive artilleryUnit
  • flak:
    • flakScrap flakLead flakPlastic flakExplosive flakSurge flakGlass glassFrag
  • missiles:
    • missileExplosive missileIncendiary missileSurge missileJavelin missileSwarm missileRevenant
  • standard:
    • standardCopper standardDense standardThorium standardHoming standardIncendiary standardMechSmall standardGlaive standardDenseBig standardThoriumBig standardIncendiaryBig
  • electric:
    • lancerLaser meltdownLaser lightning arc damageLightning
  • liquid:
    • waterShot cryoShot slagShot oilShot
  • environment & misc:
    • fireball basicFlame pyraFlame driverBolt healBullet healBulletBig frag eruptorShot
  • bombs:
    • bombExplosive bombIncendiary bombOil

BaseUnit

There are a few useful base unit types:

  • FlyingUnit
    • HoverUnit
    • BuilderDrone
    • MinerDrone
    • RepairDrone
  • GroundUnit

Effect

Type should be a string. You can’t currently create custom effects. List of built-in effects are as follows:

  • none placeBlock breakBlock smoke spawn tapBlock select
  • vtolHover unitDrop unitPickup unitLand pickup healWave heal landShock reactorsmoke nuclearsmoke nuclearcloud
  • redgeneratespark generatespark fuelburn plasticburn pulverize pulverizeRed pulverizeRedder pulverizeSmall pulverizeMedium
  • producesmoke smeltsmoke formsmoke blastsmoke lava doorclose dooropen dooropenlarge doorcloselarge purify purifyoil purifystone generate
  • mine mineBig mineHuge smelt teleportActivate teleport teleportOut ripple bubble launch
  • healBlock healBlockFull healWaveMend overdriveWave overdriveBlockFull shieldBreak hitBulletSmall hitFuse
  • hitBulletBig hitFlameSmall hitLiquid hitLaser hitLancer hitMeltdown despawn flakExplosion blastExplosion
  • plasticExplosion artilleryTrail incendTrail missileTrail absorb flakExplosionBig plasticExplosionFlak burning fire
  • fireSmoke steam fireballsmoke ballfire freezing melting wet oily overdriven dropItem shockwave
  • bigShockwave nuclearShockwave explosion blockExplosion blockExplosionSmoke shootSmall shootHeal shootSmallSmoke shootBig shootBig2 shootBigSmoke
  • shootBigSmoke2 shootSmallFlame shootPyraFlame shootLiquid shellEjectSmall shellEjectMedium
  • shellEjectBig lancerLaserShoot lancerLaserShootSmoke lancerLaserCharge lancerLaserChargeBegin lightningCharge lightningShoot
  • unitSpawn spawnShockwave magmasmoke impactShockwave impactcloud impactsmoke dynamicExplosion padlaunch commandSend coreLand

TargetPriority

A higher ordinal means a higher priority. Higher priority blocks will always get targeted over those of lower priority, regardless of distance.

  1. base
  2. turret

Objective

Objective is a trait, which a few types implement, which is used by Zone to give campaign maps objectives.

Types which implement Objective are as follows:

  • ZoneWave – complete if best wave within zone is heigher then target wave
    fieldtypenotes
    zoneStringtarget Zone name
    waveinttarget wave to reach
  • Launched – complete if core launched from zone
    fieldtypenotes
    zoneStringtarget Zone name
  • Unlock – complete if block is unlocked
    fieldtypenotes
    blockStringtarget Block name

Other

Mindustry Source Structure

core/src/io/anuke/mindustry/
├── ai
│   ├── BlockIndexer.java
│   ├── Pathfinder.java
│   └── WaveSpawner.java
├── ClientLauncher.java
├── content
│   ├── Blocks.java
│   ├── Bullets.java
│   ├── Fx.java
│   ├── Items.java
│   ├── Liquids.java
│   ├── Loadouts.java
│   ├── Mechs.java
│   ├── StatusEffects.java
│   ├── TechTree.java
│   ├── TypeIDs.java
│   ├── UnitTypes.java
│   └── Zones.java
├── core
│   ├── ContentLoader.java
│   ├── Control.java
│   ├── FileTree.java
│   ├── GameState.java
│   ├── Logic.java
│   ├── NetClient.java
│   ├── NetServer.java
│   ├── Platform.java
│   ├── Renderer.java
│   ├── UI.java
│   ├── Version.java
│   └── World.java
├── ctype
│   ├── Content.java
│   ├── ContentList.java
│   ├── ContentType.java
│   ├── MappableContent.java
│   └── UnlockableContent.java
├── editor
│   ├── DrawOperation.java
│   ├── EditorTile.java
│   ├── EditorTool.java
│   ├── MapEditorDialog.java
│   ├── MapEditor.java
│   ├── MapGenerateDialog.java
│   ├── MapInfoDialog.java
│   ├── MapLoadDialog.java
│   ├── MapRenderer.java
│   ├── MapResizeDialog.java
│   ├── MapSaveDialog.java
│   ├── MapView.java
│   ├── OperationStack.java
│   └── WaveInfoDialog.java
├── entities
│   ├── bullet
│   │   ├── ArtilleryBulletType.java
│   │   ├── BasicBulletType.java
│   │   ├── BombBulletType.java
│   │   ├── BulletType.java
│   │   ├── FlakBulletType.java
│   │   ├── HealBulletType.java
│   │   ├── LiquidBulletType.java
│   │   ├── MassDriverBolt.java
│   │   └── MissileBulletType.java
│   ├── Damage.java
│   ├── effect
│   │   ├── Decal.java
│   │   ├── Fire.java
│   │   ├── GroundEffectEntity.java
│   │   ├── ItemTransfer.java
│   │   ├── Lightning.java
│   │   ├── Puddle.java
│   │   ├── RubbleDecal.java
│   │   └── ScorchDecal.java
│   ├── Effects.java
│   ├── Entities.java
│   ├── EntityCollisions.java
│   ├── EntityGroup.java
│   ├── Predict.java
│   ├── TargetPriority.java
│   ├── traits
│   │   ├── AbsorbTrait.java
│   │   ├── BelowLiquidTrait.java
│   │   ├── BuilderMinerTrait.java
│   │   ├── BuilderTrait.java
│   │   ├── DamageTrait.java
│   │   ├── DrawTrait.java
│   │   ├── Entity.java
│   │   ├── HealthTrait.java
│   │   ├── KillerTrait.java
│   │   ├── MinerTrait.java
│   │   ├── MoveTrait.java
│   │   ├── Saveable.java
│   │   ├── SaveTrait.java
│   │   ├── ScaleTrait.java
│   │   ├── ShooterTrait.java
│   │   ├── SolidTrait.java
│   │   ├── SpawnerTrait.java
│   │   ├── SyncTrait.java
│   │   ├── TargetTrait.java
│   │   ├── TeamTrait.java
│   │   ├── TimeTrait.java
│   │   ├── TypeTrait.java
│   │   └── VelocityTrait.java
│   ├── type
│   │   ├── base
│   │   │   ├── BaseDrone.java
│   │   │   ├── BuilderDrone.java
│   │   │   ├── FlyingUnit.java
│   │   │   ├── GroundUnit.java
│   │   │   ├── HoverUnit.java
│   │   │   ├── MinerDrone.java
│   │   │   └── RepairDrone.java
│   │   ├── BaseEntity.java
│   │   ├── BaseUnit.java
│   │   ├── Bullet.java
│   │   ├── DestructibleEntity.java
│   │   ├── EffectEntity.java
│   │   ├── Player.java
│   │   ├── SolidEntity.java
│   │   ├── TileEntity.java
│   │   ├── TimedEntity.java
│   │   └── Unit.java
│   ├── units
│   │   ├── StateMachine.java
│   │   ├── Statuses.java
│   │   ├── UnitCommand.java
│   │   ├── UnitDrops.java
│   │   └── UnitState.java
│   └── Units.java
├── game
│   ├── DefaultWaves.java
│   ├── Difficulty.java
│   ├── EventType.java
│   ├── Gamemode.java
│   ├── GlobalData.java
│   ├── LoopControl.java
│   ├── MusicControl.java
│   ├── Objective.java
│   ├── Objectives.java
│   ├── Rules.java
│   ├── Saves.java
│   ├── Schematic.java
│   ├── Schematics.java
│   ├── SoundLoop.java
│   ├── SpawnGroup.java
│   ├── Stats.java
│   ├── Team.java
│   ├── Teams.java
│   └── Tutorial.java
├── graphics
│   ├── BlockRenderer.java
│   ├── Bloom.java
│   ├── CacheLayer.java
│   ├── Drawf.java
│   ├── FloorRenderer.java
│   ├── IndexedRenderer.java
│   ├── Layer.java
│   ├── LightRenderer.java
│   ├── MenuRenderer.java
│   ├── MinimapRenderer.java
│   ├── MultiPacker.java
│   ├── OverlayRenderer.java
│   ├── Pal.java
│   ├── Pixelator.java
│   └── Shaders.java
├── input
│   ├── Binding.java
│   ├── DesktopInput.java
│   ├── InputHandler.java
│   ├── MobileInput.java
│   ├── Placement.java
│   └── PlaceMode.java
├── io
│   ├── JsonIO.java
│   ├── LegacyMapIO.java
│   ├── MapIO.java
│   ├── SaveFileReader.java
│   ├── SaveIO.java
│   ├── SaveMeta.java
│   ├── SavePreviewLoader.java
│   ├── SaveVersion.java
│   ├── TypeIO.java
│   └── versions
│       ├── LegacyTypeTable.java
│       ├── Save1.java
│       ├── Save2.java
│       └── Save3.java
├── maps
│   ├── filters
│   │   ├── BlendFilter.java
│   │   ├── ClearFilter.java
│   │   ├── DistortFilter.java
│   │   ├── FilterOption.java
│   │   ├── GenerateFilter.java
│   │   ├── MedianFilter.java
│   │   ├── MirrorFilter.java
│   │   ├── NoiseFilter.java
│   │   ├── OreFilter.java
│   │   ├── OreMedianFilter.java
│   │   ├── RiverNoiseFilter.java
│   │   ├── ScatterFilter.java
│   │   └── TerrainFilter.java
│   ├── generators
│   │   ├── BasicGenerator.java
│   │   ├── Generator.java
│   │   ├── MapGenerator.java
│   │   └── RandomGenerator.java
│   ├── MapException.java
│   ├── Map.java
│   ├── MapPreviewLoader.java
│   ├── Maps.java
│   └── zonegen
│       ├── DesertWastesGenerator.java
│       └── OvergrowthGenerator.java
├── mod
│   ├── ClassAccess.java
│   ├── ContentParser.java
│   ├── Mod.java
│   ├── ModLoadingSound.java
│   ├── Mods.java
│   └── Scripts.java
├── net
│   ├── Administration.java
│   ├── ArcNetProvider.java
│   ├── CrashSender.java
│   ├── Host.java
│   ├── Interpolator.java
│   ├── NetConnection.java
│   ├── Net.java
│   ├── NetworkIO.java
│   ├── Packet.java
│   ├── Packets.java
│   ├── Registrator.java
│   ├── Streamable.java
│   └── ValidateException.java
├── plugin
│   └── Plugin.java
├── type
│   ├── Category.java
│   ├── ErrorContent.java
│   ├── Item.java
│   ├── ItemStack.java
│   ├── ItemType.java
│   ├── Liquid.java
│   ├── LiquidStack.java
│   ├── Mech.java
│   ├── Publishable.java
│   ├── StatusEffect.java
│   ├── TypeID.java
│   ├── UnitType.java
│   ├── Weapon.java
│   ├── WeatherEvent.java
│   └── Zone.java
├── ui
│   ├── Bar.java
│   ├── BorderImage.java
│   ├── Cicon.java
│   ├── ContentDisplay.java
│   ├── dialogs
│   │   ├── AboutDialog.java
│   │   ├── AdminsDialog.java
│   │   ├── BansDialog.java
│   │   ├── ColorPicker.java
│   │   ├── ContentInfoDialog.java
│   │   ├── ControlsDialog.java
│   │   ├── CustomGameDialog.java
│   │   ├── CustomRulesDialog.java
│   │   ├── DatabaseDialog.java
│   │   ├── DeployDialog.java
│   │   ├── DiscordDialog.java
│   │   ├── FileChooser.java
│   │   ├── FloatingDialog.java
│   │   ├── GameOverDialog.java
│   │   ├── HostDialog.java
│   │   ├── JoinDialog.java
│   │   ├── LanguageDialog.java
│   │   ├── LoadDialog.java
│   │   ├── LoadoutDialog.java
│   │   ├── MapPlayDialog.java
│   │   ├── MapsDialog.java
│   │   ├── MinimapDialog.java
│   │   ├── ModsDialog.java
│   │   ├── PaletteDialog.java
│   │   ├── PausedDialog.java
│   │   ├── SaveDialog.java
│   │   ├── SchematicsDialog.java
│   │   ├── SettingsMenuDialog.java
│   │   ├── TechTreeDialog.java
│   │   ├── TraceDialog.java
│   │   └── ZoneInfoDialog.java
│   ├── Fonts.java
│   ├── fragments
│   │   ├── BlockConfigFragment.java
│   │   ├── BlockInventoryFragment.java
│   │   ├── ChatFragment.java
│   │   ├── FadeInFragment.java
│   │   ├── Fragment.java
│   │   ├── HudFragment.java
│   │   ├── LoadingFragment.java
│   │   ├── MenuFragment.java
│   │   ├── OverlayFragment.java
│   │   ├── PlacementFragment.java
│   │   ├── PlayerListFragment.java
│   │   └── ScriptConsoleFragment.java
│   ├── GridImage.java
│   ├── IconSize.java
│   ├── IntFormat.java
│   ├── ItemDisplay.java
│   ├── ItemImage.java
│   ├── ItemsDisplay.java
│   ├── layout
│   │   ├── BranchTreeLayout.java
│   │   ├── RadialTreeLayout.java
│   │   └── TreeLayout.java
│   ├── Links.java
│   ├── LiquidDisplay.java
│   ├── Minimap.java
│   ├── MobileButton.java
│   ├── MultiReqImage.java
│   ├── ReqImage.java
│   └── Styles.java
├── Vars.java
└── world
    ├── Block.java
    ├── blocks
    │   ├── Attributes.java
    │   ├── Autotiler.java
    │   ├── BlockPart.java
    │   ├── BuildBlock.java
    │   ├── defense
    │   │   ├── DeflectorWall.java
    │   │   ├── Door.java
    │   │   ├── ForceProjector.java
    │   │   ├── MendProjector.java
    │   │   ├── OverdriveProjector.java
    │   │   ├── ShockMine.java
    │   │   ├── SurgeWall.java
    │   │   ├── turrets
    │   │   │   ├── ArtilleryTurret.java
    │   │   │   ├── BurstTurret.java
    │   │   │   ├── ChargeTurret.java
    │   │   │   ├── CooledTurret.java
    │   │   │   ├── DoubleTurret.java
    │   │   │   ├── ItemTurret.java
    │   │   │   ├── LaserTurret.java
    │   │   │   ├── LiquidTurret.java
    │   │   │   ├── PowerTurret.java
    │   │   │   └── Turret.java
    │   │   └── Wall.java
    │   ├── distribution
    │   │   ├── ArmoredConveyor.java
    │   │   ├── BufferedItemBridge.java
    │   │   ├── Conveyor.java
    │   │   ├── ExtendingItemBridge.java
    │   │   ├── ItemBridge.java
    │   │   ├── Junction.java
    │   │   ├── MassDriver.java
    │   │   ├── OverflowGate.java
    │   │   ├── Router.java
    │   │   └── Sorter.java
    │   ├── DoubleOverlayFloor.java
    │   ├── Floor.java
    │   ├── ItemSelection.java
    │   ├── liquid
    │   │   ├── ArmoredConduit.java
    │   │   ├── Conduit.java
    │   │   ├── LiquidBridge.java
    │   │   ├── LiquidExtendingBridge.java
    │   │   ├── LiquidJunction.java
    │   │   ├── LiquidOverflowGate.java
    │   │   ├── LiquidRouter.java
    │   │   └── LiquidTank.java
    │   ├── LiquidBlock.java
    │   ├── logic
    │   │   ├── LogicBlock.java
    │   │   └── MessageBlock.java
    │   ├── OreBlock.java
    │   ├── OverlayFloor.java
    │   ├── power
    │   │   ├── Battery.java
    │   │   ├── BurnerGenerator.java
    │   │   ├── ConditionalConsumePower.java
    │   │   ├── DecayGenerator.java
    │   │   ├── ImpactReactor.java
    │   │   ├── ItemLiquidGenerator.java
    │   │   ├── LightBlock.java
    │   │   ├── NuclearReactor.java
    │   │   ├── PowerDiode.java
    │   │   ├── PowerDistributor.java
    │   │   ├── PowerGenerator.java
    │   │   ├── PowerGraph.java
    │   │   ├── PowerNode.java
    │   │   ├── SingleTypeGenerator.java
    │   │   ├── SolarGenerator.java
    │   │   └── ThermalGenerator.java
    │   ├── PowerBlock.java
    │   ├── production
    │   │   ├── Cultivator.java
    │   │   ├── Drill.java
    │   │   ├── Fracker.java
    │   │   ├── GenericCrafter.java
    │   │   ├── GenericSmelter.java
    │   │   ├── Incinerator.java
    │   │   ├── LiquidConverter.java
    │   │   ├── Pump.java
    │   │   ├── Separator.java
    │   │   └── SolidPump.java
    │   ├── RespawnBlock.java
    │   ├── Rock.java
    │   ├── sandbox
    │   │   ├── ItemSource.java
    │   │   ├── ItemVoid.java
    │   │   ├── LiquidSource.java
    │   │   ├── PowerSource.java
    │   │   └── PowerVoid.java
    │   ├── StaticWall.java
    │   ├── storage
    │   │   ├── CoreBlock.java
    │   │   ├── LaunchPad.java
    │   │   ├── StorageBlock.java
    │   │   ├── Unloader.java
    │   │   └── Vault.java
    │   ├── TreeBlock.java
    │   └── units
    │       ├── CommandCenter.java
    │       ├── MechPad.java
    │       ├── RallyPoint.java
    │       ├── RepairPoint.java
    │       └── UnitFactory.java
    ├── BlockStorage.java
    ├── Build.java
    ├── CachedTile.java
    ├── consumers
    │   ├── ConsumeItemFilter.java
    │   ├── ConsumeItems.java
    │   ├── Consume.java
    │   ├── ConsumeLiquidBase.java
    │   ├── ConsumeLiquidFilter.java
    │   ├── ConsumeLiquid.java
    │   ├── ConsumePower.java
    │   ├── Consumers.java
    │   └── ConsumeType.java
    ├── DirectionalItemBuffer.java
    ├── Edges.java
    ├── ItemBuffer.java
    ├── LegacyColorMapper.java
    ├── meta
    │   ├── Attribute.java
    │   ├── BlockBars.java
    │   ├── BlockFlag.java
    │   ├── BlockGroup.java
    │   ├── BlockStat.java
    │   ├── BlockStats.java
    │   ├── BuildVisibility.java
    │   ├── PowerType.java
    │   ├── Producers.java
    │   ├── StatCategory.java
    │   ├── StatUnit.java
    │   ├── StatValue.java
    │   └── values
    │       ├── AmmoListValue.java
    │       ├── BooleanValue.java
    │       ├── BoosterListValue.java
    │       ├── ItemFilterValue.java
    │       ├── ItemListValue.java
    │       ├── LiquidFilterValue.java
    │       ├── LiquidValue.java
    │       ├── NumberValue.java
    │       └── StringValue.java
    ├── modules
    │   ├── BlockModule.java
    │   ├── ConsumeModule.java
    │   ├── ItemModule.java
    │   ├── LiquidModule.java
    │   └── PowerModule.java
    ├── Pos.java
    ├── producers
    │   ├── ProduceItem.java
    │   └── Produce.java
    ├── StaticTree.java
    ├── Tile.java
    └── WorldContext.java