Namespaces
The following namespaces allow you to safely access processor symbols or variables.
ControlKind
This is actually an enum that serves the same purpose as the other namespaces. Gives you direct access to symbols such as @ctrlPlayer, @ctrlProcessor and @ctrlCommand.
ctrlPlayerctrlProcessorctrlCommandctrlFormation(deprecated: replaced byctrlCommandin Mindustry v7)
Vars
Allows you to access processor variables.
this- The current processor.thisx- The x coordinates of this processor.thisy- The y coordinates of this processor.mapw- The width of the map.maph- The height of the map.links- The number of blocks linked to this processor.ipt- The amount of instructions run per secondunit- The unit currently bound to this processor.itemCount- Total amount of items existent, can be used to check if an item ID is validliquidCount- Total amount of liquids existent, can be used to check if a liquid ID is validunitCount- Total amount of units existent, can be used to check if an unit ID is validblockCount- Total amount of blocks existent, can be used to check if a block ID is validtick- The amount of ticks that happened since the map startedtime- The amount of milliseconds that passed since the map started.second- The amount of seconds that passed since the map startedminute- The amount of minutes that passed since the map startedwaveNumber- The number of the current wave, starts at 1;waveTime- The amount of seconds left before the next wave
PVars
Imported from mlogjs:world, contains privileged world processor variables.
server- Whether the script is running on a server.client- Whether the script is running on a client.clientLocale- Client locale string.clientUnit- Client unit.clientName- Client player name.clientTeam- Client player team.clientMobile- Whether client is on a mobile device.clientMusicPlaying- Whether client music is currently playing.clientCurrentMusic- Name of currently playing client music track.queries- View into the results of the@queriesvariable populated byquery. Supports.length, array indexing[index],.at(index), and.valueto access@queriesdirectly.
StatusEffects
Contains the status effect symbols available in Mindustry. These are variables pointing to @status-<name>.
noneburningfreezingunmovingslowfastwetmuddymeltingsappedtarredoverdriveoverclockshieldedshockedblastedcorrodedbosssporeSloweddisarmedelectrifiedinvincibledynamic
Teams
Contais the base game teams
derelictshardedcruxmalisgreenblue
Items
Contains all items available
copperleadmetaglassgraphitesandcoaltitaniumthoriumscrapsiliconplastaniumphaseFabricsurgeAlloysporePodblastCompoundpyratiteberylliumtungstenoxidecarbidefissileMatterdormantCyst
Liquids
Contains all items available
waterslagoilcryofluidneoplasmarkycitegalliumozonehydrogennitrogencyanogen
Units
Contains all units available
daggermacefortressscepterreignnovapulsarquasarvelacorvuscrawleratraxspiroctarkyidtoxopidflarehorizonzenithantumbraeclipsemonopolymegaquadoctrissominkebrydeseiomuraretusaoxynoecyerceaegiresnavanaxalphabetagammastelllocuspreceptvanquishconquermeruicleroianthicustectacollariseludeavertobviatequelldisruptrenalelatumevokeinciteemanateblockmanifoldassemblyDronedummymissile
LAccess
This namespace contains all symbols that can be used to access properties of entities via the sense command. Although it exists you will more likely use the object property notation
totalItemsfirstItemtotalLiquidstotalPoweritemCapacityliquidCapacitypowerCapacitypowerNetStoredpowerNetCapacitypowerNetInpowerNetOutammoammoCapacitycurrentAmmoTypememoryCapacityhealthmaxHealthheatshieldarmorefficiencyprogresstimescalerotationxyvelocityXvelocityYshootXshootYcameraX(Privileged: only evaluates in world processors; returns null in standard processors)cameraY(Privileged: only evaluates in world processors; returns null in standard processors)cameraWidth(Privileged: only evaluates in world processors; returns null in standard processors)cameraHeight(Privileged: only evaluates in world processors; returns null in standard processors)displayWidthdisplayHeightbufferSizeoperationssizesoliddeadrangeshootingboostingmineXmineYminingbuildXbuildYbuildingbreakingspeedteamtypeflagflyingcontrolledcontrollernamepayloadCountpayloadTypetotalPayloadpayloadCapacitymaxUnitsidpingXpingYpingTextselectedBlockselectedRotationbulletLifetimebulletTimeenabledconfigcolor
Colors
Contains the built-in game colors
tanskypinklightgreywhitelightgraymagentasalmoncoralgreydarkgreylimebrownbluegreentealforestblackgoldbrickgraycyanroyalvioletyellowclearorangemaroonreddarkgraynavyscarletslateolivepurpleacidgoldenrodcrimsonaccentunlaunchedhighlightstatnegstat
Blocks
Contains the available symbols for blocks.
graphitePressmultiPresssiliconSmeltersiliconCruciblekilnplastaniumCompressorphaseWeaversurgeSmeltercryofluidMixerpyratiteMixerblastMixermelterseparatordisassemblersporePresspulverizercoalCentrifugeincineratorsiliconArcFurnaceelectrolyzeratmosphericConcentratoroxidationChamberelectricHeaterslagHeaterphaseHeaterheatRedirectorheatRouterslagIncineratorcarbideCrucibleslagCentrifugesurgeCruciblecyanogenSynthesizerphaseSynthesizerheatReactorcopperWallcopperWallLargetitaniumWalltitaniumWallLargeplastaniumWallplastaniumWallLargethoriumWallthoriumWallLargephaseWallphaseWallLargesurgeWallsurgeWallLargedoordoorLargescrapWallscrapWallLargescrapWallHugescrapWallGiganticthrusterberylliumWallberylliumWallLargetungstenWalltungstenWallLargeblastDoorreinforcedSurgeWallreinforcedSurgeWallLargecarbideWallcarbideWallLargeshieldedWallmendermendProjectoroverdriveProjectoroverdriveDomeforceProjectorshockMineradarbuildTowerregenProjectorbarrierProjectorshockwaveTowershieldProjectorlargeShieldProjectorconveyortitaniumConveyorplastaniumConveyorarmoredConveyorjunctionbridgeConveyorphaseConveyorsorterinvertedSorterrouterdistributoroverflowGateunderflowGatemassDriverductarmoredDuctductRouteroverflowDuctunderflowDuctductBridgeductUnloadersurgeConveyorsurgeRouterunitCargoLoaderunitCargoUnloadPointmechanicalPumprotaryPumpimpulsePumpconduitpulseConduitplatedConduitliquidRouterliquidContainerliquidTankliquidJunctionbridgeConduitphaseConduitreinforcedPumpreinforcedConduitreinforcedLiquidJunctionreinforcedBridgeConduitreinforcedLiquidRouterreinforcedLiquidContainerreinforcedLiquidTankpowerNodepowerNodeLargesurgeTowerdiodebatterybatteryLargecombustionGeneratorthermalGeneratorsteamGeneratordifferentialGeneratorrtgGeneratorsolarPanelsolarPanelLargethoriumReactorimpactReactorbeamNodebeamTowerbeamLinkturbineCondenserchemicalCombustionChamberpyrolysisGeneratorfluxReactorneoplasiaReactormechanicalDrillpneumaticDrilllaserDrillblastDrillwaterExtractorcultivatoroilExtractorventCondensercliffCrusherplasmaBorelargePlasmaBoreimpactDrilleruptionDrillcoreShardcoreFoundationcoreNucleuscoreBastioncoreCitadelcoreAcropoliscontainervaultunloaderreinforcedContainerreinforcedVaultduoscatterscorchhailwavelancerarcparallaxswarmersalvosegmenttsunamifuseripplecycloneforeshadowspectremeltdownbreachdiffusesublimatetitandisperseafflictlustrescathesmitemaligngroundFactoryairFactorynavalFactoryadditiveReconstructormultiplicativeReconstructorexponentialReconstructortetrativeReconstructorrepairPointrepairTurrettankFabricatorshipFabricatormechFabricatortankRefabricatormechRefabricatorshipRefabricatorprimeRefabricatortankAssemblershipAssemblermechAssemblerbasicAssemblerModuleunitRepairTowerpayloadConveyorpayloadRouterreinforcedPayloadConveyorreinforcedPayloadRouterpayloadMassDriverlargePayloadMassDriversmallDeconstructordeconstructorconstructorlargeConstructorpayloadLoaderpayloadUnloaderpowerSourcepowerVoiditemSourceitemVoidliquidSourceliquidVoidpayloadSourcepayloadVoidheatSourceilluminatorlaunchPadinterplanetaryAcceleratormessageswitchmicroProcessorlogicProcessorhyperProcessormemoryCellmemoryBanklogicDisplaylargeLogicDisplaycanvasreinforcedMessageworldProcessorworldCellworldMessageworldSwitchsolidairspawncliffdeepWatershallowWatertaintedWaterdeepTaintedWaterdarksandTaintedWatersandWaterdarksandWatertarpooledCryofluidmoltenSlagspaceemptystonecraterStonecharbasalthotrockmagmarocksandFloordarksanddirtmuddaciterhyoliterhyoliteCraterroughRhyoliteregolithyellowStonecarbonStoneferricStoneferricCratersberyllicStonecrystallineStonecrystalFlooryellowStonePlatesredStonedenseRedStoneredIcearkyciteFloorarkyicStonerhyoliteVentcarbonVentarkyicVentyellowStoneVentredStoneVentcrystallineVentredmatbluematgrasssaltsnowiceiceSnowshalemosscoreZonesporeMossstoneWallsporeWalldirtWalldaciteWalliceWallsnowWallduneWallregolithWallyellowStoneWallrhyoliteWallcarbonWallferricStoneWallberyllicStoneWallarkyicWallcrystallineStoneWallredIceWallredStoneWallredDiamondWallsandWallsaltWallshrubsshaleWallsporePinesnowPinepinewhiteTreeDeadwhiteTreesporeClusterredweedpurBushyellowcoralbouldersnowBouldershaleBouldersandBoulderdaciteBoulderbasaltBouldercarbonBoulderferricBoulderberyllicBoulderyellowStoneBoulderarkyicBouldercrystalClustervibrantCrystalClustercrystalBlockscrystalOrbscrystallineBoulderredIceBoulderrhyoliteBoulderredStoneBouldermetalFloormetalFloorDamagedmetalFloor2metalFloor3metalFloor4metalFloor5darkPanel1darkPanel2darkPanel3darkPanel4darkPanel5darkPanel6darkMetalpebblestendrilsoreCopperoreLeadoreScraporeCoaloreTitaniumoreThoriumoreBerylliumoreTungstenoreCrystalThoriumoreWallThoriumoreWallBerylliumgraphiticWalloreWallTungstenbuild1build2build3build4build5build6build7build8build9build10build11build12build13build14build15build16
Weathers
Contains weather effect symbols for use with weatherSense and weatherSet:
snowingrainsandstormsporestormfogsuspendParticles
Align
Contains alignment constants used for text drawing and marker alignments:
leftcenterrighttopLefttoptopRightbottomLeftbottombottomRight
Sounds
Contains sound effect ID constants used with playSound:
artillerypewbangboomlaserflameshotgunmissilespark- and other game sounds accessible via
Sounds.<name>
