译者吐槽:时间紧迫没有调整为doku语法,另外anuke终于在注释里写人话了,之前完全不知所云。
以下为md语法!
# Block
## Block
*继承于 [UnlockableContent](#unlockablecontent)*
field | type | default | notes |
— | — | — | — |
hasItems | boolean | false | 建筑是否拥有物品槽 |
hasLiquids | boolean | false | 建筑是否拥有流体槽 |
hasPower | boolean | false | 建筑是否拥有电力槽 |
outputsLiquid | boolean | false | 决定方块是否在某个地方输出液体的旗标变量,用于连接 |
consumesPower | boolean | true | 用于特定的电力方块(例如节点)以标记不耗费电力,默认就是true,即使没有电力槽 |
outputsPower | boolean | false | 是否为发电机,即提供电力 |
conductivePower | boolean | false | 是否直角式传输电力 |
outputsPayload | boolean | false | 是否输出载荷,影响于混合载荷的工厂 |
acceptsPayload | boolean | false | 是否允许载荷进入此方块 |
acceptsItems | boolean | false | 虚拟标记,用于混带 |
separateItemCapacity | boolean | false | 是否让全部物品总和为上限,抑或各自拥有上限 |
itemCapacity | int | 10 | 此方块物品数量最大值(通常是每种各自拥有上限) |
liquidCapacity | float | 10.0 | 在 hasLiquids 设置为 true时,这个值是液体数量总计最大值 |
liquidPressure | float | 1.0 | 值越大,输出流体就越快,TODO:换成更好的流体系统 |
outputFacing | boolean | true | 如果可用,是否向面朝方向输出 |
noSideBlend | boolean | false | 是否允许侧向输入(用于装甲传送带) |
displayFlow | boolean | true | 是否显示流速 |
inEditor | boolean | true | 是否在编辑器中可见 |
lastConfig | Object | null | 上一个配置值将会直接应用在此建筑 |
saveConfig | boolean | false | 是否保存配置并应用于下一个建筑(译者注:是否产生分类器保存选择物品的效果) |
copyConfig | boolean | true | 是否允许使用中键复制时保存配置并应用于对应建筑 |
clearOnDoubleTap | boolean | false | 是否双击即可清空配置 |
update | boolean | false | 是否拥有实体,即能否动态更新 |
destructible | boolean | false | 是否拥有血量且允许被破坏 |
unloadable | boolean | true | 是否允许装卸器在此方块上工作 |
allowResupply | boolean | false | 是否允许单位在此通过拿取物品装弹 |
solid | boolean | false | 是否是solid的 |
solidifes | boolean | false | 是否可以为solid |
teamPassable | boolean | false | 是否计算成队伍中成非solid的方块 |
underBullets | boolean | false | 是否让炮塔除精确打中时都不能攻击此方块 |
rotate | boolean | false | 是否可以转向 |
rotateDraw | boolean | true | 如果rotate为true而此字段为false,那么旋转时贴图不会转动 |
invertFlip | boolean | false | 如果为true,那么包含此方块的蓝图翻转时此物品相反改变 。 |
variants | int | 0 | 变体贴图的数量 |
drawArrow | boolean | true | 是否绘制示意方向的箭头,连续放置不会绘制 |
saveData | boolean | false | 仅用于静态方块,是否将格子处的data()存储于世界数据 |
breakable | boolean | false | 右键能否拆除 |
rebuildable | boolean | true | 是否在损坏后重建 |
privileged | boolean | false | 如果为true,那么这个逻辑相关的方块仅可用于特权处理器(也可能是它自己) |
requiresWater | boolean | false | 是否仅可放置于水上 |
placeableLiquid | boolean | false | 是否可以放置于流体上 |
placeablePlayer | boolean | true | 方块是否可以直接由玩家通过PlacementFragment放置 |
placeableOn | boolean | true | 此地板是否可以在其上建筑 |
insulated | boolean | false | 是否具有绝缘性质 |
squareSprite | boolean | true | 贴图是否为正方形 |
absorbLasers | boolean | false | 是否隔绝激光攻击 |
enableDrawStatus | boolean | true | 是否绘制方块状态 |
drawDisabled | boolean | true | 是否绘制禁用状态 |
autoResetEnabled | boolean | true | 是否在设置enable为false之后一会就恢复运转 |
noUpdateDisabled | boolean | false | 是否在禁用时停止更新 |
updateInUnits | boolean | true | 是否在为单位所载的载荷时保持更新 |
alwaysUpdateInUnits | boolean | false | 是否载为单位所载时无视一切规则继续更新 |
useColor | boolean | true | 是否在小地图显示为方块颜色,仅用于Overlays |
itemDrop | Item | null | 此方块掉落的物品,用于钻头 |
playerUnmineable | boolean | false | 是否禁止玩家开采,用于烦人的沙子 |
attributes | Attributes | new Attributes() | 特定事物的影响 |
scaledHealth | float | -1.0 | 每平方格的平均生命值,通常乘以边长的平方,如果health大于零则health优先,如果此值小于零,默认为40 |
health | int | -1 | 建筑血量,-1一值则意味着使用scaledHealth |
armor | float | 0.0 | 伤害吸收,类似单位护盾 |
baseExplosiveness | float | 0.0 | 方块基础爆炸性值 |
destroyBullet | BulletType | null | 被摧毁时生成的炮弹 |
floating | boolean | false | 是否可放置于流体边缘 |
size | int | 1 | 方块尺寸 |
offset | float | 0.0 | 方块迭代 |
sizeOffset | int | 0 | 迭代器 (仅用于内部类) |
clipSize | float | -1.0 | 方块的剪切大小,应该和长得一样大 |
placeOverlapRange | float | 50.0 | 启用时,敌方方块会有范围检查 |
crushDamageMultiplier | float | 1.0 | 坦克的对此方块伤害倍率,对爬爬无效 |
timers | int | 1 | 计时器最大市场 |
cacheLayer | CacheLayer | normal | 缓存层,仅用于底层缓存 |
fillsTile | boolean | true | 特殊标记,如果值为false,地板即使被缓存也会在方块下绘制 |
forceDark | boolean | false | 如果值为true,即使synthetic,也会显示黑暗或迷雾 |
alwaysReplace | boolean | false | 是否无论何时都能被覆盖 |
replaceable | boolean | true | 如果值为false,那么就不能被覆盖 |
group | BlockGroup | none | 方块的组别,除非canReplace(可能是replaceable的意思)设置为false,否则同组方块皆可覆盖 |
flags | EnumSet<BlockFlag> | of() | 方块的标记,用于AI寻路 |
priority | float | 0.0 | 敌军的攻击优先级. |
unitCapModifier | int | 0 | 对单位数量的影响,此标记需与unitModifier搭配使用 |
configurable | boolean | false | 此方块是否单击并弹出选择框 |
commandable | boolean | false | 如果为true,此方块可以像单位一样被指挥 |
allowConfigInventory | boolean | true | 是否在配置上显示内容物存量 |
logicConfigurable | boolean | false | 是否可被逻辑设置 |
consumesTap | boolean | false | 是否在被按下时发出TouchDown事件 |
drawLiquidLight | boolean | true | 如果有液体,是否绘制液体发出的光 |
envRequired | int | 0 | 全部必须的环境标记,0为任何环境 |
envEnabled | int | 1 | 任一必须的环境标记,1为所有环境 |
envDisabled | int | 0 | 任一禁止的环境标记,有一个则禁用方块 |
sync | boolean | false | 是否定期在网络上同步 |
conveyorPlacement | boolean | false | 是否使用传送带建造模式. |
allowDiagonal | boolean | true | 如果值为false,则斜线建造不起作用 |
swapDiagonalPlacement | boolean | false | 是否交换直线与斜线建造模式 |
schematicPriority | int | 0 | 蓝图建造优先级 |
mapColor | Color | 000000ff | 小地图颜色,最好不要手动设置,大多数情况下都会被覆盖 |
hasColor | boolean | false | 是否拥有小地图颜色 |
targetable | boolean | true | 单位是否能向此建筑射击 |
attacks | boolean | false | If true, this block attacks and is considered a turret in the indexer. Building must implement Ranged. |
suppressable | boolean | false | If true, this block is mending-related and can be suppressed with special units/missiles. |
canOverdrive | boolean | true | Whether the overdrive core has any effect on this block. |
outlineColor | Color | 404049ff | Outlined icon color. |
outlineIcon | boolean | false | Whether any icon region has an outline added. |
outlineRadius | int | 4 | Outline icon radius. |
outlinedIcon | int | -1 | Which of the icon regions gets the outline added. Uses last icon if ⇐ 0. |
hasShadow | boolean | true | Whether this block has a shadow under it. |
customShadow | boolean | false | If true, a custom shadow (name-shadow) is drawn under this block. |
placePitchChange | boolean | true | Should the sound made when this block is built change in pitch. |
breakPitchChange | boolean | true | Should the sound made when this block is deconstructed change in pitch. |
placeSound | Sound | place | Sound made when this block is built. |
breakSound | Sound | breaks | Sound made when this block is deconstructed. |
destroySound | Sound | boom | Sounds made when this block is destroyed. |
albedo | float | 0.0 | How reflective this block is. |
lightColor | Color | ffffffff | Environmental passive light color. |
emitLight | boolean | false | Whether this environmental block passively emits light. Does not change behavior for non-environmental blocks, but still updates clipSize. |
lightRadius | float | 60.0 | Radius of the light emitted by this block. |
fogRadius | int | -1 | How much fog this block uncovers, in tiles. Cannot be dynamic. ⇐ 0 to disable. |
loopSound | Sound | none | The sound that this block makes while active. One sound loop. Do not overuse. |
loopSoundVolume | float | 0.5 | Active sound base volume. |
ambientSound | Sound | none | The sound that this block makes while idle. Uses one sound loop for all blocks. |
ambientSoundVolume | float | 0.05 | Idle sound base volume. |
requirements | ItemStack[] | [] | Cost of constructing this block. |
category | Category | distribution | Category in place menu. |
buildCost | float | 20.0 | Time to build this block in ticks; do not modify directly! |
buildVisibility | BuildVisibility | hidden | Whether this block is visible and can currently be built. |
buildCostMultiplier | float | 1.0 | Multiplier for speed of building this block. |
deconstructThreshold | float | 0.0 | Build completion at which deconstruction finishes. |
instantDeconstruct | boolean | false | If true, this block deconstructs immediately. Instant deconstruction implies no resource refund. |
breakEffect | Effect | breakBlock | Effect for breaking the block. Passes size as rotation. |
destroyEffect | Effect | dynamicExplosion | Effect for destroying the block. |
researchCostMultiplier | float | 1.0 | Multiplier for cost of research in tech tree. |
researchCostMultipliers | ObjectFloatMap<Item> | new ObjectFloatMap<>() | Cost multipliers per-item. |
researchCost | ItemStack[] | null | Override for research cost. Uses multipliers above and building requirements if not set. |
instantTransfer | boolean | false | Whether this block has instant transfer. |
quickRotate | boolean | true | Whether you can rotate this block after it is placed. |
subclass | Class<?> | class mindustry.world.Block | Main subclass. Non-anonymous. |
highUnloadPriority | boolean | false | Determines if this block gets a higher unloader priority. |
selectScroll | float | 0.0 | Scroll position for certain blocks. |
buildType | Prov<Building> | null | Building that is created for this block. Initialized in init() via reflection. Set manually if modded. |
configurations | ObjectMap<Class<?>,Cons2> | new ObjectMap<>() | Configuration handlers by type. |
itemFilter | boolean[] | [] | Consumption filters. |
liquidFilter | boolean[] | [] | Consumption filters. |
consumers | Consume[] | [] | Array of consumers used by this block. Only populated after init(). |
optionalConsumers | Consume[] | [] | Array of consumers used by this block. Only populated after init(). |
nonOptionalConsumers | Consume[] | [] | Array of consumers used by this block. Only populated after init(). |
updateConsumers | Consume[] | [] | Array of consumers used by this block. Only populated after init(). |
hasConsumers | boolean | false | Set to true if this block has any consumers in its array. |
consPower | ConsumePower | null | The single power consumer, if applicable. |
regionRotated1 | int | -1 | Regions indexes from icons() that are rotated. If either of these is not -1, other regions won't be rotated in ConstructBlocks. |
regionRotated2 | int | -1 | Regions indexes from icons() that are rotated. If either of these is not -1, other regions won't be rotated in ConstructBlocks. |
region | TextureRegion | null | |
editorIcon | TextureRegion | null | |
customShadowRegion | TextureRegion | null | |
teamRegion | TextureRegion | null | |
teamRegions | TextureRegion[] | null | |
variantRegions | TextureRegion[] | null | |
variantShadowRegions | TextureRegion[] | null |
## Accelerator
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
arrowRegion | TextureRegion | null | |
launching | Block | coreNucleus | |
capacities | int[] | [] |
## AirBlock
*extends [Floor](#floor)*
*extends [Conduit](#conduit)*
*extends [Conveyor](#conveyor)*
*extends [GenericCrafter](#genericcrafter)*
A crafter that gains efficiency from attribute tiles.
field | type | default | notes |
— | — | — | — |
attribute | Attribute | heat | |
baseEfficiency | float | 1.0 | |
boostScale | float | 1.0 | |
maxBoost | float | 1.0 | |
minEfficiency | float | -1.0 | |
displayEfficiencyScale | float | 1.0 | |
displayEfficiency | boolean | true |
## AutoDoor
*extends [Wall](#wall)*
field | type | default | notes |
— | — | — | — |
timerToggle | int | 1 | |
checkInterval | float | 20.0 | |
openfx | Effect | dooropen | |
closefx | Effect | doorclose | |
doorSound | Sound | door | |
openRegion | TextureRegion | null | |
triggerMargin | float | 10.0 |
## BaseShield
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
radius | float | 200.0 | |
sides | int | 24 |
## BaseTurret
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
range | float | 80.0 | |
placeOverlapMargin | float | 56.0 | |
rotateSpeed | float | 5.0 | |
coolEffect | Effect | fuelburn | Effect displayed when coolant is used. |
coolantMultiplier | float | 5.0 | How much reload is lowered by for each unit of liquid of heat capacity. |
coolant | ConsumeLiquidBase | null |
## Battery
*extends [PowerDistributor](#powerdistributor)*
field | type | default | notes |
— | — | — | — |
topRegion | TextureRegion | null | |
emptyLightColor | Color | f8c266ff | |
fullLightColor | Color | fb9567ff |
## BeamDrill
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
laser | TextureRegion | null | |
laserEnd | TextureRegion | null | |
laserCenter | TextureRegion | null | |
laserBoost | TextureRegion | null | |
laserEndBoost | TextureRegion | null | |
laserCenterBoost | TextureRegion | null | |
topRegion | TextureRegion | null | |
glowRegion | TextureRegion | null | |
drillTime | float | 200.0 | |
range | int | 5 | |
tier | int | 1 | |
laserWidth | float | 0.65 | |
optionalBoostIntensity | float | 2.5 | How many times faster the drill will progress when boosted by an optional consumer. |
sparkColor | Color | fd9e81ff | |
glowColor | Color | ffffffff | |
glowIntensity | float | 0.2 | |
pulseIntensity | float | 0.07 | |
glowScl | float | 3.0 | |
sparks | int | 7 | |
sparkRange | float | 10.0 | |
sparkLife | float | 27.0 | |
sparkRecurrence | float | 4.0 | |
sparkSpread | float | 45.0 | |
sparkSize | float | 3.5 | |
boostHeatColor | Color | 75b3ccff | |
heatColor | Color | ff5959e5 | |
heatPulse | float | 0.3 | |
heatPulseScl | float | 7.0 |
## BeamNode
*extends [PowerBlock](#powerblock)*
field | type | default | notes |
— | — | — | — |
range | int | 5 | |
laser | TextureRegion | null | |
laserEnd | TextureRegion | null | |
laserColor1 | Color | ffffffff | |
laserColor2 | Color | ffd9c2ff | |
pulseScl | float | 7.0 | |
pulseMag | float | 0.05 | |
laserWidth | float | 0.4 |
*extends [ItemBridge](#itembridge)*
field | type | default | notes |
— | — | — | — |
timerAccept | int | 2 | |
speed | float | 40.0 | |
bufferCapacity | int | 50 |
## BuildTurret
*extends [BaseTurret](#baseturret)*
field | type | default | notes |
— | — | — | — |
timerTarget | int | 1 | |
timerTarget2 | int | 2 | |
targetInterval | int | 15 | |
baseRegion | TextureRegion | null | |
glowRegion | TextureRegion | null | |
buildSpeed | float | 1.0 | |
buildBeamOffset | float | 5.0 | |
unitType | UnitType | null | |
elevation | float | -1.0 | |
heatColor | Color | ffd37fe5 |
## BurstDrill
*extends [Drill](#drill)*
field | type | default | notes |
— | — | — | — |
shake | float | 2.0 | |
speedCurve | Interp | pow2In | |
topInvertRegion | TextureRegion | null | |
glowRegion | TextureRegion | null | |
arrowRegion | TextureRegion | null | |
arrowBlurRegion | TextureRegion | null | |
invertedTime | float | 200.0 | |
arrowSpacing | float | 4.0 | |
arrowOffset | float | 0.0 | |
arrows | int | 3 | |
arrowColor | Color | feb380ff | |
baseArrowColor | Color | 6e7080ff | |
glowColor | Color | feb380ff |
## CanvasBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
padding | float | 0.0 | |
canvasSize | int | 8 | |
palette | int[] | { 0x634b7dff, 0xc45d9f_ff, 0xe39aac_ff, 0xf0dab1_ff, 0x6461c2_ff, 0x2ba9b4_ff, 0x93d4b5_ff, 0xf0f6e8_ff } | |
bitsPerPixel | int | 0 | |
colorToIndex | IntIntMap | new IntIntMap() |
## Cliff
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
size | float | 11.0 | |
cliffs | TextureRegion[] | null | |
editorCliffs | TextureRegion[] | null |
## Conduit
*extends [LiquidBlock](#liquidblock)*
field | type | default | notes |
— | — | — | — |
timerFlow | int | 1 | |
botColor | Color | 565656ff | |
topRegions | TextureRegion[] | null | |
botRegions | TextureRegion[] | null | |
capRegion | TextureRegion | null | |
rotateRegions | TextureRegion[][][] | null | indices: [rotation] [fluid type] [frame] |
leaks | boolean | true | |
junctionReplacement | Block | null | |
bridgeReplacement | Block | null | |
rotBridgeReplacement | Block | null |
## Constructor
*extends [BlockProducer](#blockproducer)*
Configurable BlockProducer variant.
field | type | default | notes |
— | — | — | — |
filter | Seq<Block> | new Seq<>() | Empty seq for no filter. |
buildSpeed | float | 0.4 | |
minBlockSize | int | 1 | |
maxBlockSize | int | 2 |
## Duct
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
speed | float | 5.0 | |
armored | boolean | false | |
transparentColor | Color | 66666619 | |
topRegions | TextureRegion[] | null | |
botRegions | TextureRegion[] | null |
*extends [PowerDistributor](#powerdistributor)*
field | type | default | notes |
— | — | — | — |
powerProduction | float | 0.0 | The amount of power produced per tick in case of an efficiency of 1.0, which represents 100%. |
generationType | Stat | basePowerGeneration | |
drawer | DrawBlock | new DrawDefault() |
*extends [PowerGenerator](#powergenerator)*
A generator that just takes in certain items or liquids. Basically SingleTypeGenerator, but not unreliable garbage.
field | type | default | notes |
— | — | — | — |
itemDuration | float | 120.0 | The time in number of ticks during which a single item will produce power. |
effectChance | float | 0.01 | |
generateEffect | Effect | none | |
consumeEffect | Effect | none | |
generateEffectRange | float | 3.0 | |
liquidOutput | LiquidStack | null | |
filterItem | ConsumeItemFilter | null | |
filterLiquid | ConsumeLiquidFilter | null |
*extends [Turret](#turret)*
A turret that fires a continuous beam bullet with no reload or coolant necessary. The bullet only disappears when the turret stops shooting.
field | type | default | notes |
— | — | — | — |
shootType | BulletType | placeholder |
*extends [ContinuousTurret](#continuousturret)*
field | type | default | notes |
— | — | — | — |
ammoTypes | ObjectMap<Liquid,BulletType> | new ObjectMap<>() | |
liquidConsumed | float | 0.016666668 |
## Conveyor
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
regions | TextureRegion[][] | null | |
speed | float | 0.0 | |
displayedSpeed | float | 0.0 | |
junctionReplacement | Block | null | |
bridgeReplacement | Block | null |
## CoreBlock
*extends [StorageBlock](#storageblock)*
field | type | default | notes |
— | — | — | — |
thruster1 | TextureRegion | null | |
thruster2 | TextureRegion | null | |
thrusterLength | float | 3.5 | |
isFirstTier | boolean | false | |
incinerateNonBuildable | boolean | false | |
unitType | UnitType | alpha | |
captureInvicibility | float | 900.0 |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
bridgeRegion | TextureRegion | null | |
bridgeBotRegion | TextureRegion | null | |
bridgeLiquidRegion | TextureRegion | null | |
arrowRegion | TextureRegion | null | |
dirRegion | TextureRegion | null | |
range | int | 4 |
*extends [DirectionBridge](#directionbridge)*
field | type | default | notes |
— | — | — | — |
timerFlow | int | 1 | |
speed | float | 5.0 | |
liquidPadding | float | 1.0 | |
bottomRegion | TextureRegion | null |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
width | float | 30.0 | |
shieldHealth | float | 3000.0 | |
cooldownNormal | float | 1.75 | |
cooldownLiquid | float | 1.5 | |
cooldownBrokenBase | float | 0.35 | |
absorbEffect | Effect | absorb | |
shieldBreakEffect | Effect | shieldBreak | |
topRegion | TextureRegion | null | |
length | float | 40.0 | |
padSize | float | 40.0 |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
centerRegion | TextureRegion | null | |
topRegion | TextureRegion | null | |
arrowRegion | TextureRegion | null | |
speed | float | 1.0 | |
allowCoreUnload | boolean | false |
## Door
*extends [Wall](#wall)*
field | type | default | notes |
— | — | — | — |
timerToggle | int | 1 | |
openfx | Effect | dooropen | |
closefx | Effect | doorclose | |
doorSound | Sound | door | |
openRegion | TextureRegion | null |
## Drill
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
hardnessDrillMultiplier | float | 50.0 | |
tier | int | 0 | Maximum tier of blocks this drill can mine. |
drillTime | float | 300.0 | Base time to drill one ore, in frames. |
liquidBoostIntensity | float | 1.6 | How many times faster the drill will progress when boosted by liquid. |
warmupSpeed | float | 0.015 | Speed at which the drill speeds up. |
blockedItem | Item | null | Special exemption item that this drill can't mine. |
drawMineItem | boolean | true | Whether to draw the item this drill is mining. |
drillEffect | Effect | mine | Effect played when an item is produced. This is colored. |
drillEffectRnd | float | -1.0 | Drill effect randomness. Block size by default. |
rotateSpeed | float | 2.0 | Speed the drill bit rotates at. |
updateEffect | Effect | pulverizeSmall | Effect randomly played while drilling. |
updateEffectChance | float | 0.02 | Chance the update effect will appear. |
drawRim | boolean | false | |
drawSpinSprite | boolean | true | |
heatColor | Color | ff5512ff | |
rimRegion | TextureRegion | null | |
rotatorRegion | TextureRegion | null | |
topRegion | TextureRegion | null | |
itemRegion | TextureRegion | null |
## DroneCenter
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
unitsSpawned | int | 4 | |
droneType | UnitType | null | |
status | StatusEffect | overdrive | |
droneConstructTime | float | 180.0 | |
statusDuration | float | 120.0 | |
droneRange | float | 50.0 |
## DuctBridge
*extends [DirectionBridge](#directionbridge)*
field | type | default | notes |
— | — | — | — |
speed | float | 5.0 |
## DuctRouter
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
speed | float | 5.0 | |
topRegion | TextureRegion | null |
## Floor
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
edge | String | “stone” | edge fallback, used mainly for ores |
speedMultiplier | float | 1.0 | Multiplies unit velocity by this when walked on. |
dragMultiplier | float | 1.0 | Multiplies unit drag by this when walked on. |
damageTaken | float | 0.0 | Damage taken per tick on this tile. |
drownTime | float | 0.0 | How many ticks it takes to drown on this. 0 to disable. |
walkEffect | Effect | none | Effect when walking on this floor. |
walkSound | Sound | none | Sound made when walking. |
walkSoundVolume | float | 0.1 | Volume of sound made when walking. |
walkSoundPitchMin | float | 0.8 | Volume of sound made when walking. |
walkSoundPitchMax | float | 1.2 | Volume of sound made when walking. |
drownUpdateEffect | Effect | bubble | Effect displayed when drowning on this floor. |
status | StatusEffect | none | Status effect applied when walking on. |
statusDuration | float | 60.0 | Intensity of applied status effect. |
liquidDrop | Liquid | null | liquids that drop from this block, used for pumps. |
liquidMultiplier | float | 1.0 | Multiplier for pumped liquids, used for deep water. |
isLiquid | boolean | false | whether this block is liquid. |
overlayAlpha | float | 0.65 | for liquid floors, this is the opacity of the overlay drawn on top. |
supportsOverlay | boolean | false | whether this floor supports an overlay floor |
shallow | boolean | false | shallow water flag used for generation |
blendGroup | Block | this | Group of blocks that this block does not draw edges on. |
oreDefault | boolean | false | Whether this ore generates in maps by default. |
oreScale | float | 24.0 | Ore generation params. |
oreThreshold | float | 0.828 | Ore generation params. |
wall | Block | air | Wall variant of this block. May be Blocks.air if not found. |
decoration | Block | air | Decoration block. Usually a rock. May be air. |
canShadow | boolean | true | Whether units can draw shadows over this. |
needsSurface | boolean | true | Whether this overlay needs a surface to be on. False for floating blocks, like spawns. |
allowCorePlacement | boolean | false | If true, cores can be placed on this floor. |
wallOre | boolean | false | If true, this ore is allowed on walls. |
blendId | int | -1 | Actual ID used for blend groups. Internal. |
## EmptyFloor
*extends [Floor](#floor)*
Empty floor is *not* equivalent to air. Unlike air, it is solid, and still draws neighboring tile edges.
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
timerUse | int | 1 | |
phaseUseTime | float | 350.0 | |
phaseRadiusBoost | float | 80.0 | |
phaseShieldBoost | float | 400.0 | |
radius | float | 101.7 | |
shieldHealth | float | 700.0 | |
cooldownNormal | float | 1.75 | |
cooldownLiquid | float | 1.5 | |
cooldownBrokenBase | float | 0.35 | |
coolantConsumption | float | 0.1 | |
consumeCoolant | boolean | true | |
absorbEffect | Effect | absorb | |
shieldBreakEffect | Effect | shieldBreak | |
topRegion | TextureRegion | null | |
itemConsumer | Consume | null | |
coolantConsumer | Consume | mindustry.world.consumers.ConsumeCoolant@35d53cd8 |
## Fracker
*extends [SolidPump](#solidpump)*
field | type | default | notes |
— | — | — | — |
itemUseTime | float | 100.0 |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
outputItem | ItemStack | null | Written to outputItems as a single-element array if outputItems is null. |
outputItems | ItemStack[] | null | Overwrites outputItem if not null. |
outputLiquid | LiquidStack | null | Written to outputLiquids as a single-element array if outputLiquids is null. |
outputLiquids | LiquidStack[] | null | Overwrites outputLiquid if not null. |
liquidOutputDirections | int[] | { -1 } | Liquid output directions, specified in the same order as outputLiquids. Use -1 to dump in every direction. Rotations are relative to block. |
dumpExtraLiquid | boolean | true | if true, crafters with multiple liquid outputs will dump excess when there's still space for at least one liquid type |
ignoreLiquidFullness | boolean | false | |
craftTime | float | 80.0 | |
craftEffect | Effect | none | |
updateEffect | Effect | none | |
updateEffectChance | float | 0.04 | |
warmupSpeed | float | 0.019 | |
legacyReadWarmup | boolean | false | Only used for legacy cultivator blocks. |
drawer | DrawBlock | new DrawDefault() |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
visualMaxHeat | float | 15.0 | |
drawer | DrawBlock | new DrawDefault() |
## HeatCrafter
*extends [GenericCrafter](#genericcrafter)*
A crafter that requires contact from heater blocks to craft.
field | type | default | notes |
— | — | — | — |
heatRequirement | float | 10.0 | Base heat requirement for 100% efficiency. |
overheatScale | float | 1.0 | After heat meets this requirement, excess heat will be scaled by this number. |
maxEfficiency | float | 4.0 | Maximum possible efficiency after overheat. |
## HeatProducer
*extends [GenericCrafter](#genericcrafter)*
field | type | default | notes |
— | — | — | — |
heatOutput | float | 10.0 | |
warmupRate | float | 0.15 |
*extends [PowerGenerator](#powergenerator)*
field | type | default | notes |
— | — | — | — |
timerUse | int | 1 | |
warmupSpeed | float | 0.001 | |
itemDuration | float | 60.0 | |
explosionRadius | int | 23 | |
explosionDamage | int | 1900 | |
explodeEffect | Effect | impactReactorExplosion | |
plasma1 | Color | ffd06bff | |
plasma2 | Color | ff361bff | |
bottomRegion | TextureRegion | null | |
plasmaRegions | TextureRegion[] | null |
## Incinerator
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
effect | Effect | fuelburn | |
flameColor | Color | ffad9dff |
## ItemBridge
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
timerCheckMoved | int | 1 | |
range | int | 0 | |
transportTime | float | 2.0 | |
endRegion | TextureRegion | null | |
bridgeRegion | TextureRegion | null | |
arrowRegion | TextureRegion | null | |
fadeIn | boolean | true | |
moveArrows | boolean | true | |
pulse | boolean | false | |
arrowSpacing | float | 4.0 | |
arrowOffset | float | 2.0 | |
arrowPeriod | float | 0.4 | |
arrowTimeScl | float | 6.2 | |
lastBuild | ItemBridgeBuild | null |
*extends [Block](#block)*
Incinerator that accepts only items and optionally requires a liquid, e.g. slag.
field | type | default | notes |
— | — | — | — |
effect | Effect | incinerateSlag | |
effectChance | float | 0.2 | |
liquidRegion | TextureRegion | null | |
topRegion | TextureRegion | null |
## ItemSource
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
itemsPerSecond | int | 100 |
## ItemTurret
*extends [Turret](#turret)*
field | type | default | notes |
— | — | — | — |
ammoTypes | ObjectMap<Item,BulletType> | new ObjectMap<>() |
## ItemVoid
*extends [Block](#block)*
## Junction
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
speed | float | 26.0 | |
capacity | int | 6 |
## LaserTurret
*extends [PowerTurret](#powerturret)*
A turret that fires a continuous beam with a delay between shots. Liquid coolant is required. Yes, this class name is awful. NEEDS RENAME
field | type | default | notes |
— | — | — | — |
firingMoveFract | float | 0.25 | |
shootDuration | float | 100.0 |
## LaunchPad
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
launchTime | float | 1.0 | Time inbetween launches. |
launchSound | Sound | none | |
lightRegion | TextureRegion | null | |
podRegion | TextureRegion | null | |
lightColor | Color | eab678ff |
## LightBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
brightness | float | 0.9 | |
radius | float | 200.0 | |
topRegion | TextureRegion | null |
## LiquidBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
liquidRegion | TextureRegion | null | |
topRegion | TextureRegion | null | |
bottomRegion | TextureRegion | null |
## LiquidBridge
*extends [ItemBridge](#itembridge)*
*extends [LiquidBlock](#liquidblock)*
## LiquidRouter
*extends [LiquidBlock](#liquidblock)*
field | type | default | notes |
— | — | — | — |
liquidPadding | float | 0.0 |
## LiquidSource
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
crossRegion | TextureRegion | null | |
bottomRegion | TextureRegion | null |
## LiquidTurret
*extends [Turret](#turret)*
field | type | default | notes |
— | — | — | — |
ammoTypes | ObjectMap<Liquid,BulletType> | new ObjectMap<>() | |
extinguish | boolean | true |
## LiquidVoid
*extends [Block](#block)*
## LogicBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
maxInstructionScale | int | 5 | |
instructionsPerTick | int | 1 | |
maxInstructionsPerTick | int | 40 | |
range | float | 80.0 |
## LogicDisplay
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
maxSides | int | 25 | |
displaySize | int | 64 | |
scaleFactor | float | 1.0 |
*extends [PowerNode](#powernode)*
field | type | default | notes |
— | — | — | — |
glow | TextureRegion | null | |
glowColor | Color | cbfd8172 | |
glowScl | float | 16.0 | |
glowMag | float | 0.6 |
## MassDriver
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
range | float | 0.0 | |
rotateSpeed | float | 5.0 | |
translation | float | 7.0 | |
minDistribute | int | 10 | |
knockback | float | 4.0 | |
reloadTime | float | 100.0 | |
bullet | MassDriverBolt | new MassDriverBolt() | |
bulletSpeed | float | 5.5 | |
bulletLifetime | float | 200.0 | |
shootEffect | Effect | shootBig2 | |
smokeEffect | Effect | shootBigSmoke2 | |
receiveEffect | Effect | mineBig | |
shootSound | Sound | shootBig | |
shake | float | 3.0 | |
baseRegion | TextureRegion | null |
## MemoryBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
memoryCapacity | int | 32 |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
timerUse | int | 1 | |
baseColor | Color | 84f491ff | |
phaseColor | Color | 84f491ff | |
topRegion | TextureRegion | null | |
reload | float | 250.0 | |
range | float | 60.0 | |
healPercent | float | 12.0 | |
phaseBoost | float | 12.0 | |
phaseRangeBoost | float | 50.0 | |
useTime | float | 400.0 |
## MessageBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
maxTextLength | int | 220 | |
maxNewlines | int | 24 |
*extends [PowerGenerator](#powergenerator)*
field | type | default | notes |
— | — | — | — |
timerFuel | int | 1 | |
tr | Vec2 | (0.0,0.0) | |
lightColor | Color | 7f19eaff | |
coolColor | Color | ffffff00 | |
hotColor | Color | ff9575a3 | |
explodeEffect | Effect | reactorExplosion | |
itemDuration | float | 120.0 | ticks to consume 1 fuel |
heating | float | 0.01 | heating per frame * fullness |
smokeThreshold | float | 0.3 | threshold at which block starts smoking |
flashThreshold | float | 0.46 | heat threshold at which lights start flashing |
explosionRadius | int | 19 | |
explosionDamage | int | 1250 | |
coolantPower | float | 0.5 | heat removed per unit of coolant |
smoothLight | float | 0.0 | |
fuelItem | Item | thorium | |
topRegion | TextureRegion | null | |
lightsRegion | TextureRegion | null |
## OreBlock
*extends [OverlayFloor](#overlayfloor)*
An overlay ore for a specific item type.
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
timerUse | int | 1 | |
topRegion | TextureRegion | null | |
reload | float | 60.0 | |
range | float | 80.0 | |
speedBoost | float | 1.5 | |
speedBoostPhase | float | 0.75 | |
useTime | float | 400.0 | |
phaseRangeBoost | float | 20.0 | |
hasBoost | boolean | true | |
baseColor | Color | feb380ff | |
phaseColor | Color | ffd59eff |
## OverflowDuct
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
speed | float | 5.0 | |
topRegion | TextureRegion | null |
## OverflowGate
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
speed | float | 1.0 | |
invert | boolean | false |
## OverlayFloor
*extends [Floor](#floor)*
A type of floor that is overlaid on top of other floors.
*extends [Turret](#turret)*
field | type | default | notes |
— | — | — | — |
ammoTypes | ObjectMap<UnlockableContent,BulletType> | new ObjectMap<>() |
## PayloadBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
payloadSpeed | float | 0.7 | |
payloadRotateSpeed | float | 5.0 | |
regionSuffix | String | ““ | |
topRegion | TextureRegion | null | |
outRegion | TextureRegion | null | |
inRegion | TextureRegion | null |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
moveTime | float | 45.0 | |
moveForce | float | 201.0 | |
topRegion | TextureRegion | null | |
edgeRegion | TextureRegion | null | |
interp | Interp | pow5 | |
payloadLimit | float | 3.0 |
*extends [PayloadBlock](#payloadblock)*
field | type | default | notes |
— | — | — | — |
maxPayloadSize | float | 4.0 | |
deconstructSpeed | float | 2.5 | |
dumpRate | int | 4 |
*extends [PayloadBlock](#payloadblock)*
field | type | default | notes |
— | — | — | — |
timerLoad | int | 1 | |
loadTime | float | 2.0 | |
itemsLoaded | int | 8 | |
liquidsLoaded | float | 40.0 | |
maxBlockSize | int | 3 | |
maxPowerConsumption | float | 40.0 | |
loadPowerDynamic | boolean | true |
*extends [PayloadBlock](#payloadblock)*
field | type | default | notes |
— | — | — | — |
range | float | 100.0 | |
rotateSpeed | float | 2.0 | |
length | float | 11.125 | |
knockback | float | 5.0 | |
reloadTime | float | 30.0 | |
chargeTime | float | 100.0 | |
maxPayloadSize | float | 3.0 | |
grabWidth | float | 8.0 | |
grabHeight | float | 2.75 | |
shootEffect | Effect | shootBig2 | |
smokeEffect | Effect | shootPayloadDriver | |
receiveEffect | Effect | payloadReceive | |
shootSound | Sound | shootBig | |
shake | float | 3.0 | |
transferEffect | Effect | flyingUnitLow - 1) | |
baseRegion | TextureRegion | null | |
capRegion | TextureRegion | null | |
leftRegion | TextureRegion | null | |
rightRegion | TextureRegion | null | |
capOutlineRegion | TextureRegion | null | |
leftOutlineRegion | TextureRegion | null | |
rightOutlineRegion | TextureRegion | null | |
arrow | TextureRegion | null |
*extends [PayloadConveyor](#payloadconveyor)*
field | type | default | notes |
— | — | — | — |
overRegion | TextureRegion | null |
*extends [PayloadBlock](#payloadblock)*
Generic building that produces other buildings.
*extends [PayloadLoader](#payloadloader)*
field | type | default | notes |
— | — | — | — |
offloadSpeed | int | 4 | |
maxPowerUnload | float | 80.0 |
## PayloadVoid
*extends [PayloadBlock](#payloadblock)*
field | type | default | notes |
— | — | — | — |
incinerateEffect | Effect | blastExplosion | |
incinerateSound | Sound | bang |
*extends [ReloadTurret](#reloadturret)*
field | type | default | notes |
— | — | — | — |
timerTarget | int | 1 | |
retargetTime | float | 5.0 | |
baseRegion | TextureRegion | null | |
color | Color | ffffffff | |
beamEffect | Effect | pointBeam | |
hitEffect | Effect | pointHit | |
shootEffect | Effect | sparkShoot | |
shootSound | Sound | lasershoot | |
shootCone | float | 5.0 | |
bulletDamage | float | 10.0 | |
shootLength | float | 3.0 |
## PowerBlock
*extends [Block](#block)*
## PowerDiode
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
arrow | TextureRegion | null |
*extends [PowerBlock](#powerblock)*
## PowerNode
*extends [PowerBlock](#powerblock)*
field | type | default | notes |
— | — | — | — |
laser | TextureRegion | null | |
laserEnd | TextureRegion | null | |
laserRange | float | 6.0 | |
maxNodes | int | 3 | |
autolink | boolean | true | |
drawRange | boolean | true | |
laserScale | float | 0.25 | |
laserColor1 | Color | ffffffff | |
laserColor2 | Color | fbd367ff |
## PowerSource
*extends [PowerNode](#powernode)*
field | type | default | notes |
— | — | — | — |
powerProduction | float | 10000.0 |
## ReloadTurret
*extends [BaseTurret](#baseturret)*
field | type | default | notes |
— | — | — | — |
reload | float | 10.0 |
## PowerTurret
*extends [Turret](#turret)*
field | type | default | notes |
— | — | — | — |
shootType | BulletType | null |
## PowerVoid
*extends [PowerBlock](#powerblock)*
## Prop
*extends [Block](#block)*
## Pump
*extends [LiquidBlock](#liquidblock)*
field | type | default | notes |
— | — | — | — |
pumpAmount | float | 0.2 | Pump amount per tile. |
consumeTime | float | 300.0 | Interval in-between item consumptions, if applicable. |
drawer | DrawBlock | new DrawMulti(new DrawDefault(), new DrawPumpLiquid()) |
## Radar
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
discoveryTime | float | 600.0 | |
rotateSpeed | float | 2.0 | |
baseRegion | TextureRegion | null | |
glowRegion | TextureRegion | null | |
glowColor | Color | ab3400ff | |
glowScl | float | 5.0 | |
glowMag | float | 0.6 |
## Reconstructor
*extends [UnitBlock](#unitblock)*
field | type | default | notes |
— | — | — | — |
constructTime | float | 120.0 | |
upgrades | Seq<UnitType[]> | new Seq<>() | |
capacities | int[] | [] |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
range | int | 14 | |
healPercent | float | 0.2 | |
optionalMultiplier | float | 2.0 | |
optionalUseTime | float | 480.0 | |
drawer | DrawBlock | new DrawDefault() | |
effectChance | float | 0.003 | |
baseColor | Color | ffd37fff | |
effect | Effect | regenParticle |
## RepairTower
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
range | float | 80.0 | |
circleColor | Color | 98ffa9ff | |
glowColor | Color | 98ffa97f | |
circleSpeed | float | 120.0 | |
circleStroke | float | 3.0 | |
squareRad | float | 3.0 | |
squareSpinScl | float | 0.8 | |
glowMag | float | 0.5 | |
glowScl | float | 8.0 | |
healAmount | float | 1.0 | |
glow | TextureRegion | null |
## RepairTurret
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
timerTarget | int | 1 | |
timerEffect | int | 2 | |
repairRadius | float | 50.0 | |
repairSpeed | float | 0.3 | |
powerUse | float | 0.0 | |
length | float | 5.0 | |
beamWidth | float | 1.0 | |
pulseRadius | float | 6.0 | |
pulseStroke | float | 2.0 | |
acceptCoolant | boolean | false | |
coolantUse | float | 0.5 | |
coolEffect | Effect | fuelburn | Effect displayed when coolant is used. |
coolantMultiplier | float | 1.0 | How much healing is increased by with heat capacity. |
baseRegion | TextureRegion | null | |
laser | TextureRegion | null | |
laserEnd | TextureRegion | null | |
laserTop | TextureRegion | null | |
laserTopEnd | TextureRegion | null | |
laserColor | Color | 98ffa9ff | |
laserTopColor | Color | ffffffff |
## Router
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
speed | float | 8.0 |
## SeaBush
*extends [Prop](#prop)*
field | type | default | notes |
— | — | — | — |
botRegion | TextureRegion | null | |
centerRegion | TextureRegion | null | |
lobesMin | int | 7 | |
lobesMax | int | 7 | |
botAngle | float | 60.0 | |
origin | float | 0.1 | |
sclMin | float | 30.0 | |
sclMax | float | 50.0 | |
magMin | float | 5.0 | |
magMax | float | 15.0 | |
timeRange | float | 40.0 | |
spread | float | 0.0 |
## Seaweed
*extends [Prop](#prop)*
## Separator
*extends [Block](#block)*
Extracts a random list of items from an input item and an input liquid.
field | type | default | notes |
— | — | — | — |
results | ItemStack[] | null | |
craftTime | float | 0.0 | |
liquidRegion | TextureRegion | null | |
spinnerRegion | TextureRegion | null | |
spinnerSpeed | float | 3.0 |
*extends [Floor](#floor)*
Do not use in mods. This class provides no new functionality, and is only used for the Mindustry sprite generator. Use the standard Floor class instead.
field | type | default | notes |
— | — | — | — |
liquidBase | Floor | null | |
floorBase | Floor | null | |
liquidOpacity | float | 0.35 |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
toDestroy | Block[] | [] | |
effect | Effect | shockwave | |
breakEffect | Effect | reactorExplosion | |
selfKillEffect | Effect | massiveExplosion |
## ShockMine
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
timerDamage | int | 1 | |
cooldown | float | 80.0 | |
tileDamage | float | 5.0 | |
damage | float | 13.0 | |
length | int | 10 | |
tendrils | int | 6 | |
lightningColor | Color | a9d8ffff | |
shots | int | 6 | |
inaccuracy | float | 0.0 | |
bullet | BulletType | null | |
teamAlpha | float | 0.3 | |
teamRegion | TextureRegion | null |
*extends [BlockProducer](#blockproducer)*
field | type | default | notes |
— | — | — | — |
result | Block | router |
*extends [PowerGenerator](#powergenerator)*
## SolidPump
*extends [Pump](#pump)*
Pump that makes liquid from solids and takes in power. Only works on solid floor blocks.
field | type | default | notes |
— | — | — | — |
result | Liquid | water | |
updateEffect | Effect | none | |
updateEffectChance | float | 0.02 | |
rotateSpeed | float | 1.0 | |
baseEfficiency | float | 1.0 | |
attribute | Attribute | null | Attribute that is checked when calculating output. |
rotatorRegion | TextureRegion | null |
## Sorter
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
invert | boolean | false |
## SpawnBlock
*extends [OverlayFloor](#overlayfloor)*
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
regions | TextureRegion[] | null | |
edgeRegion | TextureRegion | null | |
stackRegion | TextureRegion | null | |
glowRegion | TextureRegion | null | requires power to work properly |
glowAlpha | float | 1.0 | |
glowColor | Color | feb380ff | |
baseEfficiency | float | 0.0 | |
speed | float | 0.0 | |
outputRouter | boolean | true | |
recharge | float | 2.0 | (minimum) amount of loading docks needed to fill a line. |
loadEffect | Effect | conveyorPoof | |
unloadEffect | Effect | conveyorPoof |
## StackRouter
*extends [DuctRouter](#ductrouter)*
field | type | default | notes |
— | — | — | — |
baseEfficiency | float | 0.0 | |
glowRegion | TextureRegion | null | |
glowAlpha | float | 1.0 | |
glowColor | Color | feb380ff |
## StaticWall
*extends [Prop](#prop)*
field | type | default | notes |
— | — | — | — |
large | TextureRegion | null | |
split | TextureRegion[][] | null |
## StaticTree
*extends [StaticWall](#staticwall)*
## SteamVent
*extends [Floor](#floor)*
field | type | default | notes |
— | — | — | — |
parent | Block | air | |
effect | Effect | ventSteam | |
effectColor | Color | 6b4e4eff | |
effectSpacing | float | 15.0 |
## StorageBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
coreMerge | boolean | true |
## SwitchBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
onRegion | TextureRegion | null |
## TallBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
shadowOffset | float | -3.0 | |
layer | float | 71.0 | |
rotationRand | float | 20.0 | |
shadowAlpha | float | 0.6 |
*extends [PowerGenerator](#powergenerator)*
field | type | default | notes |
— | — | — | — |
generateEffect | Effect | none | |
effectChance | float | 0.05 | |
minEfficiency | float | 0.0 | |
spinSpeed | float | 1.0 | |
displayEfficiencyScale | float | 1.0 | |
spinners | boolean | false | |
displayEfficiency | boolean | true | |
outputLiquid | LiquidStack | null | |
attribute | Attribute | heat | |
rotatorRegion | TextureRegion | null | |
blurRegion | TextureRegion | null |
## Thruster
*extends [Wall](#wall)*
field | type | default | notes |
— | — | — | — |
topRegion | TextureRegion | null |
*extends [BaseTurret](#baseturret)*
field | type | default | notes |
— | — | — | — |
timerTarget | int | 1 | |
retargetTime | float | 5.0 | |
shootCone | float | 6.0 | |
shootLength | float | 5.0 | |
laserWidth | float | 0.6 | |
force | float | 0.3 | |
scaledForce | float | 0.0 | |
damage | float | 0.0 | |
targetAir | boolean | true | |
targetGround | boolean | false | |
laserColor | Color | ffffffff | |
status | StatusEffect | none | |
statusDuration | float | 300.0 | |
shootSound | Sound | tractorbeam | |
shootSoundVolume | float | 0.9 | |
baseRegion | TextureRegion | null | |
laser | TextureRegion | null | |
laserStart | TextureRegion | null | |
laserEnd | TextureRegion | null |
## TreeBlock
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
shadow | TextureRegion | null | |
shadowOffset | float | -4.0 |
## Turret
*extends [ReloadTurret](#reloadturret)*
field | type | default | notes |
— | — | — | — |
timerTarget | int | 1 | |
targetInterval | float | 20.0 | Ticks between attempt at finding a target. |
maxAmmo | int | 30 | Maximum ammo units stored. |
ammoPerShot | int | 1 | Ammo units used per shot. |
consumeAmmoOnce | boolean | false | If true, ammo is only consumed once per shot regardless of bullet count. |
heatRequirement | float | -1.0 | Minimum input heat required to fire. |
maxHeatEfficiency | float | 3.0 | Maximum efficiency possible, if this turret uses heat. |
inaccuracy | float | 0.0 | Bullet angle randomness in degrees. |
velocityRnd | float | 0.0 | Fraction of bullet velocity that is random. |
shootCone | float | 8.0 | Maximum angle difference in degrees at which turret will still try to shoot. |
shootX | float | 0.0 | Turret shoot point. |
shootY | float | -Infinity | Turret shoot point. |
minRange | float | 0.0 | Minimum bullet range. Used for artillery only. |
minWarmup | float | 0.0 | Minimum warmup needed to fire. |
accurateDelay | boolean | true | If true, this turret will accurately target moving targets with respect to charge time. |
moveWhileCharging | boolean | true | If false, this turret can't move while charging. |
shoot | ShootPattern | new ShootPattern() | pattern used for bullets |
targetAir | boolean | true | If true, this block targets air units. |
targetGround | boolean | true | If true, this block targets ground units and structures. |
targetHealing | boolean | false | If true, this block targets friend blocks, to heal them. |
playerControllable | boolean | true | If true, this turret can be controlled by players. |
displayAmmoMultiplier | boolean | true | If true, this block will display ammo multipliers in its stats (irrelevant for certain types of turrets). |
unitSort | Sortf | closest | Function for choosing which unit to target. |
unitFilter | Boolf<Unit> | {code} | Filter for types of units to attack. |
buildingFilter | Boolf<Building> | underBullets | Filter for types of buildings to attack. |
heatColor | Color | ab3400ff | Color of heat region drawn on top (if found) |
shootEffect | Effect | null | Optional override for all shoot effects. |
smokeEffect | Effect | null | Optional override for all smoke effects. |
ammoUseEffect | Effect | none | Effect created when ammo is used. Not optional. |
shootSound | Sound | shoot | Sound emitted when a single bullet is shot. |
chargeSound | Sound | none | Sound emitted when shoot.firstShotDelay is >0 and shooting begins. |
soundPitchMin | float | 0.9 | Range for pitch of shoot sound. |
soundPitchMax | float | 1.1 | Range for pitch of shoot sound. |
ammoEjectBack | float | 1.0 | Backwards Y offset of ammo eject effect. |
shootWarmupSpeed | float | 0.1 | Lerp speed of turret warmup. |
linearWarmup | boolean | false | If true, turret warmup is linear instead of a curve. |
recoil | float | 1.0 | Visual amount by which the turret recoils back per shot. |
recoilTime | float | -1.0 | ticks taken for turret to return to starting position in ticks. uses reload time by default |
recoilPow | float | 1.8 | power curve applied to visual recoil |
cooldownTime | float | 20.0 | ticks to cool down the heat region |
elevation | float | -1.0 | Visual elevation of turret shadow, -1 to use defaults. |
shake | float | 0.0 | How much the screen shakes per shot. |
drawer | DrawBlock | new DrawTurret() | Defines drawing behavior for this turret. |
*extends [PayloadBlock](#payloadblock)*
field | type | default | notes |
— | — | — | — |
sideRegion1 | TextureRegion | null | |
sideRegion2 | TextureRegion | null | |
areaSize | int | 11 | |
droneType | UnitType | assemblyDrone | |
dronesCreated | int | 4 | |
droneConstructTime | float | 240.0 | |
plans | Seq<AssemblerUnitPlan> | new Seq<>(4) |
*extends [PayloadBlock](#payloadblock)*
field | type | default | notes |
— | — | — | — |
sideRegion1 | TextureRegion | null | |
sideRegion2 | TextureRegion | null | |
tier | int | 1 |
## UnitBlock
*extends [PayloadBlock](#payloadblock)*
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
unitType | UnitType | manifold | |
buildTime | float | 480.0 | |
polyStroke | float | 1.8 | |
polyRadius | float | 8.0 | |
polySides | int | 6 | |
polyRotateSpeed | float | 1.0 | |
polyColor | Color | ffd37fff |
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
staleTimeDuration | float | 360.0 | If a block is full for this amount of time, it will not be flown to anymore. |
topRegion | TextureRegion | null |
## UnitFactory
*extends [UnitBlock](#unitblock)*
field | type | default | notes |
— | — | — | — |
capacities | int[] | [] | |
plans | Seq<UnitPlan> | new Seq<>(4) |
## Unloader
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
centerRegion | TextureRegion | null | |
speed | float | 1.0 |
## Wall
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
lightningChance | float | -1.0 | Lighting chance. -1 to disable |
lightningDamage | float | 20.0 | |
lightningLength | int | 17 | |
lightningColor | Color | f3e979ff | |
lightningSound | Sound | spark | |
chanceDeflect | float | -1.0 | Bullet deflection chance. -1 to disable |
flashHit | boolean | false | |
flashColor | Color | ffffffff | |
deflectSound | Sound | none |
## WallCrafter
*extends [Block](#block)*
field | type | default | notes |
— | — | — | — |
topRegion | TextureRegion | null | |
rotatorBottomRegion | TextureRegion | null | |
rotatorRegion | TextureRegion | null | |
drillTime | float | 150.0 | Time to produce one item at 100% efficiency. |
updateEffect | Effect | mineWallSmall | Effect randomly played while drilling. |
updateEffectChance | float | 0.02 | |
rotateSpeed | float | 2.0 | |
attribute | Attribute | sand | Attribute to check for wall output. |
output | Item | sand |
## WobbleProp
*extends [Prop](#prop)*
field | type | default | notes |
— | — | — | — |
wscl | float | 25.0 | |
wmag | float | 0.4 | |
wtscl | float | 1.0 | |
wmag2 | float | 1.0 |
# Bullet Built-in constants:
`placeholder` `spaceLiquid` `damageLightning` `damageLightningGround` `fireball`
## BulletType
*extends [Content](#content)*
field | type | default | notes |
— | — | — | — |
lifetime | float | 40.0 | Lifetime in ticks. |
speed | float | 1.0 | Speed in units/tick. |
damage | float | 1.0 | Direct damage dealt on hit. |
hitSize | float | 4.0 | Hitbox size. |
drawSize | float | 40.0 | Clipping hitbox. |
drag | float | 0.0 | Drag as fraction of velocity. |
pierce | boolean | false | Whether to pierce units. |
pierceBuilding | boolean | false | Whether to pierce buildings. |
pierceCap | int | -1 | Maximum # of pierced objects. |
removeAfterPierce | boolean | true | If false, this bullet isn't removed after pierceCap is exceeded. Expert usage only. |
laserAbsorb | boolean | true | For piercing lasers, setting this to true makes it get absorbed by plastanium walls. |
optimalLifeFract | float | 0.0 | Life fraction at which this bullet has the best range/damage/etc. Used for lasers and continuous turrets. |
layer | float | 100.0 | Z layer to drawn on. |
hitEffect | Effect | hitBulletSmall | Effect shown on direct hit. |
despawnEffect | Effect | hitBulletSmall | Effect shown when bullet despawns. |
shootEffect | Effect | shootSmall | Effect created when shooting. |
chargeEffect | Effect | none | Effect created when charging starts; only usable in single-shot weapons with a firstShotDelay / shotDelay. |
smokeEffect | Effect | shootSmallSmoke | Extra smoke effect created when shooting. |
hitSound | Sound | none | Sound made when hitting something or getting removed. |
despawnSound | Sound | none | Sound made when hitting something or getting removed. |
hitSoundPitch | float | 1.0 | Pitch of the sound made when hitting something |
hitSoundVolume | float | 1.0 | Volume of the sound made when hitting something |
inaccuracy | float | 0.0 | Extra inaccuracy when firing. |
ammoMultiplier | float | 2.0 | How many bullets get created per ammo item/liquid. |
reloadMultiplier | float | 1.0 | Multiplied by turret reload speed to get final shoot speed. |
buildingDamageMultiplier | float | 1.0 | Multiplier of how much base damage is done to tiles. |
recoil | float | 0.0 | Recoil from shooter entities. |
killShooter | boolean | false | Whether to kill the shooter when this is shot. For suicide bombers. |
instantDisappear | boolean | false | Whether to instantly make the bullet disappear. |
splashDamage | float | 0.0 | Damage dealt in splash. 0 to disable. |
scaledSplashDamage | boolean | false | If true, splash damage is “correctly” affected by unit hitbox size. Used for projectiles that do not collide / have splash as their main source of damage. |
knockback | float | 0.0 | Knockback in velocity. |
impact | boolean | false | Should knockback follow the bullet's direction |
status | StatusEffect | none | Status effect applied on hit. |
statusDuration | float | 480.0 | Intensity of applied status effect in terms of duration. |
collidesTiles | boolean | true | Whether this bullet type collides with tiles. |
collidesTeam | boolean | false | Whether this bullet type collides with tiles that are of the same team. |
collidesAir | boolean | true | Whether this bullet type collides with air/ground units. |
collidesGround | boolean | true | Whether this bullet type collides with air/ground units. |
collides | boolean | true | Whether this bullet types collides with anything at all. |
collideFloor | boolean | false | If true, this projectile collides with non-surface floors. |
collideTerrain | boolean | false | If true, this projectile collides with static walls |
keepVelocity | boolean | true | Whether velocity is inherited from the shooter. |
scaleLife | boolean | false | Whether to scale lifetime (not actually velocity!) to disappear at the target position. Used for artillery. |
hittable | boolean | true | Whether this bullet can be hit by point defense. |
reflectable | boolean | true | Whether this bullet can be reflected. |
absorbable | boolean | true | Whether this projectile can be absorbed by shields. |
backMove | boolean | true | Whether to move the bullet back depending on delta to fix some delta-time related issues. Do not change unless you know what you're doing. |
maxRange | float | -1.0 | Bullet range positive override. |
rangeOverride | float | -1.0 | When > 0, overrides range even if smaller than base range. |
rangeChange | float | 0.0 | When used in a turret with multiple ammo types, this can be set to a non-zero value to influence range. |
range | float | 0.0 | Range initialized in init(). |
healPercent | float | 0.0 | % of block health healed * |
healAmount | float | 0.0 | flat amount of block health healed |
makeFire | boolean | false | Whether to make fire on impact |
despawnHit | boolean | false | Whether to create hit effects on despawn. Forced to true if this bullet has any special effects like splash damage. |
fragOnHit | boolean | true | If true, this bullet will create bullets when it hits anything, not just when it despawns. |
pierceArmor | boolean | false | If true, unit armor is ignored in damage calculations. Ignored for building armor. |
setDefaults | boolean | true | Whether status and despawnHit should automatically be set. |
hitShake | float | 0.0 | Amount of shaking produced when this bullet hits something or despawns. |
despawnShake | float | 0.0 | Amount of shaking produced when this bullet hits something or despawns. |
fragBullet | BulletType | null | Bullet type that is created when this bullet expires. |
fragRandomSpread | float | 360.0 | Degree spread range of fragmentation bullets. |
fragSpread | float | 0.0 | Uniform spread between each frag bullet in degrees. |
fragAngle | float | 0.0 | Angle offset of fragmentation bullets. |
fragBullets | int | 9 | Number of fragmentation bullets created. |
fragVelocityMin | float | 0.2 | Random range of frag velocity as a multiplier. |
fragVelocityMax | float | 1.0 | Random range of frag velocity as a multiplier. |
fragLifeMin | float | 1.0 | Random range of frag lifetime as a multiplier. |
fragLifeMax | float | 1.0 | Random range of frag lifetime as a multiplier. |
intervalBullet | BulletType | null | Bullet that is created at a fixed interval. |
bulletInterval | float | 20.0 | Interval, in ticks, between which bullet spawn. |
intervalBullets | int | 1 | Number of bullet spawned per interval. |
hitColor | Color | ffffffff | Color used for hit/despawn effects. |
healColor | Color | 98ffa9ff | Color used for block heal effects. |
healEffect | Effect | healBlockFull | Effect emitted upon blocks that are healed. |
spawnBullets | Seq<BulletType> | new Seq<>() | Bullets spawned when this bullet is created. Rarely necessary, used for visuals. |
spawnUnit | UnitType | null | Unit spawned _instead of_ this bullet. Useful for missiles. |
trailColor | Color | e58956ff | Color of trail behind bullet. |
trailChance | float | -1.0E-4 | Chance of trail effect spawning on bullet per tick. |
trailInterval | float | 0.0 | Uniform interval in which trail effect is spawned. |
trailEffect | Effect | missileTrail | Trail effect that is spawned. |
trailParam | float | 2.0 | Rotation/size parameter that is passed to trail. Usually, this controls size. |
trailRotation | boolean | false | Whether the parameter passed to the trail is the bullet rotation, instead of a flat value. |
trailInterp | Interp | one | Interpolation for trail width as function of bullet lifetime |
trailLength | int | -1 | Length of trail quads. Any value ⇐ 0 disables the trail. |
trailWidth | float | 2.0 | Width of trail, if trailLength > 0 |
trailSinMag | float | 0.0 | If trailSinMag > 0, these values are applied as a sine curve to trail width. |
trailSinScl | float | 3.0 | If trailSinMag > 0, these values are applied as a sine curve to trail width. |
splashDamageRadius | float | -1.0 | Use a negative value to disable splash damage. |
incendAmount | int | 0 | Amount of fires attempted around bullet. |
incendSpread | float | 8.0 | Spread of fires around bullet. |
incendChance | float | 1.0 | Chance of fire being created. |
homingPower | float | 0.0 | Power of bullet ability. Usually a number between 0 and 1; try 0.1 as a starting point. |
homingRange | float | 50.0 | Range of homing effect around bullet. |
homingDelay | float | -1.0 | Use a negative value to disable homing delay. |
suppressionRange | float | -1.0 | Range of healing block suppression effect. |
suppressionDuration | float | 480.0 | Duration of healing block suppression effect. |
suppressionEffectChance | float | 50.0 | Chance of suppression effect occurring on block, scaled down by number of blocks. |
lightningColor | Color | f3e979ff | Color of lightning created by bullet. |
lightning | int | 0 | Number of separate lightning “roots”. |
lightningLength | int | 5 | Length of each lightning strand. |
lightningLengthRand | int | 0 | Extra random length added onto base length of lightning. |
lightningDamage | float | -1.0 | Use a negative value to use default bullet damage. |
lightningCone | float | 360.0 | Spread of lightning, relative to bullet rotation. |
lightningAngle | float | 0.0 | Offset of lightning relative to bullet rotation. |
lightningType | BulletType | null | The bullet created at lightning points. |
weaveScale | float | 1.0 | Scale of bullet weave pattern. Higher → less vibration. |
weaveMag | float | 0.0 | Intensity of bullet weaving. Note that this may make bullets inaccurate. |
weaveRandom | boolean | true | If true, the bullet weave will randomly switch directions on spawn. |
puddles | int | 0 | Number of individual puddles created. |
puddleRange | float | 0.0 | Range of puddles around bullet position. |
puddleAmount | float | 5.0 | Liquid count of each puddle created. |
puddleLiquid | Liquid | water | Liquid that puddles created are made of. |
displayAmmoMultiplier | boolean | true | Whether to display the ammo multiplayer for this bullet type in its stats. |
lightRadius | float | -1.0 | Radius of light emitted by this bullet; <0 to use defaults. |
lightOpacity | float | 0.3 | Opacity of light color. |
lightColor | Color | fbd367ff | Color of light emitted by this bullet. |
*extends [BulletType](#bullettype)*
An extended BulletType for most ammo-based bullets shot from turrets and units.
field | type | default | notes |
— | — | — | — |
backColor | Color | f9c27aff | |
frontColor | Color | fff8e8ff | |
mixColorFrom | Color | ffffff00 | |
mixColorTo | Color | ffffff00 | |
width | float | 5.0 | |
height | float | 7.0 | |
shrinkX | float | 0.0 | |
shrinkY | float | 0.5 | |
spin | float | 0.0 | |
rotationOffset | float | 0.0 | |
sprite | String | bullet | |
backSprite | String | null | |
backRegion | TextureRegion | null | |
frontRegion | TextureRegion | null |
*extends [BasicBulletType](#basicbullettype)*
field | type | default | notes |
— | — | — | — |
trailMult | float | 1.0 | |
trailSize | float | 4.0 |
*extends [BasicBulletType](#basicbullettype)*
*extends [BulletType](#bullettype)*
Basic continuous bullet type that does not draw itself. Essentially abstract.
field | type | default | notes |
— | — | — | — |
length | float | 220.0 | |
shake | float | 0.0 | |
damageInterval | float | 5.0 | |
largeHit | boolean | false | |
continuous | boolean | true |
*extends [ContinuousBulletType](#continuousbullettype)*
field | type | default | notes |
— | — | — | — |
lightStroke | float | 40.0 | |
width | float | 3.7 | |
oscScl | float | 1.2 | |
oscMag | float | 0.02 | |
divisions | int | 25 | |
drawFlare | boolean | true | |
flareColor | Color | e189f5ff | |
flareWidth | float | 3.0 | |
flareInnerScl | float | 0.5 | |
flareLength | float | 40.0 | |
flareInnerLenScl | float | 0.5 | |
flareLayer | float | 99.9999 | |
flareRotSpeed | float | 1.2 | |
rotateFlare | boolean | false | |
lengthInterp | Interp | slope | |
lengthWidthPans | float[] | [1.12, 1.3, 0.32, 1.0, 1.0, 0.3, 0.8, 0.9, 0.2, 0.5, 0.8, 0.15, 0.25, 0.7, 0.1] | Lengths, widths, ellipse panning, and offsets, all as fractions of the base width and length. Stored as an 'interleaved' array of values: LWPO1 LWPO2 LWPO3… |
colors | Color[] | [eb7abe8c, e189f5b2, 907ef7cc, 91a4ffff, ffffffff] |
*extends [ContinuousBulletType](#continuousbullettype)*
field | type | default | notes |
— | — | — | — |
fadeTime | float | 16.0 | |
lightStroke | float | 40.0 | |
divisions | int | 13 | |
colors | Color[] | [ec745855, ec7458aa, ff9c5aff, ffffffff] | |
strokeFrom | float | 2.0 | |
strokeTo | float | 0.5 | |
pointyScaling | float | 0.75 | |
backLength | float | 7.0 | |
frontLength | float | 35.0 | |
width | float | 9.0 | |
oscScl | float | 0.8 | |
oscMag | float | 1.5 |
*extends [BasicBulletType](#basicbullettype)*
field | type | default | notes |
— | — | — | — |
radius | float | 100.0 | |
timeIncrease | float | 2.5 | |
timeDuration | float | 600.0 | |
powerDamageScl | float | 2.0 | |
powerSclDecrease | float | 0.2 | |
hitPowerEffect | Effect | hitEmpSpark | |
chainEffect | Effect | chainEmp | |
applyEffect | Effect | heal | |
hitUnits | boolean | true | |
unitDamageScl | float | 0.7 |
*extends [BulletType](#bullettype)*
*extends [BulletType](#bullettype)*
field | type | default | notes |
— | — | — | — |
colorFrom | Color | ffdd55ff | |
colorMid | Color | db401cff | |
colorTo | Color | 7f7f7fff | |
radius | float | 3.0 | |
velMin | float | 0.6 | |
velMax | float | 2.6 | |
fireTrailChance | float | 0.04 | |
trailEffect2 | Effect | ballfire | |
fireEffectChance | float | 0.1 | |
fireEffectChance2 | float | 0.1 |
*extends [BasicBulletType](#basicbullettype)*
field | type | default | notes |
— | — | — | — |
explodeRange | float | 30.0 | |
explodeDelay | float | 5.0 |
*extends [BasicBulletType](#basicbullettype)*
field | type | default | notes |
— | — | — | — |
width | float | 2.0 | |
height | float | 7.0 |
*extends [BulletType](#bullettype)*
field | type | default | notes |
— | — | — | — |
colors | Color[] | [a9d8ff66, a9d8ffff, ffffffff] | |
laserEffect | Effect | lancerLaserShootSmoke | |
length | float | 160.0 | |
width | float | 15.0 | |
lengthFalloff | float | 0.5 | |
sideLength | float | 29.0 | |
sideWidth | float | 0.7 | |
sideAngle | float | 90.0 | |
lightningSpacing | float | -1.0 | |
lightningDelay | float | 0.1 | |
lightningAngleRand | float | 0.0 | |
largeHit | boolean | false |
*extends [BulletType](#bullettype)*
field | type | default | notes |
— | — | — | — |
lightningColor | Color | a9d8ffff | |
lightningLength | int | 25 | |
lightningLengthRand | int | 0 |
*extends [BulletType](#bullettype)*
field | type | default | notes |
— | — | — | — |
liquid | Liquid | null | |
puddleSize | float | 6.0 | |
orbSize | float | 3.0 | |
boilTime | float | 5.0 |
*extends [BulletType](#bullettype)*
*extends [BasicBulletType](#basicbullettype)*
*extends [BulletType](#bullettype)*
field | type | default | notes |
— | — | — | — |
trailSpacing | float | 10.0 |
*extends [BulletType](#bullettype)*
field | type | default | notes |
— | — | — | — |
pierceEffect | Effect | hitBulletSmall | |
pointEffect | Effect | none | |
lineEffect | Effect | none | |
endEffect | Effect | none | |
pierceDamageFactor | float | 1.0 | Multiplier of damage decreased per health pierced. |
length | float | 100.0 | |
pointEffectSpace | float | 20.0 |
*extends [BulletType](#bullettype)*
field | type | default | notes |
— | — | — | — |
length | float | 100.0 | |
sapStrength | float | 0.5 | |
color | Color | ffffffff | |
width | float | 0.4 |
*extends [BulletType](#bullettype)*
field | type | default | notes |
— | — | — | — |
length | float | 100.0 | |
width | float | 20.0 | |
fromColor | Color | ffffffff | |
toColor | Color | a9d8ffff | |
hitLarge | boolean | false | |
serrations | int | 7 | |
serrationLenScl | float | 10.0 | |
serrationWidth | float | 4.0 | |
serrationSpacing | float | 8.0 | |
serrationSpaceOffset | float | 80.0 | |
serrationFadeOffset | float | 0.5 |
*extends [BulletType](#bullettype)*
field | type | default | notes |
— | — | — | — |
orbSize | float | 5.5 |
# Effect Built-in constants:
`rand` `v` `none` `blockCrash` `trailFade` `unitSpawn` `unitCapKill` `unitEnvKill` `unitControl` `unitDespawn` `unitSpirit` `itemTransfer` `pointBeam` `pointHit` `lightning` `coreBuildShockwave` `coreBuildBlock` `moveCommand` `attackCommand` `commandSend` `upgradeCore` `upgradeCoreBloom` `placeBlock` `coreLaunchConstruct` `tapBlock` `breakBlock` `payloadDeposit` `select` `smoke` `fallSmoke` `unitWreck` `rocketSmoke` `rocketSmokeLarge` `magmasmoke` `spawn` `unitAssemble` `padlaunch` `breakProp` `unitDrop` `unitLand` `unitDust` `unitLandSmall` `unitPickup` `crawlDust` `landShock` `pickup` `titanExplosion` `titanSmoke` `dynamicSpikes` `greenBomb` `greenLaserCharge` `greenLaserChargeSmall` `greenCloud` `healWaveDynamic` `healWave` `heal` `shieldWave` `shieldApply` `disperseTrail` `hitBulletSmall` `hitBulletColor` `hitSquaresColor` `hitFuse` `hitBulletBig` `hitFlameSmall` `hitFlamePlasma` `hitLiquid` `hitLaserBlast` `hitEmpSpark` `hitLancer` `hitBeam` `hitFlameBeam` `hitMeltdown` `hitMeltHeal` `instBomb` `instTrail` `instShoot` `instHit` `hitLaser` `hitLaserColor` `despawn` `airBubble` `flakExplosion` `plasticExplosion` `plasticExplosionFlak` `blastExplosion` `sapExplosion` `massiveExplosion` `artilleryTrail` `incendTrail` `missileTrail` `missileTrailShort` `absorb` `forceShrink` `flakExplosionBig` `burning` `fireRemove` `fire` `fireHit` `fireSmoke` `neoplasmHeal` `steam` `ventSteam` `drillSteam` `vapor` `vaporSmall` `fireballsmoke` `ballfire` `freezing` `melting` `wet` `muddy` `sapped` `electrified` `sporeSlowed` `oily` `overdriven` `overclocked` `dropItem` `shockwave` `bigShockwave` `spawnShockwave` `explosion` `dynamicExplosion` `reactorExplosion` `impactReactorExplosion` `blockExplosionSmoke` `shootSmall` `shootSmallColor` `shootHeal` `shootHealYellow` `shootSmallSmoke` `shootBig` `shootBig2` `shootBigColor` `shootTitan` `shootBigSmoke` `shootBigSmoke2` `shootSmokeDisperse` `shootSmokeSquare` `shootSmokeSquareSparse` `shootSmokeSquareBig` `shootSmokeTitan` `regenParticle` `regenSuppressParticle` `regenSuppressSeek` `surgeCruciSmoke` `heatReactorSmoke` `circleColorSpark` `colorSpark` `colorSparkBig` `randLifeSpark` `shootPayloadDriver` `shootSmallFlame` `shootPyraFlame` `shootLiquid` `casing1` `casing2` `casing3` `casing4` `casing2Double` `casing3Double` `railShoot` `railTrail` `railHit` `lancerLaserShoot` `lancerLaserShootSmoke` `lancerLaserCharge` `lancerLaserChargeBegin` `lightningCharge` `sparkShoot` `lightningShoot` `thoriumShoot` `reactorsmoke` `redgeneratespark` `turbinegenerate` `generatespark` `fuelburn` `incinerateSlag` `coreBurn` `plasticburn` `conveyorPoof` `pulverize` `pulverizeRed` `pulverizeSmall` `pulverizeMedium` `producesmoke` `smokeCloud` `smeltsmoke` `coalSmeltsmoke` `formsmoke` `blastsmoke` `lava` `dooropen` `doorclose` `dooropenlarge` `doorcloselarge` `generate` `mineWallSmall` `mineSmall` `mine` `mineBig` `mineHuge` `mineImpact` `mineImpactWave` `payloadReceive` `teleportActivate` `teleport` `teleportOut` `ripple` `bubble` `launch` `launchPod` `healWaveMend` `overdriveWave` `healBlock` `healBlockFull` `rotateBlock` `lightBlock` `overdriveBlockFull` `shieldBreak` `coreLandDust` `unitShieldBreak` `chainLightning` `chainEmp` `legDestroy`
## Effect
*extends [Object](#object)*
field | type | default | notes |
— | — | — | — |
id | int | 345 | |
renderer | Cons<EffectContainer> | {code} | |
lifetime | float | 50.0 | |
clip | float | 0.0 | Clip size. |
startDelay | float | 0.0 | Time delay before the effect starts |
baseRotation | float | 0.0 | Amount added to rotation |
followParent | boolean | true | If true, parent unit is data are followed. |
rotWithParent | boolean | false | If this and followParent are true, the effect will offset and rotate with the parent's rotation. |
layer | float | 110.0 | |
layerDuration | float | 0.0 |
*extends [Effect](#effect)*
field | type | default | notes |
— | — | — | — |
waveColor | Color | ffd2aeff | |
smokeColor | Color | 7f7f7fff | |
sparkColor | Color | e58956ff | |
waveLife | float | 6.0 | |
waveStroke | float | 3.0 | |
waveRad | float | 15.0 | |
waveRadBase | float | 2.0 | |
sparkStroke | float | 1.0 | |
sparkRad | float | 23.0 | |
sparkLen | float | 3.0 | |
smokeSize | float | 4.0 | |
smokeSizeBase | float | 0.5 | |
smokeRad | float | 23.0 | |
smokes | int | 5 | |
sparks | int | 4 |
## MultiEffect
*extends [Effect](#effect)*
Renders multiple particle effects at once.
field | type | default | notes |
— | — | — | — |
effects | Effect[] | [] |
*extends [Effect](#effect)*
The most essential effect class. Can create particles in various shapes.
field | type | default | notes |
— | — | — | — |
colorFrom | Color | ffffffff | |
colorTo | Color | ffffffff | |
particles | int | 6 | |
randLength | boolean | true | |
casingFlip | boolean | false | Gives the effect flipping compatability like casing effects. |
cone | float | 180.0 | |
length | float | 20.0 | |
baseLength | float | 0.0 | |
interp | Interp | linear | Particle size/length/radius interpolation. |
sizeInterp | Interp | null | Particle size interpolation. Null to use interp. |
offsetX | float | 0.0 | |
offsetY | float | 0.0 | |
lightScl | float | 2.0 | |
lightOpacity | float | 0.6 | |
lightColor | Color | null | |
spin | float | 0.0 | Spin in degrees per tick. |
sizeFrom | float | 2.0 | Controls the initial and final sprite sizes. |
sizeTo | float | 0.0 | Controls the initial and final sprite sizes. |
useRotation | boolean | true | Whether the rotation adds with the parent |
offset | float | 0.0 | Rotation offset. |
region | String | “circle” | Sprite to draw. |
line | boolean | false | |
strokeFrom | float | 2.0 | |
strokeTo | float | 0.0 | |
lenFrom | float | 4.0 | |
lenTo | float | 2.0 |
## RadialEffect
*extends [Effect](#effect)*
Renders one particle effect repeatedly at specified angle intervals.
field | type | default | notes |
— | — | — | — |
effect | Effect | none | |
rotationSpacing | float | 90.0 | |
rotationOffset | float | 0.0 | |
lengthOffset | float | 0.0 | |
amount | int | 4 |
## SeqEffect
*extends [Effect](#effect)*
Renders multiple particle effects in sequence. Will not work correctly for effects that modify life dynamically. Z layer of child effects is ignored.
field | type | default | notes |
— | — | — | — |
effects | Effect[] | [] |
## WaveEffect
*extends [Effect](#effect)*
Effect that renders a basic shockwave.
field | type | default | notes |
— | — | — | — |
colorFrom | Color | ffffffff | |
colorTo | Color | ffffffff | |
lightColor | Color | null | |
sizeFrom | float | 0.0 | |
sizeTo | float | 100.0 | |
lightScl | float | 3.0 | |
lightOpacity | float | 0.8 | |
sides | int | -1 | |
rotation | float | 0.0 | |
strokeFrom | float | 2.0 | |
strokeTo | float | 0.0 | |
interp | Interp | linear | |
lightInterp | Interp | reverse | |
offsetX | float | 0.0 | |
offsetY | float | 0.0 |
## WrapEffect
*extends [Effect](#effect)*
Wraps an effect with some parameters.
field | type | default | notes |
— | — | — | — |
effect | Effect | none | |
color | Color | ffffffff | |
rotation | float | NaN |
# Item
*extends [UnlockableContent](#unlockablecontent)*
field | type | default | notes |
— | — | — | — |
color | Color | 000000ff | |
explosiveness | float | 0.0 | how explosive this item is. |
flammability | float | 0.0 | flammability above 0.3 makes this eligible for item burners. |
radioactivity | float | 0.0 | how radioactive this item is. |
charge | float | 0.0 | how electrically potent this item is. |
hardness | int | 0 | drill hardness of the item |
cost | float | 1.0 | base material cost of this item, used for calculating place times 1 cost = 1 tick added to build time |
healthScaling | float | 0.0 | When this item is present in the build cost, a block's <b>default</b> health is multiplied by 1 + scaling, where 'scaling' is summed together for all item requirement types. |
lowPriority | boolean | false | if true, this item is of the lowest priority to drills. |
frames | int | 0 | If >0, this item is animated. |
transitionFrames | int | 0 | Number of generated transition frames between each frame |
frameTime | float | 5.0 | Ticks in-between animation frames. |
buildable | boolean | true | If true, this material is used by buildings. If false, this material will be incinerated in certain cores. |
hidden | boolean | false |
# Liquid
## Liquid
*extends [UnlockableContent](#unlockablecontent)*
A better name for this class would be “fluid”, but it's too late for that.
field | type | default | notes |
— | — | — | — |
gas | boolean | false | If true, this fluid is treated as a gas (and does not create puddles) |
color | Color | 000000ff | Color used in pipes and on the ground. |
gasColor | Color | bfbfbfff | Color of this liquid in gas form. |
barColor | Color | null | Color used in bars. |
lightColor | Color | 00000000 | Color used to draw lights. Note that the alpha channel is used to dictate brightness. |
flammability | float | 0.0 | 0-1, 0 is completely not flammable, anything above that may catch fire when exposed to heat, 0.5+ is very flammable. |
temperature | float | 0.5 | temperature: 0.5 is 'room' temperature, 0 is very cold, 1 is molten hot |
heatCapacity | float | 0.5 | how much heat this liquid can store. 0.4=water (decent), anything lower is probably less dense and bad at cooling. |
viscosity | float | 0.5 | how thick this liquid is. 0.5=water (relatively viscous), 1 would be something like tar (very slow). |
explosiveness | float | 0.0 | how prone to exploding this liquid is, when heated. 0 = nothing, 1 = nuke |
coolant | boolean | true | if false, this liquid cannot be a coolant |
effect | StatusEffect | none | The associated status effect. |
particleEffect | Effect | none | Effect shown in puddles. |
particleSpacing | float | 60.0 | Particle effect rate spacing in ticks. |
boilPoint | float | 2.0 | Temperature at which this liquid vaporizes. This isn't just boiling. |
capPuddles | boolean | true | If true, puddle size is capped. |
vaporEffect | Effect | vapor | Effect when this liquid vaporizes. |
hidden | boolean | false | If true, this liquid is hidden in most UI. |
## CellLiquid
*extends [Liquid](#liquid)*
field | type | default | notes |
— | — | — | — |
colorFrom | Color | ffffffff | |
colorTo | Color | ffffffff | |
cells | int | 8 |
# Status Built-in constants:
`none` `burning` `freezing` `unmoving` `slow` `wet` `muddy` `melting` `sapped` `tarred` `overdrive` `overclock` `shielded` `shocked` `blasted` `corroded` `boss` `sporeSlowed` `disarmed` `electrified` `invincible`
*extends [UnlockableContent](#unlockablecontent)*
field | type | default | notes |
— | — | — | — |
damageMultiplier | float | 1.0 | Damage dealt by the unit with the effect. |
healthMultiplier | float | 1.0 | Unit health multiplier. |
speedMultiplier | float | 1.0 | Unit speed multiplier. |
reloadMultiplier | float | 1.0 | Unit reload multiplier. |
buildSpeedMultiplier | float | 1.0 | Unit build speed multiplier. |
dragMultiplier | float | 1.0 | Unit drag multiplier. |
transitionDamage | float | 0.0 | Damage dealt upon transition to an affinity. |
disarm | boolean | false | Unit weapon(s) disabled. |
damage | float | 0.0 | Damage per frame. |
effectChance | float | 0.15 | Chance of effect appearing. |
parentizeEffect | boolean | false | Should the effect be given a parent |
permanent | boolean | false | If true, the effect never disappears. |
reactive | boolean | false | If true, this effect will only react with other effects and cannot be applied. |
show | boolean | true | Whether to show this effect in the database. |
color | Color | ffffffff | Tint color of effect. |
effect | Effect | none | Effect that happens randomly on top of the affected unit. |
affinities | ObjectSet<StatusEffect> | new ObjectSet<>() | Affinity & opposite values for stat displays. |
opposites | ObjectSet<StatusEffect> | new ObjectSet<>() | Affinity & opposite values for stat displays. |
outline | boolean | true | Set to false to disable outline generation. |
# Unit
## UnitType
*extends [UnlockableContent](#unlockablecontent)*
field | type | default | notes |
— | — | — | — |
envRequired | int | 0 | Environmental flags that are *all* required for this unit to function. 0 = any environment |
envEnabled | int | 1 | The environment flags that this unit can function in. If the env matches any of these, it will be enabled. |
envDisabled | int | 16 | The environment flags that this unit *cannot* function in. If the env matches any of these, it will explode or be disabled. |
speed | float | 1.1 | movement speed (world units/t) |
boostMultiplier | float | 1.0 | movement speed (world units/t) |
rotateSpeed | float | 5.0 | movement speed (world units/t) |
baseRotateSpeed | float | 5.0 | movement speed (world units/t) |
drag | float | 0.3 | movement speed (world units/t) |
accel | float | 0.5 | movement speed (world units/t) |
hitSize | float | 6.0 | movement speed (world units/t) |
stepShake | float | -1.0 | movement speed (world units/t) |
rippleScale | float | 1.0 | movement speed (world units/t) |
riseSpeed | float | 0.08 | movement speed (world units/t) |
fallSpeed | float | 0.018 | movement speed (world units/t) |
health | float | 200.0 | movement speed (world units/t) |
armor | float | 0.0 | movement speed (world units/t) |
range | float | -1.0 | movement speed (world units/t) |
maxRange | float | -1.0 | movement speed (world units/t) |
mineRange | float | 70.0 | movement speed (world units/t) |
buildRange | float | 220.0 | movement speed (world units/t) |
crashDamageMultiplier | float | 1.0 | movement speed (world units/t) |
dpsEstimate | float | -1.0 | movement speed (world units/t) |
clipSize | float | -1.0 | movement speed (world units/t) |
drownTimeMultiplier | float | 1.0 | movement speed (world units/t) |
strafePenalty | float | 0.5 | movement speed (world units/t) |
researchCostMultiplier | float | 50.0 | movement speed (world units/t) |
groundLayer | float | 60.0 | movement speed (world units/t) |
payloadCapacity | float | 8.0 | movement speed (world units/t) |
buildSpeed | float | -1.0 | movement speed (world units/t) |
aimDst | float | -1.0 | movement speed (world units/t) |
buildBeamOffset | float | 3.8 | movement speed (world units/t) |
targetPriority | float | 0.0 | movement speed (world units/t) |
shadowElevation | float | -1.0 | movement speed (world units/t) |
shadowElevationScl | float | 1.0 | movement speed (world units/t) |
engineOffset | float | 5.0 | movement speed (world units/t) |
engineSize | float | 2.5 | movement speed (world units/t) |
engineLayer | float | -1.0 | movement speed (world units/t) |
itemOffsetY | float | 3.0 | movement speed (world units/t) |
lightRadius | float | -1.0 | movement speed (world units/t) |
lightOpacity | float | 0.6 | movement speed (world units/t) |
fogRadius | float | -1.0 | movement speed (world units/t) |
waveTrailX | float | 4.0 | movement speed (world units/t) |
waveTrailY | float | -3.0 | movement speed (world units/t) |
tailScl | float | 1.0 | movement speed (world units/t) |
isEnemy | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
flying | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
targetAir | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
targetGround | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
faceTarget | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
circleTarget | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
canBoost | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
logicControllable | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
playerControllable | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
allowedInPayloads | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
hittable | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
killable | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
targetable | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
vulnerableWithPayloads | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
pickupUnits | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
physics | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
canDrown | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
useUnitCap | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
coreUnitDock | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
createWreck | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
createScorch | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
lowAltitude | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
rotateToBuilding | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
allowLegStep | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
legPhysicsLayer | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
hovering | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
omniMovement | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
rotateMoveFirst | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
healFlash | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
canHeal | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
singleTarget | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
forceMultiTarget | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
canAttack | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
hidden | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
internal | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
naval | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
alwaysCreateOutline | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
squareShape | boolean | false | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
drawBuildBeam | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
drawCell | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
drawItems | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
drawShields | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
drawBody | boolean | true | if true, this unit counts as an enemy in the wave counter (usually false for support-only units) |
aiController | Prov<? extends UnitController> | {code} | The default AI controller to assign on creation. |
controller | Func<Unit,? extends UnitController> | get() : new CommandAI() | Function that chooses AI controller based on unit entity. |
constructor | Prov<? extends Unit> | null | Creates a new instance of this unit class. |
abilities | Seq<Ability> | new Seq<>() | list of “abilities”, which are various behaviors that update each frame |
weapons | Seq<Weapon> | new Seq<>() | All weapons that this unit will shoot with. |
immunities | ObjectSet<StatusEffect> | new ObjectSet<>() | None of the status effects in this set can be applied to this unit. |
healColor | Color | 98ffa9ff | color that this unit flashes when getting healed (if healFlash is true) |
lightColor | Color | fbd367ff | Color of light that this unit produces when lighting is enabled in the map. |
deathSound | Sound | bang | sound played when this unit explodes (*not* when it is shot down) |
fallEffect | Effect | fallSmoke | effect that this unit emits when falling |
fallEngineEffect | Effect | fallSmoke | effect created at engine when unit falls. |
deathExplosionEffect | Effect | dynamicExplosion | effect created when this unit dies |
treadEffect | Effect | null | optional effect created when this tank moves |
parts | Seq<DrawPart> | class) | extra (usually animated) visual parts |
engines | Seq<UnitEngine> | new Seq<>() | list of engines, or “thrusters” |
useEngineElevation | boolean | true | if false, the thruster is always displayed at its normal size regardless of elevation |
engineColor | Color | null | override for all engine colors |
engineColorInner | Color | ffffffff | color for inner portions of engines |
trailLength | int | 0 | length of engine trail (if flying) or wave trail (if naval) |
trailColor | Color | null | override for engine trail color |
pathCost | PathCost | null | Function used for calculating cost of moving with ControlPathfinder. Does not affect “normal” flow field pathfinding. |
sample | Unit | null | A sample of the unit that this type creates. Do not modify! |
targetFlags | BlockFlag[] | [null] | Flags to target based on priority. Null indicates that the closest target should be found. The closest enemy core is used as a fallback. |
outlineColor | Color | 565666ff | color for outline generated around sprites |
outlineRadius | int | 3 | thickness for sprite outline |
outlines | boolean | true | if false, no sprite outlines are generated |
itemCapacity | int | -1 | amount of items this unit can carry; <0 to determine based on hitSize. |
ammoCapacity | int | -1 | amount of ammo this unit can hold (if the rule is enabled); <0 to determine based on weapon fire rate. |
ammoType | AmmoType | copper) | ammo this unit uses, if that system is enabled. |
mineTier | int | -1 | max hardness of ore that this unit can mine (<0 to disable) |
mineSpeed | float | 1.0 | mining speed in weird arbitrary units |
mineWalls | boolean | false | whether this unit can mine ores from floors/walls, respectively |
mineFloor | boolean | true | whether this unit can mine ores from floors/walls, respectively |
mineHardnessScaling | boolean | true | if true, harder materials will take longer to mine |
mineSound | Sound | minebeam | continuous sound emitted when mining. |
mineSoundVolume | float | 0.6 | volume of mining sound. |
mineItems | Seq<Item> | thorium) | Target items to mine. Used in MinerAI |
legCount | int | 4 | number of legs this unit has (must have the correct type to function!) |
legGroupSize | int | 2 | size of groups in which legs move. for example, insects (6 legs) usually move legs in groups of 3. |
legLength | float | 10.0 | total length of a leg (both segments) |
legSpeed | float | 0.1 | total length of a leg (both segments) |
legForwardScl | float | 1.0 | total length of a leg (both segments) |
legBaseOffset | float | 0.0 | total length of a leg (both segments) |
legMoveSpace | float | 1.0 | total length of a leg (both segments) |
legExtension | float | 0.0 | total length of a leg (both segments) |
legPairOffset | float | 0.0 | total length of a leg (both segments) |
legLengthScl | float | 1.0 | total length of a leg (both segments) |
legStraightLength | float | 1.0 | total length of a leg (both segments) |
legMaxLength | float | 1.75 | total length of a leg (both segments) |
legMinLength | float | 0.0 | total length of a leg (both segments) |
legSplashDamage | float | 0.0 | total length of a leg (both segments) |
legSplashRange | float | 5.0 | total length of a leg (both segments) |
baseLegStraightness | float | 0.0 | total length of a leg (both segments) |
legStraightness | float | 0.0 | total length of a leg (both segments) |
lockLegBase | boolean | false | If true, legs are locked to the base of the unit instead of being on an implicit rotating “mount”. |
legContinuousMove | boolean | false | If true, legs always try to move around even when the unit is not moving (leads to more natural behavior) |
flipBackLegs | boolean | true | TODO neither of these appear to do much |
flipLegSide | boolean | false | TODO neither of these appear to do much |
mechLandShake | float | 0.0 | screen shake amount for when this mech lands after boosting |
mechSideSway | float | 0.54 | parameters for mech swaying animation |
mechFrontSway | float | 0.1 | parameters for mech swaying animation |
mechStride | float | -1.0 | parameters for mech swaying animation |
mechStepParticles | boolean | false | whether particles are created when this mech takes a step |
mechLegColor | Color | 6e7080ff | color that legs change to when moving, to simulate depth |
treadRects | Rect[] | [] | list of treads as rectangles in IMAGE COORDINATES, relative to the center. these are mirrored. |
treadFrames | int | 18 | number of frames of movement in a tread |
treadPullOffset | int | 0 | how much of a top part of a tread sprite is “cut off” relative to the pattern; this is corrected for |
segments | int | 0 | number of independent segments |
segmentMag | float | 2.0 | magnitude of sine offset between segments |
segmentScl | float | 4.0 | magnitude of sine offset between segments |
segmentPhase | float | 5.0 | magnitude of sine offset between segments |
segmentRotSpeed | float | 1.0 | magnitude of sine offset between segments |
segmentMaxRot | float | 30.0 | magnitude of sine offset between segments |
crawlSlowdown | float | 0.5 | magnitude of sine offset between segments |
crushDamage | float | 0.0 | magnitude of sine offset between segments |
crawlSlowdownFrac | float | 0.55 | magnitude of sine offset between segments |
lifetime | float | 300.0 | lifetime of this missile. |
homingDelay | float | 10.0 | ticks that must pass before this missile starts homing. |
baseRegion | TextureRegion | null | |
legRegion | TextureRegion | null | |
region | TextureRegion | null | |
previewRegion | TextureRegion | null | |
shadowRegion | TextureRegion | null | |
cellRegion | TextureRegion | null | |
itemCircleRegion | TextureRegion | null | |
softShadowRegion | TextureRegion | null | |
jointRegion | TextureRegion | null | |
footRegion | TextureRegion | null | |
legBaseRegion | TextureRegion | null | |
baseJointRegion | TextureRegion | null | |
outlineRegion | TextureRegion | null | |
treadRegion | TextureRegion | null | |
wreckRegions | TextureRegion[] | null | |
segmentRegions | TextureRegion[] | null | |
segmentOutlineRegions | TextureRegion[] | null | |
treadRegions | TextureRegion[][] | null |
*extends [UnitType](#unittype)*
Config class for special Erekir unit properties.
*extends [UnitType](#unittype)*
Field template for unit types. No new functionality.
*extends [UnitType](#unittype)*
This is just a preset. Contains no new behavior.
## TankUnitType
*extends [ErekirUnitType](#erekirunittype)*
# Weather
## Weather
*extends [UnlockableContent](#unlockablecontent)*
field | type | default | notes |
— | — | — | — |
duration | float | 36000.0 | Default duration of this weather event in ticks. |
opacityMultiplier | float | 1.0 | |
attrs | Attributes | new Attributes() | |
sound | Sound | none | |
soundVol | float | 0.1 | |
soundVolMin | float | 0.0 | |
soundVolOscMag | float | 0.0 | |
soundVolOscScl | float | 20.0 | |
hidden | boolean | false | |
type | Prov<WeatherState> | WeatherState::create | |
status | StatusEffect | none | |
statusDuration | float | 120.0 | |
statusAir | boolean | true | |
statusGround | boolean | true |
*extends [Weather](#weather)*
*extends [Weather](#weather)*
field | type | default | notes |
— | — | — | — |
particleRegion | String | “circle-shadow” | |
color | Color | ffffffff | |
region | TextureRegion | null | |
yspeed | float | -2.0 | |
xspeed | float | 0.25 | |
padding | float | 16.0 | |
sizeMin | float | 2.4 | |
sizeMax | float | 12.0 | |
density | float | 1200.0 | |
minAlpha | float | 1.0 | |
maxAlpha | float | 1.0 | |
force | float | 0.0 | |
noiseScale | float | 2000.0 | |
baseSpeed | float | 6.1 | |
sinSclMin | float | 30.0 | |
sinSclMax | float | 80.0 | |
sinMagMin | float | 1.0 | |
sinMagMax | float | 7.0 | |
noiseColor | Color | ffffffff | |
drawNoise | boolean | false | |
drawParticles | boolean | true | |
useWindVector | boolean | false | |
randomParticleRotation | boolean | false | |
noiseLayers | int | 1 | |
noiseLayerSpeedM | float | 1.1 | |
noiseLayerAlphaM | float | 0.8 | |
noiseLayerSclM | float | 0.99 | |
noiseLayerColorM | float | 1.0 | |
noisePath | String | “noiseAlpha” | |
noise | Texture | null |
## RainWeather
*extends [Weather](#weather)*
field | type | default | notes |
— | — | — | — |
yspeed | float | 5.0 | |
xspeed | float | 1.5 | |
padding | float | 16.0 | |
density | float | 1200.0 | |
stroke | float | 0.75 | |
sizeMin | float | 8.0 | |
sizeMax | float | 40.0 | |
splashTimeScale | float | 22.0 | |
liquid | Liquid | water | |
splashes | TextureRegion[] | [null, null, null, null, null, null, null, null, null, null, null, null] | |
color | Color | 7a95eaff |
## SolarFlare
*extends [Weather](#weather)*
# Other
## Ability
*extends [Object](#object)*
field | type | default | notes |
— | — | — | — |
data | float | 0.0 |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
plateRegion | TextureRegion | null | |
color | Color | d1efffff | |
healthMultiplier | float | 0.2 | |
z | float | 110.0 |
## BuildWeapon
*extends [Weapon](#weapon)*
Purely visual turret. Does not shoot anything.
## DrawArcSmelt
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
flameColor | Color | f58349ff | |
midColor | Color | f2d585ff | |
flameRad | float | 1.0 | |
circleSpace | float | 2.0 | |
flameRadiusScl | float | 3.0 | |
flameRadiusMag | float | 0.3 | |
circleStroke | float | 1.5 | |
alpha | float | 0.68 | |
particles | int | 25 | |
particleLife | float | 40.0 | |
particleRad | float | 7.0 | |
particleStroke | float | 1.1 | |
particleLen | float | 3.0 | |
drawCenter | boolean | true | |
blending | Blending | additive |
## DrawBlurSpin
*extends [DrawBlock](#drawblock)*
Not standalone.
field | type | default | notes |
— | — | — | — |
region | TextureRegion | null | |
blurRegion | TextureRegion | null | |
suffix | String | ”“ | |
rotateSpeed | float | 1.0 | |
x | float | 0.0 | |
y | float | 0.0 | |
blurThresh | float | 0.7 |
## DrawBubbles
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
color | Color | 7457ceff | |
amount | int | 12 | |
sides | int | 8 | |
strokeMin | float | 0.2 | |
spread | float | 3.0 | |
timeScl | float | 30.0 | |
recurrence | float | 6.0 | |
radius | float | 3.0 | |
fill | boolean | false |
## DrawCells
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
middle | TextureRegion | null | |
color | Color | ffffffff | |
particleColorFrom | Color | 000000ff | |
particleColorTo | Color | 000000ff | |
particles | int | 12 | |
range | float | 4.0 | |
recurrence | float | 6.0 | |
radius | float | 3.0 | |
lifetime | float | 60.0 |
## DrawCircles
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
color | Color | 7457ceff | |
amount | int | 5 | |
sides | int | 15 | |
strokeMin | float | 0.2 | |
strokeMax | float | 2.0 | |
timeScl | float | 160.0 | |
radius | float | 12.0 | |
radiusOffset | float | 0.0 | |
x | float | 0.0 | |
y | float | 0.0 | |
strokeInterp | Interp | pow3In |
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
flameColor | Color | f58349ff | |
midColor | Color | f2d585ff | |
flameRad | float | 1.0 | |
circleSpace | float | 2.0 | |
flameRadiusScl | float | 10.0 | |
flameRadiusMag | float | 0.6 | |
circleStroke | float | 1.5 | |
alpha | float | 0.5 | |
particles | int | 30 | |
particleLife | float | 70.0 | |
particleRad | float | 7.0 | |
particleSize | float | 3.0 | |
fadeMargin | float | 0.4 | |
rotateScl | float | 1.5 | |
particleInterp | Interp | 5f) |
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
plantColor | Color | 5541b1ff | |
plantColorLight | Color | 7457ceff | |
bottomColor | Color | 474747ff | |
bubbles | int | 12 | |
sides | int | 8 | |
strokeMin | float | 0.2 | |
spread | float | 3.0 | |
timeScl | float | 70.0 | |
recurrence | float | 6.0 | |
radius | float | 3.0 | |
middle | TextureRegion | null |
## DrawDefault
*extends [DrawBlock](#drawblock)*
## DrawFade
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
suffix | String | ”-top” | |
alpha | float | 0.6 | |
scale | float | 3.0 | |
region | TextureRegion | null |
## DrawFlame
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
flameColor | Color | ffc999ff | |
top | TextureRegion | null | |
lightRadius | float | 60.0 | |
lightAlpha | float | 0.65 | |
lightSinScl | float | 10.0 | |
lightSinMag | float | 5.0 | |
flameRadius | float | 3.0 | |
flameRadiusIn | float | 1.9 | |
flameRadiusScl | float | 5.0 | |
flameRadiusMag | float | 2.0 | |
flameRadiusInMag | float | 1.0 |
## DrawFrames
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
frames | int | 3 | Number of frames to draw. |
interval | float | 5.0 | Ticks between frames. |
sine | boolean | true | If true, frames wil alternate back and forth in a sine wave. |
regions | TextureRegion[] | null |
*extends [DrawBlock](#drawblock)*
Not standalone.
field | type | default | notes |
— | — | — | — |
blending | Blending | additive | |
suffix | String | “-glow” | |
alpha | float | 0.9 | |
glowScale | float | 10.0 | |
glowIntensity | float | 0.5 | |
rotateSpeed | float | 0.0 | |
layer | float | 31.0 | |
rotate | boolean | false | |
color | Color | ff0000ff | |
region | TextureRegion | null |
*extends [DrawBlock](#drawblock)*
Not standalone.
field | type | default | notes |
— | — | — | — |
suffix | String | “-heat” | |
heatColor | Color | ff3838cc | |
heatPulse | float | 0.3 | |
heatPulseScl | float | 10.0 | |
heat | TextureRegion | null |
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
heat | TextureRegion | null | |
glow | TextureRegion | null | |
top1 | TextureRegion | null | |
top2 | TextureRegion | null | |
heatColor | Color | ff3838cc | |
heatPulse | float | 0.3 | |
heatPulseScl | float | 10.0 | |
glowMult | float | 1.2 |
*extends [DrawBlock](#drawblock)*
Not standalone.
field | type | default | notes |
— | — | — | — |
color | Color | ff3838cc | |
pulse | float | 0.3 | |
pulseScl | float | 10.0 | |
heat | TextureRegion | null | |
suffix | String | “-glow” |
*extends [DrawBlock](#drawblock)*
This must be used in conjunction with another DrawBlock; it only draws outputs.
field | type | default | notes |
— | — | — | — |
liquidOutputRegions | TextureRegion[][] | null |
*extends [DrawBlock](#drawblock)*
Not standalone.
field | type | default | notes |
— | — | — | — |
drawLiquid | Liquid | null | |
liquid | TextureRegion | null | |
suffix | String | “-liquid” | |
alpha | float | 1.0 |
*extends [DrawBlock](#drawblock)*
Not standalone.
field | type | default | notes |
— | — | — | — |
drawLiquid | Liquid | null | |
padding | float | 0.0 | |
alpha | float | 1.0 |
## DrawMulti
*extends [DrawBlock](#drawblock)*
combined several DrawBlocks into one
field | type | default | notes |
— | — | — | — |
drawers | DrawBlock[] | [] |
*extends [DrawBlock](#drawblock)*
Not standalone.
field | type | default | notes |
— | — | — | — |
weave | TextureRegion | null | |
glow | TextureRegion | null | |
rotateSpeed | float | 1.0 | |
rotateSpeed2 | float | -0.9 | |
glowColor | Color | ff6666cc | |
pulse | float | 0.3 | |
pulseScl | float | 10.0 |
*extends [DrawBlock](#drawblock)*
Not standalone.
field | type | default | notes |
— | — | — | — |
color | Color | f2d585ff | |
alpha | float | 0.5 | |
particles | int | 30 | |
particleLife | float | 70.0 | |
particleRad | float | 7.0 | |
particleSize | float | 3.0 | |
fadeMargin | float | 0.4 | |
rotateScl | float | 3.0 | |
reverse | boolean | false | |
particleInterp | Interp | 5f) | |
particleSizeInterp | Interp | slope | |
blending | Blending | normal |
## DrawPistons
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
sinMag | float | 4.0 | |
sinScl | float | 6.0 | |
sinOffset | float | 50.0 | |
sideOffset | float | 0.0 | |
lenOffset | float | -1.0 | |
sides | int | 4 | |
region1 | TextureRegion | null | |
region2 | TextureRegion | null | |
regiont | TextureRegion | null |
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
color | Color | ffd37fff | |
stroke | float | 2.0 | |
timeScl | float | 100.0 | |
minStroke | float | 0.2 | |
radiusScl | float | 1.0 | |
layer | float | -1.0 | |
square | boolean | true |
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
liquid | TextureRegion | null |
## DrawRegion
*extends [DrawBlock](#drawblock)*
Not standalone.
field | type | default | notes |
— | — | — | — |
region | TextureRegion | null | |
suffix | String | ““ | |
spinSprite | boolean | false | |
drawPlan | boolean | true | |
rotateSpeed | float | 0.0 | |
x | float | 0.0 | |
y | float | 0.0 | |
layer | float | -1.0 | Any number ⇐0 disables layer changes. |
## DrawShape
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
color | Color | ffd37fff | |
sides | int | 4 | |
radius | float | 2.0 | |
timeScl | float | 1.0 | |
layer | float | -1.0 | |
x | float | 0.0 | |
y | float | 0.0 | |
useWarmupRadius | boolean | false |
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
top1 | TextureRegion | null | |
top2 | TextureRegion | null |
## DrawSpikes
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
color | Color | 7457ceff | |
amount | int | 10 | |
layers | int | 1 | |
stroke | float | 2.0 | |
rotateSpeed | float | 0.8 | |
radius | float | 6.0 | |
length | float | 4.0 | |
x | float | 0.0 | |
y | float | 0.0 | |
layerSpeed | float | -1.0 |
## DrawTurbines
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
turbines | TextureRegion[] | [null, null] | |
cap | TextureRegion | null | |
turbineSpeed | float | 2.0 |
## DrawTurret
*extends [DrawBlock](#drawblock)*
Extend to implement custom drawing behavior for a turret.
field | type | default | notes |
— | — | — | — |
parts | Seq<DrawPart> | new Seq<>() | |
basePrefix | String | ”“ | Prefix to use when loading base region. |
liquidDraw | Liquid | null | Overrides the liquid to draw in the liquid region. |
base | TextureRegion | null | |
liquid | TextureRegion | null | |
top | TextureRegion | null | |
heat | TextureRegion | null | |
preview | TextureRegion | null | |
outline | TextureRegion | null |
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
sinMag | float | 0.6 | |
sinScl | float | 8.0 | |
color | Color | ff9b59ff | |
region | TextureRegion | null |
## DrawWeave
*extends [DrawBlock](#drawblock)*
field | type | default | notes |
— | — | — | — |
weave | TextureRegion | null |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
damage | float | 1.0 | |
reload | float | 100.0 | |
range | float | 60.0 | |
healEffect | Effect | heal | |
hitEffect | Effect | hitLaserBlast | |
damageEffect | Effect | chainLightning | |
status | StatusEffect | electrified | |
shootSound | Sound | spark | |
statusDuration | float | 360.0 | |
x | float | 0.0 | |
y | float | 0.0 | |
targetGround | boolean | true | |
targetAir | boolean | true | |
hitBuildings | boolean | true | |
hitUnits | boolean | true | |
maxTargets | int | 25 | |
healPercent | float | 3.0 | |
layer | float | 99.999 | |
blinkScl | float | 20.0 | |
blinkSize | float | 0.1 | |
effectRadius | float | 5.0 | |
sectorRad | float | 0.14 | |
rotateSpeed | float | 0.5 | |
sectors | int | 5 | |
color | Color | 98ffa9ff | |
useAmmo | boolean | true |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
radius | float | 60.0 | Shield radius. |
regen | float | 0.1 | Shield regen speed in damage/tick. |
max | float | 200.0 | Maximum shield. |
cooldown | float | 300.0 | Cooldown after the shield is broken, in ticks. |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
liquid | Liquid | water | |
amount | float | 120.0 | |
radAmountScale | float | 5.0 | |
radScale | float | 1.0 | |
noiseMag | float | 6.5 | |
noiseScl | float | 5.0 |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
liquid | Liquid | null | |
slurpSpeed | float | 9.0 | |
regenPerSlurp | float | 2.9 | |
slurpEffectChance | float | 0.4 | |
slurpEffect | Effect | heal |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
minVelocity | float | 0.08 | |
interval | float | 3.0 | |
x | float | 0.0 | |
y | float | 0.0 | |
rotateEffect | boolean | false | |
effectParam | float | 3.0 | |
teamColor | boolean | false | |
color | Color | ffffffff | |
effect | Effect | missileTrail |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
damage | float | 35.0 | Lightning damage |
chance | float | 0.15 | Chance of firing every tick. Set >= 1 to always fire lightning every tick at max speed |
length | int | 12 | Length of the lightning. ⇐ 0 to disable |
minSpeed | float | 0.8 | Speeds for when to start lightninging and when to stop getting faster |
maxSpeed | float | 1.2 | Speeds for when to start lightninging and when to stop getting faster |
color | Color | a9d8ffff | Lightning color |
y | float | 0.0 | Shifts where the lightning spawns along the Y axis |
x | float | 0.0 | Offset along the X axis |
alternate | boolean | true | Whether the spawn side alternates |
heatRegion | String | “error” | Jittering heat sprite like the shield on v5 Javelin |
bullet | BulletType | null | Bullet type that is fired. Can be null |
bulletAngle | float | 0.0 | Bullet angle parameters |
bulletSpread | float | 0.0 | Bullet angle parameters |
shootEffect | Effect | sparkShoot | |
parentizeEffects | boolean | false | |
shootSound | Sound | spark |
## RegenAbility
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
percentAmount | float | 0.0 | Amount healed as percent per tick. |
amount | float | 0.0 | Amount healed as a flat amount per tick. |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
amount | float | 1.0 | |
reload | float | 100.0 | |
range | float | 60.0 | |
healEffect | Effect | heal | |
activeEffect | Effect | healWaveDynamic | |
parentizeEffects | boolean | false |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
unit | UnitType | null | |
spawnTime | float | 60.0 | |
spawnX | float | 0.0 | |
spawnY | float | 0.0 | |
spawnEffect | Effect | spawn | |
parentizeEffects | boolean | false |
## Weapon
*extends [Object](#object)*
field | type | default | notes |
— | — | — | — |
name | String | __typeofWeapon | displayed weapon region |
bullet | BulletType | placeholder | bullet shot |
ejectEffect | Effect | none | shell ejection effect |
useAmmo | boolean | true | whether to consume ammo when ammo is enabled in rules |
mirror | boolean | true | whether to create a flipped copy of this weapon upon initialization. default: true |
flipSprite | boolean | false | whether to flip the weapon's sprite when rendering |
alternate | boolean | true | whether to shoot the weapons in different arms one after another, rather than all at once; only valid when mirror = true |
rotate | boolean | false | whether to rotate toward the target independently of unit |
baseRotation | float | 0.0 | rotation at which this weapon is locked to if rotate = false. TODO buggy! |
top | boolean | true | whether to draw the outline on top. |
continuous | boolean | false | whether to hold the bullet in place while firing |
controllable | boolean | true | whether this weapon can be aimed manually by players |
autoTarget | boolean | false | whether to automatically target relevant units in update(); only works when controllable = false. |
predictTarget | boolean | true | whether to perform target trajectory prediction |
targetInterval | float | 40.0 | ticks to wait in-between targets |
targetSwitchInterval | float | 70.0 | ticks to wait in-between targets |
rotateSpeed | float | 20.0 | rotation speed of weapon when rotation is enabled, in degrees/t |
reload | float | 1.0 | weapon reload in frames |
inaccuracy | float | 0.0 | inaccuracy of degrees of each shot |
shake | float | 0.0 | intensity and duration of each shot's screen shake |
recoil | float | 1.5 | visual weapon knockback. |
recoilTime | float | -1.0 | time taken for weapon to return to starting position in ticks. uses reload time by default |
recoilPow | float | 1.8 | power curve applied to visual recoil |
cooldownTime | float | 20.0 | ticks to cool down the heat region |
shootX | float | 0.0 | projectile/effect offsets from center of weapon |
shootY | float | 3.0 | projectile/effect offsets from center of weapon |
x | float | 5.0 | offsets of weapon position on unit |
y | float | 0.0 | offsets of weapon position on unit |
shoot | ShootPattern | new ShootPattern() | pattern used for bullets |
shadow | float | -1.0 | radius of shadow drawn under the weapon; <0 to disable |
velocityRnd | float | 0.0 | fraction of velocity that is random |
shootCone | float | 5.0 | The half-radius of the cone in which shooting will start. |
rotationLimit | float | 361.0 | Cone in which the weapon can rotate relative to its mount. |
minWarmup | float | 0.0 | minimum weapon warmup before firing (this is not linear, do NOT use 1!) |
shootWarmupSpeed | float | 0.1 | lerp speed for shoot warmup, only used for parts |
smoothReloadSpeed | float | 0.15 | lerp speed for shoot warmup, only used for parts |
soundPitchMin | float | 0.8 | random sound pitch range |
soundPitchMax | float | 1.0 | random sound pitch range |
ignoreRotation | boolean | false | whether shooter rotation is ignored when shooting. |
noAttack | boolean | false | If true, this weapon cannot be used to attack targets. |
minShootVelocity | float | -1.0 | min velocity required for this weapon to shoot |
parentizeEffects | boolean | false | should the shoot effects follow the unit (effects need followParent set to true for this to work) |
otherSide | int | -1 | internal value used for alternation - do not change! |
layerOffset | float | 0.0 | draw Z offset relative to the default value |
shootSound | Sound | pew | sound used for shooting |
chargeSound | Sound | none | sound used for weapons that have a delay |
noAmmoSound | Sound | noammo | sound played when there is nothing to shoot |
region | TextureRegion | null | displayed region (autoloaded) |
heatRegion | TextureRegion | null | heat region, must be same size as region (optional) |
cellRegion | TextureRegion | null | cell region, must be same size as region (optional) |
outlineRegion | TextureRegion | null | outline region to display if top is false |
heatColor | Color | ab3400ff | heat region tint |
shootStatus | StatusEffect | none | status effect applied when shooting |
mountType | Func<Weapon,WeaponMount> | WeaponMount::new | type of weapon mount to be used |
shootStatusDuration | float | 300.0 | status effect duration when shot |
shootOnDeath | boolean | false | whether this weapon should fire when its owner dies |
parts | Seq<DrawPart> | class) | extra animated parts |
*extends [Weapon](#weapon)*
Note that this requires several things: - A bullet with positive maxRange - A bullet with positive damage - Rotation
field | type | default | notes |
— | — | — | — |
color | Color | ffffffff | |
beamEffect | Effect | pointBeam |
*extends [Weapon](#weapon)*
Note that this weapon requires a bullet with a positive maxRange. Rotation must be set to true. Fixed repair points are not supported.
field | type | default | notes |
— | — | — | — |
targetBuildings | boolean | false | |
targetUnits | boolean | true | |
repairSpeed | float | 0.3 | |
fractionRepairSpeed | float | 0.0 | |
beamWidth | float | 1.0 | |
pulseRadius | float | 6.0 | |
pulseStroke | float | 2.0 | |
widthSinMag | float | 0.0 | |
widthSinScl | float | 4.0 | |
recentDamageMultiplier | float | 0.1 | |
laser | TextureRegion | null | |
laserEnd | TextureRegion | null | |
laserTop | TextureRegion | null | |
laserTopEnd | TextureRegion | null | |
laserColor | Color | 98ffa9ff | |
laserTopColor | Color | ffffffff | |
healColor | Color | 98ffa9ff | |
healEffect | Effect | healBlockFull |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
radius | float | 60.0 | Shield radius. |
regen | float | 0.1 | Shield regen speed in damage/tick. |
max | float | 200.0 | Maximum shield. |
cooldown | float | 300.0 | Cooldown after the shield is broken, in ticks. |
angle | float | 80.0 | Angle of shield arc. |
angleOffset | float | 0.0 | Offset parameters for shield. |
x | float | 0.0 | Offset parameters for shield. |
y | float | 0.0 | Offset parameters for shield. |
whenShooting | boolean | true | If true, only activates when shooting. |
width | float | 6.0 | Width of shield line. |
drawArc | boolean | true | Whether to draw the arc line. |
region | String | null | If not null, will be drawn on top. |
offsetRegion | boolean | false | If true, sprite position will be influenced by x/y. |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
amount | float | 1.0 | |
max | float | 100.0 | |
reload | float | 100.0 | |
range | float | 60.0 | |
applyEffect | Effect | shieldApply | |
activeEffect | Effect | shieldWave | |
parentizeEffects | boolean | false |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
effect | StatusEffect | null | |
duration | float | 60.0 | |
reload | float | 100.0 | |
range | float | 20.0 | |
applyEffect | Effect | none | |
activeEffect | Effect | overdriveWave | |
effectX | float | 0.0 | |
effectY | float | 0.0 | |
parentizeEffects | boolean | false |
*extends [Ability](#ability)*
field | type | default | notes |
— | — | — | — |
reload | float | 90.0 | |
range | float | 200.0 | |
orbRadius | float | 4.1 | |
orbMidScl | float | 0.33 | |
orbSinScl | float | 8.0 | |
orbSinMag | float | 1.0 | |
color | Color | a393feff | |
layer | float | 110.0 | |
x | float | 0.0 | |
y | float | 0.0 | |
particles | int | 15 | |
particleSize | float | 4.0 | |
particleLen | float | 7.0 | |
rotateScl | float | 3.0 | |
particleLife | float | 110.0 | |
active | boolean | true | |
particleInterp | Interp | apply(f)) | |
particleColor | Color | 665c9fff | |
applyParticleChance | float | 13.0 |