-
Notifications
You must be signed in to change notification settings - Fork 14
Changes to Mindustry Logic
Cardillan edited this page Feb 28, 2026
·
38 revisions
This wiki page documents changes to Mindustry Logic here, as they appear in the main branch. Listed are changes that affect compilers (new instructions, new properties, new built-in variables and so on). Minor bug fixes, especially when the bug hasn't been part of a release, aren't included.
I (cardillan) will update this page on a best-effort basis when new commits appear on Mindustry's main branch. Feel free to update the page to correct inaccuracies, omissions and errors, or use the discussion page for discussions.
Listed chronologically in descending order on a best-effort basis, starting from the last release of Mindustry 7 (v146). Dates link to the relevant commit.
-
2026-02-28
LogicBlock.accumulatoris stored in map save and restored on a map load. -
2026-02-27 The time already waited for a running
waitinstruction is stored in map save and restored on a map load.
2026-02-16 v8 Build 155.4 - Beta
No changes.
2026-02-09 v8 Build 155 - Beta
-
2026-02-08 New sensable LAccess properties
@buildX,@buildY,@building,@breaking,@selectedBlockand@selectedRotation. - 2026-02-07 Added the ability to run code on a map objective completion (note this means the code runs without a logic block attached).
-
2026-02-04 The
drawflushinstruction always clears the graphic buffer, even if the argument doesn't represent a valid display. -
2026-01-16 The instruction accumulator is not decreased when an instruction yields. Guarantees that a
waitinstruction with a non-zero argument accumulates the number of instructions corresponding to the length of the wait to be run on the next frame update, regardless of the frame rate. -
2026-01-15 New sensable LAccess property
@maxUnits. Returns the maximum number of units that a team can have. Can only be sensed from cores. -
2026-01-14 A
waitinstruction with a zero argument yields (ends the execution of the current tick), but is not executed again. Before this change,wait 0didn't yield and was equivalent to anoop. -
2025-12-28 Allows displays to be used with
draw image(draws the contents of another display on the current one). - 2025-12-28 Allows textures/quad markers to use content or logic displays as their texture.
2025-12-21 v8 Build 154.3 - Beta
-
2025-12-19 New
ucontrol deconstruct x yinstruction for deconstructing blocks. Requires thelogicUnitDeconstructgame rule to be set (either use the GUI settings, or open the console and runVars.state.rules.logicUnitDeconstruct = true;).
2025-12-18 v8 Build 154.2 - Beta
No changes.
2025-08-25 v8 Build 151 - Beta
- 2025-08-01 Extension of the schematic file format (support for content ID mapping). The change is backwards compatible (older versions of Mindustry ignore the content map when present.)
-
2025-07-27 Ability to sense building requirement on block types (e.g.,
@air-factory.@copperreturns the amount of copper needed to build the air factory). Returned values respect the game settings (infinite resources and build cost multiplier).
2025-07-26 v8 Build 150.1 - Beta
No changes.
2025-07-23 v8 Build 150 - Beta
-
2025-07-18 Assigning a non-numeric value to
@counteris now effectively ignored. -
2025-07-10 the
@bufferUsageLAccess property has been renamed to@bufferSize. -
2025-07-10 the
readandwriteinstruction now recognize theLReadableandLWritableinterface, making is possible for mods to integrate their objects withread/writelogic. -
2025-07-06 the
controlinstruction can control any block in the processor's range, not just blocks directly linked to it. -
2025-07-03
readcan access individual characters within a message block. A UTF-16 value of the character is returned. When the index is out of range, returnsnull. The size of the text in the message box can be sensed using@bufferUsage. -
2025-07-02
- The text alignment in
draw printis no longer an instruction keyword, but a variable. Supported alignments are mlog variables, such as@bottomLeftor@center. - New marker properties
textAlignandlineAlign.
- The text alignment in
-
2025-07-02
- New
selectinstruction (a ternary operator). - Assigning a non-numeric value to
@counternow sets the@counterto the numeric part of the value assigned, leading to generally undefined behavior.
- New
-
2025-06-22 Small fixes to the
read/writecanvas access: reading from invalid pixel index now returnsnulland the value to write is converted to an integer properly if it is an object. Note that thewritewill silently fail if the pixel value is out of range (0 to 7). -
2025-06-17
readandwritecan access individual canvas pixels. -
2025-06-15 New marker property
outline. -
2025-06-14 New sensable property
@operations. Returns the number ofdrawflushoperations on a display since map reload (allows detecting the display needs to be redrawn). -
2025-06-02 Two new operations:
op emod result a bcomputesamodulob, always returning a positive number;op ushr result a bcomputes an unsigned right-shift. -
2025-05-25 New operation
op logn result a b. Computes the logarithm ofain baseb. -
2025-05-14 New operation
op round. Rounds the value to the nearest integer. -
2025-05-12 New operation
op sign. Returns0only when the operand is strictly equal to0,-1for negative and1for positive numbers. -
2025-05-11 New
unpackcolorinstruction. -
2025-05-08 The
@counteris set back to numeric value at the start of the execution of each instruction. It is now impossible to assignnullor an object value to@counterin any way - all such assignments (regardless of the actual assignment mechanism) are effectively ignored.
2025-05-01 v8 Build 149 - Beta
-
2025-04-28 Mlog parser now recognizes the
0xFFFFFFFF80000000literal and the corresponding value in binary representation (i.e.Integer.MIN_VALUE). The only unparseable numbers left are-9223372036854775808(i.e.Long.MIN_VALUE) in any representation, values from0x8000000000000001to0x800000000000000Fin hexadecimal representation and the value0b1000000000000000000000000000000000000000000000000000000000000001in binary representation.
2025-04-21 v8 Build 148 - Beta
-
2025-04-19 Color literals for named colors (e.g.
%[red]). -
2025-04-18 New sensable property
@bufferUsage. The property returns the number of commands in the graphics buffer of a display. -
2025-04-17 New sensable properties
@displayHeightand@displayWidth, returning display size in pixels. Added to support tileable displays. -
2025-04-08
sensor @sizereturns the length of a string value. -
2025-04-04
readcan access characters within string values. A UTF-16 value of the character is returned. When the index is out of range, returnsnull. -
2025-04-04 New sensable property
@memoryCapacity. -
2025-04-04 fixes a bug which prevented parsing of numeric literal giving the value of
-(2^31)in any form (decimal, float, hex, binary). This value still can't be parsed when expressed as an unsigned 64bit integer (i.e.0xFFFFFFFF80000000or the corresponding value in binary). - 2025-03-04 instruction scheduling change: all the accumulator capacity is used in each tick.
-
2025-02-09
readandwritecan access existing variables by name (including@counter) from other processors. -
2025-02-06 New sensable properties
@totalPayloadand@payloadCapacity, objects and units can be sensed to see whether they hold a payload contents (similarly to sensing whether they hold items/liquids). -
2025-02-06 New LogicRule
canGameOver -
2025-02-05 Support for
teamin thelookupinstruction -
2025-02-05 New
printcharinstruction. Takes either a number, which is converted to an UTF-16 character and printed, or a Mindustry content, in which case the corresponding icon is printed. -
2025-02-04 New LogicRule
unitMineSpeed -
2024-11-29 Change in displaying numbers (affects emulators and compile-time evaluation of
printinstructions) -
2024-09-15 New
ulocatebuilding typeshield. -
2024-08-06 New argument to the
playsoundinstruction -
2024-08-03 New parameter to the
messageinstruction -
2024-07-07 New sensable properties
@currentAmmoType,@velocityX,@velocityY. New LogicRuledragMultiplier. -
2024-06-16 New
clientdatainstruction -
2024-06-16 Removed
@solidvariable, new sensable property@solid. -
2024-04-12 New instruction
playsound -
2024-03-30 New instructions
weathersense,weatherset -
2024-03-03
@shieldis a settable property (world processor) -
2024-02-06 New
drawsubcommandstranslate,rotate,scale,reset. - 2024-02-02 Mods can add effects
-
2024-01-31 Added new markers (
quad) and marker properties (posi,uvi,colori) - 2024-01-20 Fixes wait instruction inconsistency
- 2023-12-15 Various updates to markers (branch merge)
-
2023-12-12 Allow fetching
unitCountby type, andbuildCountwithout type -
2023-12-02 New
formatandlocaleprintinstructions, various networking logic updates -
2023-11-23 New
draw printvariant for graphical output of the text buffer -
2023-10-31 New property
@armor, properties@speed,@armor,@healthmade settable -
2023-10-06
waitinstruction yields execution, new parameter formessageto return status -
2023-09-28 New camera position properties (
@cameraX,@cameraY,@cameraWidth,@cameraHeight) -
2023-09-27 New
markerinstruction (later supplanted bymakemarkerandsetmarker) -
2023-09-21 New
explosionparametereffect -
2023-09-20 Prevent objects from being set to
@counter -
2023-09-12 New LogicRule
ban,unban