0% found this document useful (0 votes)
2K views70 pages

Rusted Warfare - Unit Modding Reference

Mod reference

Uploaded by

javierdelpiani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2K views70 pages

Rusted Warfare - Unit Modding Reference

Mod reference

Uploaded by

javierdelpiani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 70

This sheet contains references to all relevant workshop-related

modding code as well as how to use them. Please read the table of
contents and the START section below if you are beginning modding

Use Ctrl + F (PC) or Search function (mobile) in


Table of Contents Section Type order to skip to a section you need, copy whats Function of section/code
listed exactly:

Sections with brackets and no name or number (like [core] )


you can only have 1 of Single [core] Core unit functions such as HP and death animation

Sections with NAME at the end can have multiples Multi canBuild_NAME Build queues for building new units
and be named
Single [graphics] Main image configuration and unit trails
Single [attack] Attack permissions against other units
MAX: 30 Multi turret_NAME Turret that follows attack permissions and uses projectile
Multi projectile_NAME Can be used by turret and can spawn more projectiles
Single [movement] Speed and movement type characteristics
Single [ai] How AI may use this unit, mostly for buildings
!!! Arm and Leg can ONLY use numbers Number leg_ OR arm_ Moveable cosmetics for mechs, infantry etc.
Multi attachment_ Units stacked onto original to make compound units
Multi action_NAME OR hiddenAction_NAME Actions that can do very wide range of things
Multi effect_NAME Visual effects spawned by unit that eventually disappear
Multi animation_NAME Animations for leg, arm or main body sprite
Not a section of its own List spawnUnits:LIST Lists you can form for spawning units
Not a section of its own List spawnProjectiles:LIST Lists you can form for spawning projectiles
Not a section of its own Logic logicBoolean_ Advanced logic to place across all logic fields
Multi placementRule_NAME Allows creation of rules for buildings
Not a section of its own List Prices/Resources Useable resources for prices using "price:" function
Multi global_resource_NAME Global resource collected by team shows up on top
Multi resource_NAME Local resource used by units can be used for ammo
Multi decal_NAME Versatile graphics can be stack to make 2.5D sprites
Use # before text to use in any section, example:
#This is a note in [core] Multi comment_NAME Used exclusively for notes, does not read anything

Multi template_NAME Used to create sections that can be referenced in unit


Is a file that you must create File NAME.template Create chains of unit files doesn't load unless copyFrom:
Is a file that you must create File all-units.template Put in root of mod, will apply to ALL unit .ini files
Is a file that you must create File mod-info.txt Put in root of mod, will change some settings of mod
Ref Projectile Draw Types Default projectiles able to use in [projectile_NAME]

In order to create an unit, you need to create a file with extension of .ini. It can be named anything, even with unicode characters,
START and it must be in your mod folder inside the rustedWarfare/mods/units/MODNAME folder -- Then, you add the sections in with the The unit file extension needed:
code

There are some lines of code that are required before a unit can be useable. These lines of code can be set to anything
Error for not having needed code:
appropriate, just need to have their fields filled out for initializing or it will give an error

!!! THESE ARE REQUIRED CODE !!! Example


Section Code Option
[core] name: ANY unit name
maxHp: 200 number
price: 500 number
mass: 50 number
radius: 16 number

[graphics] image: ANY.png image file

[attack] canAttack: true true, false


canAttackFlyingUnits: true true, false
canAttackLandUnits: true true, false
canAttackUnderwaterUnits: false true, false

[movement] movementType: NONE, LAND, AIR, WATER, HOVER, BUILDING, OVER_CLIFF, OVER_CLIFF_WATER

For starting out, it is recommended to check out the turret and projectile sections in order to get used to basic vanilla
! style units, but the modding reference offers a very wide range of things to change in your units, it's encouraged to take
your time and read everything

Version Section
[core]
Added Code Value Type Description Example

#==== #==== Necessary Code: will cause error if these are not included
Defines the unit raw name, game uses it to identify as a unique
name: string name: customTank1
name. (This is not displayed in-game)
The 'weight' of the unit, defines how it collides with other units,
mass: int mass: 3000
a greater value means it's tougher to push.
Circular area around the unit that makes it selectable. (mouse
radius: int radius: 20
click/screen touch)
The unit cost from builders/buildings. Defaults to credits if no
price: int / price price: 500, gold=5, stone=10
resource type is used
maxHp: int The max health for the unit. (will spawn with this value). maxHp: 200
#==== #==== Common Keys
buildSpeed: float / s Time it takes to build the unit. (may multiply with builder speed) buildSpeed: 3s
Reserved for future use, must be CustomUnitMetadata by
class: string class: CustomUnitMetadata
default.
Defines the Tech Level of the unit, there're 3 levels and each
techLevel: int techLevel: 1
will appear in a different color in the GUI.
Comma separated list of names. Like name but lower priority,
altNames: string(s) altNames: custTank1, customTank1, cTank1
useful for multiple optional mods.
Defaults to 0. 1 = Errors if keys are duplicated. Add to "all-
1.13.3 strictLevel: float strictLevel: 1
units.template" in root to apply to all units.
Choose whether the unit is bioligical or not, affects sound and
isBio: bool isBio: true
splat (unless hideScorchMark:true)
isBug: bool Changes some death defaults, and sort order in Sandbox. isBug: false
Normally required if this unit places buildings. Defaults to [ai]
1.13 isBuilder: bool isBuilder: true
useAsBuilder.
Like price but paid for overtime while this unit is being queued
1.15 streamingCost: price or built. Construction or queue is paused if resources run out streamingCost: gem=420
while building.
Shortcut to set streamingCost to price value and clear price,
1.15 switchPriceWithStreamingCost: bool add to all-units.template to quickly switch a mod over to switchPriceWithStreamingCost: true
streaming resources.
#==== #==== Unit Stats Keys
selfRegenRate: float Passive self repair rate. selfRegenRate: 0.01
The max shield hitpoints of the unit. Can start with 0 hitpoints if
maxShield: int maxShield: 500
startShieldAtZero:true.
startShieldAtZero: bool Unit starts with a 0 hitpoints shield on created if true. startShieldAtZero: true
shieldRegen: float Passive shield regen rate. shieldRegen: 0.15
Defaults to 0. Energy that can be used as ammo for turrets,
energyMax: float energyMax: 1
laser defense and actions.
energyRegen: float Passive energy regen rate. energyRegen: 0.001
Sets the percentage of charged energy when the unit is first
energyStartingPercentage: float energyStartingPercentage: 0.5
built.
Disables weapons using energy after reaching zero till fully
energyNeedsToRechargeToFull: float energyNeedsToRechargeToFull: true
recharged if true.
energyRegenWhenRecharging: float Regen rate while recharging.
Damage taken away from each hit. (not currently used in any
1.13 armour: int armour: 6
vanilla units)
1.13 armourMinDamageToKeep: int Min damage to keep from received damage. Defaults to 1. armourMinDamageToKeep: 2
Takes these resources when created and returns them when
1.13.3 borrowResourcesWhileAlive: price borrowResourcesWhileAlive: gold=10
removed or destroyed.
Like borrowResourcesWhileAlive but doesn't take affect till
1.15 borrowResourcesWhileBuilt: price built. Mostly useful for buildings like houses that have negative borrowResourcesWhileBuilt: supplyCap = -10
resources to add to the unit cap, etc.
1.13.3 generation_resources: price Income unit creates. (custom resource version) generation_resources: credits=5, gold=20
Disables generation_resources/credits when false.
1.13.3 generation_active: logicBoolean generation_active: if not self.hp(lessThan=100)
(logic_boolean)
generation_credits: int Income unit creates. (credits only) generation_credits: 2
How often generation_resources/credits is added. Defaults
generation_delay: int generation_delay: 40
to 40. (changing not recommended)
#==== #==== UI and Graphics Keys
showInEditor: bool Set to false to hide unit in Sandbox editor. (Defaults to true) showInEditor: false
displayText: LocaleString The unit name that the game shows to the player. displayText: Custom Tank
LANG = ISO 639-1 Code to show this text instead when game
1.13 displayText_{LANG}: string displayText_es: Tanque Personalizado
is in this language.
displayDescription: LocaleString Unit description that the game shows to the player. displayDescription: -Fast movement\n-Light damage
LANG = ISO 639-1 Code to show this text instead when game
1.13 displayDescription_{LANG}: string displayDescription_es: -Movimiento rápido\n-Daño ligero
is in this language.
displayLocaleKey: string Translation file key for unit name and description. displayLocaleKey: units.mechArtillery
Defaults to radius value. Set to show a larger or smaller
displayRadius: int displayRadius: 20
selection circle UI on units.
Defaults to displayRadius value. Radius used when
uiTargetRadius int uiTargetRadius: 10
attacking/reclaiming/etc this unit
Defaults is a little bigger than radius. Set to show a larger or
shieldRenderRadius: int shieldRenderRadius: 12
smaller shield circle on units.
shieldDisplayOnlyDeflection: bool Hide shield unless deflecting shot if true. shieldDisplayOnlyDeflection: true
Defaults to 4. High value causes shield deflection to fade
shieldDeflectionDisplayRate: float shieldDeflectionDisplayRate: 3
disappear faster.
1.13.3 showOnMinimap: bool Defaults to true. Hide units on minimap if false. showOnMinimap: false
Shows a merged action list if all units selected includes one of
1.13.3 showActionsWithMixedSelectionIfOtherUnitsHaveTag: bool showActionsWithMixedSelectionIfOtherUnitsHaveTag: true
these tags. Useful for converted units.
1.14 showOnMinimapToEnemies bool Useful for stealth units showOnMinimapToEnemies: false
#==== #==== Building Only Keys
isBuilding: bool Defines if the unit is a building. isBuilding: true
Left, up, right, down. Tiles taken up which block unit
footprint: ints footprint: 0,0,1,1
movement. Defaults to 0,0,0,0 = 1 center tile.
Tiles taken up for placement of other buildings. Defaults to
constructionFootprint: ints constructionFootprint: -1,-1,1,3
0,0,0,0 = 1 center tile.
Left, up, right, down. Only applies to buildings, just used for
displayFootprint: ints displayFootprint: 0,0,1,1
GUI. Defaults to footprint.
Defaults to 0. Adds or removes padding on the drawn selection
buildingSelectionOffset: int buildingSelectionOffset: 4
rect in UI.
Defaults to 10. Change the building position in the footprint on
buildingToFootprintOffsetX: float buildingToFootprintOffsetX: 4
the X-axis.
Defaults to 10. Change the building position in the footprint on
buildingToFootprintOffsetY: float buildingToFootprintOffsetY: 6
the Y-axis.
Normally used for extractors, forces building construction in a
placeOnlyOnResPool: bool placeOnlyOnResPool: true
resource pool.
selfBuildRate: float Rate unit builds itself when placed without a builder. selfBuildRate: 0.0008
defaults to true for buildings otherwise false. Set to true to not
1.14 ignoreInUnitCapCalculation ignoreInUnitCapCalculation: true
count this unit in unit cap.
#==== #==== Misc Keys
Uses unit data from another ini file as default for this unit,
copyFrom: file(s) (ini) copyFrom: ROOT:defaultTanks.template, tankT1.ini
supports multiple files.
Do not load unit, and don't error on missing data. Can be
dont_load: bool dont_load: true
useful when used with copyFrom.
Overrides another unit with this unit. Build links and map
overrideAndReplace: string(s) overrideAndReplace: builder, combatEngineer
positions to target unit will be replaced.
Values: emptyResourcePools_asNeutral,
emptyOrOccupiedResourcePools_asNeutral,
1.13.3 onNewMapSpawn: string onNewMapSpawn: spawnPoint_eachActiveTeam
mapCenter_asNeutral, mapCenter_eachActiveTeam,
spawnPoint_eachActiveTeam (1.15)
globalScale: float Defaults to 1. Changing not recommended. globalScale: 2
Disallow building of this unit. Can be used with
isLocked: bool isLocked: true
overrideAndReplace to restrict units player can build.
Disallows building of this unit if nukes are disabled during
1.13 isLockedIfGameModeNoNuke: bool isLockedIfGameModeNoNuke: true
match setup.
Tag unit as experimental. Affects zoomed out icon and end
experimental: bool experimental: true
game stats.
stayNeutral: bool Set to false to disable capture when unit is on the neutral team. stayNeutral: false
1.13 createNeutral: bool Set to true to always spawn the unit on the neutral team. createNeutral: true
Set to true to always spawn the unit on aggressive teams on
createOnAggressiveTeam: bool createOnAggressiveTeam: true
single player matches.
List of comma separated strings. Used to classify units, create
1.13 tags: string(s) tags: tank, smallTank, piercingDamage
special actions and balances.
defineUnitMemory: boolean nukeActive, boolean laserReady, float experience, unit nextTarget, unit
Can define several variables for custom storage, unique for
1.15 homeBase, string customText
each unit. Allowed types: boolean, float/number, unit, string.

defineUnitMemory
Add a pair of square brackets to turn them into arrays for those
1.15p11 defineUnitMemory: unit[] squad, float[] mango
specific data types

Sets number of tiles this unit can see through the fog of war.
fogOfWarSightRange: int fogOfWarSightRange: 35
Defaults to 15.
Fog of War range when unit/building is incomplete. Defaults to
1.14 fogOfWarSightRangeWhileNotBuilt int fogOfWarSightRangeWhileNotBuilt: 10
fogOfWarSightRange
softCollisionOnAll: int Creates a soft collision effect when touching other units. softCollisionOnAll: 3
disableAllUnitCollisions: bool Unit cannot collide with others if true. disableAllUnitCollisions: true
1.13 isUnrepairableUnit: bool No unit can repair this unit if true. isUnrepairableUnit: true
isUnselectable: bool If true unit cannot be selected. (includes AI players) isUnselectable: true
Defaults to isUnselectable. Can be used to create units that
1.14 isUnselectableAsTarget bool isUnselectableAsTarget: false
cannot be selected but can be targeted for attack, reclaim, etc
If true, unit is added to dropdowns for starting unit in game
1.13 isPickableStartingUnit: bool isPickableStartingUnit: true
setup menus.
1.13 startFallingWhenStartingUnit: bool Unit will appear falling from skies when starting unit if true. startFallingWhenStartingUnit: true
List of sound names. Only one will be played on each attack
soundOnAttackOrder: sound(s) soundOnAttackOrder: tankAttackOrder1.ogg, tankAttackOrder2.ogg
order. Only .ogg and .wav formats.
List of sound names. Only one will be played on each move
soundOnMoveOrder: sound(s) soundOnMoveOrder: tankMoveOrder1.ogg, tankMoveOrder2.ogg
order. Only .ogg and .wav formats.
List of sound names. Only one will be played on each unit
1.13.3 soundOnNewSelection: sound(s) soundOnNewSelection: tankSelection1.ogg, tankSelection2.ogg
selection. Only .ogg and .wav formats.
No unit can directly target this unit. If true this will also skip this
canNotBeDirectlyAttacked: bool unit in victory/defeat checks. If true, canNotBeDamaged is canNotBeDirectlyAttacked: true
true by default
Defaults to value of canNotBeDirectlyAttacked (be careful
canNotBeDamaged bool setting this without canNotBeDirectlyAttacked, as AI will attack canNotBeDamaged: true
forever)
1.13.3 canNotBeGivenOrdersByPlayer: bool If true unit will not take player or AI orders. canNotBeGivenOrdersByPlayer: true
List of tag strings, only units with these tags can directly target
1.13.3 canOnlyBeAttackedByUnitsWithTags: strings(s) canOnlyBeAttackedByUnitsWithTags: piercingTank, powerfulTank
this unit.
Setting to true allows unit to continue living even at 0 HP,
1.14 disableDeathOnZeroHp bool useful for custom "death" action. Warning: If not used with an disableDeathOnZeroHp: true
autoTrigger, etc units will attack this unit forever.
When true, it lets to be captured on contact by AI as well.
1.15p9 allowCaptureWhenNeutralByAI bool allowCaptureWhenNeutralByAI: true
Defaults as false
#==== #==== Transport Keys
Defaults to 1. Number of slots this unit uses up in a transport,
1.13 transportSlotsNeeded: int transportSlotsNeeded: 2
experimentals are often set to 5.
maxTransportingUnits int Number of slots this units has for transporting other units. maxTransportingUnits: 5
transportUnitsRequireTag: string(s) Only allows trasport of units that have one of these tags. transportUnitsRequireTag: smallTank, soldier

1.13
Only allows trasport of units that have one of these movement
transportUnitsRequireMovementType: movementTypes transportUnitsRequireMovementType: AIR, WATER
types.
transportUnitsBlockAirAndWaterUnits: bool Defaults to true. This unit can only transport LAND units if true. transportUnitsBlockAirAndWaterUnits: false
Defaults to false. Units in this transport occupy 1 slot always if
transportUnitsEachUnitAlwaysUsesSingleSlot: bool transportUnitsEachUnitAlwaysUsesSingleSlot: true
1.13 true, ignoring transportSlotsNeeded.
Makes built units stay inside transport instead of exiting it once
transportUnitsKeepBuiltUnits: bool transportUnitsKeepBuiltUnits: true
ready if true.
Defaults to: if not self.isOverLiquid() and not self.isMoving().
transportUnitsCanUnloadUnits: LogicBoolean transportUnitsCanUnloadUnits: false
This unit cannot unload units if false.
transportUnitsAddUnloadOption: bool Defines if unload button should be added to the unit menu transportUnitsAddUnloadOption: false
Changes the delay it takes between each unit getting
1.13.3 transportUnitsUnloadDelayBetweenEachUnit: float transportUnitsUnloadDelayBetweenEachUnit: 12
unloaded.
Defaults to true. If false transported units don't die when
1.13 transportUnitsKillOnDeath: LogicBoolean transportUnitsKillOnDeath: if self.isOverLiquid()
transport dies.
1.13 transportUnitsHealBy: float Rate to heal units that are being transported. transportUnitsHealBy: 0.1
Defaults to true, if false this transports can hold other
transportUnitsBlockOtherTransports: bool transportUnitsBlockOtherTransports: false
transports.
whileNeutralTransportAnyTeam: bool This unit can transport units of any team while neutral if true. whileNeutralTransportAnyTeam: true
Converts this unit to transported team while neutral. Useful
whileNeutralConvertToTransportedTeam: bool whileNeutralConvertToTransportedTeam: true
with whileNeutralTransportAnyTeam.
1.13.3 Reverts back this unit to neutral when unloaded. Useful with
convertToNeutralIfNotTransporting: bool convertToNeutralIfNotTransporting: true
whileNeutralTransportAnyTeam.
Keeps transported units on their orginal team when this unit is
transportUnitsOnTeamChangeKeepCurrentTeam: bool transportUnitsOnTeamChangeKeepCurrentTeam: true
converted if true.
1.13.3 #==== #==== Resource Node Keys
Used with canReclaimResources. Allows other teams to
resourceRate: float reclaim this unit. Normally used with neutral team. Use price to resourceRate: 100
set what resources are gained.
When this has been reclaimed harvester unit moves on to
similarResourcesHaveTag: string(s) similarResourcesHaveTag: goldResource
another resource with these tags.
Defaults to unlimited. Set to restict how many units can reclaim
resourceMaxConcurrentReclaimingThis: int resourceMaxConcurrentReclaimingThis: 3
this resource at the same time.
1.13.3
reclaimPrice: int Like price but for resources. Useful for buildable resources. reclaimPrice: gold=1000
#==== #==== Resource Harvester Keys
If true this unit can gather resources, useful with
canReclaimResources: bool canReclaimResources: true
resourceRate.
Defines the resource search range of this unit when its main
canReclaimResourcesNextSearchRange: int canReclaimResourcesNextSearchRange: 100
gathered resource runs out.
canReclaimResourcesOnlyWithTags: string(s) This unit is only allowed to gather resources with these tags. canReclaimResourcesOnlyWithTags: foodResource, goldResource
This is for reclaiming units, not for resources. See
canReclaimUnitsOnlyWithTags string(s) canReclaimUnitsOnlyWithTags: reclaimable
canReclaimResourcesOnlyWithTags
Multiplies the builder's reclaim speed. Different from the related
1.15 resourceReclaimMultiplier float resourceReclaimMultiplier: 1.5
key "nanoUnbuildSpeed"
#==== #==== Construction and Factory Keys
canRepairUnitsOnlyWithTags string(s) Repairs units with the specified tags canRepairUnitsOnlyWithTags: vulnerable
canRepairBuildings: bool Can this can heal ally buildings (isBuilder:true is required) canRepairBuildings: true
Can this can heal ally units. (isBuilder:true is required),
canRepairUnits: bool canRepairUnits: true
canRepairBuildings required for buildings.
Automatically try and repair damaged units in nano range.
autoRepair: bool autoRepair: true
(isBuilder:true is required)
nanoRange: int Defaults to 85. Defines the unit building/repair/reclaim range. nanoRange: 110
nanoRepairSpeed: float Defaults to 0.2. Defines the unit nano repair/reclaim speed. nanoRepairSpeed: 0.01
Defaults to 1. Defines the unit nano building speed. (May
nanoBuildSpeed: float nanoBuildSpeed: 0.9
multiply with target's buildSpeed)
How fast a builder reclaims an incomplete building (defaults to
nanoUnbuildSpeed: float nanoUnbuildSpeed: 1.4
1.15 1)
nanoReclaimSpeed: float How fast a builder reclaims a normal unit (not a resource unit) nanoReclaimSpeed: 0.23
nanoRangeForRepairIsMelee: bool Defines if this unit must touch its target to repair it. nanoRangeForRepairIsMelee: true
nanoRangeForReclaimIsMelee: bool Defines if this unit must touch its target to reclaim it. nanoRangeForReclaimIsMelee: true
1.13.3
nanoRangeForRepair: int Defines a specific range for the repair action of this unit. nanoRangeForRepair: 60
nanoRangeForReclaim: int Defines a specific range for the reclaim action of this unit. nanoRangeForReclaim: 60
Defaults to 1. Multiplies the buildSpeed value of the created
nanoFactorySpeed: float nanoFactorySpeed: 1.2
unit if this unit is a factory.
Temporarily adds extra build range to builders to build this unit.
extraBuildRangeWhenBuildingThis: int extraBuildRangeWhenBuildingThis: 90
Useful for water based buildings.
Useful if adding this unit to build to existing buildings. Like
builtFrom_{NUM}_name: string(s) builtFrom_1_name: landFactory, airFactory
canBuild but in opposite direction.
Order this build link appears in UI. Using canBuild instead is
builtFrom_{NUM}_pos: float builtFrom_1_pos: 0.1
more recommended.
builtFrom_{NUM}_forceNano: bool Build as if this is a building if true. (even if it's a unit) builtFrom_1_forceNano: true
If true this unit cannot be built in this build link. (can be
builtFrom_{NUM}_isLocked: LogicBoolean builtFrom_1_isLocked: if self.hp(lessThan=100)
1.13.3 conditioned if logicBooleans are used)
builtFrom_{NUM}_isLockedMessage: LocaleString Message shown when this build link is locked. builtFrom_1_isLockedMessage: -Needs more population
Where created or unloaded units appears from the transport or
exit_x: float exit_x: 0
building. Defaults to 0.
Where created or unloaded units appears from the transport or
exit_y: float exit_x: 5
building. Defaults to 5.
Defaults to 180 for units and 0 for buildings. Defines the exit
exit_dirOffset: float exit_dirOffset: 140
direction of created or unloaded units.
Defaults to 0. Defines the height where created or unloaded
1.13 exit_heightOffset: float exit_heightOffset: 16
units appears.
Defaults to 70. Defines the distance that created or unloaded
exit_moveAwayAmount: float exit_moveAwayAmount: 10
units moves from this unit.
Ignores parent height for exit height; useful for separating
1.14 exitHeightIgnoreParent bool exitHeightIgnoreParent: true
attachments with their parents for building
#==== #==== Death Keys
Deletes this unit when it starts to build if true. (target
dieOnConstruct: bool dieOnConstruct: true
building/unit likely will need selfBuildRate set)
1.13 dieOnZeroEnergy: bool Kills this unit if energy level reaches zero when true. dieOnZeroEnergy: true
Defines the number of scattered bit fragments when this unit
numBitsOnDeath: int numBitsOnDeath: 20
dies.
Unit will spawn a nuke detonation built-in effect when dies if
nukeOnDeath: bool nukeOnDeath: true
true.
nukeOnDeathRange: float Defines the nuke effect range when using nukeOnDeath. nukeOnDeathRange: 140
Defines the nuke effect area damage when using
nukeOnDeathDamage: float nukeOnDeathDamage: 2000
nukeOnDeath.
Defaults to false. If true this unit will not explode with nuke
nukeOnDeathDisableWhenNoNuke: bool nukeOnDeathDisableWhenNoNuke: true
when nukes are disabled in skirmish maps.
fireTurretXAtSelfOnDeath: turret ref Auto-shoot a specific turret when this unit dies. fireTurretXAtSelfOnDeath: turret_1
Defaults to true. Disables the unit death explode built-in effect
explodeOnDeath: bool explodeOnDeath: false
if false.
1.13
Defaults to true. Disables the explode built-in effect on death
explodeOnDeathGroundCollision: boolean explodeOnDeathGroundCollision: false
when unit touches ground if false.
options: verysmall, small, normal, large, largeUnit, building,
1.14 explodeTypeOnDeath: preset effects buildingNoShockwaveOrSmoke, verylargeBuilding
effectOnDeath: effect(s) ref Spawns built-in or custom effects when unit dies. effectOnDeath: shockwave, CUSTOM:pieces*3, CUSTOM:deathSound
Like effectOnDeath but when unit touches ground. Useful for
effectOnDeathGroundCollision: effect(s) ref effectOnDeathGroundCollision: CUSTOM:bigExplosion
1.13 flying units.
Spawns these units when dies. Comma separated unit
unitsSpawnedOnDeath: string(s) unitsSpawnedOnDeath: tank*5, hoverTank
identifiers.
Units spawned on death will appear on the last attacker team if
unitsSpawnedOnDeath_setToTeamOfLastAttacker: bool unitsSpawnedOnDeath_setToTeamOfLastAttacker: true
true.
hideScorchMark: bool Disables the death scorch mark leaved when unit dies if true. hideScorchMark: true
soundOnDeath: string(s) Sets a custom sound for this unit death. soundOnDeath: tankExplosion1.ogg, tankExplosion2.ogg
If the unit was not completed, and is destroyed, play this effect.
1.14 effectOnDeathIfUnbuilt: effect(s) ref effectOnDeathIfUnbuilt: CUSTOM:implode
Defaults to effectOnDeath
#==== #==== Action Keys
Post automatic action cooldown (Not detection cooldown).
autoTriggerCooldownTime: time (seconds) Defaults to 1s. Warning: Setting this too low for many units autoTriggerCooldownTime: 0.05s
1.13.3 might effect performance depending on the action effects.
Allows for auto action cooldown lower than 0.2s. Default to
autoTriggerCooldownTime_allowDangerousHighCPU: bool autoTriggerCooldownTime_allowDangerousHighCPU: true
false. Not recommended.
options: everyFrame (default), every4Frames, every8Frames. Note:
all triggers regardless of check rate are checked when first created
1.15 autoTriggerCheckRate: enum and after an auto trigger cooldown. Note: Adding [core] autoTriggerCheckRate:every8Frames
autoTriggerCheckRate:every8Frames to all-units.template could have
a large performance boost for mods with complex autoTriggers.
Defaults to false. autoTrigger of unit actions check even when not
1.15 autoTriggerCheckWhileNotBuilt: bool completely built if true
autoTriggerCheckWhileNotBuilt: true
Faster memory update than [action_#] setUnitMemory. Useful on
updateUnitMemory: memory many applications.
updateUnitMemory: timeCount = (1 + memory.timeCount)
1.15p10
Sets how often the memory is updated. Defaults at 1s. settings it to 0
updateUnitMemoryRate: int will update memory every frame.
updateUnitMemoryRate: 0

A template-friendly method of defineUnitMemory. Declare name @memory fish:unit


1.15 @memory followed by type, separated by a colon @memory bullets:number
1.15p11 Add a pair of square brackets for array memory type @memory myTargets:unit[]

#==== #==== Deprecated Keys (can be used but there are better ways)
action_#_convertTo: string Deprecated in 1.13, use [action_x] sections instead action_1_convertTo: customTank_2
action_#_pos: float Order action appears in UI action_1_pos: 0.1
The price of your action for the unit. (All your sub actions will
action_#_price: int action_1_price: 1000
be linked to the # you use)
A display text when you select your unit's action, used to
action_#_text: string action_1_text: Upgrade to Custom Tank 2
depr. 1.13 explain it's purpose.
action_#_description: string The action description. action_1_description: -Converts the tank
action_#_addEnergy: float Adds energy to unit. Has no effect unless energyMax is set action_1_addEnergy: 10
Stops unit moving while action is being applied. Useful for
action_#_whenBuilding_cannotMove: bool action_1_whenBuilding_cannotMove: true
deploy like actions.
canBuild_#_name/pos/isLocked: string Use canBuild section instead. canBuild_1_name: tank

Section
[canBuild_NAME]
Code Value Type Description Example
List of unit identifiers this unit can create. Can be buildings or
name: string(s) name: setRally, tank, hoverTank, heavyTank
units. Add "setRally" to create a rally button
pos: float Order build link appears in this unit UI. pos: 0.1
Tech level. Mostly just affects build link colour in this unit UI.
tech: int tech: 2
Defaults to 1.
forceNano: bool Builds target as if it was a building if true. (even if it's a unit) forceNano: true
isVisible: LogicBoolean Hide this build link if true in this unit UI. isVisible: if not self.energy(greaterThan=100)
Dynamically locks this build option and shows
isLocked: LogicBoolean isLocked: if self.hp(lessThan=100)
isLockedMessage if true.
isLockedMessage: string Set to tell to players why a unit is locked. isLockedMessage: -Needs 2 Barracks
LANG = ISO 639-1 Code to show this text instead when game
1.13.3 isLockedMessage_{LANG}: string isLockedMessage_es: -Necesita 2 Cuarteles
is in this language.
Another reason for this to be locked. Just allows a different
isLockedAlt: LogicBoolean isLockedAlt: if self.energy(greaterThan=90)
message to be shown.
isLockedAltMessage: string Message for isLockedAlt. isLockedAltMessage: -Needs less energy
isLockedAlt2: LogicBoolean Like isLockedAlt but to show one more message. isLockedAlt2: if self.isMoving()
isLockedAlt2Message: string Message for isLockedAlt2. isLockedAlt2Message: -Needs to be quiet
Adds these resources to self when placing the building or
addResources: price(s) addResources: ammo=5, setFlag=1
producing the unit.
Overrides builded units/buildings price. Defaults to target unit
price: price(s) price: credits=1000, ammo=5
prices.
isGuiBlinking: LogicBoolean Generates a blinking effect in UI if true. isGuiBlinking: true

Section
[graphics]
Code Value Type Description Example
#==== #==== Necessary code
file (image) image:
#==== #==== Common Keys
image: file (image) File path to png image. image: body.png
How pixels are used for team coloring, options: pureGreen,
1.13 teamColoringMode: (Defaults to pureGreen if no code) teamColoringMode: disabled
hueAdd, hueShift, disabled
An optional image drawn behind other units. Useful for
image_back: file (image) image_back: floor.png
factories that units exit
1.14 image_shield file (image) Image to show as a custom shield image_shield: forcefield.png
image_wreak: file (image) Image to use when unit dies. Can be NONE to leave no wreak image_wreak: ded.png
Use this to adjust the graphics of a unit if it is too far off one
image_offsetX: int image_offsetX: 21
side
Use this to adjust the graphics of a unit if it is too far off one
image_offsetY: int image_offsetY: 41
side
Use this to adjust the height of the graphic, especially when
image_offsetH: int image_offsetH: 25
using decals
1.15p9
Fixes of by 1 pixel sizing for images with widths and/or height
image_floatingPointSize int image_floatingPointSize: 10
that has odd value
1.13.3 isVisible logic If false will hide the unit. isVisible: false
Only visible to player and allies when false. Recommend with
1.14 isVisibleToEnemies bool isVisibleToEnemies: false
showOnMinimapToEnemies. Useful for stealth units.
Resize image to fit this value in pixels. Effects leg, and
scaleImagesTo: float scaleImagesTo: 1
shadow images as well.
Resize image. Defaults to 1. Effects leg, and shadow images
imageScale: float imageScale: 1
as well.
Land units normally default to ground or ground2 if transport.
drawLayer: string Options: wreaks, underwater, bottom, ground, ground2, drawLayer: bottom
experimentals, air, top
How long the transparent effect is applied to incomplete units,
1.13 whenBeingBuiltMakeTransparentTill float whenBeingBuiltMakeTransparentTill: 0.4
set to 0 to disable completely. Default: 1
Sets the custom image of the unit icon on the zoomed out
icon_zoomed_out file (image) icon_zoomed_out: unitIcon.png
battle map
Sets wheather show the unit icon or not on the zoomed out
icon_zoomed_out_neverShow bool icon_zoomed_out_neverShow: false
battle map
icon_build file (image) Displays icon of the unit on Build Panel icon_build: iconFish.png
#==== #==== Turrets (images can also be set on each turret)
image_turret: file (image) Default image for all turrets, can also be set per turret image_turret: gun.png
Defaults false. Apply team colours on turret as well. Also
teamColorsOnTurret: bool teamColorsOnTurret: true
effects pre-turret images
Will cause crash if image_turret is not specified, even if image
scaleTurretImagesTo: float scaleTurretImagesTo: 1.2
is set per turret
Locks body image locked to the direction of the turret named
lock_body_rotation_with_main_turret: bool "1" (turret_1) or the first turret defined (if a turret_1 is not lock_body_rotation_with_main_turret: true
defined)
Locks legs and arms to the direction of the turret named "1"
1.13 lock_leg_rotation_with_main_turret bool lock_leg_rotation_with_main_turret: true
(turret_1) or the first turret defined (if a turret_1 is not defined)
#==== #==== Shadow
Image file, NONE, AUTO or AUTO_ANIMATED. (AUTO will
image_shadow: file (image) image_shadow: shadow.png
use image and make it transparent black only.)
shadowOffsetX: float Adjusts shadow horizontally shadowOffsetX: 10
shadowOffsetY: float Adjusts shadow vertically shadowOffsetY: 10
If shadow image should use frame animation of main image. .
1.13.3 image_shadow_frames bool image_shadow_frames: true
Alternative to AUTO_ANIMATED shadow value.
lock_shadow_rotation_with_main_turret: bool Locks body image shadow locked to first turret's direction lock_shadow_rotation_with_main_turret: true
#==== #==== Effects and animation
total_frames int Defaults to 1. Animations require this. total_frames: 3
frame_width: int Calculated for you if total frames is set, but can be overridden frame_width: 40
frame_height: int Defaults to image height frame_height: 60
1.14? default_frame int Default frame when not playing an animation. First frame is 0 default_frame: 0
True to create a water wave effect when over water. Default
splastEffect: bool splastEffect: true
false
dustEffect: bool True to create a dust effect when over land. Default false dustEffect: true
splastEffectReverse: bool True to also create effect when unit is reversing splastEffectReverse: true
dustEffectReverse: bool True to also create effect when unit is reversing dustEffectReverse: true
1.13 movementEffect effect Custom movement effect, can be anything movementEffect: smoke, CUSTOM:fastDust*2, CUSTOM:pop*5
1.13 movementEffectReverse effect Reversed version of movementEffect: key movementEffectReverse: smoke, CUSTOM:fastDust*2, CUSTOM:pop*5
1.13 movementEffectRate float Sets the frequency of effects being spawned while moving movementEffectRate: 10
1.13 movementEffectReverseFlipEffects bool Create effect as if unit has rotated 180 when reversing movementEffectReverseFlipEffects: true
Custom repair effect, can be anything. Replaces default effect
repairEffect effect ref repairEffect: CUSTOM:mist*5
from builders
repairEffectAtTarget effect Custom repair effect towards the repaired target repairEffectAtTarget: CUSTOM:greensparks*2
Sets the frequency of effects being spawned while repairing.
repairEffectRate int repairEffectRate: 20
Defaults to 5, affects both sides.
Custom reclaim effect, can be anything. Replaces default
1.13.3 reclaimEffect effect reclaimEffect: CUSTOM:sap*5
effect from builders
1.13.3 reclaimEffectAtTarget effect Custom reclaim effect towards the reclaimed target reclaimEffectAtTarget: CUSTOM:redsparks*2
Sets the frequency of effects being spawned while reclaiming.
1.13.3 reclaimEffectRate int reclaimEffectRate: 20
Defaults to 5, affects both sides.
Defaults to true. Makes unit body image locked to 0 degrees
rotate_with_direction: bool rotate_with_direction: false
when false. Often used with animation_direction_*
45 for 8 directions, 90 for 4 direction animation. Used with
animation_direction_units: float animation_direction_units: 45
rotate_with_direction:false
animation_direction_strideX: int Animation frames to offset on direction change. animation_direction_strideX: 40
Animation frames to offset on direction change. Used with
animation_direction_strideY: int animation_direction_strideY: 60
frame_height.
animation_direction_starting: float Direction for first frame animation_direction_starting: 90
#==== #==== Show and Hide
Defaults to false. When true, removes the flames on severely
1.13.3 disableLowHpFire bool disableLowHpFire: false
damaged unit/structure.
Defaults to false. When true, removes the smokes on severely
1.13.3 disableLowHpSmoke bool disableLowHpSmoke: false
damaged unit/structure.
1.13.3 showTransportBar: bool Defaults to true. Shows the transport bar for transport units. showTransportBar: false
Defaults to true. Shows the health bar of a unit. (Still hidden
1.13.3 showHealthBar bool even if true when "Always show unit health" setting is showHealthBar: false
disabled.)
1.13.3 showEnergyBar bool Defaults to true. Shows the energy bar of a unit. showEnergyBar: false
Defaults to true. Shows the shield bar of a unit. Also affects the
1.14 showShieldBar bool showShieldBar: false
presence of set custom shield sprite.
Defaults to true. Shows the bar for build or action queue of a
1.14 showQueueBar bool showQueueBar: false
unit.
Defaults to true. Shows the shot delay/warmup of a unit before
1.15 showShotDelayBar bool showShotDelayBar: false
firing.
1.15p9 showSelectionIndicator bool Defaults to true. Shows select circle/box if true showSelectionIndicator: false
Deprecated Keys (can be used but there are better, more
#==== #====
adaptable ways)
False: Green pixels on unit gets converted to team color. True:
teamColorsUseHue: bool
Whole unit is tinted the team colour. Defaults to false
TYPE can be set to: attack, moving, idle. Use [animation]
depr. 1.13 animation_TYPE_start: int animation_moving_start: 0
section instead for more control
depr. 1.13 animation_TYPE_end: int End frame, must be larger then start animation_moving_end: 3
Scale unit image. Defaults to 1. Useful for bio units or
depr. 1.13 animation_TYPE_scale_start: float
breathing effects.
Scale unit image. Defaults to 1. Useful for bio units or
depr. 1.13 animation_TYPE_scale_end: float
breathing effects.
Delay for each frame of animation. Larger values cause slower
depr. 1.13 animation_TYPE_speed: float
animation
Play animation in reverse before repeating. Useful with
depr. 1.13 animation_TYPE_pingPong: bool
scale_start/scale_end

Section
[attack] The attack section is for global attack characteristics, per-turret overrides these

Code Value Type Description Example


If set to false, can not attack any unit. Overrides other
canAttack: bool canAttack: true
canAttack options altogether.
can also be narrowed per turret. Note: not required if canAttack
canAttackFlyingUnits: LogicBoolean canAttackFlyingUnits: false
is false.

canAttackLandUnits: LogicBoolean can also be narrowed per turret in [turret_NAME] canAttackLandUnits: true

canAttackUnderwaterUnits: LogicBoolean can also be narrowed per turret in [turret_NAME] canAttackUnderwaterUnits: false
maxAttackRange: float (multiplied by globalScale) maxAttackRange: 300
Global delay, can also use delay on each turret. Set in seconds
shootDelay: float shootDelay: 21, shootDelay: 5s
or ticks
Default true. If false unit can only attack units in contact with
canAttackNotTouchingWaterUnits: LogicBoolean the water. Used for units with torpedos. (can also be set per canAttackNotTouchingWaterUnits: false
turret)
1.13.3 canOnlyAttackUnitsWithTags tags Will only attack units that has the specified tags. canOnlyAttackUnitsWithTags: metallic, ceramic
1.13.3 canOnlyAttackUnitsWithoutTags tags Can only attack units without the specified tags. canOnlyAttackUnitsWithoutTags: corrosive, magnetic
Allow each turrets to fire at a different target at the same time.
1.13 turretMultiTargeting bool turretMultiTargeting: true
Very useful if [turret]limitingAngle is used
Used with a low attack range (like maxAttackRange: 9) makes
isMelee: bool isMelee: true
src and target radius get added to range, and effects AI.
Makes unit move to attack nearby units. Defaults to 250 for
1.13.3 meleeEngangementDistance int melee, and 0 for non melee (Works even if non-melee, but meleeEngangementDistance: 400
might be unexpected to players)
turretRotateWithBody bool Are all turrets rotated when body rotates. Defaults to true turretRotateWithBody: true
normal/bomber. bomber attack movement will retreat when
attackMovement: string attackMovement: bomber
energy runs out
dieOnAttack: bool Will die when it attacks. dieOnAttack: true
Must aim body at target to shoot. Will often make the unit need
isFixedFiring: bool isFixedFiring: true
to stop before it can aim and shoot.
Offset each shot multiplied by target radius. Defaults to 0.6.
aimOffsetSpread: float aimOffsetSpread:0
aimOffsetSpread:0 will make unit always attack center
1.13 stopTargetingAfterFiring bool Unit stops targeting after firing a shot. Rarely used or needed. stopTargetingAfterFiring: true
Unit only attacks manually ordered target. Rarely used or
disablePassiveTargeting: bool disablePassiveTargeting: true
needed.
Will it show the range indicator. Useful for showing ranges in
1.13.3 showRangeUIGuide bool showRangeUIGuide: true
radar and related structures.
1.15 shootDelayMultiplier float Defaults to 1. Can be dynamically changed with setUnitStats shootDelayMultiplier: 0.75
1.15 shootDamageMultiplier float Defaults to 1. Can be dynamically changed with setUnitStats shootDamageMultiplier: 2.43
Deprecated Keys - can be used but better to set these per
#==== #====
turret
depr. 1.13 turretSize: float (multiplied by globalScale)
depr. 1.13 turretTurnSpeed: float

Section
[turret_NAME] Turrets fire projectiles with different traits

Code Value Type Description Example


#==== #==== Necessary Code
float x:
float y:
#==== #==== Positioning/Stats

Sets the horizontal position of the turret. 0 is center, negatives


x: float x: 0
toward left, positives toward right.
Sets the vertical position of the turret. 0 is center, negatives
y: float y: 40
toward bottom, positives toward top.
Copy all values from another turret as defaut values for this
copyFrom: turret ref copyFrom: 1
turret
projectile projectile ref Projectile fired from this turret. projectile: torpedo
Alternative projectile fired from this turret when
altProjectile projectile ref altProjectile: spear
altProjectileCondition is true
altProjectileCondition LogicBoolean Used with altProjectile altProjectileCondition: if self.hp() < 100
1.13 barrelX float Defaults to 0. Controls horizontal position for projectile spawn. barrelX: 0
Defaults to size. Note: size and barrelY have the same
1.13 barrelY float barrelY: 5
meaning
Height of barrel in 3d. Effect projectile and shoot flame starting
1.13.3 barrelHeight float barrelHeight: 10
height
1.15p9 height: float Height of the unit in 3D, to be used with decals height: 30
Controls the distance between the center of the turret and the
size: float size: 5
point from where projectiles spawn.
turnSpeed float Max turn speed of the turret turnSpeed: 2
turnSpeedAcceleration float Defaults to disabled, and full turn speed is used. turnSpeedAcceleration: 0.4
Defaults to turnSpeedAcceleration. Setting this higher than turn
turnSpeedDeceleration float turnSpeedDeceleration: 0.2
acceleration might allow faster targets to be hit
idleDir float Defaults to 0 idleDir: 180
Defaults to idleDir+180 unless attached to another turret (as
1.13 idleDirReversing float idleDirReversing: 30
attached turret will often be rotating when reversing)
Defaults true. False to disable the reseting turret angle when
shouldResetTurret: bool shouldResetTurret: false
idle
idleSpin: float Spin rate when idle, used on missile turrets idleSpin: 2
Disabled by default. Controls how far the turret will "look" left
1.14 idleSweepAngle int idleSweepAngle: 35
and right
1.14 idleSweepDelay float Controls the delay between idleSweep movements idleSweepDelay: 20
1.14 idleSweepSpeed float Controls the speed with which the turret sweeps when idle idleSweepSpeed: 0.3
1.14 idleSweepCondition LogicBoolean Disable idle sweep if false idleSweepCondition: if self.hp() > 400
Default 1-20 depends on idleSweepDelay, used to stop sweep
1.14 idleSweepAddRandomDelay float idleSweepAddRandomDelay: 30
syncing up with other units
1.14 idleSweepAddRandomAngle int Default 0 idleSweepAddRandomAngle: 15

A specific turret to connect to, it will rotate with it. No


attachedTo: turret ref attachedTo: base
correlation to [attachment_x]

Locks this turret's direction and shot cooldown to attached


slave: bool slave: true
turret. Often used with warmup for multiple barrel guns
Defaults to false. Turret to use for creating buildings, etc.
isMainNanoTurret: bool should only be true on one turret, and should have canShoot isMainNanoTurret: true
set to false
Required energy to fire weapon. Same as resourceUsage:
energyUsage: float energyUsage: 1
energy=X
resourceUsage price can be in credits/energy/hp/shield/ammo. Stops firing if not met resourceUsage: credits=5, energy=5, hp=100, shield=5, ammo=1
#==== #==== Timing
delay: float Override global shootDelay for this turret delay: 2s
When this other turret fires the cooldown delay on this turret
linkDelayWithTurret turret ref linkDelayWithTurret: 1
will be reset/removed
warmup: float Delay before firing a shot. warmup: 5s
Rate to reduce warmup when turret is not ready to fire at any
warmupCallDownRate float warmupCallDownRate: 10
targets
Defaults to false. When true warmup is not reset after firing a
warmupNoReset bool shot and turret doesn't wait for warnup. Used with warmupNoReset: true
warmupCallDownRate and warmupShootDelayTransfer.
Defaults to 0, amount to reduces the next shot delay
warmupShootDelayTransfer float depending on warmup. When used with warmupNoReset, can warmupShootDelayTransfer: 20
make a each shot faster.
#==== #==== On Shoot
1.13.3 onShoot_freezeBodyMovementFor: float Freezes body movement while shooting. onShoot_freezeBodyMovementFor: 2s
0 by default. Sets a barrelX offset only during odd numbered
1.14 barrelOffsetX_onOddShots: float shots, useful for twin-barreled units. Use with barrelX. Use the barrelOffsetX_onOddShots: -10
opposite value of barrelX for most cases.
#==== #==== Targeting control
Sets the shot inaccuracy. 0 will make all shots land on target's
1.14 aimOffsetSpread: aimOffsetSpread: 14
center
canShoot: bool Defaults to true canShoot: true
Narrows targeting for this turret, note targeting for the whole
canAttackFlyingUnits: LogicBoolean unit in [attack] is applied first. (so you can only use this to canAttackFlyingUnits: false
target less not more)
canAttackLandUnits: LogicBoolean Default true. If false unit cannot attack surface units. canAttackLandUnits: true
canAttackUnderwaterUnits: LogicBoolean Default true. If false unit cannot attack underwaterunits. canAttackUnderwaterUnits: true
Default true. If false unit can only attack units in contact with
canAttackNotTouchingWaterUnits: LogicBoolean canAttackNotTouchingWaterUnits: false
the water. Used for units with torpedos.
1.13.3 canOnlyAttackUnitsWithTags: tags Only attacks potential targets with specific tags canOnlyAttackUnitsWithTags: shelled, armoured
1.13.3 canOnlyAttackUnitsWithoutTags: tags Only attacks potential targets without specific tags canOnlyAttackUnitsWithoutTags: corrosive, fleshy
Normally, used to optionally disable a turret based on a
canAttackCondition: LogicBoolean canAttackCondition: if not self.flying
LogicBoolean. Eg: this unit's height
Max angle to target for turret to be allowed for fire. Defaults to
1.14 canAttackMaxAngle: float 5, don't set lower. Can be set to 181 for turrets that don't need canAttackMaxAngle: 181
to turn to fire missiles.
1.13 clearTurretTargetAfterFiring: bool Clears the turrets sub-target when using multi-targeting clearTurretTargetAfterFiring:
Make this turret have less range than the maxAttackRange. Do
limitingRange: float limitingRange: 100
not apply this to all turrets change maxAttackRange instead.
Linked with idleDir. Turret will only be able to fire at units +/-
1.13 limitingAngle int limitingAngle: 60
this angle.
1.13 limitingMinRange: int Sets minimum range for turret. limitingMinRange: 200
1.13 interceptProjectiles_withTags: tags Currently used with anti-nuke units. interceptProjectiles_withTags: nuke
interceptProjectiles_andTargetingGroundUnderDistance: int Minimum distance required for intercepting projectile interceptProjectiles_andTargetingGroundUnderDistance: 100
interceptProjectiles_andUnderDistance: int Defaults to 2000, distance inflight before firing interceptProjectiles_andUnderDistance: 300
interceptProjectiles_andOverHeight: int Defaults to 0. Sets the projectile target height limit interceptProjectiles_andOverHeight: 10
Set to enable a projectile laser defence from this turret. Should
laserDefenceEnergyUse: float laserDefenceEnergyUse: 0.25
also set the energyMax in core.
#==== #==== Graphics and effects #====
invisible: LogicBoolean Don't render this turret, but still can shoot, etc. invisible: true
image: file (image) Use custom image. Overrides unit's main turret image image: gun.png
When true, the specific turret applies team colors over the
image_applyTeamColors bool image_applyTeamColors: true
special greens in the sprite.
image_drawOffsetX float Moves the image horizontally from the turret center. image_drawOffsetX: 0
image_drawOffsetY float Moves the image verticallly from the turret center. image_drawOffsetY: 30
chargeEffectImage: Used with warmup. Shows a scaling effect image on turret chargeEffectImage: glow.png
file (image)
barrel when charging.
Spawns specified effects when the specific turret is
warmupStartEffect effect ref warmupStartEffect: CUSTOM:abosrb
charging/warming up
shoot_sound: string Can be linked to an .ogg or .wav file, or one of the default shoot_sound: tank_firing | shoot_sound: missile.wav | shoot_sound: ROOT:audio/shoot.ogg
game sounds (list at bottom of reference)
shoot_sound_vol: float Sets the volume of the shoot sound shoot_sound_vol: 0.4
Current types are: small, large, smoke, shockwave, or
shoot_flame: effects eg: shoot_flame: smoke, CUSTOM:lightFade, CUSTOM:pop*5
CUSTOM: effectSectionName
shoot_light color Produces a colored light upon shooting shoot_light: #fafafa
Play a custom animation from an [animation] section after firing
1.13 onShoot_playAnimation animation ref onShoot_playAnimation: heatUp
this turret
1.14 onShoot_triggerActions action refs Trigger these actions each time this turret fires onShoot_triggerActions: spawnShells
Unloads X units at turret barrel locations and gives them the
1.15 unloadUpToXUnitsAndGiveAttackOrder int unloadUpToXUnitsAndGiveAttackOrder: 1
attack order of turret target
Push turret forward or back after firing for a recoil effect. Value
recoilOffset float recoilOffset: 10
in pixels.
recoilOutTime float Time to get to offset position after firing recoilOutTime: 1s
recoilReturnTime float Time to return to default position recoilReturnTime: 0.5s
1.13.3 showRangeUIGuide bool Defaults to true. Displays the attack range for this turret showRangeUIGuide: true

Section
[projectile_NAME] Projectiles are often used to inflict damage on an enemy, but can also be used for other purposes

Code Value Type Description Example


#==== #==== Necessary Code
int directDamage: or areaDamage:
life:
#==== #==== Core
How long till this projectile gets removed if it hasn't hit a target,
life: 300 might be a good starting point, change depending on life: 300
speed and range
Defaults to 1. Energy needed for laser defence to deflect. -1 to
deflectionPower: float disable deflection (only disable for special weapons like deflectionPower: -1
flames)
Default to false. True to explode at end of life with all side
1.13 explodeOnEndOfLife bool effects and area damage instead of disappearing. Good for explodeOnEndOfLife: true
making area-denial weapons.
autoTargetingOnDeadTarget: bool Retarget to nearby unit if target dies while in transit autoTargetingOnDeadTarget: true
1.14 autoTargetingOnDeadTargetRange int The range which it will select a new target if old target has died autoTargetingOnDeadTargetRange: 100
1.14 autoTargetingOnDeadTargetLead float The lead it will try to have on the new target autoTargetingOnDeadTargetLead: 300
1.13 unloadUpToXUnitsFromSource int Unload X units from source unit, to projectile explode location unloadUpToXUnitsFromSource: 2
1.13 teleportSource bool Move unit that shot this projectile to projectile explode location teleportSource: true

NOTE: There is a section for all possible modifications to


spawnUnit and spawnProjectile, type "spawnUnit:LIST" or
"spawnProjectiles:LIST" in the Search function

1.13 spawnUnit: unit types Spawn new units of this type at projectile explode location eg: spawnUnit: heavyTank, tank*5, hoverTank(offsetX=10)
1.14 spawnProjectilesOnEndOfLife projectile ref Spawns new projectiles on end of life, useful for secondary spawnProjectilesOnEndOfLife: torpedo_split(offsetDir=90), torpedo_split(offsetDir=-90)
1.14 spawnProjectilesOnExplode projectile ref projectiles to spawns when this projectile hits it's target
Projectiles spawnProjectilesOnExplode: flachette*4
Spawns projectiles on creation of this projectile, useful for
1.14 spawnProjectilesOnCreate spawnProjectilesOnCreate: stage2
making true shotgun-like projectile spread
Convert units hit to the team that fired this projectile. Useful to
1.13.3 convertHitToSourceTeam bool convertHitToSourceTeam: true
make capturing systems
Used for projectile interceptions (e.g. Nuke and Anti-Nuke
1.13 tags tags Interaction) and in [action] autoTriggerOnEvent: tookDamage tags: nuke, missile
(withTag="[tagName]")
flameWeapon: bool Generates small flames on hit (only cosmetic) flameWeapon: true
1.13 delayedStartTimer float Hide for x time before showing and updating effect. delayedStartTimer: 2s
#==== #==== Damage
Damage to target unit on hit. Does not work with targetGround:
directDamage: int directDamage: 30
true as it won't have a clear unit to target
Damages on arrival of target with an area effect, use
areaDamage: int areaRadius to adjust size of damage. targetGround needs this areaDamage: 10
to damage
How wide areaDamage effects. Note this drops off (unless
1.13 areaRadius: float areaRadius: 100
areaDamageNoFalloff is used)
areaDamageNoFalloff bool Removes the falloff from areaDamage areaDamageNoFalloff: true
Applies damage from edge of units instead of center. Mostly
areaRadiusFromEdge bool areaRadiusFromEdge: true
effects large units.
Applies area damage as an expanding blast wave rather than
1.13 areaExpandTime float areaExpandTime: 1s
instantly. Useful for nuke projectiles
1.13 areaHitAirAndLandAtSameTime bool Defaults to false areaHitAirAndLandAtSameTime: true
areaHitUnderwaterAlways bool Defaults to false areaHitUnderwaterAlways: true
Units closer than this range aren't effected. Rarely needed. Not
areaIgnoreUnitsCloserThan int areaIgnoreUnitsCloserThan: 10
recommended for normal projectiles.
1.13 buildingDamageMultiplier float Defaults to 1 buildingDamageMultiplier: 3
Defaults to 1. 0 to do no damage to shields and 2 to do double
1.13 shieldDamageMultiplier float shieldDamageMultiplier: 1.4
damage
Defaults to 1. The amount of shield to bypass. 0 to ignore
1.13 shieldDefectionMultiplier float shieldDefectionMultiplier: 1.55
shields and directly damage hull
Defaults to 1. Can be used to create EMP weapons that affect
1.14 hullDamageMultiplier float hullDamageMultiplier: 2
shields only. 0 to ignore hull and only damage shields
Sets whether multipliers are applied or not regardless of
1.15 ignoreParentShootDamageMultiplier bool ignoreParentShootDamageMultiplier: true
multipliers set in attack or setUnitStats
Amount of armour to ignore on target and do damage as if this
armourIgnoreAmount int armourIgnoreAmount
armour was not there
Lets area effect projectiles damage own team units (can't
1.13 friendlyFire bool/string friendlyFire: false / friendlyFire: true / friendlyFire: only-ignoreEnemy
damage allies). Useful for nuke-like weapons
Applies mutators to this projectile if target has corresponding
1.13.3 mutatorX_ifUnitWithTags tags mutator1_ifUnitWithTags: infantry
tags
Same as ifUnitWithTags, but applies if target doesn't have the
1.13.3 mutatorX_ifUnitWithoutTags tags mutator1_ifUnitWithoutTags: strongArmour
set tags
Changes directDamage. Defaults to 1. Be careful not to
1.13.3 mutatorX_directDamageMultiplier float confuse players using this as the effect may not be clear. Use mutatorX_directDamageMultiplier: 5
amour instead when possible. Replace X with desired name
Same as directDamageMultiplier but for areaDamage. Defaults
1.13.3 mutatorX_areaDamageMultiplier float mutatorX_areaDamageMultiplier: 1.2
to 1.
Change explode effect if this mutator is active. Eg make a
1.13.3 mutatorX_changedExplodeEffect effect bounce off amour effect. Helps to make the damage change mutatorX_changedExplodeEffect: CUSTOM:specialBlast
more clear to players (Doesn't work with targetGround.)
Add resource to all direct hit units. Warning: Be careful not be
1.14 mutatorX_addResourcesDirectHit resource break units from other mods by adding random resources or mutatorX_addResourcesDirectHit: oil=1
energy to them that they don't expect.
Add resource to all area hit units. Warning: Be careful not be
1.14 mutatorX_addResourcesAreaHit resource break units from other mods by adding random resources or mutatorX_addResourcesAreaHit: rust=4
energy to them that they don't expect.
#==== #==== Movement
Target ground, and don't home in on target. Note: only
targetGround bool targetGround: true
areaDamage is applied if targeting ground.
1.14 targetGround_includeTargetHeight bool Default false. for area affect AA weapons targetGround_includeTargetHeight: 40
Default 0. for shooting over or under a target. Useful for
1.14 targetGroundHeightOffset float targetGroundHeightOffset: 10
projectiles that split and rain down.
speed: float Projectile default travel speed speed: 3
targetSpeed: float Accelerate to this speed targetSpeed: 5
1.13 targetSpeedAcceleration float Controls the speed rampup for targetSpeed targetSpeedAcceleration: 0.3
Makes projectiles fly up into the air and come down, instead of
ballistic: bool ballistic: true
going in a straight line
Sets up to how high the projectile needs to be before moving
ballistic_delaymove_height: float ballistic_delaymove_height: 20
normally
ballistic_height: float Sets the target height of the projectile ballistic_height: 10
Randomly makes the shot inaccurate by this amount. Also
targetGroundSpread: float targetGroundSpread: 20
used by weapons like the flamethrower
speedSpread: float Randomly change the starting projectile speed by this amount speedSpread: 3
instant bool Hit target instantly instant: true
Recycles last projectile fired, only one projectile ever exists.
instantReuseLast: bool Can turn lasers into beam weapons by using lower rate of fire instantReuseLast: true
and setting this to true
Make turret's aim include last projectile's spread and sweep
1.14 instantReuseLast_alsoChangeTurretAim bool instantReuseLast_alsoChangeTurretAim: true
offsets, useful for beam weapons
Default false. Keeping the list was the normal behaviour in 1.13
1.14 instantReuseLast_keepAreaDamageList bool making area damage not apply a second time but this is not instantReuseLast_keepAreaDamageList: true
useful. Use this only if you want the old behaviour.
Defaults to false. When false projectiles are just removed.
1.14 interceptProjectile_removeTargetLifeOnly bool interceptProjectile_removeTargetLifeOnly: true
Could be true to make hit projectiles explode or split when hit
Disable the lead targeting calculations when aiming at a
1.13 disableLeadTargeting bool disableLeadTargeting: true
moving target. Defaults false.
The expected speed of this projectile for targetGround lead
1.13 leadTargetingSpeedCalculation float target calculation. Defaults to 'targetSpeed' if set otherwise leadTargetingSpeedCalculation: 2
'speed'.
Sets vertical speed for projectiles with targetGround. Use
1.13.3 initialUnguidedSpeedHeight gravity to make smooth arching projectiles. Better have gravity initialUnguidedSpeedHeight: 30
value slightly slower than this key to produce the arches.
Controls the pull for projectiles that target ground. Use together
1.13.3 gravity: gravity: 29
with initialUnguidedSpeedHeight
Limits the turn speed of a projectile, making them inaccurate
1.14 turnSpeed float even with directDamage. Zero value will make it act like if turnSpeed: 0
targetGround is set true, but air target friendly option.
1.14 wobbleAmplitude float How wide the projectile will wobble wobbleAmplitude: 10
1.14 wobbleFrequency float How often the projectile will wobble wobbleFrequency: 4
Push (or pull with a negative value) the units that get hit.
1.14 pushForce float pushForce: 2
Divided by target mass
Push (or pull with a negative value) the units that get hit.
1.14 pushVelocity float pushVelocity: 5
Ignores target mass
Move projectile as parent moves. Useful for beam effects that
1.14 moveWithParent bool moveWithParent: true
need to stick to source turret.
1.14 sweepOffset float Useful for beam effects. sweepOffset: 0.5
Add to sweep offset by factor of target's radius. 0.4 would be
1.14 sweepOffsetFromTargetRadius float sweepOffsetFromTargetRadius: 0.4
40%
1.14 sweepSpeed float Useful for beam effects. sweepSpeed: 1.5
Can retarget a new target mid-flight, perfect for flak-style
1.14 retargetingInFlight bool retargetingInFlight: true
weapons and projectiles that collide
1.14 retargetingInFlightSearchDelay float/time How long between searching for new targets. Default 5 retargetingInFlightSearchDelay: 1s
1.14 retargetingInFlightSearchRange int Range which targets are reselected. Default 120 retargetingInFlightSearchRange: 300
1.14 retargetingInFlightSearchLead float The lead of the projectile to try to hit the target. Default 15 retargetingInFlightSearchLead: 30
1.14 retargetingInFlightSearchOnlyTags tag ref Only retarget units with these tags retargetingInFlightSearchOnlyTags: lightArmor
#==== #==== Graphics and effects
color color Recolors this projectile using a hex value. color: #bebe50
1.13.3 invisible bool When true, the projectile is not rendered but still functional. invisible: true
image: file (image) Use custom image. Overrides drawType and frame image: bullet
Built-in image to use. 0:projectiles.png 1:projectiles_large.png
drawType int 2:projectiles2.png. Refer to end of sheet for the projectile drawType:1
images.
drawSize: float Scale image. Defaults to 1 drawSize: 1.5
frame int Built-in image frame to use, starts at zero. frame: 0
hitSound: bool Default true hitSound: true
1.13 explodeEffect effect ref list Produces the specified effects upon explosion. explodeEffect: smallExplosion, CUSTOM:myExplodeEffect
1.13 explodeEffectOnShield effect ref list Use this effect if shield is active on target explodeEffectOnShield: CUSTOM:EMPwave
1.13 teamColorRatio float Mix 0-1 of team colour into color field teamColorRatio: 1
default is (1-teamColorRatio). Keep more of color when
1.14 teamColorRatio_sourceRatio float teamColorRatio_sourceRatio: 1
mixing. Note this might saturate colors.
1.13 drawUnderUnits bool If true, renders the projectile under units. Great for torpedos. drawUnderUnits: true
1.13 effectOnCreate effect ref list Produces specified effects upon creation of the projectile. effectOnCreate: CUSTOM:puff
1.13 shouldRevealFog bool Reveal fog to player on explode shouldRevealFog: true
1.13 alwaysVisibleInFog bool Renders the projectile even when fog is present alwaysVisibleInFog: false
Shows on mini-map when fired. Some other side effects as
1.13 nukeWeapon bool nukeWeapon: true
well, like nuke explosion effect
true for built-in defaults, but can also point to any custom
trailEffect bool/effect trailEffect: true, trailEffect: CUSTOM:rocketThrust
effects
1.13 trailEffectRate float Defaults to 3 trailEffectRate: 4
lightCastOnGround bool Renders light under the projectile lightCastOnGround: true
Sets the size of the light emitted by the projectile. 1 value = 1
lightSize: float lightSize: 1.5
tile
lightColor color Sets the color of the light emitted by the projectile. lightColor: #ffe92b
Creates a large explosion and accompanying sound on hit
largeHitEffect: bool largeHitEffect: true
(only cosmetic)
lightingEffect: bool Draw as lighting works best with instant:true lightingEffect: true
laserEffect: bool Draw as laser works best with instant:true laserEffect: true
Image to use for beam and laser effect type projectiles. Image
is repeated vertically depending on the distance to target.
1.14 beamImage file (image) beamImage: beam.png
Beam image should be 20 pixels or longer. Width does not
matter, only the height.
Sets how fast the beam image moves towards or away from
1.14 beamImageOffsetRate float beamImageOffsetRate: 1
the target
1.14 beamImageStart file (image) Sprite for the origin point of the custom beam beamImageStart: beamStart.png
1.14 beamImageStartRotated bool Defaults false. True to rotate with turret angle beamImageStartRotated: true
1.14 beamImageEnd file (image) Sprite for the end point of the custom beam beamImageEnd: beamEnd.png
1.14 beamImageEndRotated bool Defaults false beamImageEndRotated: true

Section
[movement] These are traits the unit has as far as movement goes, such as rotation and acceleration speed

Code Value Type Description Example


Defines what kind of terrain the unit will be able to move, along
with other properties. Can use only one: NONE, LAND, AIR,
movementType: string movementType: LAND
WATER, HOVER, BUILDING, OVER_CLIFF,
OVER_CLIFF_WATER
Used with large aircraft. Makes the unit fall slowly while
slowDeathFall: bool slowDeathFall: true
maintaining its speed at the time of death.
Maximum movement speed of the unit. A value of 1 means (1
moveSpeed: float moveSpeed: 1.2
pixel * 60) per second (or 3 tiles per second)
moveAccelerationSpeed: float Defines how fast units accelerate to max speed. moveAccelerationSpeed: 0.07
Don't make this too low or units will have trouble stopping at
moveDecelerationSpeed: float moveDecelerationSpeed: 0.17
waypoints
0.6 default. Over 0.4 will reverse for short distances (at 40%
reverseSpeedPercentage: float speed). If set to 1 will drive in reverse same as forwards. reverseSpeedPercentage: 0
Useful if slow turning
landOnGround: bool Should flying unit land when idle. landOnGround: false
targetHeight: float Defaults to 0 but if AIR movementType default is 35 targetHeight: 25
Smooth animated height change. Defaults to 0 but if AIR
targetHeightDrift: float targetHeightDrift: 1
movementType default is 1.5
startingHeightOffset: float Sets the initial height on spawn. Defaults at 0. startingHeightOffset: 40
Rate at which the unit changes height, either from converting
1.14 heightChangeRate: float heightChangeRate: 3
or drifting
1.14 fallingAcceleration: float The acceleration in which a unit drops fallingAcceleration:
1.14 fallingAccelerationDead: float fallingAcceleration but when destroyed fallingAccelerationDead:
maxTurnSpeed: float Sets the top turning speed of a unit maxTurnSpeed: 4
turnAcceleration: float Defines how fast units accelerate to max turn speed. turnAcceleration: 1
Makes the unit slide when moveDecelerationSpeed is lower,
moveSlidingMode: bool moveSlidingMode: true
making them drift and feel natural
Allows the unit to move without fully turning in the direction its
moveIgnoringBody: bool moveIgnoringBody: true
moving, useful for ships and air units
moveSlidingDir: int Sets direction when sliding moveSlidingDir: 180
Defaults to true. Changing not recommended. When false, the
joinsGroupFormations: bool unit will directly move to the assigned waypoint without taking joinsGroupFormations: false
space consideration from neighboring units.

Section
[ai] This determines what the AI will use the unit for, does not effect player

Code Value Type Description Example


Set to true if unit can build or repair buildings. Defaults to [core]
useAsBuilder: bool useAsBuilder:
isBuilder.
useAsTransport bool Defaults to true if unit can transport units useAsTransport
useAsHarvester bool Defaults to true if unit can reclaim resources useAsHarvester
disableUse: bool Disallow AI building this unit or building disableUse:
Defaults to 0.06. Set between 0-1, higher means AI is more
ai_upgradePriority float ai_upgradePriority
likely to upgrade this unit before others
#==== #==== Buildings only
Maximum amount allowed for a specific structure for an AI
maxGlobal: int maxGlobal: 50
team per map
Maximum amount allowed for a specific structure for an AI
team per "base", usually around an extractor or spawn point.
maxEachBase: int maxEachBase: 10
To check for an AI base in sandbox, enable Debug Mode and
Click Shift + F3
0-1. AI uses 0.8 for first land factory, 0.48 for air factory, 0.47
buildPriority: float buildPriority: 1
for first turret.
noneInBaseExtraPriority: float Adds to buildPriority, if this unit doesn't exist in the AIs base noneInBaseExtraPriority: 2
Adds to buildPriority, if this unit doesn't exist in the any where
noneGlobalExtraPriority: float noneGlobalExtraPriority: 4
on the map
recommendedInEachBaseNum float Defaults to 0 recommendedInEachBaseNum: 2
Defaults to 0.5. Overrides buildPriority if recommended in base
recommendedInEachBasePriorityIfUnmet float recommendedInEachBasePriorityIfUnmet: 4
is too low.
Create link to another unit to preserve max counts for
upgradedFrom: string upgradedFrom: builderLevel1
upgraded and non-upgraded types in same base.
1.14 notPassivelyTargetedByOtherUnits bool Useful for walls, etc notPassivelyTargetedByOtherUnits: true
1.14 lowPriorityTargetForOtherUnits bool Useful for units that cannot attack back. Eg walls lowPriorityTargetForOtherUnits: true
Assigns unit of the same name with certain amount on an AI
1.13.3 whenUsingAsHarvester_recommendedInEachBase int whenUsingAsHarvester_recommendedInEachBase: 3
base
1.13.3 whenUsingAsHarvester_recommendedGlobal int Assigns unit of the same name with certain amount on map whenUsingAsHarvester_recommendedGlobal: 20
1.13.3 whenUsingAsHarvester_includeOtherHarvesterCounts bool Includes all harvester types on a single counter whenUsingAsHarvester_includeOtherHarvesterCounts: true
Only sets the harvester unit as a harvester if an AI base has a
1.13.3 onlyUseAsHarvester_ifBaseHasUnitTagged string onlyUseAsHarvester_ifBaseHasUnitTagged: mineral, wood, stones
unit with particular tag(s)

Section
[leg_#] / [arm_#] Legs can move around when unit moves, Arms need an animation or convert

Code Value Type Description Example


x: float Sets position of the foot on the X axis. x: 10
y: float Sets position of the foot on the Y axis. y: 20
Copy from another leg. Useful to only need to set leg values
copyFrom: int copyFrom: 1
once
attach_x: float Sets the leg's attach point on the X axis. attach_x: 10
attach_y: float Sets the leg's attach point on the Y axis. attach_y: 0
rotateSpeed: float Sets the leg's rotation speed on movement rotateSpeed: 2
endDirOffset int Target foot/end rotation relative to body endDirOffset: 45
Lock to unit body. Useful if walking unit converted to a flying
lockMovement bool lockMovement: true
unit.
heightSpeed: float Sets how fast the leg rises while walking heightSpeed: 2
moveSpeed float Sets how fast the leg moves while walking moveSpeed: 3
moveWarmUp Delay before the leg moved moveWarmUp: 2
Defaults to 7. Reposition leg at this distance if neighbor legs
holdDisMin: float holdDisMin: 10
are not already repositioning.
Defaults to 16. Force reposition of leg at this distance.
holdDisMax: float Repositions leg at this distance even if a neighboring leg is holdDisMax: 20
moving
Sets maximum amount of legs to check before applying
holdDisMin_maxMovingLegs int holdDisMin_maxMovingLegs: 4
distance holding
Defaults to true. When true, starting moving leg only if it is
hold_moveOnlyIfFurthest bool hold_moveOnlyIfFurthest: true
currently the furthest leg from where it should be.
holdDisMin_checkNeighbours bool Checks neighbors before applying distance holding holdDisMin_checkNeighbours: true
Defaults to 50. Force leg to never go this far. Better to not be
hardLimit: float hardLimit: 60
reached.
defaults to 1. Predicts were unit will be for leg placement based
estimatingPositionMultiplier float estimatingPositionMultiplier: 2
on unit speed.
#==== #==== Graphics and effects #====
hidden: logic boolean When true, hides the arm/leg hidden: true
1.13 image_end file (image) Sets the main arm end sprite image_end: rotor.png
1.13 image_end_shadow file (image) Sets the shadow for the arm image_end_shadow: AUTO
1.13 image_end_teamColors bool When true, the arm end will apply team colors image_end_teamColors: true
1.13 image_foot file (image) same as image_end, but acts as the foot for the leg image_foot: footR.png
image_foot_shadow file (image) Sets the shadow for the foot image_foot_shadow: AUTO
1.13 image_middle file (image) Sets the arm image image_middle: NONE
image_leg file (image) Sets the leg image image_leg: legR.png
1.13 draw_foot_on_top bool Renders foot above leg draw_foot_on_top: true
drawOverBody bool Draw over body drawOverBody: false
drawUnderAllUnits bool Draw over all units drawUnderAllUnits: true
drawDirOffset float Rotates the foot/arm sprite to a specified direction drawDirOffset: 73
dust_effect: bool Spawns dust particles on each step. dust_effect: true
Makes arm/leg spin, like idleSpin for turrets. Great for
spinRate float spinRate: 2
helicopters
favourOppositeSideNeighbours bool calculate neighbours with X 10 times closer than Y favourOppositeSideNeighbours: true
drawLegWhenZoomedOut bool For performance, defaults changes based on unit size drawLegWhenZoomedOut: false
drawFootWhenZoomedOut bool For performance, defaults changes based on unit size drawFootWhenZoomedOut: false
liftingHeightOffset int Often used with decals liftingHeightOffset: 20
1.15p9 targetHeight int Sets height of the leg targetHeight: 10
targetHeightRelative bool Apply height relative to unit's height targetHeightRelative: true
resetAngle: float Unused
Section
[attachment_NAME] Attachments are slots where other units can be positioned or carried

Code Value Type Description Example


1.13.3 x float Sets the horiztontal position of the attachment x
1.13.3 y float Sets the vertical position of the attachment y
1.13.3 height float Sets the elevation of the attachment height
1.13.3 idleDir int Sets the direction of the attachment when idle idleDir
Sets the direction of the attachment when the base unit is
1.14 idleDirReversing int idleDirReversing
moving in reverse
1.13.3 isVisible bool Defaults to true. If false, the attachment is hidden isVisible
Upon spawning the unit, specified attached unit is also
1.13.3 onCreateSpawnUnitOf unit ref onCreateSpawnUnitOf
spawned as attachment
Defaults to false. When true, the player cannot click the
1.13.3 isUnselectable bool isUnselectable
attachment.
canAttack bool Defaults to true. Set to false to stop this attachment attacking. canAttack
1.13.3 canBeAttackedAndDamaged bool When true, the attachment is vulnerable to attacks canBeAttackedAndDamaged
If the unit is ordered to move, it will detach. This includes
1.13.3 deattachIfWantingToMove bool deattachIfWantingToMove
waypoints from actions.
1.13.3 lockLegMovement bool Locks the leg movement while attached. lockLegMovement
1.13.3 keepAliveWhenParentDies bool Defaults to false keepAliveWhenParentDies: true
1.13.3 setDrawLayerOnTop bool Renders the attachment above the base unit setDrawLayerOnTop
1.13.3 setDrawLayerOnBottom bool Renders the attachment below the base unit setDrawLayerOnBottom
Often used with transport units, when true, attaches one of the
1.13.3 addTransportedUnits bool addTransportedUnits
unit passenger to this attachment slot
1.13.3 lockRotation bool When true, stops the attachment from rotating lockRotation
1.13.3 rotateWithParent bool When true, the attachment rotates with the parent unit rotateWithParent
1.13.3 resetRotationWhenNotAttacking bool Similar to shouldResetTurret:for turrets. resetRotationWhenNotAttacking
1.13.3 prioritizeParentsMainTarget bool It will priotize targeting the main target. Defaults to true. prioritizeParentsMainTarget
1.13.3 alwaysAllowedToAttackParentsMainTarget bool Will always attack the parents main target. alwaysAllowedToAttackParentsMainTarget
Defaults false. If true attached units are not converted when
1.14 onParentTeamChangeKeepCurrentTeam bool parent changes team. Eg from [projectile] onParentTeamChangeKeepCurrentTeam
convertHitToSourceTeam
When true, the attachment is retained on the same attachment
1.14 onConvertKeepExistingUnitInSameSlot bool onConvertKeepExistingUnitInSameSlot
slot when the parent is converted to another unit
Defaults false. If true transported attached units are kept
1.14 unloadInCurrentPosition bool unloadInCurrentPosition
current attached location when unloading
Defaults false. If true attached units keep waypoints with
1.14 keepWaypointsNeedingMovement bool movement even while they cannot move. Useful if they will be keepWaypointsNeedingMovement
automatically deattached soon.
1.14 smoothlyBlendPositionWhenExistingUnitAdded bool smoothlyBlendPositionWhenExistingUnitAdded
Show all actions of the units attached in the parent unit list
1.14 showAllActionsFrom LogicBoolean showAllActionsFrom
when selected
If parent hasn't been built, create attachment with the same
1.14 createIncompleteIfParentIs: bool built value. Links built values till attachment is complete. Useful createIncompleteIfParentIs:
for buildings built with nano.
Redirects damage done to this attachment to the parent
1.14 redirectDamageToParent: bool redirectDamageToParent:
instead of damaging itself directly
When enemies attack the attachment, all damage are
1.14 redirectDamageToParent_shieldOnly: bool redirectDamageToParent_shieldOnly:
redirected to the parent's shield

Section
[action_NAME] / Actions that can dynamically cause changes to units and resources
[hiddenAction_NAME]
Code Value Type Description Example
text string Labels the action. Supports dynamic text text: Catch Fish, text: Fire: %{self.resource.ammo}
Text shown as suffix, useful with textAddUnitName to create
textPostFix: string text: [ textPostFix: ] textAddUnitName: unitRef self.attachment(slot="${slotId}")
text UI
Alternative text for different language. Use ISO 639-1
text_{LANG} string text_es: Fuego %{self.resource.ammo}
Language code on the {LANG} prefix. Supports dynamic text
A display text when you select your unit's action, used to
description string description: Fires shot on target area
explain it's purpose. Supports dynamic text
Alternative description for different language. Use ISO 639-1
description_{LANG} string description_es: Disparos en el área objetivo
Language code on the {LANG} prefix. Supports dynamic text
Affects how the action button and text is displayed. Options:
displayType list none, rally, upgrade, queueUnit, building, action, infoOnly, displayType: upgrade
infoOnlyNoBox, infoOnlyStockpile
Queue is shown as number of times action can be triggered
displayRemainingStockpile bool displayRemainingStockpile: true
based on price. Use dynamic text on text as alternative.
Order action appears in UI. Merges with positions from
pos float pos: 1
canBuild buttons
iconImage file (image) Sets a thumbnail image for the action button iconImage: fireShot.png
1.14 iconExtraImage file (image) Drawn over top of icon image. Useful for upgrade icons, etc iconExtraImage: fireShotNo.png
1.14 iconExtraColor colour Defaults to #64FFFFFF iconExtraColor: #ff0000
1.14 iconExtraIsVisible LogicBoolean When the condition is met, the extras for icon is visible. iconExtraIsVisible: if self.resource.ammo < 1
1.13.3 unitShownInUI unitRef/unitType Display this unit. (as if this action built this unit) eg: unitShownInUI: unitRef self.transporting(slot=0) or unitShownInUI: heavyTank
Uses the UI similar when building structures. An alternative to
guiBuildUnit unitRef/unitType guiBuildUnit: placeholderUnit
fireTurretX on some cases
Designates how built the unit is from a percentage of 0-100%
1.14 setBuilt float setBuilt: 0.5
with a number between 0 and 1.

To be used with the withTag parameter for self.queueSize


1.15p9 tags tags (withTag=x) and queueItemAdded and queueItemCanceled tags: actionFire
events

Allow same/equivalent actions to be more easily connected


when converting between units, to preserve queues,
1.15p11 id string id: fireShot
calldowns, etc. (Normally action order is used but can be
unstable.)
Unit Reference - Dynamically parts from already existing
#==== #==== self, self.parent(), self.transporting(slot=x), self.attachment(slot=X)
units, useful w/ isAlsoViewableByEnemies
1.14 textAddUnitName unitRef/unitType Add this unit's name to this action's text eg: textAddUnitName: unitRef self.attachment(slot="1")
1.14 descriptionAddFromUnit unitRef/unitType Add this unit's description to this action's description descriptionAddFromUnit: builder
Add this unit's stats (eg HP, energy, resources) to this action's
1.14 descriptionAddUnitStats: unitRef/unitType descriptionAddUnitStats: unitRef self.parent()
description
1.14 unitShownInUIWithHpBar bool default true, Only used when unitShownInUI is a unitRef unitShownInUIWithHpBar: true
default true, Only used when unitShownInUI is a unitRef.
1.14 unitShownInUIWithProgressBar bool unitShownInUIWithProgressBar: false
Replaces HP bar if active
#==== #==== Requirements for player/AI to use in UI
Defaults false. When true no confirmation needed on mobile,
1.14 alwaysSinglePress bool when used with canPlayerCancel:false and alwaysSinglePress: true
allowMultipleInQueue:false will also hide the queue interface.
The price of your action for the unit. Disables action if not
price resources price: credits=5, energy=5, hp=100, shield=5, ammo=1
available. Defaults to credits if unlabelled
Defaults true. If false then action is disabled and shown in red
isActive LogicBoolean isActive: true
in UI.
isVisible LogicBoolean Defaults true. If false action is hidden from UI and disabled. isVisible: true
Defaults false. If true action is disabled, and a lock icon is
isLocked LogicBoolean isLocked: if self.resource.ammo < 1
shown. Mostly used for no nuke game modes
isLockedMessage LocaleString Shows the message when the isLocked's condition is met isLockedMessage: Not enough ammunition
Another reason for this to be locked. Can just use OR on
1.13.3 isLockedAlt LogicBoolean isLockedAlt: if numberOfUnitsInGame(withTag="factory") < 2
isLocked, but this allows a different message to be shown
1.13.3 isLockedAltMessage LocaleString Message for isLockedAlt isLockedAltMessage: Not enough factories!
1.13.3 isLockedAlt2 LogicBoolean Second isLocked alternative isLockedAlt2: if nearestUnit(withTag="explosive", withinRange="500", relation="own").hp() < 10
1.13.3 isLockedAlt2Message LocaleString Message for isLockedAlt2 isLockedAlt2Message: Explosive stockpile is heavily damaged.
When false makes it so only one action can be queued of this
allowMultipleInQueue bool type (useful for keeping actions with conditions from being allowMultipleInQueue: true
spammed)
When action is picked in UI, only one unit selected with get this
onlyOneUnitAtATime bool onlyOneUnitAtATime: true
action. Defaults to false.
Flashes in UI to draw attention to it. Might be annoying if used
1.13.3 isGuiBlinking LogicBoolean isGuiBlinking: true
often, recommended only for temporarily states/messages
Allows ally players to see actions from this unit, useful for
1.14 isAlsoViewableByAllies bool showing stats to other players (eg missile count, items isAlsoViewableByAllies: true
collected)
Allows enemy players to see actions from this unit, useful for
1.14 isAlsoViewableByEnemies bool showing stats to other players (eg missile count, items isAlsoViewableByEnemies: true
collected)
#==== #==== AI - How the AI uses this action #====
Use this for faction selection actions or other high priority
1.13.3 ai_isHighPriority LogicBoolean ai_isHighPriority: true
actions such as building high priority units
Defaults false. Stop AI using this action. (Note when
ai_isDisabled LogicBoolean ai_isDisabled: false
ai_isHighPriority is true this might be ignored)
1.13.3 ai_considerSameAsBuilding bool Be careful with ai_considerSameAsBuilding: true
Triggers - These skip the queue and do not use price,
#==== #==== (Use 2 actions and alsoQueueAction to automatically add an action to the queue)
ignores isLocked, buildTime, etc

Action will be triggered when an event is happening on a particular


unit. Options: created, completeAndActive, destroyed, killedAnyUnit,
queuedUnitFinished, queueItemAdded(withActionTag="#"),
queueItemCancelled(withActionTag="#"), teleported,
1.13.3 - 1.15 touchTargetSuccess, newWaypointGivenByPlayer, teamChanged,
autoTriggerOnEvent: event autoTriggerOnEvent: queueItemCancelled(withActionTag="actionFire")
p9 transportingNewUnit, transportUnloadedOrRemovedUnit,
tookDamage(withTag="#"), newMessage(withTag="#"),
enteredTransport, leftTransport, attachmentRemoved. withTag
parameter for tookDamage uses tag from projectile and it is optional.
withTag parameter for newMessage uses message tags.

Defaults to 1. Prevents loops, useful with triggering itself so it doesn't


1.15 autoTriggerOnEventRecursionLimit int infinitely triggers, good for repeating action effect on event
autoTriggerOnEventRecursionLimit: 4
When true triggers the effects of this action instantly (ignoring price,
autoTrigger LogicBoolean isActive, isVisible, buildSpeed, etc)
autoTrigger: if self.overWater(), autoTrigger: if self.customTimer(laterThanSeconds=5)
options: everyFrame (default), every4Frames, every8Frames. This
overrides autoTriggerCheckRate set on [core] Note: all triggers
regardless of check rate are checked when first created and after an
autoTriggerCheckRate enum auto trigger cooldown. Note: Adding [core]autoTriggerCheckRate:
autoTriggerCheckRate:every8Frames
every8Frames to all-units.template could have a large performance
boost for mods with complex autoTriggers.
#==== #==== While action is queued
Sets how fast the action has to be queued before doing the
buildSpeed time buildSpeed: 5s
action behaviors
Defaults to false. If true this action skips all other low priority
highPriorityQueue bool highPriorityQueue: true
actions in queue. Useful for fireTurret actions.
Defaults to true. When false, players cannot cancel this
canPlayerCancel bool canPlayerCancel: false
particular action.
Stops unit moving while action is being applied. Useful for
whenBuilding_cannotMove bool whenBuilding_cannotMove: true
deploy like actions.
whenBuilding_playAnimation animation ref Plays a specified animation while the action is queued. whenBuilding_playAnimation: firePrepare
Rotate unit body to this direction when action is in active
whenBuilding_rotateTo float whenBuilding_rotateTo: 45
queue.
If true allow rotation in 180 degrees from
whenBuilding_rotateTo_orBackwards bool whenBuilding_rotateTo_orBackwards: true
whenBuilding_rotateTo when this is a smaller angle
whenBuilding_rotateTo_waitTillRotated bool Pause action queue till rotation is finished whenBuilding_rotateTo_waitTillRotated: true
Convert to another unit while action is in active queue. Note:
whenBuilding_temporarilyConvertTo unit ref whenBuilding_temporarilyConvertTo: cannon_uberState
actions from the original unit will be kept
Don't change these fields when using
1.15 whenBuilding_temporarilyConvertTo_keepFields fields whenBuilding_temporarilyConvertTo_keepFields: maxHp, maxEnergy, moveSpeed
whenBuilding_temporarilyConvertTo (both to and from)
whenBuilding_triggerAction action ref While action is queued, another action is triggered. whenBuilding_triggerAction: spawnMinions
While action is queued, the unit is rotated to the target.
1.14 whenBuilding_rotateTo_aimAtActionTarget bool whenBuilding_rotateTo_aimAtActionTarget: true
Often used with fireTurretX actions
While action is queued, a specified turret is aimed at the target.
1.14 whenBuilding_rotateTo_rotateTurretX turret ref whenBuilding_rotateTo_rotateTurretX: cannon
Often used with fireTurretX actions
spawnEffectsOnQueue effect ref Effects to spawn at unit when action is first added to queue spawnEffectsOnQueue: CUSTOM:steam
Global sound to play to unit's player only when action is first
playSoundToPlayerOnQueue sound ref playSoundToPlayerOnQueue: eva_building.ogg
added to queue
Misc outcomes / Results (What happens) (Note: Must be at
#==== #====
least one outcome for an action to show)
requireConditional LogicBoolean Skip all effects of this action if this evaluates to false requireConditional: if self.resource.mass < 300
1.13.3 convertTo unit ref Convert your unit into another unit. properties are preserved. convertTo: fishLevel2
Keep current and temporarily tags and ignores default tags on
1.14 convertTo_keepCurrentTags bool convertTo_keepCurrentTags: true
convertTo target.
Don't change these fields when converting, useful with
setUnitStats (Allowed fields: maxHp, maxShield, shieldRegen,
1.15 convertTo_keepCurrentFields fields maxEnergy, armour, mass, shootDelayMultiplier, moveSpeed, convertTo_keepCurrentFields: armour, maxEnergy, maxHp
maxAttackRange.)

Adds energy to unit. Has no effect unless energyMax is set.


addEnergy addEnergy addEnergy: 10
(Same as addResources: energy=X)
addResources resources Add these resources when action finishes. addResources: credits=5, energy=-5, hp=-100, shield=5, ammo=1
Same as addResources, but increased or decreased
addResourcesScaledByAIHandicaps resources addResourcesScaledByAIHandicaps: credits=5, hp=-100
depending on AI difficulty level
Like addResources but allows logic to be used for the resource
1.15 addResourcesWithLogic dynamic resources addResourcesWithLogic: hp = select( self.parent.energy>5, 10, 20 )
value
Sets target resources to this value instead of adding.
1.15 setResourcesWithLogic dynamic resources setResourcesWithLogic: hp=self.parent.hp - 10, energy = self.energy / 2
Becareful with global resources.
deleteSelf bool Remove self with no explosions or sounds deleteSelf: true
resetCustomTimer LogicBoolean Reset timer used with self.customTimer() resetCustomTimer: true
Rotates the unit to a particular direction. Supports dynamic
1.13.3 setBodyRotation int setBodyRotation: 270, setBodyRotation: directionBetween(self, customTarget1)
values

Allows changing of a select number of fields dynamically


without converting. Supports =/+=/-=, with dynamic
maths/logic. Changeable fields: maxHp, hp, maxShield, shield,
1.15 setUnitStats fields values shieldRegen, maxEnergy, energy, armour, mass, setUnitStats: maxShield += 20, moveSpeed += 0.1
shootDelayMultiplier, shootDamageMultiplier, moveSpeed,
maxTurnSpeed, maxAttackRange, fogOfWarSightRange,
nanoRange, selfRegenRate

1.15 resetUnitStats boolean Reset changes made by setUnitStats to base values resetUnitStats: true
setUnitMemory: """
customText=memory.customText+'hello',
Change this unit's memory, values can be set with logic.
1.15 setUnitMemory key value pairs nukeActive=true,
Memory must first be defined with defineUnitMemory
nextTarget=self.attacking.nearestUnit(withinRange=300, withTag='x', relation='enemy')
"""
NOTE: In setting array memories, it is important to put the
1.15p11 setUnitMemory: myTargets[4]=nearestUnit(withTag="fish")
array index (supports dynamic values)
1.15 setHeight logicNumber Changes unit height based on this height value setHeight: parent.height+5
Used for unit linking without requiring unit memories or
1.15 setCustomTarget1: unit ref setCustomTarget1: self.parent
markers. It is the unit that built this by default.
Like setCustomTarget1 and with the same use. It is none by
1.15 setCustomTarget2: unit ref setCustomTarget2: lastDamagedBy
default.
1.15 sendMessageTo: unit ref Sends a message to a targeted unit sendMessageTo: unitref nearestUnit(withinRange=100, withTag="fish").
Useful for message detection in an autoTriggerOnEvent event,
1.15 sendMessageWithTags: Message Tag sendMessageWithTags: hitZone
eg autoTriggerOnEvent:newMessage(withTag='xyz')
The data that will be sent to the targeted unit. Allows multiple
1.15 sendMessageWithData key-value key-value pairs with any dynamic data type, use eventData() to sendMessageWithData: fish="nice!", cat=self.activeWaypointTarget, amount=4, xyz=memory.something
read this data in the event
Refunds the spent price in the queue of a specific action;
1.15 refundAllQueuedItems boolean refundAllQueuedItems: true
Includes set flags in price
1.15 removeAllQueuedItemsWithoutRefund boolean Similar to refundAllQueuedItems, but does not refund removeAllQueuedItemsWithoutRefund: true
#==== #==== Outcome - Chaining Actions
Trigger to results of another action as well. Ignores action's
alsoTriggerAction action refs alsoTriggerAction: addCredits, playSound
requirements.
Adds another action into the normal unit's queue. Ignores
alsoQueueAction action refs alsoQueueAction: spawnMinions
action's requirements
Defaults true. alsoTriggerAction and alsoQueueAction are
alsoTriggerOrQueueActionConditional LogicBoolean alsoTriggerOrQueueActionConditional: false
ignored if this works out to be false.
Changes the target of the triggered action, normally defaults to
1.15p9 alsoTriggerOrQueueActionWithTarget unitref the current action target. Effects things like alsoTriggerOrQueueActionWithTarget: lastDamagedBy
fireTurretXAtGround, spawnUnits, thisActionTarget(), etc
Repeats the alsoTriggerAction call, thisActionIndex changed
1.15p11 alsoTriggerActionRepeat logicNumber alsoTriggerActionRepeat: 5
on each repeat - Useful to create loops or work with arrays
#==== #==== Outcome - Sounds
playSoundAtUnit sound ref Local sound to play when action finishes playSoundAtUnit: engineStart.ogg
playSoundGlobally sound ref Global sound to play to all players in game playSoundGlobally: hornWarn.ogg
playSoundToPlayer sound ref Global sound to play to unit's player only playSoundToPlayer: confirm.wav
#==== #==== Outcome - Fire projectile from turret
When action finishes fire target turret at point on ground,
fireTurretXAtGround turret ref fireTurretXAtGround: nukeSilo
bypasses canShoot rules in turret.
If not set player targets the ground with GUI, if a point is set
fireTurretXAtGround_withOffset: point fireTurretXAtGround_withOffset: 0,0
this step is skipped
Used with fireTurretXAtGround. Defaults to target turret's
fireTurretXAtGround_withProjectile: projectile ref fireTurretXAtGround_withProjectile: nuke
normal projectile.
Fires a turret aimed at the location of the indicated unit or
1.15 fireTurretXAtGround_withTarget unitref fireTurretXAtGround_withTarget: lastDamagedBy
marker
1.13.3 fireTurretXAtGround_count Number of projectiles to fire. Defaults to 1 fireTurretXAtGround_count: 3
Only allow tiles crossable by this movement type to be
1.13.3 fireTurretXAtGround_onlyOverPassableTileOf fireTurretXAtGround_onlyOverPassableTileOf: HOVER
selected (e.g., LAND,BUILDING,WATER,HOVER)
Draws decals at the target location. Recommend setting up
1.15p11 fireTurretXAtGround_showGuideDecals decal refs fireTurretXAtGround_showGuideDecals: strikeZone300
decals with layer: inactive
#==== #==== Outcome - Spawning
NOTE: There is a section for all possible modifications to
spawnUnit, type "spawnUnits:LIST" in the Search function
of the spreadsheet
Spawn units at action's target. See 'Spawn units line' section in
1.13.3 spawnUnits unitref eg: spawnUnits: heavyTank, tank*5, hoverTank(offsetX=10)
this doc for details.
Like spawnUnits but unit exits as if it was produced normally,
1.13.3 produceUnits unitref produceUnits: builder*4, plasmaTank*8
and gets a move away waypoint
spawnEffects effect ref Effects to spawn at unit spawnEffects: CUSTOM:puff
#==== #==== Outcome - Position
Offsets unit position absolutely by this point. Format: [x,y,
1.14 offsetSelfAbsolute: point3d offsetSelfAbsolute: 0, 0, 40
height]
Changes unit position to this position. Great alternative to
1.15p11 teleportTo unit ref/marker teleportTo: memory.lastLocation
fireTurretX with teleporting projectile
#==== #==== Outcome - Transport Changes
Creates and add units into transport, use self.
addUnitsIntoTransport unitTypes addUnitsIntoTransport: tank*3, heavyTank(neutralTeam=true)
transportingCount() to check for space before adding
{Currently broken in 1.15 - don't use} Instantly tries to
transportTargetNow unit ref transports existing units on the map into this transport. Might
fail if rules don't allow this unit to be transported.
deleteNumUnitsFromTransport int Removes a specified amount of cargo units deleteNumUnitsFromTransport: 2
Removes a specified amount of cargo units, but only those
1.13.3 deleteNumUnitsFromTransport_onlyWithTags string(s) deleteNumUnitsFromTransport_onlyWithTags: cheapStuff
with specified tags
1.13.3 startUnloadingTransport bool Unloads all cargo units normally startUnloadingTransport: true
For unload all units, or slot targeted by
1.13.3 forceUnloadTransportNow bool forceUnloadTransportNow_onlyOnSlot. Unloads even if no forceUnloadTransportNow: true
space or overwater, etc
1.14 forceUnloadTransportNow_onlyOnSlot int Focuses the force unload to a specific slot forceUnloadTransportNow_onlyOnSlot: drop1
#==== #==== Outcome - Waypoint Changes
Clears all waypoints, be careful not to annoy players by
1.13.3 clearAllWaypoints bool clearAllWaypoints: true
removing their orders, prepending waypoints is often better
1.13.3 clearActiveWaypoint bool Clears only the current waypoint clearActiveWaypoint: true
Adds a waypoint with a specific purpose. Options: move,
addWaypoint_type enum attackMove, guard, loadInto, loadUp, attack, reclaim, repair, addWaypoint_type: move
touchTarget, build, follow, setPassiveTarget
1.13.3 addWaypoint_unitType unitTypes Only for use with addWaypoint_type:build addWaypoint_unitType: turret
1.13.3 addWaypoint_prepend bool Add to the start of the waypoint queue or the end addWaypoint_prepend: false
If target_nearestUnit fails to find a match so waypoint cannot
1.13.3 addWaypoint_triggerActionIfFailed actions addWaypoint_triggerActionIfFailed: retreat
be added then trigger this action
1.14 addWaypoint_triggerActionIfMatched actions Triggers an action if a waypoint is legal addWaypoint_triggerActionIfMatched: VIP_target
Automatically remove this waypoint if it has been active for
1.13.3 addWaypoint_maxTime time addWaypoint_maxTime: 20s
longer than this time.
1.13.3 addWaypoint_target_nearestUnit_tagged tags Puts the waypoint to a nearest unit with specific tags addWaypoint_target_nearestUnit_tagged: assault, mechanized
Puts the waypoint to a nearest unit with a specific relation to
1.13.3 addWaypoint_target_nearestUnit_team relation the player's unit. Options: own, neutral, allyNotOwn, ally, addWaypoint_target_nearestUnit_team: ally
enemy, any, notOwn
Puts the waypoint to a nearest unit within the maximum range
1.13.3 addWaypoint_target_nearestUnit_maxRange float addWaypoint_target_nearestUnit_maxRange: 2000
specified.
Puts the waypoint only if the waypoint target is reachable by
1.13.3 addWaypoint_target_mapMustBeReachable bool the unit (e.g., if a unit cannot cross two islands, the waypoint is addWaypoint_target_mapMustBeReachable: true
not placed.)
1.15 addWaypoint_target_fromReference unit ref Puts the waypoint to a marker or a reference unit addWaypoint_target_fromReference: self.memory.lastDock
1.13.3 addWaypoint_position_offsetFromSelf point Puts the waypoint to an absolute coordinate addWaypoint_position_offsetFromSelf:
Puts the waypoint taken from an action that triggered this
1.13.3 addWaypoint_position_fromAction bool addWaypoint_position_fromAction: fireShot
action
1.13.3 addWaypoint_position_randomOffsetFromSelf point Puts the waypoint to a random relative coordinate addWaypoint_position_randomOffsetFromSelf:
1.14 addWaypoint_position_relativeOffsetFromSelf point Puts the waypoint to a relative coordinate addWaypoint_position_relativeOffsetFromSelf: 10, 20
1.14p6 addWaypoint_target_randomUnit_tagged tags Puts the waypoint to a random unit with specific tags addWaypoint_target_randomUnit_tagged: chargers, strikers
Puts the waypoint to a random unit with a specific relation to
1.14p6 addWaypoint_target_randomUnit_team relation the player's unit. Options: own, neutral, allyNotOwn, ally, addWaypoint_target_randomUnit_team: any
enemy, any, notOwn
Puts the waypoint to a random unit within the maximum range
1.14p6 addWaypoint_target_randomUnit_maxRange int addWaypoint_target_randomUnit_maxRange: 1000
specified.
#==== #==== Outcome - Cooldown
1.14 addAllActionCooldownsTime time Adds cooldown on all actions, including canBuilds addAllActionCooldownsTime: 4s
1.14 addActionCooldownTime time Player cannot use action again for this amount of time addActionCooldownTime: 20s
1.14 addActionCooldownApplyToActions action ids Sets addActionCooldownTime's target. Defaults to this action. addActionCooldownApplyToActions: retreat, transformFins
1.14 clearAllActionCooldowns bool Removes all existing cooldowns on all buttons clearAllActionCooldowns: true
#==== #==== Outcome - Animation
1.13.3 playAnimation animation id Plays animation when the action is triggered playAnimation: engageThrusters
1.13.3 playAnimationIfNotPlaying bool Don't restart animation if this animation is already playing playAnimationIfNotPlaying: true
1.13.3 finishPlayingLastAnimation bool Finish last animation, including blend out finishPlayingLastAnimation: true
1.13.3 stopLastAnimation bool Stop last animation, skipping blend out stopLastAnimation: true
Change team to neutral. This team is allied to all other teams.
1.13.3 switchToNeutralTeam boolean Will be captured by nearby units unless [core]stayNeutral:true switchToNeutralTeam: false
is used
Change to a built-in team that is aggressive to all other teams.
1.13.3 switchToAggressiveTeam boolean switchToAggressiveTeam: true
Does not get captured.
Team id to switch to. Starts at 0. (but -1 for a neutral team, -2
1.15 switchToTeam logicNumber switchToTeam: 2, switchToTeam: lastDamagedBy.teamId
for aggressive Team). Also supports dynamic values
#==== #==== Outcome - Take Resources from other units
Resources to take (required to use take resources). And at-
1.13.3 takeResources customPrice takeResources: hp=5, gold=10
least 1 include key is needed.
1.13.3 takeResources_includeUnitsInTransport bool Includes cargo units in taking resources takeResources_includeUnitsInTransport: true
1.13.3 takeResources_includeParent bool Include attachment parent or transport parent takeResources_includeParent: true
1.15 takeResources_includeReference unit ref Includes referenced units in taking resources takeResources_includeReference: self.lastDamagedBy
1.13.3 takeResources_includeUnitsWithinRange float Includes all units within the specified range takeResources_includeUnitsWithinRange: 300
Used with includeUnitsWithinRange, defaults to own. Can be:
1.13.3 takeResources_includeUnitsWithinRange_team TeamRelation takeResources_includeUnitsWithinRange_team: own
own|ally|allyNotOwn|enemy|neutral|any
1.13.3 takeResources_excludeUnitsWithoutTags tags Includes all units without the specified tags in taking resources takeResources_excludeUnitsWithoutTags: truck, tanker
1.13.3 takeResources_excludeUnitsWithTheseResources customPrice Excludes all units with custom prices in them takeResources_excludeUnitsWithTheseResources: oil, juice, sauce
1.13.3 takeResources_excludeUnitsWithoutAllResources bool Defaults to true. takeResources_excludeUnitsWithoutAllResources: true
Triggers an action if any amount of resources is collected in
1.13.3 takeResources_triggerActionIfAnyCollected action refs takeResources_triggerActionIfAnyCollected: purify
the current collection action
Triggers an action if no amount of resources is collected in the
1.13.3 takeResources_triggerActionIfNoneCollected action refs takeResources_triggerActionIfNoneCollected: callOtherTanker
current collection action
Calls this action for each unit found by takeResource with the
1.15p11 takeResources_triggerActionForEach action refs unit as thisActionTarget, and thisActionIndex counting up from takeResources_triggerActionForEach: manufacture
zero.
1.13.3 takeResources_discardCollected bool Just take resources from targets, don't add(or remove) to self takeResources_discardCollected: false
Don't add/remove resource from target. This clones resources.
Use with takeResources_discardCollected and
1.13.3 takeResources_keepResourcesOnTarget bool takeResources_keepResourcesOnTarget: true
takeResources_triggerActionIfAnyCollected to make a
resource detector.
takeResources_maxUnits int Defaults to 1. Takes resources from specified amount of units takeResources_maxUnits: 10
Shortcut for maxUnits: 200, discardCollected: true,
1.15 takeResources_searchOnly bool takeResources_searchOnly: true
keepResourcesOnTarget: true to detect resources only
If less resources on target than transfer amount, only
1.14 takeResources_directTransferStoppingAtZero bool remaining resources will be transfered. Doesn't support use takeResources_directTransferStoppingAtZero: true
with some other takeResources_* keys
#==== #==== Outcome - Convert Resources
1.13.3 convertResource_from customResource Name of custom resource to take from convertResource_from: juice
1.13.3 convertResource_to customResource Name of custom resource to give to convertResource_to: sauce
Skip if less than this amount in 'from'. Defaults to 0. Likely not
1.13.3 convertResource_minAmount float convertResource_minAmount: 10
needed for most use cases
1.13.3 convertResource_maxAmount float Max amount to transfer between 'from' and 'to' convertResource_maxAmount: 100
Defaults to 1. Amount to multiply when adding on 'to' (does not
1.13.3 convertResource_multiplyAmountBy float convertResource_multiplyAmountBy: 1.5
effect amount taken on 'from')
#==== #==== Outcome - Set Resources
Name of custom resource to set with the below 3 keys. All keys
1.13.3 resourceAmount customResource resourceAmount: oil
are optional, and can be used together.
Absolute value to set this resource to, ignores current value of
1.13.3 resourceAmount_setValue float resourceAmount_setValue: 20
resource. Skipped by default
Name of another custom resource to add to this on. Can be
1.13.3 resourceAmount_addOtherResource customResource used without resourceAmount_setValue, to just add resources. resourceAmount_addOtherResource: juice
Or with resourceAmount_setValue:0 to copy a resource value.
1.13.3 resourceAmount_multiplyBy float Defaults to 1. Multiple the current or new value by resourceAmount_multiplyBy: 2
#==== #==== Outcome - Attachment changes
1.13.3 attachments_addNewUnits unit types Adds specified units to attachments attachments_addNewUnits: coreDefense*3
1.13.3 attachments_deleteNumUnits int Removes a specified amount of units attached attachments_deleteNumUnits: 3
1.13.3 attachments_onlyOnSlots attachment ids Restrict attachments_* actions to these attachments attachments_onlyOnSlots: drop1, drop2, drop3
Unload all attachments. Can be used with
1.14 attachments_unload bool attachments_onlyOnSlots. Same as unloading transported attachments_unload: true
units
Disconnect all attachments in the place they are right now. Can
1.14 attachments_disconnect bool attachments_disconnect: true
be used with attachments_onlyOnSlots.
1.13.3 disconnectFromParent bool Disconnects this unit from parent's attachment slot disconnectFromParent: true
#==== #==== Outcome - Tag changes
Add tag to this unit until it is converted or reset (unless
1.13.3 temporarilyAddTags tags temporarilyAddTags: emptyJuice, fullSauce
convertTo_keepCurrentTags is used)
Remove tag from this unit until it is converted or reset (unless
1.13.3 temporarilyRemoveTags tags temporarilyRemoveTags: fullJuice, emptySauce
convertTo_keepCurrentTags is used)
1.13.3 resetToDefaultTags bool Reset to standard tags resetToDefaultTags: true
Add a tag to player's team. Use with self.globalTeamTags() to
1.13.3 addGlobalTeamTags tags create unlocks and upgrades. Unique tags are best to not addGlobalTeamTags: upgrade_energized, upgrade_research2
conflict with other mods.
1.13.3 removeGlobalTeamTags tags Remove a tag from player's team. removeGlobalTeamTags: buff_immune
#==== #==== Outcome - Show Message
1.13.3 showMessageToPlayer string Sends a message to the player controlling the unit showMessageToPlayer: There is a hidden enemy near your defenses
Note: This format is support on nearly all strings that show to
1.13.3 showMessageToPlayer_{LANG} string player even when reference doesn't show it. Use ISO 639-1 showMessageToPlayer_fil: May nakatagong kalaban na malapit sa mga depensa mo
Language Code on the {LANG} placeholder
1.13.3 showMessageToAllPlayers string Sends a message to all players showMessageToAllPlayers: %{self.playerName} has captured a point
1.14 showMessageToAllEnemyPlayers string Sends a message to all enemy players only showMessageToAllEnemyPlayers: Team %{self.playerName} has %{self.resource.gold}
Sends a Quick War Log message to the player controlling the
1.13.3 showQuickWarLogToPlayer string showQuickWarLogToPlayer: Unit decloaked
unit (in the lower lef)
Sends a Quick War Log message to all players (in the lower
1.13.3 showQuickWarLogToAllPlayers showQuickWarLogToAllPlayers: 500 oil sold to allied market
lef)
1.13.3 debugMessage Only shows in Sandbox with Debug mode on. debugMessage: [action log] unit launch on %{thisActionTarget.x}, %{thisActionTarget.y}

Section
[effect_NAME] Effects are purely visual, but can be important for a mod

Code Value Type Description Example


Defaults to normal. Changes how effect is rendered. Options:
1.15p9 drawType normal|displacement normal|displacement (displacement only shows when shader drawType: normal
effects are turned on)
Defaults 200. Time till effect is removed. Set low as possible to
1.13 life float life: 70
reduce effect overhead.
1.14 lifeRandom float Random offset life by +/- this value lifeRandom: 12
Create more effects when created, useful for meta-effects.
1.13 alsoEmitEffects effect ref alsoEmitEffects: CUSTOM:extraSparks*2
Note: other 'alsoEmitEffects' on created effects are ignored.
1.14 alsoEmitEffectsOnDeath effect ref Create these effects when life runs out. alsoEmitEffectsOnDeath: CUSTOM:finalPuff
If 'spawnChance' for this effects fails then emit these effects
ifSpawnFailsEmitEffects effect ref ifSpawnFailsEmitEffects: CUSTOM:greenSparks*4
instead
Plays sound upon spawning the effect. Use OGG or WAV
1.13 alsoPlaySound sound ref audio files. Appending a colon with a float value sets the alsoPlaySound: meow.wav:0.5
volume
Defaults false. When true, effect is created when the unit is
1.13 createWhenOffscreen bool createWhenOffscreen: true
offscreen
Defaults true. Effect is created even when the map is zoomed
1.13 createWhenZoomedOut bool createWhenZoomedOut: false
out. Set to false for improving performance
1.13 createWhenOverLiquid bool Defaults true. Effect is created when the unit is over water createWhenOverLiquid: false
1.13 createWhenOverLand bool Defaults true. Effect is created when the unit is over land createWhenOverLand: false
Default 1. If less than 1 effect only has a random chance of
1.13 spawnChance float spawnChance: 1
being created
1.13 showInFog bool Default false. When true, effect is still visible on fog of war showInFog: true
1.13 delayedStartTimer float Hide for x time before showing and updating effect. delayedStartTimer: 2s
1.13 liveAfterAttachedDies bool Defaults false when attachedToUnit is being used liveAfterAttachedDies: false
Defaults to high. verylow/low/high/veryhigh/critical. Takes
1.13 priority string priority: critical
effect when too many effects are being shown at once.
#==== #==== Movement
Attach to unit or projectile that created this effect. Will move
1.13 attachedToUnit bool attachedToUnit: true
with this object. Useful for thrust effects
1.13 alwayStartDirAtZero bool Ignore source/attached unit dir alwayStartDirAtZero: true
1.13 atmospheric bool Apply drag to slow this effect down and add small wind effects atmospheric: true
1.13 physics bool Fall to ground and bounces. Needs height to take effect. physics: true
1.13 physicsGravity float Defaults to 1. height speed acceleration when physics: true physicsGravity: 0.5
Offset starting effect position. Relative to direction of attached
1.13 xOffsetRelative float xOffsetRelative: 2
turret, projectile, unit
Offset starting effect position. Relative to direction of attached
1.13 yOffsetRelative float yOffsetRelative: 2
turret, projectile, unit
1.13 xOffsetRelativeRandom float Random offset by +/- this value xOffsetRelativeRandom: 4
1.13 yOffsetRelativeRandom float Random offset by +/- this value yOffsetRelativeRandom: 4
Offset starting effect by position ignoring direction of attached
1.13 xOffsetAbsolute float xOffsetAbsolute: 2
turret, projectile, unit
Offset starting effect by position ignoring direction of attached
1.13 yOffsetAbsolute float yOffsetAbsolute: 2
turret, projectile, unit
1.13 xOffsetAbsoluteRandom float Random offset by +/- this value xOffsetAbsoluteRandom: 5
1.13 yOffsetAbsoluteRandom float Random offset by +/- this value yOffsetAbsoluteRandom: 5
Moves the effect sprite on relative horizontal position with
specified speed. Negative will move left relative to source,
1.13 xSpeedRelative float xSpeedRelative: 2
positive will move right relative to source. Useful for thrust
effects for moving units
Moves the effect sprite on relative vertical position with
specified speed. Negative will move down relative to source,
1.13 ySpeedRelative float ySpeedRelative: 3
positive will move up relative to source. Useful for thrust effects
for moving units
1.13 xSpeedRelativeRandom float Randomly change by -value to value xSpeedRelativeRandom: 2
1.13 ySpeedRelativeRandom float Randomly change by -value to value ySpeedRelativeRandom: 2
Moves the effect sprite on absolute horizontal position with
specified speed. Negative will move left relative to map,
1.13 xSpeedAbsolute float xSpeedAbsolute: 5
positive will move right relative to map. Useful for smoke
effects on structures
Moves the effect sprite on absolute vertical position with
specified speed. Negative will move down relative to map,
1.13 ySpeedAbsolute float ySpeedAbsolute: 5
positive will move up relative to map. Useful for smoke effects
on structures
1.13 xSpeedAbsoluteRandom float Randomly change by -value to value xSpeedAbsoluteRandom: 2
1.13 ySpeedAbsoluteRandom float Randomly change by -value to value ySpeedAbsoluteRandom: 2
height offset from source. May be mistakenly confused with
1.13 hOffset float hOffset: 4
yOffsetAbsolute
1.13 hOffsetRandom float Randomly change by -value to value hOffsetRandom: 5
1.13 hSpeed float Sets the speed to change the height of the effect hSpeed: 1
1.13 hSpeedRandom float Randomly change by -value to value hSpeedRandom: 1
1.13 dirOffset float Sets the static direction of the effect dirOffset: 43
1.13 dirOffsetRandom float Randomly change by -value to value dirOffsetRandom: 50
1.13 dirSpeed float Sets the rotation speed of the effect dirSpeed: 2
1.13 dirSpeedRandom float Randomly change by -value to value dirSpeedRandom: 3
#==== #==== Graphics
1.13 frameIndex int Use a specific frame from strip index frameIndex: 0
frameIndexRandom bool -? Use random frame from strip index frameIndexRandom: true
A built-in image set to use. Cannot be used with custom image.
Options:
1.13 stripIndex int/string stripIndex: projectiles
effects/explode_big/light_50/flame/effects/effects2/projectiles/p
rojectiles2/explode_bits
1.13 image image Custom image file to use. Cannot be used with stripIndex. image: whitePuff.png
imageShadow image Custom image file to use for shadows imageShadow: AUTO
1.13 scaleTo float Defaults to 1. Resizes the unit into the specified scale scaleTo: 2
1.13 scaleFrom float Defaults to 1. Resizes the unit from the specified scale scaleFrom: 4
Defaults #FFFFFFFF. Changes the color of the effect sprite.
1.13 color color color: #ff00ff
Use pure white sprite for most use cases.
Sets team coloration between 0-1. Team color is dependent
teamColorRatio teamColorRatio: 1
from source unit
1.13 drawUnderUnits bool Renders the effect under all units drawUnderUnits: false
1.13 fadeInTime float Fade alpha from 0% to 100% for this time at start fadeInTime: 2s
Fade alpha from 100% to 0% based on life. Set alpha is higher
1.13 fadeOut bool fadeOut: 4s
than 1 to delay fade
Capped between 0-1. Can be set higher than 1 to delay
alpha alpha: 1
fadeOut effects
shadow True to draw a shadow. Forced true if imageShadow is used shadow: false
Similar to dirOffset, this will also rotate relative keys and child
1.15 pivotOffset float pivotOffset: 20
elements
1.15 pivotOffsetRandom float Offsets pivot between +/- of specified value pivotOffsetRandom: 34
#==== #==== Animation
Total frames of 'image', used with animation or frameIndex.
1.13 total_frames int total_frames: 10
Only needed with custom images
1.13 animateFrameStart int Starting frame for the animation animateFrameStart: 0
1.13 animateFrameEnd int Ending frame for the animation animateFrameEnd: 3
1.13 animateFramePingPong int If true, animation will go back and forth within the frames animateFramePingPong: true
Sets the animation speed. The lower the value, the slower it
1.13 animateFrameSpeed time animateFrameSpeed: 10
plays
1.13 animateFrameSpeedRandom time Randomizes how fast the effect animation plays animateFrameSpeedRandom: 20
Defaults false. When false effect is removed when animation
1.14 animateFrameLooping bool animateFrameLooping: true
ends

Section
[animation_NAME] Use this to make intricate animations based on different circumstances

Code Value Type Description Example


Automatically plays the animation on specified events. Options:
1.13 onActions: enum move, attack, idle, underConstruction, onActions: move
underConstructionWithLinkedBuiltTime, queuedUnits, repair
For onAction: queuedUnits. Amount queue needs to reach
1.13 onActionsQueuedUnitPlayAt: float onActionsQueuedUnitPlayAt: 0
before starting, set between 0-1
1.13 blendIn: time Blend with last animation for this time blendIn: 2s
1.13 blendOut: time Blend with next animation for this time blendOut: 3s
1.13 pingPong bool Play animation in reverse after it ends pingPong: true
Scales all keyframe times, useful to make an animation
1.13 KeyframeTimeScale: float KeyframeTimeScale: 1
faster/slower without changing everything
#==== #==== Keyframes - create as many as needed
Adds a keyframe at time. Use multiple times to create
1.13 arm#_[time] arm1_5s: {x: 5, dir: 90 }
animation.
Adds a keyframe at time. Use multiple times to create
leg#_[time] leg1_3s: {dir: 300}
animation.
Adds a keyframe at time for body. Only frame and scale
body_[time] body_4s: {frame: 4, scale: 0.5}
allowed on body
1.14 effect_[time] Spawn effects while playing an animation effect_2s: {name:CUSTOM|myExplode, x: 0,y: 5}

Overrides [graphics]animation_direction_units while this


direction_units float direction_units: 45
animation is playing
direction_strideX: int Overrides [graphics]animation_direction_strideX direction_strideX: 20
direction_strideY: int Overrides [graphics]animation_direction_strideY direction_strideY: 50
direction_starting: float Overrides [graphics]animation_direction_starting direction_starting: 0
#==== #==== Deprecated Keys (can be used but there are better ways)
1.13 start : int Start image frame. deprecated
1.13 end : int End image frame. deprecated
1.13 scale_start : float Start scale. Deprecated, use body keyframes instead.
1.13 scale_end : float End scale. Deprecated, use body keyframes instead.
Speed, smaller is faster. Only effects start, end, scale_start,
1.13 speed : float
scale_end

Type
spawnUnits:LIST Spawn lines specifically for units, used with "unit ref" value types

Code Description Example


Most units spawning keys support multiple units with
#==== #==== spawnUnits: crates*10(neutralTeam=true), tank(spawnChance=0.5)
parameters
Spawn the unit on the neutral team instead of the same team
1.13.3 neutralTeam spawnUnits: tank*3(neutralTeam=true, offsetRandomX=20, offsetRandomY=20, gridAlign=true)
as source
Spawn the unit on the last attacker of source (useful on [core]
1.13.3 setToTeamOfLastAttacker spawnUnits: egg(setToTeamOfLastAttacker=true)
unitsSpawnedOnDeath)
1.13.3 spawnChance 0-1 Chance this unit will spawn. Defaults to 1. spawnUnits: shards(spawnChance=0.3)
Changes spawn location and team of spawned units to this unit
1.15 spawnSource unit ref spawnUnits: tank(spawnSource=memory.lastLocation)
ref.
Useful with spawnChance, max number of units to spawn in
1.13.3 maxSpawnLimit spawnUnits: treeA(spawnChance=0.5, maxSpawnLimit=1), treeB(maxSpawnLimit=1)
total
1.13.3 gridAlign Align spawn location to grid, useful for buildings spawnUnits: hovertank(gridAlign: true)
Don't spawn this unit if spawn in an invalid location. Eg on units
1.13.3 skipIfOverlapping bool spawnUnits: crates*10(skipIfOverlapping=true, offsetRandomX=40, offsetRandomY=40, gridAlign=true)
or over water when LAND based
1.13.3 offsetX float Sets horizontal position relative to source spawnUnits: jet(offsetX=20), jet(offsetX=-20)
1.13.3 offsetY float Sets vertical position relative to source spawnUnits: scout(offsetY=40), scout(offsetY=-40)
1.13.3 offsetDir float Set the facing direction of spawned units spawnUnits: bike(offsetDir=-45)
1.13.3 offsetHeight float Sets the height for spawned units spawnUnits: drone(offsetHeight=20)
1.13.3 offsetRandomX float Sets random horizontal position relative to source spawnUnits: k9*5(offsetRandomX=45)
offsetRandomY float Sets random vertical position relative to source spawnUnits: scanners*10(offsetRandomY=60)
offsetRandomDir float Set random facing direction of spawned units spawnUnits: chickens*20(offsetRandomDir=360)
Give spawn unit those resources, can be used to set flags that
1.13.3 addResources resource ref spawnUnits: crates(addResources=gold:30|stone:10, spawnChance=0.5)
trigger actions
Puts the designated amount of transported units into the
1.14 transportedUnitsToTransfer int spawnUnits: transporter(transportedUnitsToTransfer=5)
transport of the spawned unit.
1.15 copyWaypointsFrom unit ref Copies all waypoints on target to created units. spawnUnits: tank(copyWaypointsFrom=self)
1.14 alwayStartDirAtZero bool Sets the direction of spawned unit to 0 degrees. spawnUnits: builder(alwayStartDirAtZero=true)
damagingBorder Used with techLevel
zoneMarker Used with techLevel
Usually used in BR maps, controls the size of safe zone
techLevel int markers and damaging borders. 1 techLevel = 10x10 tiles = spawnUnits: damagingBorder(techLevel=100), zoneMarker(techLevel=40)
200 pixels in diameter

1.14 Type
spawnProjectiles:LIST Spawn lines specifically for projectiles, used with "proj ref" value types

1.14 Code Description Example


Example: [projectile_main]
NOTE: If you need to use offsetDir to rotate your projectiles in a different
spawnProjectilesOnExplode: shrapnel(offsetDir=90), shrapnel(offsetDir=-90)
direction (like for shrapnel), you must also set these projectile speeds low
[projectile_shrapnel]
enough to force their trajectory
turnSpeed: 0
1.14 #==== #==== Most projectile spawning keys used for projectile ref
1.14 spawnChance float Chance this projectile will spawn. Defaults to 1. spawnProjectilesOnEndOfLife: secondary*3(spawnChance=0.5)
1.14 maxSpawnLimit int Maximum amount to spawn spawnProjectilesOnExplode: bomblet*3(spawnChance=0.5, maxSpawnLimit=2)
Prevents loops, useful with spawning itself so it doesn't
1.14 recursionLimit int infinitely spawn, good for chain exploding. (Recommended no spawnProjectileOnEndOfLife: flamingBits*4(spawnChance=0.35, recursionLimit=2)
more than 4 if spawning more than 3 projectiles)
spawnProjectileOnCreate: shot(offsetX=10, recursionLimit=0), shot(offsetX=-10, recursionLimit=0), shot
1.14 offsetX float Sets horizontal position
(offsetY=10, recursionLimit=0)
spawnProjectileOnCreate: shot(offsetX=10, recursionLimit=0), shot(offsetX=-10, recursionLimit=0), shot
1.14 offsetY float Sets vertical position
(offsetY=10, recursionLimit=0)
Similar to offsetX, but the offset is relative to the position of the
1.14 xOffsetRelative float spawnProjectileOnCreate: homingEnergy(xOffsetRelative=5, yOffsetRelative=10)
projectile
1.14 yOffsetRelative float Similar to xOffsetRelative, but for Y axis spawnProjectileOnCreate: homingEnergy(xOffsetRelative=5, yOffsetRelative=10)
1.14 offsetRandomX float Random value to offset in the X axis only spawnProjectileOnExplode: strayBullet(offsetRandomX=10, offsetRandomY=30)
1.14 offsetRandomY float Random value to offset in the Y axis only spawnProjectileOnExplode: strayBullet(offsetRandomX=10, offsetRandomY=30)
The offset in both directions to randomly spawn, makes truly
1.14 offsetRandomXY float spawnProjectileOnEndOfLife: shrapnels*20(spawnChance=0.2, offsetRandomXY=100)
random spawning within an area
1.14 offsetHeight float Sets height of the projectile spawnProjectileOnCreate: scythe(offsetHeight=20)
1.14 offsetDir degrees Sets direction of the projectile spawnProjectileOnExplode: stars(offsetDir=45)
1.14 offsetRandomDir degrees Sets random direction of the projectile spawnProjectileOnEndOfLife: fireworks(offsetRandomDir=72)

Type
LogicBoolean_ Advanced code to create conditionals and triggers

Code Returns Description Example


true bool This value will meet the condition autoTrigger: true
false bool This value will not meet the condition autoTrigger: false
Start all logic booleans with if, unless just using booleans
if isActive: if self.hasFlag(id=1)
(true/false)
Connector. Adds another condition to the list. All conditions
and bool autoTrigger: if self.isInWater and self.energy>=1
linked by this must be reached to return true.
Connector. Adds another condition to the list. Just one of the
or bool autoTrigger: if (self.energy>=2 or self.ammo>=1) and self.isFlying
conditions linked must be reached to return true
Conditional. Reverts meaning of the next logic boolean. Useful
not bool if not self.isOverLiquid (the opposite of being over liquid)
to set negative conditions
Return true if number on left is smaller. Means less than next
1.15 < bool isLocked: if self.ammo < 1
value
Return true if number on right is smaller. Means greater than
1.15 > bool autoTrigger: if self.isInWater and self.energy>=1
next value
Return true if number on left is smaller or equal. Means less or
1.15 <= bool requireConditional: if numberOfUnitsInTeam(withTag="fish") >= 10
equal than next value
Return true if number on right is smaller or equal. Means
1.15 >= bool requireConditional: if numberOfUnitsInTeam(withTag="fish") <= 11
greater or equal than next value
Return true if number, unit, string, bool on both sides is the
1.15 == bool hidden: if memory.tail == 0
same. Means equal to next value
Return true if number, unit, string, bool on both sides different.
1.15 != bool isVisible: if memory.message != parent.readUnitMemory(name="stateMessage", type="string")
Means different to next value
Add two numbers or join two strings. Means addition to this
1.15 + same type setUnitMemory: stockpile = self.ammo + customTarget1.resource.reserve
value
1.15 - same type Subtract two numbers. Means substraction to this value setUnitMemory: stockpile = self.ammo - customTarget2.resource.reserve
1.15 / same type Divide two numbers. Means division of two values setUnitMemory: damageMultiplierBuffer = memory.population / memory.death
1.15 * same type Multiply two numbers. Means multiplication of two values setUnitMemory: reserveCash = memory.population * self.resource.credits
Divides two numbers and returns the remainder. Means a
1.15 % same type setUnitMemory: isEvenX = select(self.x % 2, true, false)
percentage of a value
#==== #==== Unit location and movement "self" prefix can be replaced with other unit-based prefixes (more information below)
self.isUnderwater() bool Checks if unit is underwater autoTrigger: if self.isUnderwater()
self.isAtGroundHeight() bool Checks if unit is in surface level autoTrigger: if thisActionTarget.isAtGroundHeight()
self.isFlying() bool Checks if unit is flying isActive: if self.isFlying()
self.isMoving() bool Checks if unit is moving on its own by any means isLocked: if self.isMoving()
1.15 self.isReversing() bool Checks if unit is moving backwards isLockedAlt2: if self.isReversing()
Checks if the unit current speed matches the moveSpeed
self.isAtTopSpeed() bool autoTrigger: if self.isAtTopSpeed()
property
self.isInWater() bool Checks if unit touches a water tile isLocked: if not self.isInWater()
self.isOverwater() bool Checks if unit is touching or over a water tile isLocked: if not self.isOverwater()
self.isOverLiquid() bool Checks if unit is touching or over a liquid tile (water, lava) isLocked: if not self.isOverLiquid()
self.isOverClift() bool Checks if unit is touching a cliff tile isLocked: if not self.isOverClift()
Checks if unit is touching or over a specific tile (parameters:
self.isOverPassableTile() bool type, Type Values: NONE, LAND, BUILDING, HOVER, isLockedAlt: if self.isOverPassableTile(type=OVER_CLIFF_WATER)
OVER_CLIFF, OVER_CLIFF_WATER, AIR, WATER)
self.isOverOpenLand() bool shortcut for self.isOverPassableTile(type='LAND') hidden: if not self.isOverOpenLand()
#==== #==== Unit stats
Checks if unit has these resources. Can check multiple
1.13.3 self.hasResources() bool isActive self.hasResources(credits=1, energy=2)
resources at the same time (all price parameters).
Checks a single resource (parameters: type, greaterThan,
self.resource() float / bool isActive: self.resource(type=gold) >= 10
lessThan) (1.15 returns float with no parameters)
1.15 self.resource.RESOURCE_TYPE float Shortcut for: self.resource(type='RESOURCE_TYPE') addResourcesWithLogic: hp += self.resource.gold
Compare two resource between each other, note
multiplyTargetBy doesn't make any changes. (parameters: autoTrigger: self.isResourceLargerThan(source=oil, compareTarget=sauce, byMoreThan=100,
1.14? self.isResourceLargerThan bool
source=x, compareTarget=x, byMoreThan=x, multiplyTargetBy=0.2)
multiplyTargetBy=x)
(parameters: greaterThan, lessThan, empty, full). (1.15 returns
self.hp() float / bool addResourcesWithLogic: energy += select(self.hp > self.energy, 10, 3)
float with no parameters)
(parameters: greaterThan, lessThan, empty, full). (1.15 returns
1.15 self.maxHp() float / bool setResourcesWithLogic: sauce = self.maxHp * self.energy
float with no parameters)
(parameters: greaterThan, lessThan, empty, full) (1.15 returns
self.height() float / bool imageScale: 1 + (self.height * 0.1)
float with no parameters)
Returns int if no parameters, boolean with any parameters
self.ammo() int / bool isLocked: if self.ammo < 1
(parameters: greaterThan, lessThan, empty, full)
self.isAmmoEmpty() bool shortcut for self.ammo(empty=true) isLockedAlt: self.isAmmoEmpty()
Also includes ammo from actions still in queue (parameters:
self.ammoIncludingQueued() int / bool isLocked: if self.ammoIncludingQueued(lessThan=12)
greaterThan, lessThan, empty, full)
(parameters: greaterThan, lessThan, empty, full) (1.15 returns
self.energy() float / bool isVisible: if self.energy() > 50
float with no parameters)
Also includes energy from actions still in queue (parameters:
self.energyIncludingQueued() float / bool isVisible: if self.energyIncludingQueued()
greaterThan, lessThan, empty, full)
self.isEnergyFull() bool shortcut for self.energy(full=true) isLocked: if self.isEnergyFull()
self.isEnergyEmpty() bool shortcut for self.energy(empty=true) isActive: if self.isEnergyEmpty()
Returns maximum energy (defaults to energyMax value in
self.maxEnergy() float / bool core, dynamically adjusts to changed value made by isLocked: if memory.kills < self.maxEnergy()
1.15p10 setUnitStats)
self.isEnergyRecharging() bool Checks if unit energy is passively recharging text: Reload %{select(self.isEnergyRecharging(), "", "[ready")}
(parameters: greaterThan, lessThan, empty, full) (1.15 returns
self.shield() float / bool isActive: if self.shield() == 0
float with no parameters)
Returns the maximum shield value (defaults to maxShield
1.15p10 self.maxShield() float / bool value in core, but dynamically adjusts to changes made with isLockedAlt2: if self.energy <= self.maxShield()/2
setUnitStats)
(parameters: greaterThan, lessThan) (1.15 returns int with no
self.kills() int / bool setUnitMemory: score = self.kills()*3
parameters)
(parameters: greaterThan, lessThan, full, empty, equalTo)
1.13.3 self.queueSize() int / bool (1.15 returns float with no parameters) 1.15p9 adds a new isLocked: if self.queueSize() >= 4
parameter: withActionTag="#"
Return team id of unit or marker. Starts at 0. (but -1 for a
self.teamId() int switchToteam: lastDamagedBy.teamId()
neutral team)
self.teamName() string Returns allied group team name showMessageToAllPlayers: %{attacking.teamName()} dominated %{thisActionTarget.teamName()}
showQuickWarLogToAllPlayers: %{self.playerName()} destroyed %{thisActionTarget.playerName()}'s %
self.playerName() string Returns player's name
{thisActionTarget}
self.x() float Returns the horizontal position of the unit description: [Position]\n[X]: %{self.x}\n[Y]: %{self.y}\n[Z]: %{self.z}\n[D]: %{self.dir}
1.15
self.y() float Returns the vertical position of the unit description: [Position]\n[X]: %{self.x}\n[Y]: %{self.y}\n[Z]: %{self.z}\n[D]: %{self.dir}
Returns the elevation position of the unit (identical to self.
self.z() float description: [Position]\n[X]: %{self.x}\n[Y]: %{self.y}\n[Z]: %{self.z}\n[D]: %{self.dir}
height)
self.dir() float Returns the unit's direction description: [Position]\n[X]: %{self.x}\n[Y]: %{self.y}\n[Z]: %{self.z}\n[D]: %{self.dir}
Returns the price of the unit. Only returns the credit price.
self.priceCredits() addResourcesWithLogic: credits = attacking.priceCredits
Does not support custom resources.
1.15p9 self.builtAmount() float Returns the current value of build progression of the unit stack_indexCount: int(12 * (self.builtAmount * 0.1))
1.15p9 self.completed() bool Shortcut for self.builtAmount() == 1 autoTrigger: if self.completed()
1.15p9 self.speed() float Returns current speed of the unit isLockedAlt: if self.speed < 2
Returns the maximum possible speed set for the unit (value set
1.15p9 self.maxMoveSpeed() float for moveSpeed property, may be manipulated with autoTrigger: if memory.defaultSpeed < self.maxMoveSpeed
setUnitStats)
#==== #==== Misc
Boolean flag saved into units for mods to use. (parameters:
self.hasFlag() bool autoTrigger: if self.hasFlag(id=1)
id=0-31)
self.tags() bool Checks or return tags of a unit (parameters: includes) autoTrigger: if self.tags(includes='fish')
1.13.3 self.globalTeamTags() bool Checks or returns global tags on a unit (parameters: includes) autoTrigger: if self.globalTeamTags(includes='animal')
(parameters: greaterThan, lessThan, empty) (1.15 returns int
self.transportingCount() int text: Load - %{self.transportingCount()}
with no parameters)
(withTag, greaterThan, lessThan) (1.15 returns int with no
self.numberOfAttachedUnits() int / bool text: Cores - %{self.numberOfAttachedUnits()}
parameters)
self.isAttacking() bool Checks if the unit is attacking something setUnitStats: moveSpeed=select(self.isAttacking, 4, 2)
self.hasActiveWaypoint() bool (parameters: type=WAYPOINT_TYPE) text: Waypoint - %{self.hasActiveWaypoint(type='move')}
1.15 self.numberOfQueuedWaypoints() int / bool (parameters: type=WAYPOINT_TYPE, amount=#) text: Waypoint Queue - %{self.numberOfQueuedWaypoints(type='attackMove') >= 2}
self.transportingUnitWithTags() bool (parameters: includes) requireConditional: if self.transportingUnitWithTags(includes='human')
Checks if a unit is attached or a passenger of a unit. For both
self.hasParent() bool isVisible: if self.hasParent
attachments and transports (parameters: [withTag=x] )
Checks when the unit last took damage (parameters:
self.hasTakenDamage() float / bool withinSeconds=X, laterThanSeconds=X) (v1.15 returns float in isActive: if self.hasTakenDamage(withinSeconds=1)
seconds with no parameters)
Checks how long the unit is alive (parameters:
self.timeAlive() float / bool withinSeconds=X, laterThanSeconds=X) (v1.15 returns float in isLocked: if self.timeAlive() > 100
seconds with no parameters)
Check the time the unit last converted from (parameters:
self.lastConverted() float / bool withinSeconds=X, laterThanSeconds=X) (v1.15 returns float in isLockedAlt2: if self.lastConverted()
seconds with no parameters)
Returns the current value in the unit's custom timer
self.customTimer() float / bool (parameters: withinSeconds=X, laterThanSeconds=X) (v1.15 autoTrigger: if self.customTimer() > 120
returns float in seconds with no parameters)
self.isOnNeutralTeam() bool Checks if the unit belongs to the neutral team (Team ID -1)
Checks amount of player units that meet the parameters
(parameters: withTag, greaterThan, lessThan, withinRange,
self.numberOfUnitsInTeam() int / bool isLocked: if numberOfUnitsInTeam(withTag='techUnlockBuilding', lessThan=5)
incompleteBuildings, factoryQueue) (v1.15 returns int with no
parameters)
Checks amount of allied and player units that meet the
parameters (parameters: withTag, greaterThan, lessThan,
self.numberOfUnitsInAllyTeam() int / bool description: TEAM %{self.teamName}\n\nTank Population: %{self.numberOfUnitsInAllyTeam()}
withinRange, incompleteBuildings, factoryQueue) (v1.15
returns int with no parameters)
Checks amount of allied only units that meet the parameters
(parameters: withTag, greaterThan, lessThan, withinRange,
1.14 self.numberOfUnitsInAllyNotOwnTeam() int / bool isActive: if self.numberOfUnitsInAllyNotOwnTeam() > 100
incompleteBuildings, factoryQueue) (v1.15 returns int with no
parameters)
Checks amount of enemy units that meet the parameters
(parameters: withTag, greaterThan, lessThan, withinRange,
1.13.3 self.numberOfUnitsInEnemyTeam() int / bool autoTrigger: if self.numberOfUnitsInEnemyTeam(withinRange=500) > 0
incompleteBuildings, factoryQueue) (v1.15 returns int with no
parameters)
Checks amount of neutral units that meet the parameters
(parameters: withTag, greaterThan, lessThan, withinRange,
numberOfUnitsInNeutralTeam() int / bool isVisible: if memory.deadzone.numberOfUnitsInNeutralTeam() >= 10
incompleteBuildings, factoryQueue) (v1.15 returns int with no
parameters)
Checks amount of aggressive neutral units that meet the
parameters (parameters: withTag, greaterThan, lessThan,
1.14 numberOfUnitsInAggressiveTeam() int / bool isVisible: if memory.deadzone.numberOfUnitsInAggressiveTeam() >= 30
withinRange, incompleteBuildings, factoryQueue) (v1.15
returns int with no parameters)
Checks amount of any units that meet the parameters
(parameters: withTag, greaterThan, lessThan, withinRange,
1.15p9 numberOfUnitsInAllTeams() int / bool text: Birds: %{numberOfUnitsInAllTeams(withTag="bird")}
incompleteBuildings, factoryQueue) (v1.15 returns int with no
parameters)
(parameters: withTag, withinRange, incompleteBuildings,
self.hasUnitInTeam() bool isLocked: if self.hasUnitInTeam(withTag="fish")
factoryQueue) alias for numberOfUnitsInTeam
1.13.3 (parameters: withTag, withinRange, incompleteBuildings,
self.noUnitInTeam() bool isLocked: if self.noUnitInTeam(withTag="infected")
factoryQueue) alias for numberOfUnitsInTeam
self.isControlledByAI() bool Checks if a unit is controlled by AI. text: Robot? %{select(self.isControlledByAI(), "Yes", "No")}
1.15 self.readUnitMemory() any type (name:string, type:string{boolean,unit,float,string}, [default]) isActive: if parent.readUnitMemory('boostTarget', type='unit') == self
#==== #==== Unit references
fireTurretXAtGround: mainGun (thisActionTarget==Marker with ground location)
alsoTriggerAction: x (thisActionTarget==Same as original action)
[turret]onShoot_triggerActions: x (thisActionTarget==Target that was shot at)
thisActionTarget unit / marker Current target or location targeted.
takeResources_triggerActionIfAnyCollected: x (thisActionTarget==Target with resources)
addWaypoint_triggerActionIfMatched: x (thisActionTarget == Marker for move/Target for attack, etc.
Note: use addWaypoint_maxTime:0 if you want to search only)
Used with alsoTriggerActionRepeat and
thisActionIndex int alsoTriggerActionRepeat: thisActionIndex
takeResources_triggerActionForEach
autoTriggerOnEvent: tookDamage (eventSource==Unit that caused damage)
autoTriggerOnEvent: killedAnyUnit (eventSource==Unit that was killed)
autoTriggerOnEvent: transportingNewUnit (eventSource==Unit that was transported)
eventSource unit / marker Current trigger from an autoTriggerOnEvent, otherwise null autoTriggerOnEvent: transportUnloadedOrRemovedUnit (eventSource==Unit unloaded)
autoTriggerOnEvent: queuedUnitFinished (eventSource==New unit made)
autoTriggerOnEvent: touchTargetSuccess (eventSource==Target touched)
Returns unit attachment as reference (parameters: [slot],
attachment unit setCustomTarget2: self.attachment(withTag='x').lastDamagedBy.getAsMarker()
[withTag])
1.15 transporting unit Returns unit passenger as reference (parameters: [slot]) autoTrigger: if self.transporting(slot=0).hasResources(gold=100)
Current target this is attacking, might not be the current
attacking unit isLocked: if attacking.tags(includes='bug') and attacking.hp < 20
waypoint target.
lastDamagedBy unit Last unit that attacked this. teleportTo: lastDamagedBy
The transporter or attachment parent. (Note: units are
parent unit autoTrigger: if parent.energy > 100
suspended state when transported without attachment slot)
Current active waypoint target. Includes attacking, transporting,
activeWaypointTarget unit isActive: if distanceBetween(self, activeWaypointTarget) < 100
repairing, etc.
customTarget1 unit Custom memory, defaults to the unit that created this unit. isLocked: if parent.customTarget1 == self
customTarget2 unit Custom memory, defaults to null fireTurretXAtGround_withPosition: customTarget2
(withinRange=500, withTag='x', relation='any') Search for a unit
nearestUnit unit setCustomTarget1: nearestUnit(withTag="derrick")
(not recommended in autoTrigger check for perfomance)
(withTag=x, relation) - Returns first (and oldest) unit found
globalSearchForFirstUnit unit self.globalSearchForFirstUnit(withTag='gameController', relation='neutral')
matching the filter. Slow, avoid using in autoTrigger checks
nullUnit unit returns a null unit reference, useful for comparisons isLockedAlt2: if self.parent == nullUnit
#==== #==== Marker functions

creates a temporary marker at the position a unit is right now.


Markers are very fast to create and automatically removed
getAsMarker marker lastDamagedBy.getAsMarker()
when no longer needed. Is not linked to any unit and still exists
when the unit dies, and stays the same when source moves.

1.15
([x],[y],[height]) Returns marker with absolute offset (-y is north,
getOffsetAbsolute marker addWaypoint_target_fromReference: unitref getOffsetAbsolute(self.x, self.y+1000, self.z)
+x is east)
([x],[y],[height],[dirOffset]) Returns marker with relative offset.
getOffsetRelative marker self.getOffsetRelative(y=100).nearestUnit(withinRange=70, withTag='mouse') != null
(y+ is forwards)
Returns the event from autoTriggerOnEvent, null if used
eventSource event text: Event: %{eventSource}
outside of a valid autoTriggerOnEvent
#==== #==== Global functions
Reads memory from the unit reference (e.g. self.
self.readUnitMemory('ammoType', type='string'), parent.readUnitMemory(''attachmentArray", type="unit[
readUnitMemory all arguments readUnitMemory, parent.readUnitMemory, attacking.
]", index=5), attacking.readUnitMemory("wishlist", type="string[ ]")[12]
readUnitMemory)
Shortcut to read the self with current defineUnitMemory types.
memory.NAME self only Cannot be used on other units, use readUnitMemory for that. autoTrigger: if memory.experience > 100
Don't call with self.
Array Memory methods. usable on both memory logic
#==== #====
functions above.
Returns the size of the array (including empty indexes between
memory.NAME.size int setUnitMemory: squadSize = memory.squad.size
indexes)
Returns true if the query is found within the array. Basically
memory.NAME.contains(query) bool autoTrigger: if memory.savedCoord.contains(lastDamagedBy.customTarget1.customTarget1)
searches something if it exists.
distance(x1, y1, x2, y2) float Returns the difference between two points isLocked: if distance(self.x, self.y, thisActionTarget.x, thisActionTarget.y) > 350
Returns the squared difference between two points. Bit faster
distanceSquared(x1, y1, x2, y2) float isLocked: if distanceSquared(self.x, self.y, thisActionTarget.x, thisActionTarget.y) > 19
than distance.
distanceBetween(unit1, unit2) float Returns the distance between two units or markers isLocked: if distanceBetween(self, memory.antenna) > 1000
Returns the squared distance between two units. Bit faster
distanceBetweenSquared(unit1, unit2) float isLocked: if distanceBetweenSquared(self, memory.antenna) > 100
than distanceBetween
game.nukesEnabled() bool Returns true if nukes are enabled in this game's settings. isActive: if not game.nukesEnabled()
int(x) int Removes decimal places from a number. stack_indexCount: int(12 * (self.builtAmount * 0.1))
select(bool, textA, textB) returns textA if bool is true otherwise returns textB setUnitMemory: isEvenX = select(self.x % 2, true, false)
Returns a text string helping to explain the reason for the
debug(logicBoolean) string current result. Can see into nested logic, comparisons, and description: [DEBUG] %{debug(self.x > self.y)}
operators.
str(x) string Convert a number, unit or boolean into a string str(self.energy)+'x' == '100x'
1.15 substring(text,start,end) string Takes a part of the string from the indicated start and end parts substring('hello',0,2) == 'he'
length(string) int Returns string length as number length(memory.sms)
squareRoot(num) float Requires square root of a number squareRoot(self.x + self.y)
min(num1, num2) float Returns the smallest number damage = min(self.hp, self.energy)
max(num1, num2) float Returns the biggest number max(5, 10) == 10
Creates a marker that can be used to place coordinates for
createMarker(x, y, [height], [teamId], [dir]) marker fireTurretXAtGround_withTarget: createMarker(self.x + 500, self.y + 500)
various actions
Displays the data from a specified message from some unit.
eventData(name, type, [default]) any type text: %{eventData(name="msg", type="string")}
Only use in autoTriggerOnEvent:newMessage events
sin(angle) float Takes the sine value of a specified number sin(10) = 0.173
cos(angle) float Takes the cosine value of a specified number cos(60) = 0.5
Produces a random number between minimum and maximum
rnd(min, max) float rnd(666, 888)
input.
lowercase(string) string Sets all letters from a string into lowercase lowercase("Spaghetti Macaroni Lasagna") -> "spaghetti macaroni lasagna"
uppercase(string) string Sets all letters from a string into uppercase uppercase("fish dish wish") -> "FISH DISH WISH"
direction(x1, y1, x2, y2) float Returns the relative angle of x1/y1 and x2/y2 direction(self.x, self.y, attacking.x, attacking.y)
directionBetween(unit1, unit2) float Returns the relative angle of unit/marker A and unit/marker B directionBetween(self, lastDamagedBy)
Returns true if unit (or marker) is with the game area; Returns
self.isInMap() bool autoTrigger: if not self.isInMap()
false if outside bounds
game.mapWidth() float Returns the width of the map fireTurretXAtGround_withTarget: createMarker(rnd(0, game.mapWidth), rnd(0, game.mapHeight))
game.mapHeight() float Returns the height of the map fireTurretXAtGround_withTarget: createMarker(rnd(0, game.mapWidth), rnd(0, game.mapHeight))
self.teamDefeatedTech() bool Returns true if team is defeated autoTrigger: if attacking.teamDefeatedTech()
1.15p9 self.teamWipedOut() bool Returns true if team is defeated and wiped out autoTrigger: if self.teamWipedOut()
self.teamVictory() bool Returns true if team is victorious autoTrigger: if self.teamVictory()

1.14 Type
[placementRule_NAME] Allows creation of rules for requiring buildings

1.14 Code Value Type Description Example


(Only require 1 of the rules in this group pass, instead of all.
1.14 anyRuleInGroup: string Use the same group name on other placement rules to create anyRuleInGroup: struct
a group.)
1.14 searchTags: tag list Search for any unit with at least one of these tags searchTags: factory
Teams to include in search, can be:
1.14 searchTeam: relation searchTeam: own
own|neutral|allyNotOwn|ally|enemy|any
1.14 searchOffsetX: float defaults to 0 searchOffsetX: 100
1.14 searchOffsetY: float defaults to 0 searchOffsetY: 200
1.14 searchDistance: float Required searchDistance: 500
defaults to false. Might want to set to true depending on the
1.14 excludeIncompleteBuildings: bool excludeIncompleteBuildings: true
requirement reason
1.14 excludeNonBuildings: bool defaults to false excludeNonBuildings:true
Set min amount of units that need to be found in search. (eg
1.14 minCount: int minCount: 0
needs to be near something). Defaults to 0
Set max amount of units before match fails (eg cannot be close
1.14 maxCount: int maxCount: 1
to something). Defaults to unlimited
1.14 blocksPlacement: bool Defaults to true. blocksPlacement: false
Highly Recommended. Message shown to player if this rule
1.14 cannotPlaceMessage: LocaleString cannotPlaceMessage: "No factory is nearby"
fails (will be first failing rule if using anyRuleInGroup).
defaults to true (set to false to only test unit center, true checks
1.14 checkEachTile: bool each tile under the unit which shows up on the placement grid. checkEachTile: false
Can be easier to see requirements with true)

Prices/Resources lines -
Type used by addResources,
price, etc
Code Targets Description Example
credits Global resource price: 100
energy Energy used for laser shield and ammunition resourceUsage: energy=1
hp Unit hitpoints addResources: hp += 100
shield Shielding for units price: hp=-100, shield=100
ammo Hidden value on each unit for use by mods price: hp=-100, shield=101
use with addResources, resourceUsage or price. 0-31.
setFlag addResources: setFlag=1
Flags are stored in each unit
unsetFlag use with addResources, resourceUsage or price. 0-31
hasFlag use with price or resourceUsage
hasMissingFlag use with price or resourceUsage
Any resource defined in [global_resource_x] or
1.13.3 X gold=5, stone=21, credits=2001
[resource_x] sections

Section
[global_resource_NAME]
Code Value Type Description Example
Define a new resource shared with all units in a team,
works just like the built-in credits resource. Add to 'all-
#==== #====
units.template' (at mod root) for easy use in all of your
mods
1.13.3 displayName LocaleString Name of this resource in UI displayName: Crude Oil
Resource name on smaller UI elements like action hovertext
1.13.3 displayNameShort LocaleString displayNameShort: Oil
(Defaults to displayName)
1.13.3 hidden bool Hide this resource from the player hidden: false
If 2 or mods/units define a resource with the same NAME, the
1.13.3 priority float priority: 0.5
displayName/displayColor with the highest priority is used
1.13.3 displayColor color Color, can be hex with optional alpha displayColor: #FF0000
1.14 displayRoundedDown bool Don't show decimal places to the player displayRoundedDown
1.15 displayTextPrefix string Adds a string before the resource value displayTextPrefix: -
1.15 displayTextPostfix string Adds a string after the resource value displayTextPostfix: x
Appends another resource after this resource. It's
1.15 displayTextAppendResource resource recommended to give a "hidden" key on the appended displayTextAppendResource: sauce
resource to hide duplicate.
Displays the resource even when empty. Set as false by
1.15 displayWhenZero bool displayWhenZero: true
default

1.15 displayPos int Sets the position of the globa resource in the screen displayPos: 1

Shows a custom icon for the specific resource in the HUD and
1.15 iconImage image iconImage: icon_oil.png
in text

1.15 iconImageUseInText bool Default as true; Shows resource icon in action description iconImageUseInText: false

1.15 displayNameHideWhenIconShownInText bool Default as false displayNameHideWhenIconShownInText: true

Hides the icon in menus referring to resource when true.


1.15 displayNameHideWhenIconShownInHUD bool displayNameHideWhenIconShownInHUD: true
Default as false

1.15 displayColorUseInText bool Shows color in action description displayColorUseInText: false

For resources used in appendResourceInHUD that shouldn't


1.15 displayInHud bool displayInHud: false
be hidden: true. Defaults true.

stacks another resource specified after this resource on the


1.15 appendResourceInHUD resource appendResourceInHUD: sauce
HUD.

Defaults as true. When set as false, allows appended resource


1.15 appendResourceInHUD_whenThisZero: bool appendResourceInHUD_whenThisZero: true
to be hidden with the parent resource.

Displays text to show before resource value - replaces


1.15 displayPrefixInHUD string displayPrefixInHUD: -
resource name and removes the colon separator

Similar to the prefix counterpart, but is displayed after the


1.15 displayPostfixInHUD string displayPostfixInHUD: x
resource value

1.15 valueInStats: float Affects post game stats and replay leaderboard. Defaults to 1. valueInStats: 0.5

Adds a space between this and the appended resource.


1.15 displayTextAppendResourceWithGap: bool displayTextAppendResourceWithGap: true
Defaults as false.

Sets the symbol for separating place units in: none, comma,
1.15p9 displayDigitGrouping enum displayDigitGrouping: comma
space

Section
[resource_NAME]
Code Value Type Description Example
Define a new resource local to unit. Works like build-in
#==== #====
ammo resource
1.13.3 displayName LocaleString Name of this resource in UI (eg hovering over unit info) displayName: Sauce
1.13.3 displayNameShort LocaleString Shorter version of resource name used on some text ui displayNameShort: Sus
1.13.3 hidden bool Hide this resource from the player hidden: true
Used to hint to the AI that a resource node with a local
equivalentGlobalResourceForAI resource resources could be used to get a different global resource. Eg equivalentGlobalResourceForAI: universal_sauce
when a harvester unloads the resource
1.14 displayRoundedDown bool Rounds off resource values with decimals displayRoundedDown: true

Type value type [decal_name] Example

1.15p9 # Graphical #
Takes a single image for the decal - NOT TO BE CONFUSED
1.15p9 image image image: fish.png
WITH IMAGE STACK
Sets the layer of the decal, values from lowest to highest -
1.15p9 layer enum layer: beforeUI
shadow, beforeBody, afterBody, onTop, beforeUI, inactive
Defaults as 0, sets a more discrete layering if 2 or more decals
1.15p9 order float order: 2
takes same layer type. Otherwise order in INI file will be used.
When true, automatically reassigns team color to respective
1.15p9 teamColors bool teamColors: true
teams
1.15p9 alpha logicNumber 0-1, sets transparency of decal (images or line) alpha: 0.5
1.15p9 isVisible LogicBoolean Dynamic Value, draws the decal on a specific condition isVisible: if self.hp > self.maxHp/2
1.15p9 # Player Conditions #
Defaults as false, displays the decal only if the owner player
1.15p9 onlyWhenSelectedByOwnPlayer bool onlyWhenSelectedByOwnPlayer : true
clicks on the unit
Defaults as false, displays the decal only if the enemy player
1.15p9 onlyWhenSelectedByEnemyPlayer bool onlyWhenSelectedByEnemyPlayer: true
clicks on the unit
Defaults as false, displays the decal only if the allied player
1.15p9 onlyWhenSelectedByAllyNotOwnPlayer bool onlyWhenSelectedByAllyNotOwnPlayer: true
clicks on the unit
Defaults as false, displays the decal only if any player clicks on
1.15p9 onlyWhenSelectedByAnyPlayer bool onlyWhenSelectedByAnyPlayer: true
the unit
Useable with onlyWhenSelectedBy[insertplayer], will also
1.15p9 includeParentsSelection bool includeParentsSelection: true
checks parent's selection when true. Useful with attachments.
1.15p9 # "Only if" Conditions #
Draws the decal if value matches the player from the following:
1.15p9 onlyTeam TeamRelation onlyTeam: any
own, notOwn, ally, allyNotOwn, enemy, any
1.15p9 onlyWhileActive bool Draws the decal only if the unit is fully built onlyWhileActive: true
Draws the decal only if the unit is alive (If beforeUI layer default
1.15p9 onlyWhileAlive bool onlyWhileAlive: false
true, else default false)
1.15p9 onlyInPreview bool Only show in sidebar, and building placement preview onlyInPreview: false
Draws the decal only if the zoom level matches or exceeds it,
1.15p9 onlyWithZoomLevelOrMore float onlyWithZoomLevelOrMore: 0.4
very useful for making 3D units more optimized.
Draws the decal only on the unit itself, not on the preview from
1.15p9 onlyOnNonPreview bool onlyOnNonPreview: true
building or in sidebar interface
Draws the decal if a player that selects it has control (that
1.15p9 onlyPlayersWithUnitControl bool onlyPlayersWithUnitControl: true
includes shared units in multiplayer)
1.15p9 onlyOnBodyFrameOf int Only draw decal when body frame is equal to this onlyOnBodyFrameOf: 0
1.15p9 # Offsets (Positioning) #
1.15p9 xOffsetRelative int Sets horizontal offset relative to the unit xOffsetRelative: 50
1.15p9 yOffsetRelative int Sets vertical offset relative to the unit yOffsetRelative: 50
1.15p9 xOffsetAbsolute logicNumber Dynamic value xOffsetAbsolute: 40
1.15p9 yOffsetAbsolute logicNumber Dynamic value yOffsetAbsolute: 40
1.15p9 hOffset int Sets the height of the whole decal hOffset: 10
1.15p9 dirOffset int Sets the direction of the whole decal. dirOffset: 45
1.15p9 pivotOffset int only affects relative offsets without rotating image pivotOffset: 45
Keeps the decal on north direction regardless of the unit's
1.15p9 alwaysStartDirAtZero bool alwaysStartDirAtZero: true
direction value, useful for custom in-unit interfaces
1.15p9 # Image specifics / Stacks #
1.15p9 Takes one or more image with occassional multipliers for Multiple image file stack: imageStack - carFloor.png, carBody.png*3, carRoof.png*2, antenna.png*10
imageStack images stacking. Also useful for using image stack from a
1.15p9 MagicaVoxel slice export Stack from a sprite sheet - imageStack: carModel.png*14

1.15p9 imageScale logicNumber Dynamic value, scales the decal imageScale: 1 + (self.height * 0.1)
1.15p9 imageScaleX logicNumber Dynamic value imageScaleX: 1
1.15p9 imageScaleY logicNumber Dynamic value imageScaleY: (self.hp/self.maxHp)*100
Sets the height of every layer in a stack. 1 layer = 1 pixel. Can
1.15p9 stack_hOffset float stack_hOffset: 4
take negative values.
Useful for making 3D units, frame to offset by in imageStack.
1.15p9 stack_frameOffset int stack_frameOffset: 1
Often a value of 1 is useful in a sprite sheet.
Renders the stack in the opposite way - last frame goes on
1.15p9 stack_drawInReverseOrder bool stack_drawInReverseOrder: true
bottom, first frame goes to top
1.15p9 stack_indexStart logicNumber Offset to start drawing images in the image stack stack_indexStart: 0
1.15p9 stack_indexCount logicNumber Number of images in the image stack to draw. stack_indexCount: 10
Sets the number of frames in an image from an imageStack
1.15p9 total_frames int total_frames: 10
that uses a spritesheet.
1.15p9 frame_width int Sets the frame width in the decal stack frame_width: 20
1.15p9 frame_height int Sets the frame height in the decal stack frame_height: 40
1.15p9 frame logicNumber Dynamic value, useful for animations frame: memory.frame
1.15p9 addBodyFrameMultipliedBy int Add body frame number to this decal when set to 1. addBodyFrameMultipliedBy: 2
1.15p9 # Shadows #
1.15p9 image_shadow image Sets shadow for the decal image_shadow: AUTO
1.15p9 shadowOffsetX int Sets the horizontal position of the decal's shadow shadowOffsetX: 0
1.15p9 shadowOffsetY int Sets the vertical position of the decal's shadow shadowOffsetY: 0
1.15p9 # Marker Positioning #
1.15p9 Attaches the decal on the specified marker. use "self" if basePosition: self
basePosition marker
1.15p9 attaching it to the unit itself basePosition: memory.launchPoint
1.15p9 basePositionFromLegEnd leg/arm Attaches the decal to the specified leg or arm ending. basePositionFromLeg: leg_3, basePositionFromLeg: arm_5
1.15p9 basePositionFromTurret turret Attaches the decal to the specified turret basePositionFromTurret: rocketLauncherBase
1.15p9 # Waypoint Lines #
Draws a line from the unit to the specified marker, useful for
1.15p9 drawLineTo marker ref drawLineTo: attacking.customTarget2
custom waypoints
1.15p9 color color hex Sets the color of the drawn line color: #ffff00
1.15p9 lineWidth float Sets the width of the drawn line lineWidth: 2

Section
[comment_NAME]
Code Value Type Description Example
1.13.3 #==== #==== Comment sections can have any keys and have no effect.

bug_attack, bug_die, building_explode, cannon_firing, click,


List of default game noises (for turret fire sound or other click_add, click_remove, firing3, firing4, gun_fire,
sound references): interface_error, large_gun_fire1, large_gun_fire2,
laser_deflect, laser_deflect2, lighting_burst, message,
missile_fire, missile_hit, move, nuke_explode, nuke_launch,
plasma_fire, plasma_fire2, tank_firing, unit_explode,
unit_explode_old, warning
Section
[template_NAME]
Code Value Type Description Example
Template sections can have any keys and have no effect
1.13.3 #==== #====
by themselves.
Template can get included from other files with [core]
copyFrom. Eg: [core]copyFrom: ROOT:
#==== #====
effects/explodeEffects.template (Note that copyFrom can
include multiple files. )
--All these below features can be used with any section
#==== #====
not just templates--
Use in any section to include keys from a section or template.
1.13.3 @copyFromSection @copyFromSection: template_name/action_name/projectile_name
(Comma separated for multiple)
Use in any section to make [core]copyFrom not copy into it. Eg
@copyFrom_skipThisSection @copyFrom_skipThisSection
not copy an action when overriding
Define a local variable within a section (best outside of
@define X @define targetEffect: boom
template)
Define a global variable used in all sections. Local variables
@global X @global targetEffect: pop
have a higher priority
1.15 @memory X Define a memory for this unit, its type must be defined as well. @memory transportCount: float
${X} can be used to reference variables (can also be done
1.13.3 outside of a template). It is calculated when loading and spawnEffects: effect_${targetEffect}
remains static. Has no impact on runtime performance.
${section.key} can be used to reference another key (can also
1.13.3 addResources: credits=${ core.price * 2 + 10 }
be done outside of a template)
%{X} can be used to add dynamic logic into some strings.
1.15 (CAN NOT be used everywhere). The value will update every [action]text: Missing hp %{self.maxHp - self.hp}
frame.
copyFrom:"""
ROOT:a.ini,
""" text """ can be used for multiline strings. Newlines with be ROOT:b.ini,
1.15
removed from final result. ROOT:c.ini
"""

A template that can be used to share many parts across copyFrom:ROOT:templates\cruiser.template, copyFrom:ROOT:
File NAME.template units, used with copyFrom: templates\infantry.template, copyFrom:ROOT:templates\hq.
However, cannot define variables
template,
Section Key Value type Description Example
Any

Put at the root of the mod folder, applies anything in it to [core]


File all-units.template ALL units across all .ini files, can have any sections but explodeTypeOnDeath: large
cannot define variables
energyMax: 26
Section Key Value type Description Example
Any

This file defines some of properties of a mod for display


in mod browser and in Steam Workshop. It should be
File mod-info.txt placed in the top of mod's file hierarchy, otherwise will
result in error

Section Key Value type Description Example


title String Sets the title of the mod package title: Sample mod
Sets the description of the mod package. Doesn't support line
description String description: This is a sample of mod that samples a unit to the game
breaks.
Sets varied tags depending on what is specified, can be
[mod] tags String tags: units, sample, demo
multiple with comma as separator
Declares the minimum version compatible for the mod. It is
minVersion String important to declare one when using decals and other modding minVersion: 1.15p9
keys starting on version 1.15p9 beta
thumbnail image Sets the mod's thumbnail in Steam Workshop thumbnail: assets/images/other/thumb.png

sourceFolder audio dir Sets where the custom music will be played for the mod sourceFolder: assets/audio/music
[music]
whenUsingUnitsFromThisMod_playExclusively bool Only plays music from this mod whenUsingUnitsFromThisMod_playExclusively: true

in [projectile_#], a unit may use a built-in frame from the


If there is no image or frame supplied, the game will display a white dot instead, wherein a modder can
res/drawable directory. However, only three strips are
Projectile Draw Types designated for this use case. Use the id value for the drawType
change its color using the color key. This is observable to Command Center, Heavy Tank, and Missile
Tank
key, and a frame number for a desired appearance.

id name usable frames image (with frame numbers)

0 projectiles.png 12

1 projectiles_large.png 3

2 projectiles2.png 6
Version Section [core]
Added Code Value Type Description Example
Necessary Code, will cause error if these are not included
name:
mass:
radius:
price:
maxHp:
#==== #==== Common Keys
name: string Defines the unit raw name, game uses it to identify as a unique name. (This is not displayed in-game) name: customTank1
altNames: string(s) Comma separated list of names. Like name but lower priority, useful for multiple optional mods. altNames: custTank1, customTank1, cTank1
class: string Reserved for future use, must be CustomUnitMetadata by default. class: CustomUnitMetadata
1.13.3 strictLevel: float Defaults to 0. 1 = Errors if keys are duplicated. Add to "all-units.template" in root to apply to all units. strictLevel: 1
price: int The unit cost from builders/buildings. price: 500
mass: int The 'weight' of the unit, defines how it collides with other units, a greater value means it's tougher to push. mass: 3000
techLevel: int Defines the Tech Level of the unit, there're 3 levels and each will appear in a different color in the GUI. techLevel: 1
buildSpeed: float / s Time it takes to build the unit. (may multiply with builder speed) buildSpeed: 3s
radius: int Circular area around the unit that makes it selectable. (mouse click/screen touch) radius: 20
isBio: bool Choose whether the unit is bioligical or not, affects sound and splat (unless hideScorchMark:true) isBio: true
isBug: bool Changes some death defaults, and sort order in Sandbox. isBug: false
1.13 isBuilder: bool Normally required if this unit places buildings. Defaults to [ai]useAsBuilder. isBuilder: true
#==== #==== Unit Stats Keys
maxHp: int The max health for the unit. (will spawn with this value) maxHp: 200
selfRegenRate: float Passive self repair rate. selfRegenRate: 0.01
maxShield: int The max shield hitpoints of the unit. Can start with 0 hitpoints if startShieldAtZero:true. maxShield: 500
startShieldAtZero: bool Unit starts with a 0 hitpoints shield on created if true. startShieldAtZero: true
shieldRegen: float Passive shield regen rate. shieldRegen: 0.15
energyMax: float Defaults to 0. Energy that can be used as ammo for turrets, laser defense and actions. energyMax: 1
energyRegen: float Passive energy regen rate. energyRegen: 0.001
energyStartingPercentage: float Sets the percentage of charged energy when the unit is first built. energyStartingPercentage: 0.5
energyNeedsToRechargeToFull: float Disables weapons using energy after reaching zero till fully recharged if true. energyNeedsToRechargeToFull: true
energyRegenWhenRecharging float Regen rate while recharging.
energyDisplayName string Unused, no effect.
1.13 armour: int Damage taken away from each hit. (not currently used in any vanilla units) armour: 6
1.13 armourMinDamageToKeep: int Min damage to keep from received damage. Defaults to 1. armourMinDamageToKeep: 2
1.13.3 borrowResourcesWhileAlive: price Takes these resources when created and returns them when removed or destroyed. borrowResourcesWhileAlive: gold=10
1.13.3 generation_resources: price Income unit creates. (custom resource version) generation_resources: credits=5, gold=20
1.13.3 generation_active: logicBoolean Disables generation_resources/credits when false. (logic_boolean) generation_active: if not self.hp(lessThan=100)
generation_credits: int Income unit creates. (credits only) generation_credits: 2
generation_delay: int How often generation_resources/credits is added. Defaults to 40. (changing not recommended) generation_delay: 40
#==== #==== UI and Graphics Keys
showInEditor: bool Set to false to hide unit in Sandbox editor. (Defaults to true) showInEditor: false
displayText: LocaleString The unit name that the game shows to the player. displayText: Custom Tank
1.13 displayText_{LANG}: string LANG = ISO 639-1 Code to show this text instead when game is in this language. displayText_es: Tanque Personalizado
displayDescription: LocaleString Unit description that the game shows to the player. displayDescription: -Fast movement\n-Light damage
1.13 displayDescription_{LANG}: string LANG = ISO 639-1 Code to show this text instead when game is in this language. displayDescription_es: -Movimiento rápido\n-Daño ligero
displayLocaleKey: string Translation file key for unit name and description. displayLocaleKey: units.mechArtillery
displayRadius: int Defaults to radius value. Set to show a larger or smaller selection circle UI on units. displayRadius: 20
uiTargetRadius int Defaults to displayRadius value. Radius used when attacking/reclaiming/etc this unit
shieldRenderRadius: int Defaults is a little bigger than radius. Set to show a larger or smaller shield circle on units. shieldRenderRadius: 12
shieldDisplayOnlyDeflection: bool Hide shield unless deflecting shot if true. shieldDisplayOnlyDeflection: true
shieldDeflectionDisplayRate: float Defaults to 4. High value causes shield deflection to fade disappear faster. shieldDeflectionDisplayRate: 3
1.13.3 showOnMinimap: bool Defaults to true. Hide units on minimap if false. showOnMinimap: false
1.13.3 showActionsWithMixedSelectionIfOtherUnitsHaveTag: bool Shows a merged action list if all units selected includes one of these tags. Useful for converted units. showActionsWithMixedSelectionIfOtherUnitsHaveTag: true

1.14 showOnMinimapToEnemies bool Useful for stealth units


#==== #==== Building Only Keys
isBuilding: bool Defines if the unit is a building. isBuilding: true
footprint: ints Left, up, right, down. Tiles taken up which block unit movement. Defaults to 0,0,0,0 = 1 center tile. footprint: 0,0,1,1
constructionFootprint: ints Tiles taken up for placement of other buildings. Defaults to 0,0,0,0 = 1 center tile. constructionFootprint: -1,-1,1,3
displayFootprint: ints Left, up, right, down. Only applies to buildings, just used for GUI. Defaults to footprint. displayFootprint: 0,0,1,1
buildingSelectionOffset: int Defaults to 0. Adds or removes padding on the drawn selection rect in UI. buildingSelectionOffset: 4
buildingToFootprintOffsetX: float Defaults to 10. Change the building position in the footprint on the X-axis. buildingToFootprintOffsetX: 4
buildingToFootprintOffsetY: float Defaults to 10. Change the building position in the footprint on the Y-axis. buildingToFootprintOffsetY: 6
placeOnlyOnResPool: bool Normally used for extractors, forces building construction in a resource pool. placeOnlyOnResPool: true
selfBuildRate: float Rate unit builds itself when placed without a builder. selfBuildRate: 0.0008
1.14 ignoreInUnitCapCalculation defaults to true for buildings otherwise false. Set to true to not count this unit in unit cap.
#==== #==== Misc Keys
copyFrom: file(s) (ini) Uses unit data from another ini file as default for this unit, supports multiple files. copyFrom: ROOT:defaultTanks.template, tankT1.ini
dont_load: bool Do not load unit, and don't error on missing data. Can be useful when used with copyFrom. dont_load: true
overrideAndReplace: string(s) Overrides another unit with this unit. Build links and map positions to target unit will be replaced. overrideAndReplace: builder, combatEngineer
1.13.3 onNewMapSpawn: string Values: emptyResourcePools_asNeutral, emptyOrOccupiedResourcePools_asNeutral, mapCenter_asNeutral, mapCenter_eachActiveTeam, spawnPoint_eachActiveTeam
globalScale: float Defaults to 1. Changing not recommended. globalScale: 2
isLocked: bool Disallow building of this unit. Can be used with overrideAndReplace to restrict units player can build. isLocked: true
1.13 isLockedIfGameModeNoNuke: bool Disallows building of this unit if nukes are disabled during match setup. isLockedIfGameModeNoNuke: true
experimental: bool Tag unit as experimental. Affects zoomed out icon and end game stats. experimental: true
stayNeutral: bool Set to false to disable capture when unit is on the neutral team. stayNeutral: false
1.13 createNeutral: bool Set to true to always spawn the unit on the neutral team. createNeutral: true
createOnAggressiveTeam: bool Set to true to always spawn the unit on aggressive teams on single player matches. createOnAggressiveTeam: true
1.13 tags: string(s) List of comma separated strings. Used to classify units, create special actions and balances. tags: tank, smallTank, piercingDamage
fogOfWarSightRange: int Sets number of tiles this unit can see through the fog of war. Defaults to 15. fogOfWarSightRange: 18
1.14 fogOfWarSightRangeWhileNotBuilt int Fog of War range when unit/building is incomplete. Defaults to fogOfWarSightRange
softCollisionOnAll: int Creates a soft collision effect when touching other units. softCollisionOnAll: 3
disableAllUnitCollisions: bool Unit cannot collide with others if true. disableAllUnitCollisions: true
1.13 isUnrepairableUnit: bool No unit can repair this unit if true. isUnrepairableUnit: true
isUnselectable: bool If true unit cannot be selected. (includes AI players) isUnselectable: true
1.14 isUnselectableAsTarget bool Defaults to isUnselectable. Can be used to create units that cannot be selected but can be targeted for attack, reclaim, etc
1.13 isPickableStartingUnit: bool If true, unit is added to dropdowns for starting unit in game setup menus. isPickableStartingUnit: true
1.13 startFallingWhenStartingUnit: bool Unit will appear falling from skies when starting unit if true. startFallingWhenStartingUnit: true
soundOnAttackOrder: sound(s) List of sound names. Only one will be played on each attack order. Only .ogg and .wav formats. soundOnAttackOrder: tankAttackOrder1.ogg, tankAttackOrder2.ogg
soundOnMoveOrder: sound(s) List of sound names. Only one will be played on each move order. Only .ogg and .wav formats. soundOnMoveOrder: tankMoveOrder1.ogg, tankMoveOrder2.ogg
1.13.3 soundOnNewSelection: sound(s) List of sound names. Only one will be played on each unit selection. Only .ogg and .wav formats. soundOnNewSelection: tankSelection1.ogg, tankSelection2.ogg
canNotBeDirectlyAttacked: bool No unit can directly target this unit. If true this will also skip this unit in victory/defeat checks. canNotBeDirectlyAttacked: true
canNotBeDamaged bool Defaults to value of canNotBeDirectlyAttacked (be careful setting this without canNotBeDirectlyAttacked, as AI will attack forever)
1.13.3 canNotBeGivenOrdersByPlayer: bool If true unit will not take player or AI orders. canNotBeGivenOrdersByPlayer: true
1.13.3 canOnlyBeAttackedByUnitsWithTags: strings(s) List of tag strings, only units with these tags can directly target this unit. canOnlyBeAttackedByUnitsWithTags: piercingTank, powerfulTank
1.14 disableDeathOnZeroHp bool Setting to true allows unit to continue living even at 0 HP, useful for custom "death" action. Warning: If not used with an autoTrigger, etc units will attack this unit forever.
#==== #==== Transport Keys
1.13 transportSlotsNeeded: int Defaults to 1. Number of slots this unit uses up in a transport, experimentals are often set to 5. transportSlotsNeeded: 2
maxTransportingUnits int Number of slots this units has for transporting other units. maxTransportingUnits: 5
1.13 transportUnitsRequireTag: string(s) Only allows trasport of units that have one of these tags. transportUnitsRequireTag: smallTank, soldier
1.13 transportUnitsRequireMovementType: movementTypes Only allows trasport of units that have one of these movement types. transportUnitsRequireMovementType: AIR, WATER
1.13 transportUnitsBlockAirAndWaterUnits: bool Defaults to true. This unit can only transport LAND units if true. transportUnitsBlockAirAndWaterUnits: false

1.13 transportUnitsKeepBuiltUnits: bool Makes built units stay inside transport instead of exiting it once ready if true. transportUnitsKeepBuiltUnits: true
1.13 transportUnitsCanUnloadUnits: LogicBoolean Defaults to: if not self.isOverLiquid() and not self.isMoving(). This unit cannot unload units if false. transportUnitsCanUnloadUnits: false
1.13 transportUnitsAddUnloadOption: bool Defines if unload button should be added to the unit menu transportUnitsAddUnloadOption: false
1.13.3 transportUnitsUnloadDelayBetweenEachUnit: float Changes the delay it takes between each unit getting unloaded. transportUnitsUnloadDelayBetweenEachUnit: 12
1.13 transportUnitsKillOnDeath: LogicBoolean Defaults to true. If false transported units don't die when transport dies. transportUnitsKillOnDeath: if self.isOverLiquid()
1.13 transportUnitsHealBy: float Rate to heal units that are being transported. transportUnitsHealBy: 0.1
transportUnitsBlockOtherTransports: bool Defaults to true, if false this transports can hold other transports. transportUnitsBlockOtherTransports: false
1.13.3 whileNeutralTransportAnyTeam: bool This unit can transport units of any team while neutral if true. whileNeutralTransportAnyTeam: true
1.13.3 whileNeutralConvertToTransportedTeam: bool Converts this unit to transported team while neutral. Useful with whileNeutralTransportAnyTeam. whileNeutralConvertToTransportedTeam: true
1.13.3 convertToNeutralIfNotTransporting: bool Reverts back this unit to neutral when unloaded. Useful with whileNeutralTransportAnyTeam. convertToNeutralIfNotTransporting: true
1.13.3 transportUnitsOnTeamChangeKeepCurrentTeam: bool Keeps transported units on their orginal team when this unit is converted if true. transportUnitsOnTeamChangeKeepCurrentTeam: true
transportUnitsEachUnitAlwaysUsesSingleSlot bool Ignore transportSlotsNeeded on transported units.
transportUnitsKeepWaypoints LogicBoolean Default false. When true transported units keep their original waypoints when unloading, and don't get an unload waypoint.

1.13.3 #==== #==== Resource Node Keys

resourceRate: float Used with canReclaimResources. Allows other teams to reclaim this unit. Normally used with neutral team. Use price to set what resources are gained.
similarResourcesHaveTag: string(s) When this has been reclaimed harvester unit moves on to another resource with these tags. similarResourcesHaveTag: goldResource
1.13.3 resourceMaxConcurrentReclaimingThis: int Defaults to unlimited. Set to restict how many units can reclaim this resource at the same time. resourceMaxConcurrentReclaimingThis: 3
1.13.3 reclaimPrice: int Like price but for resources. Useful for buildable resources. reclaimPrice: gold=1000
1.13.3 #==== #==== Resource Harvester Keys
canReclaimResources: bool If true this unit can gather resources, useful with resourceRate. canReclaimResources: true
canReclaimResourcesNextSearchRange: int Defines the resource search range of this unit when its main gathered resource runs out. canReclaimResourcesNextSearchRange: 100
canReclaimResourcesOnlyWithTags: string(s) This unit is only allowed to gather resources with these tags. canReclaimResourcesOnlyWithTags: foodResource, goldResource
canReclaimUnitsOnlyWithTags string(s) This is for reclaiming units, not for resources. See canReclaimResourcesOnlyWithTags
#==== #==== Construction and Factory Keys
canRepairUnitsOnlyWithTags string(s)
canRepairBuildings: bool Can this can heal ally buildings (isBuilder:true is required) canRepairBuildings: true
canRepairUnits: bool Can this can heal ally units. (isBuilder:true is required), canRepairBuildings required for buildings. canRepairUnits: true
autoRepair: bool Automatically try and repair damaged units in nano range. (isBuilder:true is required) autoRepair: true
nanoRange: int Defaults to 85. Defines the unit building/repair/reclaim range. nanoRange: 110
nanoRepairSpeed: float Defaults to 0.2. Defines the unit nano repair/reclaim speed. nanoRepairSpeed: 0.01
nanoBuildSpeed: float Defaults to 1. Defines the unit nano building speed. (May multiply with target's buildSpeed) nanoBuildSpeed: 0.9
1.13.3 nanoRangeForRepairIsMelee: bool Defines if this unit must touch its target to repair it. nanoRangeForRepairIsMelee: true
1.13.3 nanoRangeForReclaimIsMelee: bool Defines if this unit must touch its target to reclaim it. nanoRangeForReclaimIsMelee: true
1.13.3 nanoRangeForRepair: int Defines a specific range for the repair action of this unit. nanoRangeForRepair: 60
1.13.3 nanoRangeForReclaim: int Defines a specific range for the reclaim action of this unit. nanoRangeForReclaim: 60
nanoFactorySpeed: float Defaults to 1. Multiplies the buildSpeed value of the created unit if this unit is a factory. nanoFactorySpeed: 1.2
extraBuildRangeWhenBuildingThis: int Temporarily adds extra build range to builders to build this unit. Useful for water based buildings. extraBuildRangeWhenBuildingThis: 90
builtFrom_#_name: string(s) Useful if adding this unit to build to existing buildings. Like canBuild but in opposite direction. builtFrom_1_name: landFactory, airFactory
builtFrom_#_pos: float Order this build link appears in UI. Using canBuild instead is more recommended. builtFrom_1_pos: 0.1
builtFrom_#_forceNano: bool Build as if this is a building if true. (even if it's a unit) builtFrom_1_forceNano: true
1.13.3 builtFrom_#_isLocked: LogicBoolean If true this unit cannot be built in this build link. (can be conditioned if logicBooleans are used) builtFrom_1_isLocked: if self.hp(lessThan=100)
1.13.3 builtFrom_#_isLockedMessage: LocaleString Message shown when this build link is locked. builtFrom_1_isLockedMessage: -Needs more population
exit_x: float Where created or unloaded units appears from the transport or building. Defaults to 0. exit_x: 0
exit_y: float Where created or unloaded units appears from the transport or building. Defaults to 5. exit_x: 5
1.13 exit_dirOffset: float Defaults to 180 for units and 0 for buildings. Defines the exit direction of created or unloaded units. exit_dirOffset: 140
1.13 exit_heightOffset: float Defaults to 0. Defines the height where created or unloaded units appears. exit_heightOffset: 16
1.13 exit_moveAwayAmount: float Defaults to 70. Defines the distance that created or unloaded units moves from this unit. exit_moveAwayAmount: 10
1.14 exitHeightIgnoreParent bool Ignores parent height for exit height; useful for separating attachments with their parents for building
#==== #==== Death Keys
dieOnConstruct: bool Deletes this unit when it starts to build if true. (target building/unit likely will need selfBuildRate set) dieOnConstruct: true
1.13 dieOnZeroEnergy: bool Kills this unit if energy level reaches zero when true. dieOnZeroEnergy: true
numBitsOnDeath: int Defines the number of scattered bit fragments when this unit dies. numBitsOnDeath: 20
nukeOnDeath: bool Unit will spawn a nuke detonation built-in effect when dies if true. nukeOnDeath: true
nukeOnDeathRange: float Defines the nuke effect range when using nukeOnDeath. nukeOnDeathRange: 140
nukeOnDeathDamage: float Defines the nuke effect area damage when using nukeOnDeath. nukeOnDeathDamage: 2000
nukeOnDeathDisableWhenNoNuke: bool Defaults to false. If true this unit will not explode with nuke when nukes are disabled in skirmish maps. nukeOnDeathDisableWhenNoNuke: true
fireTurretXAtSelfOnDeath: turret ref Auto-shoot a specific turret when this unit dies. fireTurretXAtSelfOnDeath: turret_1
1.13 explodeOnDeath: bool Defaults to true. Disables the unit death explode built-in effect if false. explodeOnDeath: false
1.13 explodeOnDeathGroundCollision: boolean Defaults to true. Disables the explode built-in effect on death when unit touches ground if false. explodeOnDeathGroundCollision: false
1.14 explodeTypeOnDeath: preset effects options: verysmall, small, normal, large, largeUnit, building, buildingNoShockwaveOrSmoke, verylargeBuilding
1.13 effectOnDeath: effect(s) ref Spawns built-in or custom effects when unit dies. effectOnDeath: shockwave, CUSTOM:pieces*3, CUSTOM:deathSound
1.13 effectOnDeathGroundCollision: effect(s) ref Like effectOnDeath but when unit touches ground. Useful for flying units. effectOnDeathGroundCollision: CUSTOM:bigExplosion
1.13 unitsSpawnedOnDeath: string(s) Spawns these units when dies. Comma separated unit identifiers. unitsSpawnedOnDeath: tank*5, hoverTank
unitsSpawnedOnDeath_setToTeamOfLastAttacker: bool Units spawned on death will appear on the last attacker team if true. unitsSpawnedOnDeath_setToTeamOfLastAttacker: true
hideScorchMark: bool Disables the death scorch mark leaved when unit dies if true. hideScorchMark: true
soundOnDeath: string(s) Sets a custom sound for this unit death. soundOnDeath: tankExplosion1.ogg, tankExplosion2.ogg
fireOnDeath bool?
1.14 effectOnDeathIfUnbuilt: effect(s) ref If the unit was not completed, and is destroyed, play this effect. Defaults to effectOnDeath effectOnDeathIfUnbuilt: CUSTOM:implode
#==== #==== Action Keys
1.13.3 autoTriggerCooldownTime: time (seconds) Post automatic action cooldown (Not detection cooldown). Defaults to 1s. Warning: Setting this too low for many units might effect performance depending on the action effects.
autoTriggerCooldownTime_allowDangerousHighCPU: bool Allows for auto actool cooldown lower than 0.2s. Default to false.
#==== #==== Deprecated Keys (can be used but there are better ways)
depr. 1.13 action_#_convertTo: string Deprecated in 1.13, use [action_x] sections instead action_1_convertTo: customTank_2
depr. 1.13 action_#_pos: float Order action appears in UI action_1_pos: 0.1
depr. 1.13 action_#_price: int The price of your action for the unit. (All your sub actions will be linked to the # you use) action_1_price: 1000
depr. 1.13 action_#_text: string A display text when you select your unit's action, used to explain it's purpose. action_1_text: Upgrade to Custom Tank 2
depr. 1.13 action_#_description: string The action description. action_1_description: -Converts the tank
depr. 1.13 action_#_addEnergy: float Adds energy to unit. Has no effect unless energyMax is set action_1_addEnergy: 10
depr. 1.13 action_#_whenBuilding_cannotMove: bool Stops unit moving while action is being applied. Useful for deploy like actions. action_1_whenBuilding_cannotMove: true
depr. 1.13 canBuild_#_name/pos/isLocked: string Use canBuild section instead. canBuild_1_name: tank

Section [canBuild_NAME]
Code Value Type Description Example
1.13.3 name: string(s) List of unit identifiers this unit can create. Can be buildings or units. Add "setRally" to create a rally button name: setRally, tank, hoverTank, heavyTank
1.13.3 pos: float Order build link appears in this unit UI. pos: 0.1
1.13.3 tech: int Tech level. Mostly just affects build link colour in this unit UI. Defaults to 1. tech: 2
1.13.3 forceNano: bool Builds target as if it was a building if true. (even if it's a unit) forceNano: true
1.13.3 isVisible: LogicBoolean Hide this build link if true in this unit UI. isVisible: if not self.energy(greaterThan=100)
1.13.3 isLocked: LogicBoolean Dynamically locks this build option and shows isLockedMessage if true. isLocked: if self.hp(lessThan=100)
1.13.3 isLockedMessage: string Set to tell to players why a unit is locked. isLockedMessage: -Needs 2 Barracks
1.13.3 isLockedMessage_{LANG}: string LANG = ISO 639-1 Code to show this text instead when game is in this language. isLockedMessage_es: -Necesita 2 Cuarteles
1.13.3 isLockedAlt: LogicBoolean Another reason for this to be locked. Just allows a different message to be shown. isLockedAlt: if self.energy(greaterThan=90)
1.13.3 isLockedAltMessage: string Message for isLockedAlt. isLockedAltMessage: -Needs less energy
1.13.3 isLockedAlt2: LogicBoolean Like isLockedAlt but to show one more message. isLockedAlt2: if self.isMoving()
1.13.3 isLockedAlt2Message: string Message for isLockedAlt2. isLockedAlt2Message: -Needs to be quiet
1.13.3 addResources: price(s) Adds these resources to self when placing the building or producing the unit. addResources: ammo=5, setFlag=1
1.13.3 price: price(s) Overrides builded units/buildings price. Defaults to target unit prices. price: credits=1000, ammo=5
1.13.3 isGuiBlinking: LogicBoolean Generates a blinking effect in UI if true. isGuiBlinking: true

Section [graphics]
Code Value Type Description Example
Necessary code
file (image) image:
#==== Common Keys
image: file (image) File path to png image.
image_back: file (image) An optional image drawn behind other units. Useful for factories that units exit
1.14 image_shield file (image) Image to show as a custom shield
image_wreak: file (image) Image to use when unit dies. Can be NONE to leave no wreak
image_offsetX: int Use this to adjust the graphics of a unit if it is too far off one side
image_offsetY: int Use this to adjust the graphics of a unit if it is too far off one side
1.13.3 isVisible logic If false will hide the unit.
1.14 isVisibleToEnemies bool Only visible to player and allies when false. Recommend with showOnMinimapToEnemies. Useful for stealth units.
1.13 teamColoringMode How pixels are used for team coloring, options: pureGreen (default), hueAdd, hueShift, disabled
teamColorsUseHue: bool False: Green pixels on unit gets converted to team color. True: Whole unit is tinted the team colour. Defaults to false
scaleImagesTo: float Resize image to fit this value in pixels. Effects leg, and shadow images as well.
imageScale: float Resize image. Defaults to 1. Effects leg, and shadow images as well.
drawLayer: string Land units normally default to ground or ground2 if transport. wreaks, underwater, bottom, ground, ground2, experimentals, air, top
1.13 whenBeingBuiltMakeTransparentTill float How long the transparent effect is applied to incomplete units, set to 0 to disable completely Default: 1
icon_zoomed_out file (image)
icon_zoomed_out_neverShow bool
icon_build file (image) When set, it will use the specifed image on build list instead of the unit itself
#==== Turrets (images can also be set on each turret)
image_turret: file (image) Default image for all turrets, can also be set per turret
teamColorsOnTurret bool Defaults false. Apply team colours on turret as well. Also effects pre-turret images
scaleTurretImagesTo: float Will cause crash if image_turret is not specified, even if image is set per turret
lock_body_rotation_with_main_turret: bool Locks body image locked to first turret's direction
1.13 lock_leg_rotation_with_main_turret bool Locks legs and arms to first turret's direction
#==== Shadow
image_shadow: file (image) Image file, NONE, AUTO, or AUTO_ANIMATED (AUTO will use image and make it transparent black only.)
shadowOffsetX: float
shadowOffsetY: float
1.13.3 image_shadow_frames bool If shadow image should use frame animation of main image
lock_shadow_rotation_with_main_turret: bool Locks body image shadow locked to first turret's direction
#==== Effects and animation
total_frames int Defaults to 1. Animations require this.
default_frame int Sets the default frame to display. Dependent on total_frames.
frame_width: int Calculated for you if total frames is set, but can be overridden
frame_height: int Defaults to image height
splastEffect: bool True to create a water wave effect when over water. Default false
dustEffect: bool True to create a dust effect when over land. Default false
splastEffectReverse: bool True to also create effect when unit is reversing
dustEffectReverse: bool True to also create effect when unit is reversing
1.13 movementEffect effect Custom movement effect, can be anything eg: movementEffect: smoke, CUSTOM:fastDust*2, CUSTOM:pop*5
1.13 movementEffectReverse effect
1.13 movementEffectRate float
1.13 movementEffectReverseFlipEffects bool Create effect as if unit has rotated 180 when reversing
repairEffect effect ref Custom movement effect, can be anything. Replaces default effect from builders
repairEffectAtTarget effect
repairEffectRate int Defaults to 5
1.13.3 reclaimEffect effect
1.13.3 reclaimEffectAtTarget effect
1.13.3 reclaimEffectRate int
rotate_with_direction: bool Defaults to true. Makes unit body image locked to 0 degrees when false. Often used with animation_direction_*
animation_direction_units: float 45 for 8 directions, 90 for 4 direction animation. Used with rotate_with_direction:false
animation_direction_strideX: int Animation frames to offset on direction change.
animation_direction_strideY: int Animation frames to offset on direction change. Used with frame_height.
animation_direction_starting: float Direction for first frame
animation_direction_useMainTurret bool Use main turret
1.13.3 disableLowHpFire bool
1.13.3 disableLowHpSmoke bool
1.13.3 showTransportBar: bool
1.13.3 showHealthBar bool
1.13.3 showEnergyBar bool
1.14 showShieldBar bool
1.14 showQueueBar bool
Deprecated Keys (can be used but there are better, more adaptable ways)
depr. 1.13 animation_TYPE_start: int TYPE can be set to: attack, moving, idle. Use [animation] section instead for more control animation_moving_start: 0
depr. 1.13 animation_TYPE_end: int End frame, must be larger then start animation_moving_end: 3
depr. 1.13 animation_TYPE_scale_start: float Scale unit image. Defaults to 1. Useful for bio units or breathing effects.
depr. 1.13 animation_TYPE_scale_end: float Scale unit image. Defaults to 1. Useful for bio units or breathing effects.
depr. 1.13 animation_TYPE_speed: float Delay for each frame of animation. Larger values cause slower animation
depr. 1.13 animation_TYPE_pingPong: bool Play animation in reverse before repeating. Useful with scale_start/scale_end

Section [attack] The attack section is for global attack characteristics, per-turret overrides these
Code Value Type Description Example
canAttack: bool If set to false, can not attack any unit. Regards of other canAttack options below.
canAttackFlyingUnits: LogicBoolean can also be narrowed per turret. Note: not required if canAttack is false.
canAttackLandUnits: LogicBoolean can also be narrowed per turret
canAttackUnderwaterUnits: LogicBoolean can also be narrowed per turret
maxAttackRange: float (multiplied by globalScale)
canAttackNotTouchingWaterUnits: LogicBoolean Default true. If false unit can only attack units in contact with the water. Used for units with torpedos. (can also be set per turret)
1.13.3 canOnlyAttackUnitsWithTags tags Will only attack units that has the specified tags.
1.13.3 canOnlyAttackUnitsWithoutTags tags Can only attack units without the specified tags.
1.13 turretMultiTargeting bool Allow each turrets to fire at a different target at the same time. Very useful if [turret]limitingAngle is used
isMelee: bool Used with a low attack range (like maxAttackRange: 9) makes src and target radius get added to range, and effects AI.
1.13.3 meleeEngangementDistance int Makes unit move to attack nearby units. Defaults to 250 for melee, and 0 for non melee (Works even if non-melee, but might be unexpected to players)
turretRotateWithBody bool Are all turrets rotated when body rotates. Defaults to true
attackMovement: string normal/bomber. bomber attack movement will retreat when energy runs out
dieOnAttack: bool Will die when it attacks.
removeOnAttack bool Remove unit when it attacks.
isFixedFiring: bool Must aim body at target to shoot. Will often make the unit need to stop before it can aim and shoot.
aimOffsetSpread: float Offset each shot multiplied by target radius. Defaults to 0.6 aimOffsetSpread:0 will make unit always attack center
1.13 stopTargetingAfterFiring bool Unit stops targeting after firing a shot. Rarely used or needed.
disablePassiveTargeting: bool Unit only attacks manually ordered target. Rarely used or needed.
1.13.3 showRangeUIGuide bool Will it show the range indicator. Useful for showing ranges in radar and related structures.
setMainTurretAs turret ref Set main turret for lockLegRotationWithMainTurret, lockShadowRotationWithMainTurret, etc
Deprecated Keys - can be used but better to set these per turret

depr. 1.13 turretSize: float (multiplied by globalScale)


depr. 1.13 turretTurnSpeed: float
depr. 1.13 shootDelay: float Global delay, can also use delay on each turret

Section [turret_NAME] Turrets fire projectiles with different traits


Code Value Type Description Example
Necessary Code
float x:
float y:
Positioning/Stats

x: float
y: float
copyFrom: turret ref Copy all values from another turret as defaut values for this turret copyFrom: 1
projectile projectile ref Projectile fired from this turret. eg: projectile: torpedo
1.14 altProjectile projectile ref Alternative projectile fired from this turret when altProjectileCondition is true
1.14 altProjectileCondition LogicBoolean Used with altProjectile
1.13 barrelX float Defaults to 0. Controls horizontal position for projectile spawn.
1.13 barrelY float Defaults to size. Note: size and barrelY have the same meaning
1.13.3 barrelHeight float Height of barrel in 3d. Effect projectile and shoot flame starting height
size: float Controls the distance between the center of the turret and the point from where projectiles spawn. size: 5
turnSpeed float Max turn speed of the turret
turnSpeedAcceleration float Defaults to disabled, and full turn speed is used.
turnSpeedDeceleration float Defaults to turnSpeedAcceleration. Setting this higher than turn acceleration might allow faster targets to be hit
idleDir float Defaults to 0
1.13 idleDirReversing float Defaults to idleDir+180 unless attached to another turret (as attached turret will often be rotating when reversing)
shouldResetTurret: bool Defaults true. False to disable the reseting turret angle when idle
1.14 idleSweepAngle int Disabled by default. Controls how far the turret will "look" left and right
1.14 idleSweepDelay float Controls the delay between idleSweep movements
1.14 idleSweepSpeed float Controls the speed with which the turret sweeps when idle
1.14 idleSweepCondition LogicBoolean Disable idle sweep if false
1.14 idleSweepAddRandomDelay float Default 1-20 depends on idleSweepDelay, used to stop sweep syncing up with other units
1.14 idleSweepAddRandomAngle int Default 0
attachedTo: turret ref Id of another turret to attach to, will be positioned relative to it, and rotate with it.
slave: bool Locks this turret's direction and shot cooldown to attached turret. Often used with warmup for multiple barrel guns
isMainNanoTurret: bool Defaults to false. Turret to use for creating buildings, etc. should only be true on one turret, and should have canShoot set to false
energyUsage: float Required energy to fire weapon. Same as resourceUsage: energy=X
resourceUsage price can be in credits/energy/hp/shield/ammo. Stops firing if not met resourceUsage: credits=5, energy=5, hp=100, shield=5, ammo=1
Timing
delay: float Override global shootDelay for this turret
linkDelayWithTurret turret ref When this other turret fires the cooldown delay on this turret will be reset/removed
warmup: float Delay before firing a shot.
warmupCallDownRate float Rate to reduce warmup when turret is not ready to fire at any targets
warmupNoReset bool Defaults to false. When true warmup is not reset after firing a shot. Used with warmupCallDownRate
warmupShootDelayTransfer float Defaults to 0, a multiplier which reduces the next shot delay by the warmup value. When used with warmupNoReset, can make a each shot faster.
On Shoot
1.13.3 onShoot_freezeBodyMovementFor Freezes body movement while shooting.
1.14 barrelOffsetX_onOddShots: float 0 by default. Sets a barrelX offset only during odd numbered shots, useful for twin-barreled units. Use with barrelX
Targeting control
1.14 aimOffsetSpread
canShoot: bool Defaults to true
canAttackFlyingUnits: LogicBoolean Narrows targeting for this turret, note targeting for the whole unit in [attack] is applied first. (so you can only use this to target less not more)
canAttackLandUnits: LogicBoolean
canAttackUnderwaterUnits: LogicBoolean
canAttackNotTouchingWaterUnits: LogicBoolean Default true. If false unit can only attack units in contact with the water. Used for units with torpedos.
1.13.3 canOnlyAttackUnitsWithTags tags
1.13.3 canOnlyAttackUnitsWithoutTags tags
canAttackCondition: LogicBoolean Normally, used to optionally disable a turret based on a LogicBoolean. Eg: this unit's height canAttackCondition: if not self.flying
1.14 canAttackMaxAngle float Max angle to target for turret to be allowed for fire. Defaults to 5, don't set lower. Can be set to 181 for turrets that don't need to turn to fire missiles.
1.13 clearTurretTargetAfterFiring bool Clears the turrets sub-target when using multi-targeting
limitingRange: float Make this turret have less range than the maxAttackRange. Do not apply this to all turrets change maxAttackRange instead.
1.13 limitingAngle Linked with idleDir. Turret will only be able to fire at units +/- this angle.
1.13 limitingMinRange Sets minimum range for turret. limitingMinRange: 200
1.13 interceptProjectiles_withTags Currently used with anti-nuke units.
interceptProjectiles_andTargetingGroundUnderDistance
interceptProjectiles_andUnderDistance Defaults to 2000, distance inflight before firing
interceptProjectiles_andOverHeight Defaults to 0
laserDefenceEnergyUse: float Set to enable a projectile laser defence from this turret. Should also set the energyMax in core.
Graphics and effects
invisible: LogicBoolean Don't render this turret, but still can shoot, etc.
image: file (image) Use custom image. Overrides unit's main turret image
image_applyTeamColors bool
image_drawOffsetX float
image_drawOffsetY float
chargeEffectImage:
file (image) Used with warmup. Shows a scaling effect image on turret barrel when charging.
warmupStartEffect effect ref
shoot_sound: string Can be linked to an .ogg or .wav file, or one of the default game sounds (list at bottom of reference) shoot_sound: tank_firing | shoot_sound: missile.wav | shoot_sound: ROOT:audio/shoot.ogg
shoot_sound_vol: float
shoot_flame: effects Current types are: small, large, smoke, shockwave, or CUSTOM: effectSectionName eg: shoot_flame: smoke, CUSTOM:lightFade, CUSTOM:pop*5 alleged: largeExplosion, smallExplosion, resourcePoolSmoke, noneExplosion
shoot_light color
idleSpin: float Spin rate when idle, used on missile turrets
1.13 onShoot_playAnimation animation ref Play a custom animation from an [animation] section after firing this turret
1.14 onShoot_triggerActions action refs Trigger these actions each time this turret fires
1.13.3 onShoot_freezeBodyMovementFor time Stops the unit from moving for a certain period of time
recoilOffset float Push turret forward or back after firing for a recoil effect. Value in pixels.
recoilOutTime float Time to get to offset position after firing
recoilReturnTime float Time to return to default position
1.13.3 showRangeUIGuide bool
unloadUpToXUnitsAndGiveAttackOrder int After unloading the units, they are automatically given an attack waypoint against the parent's target
unloadUpToXUnitsAndGiveAttackOrder_withTag tag(s) Specifies units with specified tag.

Section [projectile_NAME] Projectiles are necessary to inflict damage on an enemy, but also other purposes
Code Value Type Description Example
Necessary Code
int directDamage: or areaDamage:
life:
Core
life: How long till this projectile gets removed if it hasn't hit a target, 300 might be a good starting point, change depending on speed and range
deflectionPower: float Defaults to 1. Energy needed for laser defence to deflect. -1 to disable deflection (only disable for special weapons like flames)
1.13 explodeOnEndOfLife bool Default to false. True to explode at end of life with all side effects and area damage instead of disappearing. Good for making area-denial weapons.
autoTargetingOnDeadTarget: bool Retarget to nearby unit if target dies while in transit
1.14 autoTargetingOnDeadTargetRange int The range which it will select a new target if old target has died
1.14 autoTargetingOnDeadTargetLead float The lead it will try to have on the new target
1.13 unloadUpToXUnitsFromSource int Unload X units from source unit, to projectile explode location
1.13 teleportSource bool Move unit that shot this projectile to projectile explode location
1.13 spawnUnit unit types Spawn new units of this type at projectile explode location eg: spawnUnit: heavyTank, tank*5, hoverTank(offsetX=10)
1.14 spawnProjectilesOnEndOfLife projectile ref Spawns new projectiles on end of life, useful for secondary projectiles spawnProjectilesOnEndOfLife: torpedo_split(offsetDir=90), torpedo_split(offsetDir=-90)

1.14 spawnProjectilesOnExplode projectile ref Projectiles to spawns when this projectile hits it's target
1.14 spawnProjectilesOnCreate Spawns projectiles on creation of this projectile, useful for making true shotgun-like projectile spread
1.13.3 convertHitToSourceTeam bool Convert units hit to the team that fired this projectile. Useful to make capturing systems
1.13 tags tags Useful for projectile interceptions (e.g. Nuke and Anti-Nuke Interaction)
flameWeapon: bool Generates small flames on hit (only cosmetic)
Damage
directDamage: int Damage to target unit on hit. Does not work with targetGround:true as it won't have a clear unit to target
areaDamage: int Damages on arrival of target with an area effect, use areaRadius to adjust size of damage. targetGround needs this to damage
1.13 areaRadius: float How wide areaDamage effects. Note this drops off (unless areaDamageNoFalloff is used)
areaDamageNoFalloff bool Removes the falloff from areaDamage
areaRadiusFromEdge bool Applies damage from edge of units instead of center. Mostly effects large units.
1.13 areaExpandTime float Applies area damage as an expanding blast wave rather than instantly. Useful for nuke projectiles
1.13 areaHitAirAndLandAtSameTime bool Defaults to false
areaHitUnderwaterAlways bool Defaults to false
areaIgnoreUnitsCloserThan int Units closer than this range aren't effected. Rarely needed. Not recommended for normal projectiles.
1.13 buildingDamageMultiplier float Defaults to 1
1.13 shieldDamageMultiplier float Defaults to 1. eg: 0 to do no damage to shields and 2 to do double damage
1.13 shieldDefectionMultiplier float Defaults to 1. eg: 0 to ignore shields and directly damage hull
1.14 hullDamageMultiplier float Defaults to 1. Can be used to create EMP weapons that affect shields only eg: 0 to ignore hull and only damage shields
armourIgnoreAmount int Amount of armour to ignore on target and do damage as if this armour was not there
1.13 friendlyFire bool/string Lets area effect projectiles damage own team units (can't damage allies). Useful for nuke-like weapons friendlyFire: false / friendlyFire: true / friendlyFire: only-ignoreEnemy
1.13.3 mutatorX_ifUnitWithTags tags Applies mutators to this projectile if target has corresponding tags eg: mutator1_ifUnitWithTags: infantry
1.13.3 mutatorX_ifUnitWithoutTags tags Same as ifUnitWithTags, but applies if target doesn't have the set tags eg: mutator1_ifUnitWithoutTags: strongArmour
1.13.3 mutatorX_directDamageMultiplier float Changes directDamage. Defaults to 1. Be careful not to confuse players using this as the effect may not be clear. Use amour instead when possible
1.13.3 mutatorX_areaDamageMultiplier float Same as directDamageMultiplier but for areaDamage. Defaults to 1.
1.13.3 mutatorX_changedExplodeEffect effect Change explode effect if this mutator is active. Eg make a bounce off amour effect. Helps to make the damage change more clear to players (Doesn't work with targetGround.)
1.14 mutatorX_addResourcesDirectHit resource Add resource to all hit units. Warning: Be careful not be break units from other mods by adding random resources or energy to them that they don't expect.
1.14 mutatorX_addResourcesAreaHit resource
1.14 interceptProjectile_removeTargetLifeOnly bool Defaults to false. When false projectiles are just removed. Could be true to make hit projectiles explode or split when hit
targetGround bool Target ground, and don't home in on target. Note: only areaDamage is applied if targeting ground.
1.14 targetGround_includeTargetHeight bool Default false. for area affect AA weapons
1.14 targetGroundHeightOffset float Default 0. for shooting over or under a target. Useful for projectiles that split and rain down.
speed: float Projectile default travel speed
targetSpeed: float Accelerate to this speed
1.13 targetSpeedAcceleration float Controls the speed rampup for targetSpeed
ballistic: bool Makes projectiles fly up into the air and come down, instead of going in a straight line
ballistic_delaymove_height: float
ballistic_height: float
targetGroundSpread: float Randomly makes the shot inaccurate by this amount. Also used by weapons like the flamethrower
speedSpread: float Randomly change the starting projectile speed by this amount
instant bool Hit target instantly
instantReuseLast: bool Recycles last projectile fired, only one projectile ever exists. Can turn lasers into beam weapons by using lower rate of fire and setting this to true
1.14 instantReuseLast_alsoChangeTurretAim bool Make turret's aim include last projectile's spread and sweep offsets, useful for beam weapons
1.14 instantReuseLast_keepAreaDamageList bool Default false. Keeping the list was the normal behaviour in 1.13 making area damage not apply a second time but this is not useful. Use this only if you want the old behaviour.

1.13 disableLeadTargeting bool Disable the lead targeting calculations when aiming at a moving target. Defaults false.
1.13 leadTargetingSpeedCalculation float The expected speed of this projectile for targetGround lead target calculation. Defaults to 'targetSpeed' if set otherwise 'speed'.
1.13.3 initialUnguidedSpeedHeight Sets vertical speed for projectiles with targetGround. Use gravity to make smooth arching projectiles
initialUnguidedSpeedX
initialUnguidedSpeedX
1.13.3 gravity: Controls the pull for projectiles that target ground. Use together with initialUnguidedSpeedHeight
1.14 turnSpeed float Limits the turn speed of a projectile, making them inaccurate even with directDamage
1.14 wobbleAmplitude float How wide the projectile will wobble
1.14 wobbleFrequency float How often the projectile will wobble
1.14 pushForce float Push (or pull with a negative value) the units that get hit. Divided by target mass
1.14 pushVelocity float Push (or pull with a negative value) the units that get hit. Ignores target mass
1.14 moveWithParent bool Move projectile as parent moves. Useful for beam effects that need to stick to source turret.
1.14 sweepOffset float Useful for beam effects.
1.14 sweepOffsetFromTargetRadius float Add to sweep offset by factor of target's radius. 0.4 would be 40% sweepOffsetFromTargetRadius: 0.4
1.14 sweepSpeed float Useful for beam effects.
1.14 retargetingInFlight bool Can retarget a new target mid-flight, perfect for flak-style weapons and projectiles that collide
1.14 retargetingInFlightSearchDelay float/time How long between searching for new targets. Default 5
1.14 retargetingInFlightSearchRange int Range which targets are reselected. Default 120
1.14 retargetingInFlightSearchLead float The lead of the projectile to try to hit the target. Default 15
1.14 retargetingInFlightSearchOnlyTags tag ref Only retarget units with these tags
1.13 Graphics and effects
color color Recolors this projectile using a hex value. color: #bebe50
1.13.3 invisible bool
image: file (image) Use custom image. Overrides drawType and frame
drawType int Built-in image to use. 0:projectiles.png 1:projectiles_large.png 2:projectiles2.png drawType:1
drawSize: float Scale image. Defaults to 1
frame int Built-in image frame to use, starts at zero.
hitSound: bool Default true
1.13 explodeEffect effect ref list explodeEffect: smallExplosion, CUSTOM:myExplodeEffect
1.13 explodeEffectOnShield effect ref list Use this effect if shield is active on target
1.13 teamColorRatio float Mix 0-1 of team colour into color field
1.14 teamColorRatio_sourceRatio float default is (1-teamColorRatio). Keep more of color when mixing. Note this might saturate colors.
1.13 drawUnderUnits bool
1.13 effectOnCreate effect ref list
1.13 shouldRevealFog bool Reveal fog to player on explode
1.13 alwaysVisibleInFog bool
1.13 nukeWeapon bool Shows on mini-map when fired. Some other side effects as well.
trailEffect bool/effect true for built-in defaults, but can also point to any custom effects
1.13 trailEffectRate float Defaults to 3
lightCastOnGround bool
lightSize: float
lightColor color lightColor: #ffe92b
largeHitEffect: bool Creates a large explosion and accompanying sound on hit (only cosmetic)
lightingEffect: bool Draw as lighting works best with instant:true
laserEffect: bool Draw as laser works best with instant:true
1.14 beamImage file (image) Image to use for laserEffect
1.14 beamImageOffsetRate float
1.14 beamImageStart int Frame start of beam animationeffect
1.14 beamImageStartRotated bool Defaults false. True to rotate with turret angle
1.14 beamImageEnd int Frame end of beam animation effect
1.14 beamImageEndRotated bool Defaults false

Section [movement] These are traits the unit has as far as movement goes, such as rotation and acceleration speed
Code Value Type Description Example
movementType: string Defines what kind of terrain the unit will be able to move, along with other properties of unit types. movementType: LAND
slowDeathFall: bool Used with large aircraft. Makes the unit fall slowly while maintaining its speed at the time of death. slowDeathFall: true
moveSpeed: float Maximum movement speed of the unit. moveSpeed: 1.2
moveAccelerationSpeed: float Defines how fast units accelerate to max speed. moveAccelerationSpeed: 0.07
moveDecelerationSpeed: float Don't make this too low or units will have trouble stopping at waypoints moveDecelerationSpeed: 0.17
reverseSpeedPercentage: float 0.6 default. Over 0.4 will reverse for short distances (at 40% speed). If set to 1 will drive in reverse same as forwards.
reverseSpeedPercentage:
Useful if slow turning
0
landOnGround: bool Should flying unit land when idle. landOnGround: false
targetHeight: float Defaults to 0 but if AIR movementType default is 35 targetHeight: 25
targetHeightDrift: float Smooth animated height change. Defaults to 0 but if AIR movementType default is 1.5 targetHeightDrift: 1
startingHeightOffset: float
1.14 heightChangeRate: float Rate at which the unit changes height, either from converting or drifting heightChangeRate: 3
1.14 fallingAcceleration: float The acceleration in which a unit drops
1.14 fallingAccelerationDead: float fallingAcceleration but when destroyed
maxTurnSpeed: float
turnAcceleration: float
moveSlidingMode: bool Makes the unit slide when moveDecelerationSpeed is lower, making them drift and feel natural
moveIgnoringBody: bool Allows the unit to move without fully turning in the direction its moving, useful for ships and air units
moveSlidingDir: int
joinsGroupFormations: bool Defaults to true. Changing not recommended
ignoreMoveOrders bool Ignore and remove movement type waypoints. Always to true for buildings.

Section [ai] This determines what the AI will use the unit for, does not effect player
Code Value Type Description Example
useAsBuilder: bool Set to true if unit can build or repair buildings. Defaults to [core]isBuilder.
useAsTransport bool Defaults to true if unit can transport units
useAsHarvester bool Defaults to true if unit can reclaim resources
useAsAttacker bool Can AI use this unit for attacks. Defaults to true.
disableUse: bool Disallow AI building this unit or building
ai_upgradePriority float Defaults to 0.06. Set between 0-1, higher means AI is more likely to upgrade this unit before others
Buildings only
buildPriority: float 0-1. AI uses 0.8 for first land factory, 0.48 for air factory, 0.47 for first turret.
noneInBaseExtraPriority: float Adds to buildPriority, if this unit doesn't exist in the AIs base
noneGlobalExtraPriority: float Adds to buildPriority, if this unit doesn't exist in the any where on the map
recommendedInEachBaseNum float Defaults to 0
recommendedInEachBasePriorityIfUnmet float Defaults to 0.5. Overrides buildPriority
upgradedFrom: string Create link to another unit to preserve max counts for upgraded and non-upgraded types in same base.
maxGlobal: int
maxEachBase: int
1.4 notPassivelyTargetedByOtherUnits bool Useful for walls, etc
1.4 lowPriorityTargetForOtherUnits Useful for units that cannot attack back. Eg walls
1.13.3 whenUsingAsHarvester_recommendedInEachBase
1.13.3 whenUsingAsHarvester_recommendedGlobal
1.13.3 whenUsingAsHarvester_includeOtherHarvesterCounts
1.13.3 onlyUseAsHarvester_ifBaseHasUnitTagged

Section [leg_#] / [arm_#] Legs can move around when unit moves, Arms need an animation or convert
Code Value Type Description Example
x: float Sets position of the foot on the X axis.
y: float Sets position of the foot on the Y axis.
copyFrom: int Copy from another leg. Useful to only need to set leg values once copyFrom: 1
attach_x: float Sets the leg's attach point on the X axis.
attach_y: float Sets the leg's attach point on the Y axis.
rotateSpeed: float
endDirOffset Target foot/end rotation relative to body
lockMovement bool Lock to unit body. Useful if walking unit converted to a flying unit.
heightSpeed: float
moveSpeed
moveWarmUp
holdDisMin: float Defaults to 7. Reposition leg at this distance if neighbor legs are not already repositioning.
holdDisMax: float Defaults to 16. Force reposition of leg at this distance.
holdDisMin_maxMovingLegs
hold_moveOnlyIfFurthest
holdDisMin_checkNeighbours
hardLimit: float Defaults to 50. Force leg to never go this far. Better to not be reached.
estimatingPositionMultiplier float defaults to 1. Predicts were unit will be for leg placement based on unit speed.
Graphics and effects
hidden: logic boolean
1.13 image_end file (image)
1.13 image_end_shadow file (image)
1.13 image_end_teamColors
1.13 image_foot file (image) same as image_end
image_foot_shadow file (image)
1.13 image_middle file (image)
image_leg file (image) same as image_middle
1.13 draw_foot_on_top bool
drawOverBody bool Draw over body
drawUnderAllUnits bool Draw over all units
drawDirOffset float
dust_effect: bool Spawns dust particles on each step.
spinRate float Makes arm/leg spin, like idleSpin for turrets
favourOppositeSideNeighbours calculate neighbours with X 10 times closer than Y
drawLegWhenZoomedOut For performance, defaults changes based on unit size
drawFootWhenZoomedOut For performance, defaults changes based on unit size
resetAngle: float Unused

Section [attachment_NAME] Attachments are slots where other units can be positioned or carried
Code Value Type Description Example
1.13.3 x float
1.13.3 y float
1.13.3 height bool
1.13.3 idleDir int
1.14 idleDirReversing int
1.13.3 isVisible bool
1.13.3 onCreateSpawnUnitOf unit ref
1.13.3 isUnselectable bool Defaults to false
canAttack bool Defaults to true. Set to false to stop this attachment attacking.
1.13.3 canBeAttackedAndDamaged bool
1.13.3 deattachIfWantingToMove bool If the unit is ordered to move, it will detach. This includes waypoints from actions.
1.13.3 lockLegMovement bool
1.13.3 keepAliveWhenParentDies bool Defaults to false
1.13.3 setDrawLayerOnTop bool
1.13.3 setDrawLayerOnBottom bool
1.13.3 addTransportedUnits bool
1.13.3 lockRotation bool
1.13.3 rotateWithParent bool
1.13.3 resetRotationWhenNotAttacking bool Similar to shouldResetTurret:for turrets.
1.13.3 prioritizeParentsMainTarget bool It will priotize targeting the main target. Defaults to true.
1.13.3 alwaysAllowedToAttackParentsMainTarget bool Will always attack the parents main target.
onParentTeamChangeKeepCurrentTeam bool Defaults false. If true attached units are not converted when parent changes team. Eg from [projectile]convertHitToSourceTeam
onConvertKeepExistingUnitInSameSlot bool
unloadInCurrentPosition bool Defaults false. If true transported attached units are kept current attached location when unloading
keepWaypointsNeedingMovement bool Defaults false. If true attached units keep waypoints with movement even while they cannot move. Useful if they will be automatically deattached soon.
1.14 smoothlyBlendPositionWhenExistingUnitAdded bool
1.14 keepWaypointsNeedingMovement bool Defaults to false. When false any queued waypoints needing movement to complete get removed.
1.14 showAllActionsFrom LogicBoolean Show all actions of the units attached in the parent unit list when selected
1.14 createIncompleteIfParentIs: bool
1.14 redirectDamageToParent: bool Redirects damage done to this attachment to the parent instead of damaging itself directly
1.14 redirectDamageToParent_shieldOnly: bool

Section [effect_NAME] Effects are purely visual, but can be important for a mod
Code Value Type Description Example
1.13 life float Defaults 200. Time till effect is removed. Set low as possible to reduce effect overhead. life: 70
1.14 lifeRandom float Random offset life by +/- this value lifeRandom: 12
1.13 alsoEmitEffects effect ref Create more effects when created, useful for meta-effects. Note: other 'alsoEmitEffects' on created effects are ignored.
1.14 alsoEmitEffectsOnDeath effect ref Create these effects when life runs out.
ifSpawnFailsEmitEffects effect ref If 'spawnChance' for this effects fails then emit these effects instead
1.13 alsoPlaySound sound ref
1.13 createWhenOffscreen bool Defaults false.
1.13 createWhenZoomedOut bool Defaults true
1.13 createWhenOverLiquid bool Defaults true
1.13 createWhenOverLand bool Defaults true
1.13 spawnChance float Default 1. If less than 1 effect only has a random chance of being created
1.13 showInFog bool Default false
1.13 delayedStartTimer float Hide for x time before showing and updating effect.
1.13 liveAfterAttachedDies bool Defaults false when attachedToUnit is being used
1.13 priority string Defaults to high. verylow/low/high/veryhigh/critical. Takes effect when too many effects are being shown at once.
Movement
1.13 attachedToUnit bool Attach to unit or projectile that created this effect. Will move with this object.
1.13 alwayStartDirAtZero bool Ignore source/attached unit dir
1.13 atmospheric bool Apply drag to slow this effect down and add small wind effects
1.13 physics bool Fall to ground and bounces. Needs height to take effect.
1.13 physicsGravity float Defaults to 1. height speed acceleration when physics: true
1.13 xOffsetRelative float Offset starting effect position. Relative to direction of attached turret, projectile, unit
1.13 yOffsetRelative float Offset starting effect position. Relative to direction of attached turret, projectile, unit
1.13 xOffsetRelativeRandom float Random offset by +/- this value
1.13 yOffsetRelativeRandom float Random offset by +/- this value
1.13 xOffsetAbsolute float Offset starting effect by position ignoring direction of attached turret, projectile, unit
1.13 yOffsetAbsolute float Offset starting effect by position ignoring direction of attached turret, projectile, unit
1.13 xOffsetAbsoluteRandom float Random offset by +/- this value
1.13 yOffsetAbsoluteRandom float Random offset by +/- this value
1.13 xSpeedRelative float
1.13 ySpeedRelative float
1.13 xSpeedRelativeRandom float Randomly change by -value to value
1.13 ySpeedRelativeRandom float Randomly change by -value to value
1.13 xSpeedAbsolute float
1.13 ySpeedAbsolute float
1.13 xSpeedAbsoluteRandom float Randomly change by -value to value
1.13 ySpeedAbsoluteRandom float Randomly change by -value to value
1.13 hOffset float height offset from source
1.13 hOffsetRandom float Randomly change by -value to value
1.13 hSpeed float height speed
1.13 hSpeedRandom float Randomly change by -value to value
1.13 dirOffset float rotation
1.13 dirOffsetRandom float Randomly change by -value to value
1.13 dirSpeed float rotation speed
1.13 dirSpeedRandom float Randomly change by -value to value
Graphics
1.13 frameIndex int frame of to use
frameIndexRandom
1.13 stripIndex int/string A built-in image set to use. Cannot be used with custom image effects/explode_big/light_50/flame/effects/effects2/projectiles/projectiles2/explode_bits
1.13 Image image Custom image file to use. Cannot be used with stripIndex.
imageShadow image Custom image file to use for shadows
1.13 scaleTo float Defaults to 1
1.13 scaleFrom float Defaults to 1
1.13 color color Defaults #FFFFFFFF
teamColorRatio 0-1
1.13 drawUnderUnits bool
1.13 fadeInTime float Fade alpha from 0% to 100% for this time at start
1.13 fadeOut bool Fade alpha from 100% to 0% based on life. Set alpha is higher than 1 to delay fade
alpha Capped between 0-1. Can be set higher than 1 to delay fadeOut effects
shadow True to draw a shadow. Forced true if imageShadow is used
Animation
1.13 total_frames int Total frames of 'image', used with animation or frameIndex. Only needed with custom images
1.13 animateFrameStart int
1.13 animateFrameEnd int
1.13 animateFramePingPong int
1.13 animateFrameSpeed time
1.13 animateFrameSpeedRandom time
1.14 animateFrameLooping bool Defaults false. When false effect is removed when animation ends

Section [animation_NAME] Use this to make intricate animations based on different circumstances
Code Value Type Description Example
1.13 onActions : Unknown move, attack, idle, underConstruction, underConstructionWithLinkedBuiltTime, queuedUnits
1.13 onActionsQueuedUnitPlayAt : float For onAction: queuedUnits. Amount queue needs to reach before starting, set between 0-1
1.13 blendIn : time Blend with last animation for this time
1.13 blendOut : time Blend with next animation for this time
1.13 pingPong bool Play animation in reverse after it ends
1.13 KeyframeTimeScale : float float Scales all keyframe times, useful to make an animation faster/slower without changing everything
Keyframes - create as many as needed
1.13 arm#_[time] Adds a keyframe at time. Use multiple times to create animation. eg: arm1_5s: {x: 5, dir: 90 }
leg#_[time] Adds a keyframe at time. Use multiple times to create animation.
body_[time] Adds a keyframe at time for body. Only frame and scale allowed on body eg: body_4s: {frame: 4, scale: 0.5}
1.14 effect_[time] Spawn effects while playing an animation eg: effect_2s: {name:CUSTOM|myExplode, x: 0,y: 5}

direction_units float Overrides [graphics]animation_direction_units while this animation is playing


direction_strideX: int Overrides [graphics]animation_direction_strideX
direction_strideY: int Overrides [graphics]animation_direction_strideY
direction_starting: float Overrides [graphics]animation_direction_starting
Deprecated Keys (can be used but there are better ways)
1.13 start : int Start image frame. deprecated
1.13 end : int End image frame. deprecated
1.13 scale_start : float Start scale. Deprecated, use body keyframes instead.
1.13 scale_end : float End scale. Deprecated, use body keyframes instead.
1.13 speed : float Speed, smaller is faster. Only effects start, end, scale_start, scale_end

Section [action_NAME] / [hiddenAction_NAME] Actions that can dynamically cause changes to units and resources
[hiddenAction_NAME] is basically an action with isVisible: false by default
Code Value Type Description Example
text string Text shown in UI
textPostFix: string Text shown as suffix, useful with textAddUnitName to create text UI text: [ textPostFix: ] textAddUnitName: unitRef self.attachment(slot="${slotId}")
text_{LANG} string
description string A display text when you select your unit's action, used to explain it's purpose.
description_{LANG} string
displayType list none, rally, upgrade, queueUnit, building, action, infoOnly, infoOnlyNoBox
displayRemainingStockpile bool Queue is shown as number of times action can be triggered based on price
pos float Order action appears in UI
iconImage file (image) Adds an icon for the action.
1.14 iconExtraImage file (image) Drawn over top of icon image. Useful for upgrade icons, etc
1.14 iconExtraColor colour Defaults to #64FFFFFF
1.14 iconExtraIsVisible LogicBoolean
1.13.3 unitShownInUI unitRef/unitType Display this unit. (as if this action built this unit) eg: unitShownInUI: unitRef self.transporting(slot=0) or unitShownInUI: heavyTank
1.14 setBuilt float Designates how built the unit is from a percentage of 0-100% with a number between 0 and 1.
guiBuildUnit unitRef/unitType UNFINISHED KEY??? Simulates the UI when building units/buildings through nano
Unit Reference - Dynamically parts from already existing units, useful w/ isAlsoViewableByEnemies self, self.parent(), self.transporting(slot=x), self.attachment(slot=X)
1.14 textAddUnitName unitRef/unitType Add this unit's name to this action's text eg: textAddUnitName: unitRef self.attachment(slot="1")
1.14 descriptionAddFromUnit unitRef/unitType Add this unit's description to this action's description
1.14 descriptionAddUnitStats: unitRef/unitType Add this unit's stats (eg HP, energy, resources) to this action's description descriptionAddUnitStats: unitRef self.parent()
1.14 unitShownInUIWithHpBar bool default true, Only used when unitShownInUI is a unitRef
1.14 unitShownInUIWithProgressBar bool default true, Only used when unitShownInUI is a unitRef. Replaces HP bar if active
Requirements for player/AI to use in UI
1.14 alwaysSinglePress bool Defaults false. When true no confirmation needed on mobile, when used with canPlayerCancel:false and allowMultipleInQueue:false will also hide the queue interface.
price resources The price of your action for the unit. Disables action if not available. Defaults to credits if unlabelled price: credits=5, energy=5, hp=100, shield=5, ammo=1
isActive LogicBoolean Defaults true. If false then action is disabled and shown in red in UI.
isVisible LogicBoolean Defaults true. If false action is hidden from UI and disabled.
isLocked LogicBoolean Defaults false. If true action is disabled, and a lock icon is shown. Mostly used for no nuke game modes
isLockedMessage LocaleString
1.13.3 isLockedAlt LogicBoolean Another reason for this to be locked. Can just use OR on isLocked, but this allows a different message to be shown
1.13.3 isLockedAltMessage LocaleString
1.13.3 isLockedAlt2 LogicBoolean
1.13.3 isLockedAlt2Message LocaleString
allowMultipleInQueue
onlyOneUnitAtATime bool When action is picked in UI, only one unit selected with get this action. Defaults to false.
1.13.3 isGuiBlinking LogicBoolean Flashes in UI to draw attention to it. Might be annoying if used often, recommended only for temporarily states/messages
1.14 isAlsoViewableByAllies bool Allows ally players to see actions from this unit, useful for showing stats to other players (eg missile count, items collected)
1.14 isAlsoViewableByEnemies bool Allows enemy players to see actions from this unit, useful for showing stats to other players (eg missile count, items collected)
AI - How the AI uses this action

1.13.3 ai_isHighPriority LogicBoolean Use this for faction selection actions or other high priority actions such as building high priority units
ai_isDisabled LogicBoolean Defaults false. Stop AI using this action.
1.13.3 ai_considerSameAsBuilding Be careful with

Triggers - These skip the queue and do not use price, ignores isLocked, buildTime, etc (Use 2 actions and alsoQueueAction to automatically add an action to the queue)
Parameters: created, completeAndActive, destroyed, killedAnyUnit, queuedUnitFinished, queueItemAdded,
autoTriggerOnEvent queueItemCancelled, teleported, touchTargetSuccess, newWaypointGivenByPlayer, teamChanged,
1.13.3 transportingNewUnit, transportUnloadedOrRemovedUnit, tookDamage
autoTrigger LogicBoolean When true triggers the effects of this action instantly (ignoring price, isActive, isVisible, buildSpeed, etc) autoTrigger: if self.overWater(), autoTrigger: if self.customTimer(laterThanSeconds=5)
While action is queued
buildSpeed time buildSpeed: 5s
buildSpeed_ignoreFactorySpeedModifiers bool?
highPriorityQueue bool Defaults to false. If true this action skips all other low priority actions in queue. Useful for fireTurret actions.
canPlayerCancel bool When false, it prevents the player to cancel the action
whenBuilding_cannotMove bool Stops unit moving while action is being applied. Useful for deploy like actions.
whenBuilding_playAnimation animation ref Plays animation when the action is queued
whenBuilding_rotateTo float Rotate unit body to this direction when action is in active queue
whenBuilding_rotateTo_orBackwards bool If true allow rotation in 180 degrees from whenBuilding_rotateTo when this is a smaller angle
whenBuilding_rotateTo_waitTillRotated bool Pause action queue till rotation is finished
whenBuilding_temporarilyConvertTo unit ref Convert to another unit while action is in active queue. Note: actions from the original unit will be kept
whenBuilding_triggerAction action ref Triggers a specified action while the action is queued
1.14 whenBuilding_rotateTo_aimAtActionTarget bool Rotates the unit on the direction where the target is placed (especially when using fireTurretXAtGround)
1.14 whenBuilding_rotateTo_rotateTurretX turret ref Rotates the specifed turret on the direction where the target is placed
spawnEffectsOnQueue effect ref Effects to spawn at unit when action is first added to queue
playSoundToPlayerOnQueue sound ref Global sound to play to unit's player only when action is first added to queue
Misc outcomes / Results (What happens) (Note: Must be at least one outcome for an action to show)
requireConditional Skip all effects of this action if this evaluates to false
1.13.3 convertTo unit ref Convert your unit into another unit. properties are preserved.
1.14 convertTo_keepCurrentTags Keep current and temporarily tags and ignores default tags on convertTo target.
addEnergy float Adds energy to unit. Has no effect unless energyMax is set. (Same as addResources: energy=X)
addResources resources Add these resources when action finishes. addResources: credits=5, energy=-5, hp=-100, shield=5, ammo=1
addResourcesScaledByAIHandicaps Same as addResources, but increased or decreased depending on AI difficulty level
deleteSelf Remove self with no explosions or sounds
resetCustomTimer LogicBoolean Reset timer used with self.customTimer()
1.13.3 setBodyRotation
Outcome - Chaining Actions
alsoTriggerAction action refs Trigger to results of another action as well. Ignores action's requirements. alsoTriggerAction: addCredits, playSound
alsoQueueAction action refs Adds another action into the normal unit's queue. Ignores action's requirements
alsoTriggerOrQueueActionConditional LogicBoolean Defaults true. alsoTriggerAction and alsoQueueAction are ignored if this works out to be false.
Outcome - Sounds
playSoundAtUnit sound ref Local sound to play when action finishes
playSoundGlobally sound ref Global sound to play to all players in game
playSoundToPlayer sound ref Global sound to play to unit's player only
Outcome - Fire projectile from turret
fireTurretXAtGround turret ref When action finishes fire target turret at point on ground, bypasses canShoot rules in turret. fireTurretXAtGround: nukeSilo
fireTurretXAtGround_withOffset point If not set player targets the ground with GUI, if a point is set this step is skipped fireTurretXAtGround_withOffset: 0,0
fireTurretXAtGround_withProjectile projectile ref Used with fireTurretXAtGround. Defaults to target turret's normal projectile.
1.13.3 fireTurretXAtGround_count Number of projectiles to fire. Defaults to 1
1.13.3 fireTurretXAtGround_onlyOverPassableTileOf Only allow tiles crossable by this movement type to be selected LAND,BUILDING,WATER,HOVER, etc
Outcome - Spawning
1.13.3 spawnUnits Spawns specified units eg: spawnUnits: heavyTank, tank*5, hoverTank(offsetX=10)
spawnEffects effect ref Effects to spawn at unit
1.13.3 produceUnits Like spawnUnits but unit exits as if it was produced normally, and gets a move away waypoint
Outcome - Position
1.14 offsetSelfAbsolute: point3d Changes unit position absolutely to its current position offsetSelfAbsolute: 0, 0, 40 [x,y,height]
Outcome - Transport Changes
addUnitsIntoTransport unitTypes Add units into transport, use self.transportingCount() to check for space before adding addUnitsIntoTransport: tank*3, heavyTank(neutralTeam=true)
deleteNumUnitsFromTransport int Removes specified number of units on transport
1.13.3 deleteNumUnitsFromTransport_onlyWithTags string(s) Same with deleteNumUnitsFromTransport, but more narrowed
1.13.3 startUnloadingTransport bool Unloads unit from transport normally
1.13.3 forceUnloadTransportNow bool For unload all units, or slot targeted by forceUnloadTransportNow_onlyOnSlot. Unloads even if no space or overwater, etc
1.14 forceUnloadTransportNow_onlyOnSlot int
Outcome - Waypoint Changes
1.13.3 clearAllWaypoints bool Clears all waypoints, be careful not to annoy players by removing their orders, prepending waypoints is often better
1.13.3 clearActiveWaypoint bool
addWaypoint_type move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow, setPassiveTarget
1.13.3 addWaypoint_unitType Only for use with addWaypoint_type:build
1.13.3 addWaypoint_prepend bool Add to the start of the waypoint queue or the end
1.13.3 addWaypoint_triggerActionIfFailed actions If target_nearestUnit fails to find a match so waypoint cannot be added then trigger this action
1.14 addWaypoint_triggerActionIfMatched actions
1.13.3 addWaypoint_maxTime time Automatically remove this waypoint if it has been active for longer than this time.
1.13.3 addWaypoint_target_nearestUnit_tagged tags
1.13.3 addWaypoint_target_nearestUnit_team relation own|neutral|allyNotOwn|ally|enemy|any
1.13.3 addWaypoint_target_nearestUnit_maxRange float
1.13.3 addWaypoint_target_mapMustBeReachable bool
1.13.3 addWaypoint_position_offsetFromSelf point
1.13.3 addWaypoint_position_fromAction bool
1.13.3 addWaypoint_position_randomOffsetFromSelf Same as above, but random.
1.14 addWaypoint_position_relativeOffsetFromSelf point
1.14p6 addWaypoint_target_randomUnit_tagged
1.14p6 addWaypoint_target_randomUnit_team
1.14p6 addWaypoint_target_randomUnit_maxRange
Outcome - Cooldown
1.14 addActionCooldownTime time Player cannot use action again for this amount of time
1.14 addAllActionCooldownsTime time Same as addActionCooldownTime, but affects all actions and build menu
1.14 addActionCooldownApplyToActions action ids Sets addActionCooldownTime's target. Defaults to this action.
1.14 clearAllActionCooldowns Removes all cooldown
Outcome - Animation
1.13.3 playAnimation animation id
1.13.3 playAnimationIfNotPlaying bool Don't restart animation if this animation is already playing
1.13.3 finishPlayingLastAnimation bool Finish last animation, including blend out
1.13.3 stopLastAnimation bool Stop last animation, skipping blend out

1.13.3 switchToNeutralTeam boolean Change team to neutral. This team is allied to all other teams. Will be captured by nearby units unless [core]stayNeutral:true is used
1.13.3 switchToAggressiveTeam boolean Change to a built-in team that is aggressive to all other teams. Does not get captured.
Outcome - Take Resources from other units
1.13.3 takeResources customPrice Resources to take (required to use take resources). And at-least 1 include key is needed. takeResources: hp=5, gold=10
1.13.3 takeResources_includeUnitsInTransport bool
1.13.3 takeResources_includeParent bool Include attachment parent or transport parent
1.13.3 takeResources_includeUnitsWithinRange float
1.13.3 takeResources_includeUnitsWithinRange_team TeamRelation Used with includeUnitsWithinRange, defaults to own. Can be: own|ally|allyNotOwn|enemy|neutral|any
1.13.3 takeResources_excludeUnitsWithoutTags tags
1.13.3 takeResources_excludeUnitsWithTheseResources customPrice
1.13.3 takeResources_excludeUnitsWithoutAllResources bool Defaults to true.
1.13.3 takeResources_triggerActionIfAnyCollected action refs
1.13.3 takeResources_triggerActionIfNoneCollected action refs
1.13.3 takeResources_discardCollected bool Just take resources from targets, don't add(or remove) to self
1.13.3 takeResources_keepResourcesOnTarget bool Don't add/remove resource from target. This clones resources. Use with takeResources_discardCollected and takeResources_triggerActionIfAnyCollected to make a resource detector.
takeResources_maxUnits int Defaults to 1.
1.14 takeResources_directTransferStoppingAtZero bool If less resources on target than transfer amount, only remaining resources will be transfered. Doesn't support use with some other takeResources_* keys
Outcome - Convert Resources
1.13.3 convertResource_from customResource Name of custom resource to take from
1.13.3 convertResource_to customResource Name of custom resource to give to
1.13.3 convertResource_minAmount float Skip if less than this amount in 'from'. Defaults to 0. Likely not needed for most use cases
1.13.3 convertResource_maxAmount float Max amount to transfer between 'from' and 'to'
1.13.3 convertResource_multiplyAmountBy float Defaults to 1. Amount to multiply when adding on 'to' (does not effect amount taken on 'from')
Outcome - Set Resources
1.13.3 resourceAmount customResource Name of custom resource to set with the below 3 keys. All keys are optional, and can be used together. resourceAmount: oil
1.13.3 resourceAmount_setValue float Absolute value to set this resource to, ignores current value of resource. Skipped by default resourceAmount_setValue: 20
1.13.3 resourceAmount_addOtherResource customResource Name of another custom resource to add to this on. Can be used without resourceAmount_setValue, to just add resources. Or with resourceAmount_setValue:0 to copy a resource value.
1.13.3 resourceAmount_multiplyBy float Defaults to 1. Multiple the current or new value by
Outcome - Attachment changes
1.13.3 attachments_addNewUnits unit types
1.13.3 attachments_deleteNumUnits int
1.13.3 attachments_onlyOnSlots attachment ids Restrict attachments_* actions to these attachments
1.13.3 disconnectFromParent bool
1.14 attachments_unload bool Unload all attachments. Can be used with attachments_onlyOnSlots. Same as unloading transported units
1.14 attachments_disconnect bool Disconnect all attachments in the place they are right now. Can be used with attachments_onlyOnSlots.
Outcome - Tag changes
1.13.3 temporarilyAddTags tags Add tag to this unit until it is converted or reset (unless convertTo_keepCurrentTags is used)
1.13.3 temporarilyRemoveTags tags Remove tag from this unit until it is converted or reset (unless convertTo_keepCurrentTags is used)
1.13.3 resetToDefaultTags bool Reset to standard tags
1.13.3 addGlobalTeamTags tags Add a tag to player's team. Use with self.globalTeamTags() to create unlocks and upgrades. Unique tags are best to not conflict with other mods.
1.13.3 removeGlobalTeamTags tags Remove a tag from player's team.

Outcome - Show Message


1.13.3 showMessageToPlayer string Sends a message to the player controlling the unit
1.13.3 showMessageToPlayer_{LANG} string Note: This format is support on nearly all strings that show to player even when reference doesn't show it
1.13.3 showMessageToAllPlayers string Sends a message to all players Eg: showMessageToAllPlayers: %{self.playerName} has captured a point
1.14 showMessageToAllEnemyPlayers string showMessageToAllEnemyPlayers: Team %{self.playerName} has %{self.resource.gold}
1.13.3 showQuickWarLogToPlayer string Sends a Quick War Log message to the player controlling the unit (in the lower lef)
1.13.3 showQuickWarLogToAllPlayers Sends a Quick War Log message to all players (in the lower lef)
1.13.3 debugMessage Only shows in Sandbox with Debug mode on.

Type Spawn units line Spawn lines specifically for units, used with "unit ref" value types
Code Description Example
Most units spawning keys support multiple units with parameters spawnUnits: crates*10(neutralTeam=true), tank(spawnChance=0.5)
1.13.3 neutralTeam bool Spawn the unit on the neutral team instead of the same team as source
1.13.3 setToTeamOfLastAttacker bool Spawn the unit on the last attacker of source (useful on [core]unitsSpawnedOnDeath)
1.13.3 spawnChance float Chance this unit will spawn. Defaults to 1.
1.13.3 maxSpawnLimit int Useful with spawnChance, max number of units to spawn in total spawnUnits: treeA(spawnChance=0.5, maxSpawnLimit=1), treeB(maxSpawnLimit=1)
1.13.3 gridAlign bool Align spawn location to grid, useful for buildings
1.13.3 skipIfOverlapping bool Don't spawn this unit if spawn in an invalid location. Eg on units or over water when LAND based
1.13.3 offsetX float
1.13.3 offsetY float
1.13.3 offsetRandomX float
techLevel int Sets unit techLevel, very useful in mods that use the damagingBorder and zone marker (found in BR servers)
offsetRandomY float
offsetRandomDir float
1.13.3 offsetHeight float
1.13.3 offsetDir float
1.13.3 addResources resource ref Give spawn unit those resources, can be used to set flags that trigger actions spawnUnits: crates(addResource=gold:30|stone:10, spawnChance=0.5)
1.14 transportedUnitsToTransfer int Puts the designated amount of transported units into the transport of the spawned unit. spawnUnits: transporter(transportedUnitsToTransfer=5)
1.14 alwayStartDirAtZero bool

Type Spawn Projectiles line Spawn lines specifically for projectiles, used with "proj ref" value types
Code Description Example
1.14 Most projectile spawning keys used for projectile ref spawnProjectilesOnEndOfLife: secondary*3(spawnChance=0.5)
1.14 spawnChance float Chance this projectile will spawn. Defaults to 1. spawnChance: 0.5
1.14 maxSpawnLimit int Maximum amount to spawn
1.14 recursionLimit int Prevents loops, useful with spawning itself so it doesn't infinitely spawn, good for chain exploding recursionLimit: 5 (Recommended no more than 4 if spawning more than 3 projectiles)
1.14 offsetX float
1.14 offsetY float
1.14 xOffsetRelative float Similar to offsetX, but the offset is relative to the position of the projectile
1.14 yOffsetRelative float Similar to xOffsetRelative, but for Y axis
1.14 offsetRandomX float Random value to offset in the X axis only
1.14 offsetRandomY float Random value to offset in the Y axis only
1.14 offsetRandomXY float The offset in both directions to randomly spawn, makes truly random spawning within an area
1.14 offsetHeight float
1.14 offsetDir degrees
1.14 offsetRandomDir degrees

Type LogicBoolean Advanced code to create conditionals and triggers


Code Description Example
true
false
if Start all logic booleans with if, unless just using true/false
and if self.isInWater() and self.energy(greaterThan=1)
or if (self.energy(greaterThan=1) or self.ammo(greaterThan=1)) and self.isFlying()
not if not self.isOverLiquid()
Unit location and movement
self.isUnderwater()
self.isAtGroundHeight()
self.isFlying()
self.isMoving()
self.isAtTopSpeed()
self.isInWater() Touching water
self.isOverwater() Touching or over a water tile
self.isOverLiquid()
self.isOverClift()
self.isOverPassableTile() (parameters: type)
self.isOverOpenLand() shortcut for self.isOverPassableTile(type='LAND')
Unit stats
1.13.3 self.hasResources() Can check multiple resources (all price parameters)
self.resource() Checks a single resource (parameters: type, greaterThan, lessThan)
1.14? self.isResourceLargerThan Compare two resource between each other, note multiplyTargetBy doesn't make any changes. (parameters: source=x, compareTarget=x, byMoreThan=x, multiplyTargetBy=x)
self.hp() (parameters: greaterThan, lessThan, empty, full)
self.height() (parameters: greaterThan, lessThan, empty, full)
self.ammo() (parameters: greaterThan, lessThan, empty, full)
self.isAmmoEmpty() shortcut for self.ammo(empty=true)
self.ammoIncludingQueued() Also includes ammo from actions still in queue (parameters: greaterThan, lessThan, empty, full) if self.ammoIncludingQueued(lessThan=12)
self.energy() (parameters: greaterThan, lessThan, empty, full)
self.energyIncludingQueued() Also includes energy from actions still in queue (parameters: greaterThan, lessThan, empty, full)
self.isEnergyFull() shortcut for self.energy(full=true)
self.isEnergyEmpty() shortcut for self.energy(empty=true)
self.shield() (parameters: greaterThan, lessThan, empty, full)
self.kills() (parameters: greaterThan, lessThan)
1.13.3 self.queueSize()
Misc
self.hasFlag() Boolean flag saved into units for mods to use. (parameters: id=0-31) Use addResources in action change this value
self.tags() (parameters: includes)
1.13.3 self.globalTeamTags() (parameters: includes)
self.transportingCount() (parameters: greaterThan, lessThan, empty)
self.numberOfAttachedUnits() (withTag, greaterThan, lessThan)
self.isAttacking()
self.hasActiveWaypoint() self.hasActiveWaypoint(type='attack')
(parameter: type=x [x can be the following: move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow, setPassiveTarget])
self.transportingUnitWithTags() (parameters: includes) self.transportingUnitWithTags(includes='human')
self.hasParent() For both attachments and transports (parameters: [withTag=x] )
self.hasTakenDamage() (parameters: withinSeconds=X, laterThanSeconds=X) self.hasTakenDamage(withinSeconds=1)
self.timeAlive() (parameters: withinSeconds=X, laterThanSeconds=X)
self.lastConverted() (parameters: withinSeconds=X, laterThanSeconds=X)
self.customTimer() (parameters: withinSeconds=X, laterThanSeconds=X)
self.isOnNeutralTeam()
1.13.3 self.isControlledByAI()
1.13.3 self.hasUnitInTeam() (parameters: withTag, withinRange, incompleteBuildings, factoryQueue) alias for numberOfUnitsInTeam
1.13.3 self.noUnitInTeam() (parameters: withTag, withinRange, incompleteBuildings, factoryQueue) alias for numberOfUnitsInTeam
numberOfUnitsInTeam() (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue) numberOfUnitsInTeam(withTag='techUnlockBuilding', greaterThan=0)
numberOfUnitsInNeutralTeam() (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue)
1.13.3 numberOfUnitsInEnemyTeam() (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue)
1.14 numberOfUnitsInAggressiveTeam() The special 'aggressive to all' team (this is not the same as numberOfUnitsInEnemyTeam) (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue)
1.14 self.numberOfUnitsInAllyNotOwnTeam() (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue)
game.nukesEnabled()

1.14 Type [placementRule_NAME] Allows creation of rules for requiring buildings


1.14 Code Value Type Description Example
1.14 anyRuleInGroup: string (Only require 1 of the rules in this group pass, instead of all. Use the same group name on other placement rules to create a group.)
1.14 searchTags: tag list Search for any unit with at least one of these tags
1.14 searchTeam: relation Teams to include in search, can be: own|neutral|allyNotOwn|ally|enemy|any
1.14 searchOffsetX: float defaults to 0
1.14 searchOffsetY: float defaults to 0
1.14 searchDistance: float Required
1.14 excludeIncompleteBuildings: bool defaults to false. Might want to set to true depending on the requirement reason
1.14 excludeNonBuildings: bool defaults to false
1.14 minCount: int Set min amount of units that need to be found in search. (eg needs to be near something). Defaults to 0
1.14 maxCount: int Set max amount of units before match fails (eg cannot be close to something). Defaults to unlimited
1.14 blocksPlacement: bool Defaults to true.
1.14 cannotPlaceMessage: LocaleString Highly Recommended. Message shown to player if this rule fails (will be first failing rule if using anyRuleInGroup).
1.14 checkEachTile: bool defaults to true (set to false to only test unit center, true checks each tile under the unit which shows up on the placement grid. Can be easier to see requirements with true)
aiSuggestionOnly bool? allegedly only AI is affected

Section Prices/Resources lines - used by addResources, price, etc


Code Value Type Description Example
credits Global resource
energy
hp
shield price: hp=-100, shield=100
ammo Hidden value on each unit for use by mods
setFlag use with addResources, resourceUsage or price. 0-31. Flags are stored in each unit setFlag=1, setFlag=0-10 (will set the flags from 0 to 10)
unsetFlag use with addResources, resourceUsage or price. 0-31
hasFlag use with price or resourceUsage
hasMissingFlag use with price or resourceUsage
1.13.3 [resource] resource ref Any resource defined in [global_resource_x] or [resource_x] sections gold=5, stone=20

Section [global_resource_NAME]
Code Value Type Description Example
Define a new resource shared with all units in a team, works just like the built-in credits resource. Add to 'all-units.template' (at mod root) for easy use in all of your mods
1.13.3 displayName Name of this resource in UI
1.13.3 displayNameShort Resource name on smaller UI elements like action hovertext (Defaults to displayName)
1.13.3 hidden bool Hide this resource from the player
1.13.3 priority If 2 or mods/units define a resource with the same NAME, the displayName/displayColor with the highest priority is used
1.13.3 displayColor color Color, can be hex with optional alpha #FF0000
1.14 displayRoundedDown bool Don't show decimal places to the player
displayWhenZero bool Default false

Section [resource_NAME]
Code Value Type Description Example
Define a new resource local to unit. Works like build-in ammo resource
1.13.3 displayName Name of this resource in UI (eg hovering over unit info)
1.13.3 displayNameShort
1.13.3 hidden Hide this resource from the player
equivalentGlobalResourceForAI Used to hint to the AI that a resource node with a local resources could be used to get a different global resource. Eg when a harvester unloads the resource

1.14 displayRoundedDown

Section [template_NAME]
Code Value Type Description Example
1.13.3 Template sections can have any keys and have no effect by themselves.
Template can get included from other files with [core]copyFrom. Eg: [core]copyFrom: ROOT:effects/explodeEffects.template (Note that copyFrom can include multiple files. )
--All these below features can be used with any section not just templates--
1.13.3 @copyFromSection Use in any section to include keys from a section or template. (Comma separated for multiple) @copyFromSection: template_name/action_name/projectile_name
@copyFrom_skipThisSection Use in any section to make [core]copyFrom not copy into it. Eg not copy an action when overriding @copyFrom_skipThisSection
@define X Define a local variable within a section (best outside of template) @define targetEffect: boom
@global X Define a global variable used in all sections. Local variables have a higher priority @global targetEffect: pop
1.13.3 ${X} can be used to reference variables (can also be done outside of a template) spawnEffects: effect_${targetEffect}
1.13.3 ${section.key} can be used to reference another key (can also be done outside of a template) addResources: credits=${ core.price * 2 + 10 }

Section [comment_NAME]
Code Value Type Description Example
1.13.3 Comment sections can have any keys and have no effect.

bug_attack, bug_die, building_explode, cannon_firing, click, click_add, click_remove, firing3, firing4,


List of default game noises (for turret fire sound or other gun_fire, interface_error, large_gun_fire1, large_gun_fire2, laser_deflect, laser_deflect2, lighting_burst,
sound references): message, missile_fire, missile_hit, move, nuke_explode, nuke_launch, plasma_fire, plasma_fire2,
tank_firing, unit_explode, unit_explode_old, warning
This sheet is for an old version, see sheet tabs below.

Might be missing updates try stable version: https://docs.google.com/spreadsheets/d/1vEku_j8QwgsTzB5oMS_IDUiHfhzZVESeSrkyrS4tndk/edit#gid=412721476


Section [core] The basic section, contains important information for the unit
Code Description Example Value Type Version Added
#==== Common Keys #====
name: Defines the unit raw name, game uses it to identify as a unique name. (This is not displayed in-game) name: customTank1 String
altNames: Comma separated list of names. Like name but lower priority, useful for multiple optional mods. altNames: custTank1, customTank1, cTank1 String(s)
class: Reserved for future use, must be CustomUnitMetadata by default. class: CustomUnitMetadata String
strictLevel: Defaults to 0.1 = Error if keys are duplicated. Add to "all-units.template" in root to apply to all units. strictLevel: 1 Float 1.13.3
price: The unit cost from builders/buildings (Values: credits, custom resources). price: credits=500, gold=10 Int / Price(s)
mass: The 'weight' of the unit, defines how it collides with others, a greater value means it's tougher to push. mass: 3000 Int
techLevel: Defines the Tech Level of the unit, there're 3 levels and each will appear in a different color in the GUI. techLevel: 1 Int
buildSpeed: Time the unit takes to be built. (may multiply with builder speed) buildSpeed: 3s Float / Seconds
radius: Circular area around the unit that makes it selectable. (mouse click/screen touch) radius: 20 Int
isBio: Choose whether the unit is bioligical or not, affects sound and splat (unless hideScorchMark:true) isBio: true Boolean
isBug: Changes some death defaults, and sort order in Sandbox. isBug: false Boolean
isBuilder: Normally required if this unit places buildings. Defaults to [ai]useAsBuilder. isBuilder: true Boolean 1.13
#==== Unit Stats Keys #====
maxHp: The max health for the unit. (will spawn with this value) maxHp: 200 Int
selfRegenRate: Passive self repair rate. selfRegenRate: 0.01 Float
maxShield: The max shield hitpoints of the unit. Can spawn with 0 hitpoints if startShieldAtZero:true. maxShield: 500 Int
startShieldAtZero: Unit starts with a 0 hitpoints shield when created if true. startShieldAtZero: true Boolean
shieldRegen: Passive shield regen rate. shieldRegen: 0.15 Float
energyMax: Defaults to 0. Local resource, energy that can be used as ammo for turrets, laser defense, actions. energyMax: 1 Float
energyRegen: Passive energy regen rate. energyRegen: 0.001 Float
energyStartingPercentage: Sets the percentage of charged energy when the unit is first built. Must be between 0 and 1. energyStartingPercentage: 0.5 Float
energyNeedsToRechargeToFull: Disables weapons using energy after reaching zero till fully recharged if true. energyNeedsToRechargeToFull: true Float
armour: Damage taken away from each hit received. (not currently used in any vanilla units) armour: 6 Int 1.13
armourMinDamageToKeep: Min damage to keep from received damage when armour is too high. Defaults to 1. armourMinDamageToKeep: 2 Int 1.13
borrowResourcesWhileAlive: Takes these resources when created and returns them when removed or destroyed. borrowResourcesWhileAlive: gold=10 Int / Price(s) 1.13.3
generation_resources: Income unit creates. (custom resource version) generation_resources: credits=5, gold=20 Int / Price(s) 1.13.3
generation_active: Disables generation_resources when false. (logic boolean value) generation_active: if not self.hp(lessThan=100) Logic Boolean 1.13.3
generation_credits: Income unit creates. (credits only) generation_credits: 2 Int
generation_delay: How often generation_{INCOME} is added. Defaults to 40. (changing is not recommended) generation_delay: 40 Int
#==== UI and Graphics Keys #====
showInEditor: Set to false to hide unit in Sandbox editor. (Defaults to true) showInEditor: false Boolean
displayText: The unit name that the game shows to the player. displayText: Custom Tank Locale String
displayText_{LANG}: LANG = ISO 639-1 Code to show this text instead when game is in this language. displayText_es: Tanque Personalizado String 1.13
displayDescription: Unit description that the game shows to the player. displayDescription: -Fast movement\n-Light damage Locale String
displayDescription_{LANG}: LANG = ISO 639-1 Code to show this text instead when game is in this language. displayDescription_es: -Movimiento rápido\n-Daño ligero String 1.13
displayLocaleKey: Translation file key for unit name and description. displayLocaleKey: units.mechArtillery String
displayRadius: Defaults to radius value. Set to show a larger or smaller selection circle UI on units. displayRadius: 20 Int
shieldRenderRadius: Defaults is a little bigger than radius. Set to show a larger or smaller shield circle on units. shieldRenderRadius: 12 Int
shieldDisplayOnlyDeflection: Hide shield unless deflecting shot if true. shieldDisplayOnlyDeflection: true Boolean
shieldDeflectionDisplayRate: Defaults to 4. High value causes shield deflection to fade disappear faster. shieldDeflectionDisplayRate: 3 Float
showOnMinimap: Defaults to true. Hide units on minimap if false. showOnMinimap: false Boolean 1.13.3
showActionsWithMixedSelectionIfOtherUnitsHaveTag: Shows a merged action list if all units selected includes one of these tags. Useful for converted units. showActionsWithMixedSelectionIfOtherUnitsHaveTag: tank String(s) 1.13.3
#==== Building Only Keys #====
isBuilding: Defines if the unit is a building. isBuilding: true Boolean
footprint: Left, up, right, down. Tiles taken up which block unit movement. Defaults to 0,0,0,0 = 1 center tile. footprint: 0,0,1,1 Ints
constructionFootprint: Tiles taken up for placement of other buildings. Defaults to 0,0,0,0 = 1 center tile. constructionFootprint: -1,-1,1,3 Ints
displayFootprint: Left, up, right, down. Only applies to buildings, just used for GUI. Defaults to footprint. displayFootprint: 0,0,1,1 Ints
buildingSelectionOffset: Defaults to 0. Adds or removes padding on the drawn selection rect in UI. buildingSelectionOffset: 4 Int
buildingToFootprintOffsetX: Defaults to 10. Change the building position in the footprint on the X-axis. buildingToFootprintOffsetX: 4 Float
buildingToFootprintOffsetY: Defaults to 10. Change the building position in the footprint on the Y-axis. buildingToFootprintOffsetY: 6 Float
placeOnlyOnResPool: Normally used for extractors, forces building construction on a resource pool. placeOnlyOnResPool: true Boolean
selfBuildRate: Rate unit builds itself when placed without a builder. selfBuildRate: 0.0008 Float
#==== Misc Keys #====
copyFrom: Uses unit data from another ini file as default for this unit, supports multiple files. copyFrom: ROOT:defaultTanks.template, tankT1.ini file (ini)(s)
dont_load: Do not load unit if true, and don't error on missing data. Can be useful when used with copyFrom. dont_load: true Boolean
overrideAndReplace: Overrides another unit with this unit. Build links and map positions to target unit will be replaced. overrideAndReplace: builder, combatEngineer String(s)
onNewMapSpawn: Values: emptyResourcePools_asNeutral, emptyOrOccupiedResourcePools_asNeutral, mapCenter_asNeutral, mapCenter_eachActiveTeam String 1.13.3
globalScale: Defaults to 1, defines the scale taken for other keys. Changing not recommended. globalScale: 2 Float
isLocked: Disallow building of this unit. Can be used with overrideAndReplace to restrict units player can build. isLocked: true Boolean
isLockedIfGameModeNoNuke: Disallows building of this unit if nukes are disabled during match setup. isLockedIfGameModeNoNuke: true Boolean 1.13
experimental: Tag unit as experimental. Affects zoomed out icon and end game stats. experimental: true Boolean
stayNeutral: Set to false to disable capture when unit is on the neutral team in single player matches. stayNeutral: false Boolean
createNeutral: Set to true to always spawn the unit on the neutral team. createNeutral: true Boolean 1.13
createOnAggressiveTeam: Set to true to always spawn the unit on an aggressive team, will attack all players. createOnAggressiveTeam: true Boolean
tags: List of comma separated strings. Used to classify units, create special actions and balances. tags: tank, smallTank, piercingDamage String(s) 1.13
fogOfWarSightRange: Sets number of tiles this unit can see through the fog of war. Defaults to 15. fogOfWarSightRange: 18 Int
softCollisionOnAll: Creates a soft collision effect when touching other units. softCollisionOnAll: 3 Int
disableAllUnitCollisions: Unit cannot collide with others if true. disableAllUnitCollisions: true Boolean
isUnrepairableUnit: No unit can repair this unit if true. isUnrepairableUnit: true Boolean 1.13
isUnselectable: If true unit cannot be selected by players. (includes AI players) isUnselectable: true Boolean
isPickableStartingUnit: If true, unit is added to dropdowns for starting unit in game setup menus. isPickableStartingUnit: true Boolean 1.13
startFallingWhenStartingUnit: Unit will appear falling from skies when starting unit if true. startFallingWhenStartingUnit: true Boolean 1.13
soundOnAttackOrder: List of sound names. Only one will be played on each attack order. Only .ogg and .wav formats. soundOnAttackOrder: tankAttackOrder1.ogg, tankAttackOrder2.ogg:0.2 File (sound)(s)
soundOnMoveOrder: List of sound names. Only one will be played on each move order. Only .ogg and .wav formats. soundOnMoveOrder: tankMoveOrder1.ogg, tankMoveOrder2.ogg:0.2 File (sound)(s)
soundOnNewSelection: List of sound names. Only one will be played on each unit selection. Only .ogg and .wav formats. soundOnNewSelection: tankSelection1.ogg, tankSelection2.ogg:0.2 File (sound)(s) 1.13.3
canNotBeDirectlyAttacked: No unit can directly target this unit. If true this will also skip this unit in victory/defeat checks. canNotBeDirectlyAttacked: true Boolean
canNotBeGivenOrdersByPlayer: If true unit will not take player or AI orders. canNotBeGivenOrdersByPlayer: true Boolean 1.13.3
canOnlyBeAttackedByUnitsWithTags: List of tag strings, only units with these tags can directly target this unit. canOnlyBeAttackedByUnitsWithTags: piercingTank, powerfulTank String(s) 1.13.3
#==== Transport Keys #====
transportSlotsNeeded: Defaults to 1. Number of slots this unit uses up in a transport, experimentals are often set to 5. transportSlotsNeeded: 2 Int 1.13
maxTransportingUnits: Number of slots this units has for transporting other units. maxTransportingUnits: 5 Int
transportUnitsRequireTag: Only allows trasport of units that have one of these tags. transportUnitsRequireTag: smallTank, soldier String(s) 1.13
transportUnitsRequireMovementType: Only allows trasport of units that have one of these movement types. transportUnitsRequireMovementType: AIR, WATER String(s) 1.13
transportUnitsBlockAirAndWaterUnits: Defaults to true. This unit can only transport LAND units if true. transportUnitsBlockAirAndWaterUnits: false Boolean 1.13

transportUnitsKeepBuiltUnits: Makes built units stay inside transport instead of exiting it once ready if true. transportUnitsKeepBuiltUnits: true Logic Boolean 1.13
transportUnitsCanUnloadUnits: Defaults to: if not self.isOverLiquid() and not self.isMoving(). This unit cannot unload units if false. transportUnitsCanUnloadUnits: false Logic Boolean 1.13
transportUnitsAddUnloadOption: Defines if unload button should be added to the unit menu transportUnitsAddUnloadOption: false Boolean 1.13
transportUnitsUnloadDelayBetweenEachUnit: Changes the delay it takes between each unit getting unloaded. transportUnitsUnloadDelayBetweenEachUnit: 12 Float 1.13.3
transportUnitsKillOnDeath: Defaults to true. If false transported units don't die when transport dies. transportUnitsKillOnDeath: if self.isOverLiquid() Logic Boolean 1.13
transportUnitsHealBy: Rate to heal units that are being transported. transportUnitsHealBy: 0.1 Float 1.13
transportUnitsBlockOtherTransports: Defaults to true, if false this transports can hold other transports. transportUnitsBlockOtherTransports: false Boolean
whileNeutralTransportAnyTeam: This unit can transport units of any team while neutral if true. whileNeutralTransportAnyTeam: true Boolean 1.13.3
whileNeutralConvertToTransportedTeam: Converts this unit to transported team while neutral. Useful with whileNeutralTransportAnyTeam. whileNeutralConvertToTransportedTeam: true Boolean 1.13.3
convertToNeutralIfNotTransporting: Reverts back this unit to neutral when unloaded. Useful with whileNeutralTransportAnyTeam. convertToNeutralIfNotTransporting: true Boolean 1.13.3
Keeps transported units on their orginal team when this unit is converted if true.
transportUnitsOnTeamChangeKeepCurrentTeam: transportUnitsOnTeamChangeKeepCurrentTeam: true Boolean 1.13.3

#==== Resource Node Keys #==== 1.13.3

resourceRate: Used with canReclaimResources. Allows other teams to reclaim this unit. Normally used with neutral team. Use price to set what resources are gained. Float
similarResourcesHaveTag: When this has been reclaimed harvester unit moves on to another resource with these tags. similarResourcesHaveTag: goldResource String(s)
resourceMaxConcurrentReclaimingThis: Defaults to unlimited. Set to restict how many units can reclaim this resource at the same time. resourceMaxConcurrentReclaimingThis: 3 Int 1.13.3
reclaimPrice: Like price but for resources. Useful for buildable resources. reclaimPrice: gold=1000 Int / Price(s) 1.13.3
#==== Resource Harvester Keys #==== 1.13.3
canReclaimResources: If true this unit can gather resources, useful with resourceRate. canReclaimResources: true Boolean
canReclaimResourcesNextSearchRange: Defines the resource search range of this unit when its main gathered resource runs out. canReclaimResourcesNextSearchRange: 100 Int
canReclaimResourcesOnlyWithTags: This unit is only allowed to gather resources with these tags. canReclaimResourcesOnlyWithTags: foodResource, goldResource String(s)
#==== Construction and Factory Keys #====
canRepairBuildings: This unit can heal ally buildings if true. (isBuilder:true is required) canRepairBuildings: true Boolean
canRepairUnits: This unit can heal ally units if true. (isBuilder:true is required) canRepairUnits: true Boolean
autoRepair: Automatically try and repair damaged units in nano range. (isBuilder:true is required) autoRepair: true Boolean
nanoRange: Defaults to 85. Defines the unit building/repair/reclaim range. nanoRange: 110 Int
nanoRepairSpeed: Defaults to 0.2. Defines the unit nano repair speed. nanoRepairSpeed: 0.01 Float
nanoBuildSpeed: Defaults to 1. Defines the unit nano building speed. (May multiply with target's buildSpeed) nanoBuildSpeed: 0.9 Float
nanoRangeForRepairIsMelee: Defines if this unit must touch its target to repair it. nanoRangeForRepairIsMelee: true Boolean 1.13.3
nanoRangeForReclaimIsMelee: Defines if this unit must touch its target to reclaim it. nanoRangeForReclaimIsMelee: true Boolean 1.13.3
nanoRangeForRepair: Defines a specific range for the repair action of this unit. nanoRangeForRepair: 60 Int 1.13.3
nanoRangeForReclaim: Defines a specific range for the reclaim action of this unit. nanoRangeForReclaim: 60 Int 1.13.3
nanoFactorySpeed: Defaults to 1. Multiplies the buildSpeed value of the created unit if this unit is a factory. nanoFactorySpeed: 1.2 Float
extraBuildRangeWhenBuildingThis: Temporarily adds extra build range to builders to build this unit. Useful for water based buildings. extraBuildRangeWhenBuildingThis: 90 Int
builtFrom_#_name: Useful if adding this unit to build to existing buildings. Like canBuild but in opposite direction. builtFrom_1_name: landFactory, airFactory String(s)
builtFrom_#_pos: Order this build link appears in UI. Using canBuild instead is more recommended. builtFrom_1_pos: 0.1 Float
builtFrom_#_forceNano: Build as if this is a building if true. (even if it's a unit) builtFrom_1_forceNano: true Boolean
builtFrom_#_isLocked: If true this unit cannot be built in this build link. (can be conditioned if logicBooleans are used) builtFrom_1_isLocked: if self.hp(lessThan=100) Logic Boolean 1.13.3
builtFrom_#_isLockedMessage: Message shown when this build link is locked. builtFrom_1_isLockedMessage: -Needs more population Locale String(s) 1.13.3
exit_x: Where created or unloaded units appears from the transport or building. Defaults to 0. exit_x: 0 Float
exit_y: Where created or unloaded units appears from the transport or building. Defaults to 5. exit_x: 5 Float
exit_dirOffset: Defaults to 180 for units and 0 for buildings. Defines the exit direction of created or unloaded units. exit_dirOffset: 140 Float 1.13
exit_heightOffset: Defaults to 0. Defines the height where created or unloaded units appears. exit_heightOffset: 16 Float 1.13
exit_moveAwayAmount: Defaults to 70. Defines the distance that created or unloaded units moves from this unit. exit_moveAwayAmount: 10 Float 1.13
#==== Death Keys #====
dieOnConstruct: Deletes this unit when it starts to build if true. (target building/unit likely will need selfBuildRate set) dieOnConstruct: true Boolean
dieOnZeroEnergy: Kills this unit if energy level reaches zero when true. dieOnZeroEnergy: true Boolean 1.13
numBitsOnDeath: Defines the number of scattered bit fragments when this unit dies. numBitsOnDeath: 20 Int
nukeOnDeath: Unit will spawn a nuke detonation built-in effect when dies if true. nukeOnDeath: true Boolean
nukeOnDeathRange: Defines the nuke effect range when using nukeOnDeath. nukeOnDeathRange: 140 Float
nukeOnDeathDamage: Defines the nuke effect area damage when using nukeOnDeath. nukeOnDeathDamage: 2000 Float
nukeOnDeathDisableWhenNoNuke: Defaults to false. If true this unit will not explode with nuke when nukes are disabled in skirmish maps. nukeOnDeathDisableWhenNoNuke: true Boolean
fireTurretXAtSelfOnDeath: Auto-shoot a specific turret when this unit dies. fireTurretXAtSelfOnDeath: 1 [turret] Ref
explodeOnDeath: Defaults to true. Disables the unit death explode built-in effect if false. explodeOnDeath: false Boolean 1.13
explodeOnDeathGroundCollision: Defaults to true. Disables the explode built-in effect on death when unit touches ground if false. explodeOnDeathGroundCollision: false Boolean 1.13
effectOnDeath: Spawns built-in or custom effects when unit dies. effectOnDeath: shockwave, CUSTOM:pieces*3, CUSTOM:deathSound [effect](s) Ref 1.13
effectOnDeathGroundCollision: Like effectOnDeath but when unit touches ground. Useful for flying units. effectOnDeathGroundCollision: CUSTOM:bigExplosion [effect](s) Ref 1.13
unitsSpawnedOnDeath: Spawns these units when dies. Comma separated unit identifiers. unitsSpawnedOnDeath: tank*5, hoverTank String(s) 1.13
unitsSpawnedOnDeath_setToTeamOfLastAttacker: Units spawned on death will appear on the last attacker team if true. unitsSpawnedOnDeath_setToTeamOfLastAttacker: true Boolean
hideScorchMark: Disables the death scorch mark leaved when unit dies if true. hideScorchMark: true Boolean
soundOnDeath: Sets a custom sound for this unit death. soundOnDeath: tankExplosion1.ogg, tankExplosion2.ogg String(s)
#==== Action Keys #====
autoTriggerCooldownTime: Post automatic action cooldown (Not detection cooldown). Defaults to 1s. Warning: Setting this too low for many units might effect performance depending on the action effects. Seconds 1.13.3
#==== Deprecated Keys (can be used but there are better ways) #====
action_#_convertTo: Converts this unit to another unit, use [action_NAME] sections instead. action_1_convertTo: customTank_2 String deprecated 1.13
action_#_pos: Order action appears in UI, use [action_NAME] sections instead. action_1_pos: 0.1 Float deprecated 1.13
action_#_price: The price of your action for the unit. (All your sub actions will be linked to the # you use) action_1_price: 1000 Int deprecated 1.13
action_#_text: A display text when you select your unit's action, used to explain it's purpose. action_1_text: Upgrade to Custom Tank 2 String deprecated 1.13
action_#_description: The action description. action_1_description: -Converts the tank String deprecated 1.13
action_#_addEnergy: Adds energy to unit. Has no effect unless energyMax is set action_1_addEnergy: 10 Float deprecated 1.13
action_#_whenBuilding_cannotMove: Stops unit moving while action is being applied. Useful for deploy like actions. action_1_whenBuilding_cannotMove: true Boolean deprecated 1.13
canBuild_#_name/pos/isLocked: Use canBuild section instead. canBuild_1_name: tank String(s), Int, B deprecated 1.13.3

Section [canBuild_NAME] Allows the unit to build other units or buildings 1.13.3
Code Description Example Value Type 1.13.3
name: List of unit identifiers this unit can create. Can be buildings or units. name: tank, hoverTank, heavyTank String(s) 1.13.3
pos: Order build link appears in this unit UI. pos: 0.1 Float 1.13.3
tech: Tech level. Mostly just affects build link colour in this unit UI. Defaults to 1. tech: 2 Int 1.13.3
forceNano: Builds target as if it was a building if true. (even if it's a unit) forceNano: true Boolean 1.13.3
isVisible: Hide this build link if true in this unit UI. isVisible: if not self.energy(greaterThan=100) Logic Boolean 1.13.3
isLocked: Dynamically locks this build option and shows isLockedMessage if true. isLocked: if self.hp(lessThan=100) Logic Boolean 1.13.3
isLockedMessage: Set to tell to players why a unit is locked. isLockedMessage: -Needs 2 Barracks String 1.13.3
isLockedMessage_{LANG}: LANG = ISO 639-1 Code to show this text instead when game is in this language. isLockedMessage_es: -Necesita 2 Cuarteles String 1.13.3
isLockedAlt: Another reason for this to be locked. Just allows a different message to be shown. isLockedAlt: if self.energy(greaterThan=90) Logic Boolean 1.13.3
isLockedAltMessage: Message for isLockedAlt. isLockedAltMessage: -Needs less energy String 1.13.3
isLockedAlt2: Like isLockedAlt but to show one more message. isLockedAlt2: if self.isMoving() Logic Boolean 1.13.3
isLockedAlt2Message: Message for isLockedAlt2. isLockedAlt2Message: -Needs to be quiet String 1.13.3
addResources: Adds these resources to team when placing the building or producing the unit. addResources: ammo=5, setFlag=1 Int / Price(s) 1.13.3
price: Overrides built units/buildings price. Defaults to target unit prices. price: credits=1000, ammo=5 Int / Price(s) 1.13.3
isGuiBlinking: Generates a blinking effect in UI if true. isGuiBlinking: true Logic Boolean 1.13.3

Section [graphics] Defines general graphic configurations


Code Description Example Value Type
image: File path to a .png image that will be the unit body. image: tank.png File (image)
image_back: An optional image drawn behind other units and this units. Useful for factories that units exit. image_back: tank_factory_back.png File (image)
image_wreak: Image to use when unit dies. Can be NONE to leave no wreak. image_wreak: tank_dead.png File (image)
image_offsetX: Changes the body image position on the X-axis. image_offsetX: 10 Int
image_offsetY: Changes the body image position on the Y-axis. image_offsetY: 10 Int
isVisible: If false will hide the unit, supports logic booleans. isVisible: if not self.hp(lessThan=100) Logic Boolean 1.13.3
teamColorsUseHue: False: Green pixels on unit gets converted to team color. True: Whole unit is tinted the team colour. teamColorsUseHue: true Boolean
teamColoringMode: Green pixels are team colors by default (Values: pureGreen, hueAdd, hueShift, disabled). teamColoringMode: hueShift String

Boolean
scaleImagesTo: Resizes all images to fit this value in pixels. Affects leg, and shadow images as well. scaleImagesTo: 0.8 Float
imageScale: Resizes image to fit this value in pixels. Defaults to 1. imageScale: 0.5 Float
drawLayer: Draws the unit into a specific layer in-game (Values: experimentals). drawLayer: experimentals String
whenBeingBuiltMakeTransparentTill: Defines a time to make the unit transparent when being built. whenBeingBuiltMakeTransparentTill: 1.8 Float 1.13
icon_zoomed_out: Specifies a .png file to use as icon for this unit when players makes zoom out. icon_zoomed_out: tank_icon.png File (image)
icon_zoomed_out_neverShow: If true the zoom icon will not be shown to players when zoomed out. icon_zoomed_out_neverShow: true Boolean 1.13.3
#==== Turret Keys #====
image_turret: Defines a default image for all turrets, can also be set on each turret. image_turret: tank_turret.png File (image)
teamColorsOnTurret: Defaults to false. Applies team colours on turrets with green pixels. Also affects pre-turret images. teamColorsOnTurret: true Boolean
scaleTurretImagesTo: Resizes turret images to fit this value in pixels. scaleTurretImagesTo: 0.8 Float
lock_body_rotation_with_main_turret: Locks body image direction to the first turret's direction. lock_body_rotation_with_main_turret: true Boolean
lock_leg_rotation_with_main_turret: Locks leg images direction to the first turret's direction. lock_leg_rotation_with_main_turret: true Boolean 1.13
#==== Shadow Keys #====
image_shadow: Can be a image file, NONE, or AUTO. (AUTO will use image and make it transparent black only) image_shadow: AUTO File (image)
shadowOffsetX: Changes the shadow image position on the X-axis. shadowOffsetX: 10 Float
shadowOffsetY: Changes the shadow image position on the Y-axis. shadowOffsetY: 10 Float
image_shadow_frames: Used if shadow image should use a frame animation from the main image. image_shadow_frames: 2 Boolean 1.13.3
lock_shadow_rotation_with_main_turret: Locks body shadow to the first turret's direction. lock_shadow_rotation_with_main_turret: true Boolean
#==== Effects and Animation Keys #====
total_frames: Defaults to 1. Animations requires the specific number of frames of the main image. total_frames: 4 Int
frame_width: Calculated automatically if total_frames is set, specifies the width of each frame of image. frame_width: 28 Int
frame_height: Defaults to image height, specifies the height of image. frame_height: 52 Int
splastEffect: Set to true to create a water wave effect when unit is over water. Defaults to false. splastEffect: true Boolean
dustEffect: Set to true to create a dust effect when unit is over land. Defaults to false. dustEffect: true Boolean
splastEffectReverse: Set to true to also create a water wave effect when unit is reversing. splastEffectReverse: true Boolean
dustEffectReverse: Set to true to also create a dust effect when unit is reversing. dustEffectReverse: true Boolean
movementEffect: Custom movement effect, can be anything, needs the CUSTOM prefix to set custom effects. movementEffect: smoke, CUSTOM:fastDust*2, CUSTOM:pop*5 [effect](s) Ref 1.13
movementEffectReverse: Like movementEffect but when unit is reversing. movementEffectReverse: smoke, CUSTOM:pop*2 [effect](s) Ref 1.13
movementEffectRate: Sets the rate to generate custom effects, greater values means a slower rate. movementEffectRate: 8 Float 1.13
movementEffectReverseFlipEffects: Creates effects as if unit has rotated 180 when reversing if true. movementEffectReverseFlipEffects: true Boolean 1.13
repairEffect: Custom repair effect, can be anything. Replaces default effect from builders. repairEffect: CUSTOM:smoke*3 [effect](s) Ref
repairEffectAtTarget: Generates a custom effect on the repaired unit. repairEffectAtTarget: CUSTOM:heal*2 [effect](s) Ref
repairEffectRate: Defaults to 5. Sets the rate to generate custom effects when repairing. repairEffectRate: 8 Float
reclaimEffect: Like repairEffect but when reclaiming. reclaimEffect: CUSTOM:crush*3 [effect](s) Ref 1.13.3
reclaimEffectAtTarget: Like repairEffectAtTarget but when reclaiming. reclaimEffectAtTarget: shockwave, CUSTOM:destroy*4 [effect](s) Ref 1.13.3
reclaimEffectRate: Defaults to 5. Sets the rate to generate custom effects when reclaiming. reclaimEffectRate: 8 Float 1.13.3
rotate_with_direction: Defaults to true. Makes unit body image locked to 0 degrees when false. rotate_with_direction: false Boolean
animation_direction_units: 45 for 8 directions, 90 for 4 direction animation. Used with rotate_with_direction: false. animation_direction_units: 90 Float
animation_direction_strideX: Animation frames to offset on direction change. animation_direction_strideX: 2 Int
animation_direction_strideY: Animation frames to offset on direction change. Used with frame_height. animation_direction_strideY: 4 Int
animation_direction_starting: Direction for first frame. animation_direction_starting: 45 Float
disableLowHpFire: If true the fire effect showed when unit has low HP will not be shown. disableLowHpFire: true Boolean 1.13.3
disableLowHpSmoke: Like disableLowHpFire but just with the smoke effect. disableLowHpSmoke: true Boolean 1.13.3
showTransportBar: Defaults to true, hides the transport count under the unit if false. showTransportBar: false Boolean 1.13.3
showHealthBar: Defaults to true, hides the HP bar under the unit if false. showHealthBar: false Boolean 1.13.3
showEnergyBar: Defaults to true, hides the energy bar under the unit if false. Useful for invisible units. showEnergyBar: false Boolean 1.13.3
#==== Deprecated Keys (can be used but there are better ways) #====
animation_TYPE_start: Deprecated, use [animation] section instead animation_moving_start: 0 Int deprecated 1.13
animation_TYPE_end: End frame, must be larger then start animation_attack_end: 3 Int deprecated 1.13
animation_TYPE_scale_start: Scale unit image. Defaults to 1. Useful for bio units or breathing effects. animation_idle_scale_start: 1 Float deprecated 1.13
animation_TYPE_scale_end: Scale unit image. Defaults to 1. Useful for bio units or breathing effects. animation_idle_scale_end: 1.1 Float deprecated 1.13
animation_TYPE_speed: Delay for each frame of animation. Larger values cause slower animation animation_moving_speed: 8 Float deprecated 1.13
animation_TYPE_pingPong: Play animation in reverse before repeating. Useful with scale_start/scale_end animation_attack_pingPong: true Boolean deprecated 1.13

Section [attack] Sets the basics about the unit attack


Code Description Example Value Type
maxAttackRange: Maximum attack range this unit can attack (it's multiplied by globalScale). maxAttackRange: 150 Float
canAttack: If false, this unit can not attack any unit. Regards of other canAttack keys below. canAttack: true Boolean
canAttackFlyingUnits: If true, this unit can attack units with the AIR movement type. Can be set for each turret. canAttackFlyingUnits: false Logic Boolean
canAttackLandUnits: If true, this unit can attack units with the LAND/WATER movement type. Can be set for each turret. canAttackLandUnits: true Logic Boolean
canAttackUnderwaterUnits: Like canAttackLandUnits but with WATER only and height under 0. Can be set for each turret. canAttackUnderwaterUnits: if self.hp(lessThan=10) Logic Boolean
canAttackNotTouchingWaterUnits: Defaults to true. If false unit can only attack units in contact with water. Used for units with torpedos. canAttackNotTouchingWaterUnits: false Logic Boolean
canOnlyAttackUnitsWithTags: List of comma separated strings. Unit will only be able to attack units with one of these tags. canOnlyAttackUnitsWithTags: tank, helicopter, building String(s) 1.13.3
canOnlyAttackUnitsWithoutTags: List of comma separated strings. Unit will only be able to attack units without these tags. canOnlyAttackUnitsWithoutTags: submarine, ship String(s) 1.13.3
turretMultiTargeting: Allows turrets to fire at a different target at the same time. Useful if [turret]limitingAngle is used. turretMultiTargeting: true Boolean 1.13
isMelee: Used with a low maximum attack range (like 9). Makes the unit attack melee, and affects AI. isMelee: true Boolean
meleeEngangementDistance: Range in which unit moves to attack nearby units. Defaults to 250 and works with melee units only. meleeEngangementDistance: 140 Int 1.13.3
turretRotateWithBody: If true all turrets rotates when body rotates. Defaults to true. turretRotateWithBody: false Boolean
attackMovement: Sets a built-in movement when unit attacks (Values: bomber, normal). attackMovement: bomber String
dieOnAttack: If true unit will die when shooting a turret. Useful for suicide but powerful units. dieOnAttack: true Boolean
isFixedFiring: If true unit will need to aim with body to shoot. Often makes the unit need to stop to aim and shoot. isFixedFiring: true Boolean
aimOffsetSpread: Offset each shot multiplied by target radius. Defaults to 0.6 and doesn't really affects unit accuracy. aimOffsetSpread: 0 (will make unit always attack center) Boolean
stopTargetingAfterFiring: If true unit stops targeting after firing a shot. Rarely used or needed. stopTargetingAfterFiring: true Boolean 1.13
disablePassiveTargeting: If true unit will only attack manually ordered targets. Rarely used or needed. disablePassiveTargeting: true Boolean
showRangeUIGuide: If false unit will not show range circle when selected. showRangeUIGuide: false Boolean 1.13.3
#==== Deprecated Keys (can be used but there are better ways) #====
turretSize: Like [turret_NAME]barrelY or [turret_NAME]size but for all turrets (multiplied by globalScale). turretSize: 16 Float
turretTurnSpeed: Like [turret_NAME]turnSpeed but for all turrets. turretTurnSpeed: 4 Float
shootDelay: Delay between shots for all turrets, the higher the number the higher the reload time. shootDelay: 150 Float / Secs

Section [turret_NAME] Sets a turret for the unit, maximum 32 per unit
Code Description Example Value Type
x: Defines the turret position on the unit in the X axis. x: 10 Float
y: Defines the turret position on the unit in the Y axis. y: 16 Float
copyFrom: Copy all keys and values from another turret as defauts for this turret. copyFrom: 1 [turret] Ref
projectile: Projectile fired from this turret by default, will shoot causing this projectile's damage and effects. projectile: 1 [projectile] Ref
barrelX: Defaults to 0. Defines the real turret width (turret sprite size doesn't affect the real turret size). barrelX: 20 Float 1.13
barrelY: Defaults to size. Defines the turret height in the real turret size (size and barrelY have the same use). barrelY: 20 Float 1.13
barrelHeight: Defines the turret height in 3D. Affects projectile and shoot flame starting height position. barrelHeight: 18 Float 1.13.3
size: Controls the distance between the center of the turret and the point from where projectiles spawn. size: 5 Float
turnSpeed: Defines the maximum turn speed of the turret, higher numbers means a faster speed. turnSpeed: 3 Float
turnSpeedAcceleration: Defaults is disabled. Sets an acceleration rate for the turret to turn, till reach the maximum speed. turnSpeedAcceleration: 0.5 Float
turnSpeedDeceleration: Defaults to turnSpeedAcceleration. Setting this higher allows the unit to target faster. turnSpeedDeceleration: 1 Float
idleDir: Defaults to 0. Defines the direction in which the turret aims when there aren't enemies near. idleDir: 180 Float
idleDirReversing: Defaults to idleDir+180 unless attached to another turret. Like idleDir but when unit is reversing. idleDirReversing: 60 Float 1.13
shouldResetTurret: Defaults to true. When false disables the reseting turret angle when idle. shouldResetTurret: false Boolean
attachedTo: Another turret to attach to. This turret will be positioned relative to this, and will rotate with it. attachedTo: 1 [turret] Ref
slave: Locks this turret's direction and shot cooldown to the attached turret. Useful with warmup. slave: true Boolean
isMainNanoTurret: If true turret can be used to build. Can only be set on one turret, and needs canShoot: false. isMainNanoTurret: true Boolean
energyUsage: Required energy for this turret to fire. Same as resourceUsage: energy=X. Needs [core]energyMax. energyUsage: 2 Float
resourceUsage: Required resource for this turret to fire (Values: credits, energy, hp, shield, ammo, custom resources). resourceUsage: hp=5, energy=5, gold=10 Int / Price(s)
Timing
delay: Override global shootDelay for this turret float
linkDelayWithTurret When this other turret fires the cooldown delay on this turret will be reset/removed turret ref
warmup: Delay before firing a shot. float
warmupCallDownRate Rate to reduce warmup when turret is not ready to fire at any targets float
warmupNoReset Defaults to false. When true warmup is not reset after firing a shot. Used with warmupCallDownRate bool
warmupShootDelayTransfer Defaults to 0, a multiplier which reduces the next shot delay by the warmup value. When used with warmupNoReset, can make a each shot faster. float
On Shoot
onShoot_freezeBodyMovementFor Freezes body movement while shooting. 1.13.3
Targeting control
canShoot: Defaults to true bool
canAttackFlyingUnits: Narrows targeting for this turret, note targeting for the whole unit in [attack] is applied first. (so you can only use this to target less not more) LogicBoolean
canAttackLandUnits: LogicBoolean
canAttackUnderwaterUnits: LogicBoolean
canAttackNotTouchingWaterUnits: Default true. If false unit can only attack units in contact with the water. Used for units with torpedos. LogicBoolean
canOnlyAttackUnitsWithTags tags 1.13.3
canOnlyAttackUnitsWithoutTags tags 1.13.3
canAttackCondition: Normally, used to optionally disable a turret based on a LogicBoolean. Eg: this unit's height canAttackCondition: if not self.flying LogicBoolean
clearTurretTargetAfterFiring 1.13
limitingRange: Make this turret have less range than the maxAttackRange. Do not apply this to all turrets change maxAttackRange instead. float
limitingAngle Linked with idleDir. Turret will only be able to fire at units +/- this angle. 1.13
limitingMinRange Sets minimum range for turret. limitingMinRange: 200 1.13
interceptProjectiles_withTags Currently used with anti-nuke units. 1.13
interceptProjectiles_andTargetingGroundUnderDistance
interceptProjectiles_andUnderDistance Defaults to 2000, distance inflight before firing
interceptProjectiles_andOverHeight Defaults to 0
laserDefenceEnergyUse: Set to enable a projectile laser defence from this turret. Should also set the energyMax in core. float
Graphics and effects
invisible: Don't render this turret, but still can shoot, etc. LogicBoolean
image: Use custom image. Overrides unit's main turret image file (image)
image_applyTeamColors bool
image_drawOffsetX float
image_drawOffsetY float
chargeEffectImage:
Used with warmup. Shows a scaling effect image on turret barrel when charging. file (image)
warmupStartEffect effects
shoot_sound: string
shoot_sound_vol: float
shoot_flame: Current types are: small, large, smoke, shockwave, or CUSTOM: effectSectionName eg: shoot_flame: smoke, CUSTOM:lightFade, CUSTOM:pop*5 effects
shoot_light color
idleSpin: Spin rate when idle, used on missile turrets float
onShoot_playAnimation Play a custom animation from an [animation] section after firing this turret animation ref
onShoot_freezeBodyMovementFor 1.13.3
recoilOffset Push turret forward or back after firing for a recoil effect. Value in pixels. float
recoilOutTime Time to get to offset position after firing float
recoilReturnTime Time to return to default position float
showRangeUIGuide 1.13.3

Section [projectile_NAME] Defines the attack damage and are useful for other purposes
Code Description Example Value Type
life: How long till this projectile gets removed if it hasn't hit a target, 300 might be a good starting point, change depending on speed and range int
deflectionPower: Defaults to 1. Energy needed for laser defence to deflect. -1 to disable deflection (only disable for special weapons like flames) float
explodeOnEndOfLife Default to false. True to explode at end of life with all side effects and area damage instead of disappearing bool 1.13
autoTargetingOnDeadTarget: Retarget to nearby unit if target dies while in transit bool
unloadUpToXUnitsFromSource Unload X units from source unit, to projectile explode location int 1.13
teleportSource Move unit that shot this projectile to projectile explode location bool 1.13
spawnUnit Spawn new units of this type at projectile explode location eg: spawnUnit: heavyTank, tank*5, hoverTank unit types 1.13
convertHitToSourceTeam Convert units hit to the team that fired this projectile. Useful to make capturing systems bool 1.13.3
tags tags 1.13
flameWeapon: Generates small flames on hit (only cosmetic) bool
Damage
directDamage: Damage to target unit on hit. Does not work with targetGround:true as we don't have a unit target int
areaDamage: directDamage or areaDamage is required int
areaRadius: How wide areaDamage effects. Note this drops off (unless areaDamageNoFalloff is used) float 1.13
areaDamageNoFalloff Removes the falloff from areaDamage bool
areaRadiusFromEdge Applies damage from edge of units instead of center. Mostly effects large units.
areaExpandTime float 1.13
areaHitAirAndLandAtSameTime bool 1.13
areaHitUnderwaterAlways Defaults to false
areaIgnoreUnitsCloserThan Units closer than this range aren't effected. Rarely needed. Not recommended for normal projectiles.
buildingDamageMultiplier Defaults to 1 float 1.13
shieldDamageMultiplier Defaults to 1. eg: 0 to do no damage to shields and 2 to do double damage float 1.13
shieldDefectionMultiplier Defaults to 1. eg: 0 to ignore shields and directly damage hull float 1.13
armourIgnoreAmount Amount of armour to ignore on target and do damage as if this armour was not there
friendlyFire Lets area effect projectiles damage own team units (can't damage allies). Useful for nuke-like weapons friendlyFire: false / friendlyFire: true / friendlyFire: only-ignoreEnemy bool/string 1.13
mutatorX_ifUnitWithTags eg: mutator1_ifUnitWithTags: infantry 1.13.3
mutatorX_ifUnitWithoutTags eg: mutator1_ifUnitWithoutTags: strongArmour 1.13.3
mutatorX_directDamageMultiplier Changes directDamage. Defaults to 1. Be careful not to confuse players using this as the effect may not be clear. Use amour instead when possible. 1.13.3
mutatorX_areaDamageMultiplier Same as directDamageMultiplier but for areaDamage. Defaults to 1. 1.13.3
mutatorX_changedExplodeEffect Change explode effect if this mutator is active. Eg make a bounce off amour effect. Helps to make the damage change more clear to players (Doesn't work with targetGround.) 1.13.3
Movement
targetGround Target ground, and don't home in on target. Note: only areaDamage is applied if targeting ground. bool
speed: float
targetSpeed: Accelerate to this speed float
targetSpeedAcceleration float 1.13
ballistic: bool
ballistic_delaymove_height: float
ballistic_height: float
targetGroundSpread: Randomly makes the shot inaccurate by this amount. Also used by weapons like the flamethrower float
speedSpread: Randomly change the starting projectile speed by this amount float
instant Hit target instantly bool
instantReuseLast: Recycles last projectile fired, only one projectile ever exists. Can turn lasers into beam weapons by using lower rate of fire and setting this to true bool
disableLeadTargeting Disable the lead targeting calculations when aiming at a moving target. Defaults false. bool 1.13
leadTargetingSpeedCalculation The expected speed of this projectile for targetGround lead target calculation. Defaults to 'targetSpeed' if set otherwise 'speed'. float 1.13
initialUnguidedSpeedHeight 1.13.3
gravity 1.13.3
1.13.3
1.13.3
Graphics and effects 1.13
color color: #bebe50 color
invisible bool 1.13.3
image: Use custom image. Overrides drawType and frame file (image)
drawType Built-in image to use. 0:projectiles.png 1:projectiles_large.png 2:projectiles2.png drawType:1 int
drawSize: Scale image. Defaults to 1 float
frame Built-in image frame to use, starts at zero. int
hitSound: Default true bool
explodeEffect explodeEffect: smallExplosion, CUSTOM:myExplodeEffect effect ref list 1.13
explodeEffectOnShield Use this effect if shield is active on target effect ref list 1.13
teamColorRatio Mix 0-1 of team colour into color field float 1.13
drawUnderUnits bool 1.13
effectOnCreate effect ref list 1.13
shouldRevealFog Reveal fog to player on explode bool 1.13
alwaysVisibleInFog bool 1.13
nukeWeapon Shows on mini-map when fired. Some other side effects as well. bool 1.13
trailEffect true for built-in defaults, but can also point to any custom effects bool/effect
trailEffectRate Defaults to 3 float 1.13
lightSize: float
lightColor lightColor: #ffe92b color
largeHitEffect: Creates a large explosion and accompanying sound on hit (only cosmetic) bool
lightingEffect: Draw as lighting works best with instant:true bool
laserEffect: Draw as laser works best with instant:true bool

Section [movement] Defines all about the unit movement


Code Description Example Value Type
movementType: Defines what kind of terrain the unit will be able to move over, along with other properties related to unit types.
movementType: LAND string
slowDeathFall: Used with large aircraft. Makes the unit fall slowly while maintaining its speed at the time of death. slowDeathFall: true bool
moveSpeed: Maximum movement speed of the unit. moveSpeed: 1.2 float
moveAccelerationSpeed: Defines how fast units accelerate to max speed. moveAccelerationSpeed: 0.07 float
moveDecelerationSpeed: Don't make this too low or units will have trouble stopping at waypoints moveDecelerationSpeed: 0.17 float
reverseSpeedPercentage: 0.6 default. Over 0.4 will reverse for short distances (at 40% speed). If set to 1 will drive in reverse samereverseSpeedPercentage:
as forwards. Useful if slow0turning float
landOnGround: Should flying unit land when idle. landOnGround: false bool
targetHeight: Defaults to 0 but if AIR movementType default is 35 targetHeight: 25 float
targetHeightDrift: Smooth animated height change. Defaults to 0 but if AIR movementType default is 1.5 targetHeightDrift: 1 float
startingHeightOffset
maxTurnSpeed: float
turnAcceleration: float
moveSlidingMode: bool
moveIgnoringBody: bool
moveSlidingDir: int
joinsGroupFormations: Defaults to true. Changing not recommended bool

Section [ai] Specifies the AI behavior with the unit


Code Description Example Value Type
useAsBuilder: Set to true if unit can build or repair buildings. Defaults to [core]isBuilder. bool
useAsTransport Defaults to true if unit can transport units
useAsHarvester Defaults to true if unit can reclaim resources
disableUse: Disallow AI building this unit or building bool
ai_upgradePriority Defaults to 0.06. Set between 0-1, higher means AI is more likely to upgrade this unit before others float
Buildings only
buildPriority: 0-1. AI uses 0.8 for first land factory, 0.48 for air factory, 0.47 for first turret. float
noneInBaseExtraPriority: Adds to buildPriority, if this unit doesn't exist in the AIs base float
noneGlobalExtraPriority: Adds to buildPriority, if this unit doesn't exist in the any where on the map float
recommendedInEachBaseNum Defaults to 0
recommendedInEachBasePriorityIfUnmet Defaults to 0.5. Overrides buildPriority
upgradedFrom: Create link to another unit to preserve max counts for upgraded and non-upgraded types in same base. string
maxGlobal: int
maxEachBase: int

whenUsingAsHarvester_recommendedInEachBase
whenUsingAsHarvester_recommendedGlobal
whenUsingAsHarvester_includeOtherHarvesterCounts
onlyUseAsHarvester_ifBaseHasUnitTagged
Section [leg_NAME] / [arm_NAME] Useful to make animations
Code Description Example Value Type
x: Sets position of the foot on the X axis. float
y: Sets position of the foot on the Y axis. float
copyFrom: Copy from another leg. Useful to only need to set leg values once copyFrom: 1 int
attach_x: Sets the leg's attach point on the X axis. float
attach_y: Sets the leg's attach point on the Y axis. float
rotateSpeed: float
endDirOffset Target foot/end rotation relative to body
lockMovement Lock to unit body. Useful if walking unit converted to a flying unit. bool
heightSpeed: float
moveSpeed
moveWarmUp
holdDisMin: Defaults to 7. Reposition leg at this distance if neighbor legs are not already repositioning. float
holdDisMax: Defaults to 16. Force reposition of leg at this distance. float
holdDisMin_maxMovingLegs
hold_moveOnlyIfFurthest
holdDisMin_checkNeighbours
hardLimit: Defaults to 50. Force leg to never go this far. Better to not be reached. float
estimatingPositionMultiplier defaults to 1. Predicts were unit will be for leg placement based on unit speed. float
Graphics and effects
hidden: logic boolean
image_end image 1.13
image_end_shadow image 1.13
image_end_teamColors 1.13
image_foot same as image_end image 1.13
image_foot_shadow image
image_middle image 1.13
image_leg same as image_middle image
draw_foot_on_top bool 1.13
drawOverBody Draw over body bool
drawUnderAllUnits Draw over all units bool
drawDirOffset float
dust_effect: Spawns dust particles on each step. bool
spinRate Makes arm/leg spin, like idleSpin for turrets float
favourOppositeSideNeighbours calculate neighbours with X 10 times closer than Y
drawLegWhenZoomedOut For performance, defaults changes based on unit size
drawFootWhenZoomedOut For performance, defaults changes based on unit size
resetAngle: Unused float

Section [attachment_NAME] Sets attachments into the unit


Code Description Example Value Type
x 1.13.3
y 1.13.3
height 1.13.3
idleDir 1.13.3
isVisible 1.13.3
onCreateSpawnUnitOf 1.13.3
canBeAttackedAndDamaged 1.13.3
isUnselectable 1.13.3
lockLegMovement 1.13.3
keepAliveWhenParentDies 1.13.3
setDrawLayerOnTop 1.13.3
setDrawLayerOnBottom 1.13.3
addTransportedUnits 1.13.3
lockRotation 1.13.3
rotateWithParent 1.13.3
resetRotationWhenNotAttacking Similar to shouldResetTurret:for turrets. 1.13.3
deattachIfWantingToMove If the unit is ordered to move, it will detach. This includes waypoints from actions. 1.13.3
prioritizeParentsMainTarget It will priotize targeting the main target. Defaults to true. 1.13.3
alwaysAllowedToAttackParentsMainTargetWill always attack the parents main target. 1.13.3
canAttack Defaults to true. Set to false to stop this attachment attacking. bool
onParentTeamChangeKeepCurrentTeam Defaults false. If true attached units are not converted when parent changes team. Eg from [projectile]convertHitToSourceTeam

Section [effect_NAME] Sets a custom effect to be used


Code Description Example Value Type
life Defaults 200. Time till effect is removed. Set low as possible to reduce effect overhead. float 1.13
alsoEmitEffects Create more effects when created, useful for meta-effects. Note: other 'alsoEmitEffects' on created effects are ignored. effect ref 1.13
ifSpawnFailsEmitEffects If 'spawnChance' for this effects fails then emit these effects instead
alsoPlaySound sound ref 1.13
createWhenOffscreen Defaults false. bool 1.13
createWhenZoomedOut Defaults true bool 1.13
createWhenOverLiquid Defaults true bool 1.13
createWhenOverLand Defaults true bool 1.13
spawnChance Default 1. If less than 1 effect only has a random chance of being created float 1.13
showInFog Default false boolean 1.13
delayedStartTimer Hide for x time before showing and updating effect. float 1.13
liveAfterAttachedDies Defaults false when attachedToUnit is being used bool 1.13
priority Defaults to high. verylow/low/high/veryhigh/critical. Takes effect when too many effects are being shown at once. string 1.13
Movement
attachedToUnit Attach to unit or projectile that created this effect. Will move with this object. bool 1.13
alwayStartDirAtZero Ignore source/attached unit dir bool 1.13
atmospheric Apply drag to slow this effect down and add small wind effects bool 1.13
physics Fall to ground and bounces. Needs height to take effect. bool 1.13
physicsGravity Defaults to 1. height speed acceleration when physics: true float 1.13
xOffsetRelative Offset starting effect position. Relative to direction of attached turret, projectile, unit float 1.13
yOffsetRelative Offset starting effect position. Relative to direction of attached turret, projectile, unit float 1.13
xOffsetRelativeRandom Random offset by +/- this value float 1.13
yOffsetRelativeRandom Random offset by +/- this value float 1.13
xOffsetAbsolute Offset starting effect by position ignoring direction of attached turret, projectile, unit float 1.13
yOffsetAbsolute Offset starting effect by position ignoring direction of attached turret, projectile, unit float 1.13
xOffsetAbsoluteRandom Random offset by +/- this value float 1.13
yOffsetAbsoluteRandom Random offset by +/- this value float 1.13
xSpeedRelative float 1.13
ySpeedRelative float 1.13
xSpeedRelativeRandom Randomly change by -value to value float 1.13
ySpeedRelativeRandom Randomly change by -value to value float 1.13
xSpeedAbsolute float 1.13
ySpeedAbsolute float 1.13
xSpeedAbsoluteRandom Randomly change by -value to value float 1.13
ySpeedAbsoluteRandom Randomly change by -value to value float 1.13
hOffset height offset from source float 1.13
hOffsetRandom Randomly change by -value to value float 1.13
hSpeed height speed float 1.13
hSpeedRandom Randomly change by -value to value float 1.13
dirOffset rotation float 1.13
dirOffsetRandom Randomly change by -value to value float 1.13
dirSpeed rotation speed float 1.13
dirSpeedRandom Randomly change by -value to value float 1.13
Graphics
frameIndex frame of to use int 1.13
frameIndexRandom
stripIndex A built-in image set to use. Cannot be used with custom image effects/explode_big/light_50/flame/effects/effects2/projectiles/projectiles2/explode_bitsint/string 1.13
Image Custom image file to use. Cannot be used with stripIndex. image 1.13
imageShadow Custom image file to use for shadows image
scaleTo Defaults to 1 float 1.13
scaleFrom Defaults to 1 float 1.13
color Defaults #FFFFFFFF color 1.13
teamColorRatio 0-1
drawUnderUnits bool 1.13
fadeInTime Fade alpha from 0% to 100% for this time at start float 1.13
fadeOut Fade alpha from 100% to 0% based on life. Set alpha is higher than 1 to delay fade bool 1.13
alpha Capped between 0-1. Can be set higher than 1 to delay fadeOut effects
shadow True to draw a shadow. Forced true if imageShadow is used
Animation
total_frames Total frames of 'image', used with animation or frameIndex. Only needed with custom images int 1.13
animateFrameStart int 1.13
animateFrameEnd int 1.13
animateFramePingPong int 1.13
animateFrameSpeed time 1.13
animateFrameSpeedRandom time 1.13

Section [animation_NAME] Useful to generate animations for the unit


Code Description Example Value Type
onActions : Unknown move, attack, idle, underConstruction, underConstructionWithLinkedBuiltTime, queuedUnits 1.13
onActionsQueuedUnitPlayAt : float For onAction: queuedUnits. Amount queue needs to reach before starting, set between 0-1 1.13
blendIn : time Blend with last animation for this time 1.13
blendOut : time Blend with next animation for this time 1.13
pingPong Play animation in reverse after it ends bool 1.13
KeyframeTimeScale : float Scales all keyframe times, useful to make an animation faster/slower without changing everything float 1.13
Keyframes - create as many as needed
arm#_[time] Adds a keyframe at time. Use multiple times to create animation. eg: arm1_5s: {x: 5, dir: 90 } 1.13
leg#_[time] Adds a keyframe at time. Use multiple times to create animation.
body_[time] Adds a keyframe at time for body. Only frame and scale allowed on body eg: body_4s: {frame: 4, scale: 0.5}

animation_direction_units Overrides [graphics]animation_direction_units while this animation is playing float


animation_direction_strideX: Overrides [graphics]animation_direction_strideX int
animation_direction_strideY: Overrides [graphics]animation_direction_strideY int
animation_direction_starting: Overrides [graphics]animation_direction_starting float
Deprecated Keys (can be used but there are better ways)
start : int Start image frame. deprecated 1.13
end : int End image frame. deprecated 1.13
scale_start : float Start scale. Deprecated, use body keyframes instead. 1.13
scale_end : float End scale. Deprecated, use body keyframes instead. 1.13
speed : float Speed, smaller is faster. Only effects start, end, scale_start, scale_end 1.13

Section [action_NAME] / [hiddenAction_NAME]


Code Description Example Value Type
text Text shown in UI string
text_{LANG}
description A display text when you select your unit's action, used to explain it's purpose. string
description_{LANG}
displayType none, rally, upgrade, queueUnit, building, action, infoOnly, infoOnlyNoBox
displayRemainingStockpile Queue is shown as number of times action can be triggered based on price bool
pos Order action appears in UI float
iconImage
unitShownInUI Display this unit. (as if this action built this unit) UnitType 1.13.3
Requirements for player/AI to use in UI
price The price of your action for the unit. Disables action if not available. Defaults to credits if unlabelled price: credits=5, energy=5, hp=100, shield=5, ammo=1 resources
isActive Defaults true. If false then action is disabled and shown in red in UI. LogicBoolean
isVisible Defaults true. If false action is hidden from UI and disabled. LogicBoolean
isLocked Defaults false. If true action is disabled, and a lock icon is shown. Mostly used for no nuke game modes LogicBoolean
isLockedMessage LocaleString
isLockedAlt Another reason for this to be locked. Can just use OR on isLocked, but this allows a different message to be shown LogicBoolean 1.13.3
isLockedAltMessage LocaleString 1.13.3
isLockedAlt2 LogicBoolean 1.13.3
isLockedAlt2Message LocaleString 1.13.3
allowMultipleInQueue
onlyOneUnitAtATime When action is picked in UI, only one unit selected with get this action. Defaults to false. bool
isGuiBlinking LogicBoolean? 1.13.3

ai_isDisabled Defaults false. Stop AI using this action. LogicBoolean


ai_isHighPriority 1.13.3
ai_considerSameAsBuilding Be careful with 1.13.3

Triggers - These skip the queue and do not use price, ignores isLocked, buildTime, etc (Use 2 actions and alsoQueueAction to automatically an action to the queue)
autoTriggerOnEvent created, completeAndActive, destroyed, killedAnyUnit, queuedUnitFinished, queueItemAdded, queueItemCancelled, teleported, touchTargetSuccess, newWaypointGivenByPlayer, teamChanged, transportingNewUnit
1.13.3
autoTrigger When true triggers the effects of this action instantly (ignoring price, isActive, isVisible, buildSpeed, etc) autoTrigger: if self.overWater() LogicBoolean
While action is queued
buildSpeed buildSpeed: 5s time
highPriorityQueue Defaults to false. If true this action skips all other low priority actions in queue. Useful for fireTurret actions. bool
canPlayerCancel bool
whenBuilding_cannotMove Stops unit moving while action is being applied. Useful for deploy like actions. bool
whenBuilding_playAnimation Play a custom animation from an [animation] section when in active queue animation ref
whenBuilding_rotateTo Rotate unit body to this direction when action is in active queue float
whenBuilding_rotateTo_orBackwards If true allow rotation in 180 degrees from whenBuilding_rotateTo when this is a smaller angle bool
whenBuilding_rotateTo_waitTillRotated Pause action queue till rotation is finished bool
whenBuilding_temporarilyConvertTo Convert to another unit while action is in active queue. Note: actions from the original unit will be kept unit ref
whenBuilding_triggerAction
spawnEffectsOnQueue Effects to spawn at unit when action is first added to queue effect ref
playSoundToPlayerOnQueue Global sound to play to unit's player only when action is first added to queue sound ref
Misc outcomes / Results (What happens) (Note: Must be at least one outcome for an action to show)
requireConditional Skip all effects of this action if this evaluates to false
convertTo Convert your unit into another unit. properties are preserved. unit ref 1.13.3
addEnergy Adds energy to unit. Has no effect unless energyMax is set. (Same as addResources: energy=X) float
addResources Add these resources when action finishes. addResources: credits=5, energy=-5, hp=-100, shield=5, ammo=1 resources
addResourcesScaledByAIHandicaps Same as addResources, but increased or decreased depending on AI difficulty level
deleteSelf Remove self with no explosions or sounds
resetCustomTimer Reset timer used with self.customTimer() LogicBoolean
setBodyRotation 1.13.3
Outcome - Chaining Actions
alsoTriggerAction Trigger to results of another action as well. Ignores action's requirements. alsoTriggerAction: addCredits, playSound action refs
alsoQueueAction Adds another action into the normal unit's queue. Ignores action's requirements action refs
alsoTriggerOrQueueActionConditional Defaults true. alsoTriggerAction and alsoQueueAction are ignored if this works out to be false. LogicBoolean
Outcome - Sounds
playSoundAtUnit Local sound to play when action finishes sound ref
playSoundGlobally Global sound to play to all players in game sound ref
playSoundToPlayer Global sound to play to unit's player only sound ref
Outcome - Fire projectile from turret
fireTurretXAtGround When action finishes fire target turret at point on ground, bypasses canShoot rules in turret. fireTurretXAtGround: nukeSilo turret ref
fireTurretXAtGround_withOffset If not set player targets the ground with GUI, if a point is set this step is skipped fireTurretXAtGround_withOffset: 0,0 point
fireTurretXAtGround_withProjectile Used with fireTurretXAtGround. Defaults to target turret's normal projectile. projectile ref
fireTurretXAtGround_count Number of projectiles to fire. Defaults to 1 1.13.3
fireTurretXAtGround_onlyOverPassableTileOf Only allow tiles crossable by this movement type to be selected LAND,BUILDING,WATER,HOVER, etc 1.13.3
Outcome - Spawning
spawnUnits 1.13.3
spawnEffects Effects to spawn at unit effect ref
produceUnits Like spawnUnits but unit exits as if it was produced normally, and gets a move away waypoint 1.13.3
Outcome - Transport Changes
addUnitsIntoTransport Add units into transport, use self.transportingCount() to check for space before adding addUnitsIntoTransport: tank*3, heavyTank
deleteNumUnitsFromTransport int
deleteNumUnitsFromTransport_onlyWithTags 1.13.3
startUnloadingTransport 1.13.3
forceUnloadTransportNow 1.13.3
Outcome - Waypoint Changes
clearAllWaypoints Clears all waypoints, be careful not to annoy players by removing their orders, prepending waypoints is often better bool 1.13.3
clearActiveWaypoint bool 1.13.3
addWaypoint_type move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow
addWaypoint_unitType Only for use with addWaypoint_type:build 1.13.3
addWaypoint_prepend Add to the start of the waypoint queue or the end bool 1.13.3
addWaypoint_triggerActionIfFailed If target_nearestUnit fails to find a match so waypoint cannot be added then trigger this action actions 1.13.3
addWaypoint_maxTime Automatically remove this waypoint if it has been active for longer than this time. time 1.13.3
addWaypoint_target_nearestUnit_tagged tags 1.13.3
addWaypoint_target_nearestUnit_team own|neutral|ally|enemy|any relation 1.13.3
addWaypoint_target_nearestUnit_maxRange float 1.13.3
addWaypoint_target_mapMustBeReachable bool 1.13.3
addWaypoint_position_offsetFromSelf point 1.13.3
addWaypoint_position_fromAction bool 1.13.3
addWaypoint_position_randomOffsetFromSelf
Same as above, but random. 1.13.3
Outcome - Animation
playAnimation 1.13.3
playAnimationIfNotPlaying Don't restart animation if this animation is already playing 1.13.3
finishPlayingLastAnimation Finish last animation, including blend out 1.13.3
stopLastAnimation Stop last animation, skipping blend out 1.13.3

switchToNeutralTeam Change team to neutral. This team is allied to all other teams. Will be captured by nearby units unless [core]stayNeutral:true is used boolean 1.13.3
switchToAggressiveTeam Change to a built-in team that is aggressive to all other teams. Does not get captured. boolean 1.13.3
Outcome - Take Resources from other units
takeResources Resources to take (required to use take resources). And at-least 1 include key is needed. takeResources: hp=5, gold=10 customPrice 1.13.3
takeResources_includeUnitsInTransport bool 1.13.3
takeResources_includeParent Include attachment parent or transport parent bool 1.13.3
takeResources_includeUnitsWithinRange float 1.13.3
takeResources_includeUnitsWithinRange_team Used with includeUnitsWithinRange, defaults to own. Can be: own|ally|allyNotOwn|enemy|neutral|any TeamRelation 1.13.3
takeResources_excludeUnitsWithoutTags tags 1.13.3
takeResources_excludeUnitsWithTheseResources customPrice 1.13.3
takeResources_excludeUnitsWithoutAllResources Defaults to true. bool 1.13.3
takeResources_triggerActionIfAnyCollected action refs 1.13.3
takeResources_triggerActionIfNoneCollected action refs 1.13.3
takeResources_discardCollected Just take resources from targets, don't add(or remove) to self bool 1.13.3
takeResources_keepResourcesOnTarget Don't add/remove resource from target. This clones resources. Use with takeResources_discardCollected and takeResources_triggerActionIfAnyCollected to make a resource detector. bool 1.13.3
takeResources_maxUnits Defaults to 1.
Outcome - Convert Resources
convertResource_from Name of custom resource to take from 1.13.3
convertResource_to Name of custom resource to give to 1.13.3
convertResource_minAmount Skip if less than this amount in 'from'. Defaults to 0. Likely not needed for most use cases 1.13.3
convertResource_maxAmount Max amount to transfer between 'from' and 'to' 1.13.3
convertResource_multiplyAmountBy Defaults to 1. Amount to multiply when adding on 'to' (does not effect amount taken on 'from') 1.13.3
Outcome - Set Resources
resourceAmount Name of custom resource to set with the below 3 keys. All keys are optional, and can be used together. customResource 1.13.3
resourceAmount_setValue Absolute value to set this resource to, ignores current value of resource. Skipped by default float 1.13.3
resourceAmount_addOtherResource Name of another custom resource to add to this on. Can be used without resourceAmount_setValue, to just add resources. Or with resourceAmount_setValue:0 to copy a resource value. customResource 1.13.3
resourceAmount_multiplyBy Defaults to 1. Multiple the current or new value by float 1.13.3
Outcome - Attachment changes
attachments_addNewUnits 1.13.3
attachments_deleteNumUnits 1.13.3
attachments_onlyOnSlots 1.13.3
disconnectFromParent 1.13.3
Outcome - Tag changes
temporarilyAddTags Add tag to this unit until it is converted or reset 1.13.3
temporarilyRemoveTags Remove tag from this unit until it is converted or reset 1.13.3
resetToDefaultTags Reset to standard tags 1.13.3
addGlobalTeamTags Add a tag to player's team. Use with self.globalTeamTags() to create unlocks and upgrades. Unique tags are best to not conflict with other mods. 1.13.3
removeGlobalTeamTags Remove a tag from player's team. 1.13.3

Outcome - Show Message


showMessageToPlayer Sends a message to the player controlling the unit string 1.13.3
showMessageToAllPlayers Sends a message to all players string 1.13.3
showQuickWarLogToPlayer Sends a Quick War Log message to the player controlling the unit (in the lower lef) string 1.13.3
showQuickWarLogToAllPlayers Sends a Quick War Log message to all players (in the lower lef) 1.13.3
debugMessage Only shows in Sandbox with Debug mode on. 1.13.3
Targets

Type Spawn Units Parameters Used with spawn keys and unit names
Code Description Example
Most units spawning keys support multiple units with parameters spawnUnits: crates*10(neutralTeam=true), tank(spawnChance=0.5)
neutralTeam Spawn the unit on the neutral team instead of the same team as source 1.13.3
setToTeamOfLastAttacker Spawn the unit on the last attacker of source (useful on [core]unitsSpawnedOnDeath) 1.13.3
spawnChance Chance this unit will spawn. Defaults to 1. 1.13.3
maxSpawnLimit Useful with spawnChance, max number of units to spawn in total spawnUnits: treeA(spawnChance=0.5, maxSpawnLimit=1), treeB(maxSpawnLimit=1) 1.13.3
gridAlign Align spawn location to grid, useful for buildings 1.13.3
skipIfOverlapping Don't spawn this unit if spawn in an invalid location. Eg on units or over water when LAND based 1.13.3
offsetX 1.13.3
offsetY 1.13.3
offsetRandomX
offsetRandomY
offsetRandomDir
offsetHeight 1.13.3
offsetDir 1.13.3
addResources Give spawn unit those resources, can be used to set flags that trigger actions spawnUnits: crates(addResource=gold:30|stone:10, spawnChance=0.5) 1.13.3
Targets

Type Logic Boolean Values Useful to create conditionals with several keys
Code Description Example
true
false
if Start all logic booleans with if, unless just using true/false
and if self.isInWater() and self.energy(greaterThan=1)
or if (self.energy(greaterThan=1) or self.ammo(greaterThan=1)) and self.isFlying()
not if not self.isOverLiquid()
Unit location and movement
self.isUnderwater()
self.isAtGroundHeight()
self.isFlying()
self.isMoving()
self.isAtTopSpeed()
self.isInWater() Touching water
self.isOverwater() Touching or over a water tile
self.isOverLiquid()
self.isOverClift()
self.isOverPassableTile() (parameters: type)
self.isOverOpenLand() shortcut for self.isOverPassableTile(type='LAND')
Unit stats
self.hasResources() Can check multiple resources (all price parameters) 1.13.3
self.resource() Checks a single resource (parameters: type, greaterThan, lessThan)
self.hp() (parameters: greaterThan, lessThan, empty, full)
self.ammo() (parameters: greaterThan, lessThan, empty, full)
self.isAmmoEmpty() shortcut for self.ammo(empty=true)
self.ammoIncludingQueued() Also includes ammo from actions still in queue (parameters: greaterThan, lessThan, empty, full) if self.ammoIncludingQueued(lessThan=12)
self.energy() (parameters: greaterThan, lessThan, empty, full)
self.energyIncludingQueued() Also includes energy from actions still in queue (parameters: greaterThan, lessThan, empty, full)
self.isEnergyFull() shortcut for self.energy(full=true)
self.isEnergyEmpty() shortcut for self.energy(empty=true)
self.shield() (parameters: greaterThan, lessThan, empty, full)
self.kills() (parameters: greaterThan, lessThan)
self.queueSize() 1.13.3
Misc
game.nukesEnabled()
self.hasFlag() Boolean flag saved into units for mods to use. (parameters: id=0-31) Use addResources in action change this vaule
self.tags() (parameters: includes)
self.globalTeamTags() (parameters: includes) 1.13.3
self.transportingCount() (parameters: greaterThan, lessThan, empty)
self.numberOfAttachedUnits() (withTag, greaterThan, lessThan)
self.isAttacking()
self.hasActiveWaypoint() ([type=WAYPOINT_TYPE])
self.transportingUnitWithTags() (parameters: includes) self.transportingUnitWithTags(includes='human')
self.hasParent() For attachments only (parameters: withTag='X')
self.hasTakenDamage() (parameters: withinSeconds=X, laterThanSeconds=X) self.hasTakenDamage(withinSeconds=1)
self.timeAlive() (parameters: withinSeconds=X, laterThanSeconds=X)
self.lastConverted() (parameters: withinSeconds=X, laterThanSeconds=X)
self.customTimer() (parameters: withinSeconds=X, laterThanSeconds=X)
self.isOnNeutralTeam()
numberOfUnitsInTeam() (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue) numberOfUnitsInTeam(withTag='techUnlockBuilding', greaterThan=0)
numberOfUnitsInEnemyTeam() 1.13.3
numberOfUnitsInNeutralTeam() UNTESTED!
self.hasUnitInTeam() (parameters: withTag, withinRange, incompleteBuildings, factoryQueue) alias for numberOfUnitsInTeam 1.13.3
self.noUnitInTeam() (parameters: withTag, withinRange, incompleteBuildings, factoryQueue) alias for numberOfUnitsInTeam 1.13.3
self.isControlledByAI() 1.13.3

Type Built-in Prices/Resources Used in price/resource keys as values


Code Description Example Targets
credits Global resource
energy
hp
shield price: hp=-100, shield=100
ammo Hidden value on each unit for use by mods
setFlag use with addResources, resourceUsage or price. 0-31. Flags are stored in each unit setFlag=1
unsetFlag use with addResources, resourceUsage or price. 0-31
hasFlag use with price or resourceUsage
hasMissingFlag use with price or resourceUsage
X Any resource defined in [global_resource_x] or [resource_x] sections gold=5, stone=20 1.13.3

Section [global_resource_NAME] Sets a custom resource


Code Description Example Value Type
Define a new resource shared with all units in a team, works just like the built-in credits resource. Add to 'all-units.template' (at mod root) for easy use in all of your mods
displayName Name of this resource in UI 1.13.3
displayNameShort Resource name on smaller UI elements like action hovertext (Defaults to displayName) 1.13.3
hidden Hide this resource from the player bool 1.13.3
priority If 2 or mods/units define a resource with the same NAME, the displayName/displayColor with the highest priority is used 1.13.3
displayColor Color, can be hex with optional alpha #FF0000 color 1.13.3

Section [resource_NAME] Sets a custom resource


Code Description Example Value Type
Define a new resource local to unit. Works like build-in ammo resource
displayName Name of this resource in UI (eg hovering over unit info) 1.13.3
displayNameShort 1.13.3
hidden Hide this resource from the player 1.13.3
equivalentGlobalResourceForAI Used to hint to the AI that a resource node with a local resources could be used to get a different global resource. Eg when a harvester unloads the resource

Section [template_NAME] Useful to copy keys from a section to several sections


Code Description Example Value Type
Template sections can have any keys and have no effect by themselves. 1.13.3
Template can get included from other files with [core]copyFrom. Eg: [core]copyFrom: ROOT:effects/explodeEffects.template (Note that copyFrom can include multiple files. )
--All these below features can be used with any section not just templates--
@copyFromSection Use in any section to include keys from a section or template. (Comma separated for multiple) @copyFromSection template_name/action_name/projectile_name 1.13.3
@define X Define a local variable within a section (best outside of template) @define targetEffect: boom
@global X Define a global variable used in all sections. Local variables have a higher priority @global targetEffect: pop
${X} can be used to reference variables (can also be done outside of a template) spawnEffects: effect_${targetEffect} 1.13.3
${section.key} can be used to reference another key (can also be done outside of a template) addResources: credits=${ core.price * 2 + 10 } 1.13.3
Version Section [core]
Added Code Value Type Description Example
Necessary Code, will cause error if these are not included
name:
mass:
radius:
price:
maxHp:
#==== #==== Common Keys
name: string Defines the unit raw name, game uses it to identify as a unique name. (This is not displayed in-game) name: customTank1
altNames: string(s) Comma separated list of names. Like name but lower priority, useful for multiple optional mods. altNames: custTank1, customTank1, cTank1
class: string Reserved for future use, must be CustomUnitMetadata by default. class: CustomUnitMetadata
1.13.3 strictLevel: float Defaults to 0. 1 = Errors if keys are duplicated. Add to "all-units.template" in root to apply to all units. strictLevel: 1
price: int / price The unit cost from builders/buildings. Defaults to credits if no resource type is used price: 500, price: gold=5, stone=10
mass: int The 'weight' of the unit, defines how it collides with other units, a greater value means it's tougher to push. mass: 3000
techLevel: int Defines the Tech Level of the unit, there're 3 levels and each will appear in a different color in the GUI. techLevel: 1
buildSpeed: float / s Time it takes to build the unit. (may multiply with builder speed) buildSpeed: 3s
radius: int Circular area around the unit that makes it selectable. (mouse click/screen touch) radius: 20
isBio: bool Choose whether the unit is bioligical or not, affects sound and splat (unless hideScorchMark:true) isBio: true
isBug: bool Changes some death defaults, and sort order in Sandbox. isBug: false
1.13 isBuilder: bool Normally required if this unit places buildings. Defaults to [ai]useAsBuilder. isBuilder: true
1.15 streamingCost price Like price but paid for overtime while this unit is being queued or built. Construction or queue is paused if resources run out while building.
1.15 switchPriceWithStreamingCost bool Shortcut to set streamingCost to price value and clear price, add to all-units.template to quickly switch a mod over to streaming resources.
#==== #==== Unit Stats Keys
maxHp: int The max health for the unit. (will spawn with this value) maxHp: 200
selfRegenRate: float Passive self repair rate. selfRegenRate: 0.01
maxShield: int The max shield hitpoints of the unit. Can start with 0 hitpoints if startShieldAtZero:true. maxShield: 500
startShieldAtZero: bool Unit starts with a 0 hitpoints shield on created if true. startShieldAtZero: true
shieldRegen: float Passive shield regen rate. shieldRegen: 0.15
float Defaults to 0. Energy that can be used as ammo for turrets, laser defense and actions. energyMax: 1
energyRegen: float Passive energy regen rate. energyRegen: 0.001
energyStartingPercentage: float Sets the percentage of charged energy when the unit is first built. energyStartingPercentage: 0.5
energyNeedsToRechargeToFull: float Disables weapons using energy after reaching zero till fully recharged if true. energyNeedsToRechargeToFull: true
energyRegenWhenRecharging float Regen rate while recharging.
1.13 armour: int Damage taken away from each hit. (not currently used in any vanilla units) armour: 6
1.13 armourMinDamageToKeep: int Min damage to keep from received damage. Defaults to 1. armourMinDamageToKeep: 2
1.13.3 borrowResourcesWhileAlive: price Takes these resources when created and returns them when removed or destroyed. borrowResourcesWhileAlive: gold=10
Like borrowResourcesWhileAlive but doesn't take affect till built. Mostly useful for buildings like houses that
1.15 borrowResourcesWhileBuilt: borrowResourcesWhileBuilt: supplyCap = -10
price have negative resources to add to the unit cap, etc.
1.13.3 generation_resources: price Income unit creates. (custom resource version) generation_resources: credits=5, gold=20
1.13.3 generation_active: logicBoolean Disables generation_resources/credits when false. (logic_boolean) generation_active: if not self.hp(lessThan=100)
generation_credits: int Income unit creates. (credits only) generation_credits: 2
generation_delay: int How often generation_resources/credits is added. Defaults to 40. (changing not recommended) generation_delay: 40
#==== #==== UI and Graphics Keys
showInEditor: bool Set to false to hide unit in Sandbox editor. (Defaults to true) showInEditor: false
displayText: LocaleString The unit name that the game shows to the player. displayText: Custom Tank
1.13 displayText_{LANG}: string LANG = ISO 639-1 Code to show this text instead when game is in this language. displayText_es: Tanque Personalizado
displayDescription: LocaleString Unit description that the game shows to the player. displayDescription: -Fast movement\n-Light damage
1.13 displayDescription_{LANG}: string LANG = ISO 639-1 Code to show this text instead when game is in this language. displayDescription_es: -Movimiento rápido\n-Daño ligero
displayLocaleKey: string Translation file key for unit name and description. displayLocaleKey: units.mechArtillery
displayRadius: int Defaults to radius value. Set to show a larger or smaller selection circle UI on units. displayRadius: 20
uiTargetRadius int Defaults to displayRadius value. Radius used when attacking/reclaiming/etc this unit
shieldRenderRadius: int Defaults is a little bigger than radius. Set to show a larger or smaller shield circle on units. shieldRenderRadius: 12
shieldDisplayOnlyDeflection: bool Hide shield unless deflecting shot if true. shieldDisplayOnlyDeflection: true
shieldDeflectionDisplayRate: float Defaults to 4. High value causes shield deflection to fade disappear faster. shieldDeflectionDisplayRate: 3
1.13.3 showOnMinimap: bool Defaults to true. Hide units on minimap if false. showOnMinimap: false
1.13.3 showActionsWithMixedSelectionIfOtherUnitsHaveTag: bool Shows a merged action list if all units selected includes one of these tags. Useful for converted units. showActionsWithMixedSelectionIfOtherUnitsHaveTag: true

1.14 showOnMinimapToEnemies bool Useful for stealth units


#==== #==== Building Only Keys
isBuilding: bool Defines if the unit is a building. isBuilding: true
footprint: ints Left, up, right, down. Tiles taken up which block unit movement. Defaults to 0,0,0,0 = 1 center tile. footprint: 0,0,1,1
constructionFootprint: ints Tiles taken up for placement of other buildings. Defaults to 0,0,0,0 = 1 center tile. constructionFootprint: -1,-1,1,3
displayFootprint: ints Left, up, right, down. Only applies to buildings, just used for GUI. Defaults to footprint. displayFootprint: 0,0,1,1
buildingSelectionOffset: int Defaults to 0. Adds or removes padding on the drawn selection rect in UI. buildingSelectionOffset: 4
buildingToFootprintOffsetX: float Defaults to 10. Change the building position in the footprint on the X-axis. buildingToFootprintOffsetX: 4
buildingToFootprintOffsetY: float Defaults to 10. Change the building position in the footprint on the Y-axis. buildingToFootprintOffsetY: 6
placeOnlyOnResPool: bool Normally used for extractors, forces building construction in a resource pool. placeOnlyOnResPool: true
selfBuildRate: float Rate unit builds itself when placed without a builder. selfBuildRate: 0.0008
1.14 ignoreInUnitCapCalculation defaults to true for buildings otherwise false. Set to true to not count this unit in unit cap.
#==== #==== Misc Keys
copyFrom: file(s) (ini) Uses unit data from another ini file as default for this unit, supports multiple files. copyFrom: ROOT:defaultTanks.template, tankT1.ini
dont_load: bool Do not load unit, and don't error on missing data. Can be useful when used with copyFrom. dont_load: true
overrideAndReplace: string(s) Overrides another unit with this unit. Build links and map positions to target unit will be replaced. overrideAndReplace: builder, combatEngineer
1.13.3 onNewMapSpawn: string Values: emptyResourcePools_asNeutral, emptyOrOccupiedResourcePools_asNeutral, mapCenter_asNeutral, mapCenter_eachActiveTeam, spawnPoint_eachActiveTeam
globalScale: float Defaults to 1. Changing not recommended. globalScale: 2
isLocked: bool Disallow building of this unit. Can be used with overrideAndReplace to restrict units player can build. isLocked: true
1.13 isLockedIfGameModeNoNuke: bool Disallows building of this unit if nukes are disabled during match setup. isLockedIfGameModeNoNuke: true
experimental: bool Tag unit as experimental. Affects zoomed out icon and end game stats. experimental: true
stayNeutral: bool Set to false to disable capture when unit is on the neutral team. stayNeutral: false
1.13 createNeutral: bool Set to true to always spawn the unit on the neutral team. createNeutral: true
createOnAggressiveTeam: bool Set to true to always spawn the unit on aggressive teams on single player matches. createOnAggressiveTeam: true
1.13 tags: string(s) List of comma separated strings. Used to classify units, create special actions and balances. tags: tank, smallTank, piercingDamage
defineUnitMemory: boolean nukeActive, boolean laserReady, float experience, unit nextTarget, unit
defineUnitMemory creates variables for custom storage unique to each unit. Allowed types: boolean, float/number, unit, string homeBase, string customText
1.15
fogOfWarSightRange: int Sets number of tiles this unit can see through the fog of war. Defaults to 15. fogOfWarSightRange: 18
1.14 fogOfWarSightRangeWhileNotBuilt int Fog of War range when unit/building is incomplete. Defaults to fogOfWarSightRange
softCollisionOnAll: int Creates a soft collision effect when touching other units. softCollisionOnAll: 3
disableAllUnitCollisions: bool Unit cannot collide with others if true. disableAllUnitCollisions: true
1.13 isUnrepairableUnit: bool No unit can repair this unit if true. isUnrepairableUnit: true
isUnselectable: bool If true unit cannot be selected. (includes AI players) isUnselectable: true
1.14 isUnselectableAsTarget bool Defaults to isUnselectable. Can be used to create units that cannot be selected but can be targeted for attack, reclaim, etc
1.13 isPickableStartingUnit: bool If true, unit is added to dropdowns for starting unit in game setup menus. isPickableStartingUnit: true
1.13 startFallingWhenStartingUnit: bool Unit will appear falling from skies when starting unit if true. startFallingWhenStartingUnit: true
soundOnAttackOrder: sound(s) List of sound names. Only one will be played on each attack order. Only .ogg and .wav formats. soundOnAttackOrder: tankAttackOrder1.ogg, tankAttackOrder2.ogg
soundOnMoveOrder: sound(s) List of sound names. Only one will be played on each move order. Only .ogg and .wav formats. soundOnMoveOrder: tankMoveOrder1.ogg, tankMoveOrder2.ogg
1.13.3 soundOnNewSelection: sound(s) List of sound names. Only one will be played on each unit selection. Only .ogg and .wav formats. soundOnNewSelection: tankSelection1.ogg, tankSelection2.ogg
canNotBeDirectlyAttacked: bool No unit can directly target this unit. If true this will also skip this unit in victory/defeat checks. canNotBeDirectlyAttacked: true
canNotBeDamaged bool Defaults to value of canNotBeDirectlyAttacked (be careful setting this without canNotBeDirectlyAttacked, as AI will attack forever)
1.13.3 canNotBeGivenOrdersByPlayer: bool If true unit will not take player or AI orders. canNotBeGivenOrdersByPlayer: true
1.13.3 canOnlyBeAttackedByUnitsWithTags: strings(s) List of tag strings, only units with these tags can directly target this unit. canOnlyBeAttackedByUnitsWithTags: piercingTank, powerfulTank
1.14 disableDeathOnZeroHp bool Setting to true allows unit to continue living even at 0 HP, useful for custom "death" action. Warning: If not used with an autoTrigger, etc units will attack this unit forever.
#==== #==== Transport Keys
1.13 transportSlotsNeeded: int Defaults to 1. Number of slots this unit uses up in a transport, experimentals are often set to 5. transportSlotsNeeded: 2
maxTransportingUnits int Number of slots this units has for transporting other units. maxTransportingUnits: 5
1.13 transportUnitsRequireTag: string(s) Only allows trasport of units that have one of these tags. transportUnitsRequireTag: smallTank, soldier
1.13 transportUnitsRequireMovementType: movementTypes Only allows trasport of units that have one of these movement types. transportUnitsRequireMovementType: AIR, WATER
1.13 transportUnitsBlockAirAndWaterUnits: bool Defaults to true. This unit can only transport LAND units if true. transportUnitsBlockAirAndWaterUnits: false

1.13 transportUnitsKeepBuiltUnits: bool Makes built units stay inside transport instead of exiting it once ready if true. transportUnitsKeepBuiltUnits: true
1.13 transportUnitsCanUnloadUnits: LogicBoolean Defaults to: if not self.isOverLiquid() and not self.isMoving(). This unit cannot unload units if false. transportUnitsCanUnloadUnits: false
1.13 transportUnitsAddUnloadOption: bool Defines if unload button should be added to the unit menu transportUnitsAddUnloadOption: false
1.13.3 transportUnitsUnloadDelayBetweenEachUnit: float Changes the delay it takes between each unit getting unloaded. transportUnitsUnloadDelayBetweenEachUnit: 12
1.13 transportUnitsKillOnDeath: LogicBoolean Defaults to true. If false transported units don't die when transport dies. transportUnitsKillOnDeath: if self.isOverLiquid()
1.13 transportUnitsHealBy: float Rate to heal units that are being transported. transportUnitsHealBy: 0.1
transportUnitsBlockOtherTransports: bool Defaults to true, if false this transports can hold other transports. transportUnitsBlockOtherTransports: false
1.13.3 whileNeutralTransportAnyTeam: bool This unit can transport units of any team while neutral if true. whileNeutralTransportAnyTeam: true
1.13.3 whileNeutralConvertToTransportedTeam: bool Converts this unit to transported team while neutral. Useful with whileNeutralTransportAnyTeam. whileNeutralConvertToTransportedTeam: true
1.13.3 convertToNeutralIfNotTransporting: bool Reverts back this unit to neutral when unloaded. Useful with whileNeutralTransportAnyTeam. convertToNeutralIfNotTransporting: true
1.13.3 transportUnitsOnTeamChangeKeepCurrentTeam: bool Keeps transported units on their orginal team when this unit is converted if true. transportUnitsOnTeamChangeKeepCurrentTeam: true

1.13.3 #==== #==== Resource Node Keys

resourceRate: float Used with canReclaimResources. Allows other teams to reclaim this unit. Normally used with neutral team. Use price to set what resources are gained.
similarResourcesHaveTag: string(s) When this has been reclaimed harvester unit moves on to another resource with these tags. similarResourcesHaveTag: goldResource
1.13.3 resourceMaxConcurrentReclaimingThis: int Defaults to unlimited. Set to restict how many units can reclaim this resource at the same time. resourceMaxConcurrentReclaimingThis: 3
1.13.3 reclaimPrice: int Like price but for resources. Useful for buildable resources. reclaimPrice: gold=1000
1.13.3 #==== #==== Resource Harvester Keys
canReclaimResources: bool If true this unit can gather resources, useful with resourceRate. canReclaimResources: true
canReclaimResourcesNextSearchRange: int Defines the resource search range of this unit when its main gathered resource runs out. canReclaimResourcesNextSearchRange: 100
canReclaimResourcesOnlyWithTags: string(s) This unit is only allowed to gather resources with these tags. canReclaimResourcesOnlyWithTags: foodResource, goldResource
canReclaimUnitsOnlyWithTags string(s) This is for reclaiming units, not for resources. See canReclaimResourcesOnlyWithTags
#==== #==== Construction and Factory Keys
canRepairUnitsOnlyWithTags string(s)
canRepairBuildings: bool Can this can heal ally buildings (isBuilder:true is required) canRepairBuildings: true
canRepairUnits: bool Can this can heal ally units. (isBuilder:true is required), canRepairBuildings required for buildings. canRepairUnits: true
autoRepair: bool Automatically try and repair damaged units in nano range. (isBuilder:true is required) autoRepair: true
nanoRange: int Defaults to 85. Defines the unit building/repair/reclaim range. nanoRange: 110
nanoRepairSpeed: float Defaults to 0.2. Defines the unit nano repair/reclaim speed. nanoRepairSpeed: 0.01
nanoBuildSpeed: float Defaults to 1. Defines the unit nano building speed. (May multiply with target's buildSpeed) nanoBuildSpeed: 0.9
1.13.3 nanoRangeForRepairIsMelee: bool Defines if this unit must touch its target to repair it. nanoRangeForRepairIsMelee: true
1.13.3 nanoRangeForReclaimIsMelee: bool Defines if this unit must touch its target to reclaim it. nanoRangeForReclaimIsMelee: true
1.13.3 nanoRangeForRepair: int Defines a specific range for the repair action of this unit. nanoRangeForRepair: 60
1.13.3 nanoRangeForReclaim: int Defines a specific range for the reclaim action of this unit. nanoRangeForReclaim: 60
nanoFactorySpeed: float Defaults to 1. Multiplies the buildSpeed value of the created unit if this unit is a factory. nanoFactorySpeed: 1.2
extraBuildRangeWhenBuildingThis: int Temporarily adds extra build range to builders to build this unit. Useful for water based buildings. extraBuildRangeWhenBuildingThis: 90
builtFrom_#_name: string(s) Useful if adding this unit to build to existing buildings. Like canBuild but in opposite direction. builtFrom_1_name: landFactory, airFactory
builtFrom_#_pos: float Order this build link appears in UI. Using canBuild instead is more recommended. builtFrom_1_pos: 0.1
builtFrom_#_forceNano: bool Build as if this is a building if true. (even if it's a unit) builtFrom_1_forceNano: true
1.13.3 builtFrom_#_isLocked: LogicBoolean If true this unit cannot be built in this build link. (can be conditioned if logicBooleans are used) builtFrom_1_isLocked: if self.hp(lessThan=100)
1.13.3 builtFrom_#_isLockedMessage: LocaleString Message shown when this build link is locked. builtFrom_1_isLockedMessage: -Needs more population
exit_x: float Where created or unloaded units appears from the transport or building. Defaults to 0. exit_x: 0
exit_y: float Where created or unloaded units appears from the transport or building. Defaults to 5. exit_x: 5
1.13 exit_dirOffset: float Defaults to 180 for units and 0 for buildings. Defines the exit direction of created or unloaded units. exit_dirOffset: 140
1.13 exit_heightOffset: float Defaults to 0. Defines the height where created or unloaded units appears. exit_heightOffset: 16
1.13 exit_moveAwayAmount: float Defaults to 70. Defines the distance that created or unloaded units moves from this unit. exit_moveAwayAmount: 10
1.14 exitHeightIgnoreParent bool Ignores parent height for exit height; useful for separating attachments with their parents for building
#==== #==== Death Keys
dieOnConstruct: bool Deletes this unit when it starts to build if true. (target building/unit likely will need selfBuildRate set) dieOnConstruct: true
1.13 dieOnZeroEnergy: bool Kills this unit if energy level reaches zero when true. dieOnZeroEnergy: true
numBitsOnDeath: int Defines the number of scattered bit fragments when this unit dies. numBitsOnDeath: 20
nukeOnDeath: bool Unit will spawn a nuke detonation built-in effect when dies if true. nukeOnDeath: true
nukeOnDeathRange: float Defines the nuke effect range when using nukeOnDeath. nukeOnDeathRange: 140
nukeOnDeathDamage: float Defines the nuke effect area damage when using nukeOnDeath. nukeOnDeathDamage: 2000
nukeOnDeathDisableWhenNoNuke: bool Defaults to false. If true this unit will not explode with nuke when nukes are disabled in skirmish maps. nukeOnDeathDisableWhenNoNuke: true
fireTurretXAtSelfOnDeath: turret ref Auto-shoot a specific turret when this unit dies. fireTurretXAtSelfOnDeath: turret_1
1.13 explodeOnDeath: bool Defaults to true. Disables the unit death explode built-in effect if false. explodeOnDeath: false
1.13 explodeOnDeathGroundCollision: boolean Defaults to true. Disables the explode built-in effect on death when unit touches ground if false. explodeOnDeathGroundCollision: false
1.14 explodeTypeOnDeath: preset effects options: verysmall, small, normal, large, largeUnit, building, buildingNoShockwaveOrSmoke, verylargeBuilding
1.13 effectOnDeath: effect(s) ref Spawns built-in or custom effects when unit dies. effectOnDeath: shockwave, CUSTOM:pieces*3, CUSTOM:deathSound
1.13 effectOnDeathGroundCollision: effect(s) ref Like effectOnDeath but when unit touches ground. Useful for flying units. effectOnDeathGroundCollision: CUSTOM:bigExplosion
1.13 unitsSpawnedOnDeath: string(s) Spawns these units when dies. Comma separated unit identifiers. unitsSpawnedOnDeath: tank*5, hoverTank
unitsSpawnedOnDeath_setToTeamOfLastAttacker: bool Units spawned on death will appear on the last attacker team if true. unitsSpawnedOnDeath_setToTeamOfLastAttacker: true
hideScorchMark: bool Disables the death scorch mark leaved when unit dies if true. hideScorchMark: true
soundOnDeath: string(s) Sets a custom sound for this unit death. soundOnDeath: tankExplosion1.ogg, tankExplosion2.ogg
1.14 effectOnDeathIfUnbuilt: effect(s) ref If the unit was not completed, and is destroyed, play this effect. Defaults to effectOnDeath effectOnDeathIfUnbuilt: CUSTOM:implode
#==== #==== Action Keys
1.13.3 autoTriggerCooldownTime: time (seconds) Post automatic action cooldown (Not detection cooldown). Defaults to 1s. Warning: Setting this too low for many units might effect performance depending on the action effects.
autoTriggerCooldownTime_allowDangerousHighCPU: bool Allows for auto actool cooldown lower than 0.2s. Default to false.
options: everyFrame (default), every4Frames, every8Frames. Note: all triggers regardless of check rate are checked
1.15 autoTriggerCheckRate enum when first created and after an auto trigger cooldown. Note: Adding [core]autoTriggerCheckRate:every8Frames to all- autoTriggerCheckRate:every8Frames
units.template could have a large performance boost for mods with complex autoTriggers.
#==== #==== Deprecated Keys (can be used but there are better ways)
depr. 1.13 action_#_convertTo: string Deprecated in 1.13, use [action_x] sections instead action_1_convertTo: customTank_2
depr. 1.13 action_#_pos: float Order action appears in UI action_1_pos: 0.1
depr. 1.13 action_#_price: int The price of your action for the unit. (All your sub actions will be linked to the # you use) action_1_price: 1000
depr. 1.13 action_#_text: string A display text when you select your unit's action, used to explain it's purpose. action_1_text: Upgrade to Custom Tank 2
depr. 1.13 action_#_description: string The action description. action_1_description: -Converts the tank
depr. 1.13 action_#_addEnergy: float Adds energy to unit. Has no effect unless energyMax is set action_1_addEnergy: 10
depr. 1.13 action_#_whenBuilding_cannotMove: bool Stops unit moving while action is being applied. Useful for deploy like actions. action_1_whenBuilding_cannotMove: true
depr. 1.13 canBuild_#_name/pos/isLocked: string Use canBuild section instead. canBuild_1_name: tank

Section [canBuild_NAME]
Code Value Type Description Example
1.13.3 name: string(s) List of unit identifiers this unit can create. Can be buildings or units. Add "setRally" to create a rally button name: setRally, tank, hoverTank, heavyTank
1.13.3 pos: float Order build link appears in this unit UI. pos: 0.1
1.13.3 tech: int Tech level. Mostly just affects build link colour in this unit UI. Defaults to 1. tech: 2
1.13.3 forceNano: bool Builds target as if it was a building if true. (even if it's a unit) forceNano: true
1.13.3 isVisible: LogicBoolean Hide this build link if true in this unit UI. isVisible: if not self.energy(greaterThan=100)
1.13.3 isLocked: LogicBoolean Dynamically locks this build option and shows isLockedMessage if true. isLocked: if self.hp(lessThan=100)
1.13.3 isLockedMessage: string Set to tell to players why a unit is locked. isLockedMessage: -Needs 2 Barracks
1.13.3 isLockedMessage_{LANG}: string LANG = ISO 639-1 Code to show this text instead when game is in this language. isLockedMessage_es: -Necesita 2 Cuarteles
1.13.3 isLockedAlt: LogicBoolean Another reason for this to be locked. Just allows a different message to be shown. isLockedAlt: if self.energy(greaterThan=90)
1.13.3 isLockedAltMessage: string Message for isLockedAlt. isLockedAltMessage: -Needs less energy
1.13.3 isLockedAlt2: LogicBoolean Like isLockedAlt but to show one more message. isLockedAlt2: if self.isMoving()
1.13.3 isLockedAlt2Message: string Message for isLockedAlt2. isLockedAlt2Message: -Needs to be quiet
1.13.3 addResources: price(s) Adds these resources to self when placing the building or producing the unit. addResources: ammo=5, setFlag=1
1.13.3 price: price(s) Overrides builded units/buildings price. Defaults to target unit prices. price: credits=1000, ammo=5
1.13.3 isGuiBlinking: LogicBoolean Generates a blinking effect in UI if true. isGuiBlinking: true

Section [graphics]
Code Value Type Description Example
Necessary code
file (image) image:
#==== Common Keys
image: file (image) File path to png image.
image_back: file (image) An optional image drawn behind other units. Useful for factories that units exit
1.14 image_shield file (image) Image to show as a custom shield
image_wreak: file (image) Image to use when unit dies. Can be NONE to leave no wreak
image_offsetX: int Use this to adjust the graphics of a unit if it is too far off one side
image_offsetY: int Use this to adjust the graphics of a unit if it is too far off one side
1.13.3 isVisible logic If false will hide the unit.
1.14 isVisibleToEnemies bool Only visible to player and allies when false. Recommend with showOnMinimapToEnemies. Useful for stealth units.
1.13 teamColoringMode How pixels are used for team coloring, options: pureGreen (default), hueAdd, hueShift, disabled
teamColorsUseHue: bool False: Green pixels on unit gets converted to team color. True: Whole unit is tinted the team colour. Defaults to false
scaleImagesTo: float Resize image to fit this value in pixels. Effects leg, and shadow images as well.
imageScale: float Resize image. Defaults to 1. Effects leg, and shadow images as well.
drawLayer: string Land units normally default to ground or ground2 if transport. wreaks, underwater, bottom, ground, ground2, experimentals, air, top
1.13 whenBeingBuiltMakeTransparentTill float How long the transparent effect is applied to incomplete units, set to 0 to disable completely Default: 1
icon_zoomed_out file (image)
icon_zoomed_out_neverShow bool
#==== Turrets (images can also be set on each turret)
image_turret: file (image) Default image for all turrets, can also be set per turret
teamColorsOnTurret bool Defaults false. Apply team colours on turret as well. Also effects pre-turret images
scaleTurretImagesTo: float Will cause crash if image_turret is not specified, even if image is set per turret
lock_body_rotation_with_main_turret: bool Locks body image locked to first turret's direction
1.13 lock_leg_rotation_with_main_turret bool Locks legs and arms to first turret's direction
#==== Shadow
image_shadow: file (image) Image file, NONE, or AUTO. (AUTO will use image and make it transparent black only.)
shadowOffsetX: float
shadowOffsetY: float
1.13.3 image_shadow_frames bool If shadow image should use frame animation of main image
lock_shadow_rotation_with_main_turret: bool Locks body image shadow locked to first turret's direction
#==== Effects and animation
total_frames int Defaults to 1. Animations require this.
frame_width: int Calculated for you if total frames is set, but can be overridden
frame_height: int Defaults to image height
splastEffect: bool True to create a water wave effect when over water. Default false
dustEffect: bool True to create a dust effect when over land. Default false
splastEffectReverse: bool True to also create effect when unit is reversing
dustEffectReverse: bool True to also create effect when unit is reversing
1.13 movementEffect effect Custom movement effect, can be anything eg: movementEffect: smoke, CUSTOM:fastDust*2, CUSTOM:pop*5
1.13 movementEffectReverse effect
1.13 movementEffectRate float
1.13 movementEffectReverseFlipEffects bool Create effect as if unit has rotated 180 when reversing
repairEffect effect ref Custom movement effect, can be anything. Replaces default effect from builders
repairEffectAtTarget effect
repairEffectRate int Defaults to 5
1.13.3 reclaimEffect effect
1.13.3 reclaimEffectAtTarget effect
1.13.3 reclaimEffectRate int
rotate_with_direction: bool Defaults to true. Makes unit body image locked to 0 degrees when false. Often used with animation_direction_*
animation_direction_units: float 45 for 8 directions, 90 for 4 direction animation. Used with rotate_with_direction:false
animation_direction_strideX: int Animation frames to offset on direction change.
animation_direction_strideY: int Animation frames to offset on direction change. Used with frame_height.
animation_direction_starting: float Direction for first frame
1.13.3 disableLowHpFire bool
1.13.3 disableLowHpSmoke
1.13.3 showTransportBar: bool
1.13.3 showHealthBar bool
1.13.3 showEnergyBar bool
1.14 showShieldBar bool
1.14 showQueueBar bool
Deprecated Keys (can be used but there are better, more adaptable ways)
depr. 1.13 animation_TYPE_start: int TYPE can be set to: attack, moving, idle. Use [animation] section instead for more control animation_moving_start: 0
depr. 1.13 animation_TYPE_end: int End frame, must be larger then start animation_moving_end: 3
depr. 1.13 animation_TYPE_scale_start: float Scale unit image. Defaults to 1. Useful for bio units or breathing effects.
depr. 1.13 animation_TYPE_scale_end: float Scale unit image. Defaults to 1. Useful for bio units or breathing effects.
depr. 1.13 animation_TYPE_speed: float Delay for each frame of animation. Larger values cause slower animation
depr. 1.13 animation_TYPE_pingPong: bool Play animation in reverse before repeating. Useful with scale_start/scale_end

Section [attack] The attack section is for global attack characteristics, per-turret overrides these
Code Value Type Description Example
canAttack: bool If set to false, can not attack any unit. Regards of other canAttack options below.
canAttackFlyingUnits: LogicBoolean can also be narrowed per turret. Note: not required if canAttack is false.
canAttackLandUnits: LogicBoolean can also be narrowed per turret
canAttackUnderwaterUnits: LogicBoolean can also be narrowed per turret
maxAttackRange: float (multiplied by globalScale)
canAttackNotTouchingWaterUnits: LogicBoolean Default true. If false unit can only attack units in contact with the water. Used for units with torpedos. (can also be set per turret)
1.13.3 canOnlyAttackUnitsWithTags tags Will only attack units that has the specified tags.
1.13.3 canOnlyAttackUnitsWithoutTags tags Can only attack units without the specified tags.
1.13 turretMultiTargeting bool Allow each turrets to fire at a different target at the same time. Very useful if [turret]limitingAngle is used
isMelee: bool Used with a low attack range (like maxAttackRange: 9) makes src and target radius get added to range, and effects AI.
1.13.3 meleeEngangementDistance int Makes unit move to attack nearby units. Defaults to 250 for melee, and 0 for non melee (Works even if non-melee, but might be unexpected to players)
turretRotateWithBody bool Are all turrets rotated when body rotates. Defaults to true
attackMovement: string normal/bomber. bomber attack movement will retreat when energy runs out
dieOnAttack: bool Will die when it attacks.
isFixedFiring: bool Must aim body at target to shoot. Will often make the unit need to stop before it can aim and shoot.
aimOffsetSpread: float Offset each shot multiplied by target radius. Defaults to 0.6 aimOffsetSpread:0 will make unit always attack center
1.13 stopTargetingAfterFiring bool Unit stops targeting after firing a shot. Rarely used or needed.
disablePassiveTargeting: bool Unit only attacks manually ordered target. Rarely used or needed.
1.13.3 showRangeUIGuide bool Will it show the range indicator. Useful for showing ranges in radar and related structures.
1.15 shootDelayMultiplier float Defaults to 1. Can be dynamically changed with setUnitStats
1.15 shootDamageMultiplier float Defaults to 1. Can be dynamically changed with setUnitStats
Deprecated Keys - can be used but better to set these per turret
depr. 1.13 turretSize: float (multiplied by globalScale)
depr. 1.13 turretTurnSpeed: float
depr. 1.13 shootDelay: float Global delay, can also use delay on each turret

Section [turret_NAME] Turrets fire projectiles with different traits


Code Value Type Description Example
Necessary Code
float x:
float y:
Positioning/Stats

x: float
y: float
copyFrom: turret ref Copy all values from another turret as defaut values for this turret copyFrom: 1
projectile projectile ref Projectile fired from this turret. eg: projectile: torpedo
altProjectile projectile ref Alternative projectile fired from this turret when altProjectileCondition is true
altProjectileCondition LogicBoolean Used with altProjectile
1.13 barrelX float Defaults to 0. Controls horizontal position for projectile spawn.
1.13 barrelY float Defaults to size. Note: size and barrelY have the same meaning
1.13.3 barrelHeight float Height of barrel in 3d. Effect projectile and shoot flame starting height
size: float Controls the distance between the center of the turret and the point from where projectiles spawn. size: 5
turnSpeed float Max turn speed of the turret
turnSpeedAcceleration float Defaults to disabled, and full turn speed is used.
turnSpeedDeceleration float Defaults to turnSpeedAcceleration. Setting this higher than turn acceleration might allow faster targets to be hit
idleDir float Defaults to 0
1.13 idleDirReversing float Defaults to idleDir+180 unless attached to another turret (as attached turret will often be rotating when reversing)
shouldResetTurret: bool Defaults true. False to disable the reseting turret angle when idle
1.14 idleSweepAngle int Disabled by default. Controls how far the turret will "look" left and right
1.14 idleSweepDelay float Controls the delay between idleSweep movements
1.14 idleSweepSpeed float Controls the speed with which the turret sweeps when idle
1.14 idleSweepCondition LogicBoolean Disable idle sweep if false
1.14 idleSweepAddRandomDelay float Default 1-20 depends on idleSweepDelay, used to stop sweep syncing up with other units
1.14 idleSweepAddRandomAngle int Default 0
attachedTo: turret ref Id of another turret to attach to, will be positioned relative to it, and rotate with it.
slave: bool Locks this turret's direction and shot cooldown to attached turret. Often used with warmup for multiple barrel guns
isMainNanoTurret: bool Defaults to false. Turret to use for creating buildings, etc. should only be true on one turret, and should have canShoot set to false
energyUsage: float Required energy to fire weapon. Same as resourceUsage: energy=X
resourceUsage price can be in credits/energy/hp/shield/ammo. Stops firing if not met resourceUsage: credits=5, energy=5, hp=100, shield=5, ammo=1
Timing
delay: float Override global shootDelay for this turret
linkDelayWithTurret turret ref When this other turret fires the cooldown delay on this turret will be reset/removed
warmup: float Delay before firing a shot.
warmupCallDownRate float Rate to reduce warmup when turret is not ready to fire at any targets
warmupNoReset bool Defaults to false. When true warmup is not reset after firing a shot and turret doesn't wait for warnup. Used with warmupCallDownRate and warmupShootDelayTransfer.
warmupShootDelayTransfer float Defaults to 0, amount to reduces the next shot delay depending on warmup. When used with warmupNoReset, can make a each shot faster.
On Shoot
1.13.3 onShoot_freezeBodyMovementFor Freezes body movement while shooting.
1.14 barrelOffsetX_onOddShots: float 0 by default. Sets a barrelX offset only during odd numbered shots, useful for twin-barreled units. Use with barrelX
Targeting control
1.14 aimOffsetSpread
canShoot: bool Defaults to true
canAttackFlyingUnits: LogicBoolean Narrows targeting for this turret, note targeting for the whole unit in [attack] is applied first. (so you can only use this to target less not more)
canAttackLandUnits: LogicBoolean
canAttackUnderwaterUnits: LogicBoolean
canAttackNotTouchingWaterUnits: LogicBoolean Default true. If false unit can only attack units in contact with the water. Used for units with torpedos.
1.13.3 canOnlyAttackUnitsWithTags tags
1.13.3 canOnlyAttackUnitsWithoutTags tags
canAttackCondition: LogicBoolean Normally, used to optionally disable a turret based on a LogicBoolean. Eg: this unit's height canAttackCondition: if not self.flying
1.14 canAttackMaxAngle float Max angle to target for turret to be allowed for fire. Defaults to 5, don't set lower. Can be set to 181 for turrets that don't need to turn to fire missiles.
1.13 clearTurretTargetAfterFiring bool Clears the turrets sub-target when using multi-targeting
limitingRange: float Make this turret have less range than the maxAttackRange. Do not apply this to all turrets change maxAttackRange instead.
1.13 limitingAngle Linked with idleDir. Turret will only be able to fire at units +/- this angle.
1.13 limitingMinRange Sets minimum range for turret. limitingMinRange: 200
1.13 interceptProjectiles_withTags Currently used with anti-nuke units.
interceptProjectiles_andTargetingGroundUnderDistance
interceptProjectiles_andUnderDistance Defaults to 2000, distance inflight before firing
interceptProjectiles_andOverHeight Defaults to 0
1.14 interceptProjectile_removeTargetLifeOnly bool Defaults to false. When false projectiles are just removed. Could be true to make hit projectiles explode or split when hit
laserDefenceEnergyUse: float Set to enable a projectile laser defence from this turret. Should also set the energyMax in core.
Graphics and effects
invisible: LogicBoolean Don't render this turret, but still can shoot, etc.
image: file (image) Use custom image. Overrides unit's main turret image
image_applyTeamColors bool
image_drawOffsetX float
image_drawOffsetY float
chargeEffectImage:
file (image) Used with warmup. Shows a scaling effect image on turret barrel when charging.
warmupStartEffect effect ref
shoot_sound: string Can be linked to an .ogg or .wav file, or one of the default game sounds (list at bottom of reference) shoot_sound: tank_firing | shoot_sound: missile.wav | shoot_sound: ROOT:audio/shoot.ogg
shoot_sound_vol: float
shoot_flame: effects Current types are: small, large, smoke, shockwave, or CUSTOM: effectSectionName eg: shoot_flame: smoke, CUSTOM:lightFade, CUSTOM:pop*5
shoot_light color
idleSpin: float Spin rate when idle, used on missile turrets
1.13 onShoot_playAnimation animation ref Play a custom animation from an [animation] section after firing this turret
1.14 onShoot_triggerActions action refs Trigger these actions each time this turret fires
1.13.3 onShoot_freezeBodyMovementFor time
1.15 unloadUpToXUnitsAndGiveAttackOrder int Unloads X units at turret barrel locations and gives them the attack order of turret target
recoilOffset float Push turret forward or back after firing for a recoil effect. Value in pixels.
recoilOutTime float Time to get to offset position after firing
recoilReturnTime float Time to return to default position
1.13.3 showRangeUIGuide bool

Section [projectile_NAME] Projectiles are necessary to inflict damage on an enemy, but can also be used for other purposes
Code Value Type Description Example
Necessary Code
int directDamage: or areaDamage:
life:
Core
life: How long till this projectile gets removed if it hasn't hit a target, 300 might be a good starting point, change depending on speed and range
deflectionPower: float Defaults to 1. Energy needed for laser defence to deflect. -1 to disable deflection (only disable for special weapons like flames)
1.13 explodeOnEndOfLife bool Default to false. True to explode at end of life with all side effects and area damage instead of disappearing. Good for making area-denial weapons.
autoTargetingOnDeadTarget: bool Retarget to nearby unit if target dies while in transit
1.14 autoTargetingOnDeadTargetRange int The range which it will select a new target if old target has died
1.14 autoTargetingOnDeadTargetLead float The lead it will try to have on the new target
1.13 unloadUpToXUnitsFromSource int Unload X units from source unit, to projectile explode location
1.13 teleportSource bool Move unit that shot this projectile to projectile explode location
1.13 spawnUnit unit types Spawn new units of this type at projectile explode location eg: spawnUnit: heavyTank, tank*5, hoverTank(offsetX=10)
1.14 spawnProjectilesOnEndOfLife projectile ref Spawns new projectiles on end of life, useful for secondary projectiles spawnProjectilesOnEndOfLife: torpedo_split(offsetDir=90), torpedo_split(offsetDir=-90)

1.14 spawnProjectilesOnExplode projectile ref Projectiles to spawns when this projectile hits it's target
1.14 spawnProjectilesOnCreate Spawns projectiles on creation of this projectile, useful for making true shotgun-like projectile spread
1.13.3 convertHitToSourceTeam bool Convert units hit to the team that fired this projectile. Useful to make capturing systems
1.13 tags tags Useful for projectile interceptions (e.g. Nuke and Anti-Nuke Interaction)
flameWeapon: bool Generates small flames on hit (only cosmetic)
Damage
directDamage: int Damage to target unit on hit. Does not work with targetGround:true as it won't have a clear unit to target
areaDamage: int Damages on arrival of target with an area effect, use areaRadius to adjust size of damage. targetGround needs this to damage
1.13 areaRadius: float How wide areaDamage effects. Note this drops off (unless areaDamageNoFalloff is used)
areaDamageNoFalloff bool Removes the falloff from areaDamage
areaRadiusFromEdge bool Applies damage from edge of units instead of center. Mostly effects large units.
1.13 areaExpandTime float Applies area damage as an expanding blast wave rather than instantly. Useful for nuke projectiles
1.13 areaHitAirAndLandAtSameTime bool Defaults to false
areaHitUnderwaterAlways bool Defaults to false
areaIgnoreUnitsCloserThan int Units closer than this range aren't effected. Rarely needed. Not recommended for normal projectiles.
1.13 buildingDamageMultiplier float Defaults to 1
1.13 shieldDamageMultiplier float Defaults to 1. eg: 0 to do no damage to shields and 2 to do double damage
1.13 shieldDefectionMultiplier float Defaults to 1. The amount of shield to bypass eg: 0 to ignore shields and directly damage hull
1.14 hullDamageMultiplier float Defaults to 1. Can be used to create EMP weapons that affect shields only eg: 0 to ignore hull and only damage shields
1.15 ignoreParentShootDamageMultiplier bool
armourIgnoreAmount int Amount of armour to ignore on target and do damage as if this armour was not there
1.13 friendlyFire bool/string Lets area effect projectiles damage own team units (can't damage allies). Useful for nuke-like weapons friendlyFire: false / friendlyFire: true / friendlyFire: only-ignoreEnemy
1.13.3 mutatorX_ifUnitWithTags tags Applies mutators to this projectile if target has corresponding tags eg: mutator1_ifUnitWithTags: infantry
1.13.3 mutatorX_ifUnitWithoutTags tags Same as ifUnitWithTags, but applies if target doesn't have the set tags eg: mutator1_ifUnitWithoutTags: strongArmour
1.13.3 mutatorX_directDamageMultiplier float Changes directDamage. Defaults to 1. Be careful not to confuse players using this as the effect may not be clear. Use amour instead when possible
1.13.3 mutatorX_areaDamageMultiplier float Same as directDamageMultiplier but for areaDamage. Defaults to 1.
1.13.3 mutatorX_changedExplodeEffect effect Change explode effect if this mutator is active. Eg make a bounce off amour effect. Helps to make the damage change more clear to players (Doesn't work with targetGround.)
1.14 mutatorX_addResourcesDirectHit resource Add resource to all hit units. Warning: Be careful not be break units from other mods by adding random resources or energy to them that they don't expect.
1.14 mutatorX_addResourcesAreaHit resource
Movement
targetGround bool Target ground, and don't home in on target. Note: only areaDamage is applied if targeting ground.
1.14 targetGround_includeTargetHeight bool Default false. for area affect AA weapons
1.14 targetGroundHeightOffset float Default 0. for shooting over or under a target. Useful for projectiles that split and rain down.
speed: float Projectile default travel speed
targetSpeed: float Accelerate to this speed
1.13 targetSpeedAcceleration float Controls the speed rampup for targetSpeed
ballistic: bool Makes projectiles fly up into the air and come down, instead of going in a straight line
ballistic_delaymove_height: float
ballistic_height: float
targetGroundSpread: float Randomly makes the shot inaccurate by this amount. Also used by weapons like the flamethrower
speedSpread: float Randomly change the starting projectile speed by this amount
instant bool Hit target instantly
instantReuseLast: bool Recycles last projectile fired, only one projectile ever exists. Can turn lasers into beam weapons by using lower rate of fire and setting this to true
1.14 instantReuseLast_alsoChangeTurretAim bool Make turret's aim include last projectile's spread and sweep offsets, useful for beam weapons
1.14 instantReuseLast_keepAreaDamageList bool Default false. Keeping the list was the normal behaviour in 1.13 making area damage not apply a second time but this is not useful. Use this only if you want the old behaviour.
1.13 disableLeadTargeting bool Disable the lead targeting calculations when aiming at a moving target. Defaults false.
1.13 leadTargetingSpeedCalculation float The expected speed of this projectile for targetGround lead target calculation. Defaults to 'targetSpeed' if set otherwise 'speed'.
1.13.3 initialUnguidedSpeedHeight Sets vertical speed for projectiles with targetGround. Use gravity to make smooth arching projectiles
1.13.3 gravity: Controls the pull for projectiles that target ground. Use together with initialUnguidedSpeedHeight
1.14 turnSpeed float Limits the turn speed of a projectile, making them inaccurate even with directDamage
1.14 wobbleAmplitude float How wide the projectile will wobble
1.14 wobbleFrequency float How often the projectile will wobble
1.14 pushForce float Push (or pull with a negative value) the units that get hit. Divided by target mass
1.14 pushVelocity float Push (or pull with a negative value) the units that get hit. Ignores target mass
1.14 moveWithParent bool Move projectile as parent moves. Useful for beam effects that need to stick to source turret.
1.14 sweepOffset float Useful for beam effects.
1.14 sweepOffsetFromTargetRadius float Add to sweep offset by factor of target's radius. 0.4 would be 40% sweepOffsetFromTargetRadius: 0.4
1.14 sweepSpeed float Useful for beam effects.
1.14 retargetingInFlight bool Can retarget a new target mid-flight, perfect for flak-style weapons and projectiles that collide
1.14 retargetingInFlightSearchDelay float/time How long between searching for new targets. Default 5
1.14 retargetingInFlightSearchRange int Range which targets are reselected. Default 120
1.14 retargetingInFlightSearchLead float The lead of the projectile to try to hit the target. Default 15
1.14 retargetingInFlightSearchOnlyTags tag ref Only retarget units with these tags
Graphics and effects
color color Recolors this projectile using a hex value. color: #bebe50
1.13.3 invisible bool
image: file (image) Use custom image. Overrides drawType and frame
drawType int Built-in image to use. 0:projectiles.png 1:projectiles_large.png 2:projectiles2.png drawType:1
drawSize: float Scale image. Defaults to 1
frame int Built-in image frame to use, starts at zero.
hitSound: bool Default true
1.13 explodeEffect effect ref list explodeEffect: smallExplosion, CUSTOM:myExplodeEffect
1.13 explodeEffectOnShield effect ref list Use this effect if shield is active on target
1.13 teamColorRatio float Mix 0-1 of team colour into color field
1.14 teamColorRatio_sourceRatio float default is (1-teamColorRatio). Keep more of color when mixing. Note this might saturate colors.
1.13 drawUnderUnits bool
1.13 effectOnCreate effect ref list
1.13 shouldRevealFog bool Reveal fog to player on explode
1.13 alwaysVisibleInFog bool
1.13 nukeWeapon bool Shows on mini-map when fired. Some other side effects as well.
trailEffect bool/effect true for built-in defaults, but can also point to any custom effects
1.13 trailEffectRate float Defaults to 3
lightCastOnGround bool
lightSize: float
lightColor color lightColor: #ffe92b
largeHitEffect: bool Creates a large explosion and accompanying sound on hit (only cosmetic)
lightingEffect: bool Draw as lighting works best with instant:true
laserEffect: bool Draw as laser works best with instant:true
1.14 beamImage file (image) Image to use for laserEffect
1.14 beamImageOffsetRate float
1.14 beamImageStart int Frame start of beam animationeffect
1.14 beamImageStartRotated bool Defaults false. True to rotate with turret angle
1.14 beamImageEnd int Frame end of beam animation effect
1.14 beamImageEndRotated bool Defaults false

Section [movement] These are traits the unit has as far as movement goes, such as rotation and acceleration speed
Code Value Type Description Example
movementType: string Defines what kind of terrain the unit will be able to move, along with other properties of unit types. movementType: LAND
slowDeathFall: bool Used with large aircraft. Makes the unit fall slowly while maintaining its speed at the time of death. slowDeathFall: true
moveSpeed: float Maximum movement speed of the unit. moveSpeed: 1.2
moveAccelerationSpeed: float Defines how fast units accelerate to max speed. moveAccelerationSpeed: 0.07
moveDecelerationSpeed: float Don't make this too low or units will have trouble stopping at waypoints moveDecelerationSpeed: 0.17
reverseSpeedPercentage: float 0.6 default. Over 0.4 will reverse for short distances (at 40% speed). If set to 1 will drive in reverse same as forwards.
reverseSpeedPercentage:
Useful if slow turning
0
landOnGround: bool Should flying unit land when idle. landOnGround: false
targetHeight: float Defaults to 0 but if AIR movementType default is 35 targetHeight: 25
targetHeightDrift: float Smooth animated height change. Defaults to 0 but if AIR movementType default is 1.5 targetHeightDrift: 1
startingHeightOffset: float
1.14 heightChangeRate: float Rate at which the unit changes height, either from converting or drifting heightChangeRate: 3
1.14 fallingAcceleration: float The acceleration in which a unit drops
1.14 fallingAccelerationDead: float fallingAcceleration but when destroyed
maxTurnSpeed: float
turnAcceleration: float
moveSlidingMode: bool Makes the unit slide when moveDecelerationSpeed is lower, making them drift and feel natural
moveIgnoringBody: bool Allows the unit to move without fully turning in the direction its moving, useful for ships and air units
moveSlidingDir: int
joinsGroupFormations: bool Defaults to true. Changing not recommended

Section [ai] This determines what the AI will use the unit for, does not effect player
Code Value Type Description Example
useAsBuilder: bool Set to true if unit can build or repair buildings. Defaults to [core]isBuilder.
useAsTransport bool Defaults to true if unit can transport units
useAsHarvester bool Defaults to true if unit can reclaim resources
disableUse: bool Disallow AI building this unit or building
ai_upgradePriority float Defaults to 0.06. Set between 0-1, higher means AI is more likely to upgrade this unit before others
Buildings only
buildPriority: float 0-1. AI uses 0.8 for first land factory, 0.48 for air factory, 0.47 for first turret.
noneInBaseExtraPriority: float Adds to buildPriority, if this unit doesn't exist in the AIs base
noneGlobalExtraPriority: float Adds to buildPriority, if this unit doesn't exist in the any where on the map
recommendedInEachBaseNum float Defaults to 0
recommendedInEachBasePriorityIfUnmet float Defaults to 0.5. Overrides buildPriority
upgradedFrom: string Create link to another unit to preserve max counts for upgraded and non-upgraded types in same base.
maxGlobal: int
maxEachBase: int
1.4 notPassivelyTargetedByOtherUnits bool Useful for walls, etc
1.4 lowPriorityTargetForOtherUnits Useful for units that cannot attack back. Eg walls
1.13.3 whenUsingAsHarvester_recommendedInEachBase
1.13.3 whenUsingAsHarvester_recommendedGlobal
1.13.3 whenUsingAsHarvester_includeOtherHarvesterCounts
1.13.3 onlyUseAsHarvester_ifBaseHasUnitTagged

Section [leg_#] / [arm_#] Legs can move around when unit moves, Arms need an animation or convert
Code Value Type Description Example
x: float Sets position of the foot on the X axis.
y: float Sets position of the foot on the Y axis.
copyFrom: int Copy from another leg. Useful to only need to set leg values once copyFrom: 1
attach_x: float Sets the leg's attach point on the X axis.
attach_y: float Sets the leg's attach point on the Y axis.
rotateSpeed: float
endDirOffset Target foot/end rotation relative to body
lockMovement bool Lock to unit body. Useful if walking unit converted to a flying unit.
heightSpeed: float
moveSpeed
moveWarmUp
holdDisMin: float Defaults to 7. Reposition leg at this distance if neighbor legs are not already repositioning.
holdDisMax: float Defaults to 16. Force reposition of leg at this distance.
holdDisMin_maxMovingLegs
hold_moveOnlyIfFurthest
holdDisMin_checkNeighbours
hardLimit: float Defaults to 50. Force leg to never go this far. Better to not be reached.
estimatingPositionMultiplier float defaults to 1. Predicts were unit will be for leg placement based on unit speed.
Graphics and effects
hidden: logic boolean
1.13 image_end file (image)
1.13 image_end_shadow file (image)
1.13 image_end_teamColors
1.13 image_foot file (image) same as image_end
image_foot_shadow file (image)
1.13 image_middle file (image)
image_leg file (image) same as image_middle
1.13 draw_foot_on_top bool
drawOverBody bool Draw over body
drawUnderAllUnits bool Draw over all units
drawDirOffset float
dust_effect: bool Spawns dust particles on each step.
spinRate float Makes arm/leg spin, like idleSpin for turrets
favourOppositeSideNeighbours calculate neighbours with X 10 times closer than Y
drawLegWhenZoomedOut For performance, defaults changes based on unit size
drawFootWhenZoomedOut For performance, defaults changes based on unit size
resetAngle: float Unused

Section [attachment_NAME] Attachments are slots where other units can be positioned or carried
Code Value Type Description Example
1.13.3 x float
1.13.3 y float
1.13.3 height bool
1.13.3 idleDir int
1.14 idleDirReversing int
1.13.3 isVisible bool
1.13.3 onCreateSpawnUnitOf unit ref
1.13.3 isUnselectable bool Defaults to false
canAttack bool Defaults to true. Set to false to stop this attachment attacking.
1.13.3 canBeAttackedAndDamaged bool
1.13.3 deattachIfWantingToMove bool If the unit is ordered to move, it will detach. This includes waypoints from actions.
1.13.3 lockLegMovement bool
1.13.3 keepAliveWhenParentDies bool Defaults to false
1.13.3 setDrawLayerOnTop bool
1.13.3 setDrawLayerOnBottom bool
1.13.3 addTransportedUnits bool
1.13.3 lockRotation bool
1.13.3 rotateWithParent bool
1.13.3 resetRotationWhenNotAttacking bool Similar to shouldResetTurret:for turrets.
1.13.3 prioritizeParentsMainTarget bool It will priotize targeting the main target. Defaults to true.
1.13.3 alwaysAllowedToAttackParentsMainTarget bool Will always attack the parents main target.
onParentTeamChangeKeepCurrentTeam bool Defaults false. If true attached units are not converted when parent changes team. Eg from [projectile]convertHitToSourceTeam
1.14 smoothlyBlendPositionWhenExistingUnitAdded bool
1.14 keepWaypointsNeedingMovement bool Defaults to false. When false any queued waypoints needing movement to complete get removed.
1.14 showAllActionsFrom LogicBoolean Show all actions of the units attached in the parent unit list when selected
1.14 createIncompleteIfParentIs: bool If parent hasn't been built, create attachment with the same built value. Links built values till attachment is complete. Useful for buildings built with nano.
1.14 redirectDamageToParent: bool Redirects damage done to this attachment to the parent instead of damaging itself directly
1.14 redirectDamageToParent_shieldOnly: bool

Section [effect_NAME] Effects are purely visual, but can be important for a mod
Code Value Type Description Example
1.13 life float Defaults 200. Time till effect is removed. Set low as possible to reduce effect overhead. life: 70
1.14 lifeRandom float Random offset life by +/- this value lifeRandom: 12
1.13 alsoEmitEffects effect ref Create more effects when created, useful for meta-effects. Note: other 'alsoEmitEffects' on created effects are ignored.
1.14 alsoEmitEffectsOnDeath effect ref Create these effects when life runs out.
ifSpawnFailsEmitEffects effect ref If 'spawnChance' for this effects fails then emit these effects instead
1.13 alsoPlaySound sound ref
1.13 createWhenOffscreen bool Defaults false.
1.13 createWhenZoomedOut bool Defaults true
1.13 createWhenOverLiquid bool Defaults true
1.13 createWhenOverLand bool Defaults true
1.13 spawnChance float Default 1. If less than 1 effect only has a random chance of being created
1.13 showInFog bool Default false
1.13 delayedStartTimer float Hide for x time before showing and updating effect.
1.13 liveAfterAttachedDies bool Defaults false when attachedToUnit is being used
1.13 priority string Defaults to high. verylow/low/high/veryhigh/critical. Takes effect when too many effects are being shown at once.
Movement
1.13 attachedToUnit bool Attach to unit or projectile that created this effect. Will move with this object.
1.13 alwayStartDirAtZero bool Ignore source/attached unit dir
1.13 atmospheric bool Apply drag to slow this effect down and add small wind effects
1.13 physics bool Fall to ground and bounces. Needs height to take effect.
1.13 physicsGravity float Defaults to 1. height speed acceleration when physics: true
1.13 xOffsetRelative float Offset starting effect position. Relative to direction of attached turret, projectile, unit
1.13 yOffsetRelative float Offset starting effect position. Relative to direction of attached turret, projectile, unit
1.13 xOffsetRelativeRandom float Random offset by +/- this value
1.13 yOffsetRelativeRandom float Random offset by +/- this value
1.13 xOffsetAbsolute float Offset starting effect by position ignoring direction of attached turret, projectile, unit
1.13 yOffsetAbsolute float Offset starting effect by position ignoring direction of attached turret, projectile, unit
1.13 xOffsetAbsoluteRandom float Random offset by +/- this value
1.13 yOffsetAbsoluteRandom float Random offset by +/- this value
1.13 xSpeedRelative float
1.13 ySpeedRelative float
1.13 xSpeedRelativeRandom float Randomly change by -value to value
1.13 ySpeedRelativeRandom float Randomly change by -value to value
1.13 xSpeedAbsolute float
1.13 ySpeedAbsolute float
1.13 xSpeedAbsoluteRandom float Randomly change by -value to value
1.13 ySpeedAbsoluteRandom float Randomly change by -value to value
1.13 hOffset float height offset from source
1.13 hOffsetRandom float Randomly change by -value to value
1.13 hSpeed float height speed
1.13 hSpeedRandom float Randomly change by -value to value
1.13 dirOffset float rotation
1.13 dirOffsetRandom float Randomly change by -value to value
1.13 dirSpeed float rotation speed
1.13 dirSpeedRandom float Randomly change by -value to value
Graphics
1.13 frameIndex int frame of to use
frameIndexRandom
1.13 stripIndex int/string A built-in image set to use. Cannot be used with custom image effects/explode_big/light_50/flame/effects/effects2/projectiles/projectiles2/explode_bits
1.13 Image image Custom image file to use. Cannot be used with stripIndex.
imageShadow image Custom image file to use for shadows
1.13 scaleTo float Defaults to 1
1.13 scaleFrom float Defaults to 1
1.13 color color Defaults #FFFFFFFF
teamColorRatio 0-1
1.13 drawUnderUnits bool
1.13 fadeInTime float Fade alpha from 0% to 100% for this time at start
1.13 fadeOut bool Fade alpha from 100% to 0% based on life. Set alpha is higher than 1 to delay fade
alpha Capped between 0-1. Can be set higher than 1 to delay fadeOut effects
shadow True to draw a shadow. Forced true if imageShadow is used
Animation
1.13 total_frames int Total frames of 'image', used with animation or frameIndex. Only needed with custom images
1.13 animateFrameStart int
1.13 animateFrameEnd int
1.13 animateFramePingPong int
1.13 animateFrameSpeed time
1.13 animateFrameSpeedRandom time
1.14 animateFrameLooping bool Defaults false. When false effect is removed when animation ends

Section [animation_NAME] Use this to make intricate animations based on different circumstances
Code Value Type Description Example
1.13 onActions : Unknown move, attack, idle, underConstruction, underConstructionWithLinkedBuiltTime, queuedUnits
1.13 onActionsQueuedUnitPlayAt : float For onAction: queuedUnits. Amount queue needs to reach before starting, set between 0-1
1.13 blendIn : time Blend with last animation for this time
1.13 blendOut : time Blend with next animation for this time
1.13 pingPong bool Play animation in reverse after it ends
1.13 KeyframeTimeScale : float float Scales all keyframe times, useful to make an animation faster/slower without changing everything
Keyframes - create as many as needed
1.13 arm#_[time] Adds a keyframe at time. Use multiple times to create animation. eg: arm1_5s: {x: 5, dir: 90 }
leg#_[time] Adds a keyframe at time. Use multiple times to create animation.
body_[time] Adds a keyframe at time for body. Only frame and scale allowed on body eg: body_4s: {frame: 4, scale: 0.5}
1.14 effect_[time] Spawn effects while playing an animation eg: effect_2s: {name:CUSTOM|myExplode, x: 0,y: 5}

direction_units float Overrides [graphics]animation_direction_units while this animation is playing


direction_strideX: int Overrides [graphics]animation_direction_strideX
direction_strideY: int Overrides [graphics]animation_direction_strideY
direction_starting: float Overrides [graphics]animation_direction_starting
Deprecated Keys (can be used but there are better ways)
1.13 start : int Start image frame. deprecated
1.13 end : int End image frame. deprecated
1.13 scale_start : float Start scale. Deprecated, use body keyframes instead.
1.13 scale_end : float End scale. Deprecated, use body keyframes instead.
1.13 speed : float Speed, smaller is faster. Only effects start, end, scale_start, scale_end

Section [action_NAME] / [hiddenAction_NAME] Actions that can dynamically cause changes to units and resources
Code Value Type Description Example
text string
textPostFix: string Text shown as suffix, useful with textAddUnitName to create text UI text: [ textPostFix: ] textAddUnitName: unitRef self.attachment(slot="${slotId}")
text_{LANG} string
description string A display text when you select your unit's action, used to explain it's purpose.
description_{LANG} string
displayType list none, rally, upgrade, queueUnit, building, action, infoOnly, infoOnlyNoBox
displayRemainingStockpile bool Queue is shown as number of times action can be triggered based on price
pos float Order action appears in UI
iconImage file (image)
1.14 iconExtraImage file (image) Drawn over top of icon image. Useful for upgrade icons, etc
1.14 iconExtraColor colour Defaults to #64FFFFFF
1.14 iconExtraIsVisible LogicBoolean
1.13.3 unitShownInUI unitRef/unitType Display this unit. (as if this action built this unit) eg: unitShownInUI: unitRef self.transporting(slot=0) or unitShownInUI: heavyTank
guiBuildUnit
1.14 setBuilt float Designates how built the unit is from a percentage of 0-100% with a number between 0 and 1.
Unit Reference - Dynamically parts from already existing units, useful w/ isAlsoViewableByEnemies self, self.parent(), self.transporting(slot=x), self.attachment(slot=X)
1.14 textAddUnitName unitRef/unitType Add this unit's name to this action's text eg: textAddUnitName: unitRef self.attachment(slot="1")
1.14 descriptionAddFromUnit unitRef/unitType Add this unit's description to this action's description
1.14 descriptionAddUnitStats: unitRef/unitType Add this unit's stats (eg HP, energy, resources) to this action's description descriptionAddUnitStats: unitRef self.parent()
1.14 unitShownInUIWithHpBar bool default true, Only used when unitShownInUI is a unitRef
1.14 unitShownInUIWithProgressBar bool default true, Only used when unitShownInUI is a unitRef. Replaces HP bar if active
Requirements for player/AI to use in UI
1.14 alwaysSinglePress bool Defaults false. When true no confirmation needed on mobile, when used with canPlayerCancel:false and allowMultipleInQueue:false will also hide the queue interface.
price resources The price of your action for the unit. Disables action if not available. Defaults to credits if unlabelled price: credits=5, energy=5, hp=100, shield=5, ammo=1
isActive LogicBoolean Defaults true. If false then action is disabled and shown in red in UI.
isVisible LogicBoolean Defaults true. If false action is hidden from UI and disabled.
isLocked LogicBoolean Defaults false. If true action is disabled, and a lock icon is shown. Mostly used for no nuke game modes
isLockedMessage LocaleString
1.13.3 isLockedAlt LogicBoolean Another reason for this to be locked. Can just use OR on isLocked, but this allows a different message to be shown
1.13.3 isLockedAltMessage LocaleString
1.13.3 isLockedAlt2 LogicBoolean
1.13.3 isLockedAlt2Message LocaleString
allowMultipleInQueue This makes it so only one action can be queued of this type (useful for keeping actions with conditions from being spammed)
onlyOneUnitAtATime bool When action is picked in UI, only one unit selected with get this action. Defaults to false.
1.13.3 isGuiBlinking LogicBoolean Flashes in UI to draw attention to it. Might be annoying if used often, recommended only for temporarily states/messages
1.14 isAlsoViewableByAllies bool Allows ally players to see actions from this unit, useful for showing stats to other players (eg missile count, items collected)
1.14 isAlsoViewableByEnemies bool Allows enemy players to see actions from this unit, useful for showing stats to other players (eg missile count, items collected)
AI - How the AI uses this action
1.13.3 ai_isHighPriority LogicBoolean Use this for faction selection actions or other high priority actions such as building high priority units
ai_isDisabled LogicBoolean Defaults false. Stop AI using this action.
1.13.3 ai_considerSameAsBuilding Be careful with

Triggers - These skip the queue and do not use price, ignores isLocked, buildTime, etc (Use 2 actions and alsoQueueAction to automatically add an action to the queue)
Parameters: created, completeAndActive, destroyed, killedAnyUnit, queuedUnitFinished, queueItemAdded,
autoTriggerOnEvent queueItemCancelled, teleported, touchTargetSuccess, newWaypointGivenByPlayer, teamChanged,
1.13.3 transportingNewUnit, transportUnloadedOrRemovedUnit, tookDamage
autoTrigger LogicBoolean When true triggers the effects of this action instantly (ignoring price, isActive, isVisible, buildSpeed, etc) autoTrigger: if self.overWater(), autoTrigger: if self.customTimer(laterThanSeconds=5)
options: everyFrame (default), every4Frames, every8Frames. This overrides autoTriggerCheckRate set on [core] Note:
all triggers regardless of check rate are checked when first created and after an auto trigger cooldown. Note: Adding
autoTriggerCheckRate enum autoTriggerCheckRate:every8Frames
[core]autoTriggerCheckRate:every8Frames to all-units.template could have a large performance boost for mods with
complex autoTriggers.
While action is queued
buildSpeed time buildSpeed: 5s
highPriorityQueue bool Defaults to false. If true this action skips all other low priority actions in queue. Useful for fireTurret actions.
canPlayerCancel bool
whenBuilding_cannotMove bool Stops unit moving while action is being applied. Useful for deploy like actions.
whenBuilding_playAnimation animation ref
whenBuilding_rotateTo float Rotate unit body to this direction when action is in active queue
whenBuilding_rotateTo_orBackwards bool If true allow rotation in 180 degrees from whenBuilding_rotateTo when this is a smaller angle
whenBuilding_rotateTo_waitTillRotated bool Pause action queue till rotation is finished
whenBuilding_temporarilyConvertTo unit ref Convert to another unit while action is in active queue. Note: actions from the original unit will be kept
1.15 whenBuilding_temporarilyConvertTo_keepFields Don't change these fields when using whenBuilding_temporarilyConvertTo (both to and from), useful with setUnitStats
whenBuilding_triggerAction action ref
1.14 whenBuilding_rotateTo_aimAtActionTarget bool BETA NOTE: is broken in some cases
1.14 whenBuilding_rotateTo_rotateTurretX turret ref
spawnEffectsOnQueue effect ref Effects to spawn at unit when action is first added to queue
playSoundToPlayerOnQueue sound ref Global sound to play to unit's player only when action is first added to queue
Misc outcomes / Results (What happens) (Note: Must be at least one outcome for an action to show)
requireConditional Skip all effects of this action if this evaluates to false
1.13.3 convertTo unit ref Convert your unit into another unit. properties are preserved.
1.14 convertTo_keepCurrentTags Keep current and temporarily tags and ignores default tags on convertTo target.
Don't change these fields when converting, useful with setUnitStats (Allowed fields: maxHp, maxShield,
1.15 convertTo_keepCurrentFields fields shieldRegen, maxEnergy, armour, mass, shootDelayMultiplier, moveSpeed, maxAttackRange.)

addEnergy float Adds energy to unit. Has no effect unless energyMax is set. (Same as addResources: energy=X)
addResources resources Add these resources when action finishes. addResources: credits=5, energy=-5, hp=-100, shield=5, ammo=1
addResourcesScaledByAIHandicaps resources Same as addResources, but increased or decreased depending on AI difficulty level
1.15 addResourcesWithLogic dynamic resources
Like addResources but allows logic to be used for the resource value addResourcesWithLogic: hp = select( self.parent.energy>5, 10, 20 )
1.15 setResourcesWithLogic dynamic resources
Sets target resources to this value instead of adding. Becareful with global resources. setResourcesWithLogic: hp=self.parent.hp - 10, energy = self.energy / 2
deleteSelf Remove self with no explosions or sounds
resetCustomTimer LogicBoolean Reset timer used with self.customTimer()
1.13.3 setBodyRotation

Allows changing of a select number of fields dynamically without converting. Supports =/+=/-=, with dynamic
1.15 setUnitStats fields values maths/logic. Changeable fields: maxHp, hp, maxShield, shield, shieldRegen, maxEnergy, energy, armour,
mass, shootDelayMultiplier, shootDamageMultiplier, moveSpeed, maxTurnSpeed, maxAttackRange

1.15 resetUnitStats boolean Reset changes made by setUnitStats to base values


setUnitMemory: """
customText=memory.customText+'hello',
Change this unit's memory, values can be set with logic. Memory must first be defined with
1.15 setUnitMemory key value pairs nukeActive=true,
defineUnitMemory nextTarget=self.attacking.nearestUnit(withinRange=300, withTag='x', relation='enemy')
"""

1.15p5 refundAllQueuedItems boolean Refunds the spent price in the queue of a specific action; Includes set flags in price.
1.15p5 removeAllQueuedItemsWithoutRefund boolean Clears the queue without refunding

Outcome - Chaining Actions

alsoTriggerAction action refs Trigger to results of another action as well. Ignores action's requirements. alsoTriggerAction: addCredits, playSound
alsoQueueAction action refs Adds another action into the normal unit's queue. Ignores action's requirements
alsoTriggerOrQueueActionConditional LogicBoolean Defaults true. alsoTriggerAction and alsoQueueAction are ignored if this works out to be false.
Outcome - Sounds
playSoundAtUnit sound ref Local sound to play when action finishes
playSoundGlobally sound ref Global sound to play to all players in game
playSoundToPlayer sound ref Global sound to play to unit's player only
Outcome - Fire projectile from turret
fireTurretXAtGround turret ref When action finishes fire target turret at point on ground, bypasses canShoot rules in turret. fireTurretXAtGround: nukeSilo
fireTurretXAtGround_withOffset point If not set player targets the ground with GUI, if a point is set this step is skipped fireTurretXAtGround_withOffset: 0,0
fireTurretXAtGround_withProjectile projectile ref Used with fireTurretXAtGround. Defaults to target turret's normal projectile.
1.15p4 fireTurretXAtGround_withTarget unitref Fires a turret aimed at the location of the indicated unit or marker
1.13.3 fireTurretXAtGround_count Number of projectiles to fire. Defaults to 1
1.13.3 fireTurretXAtGround_onlyOverPassableTileOf Only allow tiles crossable by this movement type to be selected LAND,BUILDING,WATER,HOVER, etc
Outcome - Spawning
1.13.3 spawnUnits Spawn units at action's target. See 'Spawn units line' section in this doc for details. eg: spawnUnits: heavyTank, tank*5, hoverTank(offsetX=10)
spawnEffects effect ref Effects to spawn at unit
1.13.3 produceUnits Like spawnUnits but unit exits as if it was produced normally, and gets a move away waypoint
Outcome - Position
1.14 offsetSelfAbsolute: point3d Changes unit position absolutely to its current position offsetSelfAbsolute: 0, 0, 40 [x,y,height]
Outcome - Transport Changes
addUnitsIntoTransport unitTypes Add units into transport, use self.transportingCount() to check for space before adding addUnitsIntoTransport: tank*3, heavyTank(neutralTeam=true)
deleteNumUnitsFromTransport int
1.13.3 deleteNumUnitsFromTransport_onlyWithTags string(s)
1.13.3 startUnloadingTransport bool
1.13.3 forceUnloadTransportNow bool For unload all units, or slot targeted by forceUnloadTransportNow_onlyOnSlot. Unloads even if no space or overwater, etc
1.14 forceUnloadTransportNow_onlyOnSlot int
Outcome - Waypoint Changes
1.13.3 clearAllWaypoints bool Clears all waypoints, be careful not to annoy players by removing their orders, prepending waypoints is often better
1.13.3 clearActiveWaypoint bool
addWaypoint_type move, attackMove, guard, loadInto, loadUp, attack, reclaim, repair, touchTarget, build, follow, setPassiveTarget
1.13.3 addWaypoint_unitType Only for use with addWaypoint_type:build
1.13.3 addWaypoint_prepend bool Add to the start of the waypoint queue or the end
1.13.3 addWaypoint_triggerActionIfFailed actions If target_nearestUnit fails to find a match so waypoint cannot be added then trigger this action
1.14 addWaypoint_triggerActionIfMatched actions
1.13.3 addWaypoint_maxTime time Automatically remove this waypoint if it has been active for longer than this time.
1.13.3 addWaypoint_target_nearestUnit_tagged tags
1.13.3 addWaypoint_target_nearestUnit_team relation own|neutral|allyNotOwn|ally|enemy|any
1.13.3 addWaypoint_target_nearestUnit_maxRange float
1.13.3 addWaypoint_target_mapMustBeReachable bool
1.15 addWaypoint_target_fromReference unit ref addWaypoint_target_fromReference: self.memory.lastDock
1.13.3 addWaypoint_position_offsetFromSelf point
1.13.3 addWaypoint_position_fromAction bool
1.13.3 addWaypoint_position_randomOffsetFromSelf Same as above, but random.
1.14 addWaypoint_position_relativeOffsetFromSelf point
1.14p6 addWaypoint_target_randomUnit_tagged
1.14p6 addWaypoint_target_randomUnit_team
1.14p6 addWaypoint_target_randomUnit_maxRange
Outcome - Cooldown
1.14 addAllActionCooldownsTime
1.14 addActionCooldownTime Player cannot use action again for this amount of time
1.14 addActionCooldownApplyToActions action ids Sets addActionCooldownTime's target. Defaults to this action.
1.14 clearAllActionCooldowns
Outcome - Animation
1.13.3 playAnimation animation id
1.13.3 playAnimationIfNotPlaying bool Don't restart animation if this animation is already playing
1.13.3 finishPlayingLastAnimation bool Finish last animation, including blend out
1.13.3 stopLastAnimation bool Stop last animation, skipping blend out

1.13.3 switchToNeutralTeam boolean Change team to neutral. This team is allied to all other teams. Will be captured by nearby units unless [core]stayNeutral:true is used
1.13.3 switchToAggressiveTeam boolean Change to a built-in team that is aggressive to all other teams. Does not get captured.
1.15 switchToTeam logicNumber Team id to switch to. Starts at 0. (but -1 for a neutral team, -2 for aggressive Team)
Outcome - Take Resources from other units
1.13.3 takeResources customPrice Resources to take (required to use take resources). And at-least 1 include key is needed. takeResources: hp=5, gold=10
1.13.3 takeResources_includeUnitsInTransport bool
1.13.3 takeResources_includeParent bool Include attachment parent or transport parent
1.15 takeResources_includeReference unit ref [action]takeResources_includeReference: self.lastDamagedBy
1.13.3 takeResources_includeUnitsWithinRange float
1.13.3 takeResources_includeUnitsWithinRange_team TeamRelation Used with includeUnitsWithinRange, defaults to own. Can be: own|ally|allyNotOwn|enemy|neutral|any
1.13.3 takeResources_excludeUnitsWithoutTags tags
1.13.3 takeResources_excludeUnitsWithTheseResources customPrice
1.13.3 takeResources_excludeUnitsWithoutAllResources bool Defaults to true.
1.13.3 takeResources_triggerActionIfAnyCollected action refs
1.13.3 takeResources_triggerActionIfNoneCollected action refs
1.13.3 takeResources_discardCollected bool Just take resources from targets, don't add(or remove) to self
1.13.3 takeResources_keepResourcesOnTarget bool Don't add/remove resource from target. This clones resources. Use with takeResources_discardCollected and takeResources_triggerActionIfAnyCollected to make a resource detector.
takeResources_maxUnits int Defaults to 1.
1.14 takeResources_directTransferStoppingAtZero bool If less resources on target than transfer amount, only remaining resources will be transfered. Doesn't support use with some other takeResources_* keys
Outcome - Convert Resources
1.13.3 convertResource_from customResource Name of custom resource to take from
1.13.3 convertResource_to customResource Name of custom resource to give to
1.13.3 convertResource_minAmount float Skip if less than this amount in 'from'. Defaults to 0. Likely not needed for most use cases
1.13.3 convertResource_maxAmount float Max amount to transfer between 'from' and 'to'
1.13.3 convertResource_multiplyAmountBy float Defaults to 1. Amount to multiply when adding on 'to' (does not effect amount taken on 'from')
Outcome - Set Resources
1.13.3 resourceAmount customResource Name of custom resource to set with the below 3 keys. All keys are optional, and can be used together. resourceAmount: oil
1.13.3 resourceAmount_setValue float Absolute value to set this resource to, ignores current value of resource. Skipped by default resourceAmount_setValue: 20
1.13.3 resourceAmount_addOtherResource customResource Name of another custom resource to add to this on. Can be used without resourceAmount_setValue, to just add resources. Or with resourceAmount_setValue:0 to copy a resource value.
1.13.3 resourceAmount_multiplyBy float Defaults to 1. Multiple the current or new value by
Outcome - Attachment changes
1.13.3 attachments_addNewUnits unit types
1.13.3 attachments_deleteNumUnits int
1.13.3 attachments_onlyOnSlots attachment ids Restrict attachments_* actions to these attachments
1.13.3 disconnectFromParent bool
1.14 attachments_unload bool Unload all attachments. Can be used with attachments_onlyOnSlots. Same as unloading transported units
1.14 attachments_disconnect bool Disconnect all attachments in the place they are right now. Can be used with attachments_onlyOnSlots.
Outcome - Tag changes
1.13.3 temporarilyAddTags tags Add tag to this unit until it is converted or reset (unless convertTo_keepCurrentTags is used)
1.13.3 temporarilyRemoveTags tags Remove tag from this unit until it is converted or reset (unless convertTo_keepCurrentTags is used)
1.13.3 resetToDefaultTags bool Reset to standard tags
1.13.3 addGlobalTeamTags tags Add a tag to player's team. Use with self.globalTeamTags() to create unlocks and upgrades. Unique tags are best to not conflict with other mods.
1.13.3 removeGlobalTeamTags tags Remove a tag from player's team.

Outcome - Show Message


1.13.3 showMessageToPlayer string Sends a message to the player controlling the unit
1.13.3 showMessageToPlayer_{LANG} string Note: This format is support on nearly all strings that show to player even when reference doesn't show it
1.13.3 showMessageToAllPlayers string Sends a message to all players Eg: showMessageToAllPlayers: %{self.playerName} has captured a point
1.14 showMessageToAllEnemyPlayers string showMessageToAllEnemyPlayers: Team %{self.playerName} has %{self.resource.gold}
1.13.3 showQuickWarLogToPlayer string Sends a Quick War Log message to the player controlling the unit (in the lower lef)
1.13.3 showQuickWarLogToAllPlayers Sends a Quick War Log message to all players (in the lower lef)
1.13.3 debugMessage Only shows in Sandbox with Debug mode on.

Type Spawn units line Spawn lines specifically for units, used with "unit ref" value types
Code Description Example
Most units spawning keys support multiple units with parameters spawnUnits: crates*10(neutralTeam=true), tank(spawnChance=0.5)
1.13.3 neutralTeam Spawn the unit on the neutral team instead of the same team as source
1.13.3 setToTeamOfLastAttacker Spawn the unit on the last attacker of source (useful on [core]unitsSpawnedOnDeath)
1.13.3 spawnChance Chance this unit will spawn. Defaults to 1.
[action]spawnUnits: tank(spawnSource=memory.lastLocation)
Changes spawn location and team of spawned units to this unit ref.
1.15 spawnSource unit ref
1.13.3 maxSpawnLimit Useful with spawnChance, max number of units to spawn in total spawnUnits: treeA(spawnChance=0.5, maxSpawnLimit=1), treeB(maxSpawnLimit=1)
1.13.3 gridAlign Align spawn location to grid, useful for buildings
1.13.3 skipIfOverlapping bool Don't spawn this unit if spawn in an invalid location. Eg on units or over water when LAND based
1.13.3 offsetX float
1.13.3 offsetY float
1.13.3 offsetRandomX float
offsetRandomY float
offsetRandomDir float
1.13.3 offsetHeight float
1.13.3 offsetDir float
1.13.3 addResources resource ref Give spawn unit those resources, can be used to set flags that trigger actions spawnUnits: crates(addResource=gold:30|stone:10, spawnChance=0.5)
1.14 transportedUnitsToTransfer int Puts the designated amount of transported units into the transport of the spawned unit. spawnUnits: transporter(transportedUnitsToTransfer=5)
1.15 copyWaypointsFrom unit ref Copies all waypoints on target to created units. spawnUnits: tank(copyWaypointsFrom=self)
1.14 alwayStartDirAtZero bool

1.14 Type Spawn Projectiles line Spawn lines specifically for projectiles, used with "proj ref" value types
1.14 Code Description Example
1.14 Most projectile spawning keys used for projectile ref spawnProjectilesOnEndOfLife: secondary*3(spawnChance=0.5)
1.14 spawnChance float Chance this projectile will spawn. Defaults to 1. spawnChance: 0.5
1.14 maxSpawnLimit int Maximum amount to spawn
1.14 recursionLimit int Prevents loops, useful with spawning itself so it doesn't infinitely spawn, good for chain exploding recursionLimit: 5 (Recommended no more than 4 if spawning more than 3 projectiles)
1.14 offsetX float
1.14 offsetY float
1.14 xOffsetRelative float Similar to offsetX, but the offset is relative to the position of the projectile
1.14 yOffsetRelative float Similar to xOffsetRelative, but for Y axis
1.14 offsetRandomX float Random value to offset in the X axis only
1.14 offsetRandomY float Random value to offset in the Y axis only
1.14 offsetRandomXY float The offset in both directions to randomly spawn, makes truly random spawning within an area
1.14 offsetHeight float
1.14 offsetDir degrees
1.14 offsetRandomDir degrees

Type LogicBoolean Advanced code to create conditionals and triggers


Code Returns Description Example
true bool
false bool
if Start all logic booleans with if, unless just using true/false
and bool if self.isInWater() and self.energy(greaterThan=1)
or bool if (self.energy(greaterThan=1) or self.ammo(greaterThan=1)) and self.isFlying()
not bool if not self.isOverLiquid()
1.15 < bool Return true if number on left is smaller
1.15 > bool Return true if number on right is smaller
1.15 <= bool Return true if number on left is smaller or equal
1.15 >= bool Return true if number on right is smaller or equal
1.15 == bool Return true if number, unit, string, bool on both sides is the same
1.15 != bool Return true if number, unit, string, bool on both sides different
1.15 + same type Add two numbers or join two strings
1.15 - same type Subtract two numbers
1.15 / same type Divide two numbers
1.15 * same type Multiply two numbers
1.15 % same type Divides two numbers and returns the remainder
Unit location and movement
self.isUnderwater() bool
self.isAtGroundHeight() bool
self.isFlying() bool
self.isMoving() bool
self.isAtTopSpeed() bool
self.isInWater() bool Touching water
self.isOverwater() bool Touching or over a water tile
self.isOverLiquid() bool
self.isOverClift() bool
self.isOverPassableTile() bool (parameters: type) Type Values: NONE, LAND, BUILDING, HOVER, OVER_CLIFF, OVER_CLIFF_WATER, AIR, WATER
self.isOverOpenLand() bool shortcut for self.isOverPassableTile(type='LAND')
Unit stats
1.13.3 self.hasResources() bool Can check multiple resources (all price parameters)
self.resource() float / bool Checks a single resource (parameters: type, greaterThan, lessThan) (1.15 returns float with no parameters)
1.15 self.resource.RESOURCE_TYPE float Shortcut for: self.resource(type='RESOURCE_TYPE') addResourcesWithLogic: hp += self.resource.gold
1.14? self.isResourceLargerThan bool Compare two resource between each other, note multiplyTargetBy doesn't make any changes. (parameters: source=x, compareTarget=x, byMoreThan=x, multiplyTargetBy=x)
self.hp() float / bool (parameters: greaterThan, lessThan, empty, full). (1.15 returns float with no parameters)
1.15 self.maxHp() float / bool (parameters: greaterThan, lessThan, empty, full). (1.15 returns float with no parameters)
self.height() float / bool (parameters: greaterThan, lessThan, empty, full) (1.15 returns float with no parameters)
self.ammo() int / bool Returns int if no parameters, boolean with any parameters (parameters: greaterThan, lessThan, empty, full)
self.isAmmoEmpty() bool shortcut for self.ammo(empty=true)
self.ammoIncludingQueued() int / bool Also includes ammo from actions still in queue (parameters: greaterThan, lessThan, empty, full) if self.ammoIncludingQueued(lessThan=12)
self.energy() float / bool (parameters: greaterThan, lessThan, empty, full) (1.15 returns float with no parameters) if self.energy() > 50
self.energyIncludingQueued() float / bool Also includes energy from actions still in queue (parameters: greaterThan, lessThan, empty, full)
self.isEnergyFull() bool shortcut for self.energy(full=true)
self.isEnergyEmpty() bool shortcut for self.energy(empty=true)
self.shield() float / bool (parameters: greaterThan, lessThan, empty, full) (1.15 returns float with no parameters)
self.kills() int / bool (parameters: greaterThan, lessThan) (1.15 returns int with no parameters)
1.13.3 self.queueSize() int / bool (parameters: greaterThan, lessThan) (1.15 returns float with no parameters)
1.15 self.teamId() int Return team id of unit or marker. Starts at 0. (but -1 for a neutral team)
1.15 self.teamName() string Returns allied group team name
self.playerName() string Returns player's name
1.15 self.x(), self.y(), self.z() float Returns the unit's coordinate parts
1.15 self.dir() float Returns the unit's direction
1.15 self.priceCredits() Returns the price of the unit
Misc

self.hasFlag() bool Boolean flag saved into units for mods to use. (parameters: id=0-31) Use addResources in action change this vaule
self.tags() bool (parameters: includes)
1.13.3 self.globalTeamTags() bool (parameters: includes)
self.transportingCount() int (parameters: greaterThan, lessThan, empty) (1.15 returns int with no parameters)
self.numberOfAttachedUnits() int / bool (withTag, greaterThan, lessThan) (1.15 returns int with no parameters)
self.isAttacking() bool
self.hasActiveWaypoint() bool ([type=WAYPOINT_TYPE])
self.transportingUnitWithTags() bool (parameters: includes) self.transportingUnitWithTags(includes='human')
self.hasParent() bool For both attachments and transports (parameters: [withTag=x] )
self.hasTakenDamage() float / bool (parameters: withinSeconds=X, laterThanSeconds=X) (v1.15 returns float in seconds with no parameters) self.hasTakenDamage(withinSeconds=1)
self.timeAlive() float / bool (parameters: withinSeconds=X, laterThanSeconds=X) (v1.15 returns float in seconds with no parameters)
self.lastConverted() float / bool (parameters: withinSeconds=X, laterThanSeconds=X) (v1.15 returns float in seconds with no parameters)
self.customTimer() float / bool (parameters: withinSeconds=X, laterThanSeconds=X) (v1.15 returns float in seconds with no parameters)
self.isOnNeutralTeam() bool
self.numberOfUnitsInTeam() int / bool (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue) (v1.15 returnsnumberOfUnitsInTeam(withTag='techUnlockBuilding',
int with no parameters) greaterThan=0)
1.14 self.numberOfUnitsInAllyNotOwnTeam() int / bool (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue) (v1.15 returns int with no parameters)
1.13.3 self.numberOfUnitsInEnemyTeam() int / bool (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue) (v1.15 returns int with no parameters)
numberOfUnitsInNeutralTeam() int / bool (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue) (v1.15 returns int with no parameters)
1.14 numberOfUnitsInAggressiveTeam() int / bool The special 'aggressive to all' team (this is not the same as numberOfUnitsInEnemyTeam) (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue)
1.13.3 self.hasUnitInTeam() bool (parameters: withTag, withinRange, incompleteBuildings, factoryQueue) alias for numberOfUnitsInTeam
1.13.3 self.noUnitInTeam() bool (parameters: withTag, withinRange, incompleteBuildings, factoryQueue) alias for numberOfUnitsInTeam
1.13.3 self.isControlledByAI() bool
1.15 self.readUnitMemory() any type (name:string, type:string{boolean,unit,float,string}, [default]) if parent.readUnitMemory('boostTarget', type='unit') == self

1.15 Unit references


fireTurretXAtGround: mainGun (thisActionTarget==Marker with ground location)
alsoTriggerAction: x (thisActionTarget==Same as original action)
[turret]onShoot_triggerActions: x (thisActionTarget==Target that was shot at)
1.15 thisActionTarget unit / marker Current target or location targeted. takeResources_triggerActionIfAnyCollected: x (thisActionTarget==Target with resources)
addWaypoint_triggerActionIfMatched: x (thisActionTarget == Marker for move/Target for attack, etc. Note: use addWaypoint_maxTime:0 if you want to
search only)
autoTriggerOnEvent: tookDamage (thisActionTarget==Unit that caused damage)
autoTriggerOnEvent: killedAnyUnit (thisActionTarget==Unit that was killed)
autoTriggerOnEvent: transportingNewUnit (thisActionTarget==Unit that was transported)
1.15 eventSource unit / marker Current trigger from an autoTriggerOnEvent, otherwise null autoTriggerOnEvent: transportUnloadedOrRemovedUnit (thisActionTarget==Unit unloaded)
autoTriggerOnEvent: queuedUnitFinished (thisActionTarget==New unit made)
autoTriggerOnEvent: touchTargetSuccess (thisActionTarget==Target touched)

1.15 attachment unit (parameters: [slot], [withTag]) self.attachment(withTag='x').lastDamagedBy.getAsMarker()


1.15 transporting unit (parameters: [slot]) if self.transporting(slot=0).hasResources(gold=100)
1.15 attacking unit Current target this is attacking, might not be the current waypoint target. if attacking.tags(includes='bug') and attacking.hp < 20
1.15 lastDamagedBy unit Last unit that attacked this.
1.15 parent unit The transporter or attachment parent. (Note: units are suspended state when transported without attachment slot)
Eg autoTrigger: if parent.energy > 100
1.15 activeWaypointTarget unit Current active waypoint target. Includes attacking, transporting, repairing, etc. if distanceBetween(self, activeWaypointTarget) < 100
1.15 customTarget1 unit Custom memory, defaults to the unit that created this unit. if parent.customTarget1 == self
1.15 customTarget2 unit Custom memory, defaults to null
1.15 nearestUnit unit (withinRange=500, withTag='x', relation='any') Search for a unit (not recommended in autoTrigger check for perfomance)
(withTag=x, relation) - Returns first (and oldest) unit found matching the filter. Slow, avoid using in
1.15 globalSearchForFirstUnit unit self.globalSearchForFirstUnit(withTag='gameController', relation='neutral')
autoTrigger checks
1.15 nullUnit unit returns a null unit reference, useful for comparisons if self.parent == nullUnit
1.15 Marker functions
creates a temporary marker at the position a unit is right now. Markers are very fast to create and
1.15 getAsMarker marker automatically removed when no longer needed. Is not linked to any unit and still exists when the unit dies, lastDamagedBy.getAsMarker()
and stays the same when source moves.
1.15 getOffsetAbsolute marker ([x],[y],[height]) Returns marker with absolute offset (-y is north, +x is east)
1.15 getOffsetRelative marker ([x],[y],[height],[dirOffset]) Returns marker with relative offset. (y+ is forwards) self.getOffsetRelative(y=100).nearestUnit(withinRange=70, withTag='mouse') != null
1.15p4 eventSource event Sets "target" based on the event from autoTriggerOnEvent (basically thisActionTarget but for events)

Global functions
Shortcut to read the self with current defineUnitMemory types. Cannot be used on other units, use
1.15 memory.NAME any type autoTrigger: if memory.experience > 100
readUnitMemory for that. Don't call with self.
1.15 distance(x1, y1, x2, y2) float Returns the difference between two points
1.15 distanceSquared(x1, y1, x2, y2) float Returns the squared difference between two points. Bit faster than distance.
1.15 distanceBetween(unit1, unit2) float Returns the distance between two units
1.15 distanceBetweenSquared(unit1, unit2) float Returns the squared distance between two units. Bit faster than distanceBetween
game.nukesEnabled() bool Returns true if nukes are enabled in this game's settings.
1.15 int(x) int Removes decimal places from a number. int(4.2) == 4
1.15 select(bool, textA, textB) returns textA if bool is true otherwise returns textB
1.15 debug(logicBoolean) string Returns a text string helping to explain the reason for the current result. Can see into nested logic, comparisons, and operators.
1.15 str(x) string Convert a number, unit or boolean into a string str(self.energy)+'x' == '100x'
1.15 substring(text,start,end) string Takes a part of the string from the indicated start and end parts substring('hello',0,2) == 'he'
1.15 length(string) int Returns string length as number
1.15 squareRoot(num) float Requires square root of a number
1.15 min(num1, num2) float Returns the smallest number damage = min(self.hp, self.energy)
1.15 max(num1, num2) float Returns the biggest number max(5, 10) == 10
1.15 createMarker(x, y, [height]) marker

1.14 Type [placementRule_NAME] Allows creation of rules for requiring buildings


1.14 Code Value Type Description Example
1.14 anyRuleInGroup: string (Only require 1 of the rules in this group pass, instead of all. Use the same group name on other placement rules to create a group.)
1.14 searchTags: tag list Search for any unit with at least one of these tags
1.14 searchTeam: relation Teams to include in search, can be: own|neutral|allyNotOwn|ally|enemy|any
1.14 searchOffsetX: float defaults to 0
1.14 searchOffsetY: float defaults to 0
1.14 searchDistance: float Required
1.14 excludeIncompleteBuildings: bool defaults to false. Might want to set to true depending on the requirement reason
1.14 excludeNonBuildings: bool defaults to false
1.14 minCount: int Set min amount of units that need to be found in search. (eg needs to be near something). Defaults to 0
1.14 maxCount: int Set max amount of units before match fails (eg cannot be close to something). Defaults to unlimited
1.14 blocksPlacement: bool Defaults to true.
1.14 cannotPlaceMessage: LocaleString Highly Recommended. Message shown to player if this rule fails (will be first failing rule if using anyRuleInGroup).
1.14 checkEachTile: bool defaults to true (set to false to only test unit center, true checks each tile under the unit which shows up on the placement grid. Can be easier to see requirements with true)

Type Prices/Resources lines - used by addResources, price, etc


Code Targets Description Example
credits Global resource
energy
hp
shield price: hp=-100, shield=100
ammo Hidden value on each unit for use by mods
setFlag use with addResources, resourceUsage or price. 0-31. Flags are stored in each unit setFlag=1
unsetFlag use with addResources, resourceUsage or price. 0-31
hasFlag use with price or resourceUsage
hasMissingFlag use with price or resourceUsage
1.13.3 X Any resource defined in [global_resource_x] or [resource_x] sections gold=5, stone=20

Section [global_resource_NAME]
Code Value Type Description Example
Define a new resource shared with all units in a team, works just like the built-in credits resource. Add to 'all-units.template' (at mod root) for easy use in all of your mods
1.13.3 displayName Name of this resource in UI
1.13.3 displayNameShort Resource name on smaller UI elements like action hovertext (Defaults to displayName)
1.13.3 hidden bool Hide this resource from the player
1.13.3 priority If 2 or mods/units define a resource with the same NAME, the displayName/displayColor with the highest priority is used
1.13.3 displayColor color Color, can be hex with optional alpha #FF0000
1.14 displayRoundedDown bool Don't show decimal places to the player

Section [resource_NAME]
Code Value Type Description Example
Define a new resource local to unit. Works like build-in ammo resource
1.13.3 displayName Name of this resource in UI (eg hovering over unit info)
1.13.3 displayNameShort
1.13.3 hidden Hide this resource from the player
equivalentGlobalResourceForAI Used to hint to the AI that a resource node with a local resources could be used to get a different global resource. Eg when a harvester unloads the resource
1.14 displayRoundedDown

Section [template_NAME]
Code Value Type Description Example
1.13.3 Template sections can have any keys and have no effect by themselves.
Template can get included from other files with [core]copyFrom. Eg: [core]copyFrom: ROOT:effects/explodeEffects.template (Note that copyFrom can include multiple files. )
--All these below features can be used with any section not just templates--
1.13.3 @copyFromSection Use in any section to include keys from a section or template. (Comma separated for multiple) @copyFromSection: template_name/action_name/projectile_name
@copyFrom_skipThisSection Use in any section to make [core]copyFrom not copy into it. Eg not copy an action when overriding @copyFrom_skipThisSection
@define X Define a local variable within a section (best outside of template) @define targetEffect: boom
@global X Define a global variable used in all sections. Local variables have a higher priority @global targetEffect: pop
${X} can be used to reference variables (can also be done outside of a template). It is calculated when
1.13.3 loading and remains static. Has no impact on runtime performance. spawnEffects: effect_${targetEffect}
1.13.3 ${section.key} can be used to reference another key (can also be done outside of a template) addResources: credits=${ core.price * 2 + 10 }
%{X} can be used to add dynamic logic into some strings. (CAN NOT be used everywhere). The value will
1.15 update every frame. [action]text: Missing hp %{self.maxHp - self.hp}
copyFrom:"""
ROOT:a.ini,
ROOT:b.ini,
1.15 """ text """ can be used for multiline strings. Newlines with be removed from final result.
ROOT:c.ini
"""

Section [comment_NAME]
Code Value Type Description Example
1.13.3 Comment sections can have any keys and have no effect.

bug_attack, bug_die, building_explode, cannon_firing, click, click_add, click_remove, firing3, firing4,


List of default game noises (for turret fire sound or gun_fire, interface_error, large_gun_fire1, large_gun_fire2, laser_deflect, laser_deflect2, lighting_burst,
other sound references): message, missile_fire, missile_hit, move, nuke_explode, nuke_launch, plasma_fire, plasma_fire2,
tank_firing, unit_explode, unit_explode_old, warning
This sheet is for an old version, see sheet tabs below.
Section [core]
Code Description Example Value Type
Common keys
name: Defines the raw name for your unit, in which case the game uses to identify as a unique name. (This name
name:
is not
customTank_1
displayed in-game) string
altNames: comma separated list of names. Like name but lower priority, useful for multiple optional mods. altNames: custTank1, customTank1, cTank1 string(s)
class: Reserved for future use, must be CustomUnitMetadata class: CustomUnitMetadata string
price: The cost of your unit from builders/buildings. price: 500 int
mass: The 'weight' of your unit, this will define how it collides with other units, a greater value means it is tougher
mass:
to push.
3000 int
techLevel: Defines the Tech Level of your unit, there are 3 levels and each will appear in a different color in the GUI.techLevel: 1 int
buildSpeed: Time it takes to build unit (may multiply with builder speed) Formulae for seconds: 10 ÷ 60 = 0.16 (0.16 will
buildSpeed:
make it take
0.1610 seconds to build) float
radius: Circular area around your unit that makes it selectable (mouse click/screen touch) radius: 20 int
isBio: Choose whether your unit is bioligical or not, will effect sound and splat (unless hideScorchMark is true) isBio: false bool
isBug: Changes some death defaults, and sort order in sandbox bool
isBuilder Normally required if this unit places buildings. Defaults to [ai]useAsBuilder 1.13
Unit stats
maxHp: The max health for your unit. (will spawn with this value) maxHp: 200 int
selfRegenRate: Passive self repair rate float
maxShield: The max shield hitpoints of your unit. Can start with 0 hitpoints if startShieldAtZero is set to true maxShield: 500 int
startShieldAtZero: Sets the unit's shield to 0 HP when it is first built. startShieldAtZero: true bool
shieldRegen: Passive shield regen rate shieldRegen: 0.15 float
energyMax: Defaults to 0. Energy can be used as ammo for turrets or for laser defense energyMax: 1 float
energyRegen: float
energyStartingPercentage: Sets the percentage of charged energy when the unit is first built. energyStartingPercentage: 0.5 float
energyNeedsToRechargeToFull: Disable weapons using energy after reaching zero till fully recharged float
armour Damage taken away from each hit (not currently used in any core units) 1.13
armourMinDamageToKeep Min damage to keep. Defaults to 1 1.13
generation_credits: Income unit creates generation_credits: 2 int
generation_delay: How often generation_credits is added. Defaults to 40 (changing not recommended) generation_delay: 40 int
UI and Graphics related keys
showInEditor: Set to false to hide unit in sandbox editor (Default true) showInEditor: true bool
displayText The name of your unit that the game shows to the player. displayText: Custom Tank string
displayText_{LANG} LANG=ISO 639-1 Code to show this text instead when game is in this language displayText_es: Hola 1.13
displayDescription Description of your unit that the game shows to the player. displayDescription: - Fast movement.\n- Light damage. string
displayDescription_{LANG} LANG=ISO 639-1 Code to show this text instead when game is in this language displayDescription_es: -Movimiento rapido\n-Daño ligero 1.13
displayLocaleKey: Translation file key for unit name and description displayLocaleKey: units.mechArtillery string
displayRadius: Defaults to radius value. Set to show a larger or smaller selection box ui on units. displayRadius: 20 int
shieldRenderRadius
shieldDisplayOnlyDeflection: Hide shield (if active) unless deflecting shot shieldDisplayOnlyDeflection: false bool
shieldDeflectionDisplayRate: Defaults to 4. High value causes shield deflection to fade disappear faster shieldDeflectionDisplayRate: 3 float
isUnselectable Cannot be selected
Building only keys
isBuilding: bool
footprint Only applies to buildings, tiles taken up which block unit movement. Defaults to 0,0,0,0 = 1 center tile footprint: -1,-1,1,1
constructionFootprint Only applies to buildings, tiles taken up for placement of other buildings. Defaults to 0,0,0,0 constructionFootprint: -1,-1,1,3
buildingSelectionOffset: Defaults to 0. Adds or removes padding on the drawn selection rect in UI int
buildingToFootprintOffsetX Defaults to 10 float
buildingToFootprintOffsetY Defaults to 10 float
placeOnlyOnResPool: Normally used for extractors bool
selfBuildRate: Rate unit builds it's self when placed without a builder float
Misc Keys
copyFrom: Use unit data from another ini file as base copyFrom: customTank_Default file (ini)
dont_load: Do not load unit, and don't error on missing data. Can be useful when used with copyFrom dont_load: true bool
overrideAndReplace: Override another unit with this unit. Build links pointing to target unit will be replaced with this unit. And this
overrideAndReplace:
unit will replace target
builder,
on maps.
combatEngineer string(s)
globalScale: Defaults to 1. Changing not recommend globalScale: 1 float
isLocked: Disallow building of this unit. Can be used with overrideAndReplace to restrict units the player is allowedisLocked:
to build. false bool
isLockedIfGameModeNoNuke Disallows building of this unit if nukes are disabled during match setup. isLockedIfGameModeNoNuke: false 1.13
experimental: Tag unit as experimental. Affects zoomed out icon and end game stats. experimental: false bool
stayNeutral: Set to false to disable capture when unit is on the neutral team stayNeutral: false bool
createNeutral 1.13
resourceRate: Used with canReclaimResources. Experimental feature that is not yet finished. float
tags List of any comma separated strings. Only used for transportUnitsRequireTag right now, will be used for other things in future 1.13
fogOfWarSightRange: Set number of tiles this unit can see. Defaults to 15 fogOfWarSightRange: 15 int
softCollisionOnAll: int
disableAllUnitCollisions
isUnrepairableUnit No unit can repair this unit 1.13
isPickableStartingUnit If true, unit is added to dropdowns for starting unit in game setup menus. 1.13
startFallingWhenStartingUnit 1.13
soundOnAttackOrder List of sounds. Only one will be played each attack order sound
soundOnMoveOrder List of sounds. Only one will be played each move order sound
canNotBeDirectlyAttacked No unit can directly target this unit. If true this will also skip this unit in victory/defeat checks
Transport related keys
transportSlotsNeeded: Defaults to 1. Number of slots this unit uses up in a transport, Experimentals are often set to 5 to stop small transports holding them. int 1.13
maxTransportingUnits Number of slots this units as for transporting other units. int
transportUnitsRequireTag Only allow trasport of units that have one of these tags. tags 1.13
transportUnitsRequireMovementType Only allow trasport of units that have one of these movement types. movementTypes 1.13
transportUnitsBlockAirAndWaterUnits Defaults to true if transportUnitsRequireMovementType is empty 1.13
transportUnitsKeepBuiltUnits Makes built units stay inside transport instead of exiting it once ready LogicBoolean 1.13
transportUnitsCanUnloadUnits Defaults to: if not self.isOverLiquid() and not self.isMoving() LogicBoolean 1.13
transportUnitsAddUnloadOption Should unload button be added to the menu LogicBoolean 1.13
transportUnitsKillOnDeath Default true. If false transporting units don't die when transport dies eg: if self.isOverLiquid() LogicBoolean 1.13
transportUnitsHealBy Rate to heal units being transported float 1.13
Construction and factory related keys
canRepairBuildings: isBuilder:true is required as well right now) bool
canRepairUnits: isBuilder:true is required as well right now) bool
canReclaimResources: Used with resourceRate. Experimental feature that is not yet finished. bool
autoRepair: Automatically try and repair damaged units in range ([ai]useAsBuilder:true is required as well right now) bool
nanoRange: Defaults to 85 int
nanoRepairSpeed: Defaults to 0.2 float
nanoBuildSpeed: Defaults to 1 float
nanoFactorySpeed: Defaults to 1 float
extraBuildRangeWhenBuildingThis Temporary add extra build range to builders to build this unit/building. Useful for water based buildings.
builtFrom_#_name: canBuild and builtFrom have the same effect just in the opposite direction. BuiltFrom is useful if adding new units to existing buildings string
builtFrom_#_pos: Order action appears in UI. string
builtFrom_#_forceNano: Build as if this was a building (even if it's a unit) bool
canBuild_#_name: List of units this unit can create. Can be buildings or units. (isBuilder:true and canRepairBuildings:true is recommended when adding buildings) units
canBuild_#_pos: Order action appears in UI string
canBuild_#_tech: Tech level. Mostly just effects action colour in UI. Defaults to 1 int
canBuild_#_forceNano: Build target as if it was a building (even if it's a unit) bool
canBuild_#_isVisible Hide this build option if true
canBuild_#_isLocked Dynamically lock this build option and show isLockedMessage if true.
canBuild_#_isLockedMessage To tell the player why a unit is locked
canBuild_#_isLockedMessage_{LANG} Optional. For other languages.
exit_x: Where created or unloaded units appear. Defaults to 0 exit_x: 0 float
exit_y: Where created or unloaded units appear. Defaults to 5. exit_x: 5 float
exit_dirOffset : float Defaults to 180 for units. 0 for buildings 1.13
exit_heightOffset : float Defaults to 0 1.13
exit_moveAwayAmount : float Defaults to 70 1.13
Death related keys
dieOnConstruct: Delete this unit when it starts making a building. Target building likely will need selfBuildRate set to be created without a builder. bool
dieOnZeroEnergy Kill this unit if energy level reaches zero. dieOnZeroEnergy: false bool 1.13
numBitsOnDeath int
nukeOnDeath: bool
nukeOnDeathRange: float
nukeOnDeathDamage: float
nukeOnDeathDisableWhenNoNuke: Defaults to false bool
fireTurretXAtSelfOnDeath
explodeOnDeath defaults to true boolean 1.13
explodeOnDeathGroundCollision defaults to true boolean 1.13
effectOnDeath effect ref 1.13
effectOnDeathGroundCollision effect ref 1.13
unitsSpawnedOnDeath unit list unitsSpawnedOnDeath: tank*5, hoverTank units 1.13
unitsSpawnedOnDeath_setToTeamOfLastAttacker bool
hideScorchMark: bool
Deprecated Keys (can be used but there are better ways)
action_#_convertTo: Deprecated in 1.13, use [action_x] sections instead action_1_convertTo: customTank_2 string deprecated 1.13
action_#_pos: Order action appears in UI float deprecated 1.13
action_#_price: The price of your action for the unit. (All your sub actions will be linked to the # you use) action_1_price: 1000 int deprecated 1.13
action_#_text: A display text when you select your unit's action, used to explain it's purpose. (All your sub actions will beaction_1_text:
linked to the #Upgrade
you use)to Custom Tank 2 string deprecated 1.13
action_#_description: string deprecated 1.13
action_#_addEnergy: Adds energy to unit. Has no effect unless energyMax is set float deprecated 1.13
action_#_whenBuilding_cannotMove: Stops unit moving while action is being applied. Useful for deploy like actions. bool deprecated 1.13

Section [graphics]
Code Description Example Value Type
image: File path to png image. file (image)
image_back: An optional image drawn behind other units. Useful for factories that units exit file (image)
image_wreak: Image to use when unit dies. Can be NONE to leave no wreak file (image)
image_offsetX: int
image_offsetY: int
teamColorsUseHue: False: Green pixels on unit gets converted to team color. True: Whole unit is tinted the team colour. Defaults to false bool
imageSmoothing: bool
scaleImagesTo: Resize image to fit this value in pixels. Effects leg, and shadow images as well. float
imageScale: Resize image. Defaults to 1. Effects leg, and shadow images as well. float
drawLayer: Set to experimentals, or leave line out string
whenBeingBuiltMakeTransparentTill float 1.13
icon_zoomed_out file (image)
Turrets (images can also be set on each turret)
image_turret: Default image for all turrets, can also be set per turret file (image)
teamColorsOnTurret Defaults false. Apply team colours on turret as well. Also effects pre-turret images bool
scaleTurretImagesTo: float
lock_body_rotation_with_main_turret: Locks body image locked to first turret's direction bool
lock_leg_rotation_with_main_turret bool 1.13
Shadow
image_shadow: Image file, NONE, or AUTO. (AUTO will use image and make it transparent black only.) file (image)
shadowOffsetX: float
shadowOffsetY: float
lock_shadow_rotation_with_main_turret:Locks body image shadow locked to first turret's direction bool
Effects and animation
total_frames Defaults to 1. Animations require this. int
frame_width: Calculated for you if total frames is set, but can be overridden int
frame_height: Defaults to image height int
splastEffect: True to create a water wave effect when over water. Default false bool
dustEffect: True to create a dust effect when over land. Default false bool
splastEffectReverse: True to also create effect when unit is reversing bool
dustEffectReverse: True to also create effect when unit is reversing bool
movementEffect Custom movement effect, can be anything eg: movementEffect: smoke, CUSTOM:fastDust*2, CUSTOM:pop*5 effect 1.13
movementEffectReverse effect 1.13
movementEffectRate float 1.13
movementEffectReverseFlipEffects Create effect as if unit has rotated 180 when reversing bool 1.13
repairEffect Custom movement effect, can be anything. Replaces default effect from builders
repairEffectAtTarget
repairEffectRate Defaults to 5
rotate_with_direction: Defaults to true. Makes unit body image locked to 0 degrees when false. Often used with animation_direction_* bool
animation_direction_units: 45 for 8 directions, 90 for 4 direction animation. Used with rotate_with_direction:false float
animation_direction_strideX: Animation frames to offset on direction change. int
animation_direction_strideY: Animation frames to offset on direction change. Used with frame_height. int
animation_direction_starting: Direction for first frame float
Deprecated Keys (can be used but there are better ways)
animation_TYPE_start: Deprecated, use [animation] section instead animation_moving_start: 0 int deprecated 1.13
animation_TYPE_end: End frame, must be larger then start animation_moving_end: 3 int deprecated 1.13
animation_TYPE_scale_start: Scale unit image. Defaults to 1. Useful for bio units or breathing effects. float deprecated 1.13
animation_TYPE_scale_end: Scale unit image. Defaults to 1. Useful for bio units or breathing effects. float deprecated 1.13
animation_TYPE_speed: Delay for each frame of animation. Larger values cause slower animation float deprecated 1.13
animation_TYPE_pingPong: Play animation in reverse before repeating. Useful with scale_start/scale_end bool deprecated 1.13

Section [attack]
Code Description Example Value Type
maxAttackRange: (multiplied by globalScale) float
canAttack: If set to false, can not attack any unit. Regards of other canAttack options below. bool
canAttackFlyingUnits: can also be narrowed per turret LogicBoolean
canAttackLandUnits: can also be narrowed per turret LogicBoolean
canAttackUnderwaterUnits: can also be narrowed per turret LogicBoolean
canAttackNotTouchingWaterUnits: Default true. If false unit can only attack units in contact with the water. Used for units with torpedos. (can also be set per turret) LogicBoolean
turretMultiTargeting Allow each turrets to fire at a different target at the same time. Very useful if [turret]limitingAngle is used 1.13
isMelee: Used with a low attack range (like maxAttackRange: 9) makes src and target radius get added to range, and effects AI. bool
turretRotateWithBody Are all turrets rotated when body rotates. Defaults to true bool
attackMovement: normal/bomber. bomber attack movement will retreat when energy runs out string
dieOnAttack: bool
isFixedFiring: Must aim body at target to shoot. Will often make the unit need to stop before it can aim and shoot. bool
aimOffsetSpread: Offset each shot multiplied by target radius. Defaults to 0.6 aimOffsetSpread:0 will make unit always attack center bool
stopTargetingAfterFiring Unit stops targeting after firing a shot. Rarely used or needed. 1.13
disablePassiveTargeting: Unit only attacks manually ordered target. Rarely used or needed. bool
Deprecated Keys - can be used but better to set these per turret
turretSize: (multiplied by globalScale) float
turretTurnSpeed: float
shootDelay: Global delay, can also use delay on each turret float

Section [turret_NAME]
Code Description Example Value Type
x: float
y: float
copyFrom: Copy all values from another turret as defaut values for this turret copyFrom: 1 turret ref
projectile Projectile fired from this turret. eg: projectile: torpedo projectile ref
barrelX Defaults to 0 1.13
barrelY Defaults to size. Note: size and barrelY have the same meaning 1.13
size: Controls the distance between the center of the turret and the point from where projectiles spawn. size: 5 float
turnSpeed Max turn speed of the turret
turnSpeedAcceleration Defaults to disabled, and full turn speed is used.
turnSpeedDeceleration Defaults to turnSpeedAcceleration. Setting this higher than turn acceleration might allow faster targets to be hit
idleDir Defaults to 0 float
idleDirReversing Defaults to idleDir+180 unless attached to another turret (as attached turret will often be rotating when reversing) float 1.13
shouldResetTurret: Defaults true. False to disable the reseting turret angle when idle bool
attachedTo: Id of another turret to attach to, will be positioned relative to it, and rotate with it. turret ref
slave: Locks this turret's direction and shot cooldown to attached turret. Often used with warmup for multiple barrel guns bool
isMainNanoTurret: Defaults to false. Turret to use for creating buildings, etc. should only be true on one turret, and should have canShoot set to false bool
energyUsage: Required energy to fire weapon. Same as resourceUsage: energy=X float
resourceUsage can be in credits/energy/hp/shield/ammo. Stops firing if not met resourceUsage: credits=5, energy=5, hp=100, shield=5, ammo=1 price
Timing
delay: Override global shootDelay for this turret float
linkDelayWithTurret When this other turret fires the cooldown delay on this turret will be reset/removed turret ref
warmup: Delay before firing a shot. float
warmupCallDownRate Rate to reduce warmup when turret is not ready to fire at any targets float
warmupNoReset Defaults to false. When true warmup is not reset after firing a shot. Used with warmupCallDownRate bool
warmupShootDelayTransfer Defaults to 0, a multiplier which reduces the next shot delay by the warmup value. When used with warmupNoReset, can make a each shot faster. float
Targeting control
canShoot: Defaults to true bool
canAttackFlyingUnits: Narrows targeting for this turret, note targeting for the whole unit in [attack] is applied first. (so you can only use this to target less not more) LogicBoolean
canAttackLandUnits: LogicBoolean
canAttackUnderwaterUnits: LogicBoolean
canAttackNotTouchingWaterUnits: Default true. If false unit can only attack units in contact with the water. Used for units with torpedos. LogicBoolean
canAttackCondition: Normally, used to optionally disable a turret based on a LogicBoolean. Eg: this unit's height canAttackCondition: if not self.flying LogicBoolean
clearTurretTargetAfterFiring 1.13
limitingRange: Make this turret have less range than the maxAttackRange. Do not apply this to all turrets change maxAttackRange instead. float
limitingAngle Linked with idleDir. Turret will only be able to fire at units +/- this angle. 1.13
limitingMinRange Sets minimum range for turret. limitingMinRange: 200 1.13
interceptProjectiles_withTags Currently used with anti-nuke units. 1.13
interceptProjectiles_andTargetingGroundUnderDistance
interceptProjectiles_andUnderDistance Defaults to 2000, distance inflight before firing
interceptProjectiles_andOverHeight Defaults to 0
laserDefenceEnergyUse: Set to enable a projectile laser defence from this turret. Should also set the energyMax in core. float
Graphics and effects
invisible: Don't render this turret, but still can shoot, etc. LogicBoolean
image: Use custom image. Overrides unit's main turret image file (image)
image_applyTeamColors bool
image_drawOffsetX float
image_drawOffsetY float
chargeEffectImage: Used with warmup. Shows a scaling effect image on turret barrel when charging. file (image)
warmupStartEffect effects
shoot_sound: string
shoot_sound_vol: float
shoot_flame: Current types are: small, large, smoke, shockwave, or CUSTOM: effectSectionName eg: shoot_flame: smoke, CUSTOM:lightFade, CUSTOM:pop*5 effects
shoot_light color
idleSpin: Spin rate when idle, used on missile turrets float
onShoot_playAnimation Play a custom animation from an [animation] section after firing this turret animation ref
recoilOffset Push turret forward or back after firing for a recoil effect. Value in pixels. float
recoilOutTime Time to get to offset position after firing float
recoilReturnTime Time to return to default position float

Section [projectile_NAME]
Code Description Example Value Type
life: How long till this projectile gets removed if it hasn't hit a target, 300 might be a good starting point, change depending on speed and range int
deflectionPower: Defaults to 1. Energy needed for laser defence to deflect. -1 to disable deflection (only disable for special weapons like flames) float
explodeOnEndOfLife Default to false. True to explode at end of life with all side effects and area damage instead of disappearing bool 1.13
autoTargetingOnDeadTarget: Retarget to nearby unit if target dies while in transit bool
unloadUpToXUnitsFromSource Unload X units from source unit, to projectile explode location int 1.13
teleportSource Move unit that shot this projectile to projectile explode location bool 1.13
spawnUnit Spawn new units of this type at projectile explode location eg: spawnUnit: heavyTank, tank*5, hoverTank unit types 1.13
tags tags 1.13
flameWeapon: Generates small flames on hit (only cosmetic) bool
Damage
directDamage: Damage to target unit on hit. Does not work with targetGround:true as we don't have a unit target int
areaDamage: directDamage or areaDamage is required int
areaRadius: How wide areaDamage effects. Note this drops off. float 1.13
areaExpandTime float 1.13
areaHitAirAndLandAtSameTime bool 1.13
areaHitUnderwaterAlways Defaults to false
buildingDamageMultiplier Defaults to 1 float 1.13
shieldDamageMultiplier Defaults to 1. eg: 0 to do no damage to shields and 2 to do double damage float 1.13
shieldDefectionMultiplier Defaults to 1. eg: 0 to ignore shields and directly damage hull float 1.13
armourIgnoreAmount Amount of armour to ignore on target and do damage as if this armour was not there
friendlyFire Lets area effect projectiles damage own team units (can't damage allies). Useful for nuke-like weapons friendlyFire: false / friendlyFire: true / friendlyFire: only-ignoreEnemy bool/string 1.13
Movement
targetGround Target ground, and don't home in on target. Note: only areaDamage is applied if targeting ground. bool
speed: float
targetSpeed: Accelerate to this speed float
targetSpeedAcceleration float 1.13
ballistic: bool
ballistic_delaymove_height: float
ballistic_height: float
targetGroundSpread: Randomly makes the shot inaccurate by this amount. Also used by weapons like the flamethrower float
speedSpread: Randomly change the starting projectile speed by this amount float
instant Hit target instantly bool
instantReuseLast: Recycles last projectile fired, only one projectile ever exists. Can turn lasers into beam weapons by using lower rate of fire and setting this to true bool
disableLeadTargeting Disable the lead targeting calculations when aiming at a moving target. Defaults false. bool 1.13
leadTargetingSpeedCalculation The expected speed of this projectile for targetGround lead target calculation. Defaults to 'targetSpeed' if set otherwise 'speed'. float 1.13
Graphics and effects 1.13
color color: #bebe50 color
image: Use custom image. Overrides drawType and frame file (image)
drawType Built-in image to use. 0:projectiles.png 1:projectiles_large.png 2:projectiles2.png drawType:1 int
drawSize: Scale image. Defaults to 1 float
frame Built-in image frame to use, starts at zero. int
hitSound: Default true bool
explodeEffect explodeEffect: smallExplosion, CUSTOM:myExplodeEffect effect ref list 1.13
explodeEffectOnShield Use this effect if shield is active on target effect ref list 1.13
teamColorRatio Mix 0-1 of team colour into color field float 1.13
drawUnderUnits bool 1.13
effectOnCreate effect ref list 1.13
shouldRevealFog Reveal fog to player on explode bool 1.13
alwaysVisibleInFog bool 1.13
nukeWeapon Shows on mini-map when fired. Some other side effects as well. bool 1.13
trailEffect true for built-in defaults, but can also point to any custom effects bool/effect
trailEffectRate Defaults to 3 float 1.13
lightSize: float
lightColor lightColor: #ffe92b color
largeHitEffect: Creates a large explosion and accompanying sound on hit (only cosmetic) bool
lightingEffect: Draw as lighting works best with instant:true bool
laserEffect: Draw as laser works best with instant:true bool

Section [movement]
Code Description Example Value Type
movementType: Defines what kind of terrain the unit will be able to move over, along with other properties related to unit types.
movementType: LAND string
slowDeathFall: Used with large aircraft. Makes the unit fall slowly while maintaining its speed at the time of death. slowDeathFall: true bool
moveSpeed: Maximum movement speed of the unit. moveSpeed: 1.2 float
moveAccelerationSpeed: Defines how fast units accelerate to max speed. moveAccelerationSpeed: 0.07 float
moveDecelerationSpeed: Don't make this too low or units will have trouble stopping at waypoints moveDecelerationSpeed: 0.17 float
reverseSpeedPercentage: 0.6 default. Over 0.4 will reverse for short distances (at 40% speed). If set to 1 will drive in reverse samereverseSpeedPercentage:
as forwards. Useful if slow0turning float
landOnGround: Should flying unit land when idle. landOnGround: false bool
targetHeight: Defaults to 0 but if AIR movementType default is 35 targetHeight: 25 float
targetHeightDrift: Smooth animated height change. Defaults to 0 but if AIR movementType default is 1.5 targetHeightDrift: 1 float
startingHeightOffset
maxTurnSpeed: float
turnAcceleration: float
moveSlidingMode: bool
moveIgnoringBody: bool
moveSlidingDir: int
joinsGroupFormations: Defaults to true. Changing not recommended bool

Section [ai]
Code Description Example Value Type
useAsBuilder: Set to true if unit can build or repair buildings. Defaults to [core]isBuilder. bool
disableUse: Disallow AI building this unit or building bool
ai_upgradePriority Defaults to 0.06. Set between 0-1, higher means AI is more likely to upgrade this unit before others float
Buildings only
buildPriority: 0-1. AI uses 0.8 for first land factory, 0.48 for air factory, 0.47 for first turret. float
noneInBaseExtraPriority: Adds to buildPriority, if this unit doesn't exist in the AIs base float
noneGlobalExtraPriority: Adds to buildPriority, if this unit doesn't exist in the any where on the map float
upgradedFrom: Create link to another unit to preserve max counts for upgraded and non-upgraded types in same base. string
maxGlobal: int
maxEachBase: int

Section [leg_#] / [arm_#]


Code Description Example Value Type
x: Sets position of the foot on the X axis. float
y: Sets position of the foot on the Y axis. float
copyFrom: Copy from another leg. Useful to only need to set leg values once copyFrom: 1 int
attach_x: Sets the leg's attach point on the X axis. float
attach_y: Sets the leg's attach point on the Y axis. float
rotateSpeed: float
endDirOffset Target foot/end rotation relative to body
lockMovement Lock to unit body. Useful if walking unit converted to a flying unit. bool
heightSpeed: float
moveSpeed
moveWarmUp
holdDisMin: Defaults to 7. Reposition leg at this distance if neighbor legs are not already repositioning. float
holdDisMax: Defaults to 16. Force reposition of leg at this distance. float
holdDisMin_maxMovingLegs
hold_moveOnlyIfFurthest
holdDisMin_checkNeighbours
hardLimit: Defaults to 50. Force leg to never go this far. Better to not be reached. float
estimatingPositionMultiplier defaults to 1. Predicts were unit will be for leg placement based on unit speed. float
Graphics and effects
hidden: logic boolean
image_end image 1.13
image_end_shadow image 1.13
image_end_teamColors 1.13
image_foot same as image_end image 1.13
image_foot_shadow image
image_middle image 1.13
image_leg same as image_middle image
draw_foot_on_top bool 1.13
drawOverBody Draw over the body of unit, defaults of false bool
drawUnderAllUnits Draw over all units bool
drawDirOffset float
dust_effect: Spawns dust particles on each step. bool
spinRate Makes arm/leg spin, like idleSpin for turrets float
favourOppositeSideNeighbours calculate neighbours with X 10 times closer than Y
drawLegWhenZoomedOut For performance, defaults changes based on unit size
drawFootWhenZoomedOut For performance, defaults changes based on unit size
resetAngle: Unused float

Section [effect_NAME]
Code Description Example Value Type
life Defaults 200. Time till effect is removed. Set low as possible to reduce effect overhead. float 1.13
alsoEmitEffects Create more effects when created, useful for meta-effects. Note: other 'alsoEmitEffects' on created effects are ignored. effect ref 1.13
ifSpawnFailsEmitEffects If 'spawnChance' for this effects fails then emit these effects instead
alsoPlaySound sound ref 1.13
createWhenOffscreen Defaults false. bool 1.13
createWhenZoomedOut Defaults true bool 1.13
createWhenOverLiquid Defaults true bool 1.13
createWhenOverLand Defaults true bool 1.13
spawnChance Default 1. If less than 1 effect only has a random chance of being created float 1.13
showInFog Default false boolean 1.13
delayedStartTimer Hide for x time before showing and updating effect. float 1.13
liveAfterAttachedDies Defaults false when attachedToUnit is being used bool 1.13
priority Defaults to high. verylow/low/high/veryhigh/critical. Takes effect when too many effects are being shown at once. string 1.13
Movement
attachedToUnit Attach to unit or projectile that created this effect. Will move with this object. bool 1.13
alwayStartDirAtZero Ignore source/attached unit dir bool 1.13
atmospheric Apply drag to slow this effect down and add small wind effects bool 1.13
physics Fall to ground and bounces. Needs height to take effect. bool 1.13
physicsGravity Defaults to 1. height speed acceleration when physics: true float 1.13
xOffsetRelative Offset starting effect position. Relative to direction of attached turret, projectile, unit float 1.13
yOffsetRelative Offset starting effect position. Relative to direction of attached turret, projectile, unit float 1.13
xOffsetRelativeRandom Random offset by +/- this value float 1.13
yOffsetRelativeRandom Random offset by +/- this value float 1.13
xOffsetAbsolute Offset starting effect by position ignoring direction of attached turret, projectile, unit float 1.13
yOffsetAbsolute Offset starting effect by position ignoring direction of attached turret, projectile, unit float 1.13
xOffsetAbsoluteRandom Random offset by +/- this value float 1.13
yOffsetAbsoluteRandom Random offset by +/- this value float 1.13
xSpeedRelative float 1.13
ySpeedRelative float 1.13
xSpeedRelativeRandom Randomly change by -value to value float 1.13
ySpeedRelativeRandom Randomly change by -value to value float 1.13
xSpeedAbsolute float 1.13
ySpeedAbsolute float 1.13
xSpeedAbsoluteRandom Randomly change by -value to value float 1.13
ySpeedAbsoluteRandom Randomly change by -value to value float 1.13
hOffset height offset from source float 1.13
hOffsetRandom Randomly change by -value to value float 1.13
hSpeed height speed float 1.13
hSpeedRandom Randomly change by -value to value float 1.13
dirOffset rotation float 1.13
dirOffsetRandom Randomly change by -value to value float 1.13
dirSpeed rotation speed float 1.13
dirSpeedRandom Randomly change by -value to value float 1.13
Graphics
frameIndex frame of to use int 1.13
stripIndex A built-in image set to use. Cannot be used with custom image effects/explode_big/light_50/flame/effects/effects2/projectiles/projectiles2/explode_bitsint/string 1.13
Image Custom image file to use. Cannot be used with stripIndex. image 1.13
imageShadow Custom image file to use for shadows image
scaleTo Defaults to 1 float 1.13
scaleFrom Defaults to 1 float 1.13
color Defaults #FFFFFFFF color 1.13
teamColorRatio 0-1
drawUnderUnits bool 1.13
fadeInTime Fade alpha from 0% to 100% for this time at start float 1.13
fadeOut Fade alpha from 100% to 0% based on life. Set alpha is higher than 1 to delay fade bool 1.13
alpha Capped between 0-1. Can be set higher than 1 to delay fadeOut effects
shadow True to draw a shadow. Forced true if imageShadow is used
Animation
total_frames Total frames of 'image', used with animation or frameIndex. Only needed with custom images int 1.13
animateFrameStart int 1.13
animateFrameEnd int 1.13
animateFramePingPong int 1.13
animateFrameSpeed time 1.13
animateFrameSpeedRandom time 1.13

Section [animation_NAME]
Code Description Example Value Type
onActions : Unknown move, attack, idle, underConstruction, underConstructionWithLinkedBuiltTime, queuedUnits 1.13
onActionsQueuedUnitPlayAt : float For onAction: queuedUnits. Amount queue needs to reach before starting, set between 0-1 1.13
blendIn : time Blend with last animation for this time 1.13
blendOut : time Blend with next animation for this time 1.13
pingPong Play animation in reverse after it ends bool 1.13
KeyframeTimeScale : float Scales all keyframe times, useful to make an animation faster/slower without changing everything float 1.13
Keyframes - create as many as needed
arm#_[time] Adds a keyframe at time. Use multiple times to create animation. eg: arm1_5s: {x: 5, dir: 90 } 1.13
leg#_[time] Adds a keyframe at time. Use multiple times to create animation.
body_[time] Adds a keyframe at time for body. Only frame and scale allowed on body eg: body_4s: {frame: 4, scale: 0.5}
Deprecated Keys (can be used but there are better ways)
start : int Start image frame. deprecated 1.13
end : int End image frame. deprecated 1.13
scale_start : float Start scale. Deprecated, use body keyframes instead. 1.13
scale_end : float End scale. Deprecated, use body keyframes instead. 1.13
speed : float Speed, smaller is faster. Only effects start, end, scale_start, scale_end 1.13

Section [action_NAME]
Code Description Example Value Type
text Text shown in UI string
text_{LANG}
description A display text when you select your unit's action, used to explain it's purpose. string
description_{LANG}
displayType none, rally, upgrade, queueUnit, building, action, infoOnly, infoOnlyNoBox
displayRemainingStockpile Queue is shown as number of times action can be triggered based on price bool
pos Order action appears in UI float
iconImage
Requirements to trigger or enable
price The price of your action for the unit. Disables action if not available. Defaults to credits if unlabelled price: credits=5, energy=5, hp=100, shield=5, ammo=1 resources
isActive Defaults true. If false then action is disabled and shown in red in UI. LogicBoolean
isVisible Defaults true. If false action is hidden from UI and disabled. LogicBoolean
isLocked Defaults false. If true action is disabled, and a lock icon is shown. Mostly used for no nuke game modes LogicBoolean
isLockedMessage string
onlyOneUnitAtATime When action is picked in UI, only one unit selected with get this action. Defaults to false. bool
autoTrigger When true triggers the effects of this action instantly (ignoring price, isActive, isVisible, buildSpeed, etc) autoTrigger: if self.overWater() LogicBoolean
ai_isDisabled Defaults false. Stop AI using this action. LogicBoolean
While action is queued
buildSpeed buildSpeed: 5s time
highPriorityQueue Defaults to false. If true this action skips all other low priority actions in queue. Useful for fireTurret actions. bool
canPlayerCancel bool
whenBuilding_cannotMove Stops unit moving while action is being applied. Useful for deploy like actions. bool
whenBuilding_playAnimation Play a custom animation from an [animation] section when in active queue animation ref
whenBuilding_rotateTo Rotate unit body to this direction when action is in active queue float
whenBuilding_rotateTo_orBackwards If true allow rotation in 180 degrees from whenBuilding_rotateTo when this is a smaller angle bool
whenBuilding_rotateTo_waitTillRotated Pause action queue till rotation is finished bool
whenBuilding_temporarilyConvertTo Convert to another unit while action is in active queue. Note: actions from the original unit will be kept unit ref
spawnEffectsOnQueue Effects to spawn at unit when action is first added to queue effect ref
playSoundToPlayerOnQueue Global sound to play to unit's player only when action is first added to queue sound ref
Results (What happens) - Must be at least one result listed
convertTo Convert your unit into another unit. properties are preserved. unit ref
fireTurretXAtGround When action finishes fire target turret at point on ground, bypasses canShoot rules in turret. fireTurretXAtGround: nukeSilo turret ref
fireTurretXAtGround_withOffset If not set player targets the ground with GUI, if a point is set this step is skipped fireTurretXAtGround_withOffset: 0,0 point
fireTurretXAtGround_withProjectile Used with fireTurretXAtGround. Defaults to target turret's normal projectile. projectile ref
addEnergy Adds energy to unit. Has no effect unless energyMax is set float
addResources Add these resources when action finishes. addResources: credits=5, energy=-5, hp=-100, shield=5, ammo=1 resources
alsoTriggerAction Trigger to results of another action as well. Ignores action's requirements action ref
alsoQueueAction Adds another action into the normal unit's queue. Ignores action's requirements action ref
alsoTriggerOrQueueActionConditional Defaults true. alsoTriggerAction and alsoQueueAction are ignored if this works out to be false. LogicBoolean
spawnEffects Effects to spawn at unit effect ref
playSoundAtUnit Local sound to play when action finishes sound ref
playSoundGlobally Global sound to play to all players in game sound ref
playSoundToPlayer Global sound to play to unit's player only sound ref
addUnitsIntoTransport Add units into transport, use self.transportingCount() to check for space before adding addUnitsIntoTransport: tank*3, heavyTank
deleteNumUnitsFromTransport int
resetCustomTimer Reset timer used with self.customTimer() LogicBoolean

Type LogicBoolean
Code Description Example Targets
true
false
if Start all logic booleans with if, unless just using true/false
and if self.isInWater() and self.energy(greaterThan=1)
or if (self.energy(greaterThan=1) or self.ammo(greaterThan=1)) and self.isFlying()
not if not self.isOverLiquid()
Unit location and movement
self.isUnderwater()
self.isAtGroundHeight()
self.isFlying()
self.isMoving()
self.isAtTopSpeed()
self.isInWater() Touching water
self.isOverwater() Touching or over a water tile
self.isOverLiquid()
self.isOverClift()
self.isOverPassableTile() (parameters: type)
self.isOverOpenLand() shortcut for self.isOverPassableTile(type='LAND')
Unit stats
self.hp() (parameters: greaterThan, lessThan, empty, full)
self.ammo() (parameters: greaterThan, lessThan, empty, full)
self.isAmmoEmpty() shortcut for self.ammo(empty=true)
self.ammoIncludingQueued() Also includes ammo from actions still in queue (parameters: greaterThan, lessThan, empty, full) if self.ammoIncludingQueued(lessThan=12)
self.energy() (parameters: greaterThan, lessThan, empty, full)
self.energyIncludingQueued() Also includes energy from actions still in queue (parameters: greaterThan, lessThan, empty, full)
self.isEnergyFull() shortcut for self.energy(full=true)
self.isEnergyEmpty() shortcut for self.energy(empty=true)
self.shield() (parameters: greaterThan, lessThan, empty, full)
self.kills() (parameters: greaterThan, lessThan)
Misc
game.nukesEnabled()
self.hasFlag() Boolean flag saved into units for mods to use. (parameters: id=0-31) Use addResources in action change this vaule
self.tags() (parameters: includes)
self.transportingCount() (parameters: greaterThan, lessThan, empty)
self.isAttacking()
self.transportingUnitWithTags() (parameters: includes) self.transportingUnitWithTags(includes='human')
self.hasTakenDamage() (parameters: withinSeconds=X, laterThanSeconds=X) self.hasTakenDamage(withinSeconds=1)
self.timeAlive() (parameters: withinSeconds=X, laterThanSeconds=X)
self.lastConverted() (parameters: withinSeconds=X, laterThanSeconds=X)
self.customTimer() (parameters: withinSeconds=X, laterThanSeconds=X)
self.isOnNeutralTeam()
numberOfUnitsInTeam() (parameters: withTag, greaterThan, lessThan, withinRange, incompleteBuildings, factoryQueue) numberOfUnitsInTeam(withTag='techUnlockBuilding', greaterThan=0)

Type Resources - used by addResources, price, etc


Code Description Example Targets
credits Global resource
energy
hp
shield price: hp=-100, shield=100
ammo Hidden value on each unit for use by mods
setFlag use with addResources, resourceUsage or price. 0-31. Flags are stored in each unit setFlag=1
unsetFlag use with addResources, resourceUsage or price. 0-31
hasFlag use with price or resourceUsage
hasMissingFlag use with price or resourceUsage
This sheet is for 1.13, for 1.13.2 see sheet tabs below.
Section [core]
Code Description Example Value Type
Common keys
name: Defines the raw name for your unit, in which case the game uses to identify as a unique name. (This name
name:
is not
customTank_1
displayed in-game) string
altNames: comma separated list of names. Like name but lower priority, useful for multiple optional mods. altNames: custTank1, customTank1, cTank1 string(s)
class: Reserved for future use, must be CustomUnitMetadata class: CustomUnitMetadata string
price: The cost of your unit from builders/buildings. price: 500 int
mass: The 'weight' of your unit, this will define how it collides with other units, a greater value means it is tougher
mass:
to push.
3000 int
techLevel: Defines the Tech Level of your unit, there are 3 levels and each will appear in a different color in the GUI.techLevel: 1 int
buildSpeed: Time it takes to build unit (may multiply with builder speed) Formulae for seconds: 10 ÷ 60 = 0.16 (0.16 will
buildSpeed:
make it take
0.1610 seconds to build) float
radius: Circular area around your unit that makes it selectable (mouse click/screen touch) radius: 20 int
isBio: Choose whether your unit is bioligical or not, will effect sound and splat (unless hideScorchMark is true) isBio: false bool
isBug: Changes some death defaults, and sort order in sandbox bool
isBuilder Normally required if this unit places buildings. Defaults to [ai]useAsBuilder 1.13
Unit stats
maxHp: The max health for your unit. (will spawn with this value) maxHp: 200 int
selfRegenRate: Passive self repair rate float
maxShield: The max shield hitpoints of your unit. Can start with 0 hitpoints if startShieldAtZero is set to true maxShield: 500 int
startShieldAtZero: Sets the unit's shield to 0 HP when it is first built. startShieldAtZero: true bool
shieldRegen: Passive shield regen rate shieldRegen: 0.15 float
energyMax: Defaults to 0. Energy can be used as ammo for turrets or for laser defense energyMax: 1 float
energyRegen: float
energyStartingPercentage: Sets the percentage of charged energy when the unit is first built. energyStartingPercentage: 0.5 float
energyNeedsToRechargeToFull: Disable weapons using energy after reaching zero till fully recharged float
armour Damage taken away from each hit (not currently used in any core units) 1.13
armourMinDamageToKeep Min damage to keep. Defaults to 1 1.13
generation_credits: Income unit creates generation_credits: 2 int
generation_delay: How often generation_credits is added. Defaults to 40 (changing not recommended) generation_delay: 40 int
UI and Graphics related keys
showInEditor: Set to false to hide unit in sandbox editor (Default true) showInEditor: true bool
displayText The name of your unit that the game shows to the player. displayText: Custom Tank string
displayText_{LANG} LANG=ISO 639-1 Code to show this text instead when game is in this language displayText_es: Hola 1.13
displayDescription Description of your unit that the game shows to the player. displayDescription: - Fast movement.\n- Light damage. string
displayDescription_{LANG} LANG=ISO 639-1 Code to show this text instead when game is in this language displayDescription_es: -Movimiento rapido\n-Daño ligero 1.13
displayLocaleKey: Translation file key for unit name and description displayLocaleKey: units.mechArtillery string
displayRadius: Defaults to radius value. Set to show a larger or smaller selection box ui on units. displayRadius: 20 int
shieldRenderRadius
shieldDisplayOnlyDeflection: Hide shield (if active) unless deflecting shot shieldDisplayOnlyDeflection: false bool
shieldDeflectionDisplayRate: Defaults to 4. High value causes shield deflection to fade disappear faster shieldDeflectionDisplayRate: 3 float
Building only keys
isBuilding: bool
footprint Only applies to buildings, tiles taken up which block unit movement. Defaults to 0,0,0,0 = 1 center tile footprint: -1,-1,1,1
constructionFootprint Only applies to buildings, tiles taken up for placement of other buildings. Defaults to 0,0,0,0 constructionFootprint: -1,-1,1,3
buildingSelectionOffset: Defaults to 0. Adds or removes padding on the drawn selection rect in UI int
buildingToFootprintOffsetX Defaults to 10 float
buildingToFootprintOffsetY Defaults to 10 float
placeOnlyOnResPool: Normally used for extractors bool
selfBuildRate: Rate unit builds it's self when placed without a builder float
Misc Keys
copyFrom: Use unit data from another ini file as base copyFrom: customTank_Default file (ini)
dont_load: Do not load unit, and don't error on missing data. Can be useful when used with copyFrom dont_load: true bool
overrideAndReplace: Override another unit with this unit. Build links pointing to target unit will be replaced with this unit. And this
overrideAndReplace:
unit will replace target
builder,
on maps.
combatEngineer string(s)
globalScale: Defaults to 1. Changing not recommend globalScale: 1 float
isLocked: Disallow building of this unit. Can be used with overrideAndReplace to restrict units the player is allowedisLocked:
to build. false bool
isLockedIfGameModeNoNuke Disallows building of this unit if nukes are disabled during match setup. isLockedIfGameModeNoNuke: false 1.13
experimental: Tag unit as experimental. Affects zoomed out icon and end game stats. experimental: false bool
stayNeutral: Set to false to disable capture when unit is on the neutral team stayNeutral: false bool
createNeutral 1.13
resourceRate: Used with canReclaimResources. Experimental feature that is not yet finished. float
tags List of any comma separated strings. Only used for transportUnitsRequireTag right now, will be used for other things in future 1.13
fogOfWarSightRange: Set number of tiles this unit can see. Defaults to 15 fogOfWarSightRange: 15 int
softCollisionOnAll: int
isUnrepairableUnit No unit can repair this unit 1.13
isPickableStartingUnit If true, unit is added to dropdowns for starting unit in game setup menus. 1.13
startFallingWhenStartingUnit 1.13
soundOnAttackOrder List of sounds. Only one will be played each attack order sound
soundOnMoveOrder List of sounds. Only one will be played each move order sound
Transport related keys
transportSlotsNeeded: Defaults to 1. Number of slots this unit uses up in a transport, Experimentals are often set to 5 to stop small transports holding them. int 1.13
maxTransportingUnits Number of slots this units as for transporting other units. int
transportUnitsRequireTag Only allow trasport of units that have one of these tags. tags 1.13
transportUnitsRequireMovementType Only allow trasport of units that have one of these movement types. movementTypes 1.13
transportUnitsBlockAirAndWaterUnits Defaults to true if transportUnitsRequireMovementType is empty 1.13
transportUnitsKeepBuiltUnits Makes built units stay inside transport instead of exiting it once ready LogicBoolean 1.13
transportUnitsCanUnloadUnits Defaults to: if not self.isOverLiquid() and not self.isMoving() LogicBoolean 1.13
transportUnitsAddUnloadOption Should unload button be added to the menu LogicBoolean 1.13
transportUnitsKillOnDeath Default true. If false transporting units don't die when transport dies eg: if self.isOverLiquid() LogicBoolean 1.13
transportUnitsHealBy Rate to heal units being transported float 1.13
Construction and factory related keys
canRepairBuildings: isBuilder:true is required as well right now) bool
canRepairUnits: isBuilder:true is required as well right now) bool
canReclaimResources: Used with resourceRate. Experimental feature that is not yet finished. bool
autoRepair: Automatically try and repair damaged units in range ([ai]useAsBuilder:true is required as well right now) bool
nanoRange: Defaults to 85 int
nanoRepairSpeed: Defaults to 0.2 float
nanoBuildSpeed: Defaults to 1 float
nanoFactorySpeed: Defaults to 1 float
builtFrom_#_name: canBuild and builtFrom have the same effect just in the opposite direction. BuiltFrom is useful if adding new units to existing buildings string
builtFrom_#_pos: Order action appears in UI. string
builtFrom_#_forceNano: Build as if this was a building (even if it's a unit) bool
canBuild_#_name: List of units this unit can create. Can be buildings or units. (isBuilder:true and canRepairBuildings:true is recommended when adding buildings) units
canBuild_#_pos: Order action appears in UI string
canBuild_#_tech: Tech level. Mostly just effects action colour in UI. Defaults to 1 int
canBuild_#_forceNano: Build target as if it was a building (even if it's a unit) bool
exit_x: Where created or unloaded units appear. Defaults to 0 exit_x: 0 float
exit_y: Where created or unloaded units appear. Defaults to 5. exit_x: 5 float
exit_dirOffset : float Defaults to 180 for units. 0 for buildings 1.13
exit_heightOffset : float Defaults to 0 1.13
exit_moveAwayAmount : float Defaults to 70 1.13
Death related keys
dieOnConstruct: Delete this unit when it starts making a building. Target building likely will need selfBuildRate set to be created without a builder. bool
dieOnZeroEnergy Kill this unit if energy level reaches zero. dieOnZeroEnergy: false bool 1.13
numBitsOnDeath int
nukeOnDeath: bool
nukeOnDeathRange: float
nukeOnDeathDamage: float
nukeOnDeathDisableWhenNoNuke: Defaults to false bool
fireTurretXAtSelfOnDeath
explodeOnDeath defaults to true boolean 1.13
explodeOnDeathGroundCollision defaults to true boolean 1.13
effectOnDeath effect ref 1.13
effectOnDeathGroundCollision effect ref 1.13
unitsSpawnedOnDeath unit list unitsSpawnedOnDeath: tank*5, hoverTank units 1.13
unitsSpawnedOnDeath_setToTeamOfLastAttacker bool
hideScorchMark: bool
Deprecated Keys (can be used but there are better ways)
action_#_convertTo: Deprecated in 1.13, use [action_x] sections instead action_1_convertTo: customTank_2 string deprecated 1.13
action_#_pos: Order action appears in UI float deprecated 1.13
action_#_price: The price of your action for the unit. (All your sub actions will be linked to the # you use) action_1_price: 1000 int deprecated 1.13
action_#_text: A display text when you select your unit's action, used to explain it's purpose. (All your sub actions will beaction_1_text:
linked to the #Upgrade
you use)to Custom Tank 2 string deprecated 1.13
action_#_description: string deprecated 1.13
action_#_addEnergy: Adds energy to unit. Has no effect unless energyMax is set float deprecated 1.13
action_#_whenBuilding_cannotMove: Stops unit moving while action is being applied. Useful for deploy like actions. bool deprecated 1.13

Section [graphics]
Code Description Example Value Type
image: File path to png image. file (image)
image_back: An optional image drawn behind other units. Useful for factories that units exit file (image)
image_wreak: Image to use when unit dies. Can be NONE to leave no wreak file (image)
image_offsetX: int
image_offsetY: int
teamColorsUseHue: False: Green pixels on unit gets converted to team color. True: Whole unit is tinted the team colour. Defaults to false bool
imageSmoothing: bool
scaleImagesTo: Resize image to fit this value in pixels. Effects leg, and shadow images as well. float
imageScale: Resize image. Defaults to 1. Effects leg, and shadow images as well. float
drawLayer: Set to experimentals, or leave line out string
whenBeingBuiltMakeTransparentTill float 1.13
Turrets (images can also be set on each turret)
image_turret: Default image for all turrets, can also be set per turret file (image)
teamColorsOnTurret Defaults false. Apply team colours on turret as well. Also effects pre-turret images bool
scaleTurretImagesTo: float
lock_body_rotation_with_main_turret: Locks body image locked to first turret's direction bool
lock_leg_rotation_with_main_turret bool 1.13
Shadow
image_shadow: Image file, NONE, or AUTO. (AUTO will use image and make it transparent black only.) file (image)
shadowOffsetX: float
shadowOffsetY: float
lock_shadow_rotation_with_main_turret:Locks body image shadow locked to first turret's direction bool
Effects and animation
total_frames Defaults to 1. Animations require this. int
frame_width: Calculated for you if total frames is set, but can be overridden int
frame_height: Defaults to image height int
splastEffect: True to create a water wave effect when over water. Default false bool
dustEffect: True to create a dust effect when over land. Default false bool
splastEffectReverse: True to also create effect when unit is reversing bool
dustEffectReverse: True to also create effect when unit is reversing bool
movementEffect Custom movement effect, can be anything eg: movementEffect: smoke, CUSTOM:fastDust*2, CUSTOM:pop*5 effect 1.13
movementEffectReverse effect 1.13
movementEffectRate float 1.13
movementEffectReverseFlipEffects Create effect as if unit has rotated 180 when reversing bool 1.13
repairEffect Custom movement effect, can be anything. Replaces default effect from builders
repairEffectAtTarget
repairEffectRate Defaults to 5
rotate_with_direction: Defaults to true. Makes unit body image locked to 0 degrees when false. Often used with animation_direction_* bool
animation_direction_units: 45 for 8 directions, 90 for 4 direction animation. Used with rotate_with_direction:false float
animation_direction_strideX: Animation frames to offset on direction change. int
animation_direction_strideY: Animation frames to offset on direction change. Used with frame_height. int
animation_direction_starting: Direction for first frame float
Deprecated Keys (can be used but there are better ways)
animation_TYPE_start: Deprecated, use [animation] section instead animation_moving_start: 0 int deprecated 1.13
animation_TYPE_end: End frame, must be larger then start animation_moving_end: 3 int deprecated 1.13
animation_TYPE_scale_start: Scale unit image. Defaults to 1. Useful for bio units or breathing effects. float deprecated 1.13
animation_TYPE_scale_end: Scale unit image. Defaults to 1. Useful for bio units or breathing effects. float deprecated 1.13
animation_TYPE_speed: Delay for each frame of animation. Larger values cause slower animation float deprecated 1.13
animation_TYPE_pingPong: Play animation in reverse before repeating. Useful with scale_start/scale_end bool deprecated 1.13

Section [attack]
Code Description Example Value Type
maxAttackRange: (multiplied by globalScale) float
canAttack: If set to false, can not attack any unit. Regards of other canAttack options below. bool
canAttackFlyingUnits: can also be narrowed per turret LogicBoolean
canAttackLandUnits: can also be narrowed per turret LogicBoolean
canAttackUnderwaterUnits: can also be narrowed per turret LogicBoolean
canAttackNotTouchingWaterUnits: Default true. If false unit can only attack units in contact with the water. Used for units with torpedos. (can also be set per turret) LogicBoolean
turretMultiTargeting Allow each turrets to fire at a different target at the same time. Very useful if [turret]limitingAngle is used 1.13
isMelee: Used with a low attack range (like maxAttackRange: 9) makes src and target radius get added to range, and effects AI. bool
turretRotateWithBody Are all turrets rotated when body rotates. Defaults to true bool
attackMovement: normal/bomber. bomber attack movement will retreat when energy runs out string
dieOnAttack: bool
isFixedFiring: Must aim body at target to shoot. Will often make the unit need to stop before it can aim and shoot. bool
aimOffsetSpread: Offset each shot multiplied by target radius. Defaults to 0.6 aimOffsetSpread:0 will make unit always attack center bool
stopTargetingAfterFiring Unit stops targeting after firing a shot. Rarely used or needed. 1.13
disablePassiveTargeting: Unit only attacks manually ordered target. Rarely used or needed. bool
Deprecated Keys - can be used but better to set these per turret
turretSize: (multiplied by globalScale) float
turretTurnSpeed: float
shootDelay: Global delay, can also use delay on each turret float

Section [turret_NAME]
Code Description Example Value Type
x: float
y: float
copyFrom: Copy all values from another turret as defaut values for this turret copyFrom: 1 turret ref
projectile Projectile fired from this turret. eg: projectile: torpedo projectile ref
barrelX Defaults to 0 1.13
barrelY Defaults to size. Note: size and barrelY have the same meaning 1.13
size: Controls the distance between the center of the turret and the point from where projectiles spawn. size: 5 float
turnSpeed Max turn speed of the turret
turnSpeedAcceleration Defaults to disabled, and full turn speed is used.
turnSpeedDeceleration Defaults to turnSpeedAcceleration. Setting this higher than turn acceleration might allow faster targets to be hit
idleDir Defaults to 0 float
idleDirReversing Defaults to idleDir+180 unless attached to another turret (as attached turret will often be rotating when reversing) float 1.13
shouldResetTurret: Defaults true. False to disable the reseting turret angle when idle bool
attachedTo: Id of another turret to attach to, will be positioned relative to it, and rotate with it. turret ref
slave: Locks this turret's direction and shot cooldown to attached turret. Often used with warmup for multiple barrel guns bool
isMainNanoTurret: Defaults to false. Turret to use for creating buildings, etc. should only be true on one turret, and should have canShoot set to false bool
energyUsage: Required energy to fire weapon. Same as resourceUsage: energy=X float
resourceUsage can be in credits/energy/hp/shield/ammo. Stops firing if not met resourceUsage: credits=5, energy=5, hp=100, shield=5, ammo=1 price
Timing
delay: Override global shootDelay for this turret float
linkDelayWithTurret When this other turret fires the cooldown delay on this turret will be reset/removed turret ref
warmup: Delay before firing a shot. float
warmupCallDownRate Rate to reduce warmup when turret is not ready to fire at any targets float
warmupNoReset Defaults to false. When true warmup is not reset after firing a shot. Used with warmupCallDownRate bool
warmupShootDelayTransfer Defaults to 0, a multiplier which reduces the next shot delay by the warmup value. When used with warmupNoReset, can make a each shot faster. float
Targeting control
canShoot: Defaults to true bool
canAttackFlyingUnits: Narrows targeting for this turret, note targeting for the whole unit in [attack] is applied first. (so you can only use this to target less not more) LogicBoolean
canAttackLandUnits: LogicBoolean
canAttackUnderwaterUnits: LogicBoolean
canAttackNotTouchingWaterUnits: Default true. If false unit can only attack units in contact with the water. Used for units with torpedos. LogicBoolean
canAttackCondition: Normally, used to optionally disable a turret based on a LogicBoolean. Eg: this unit's height canAttackCondition: if not self.flying LogicBoolean
clearTurretTargetAfterFiring 1.13
limitingRange: Make this turret have less range than the maxAttackRange. Do not apply this to all turrets change maxAttackRange instead. float
limitingAngle Linked with idleDir. Turret will only be able to fire at units +/- this angle. 1.13
limitingMinRange Sets minimum range for turret. limitingMinRange: 200 1.13
interceptProjectiles_withTags Currently used with anti-nuke units. 1.13
interceptProjectiles_andTargetingGroundUnderDistance
interceptProjectiles_andUnderDistance Defaults to 2000, distance inflight before firing
interceptProjectiles_andOverHeight Defaults to 0
laserDefenceEnergyUse: Set to enable a projectile laser defence from this turret. Should also set the energyMax in core. float
Graphics and effects
invisible: Don't render this turret, but still can shoot, etc. bool
image: Use custom image. Overrides unit's main turret image file (image)
chargeEffectImage: Used with warmup. Shows a scaling effect image on turret barrel when charging. file (image)
warmupStartEffect effects
shoot_sound: string
shoot_sound_vol: float
shoot_flame: Current types are: small, large, smoke, shockwave, or CUSTOM: effectSectionName eg: shoot_flame: smoke, CUSTOM:lightFade, CUSTOM:pop*5 effects
shoot_light color
idleSpin: Spin rate when idle, used on missile turrets float
onShoot_playAnimation Play a custom animation from an [animation] section after firing this turret animation ref
recoilOffset Push turret forward or back after firing for a recoil effect. Value in pixels. float
recoilOutTime Time to get to offset position after firing float
recoilReturnTime Time to return to default position float

Section [projectile_NAME]
Code Description Example Value Type
life: How long till this projectile gets removed if it hasn't hit a target, 300 might be a good starting point, change depending on speed and range int
deflectionPower: Defaults to 1. Energy needed for laser defence to deflect. -1 to disable deflection (only disable for special weapons like flames) float
explodeOnEndOfLife Default to false. True to explode at end of life with all side effects and area damage instead of disappearing bool 1.13
autoTargetingOnDeadTarget: Retarget to nearby unit if target dies while in transit bool
unloadUpToXUnitsFromSource Unload X units from source unit, to projectile explode location int 1.13
teleportSource Move unit that shot this projectile to projectile explode location bool 1.13
spawnUnit Spawn new units of this type at projectile explode location eg: spawnUnit: heavyTank, tank*5, hoverTank unit types 1.13
tags tags 1.13
flameWeapon: Generates small flames on hit (only cosmetic) bool
Damage
directDamage: Damage to target unit on hit. Does not work with targetGround:true as we don't have a unit target int
areaDamage: directDamage or areaDamage is required int
areaRadius: How wide areaDamage effects. Note this drops off. float 1.13
areaExpandTime float 1.13
areaHitAirAndLandAtSameTime bool 1.13
areaHitUnderwaterAlways Defaults to false
buildingDamageMultiplier Defaults to 1 float 1.13
shieldDamageMultiplier Defaults to 1. eg: 0 to do no damage to shields and 2 to do double damage float 1.13
shieldDefectionMultiplier Defaults to 1. eg: 0 to ignore shields and directly damage hull float 1.13
armourIgnoreAmount Amount of armour to ignore on target and do damage as if this armour was not there
friendlyFire Lets area effect projectiles damage own team units (can't damage allies). Useful for nuke-like weapons friendlyFire: false / friendlyFire: true / friendlyFire: only-ignoreEnemy bool/string 1.13
Movement
targetGround Target ground, and don't home in on target. Note: only areaDamage is applied if targeting ground. bool
speed: float
targetSpeed: Accelerate to this speed float
targetSpeedAcceleration float 1.13
ballistic: bool
ballistic_delaymove_height: float
ballistic_height: float
targetGroundSpread: Randomly makes the shot inaccurate by this amount. Also used by weapons like the flamethrower float
speedSpread: Randomly change the starting projectile speed by this amount float
instant Hit target instantly bool
instantReuseLast: Recycles last projectile fired, only one projectile ever exists. Can turn lasers into beam weapons by using lower rate of fire and setting this to true bool
disableLeadTargeting bool 1.13
leadTargetingSpeedCalculation float 1.13
Graphics and effects 1.13
color color: #bebe50 color
image: Use custom image. Overrides drawType and frame file (image)
drawType Built-in image to use. 0:projectiles.png 1:projectiles_large.png 2:projectiles2.png drawType:1 int
drawSize: Scale image. Defaults to 1 float
frame Built-in image frame to use, starts at zero. int
hitSound: Default true bool
explodeEffect explodeEffect: smallExplosion, CUSTOM:myExplodeEffect effect ref list 1.13
explodeEffectOnShield Use this effect if shield is active on target effect ref list 1.13
teamColorRatio Mix 0-1 of team colour into color field float 1.13
drawUnderUnits bool 1.13
effectOnCreate effect ref list 1.13
shouldRevealFog Reveal fog to player on explode bool 1.13
alwaysVisibleInFog bool 1.13
nukeWeapon Shows on mini-map when fired. Some other side effects as well. bool 1.13
trailEffect true for built-in defaults, but can also point to any custom effects bool/effect
trailEffectRate Defaults to 3 float 1.13
lightSize: float
lightColor lightColor: #ffe92b color
largeHitEffect: Creates a large explosion and accompanying sound on hit (only cosmetic) bool
lightingEffect: Draw as lighting works best with instant:true bool
laserEffect: Draw as laser works best with instant:true bool

Section [movement]
Code Description Example Value Type
movementType: Defines what kind of terrain the unit will be able to move over, along with other properties related to unit types.
movementType: LAND string
slowDeathFall: Used with large aircraft. Makes the unit fall slowly while maintaining its speed at the time of death. slowDeathFall: true bool
moveSpeed: Maximum movement speed of the unit. moveSpeed: 1.2 float
moveAccelerationSpeed: Defines how fast units accelerate to max speed. moveAccelerationSpeed: 0.07 float
moveDecelerationSpeed: Don't make this too low or units will have trouble stopping at waypoints moveDecelerationSpeed: 0.17 float
reverseSpeedPercentage: 0.6 default. Over 0.4 will reverse for short distances (at 40% speed). If set to 1 will drive in reverse samereverseSpeedPercentage:
as forwards. Useful if slow0turning float
landOnGround: Should flying unit land when idle. landOnGround: false bool
targetHeight: Defaults to 0 but if AIR movementType default is 35 targetHeight: 25 float
targetHeightDrift: Smooth animated height change. Defaults to 0 but if AIR movementType default is 1.5 targetHeightDrift: 1 float
startingHeightOffset
maxTurnSpeed: float
turnAcceleration: float
moveSlidingMode: bool
moveIgnoringBody: bool
moveSlidingDir: int
joinsGroupFormations: Defaults to true. Changing not recommended bool

Section [ai]
Code Description Example Value Type
useAsBuilder: Set to true if unit can build or repair buildings. Defaults to [core]isBuilder. bool
disableUse: Disallow AI building this unit or building bool
ai_upgradePriority Defaults to 0.06. Set between 0-1, higher means AI is more likely to upgrade this unit before others float
Buildings only
buildPriority: 0-1. AI uses 0.8 for first land factory, 0.48 for air factory, 0.47 for first turret. float
noneInBaseExtraPriority: Adds to buildPriority, if this unit doesn't exist in the AIs base float
noneGlobalExtraPriority: Adds to buildPriority, if this unit doesn't exist in the any where on the map float
upgradedFrom: Create link to another unit to preserve max counts for upgraded and non-upgraded types in same base. string
maxGlobal: int
maxEachBase: int

Section [leg_#] / [arm_#]


Code Description Example Value Type
x: Sets position of the foot on the X axis. float
y: Sets position of the foot on the Y axis. float
copyFrom: Copy from another leg. Useful to only need to set leg values once copyFrom: 1 int
attach_x: Sets the leg's attach point on the X axis. float
attach_y: Sets the leg's attach point on the Y axis. float
rotateSpeed: float
lockMovement Lock to unit body. Useful if walking unit converted to a flying unit. bool
heightSpeed: float
moveSpeed
moveWarmUp
holdDisMin: Defaults to 7. Reposition leg at this distance if neighbor legs are not already repositioning. float
holdDisMax: Defaults to 16. Force reposition of leg at this distance. float
holdDisMin_maxMovingLegs
hold_moveOnlyIfFurthest
holdDisMin_checkNeighbours
hardLimit: Defaults to 50. Force leg to never go this far. Better to not be reached. float
estimatingPositionMultiplier defaults to 1. Predicts were unit will be for leg placement based on unit speed. float
Graphics and effects
hidden: bool
image_end image 1.13
image_end_shadow image 1.13
image_end_teamColors 1.13
image_foot same as image_end image 1.13
image_foot_shadow image
image_middle image 1.13
image_leg same as image_middle image
draw_foot_on_top bool 1.13
drawOverBody Draw over the body of unit, defaults of false bool
drawUnderAllUnits Draw over all units bool
drawDirOffset float
dust_effect: Spawns dust particles on each step. bool
spinRate Makes arm/leg spin, like idleSpin for turrets float
favourOppositeSideNeighbours calculate neighbours with X 10 times closer than Y

resetAngle: Unused float

Section [effect_NAME]
Code Description Example Value Type
life Defaults 200. Time till effect is removed. Set low as possible to reduce effect overhead. float 1.13
alsoEmitEffects Create more effects when created, useful for meta-effects. Note: other 'alsoEmitEffects' on created effects are ignored. effect ref 1.13
alsoPlaySound sound ref 1.13
createWhenOffscreen Defaults false. bool 1.13
createWhenZoomedOut Defaults true bool 1.13
createWhenOverLiquid Defaults true bool 1.13
createWhenOverLand Defaults true bool 1.13
spawnChance Default 1. If less than 1 effect only has a random chance of being created float 1.13
showInFog Default false boolean 1.13
delayedStartTimer Hide for x time before showing and updating effect. float 1.13
liveAfterAttachedDies Defaults false when attachedToUnit is being used bool 1.13
priority Defaults to high. verylow/low/high/veryhigh/critical. Takes effect when too many effects are being shown at once. string 1.13
Movement
attachedToUnit Attach to unit or projectile that created this effect. Will move with this object. bool 1.13
alwayStartDirAtZero Ignore source/attached unit dir bool 1.13
atmospheric Apply drag to slow this effect down and add small wind effects bool 1.13
physics Fall to ground and bounces. Needs height to take effect. bool 1.13
physicsGravity Defaults to 1. height speed acceleration when physics: true float 1.13
xOffsetRelative Offset starting effect position. Relative to direction of attached turret, projectile, unit float 1.13
yOffsetRelative Offset starting effect position. Relative to direction of attached turret, projectile, unit float 1.13
xOffsetRelativeRandom Random offset by +/- this value float 1.13
yOffsetRelativeRandom Random offset by +/- this value float 1.13
xOffsetAbsolute Offset starting effect by position ignoring direction of attached turret, projectile, unit float 1.13
yOffsetAbsolute Offset starting effect by position ignoring direction of attached turret, projectile, unit float 1.13
xOffsetAbsoluteRandom Random offset by +/- this value float 1.13
yOffsetAbsoluteRandom Random offset by +/- this value float 1.13
xSpeedRelative float 1.13
ySpeedRelative float 1.13
xSpeedRelativeRandom Randomly change by -value to value float 1.13
ySpeedRelativeRandom Randomly change by -value to value float 1.13
xSpeedAbsolute float 1.13
ySpeedAbsolute float 1.13
xSpeedAbsoluteRandom Randomly change by -value to value float 1.13
ySpeedAbsoluteRandom Randomly change by -value to value float 1.13
hOffset height offset from source float 1.13
hOffsetRandom Randomly change by -value to value float 1.13
hSpeed height speed float 1.13
hSpeedRandom Randomly change by -value to value float 1.13
dirOffset rotation float 1.13
dirOffsetRandom Randomly change by -value to value float 1.13
dirSpeed rotation speed float 1.13
dirSpeedRandom Randomly change by -value to value float 1.13
Graphics
frameIndex frame of to use int 1.13
stripIndex A built-in image set to use. Cannot be used with custom image effects/explode_big/light_50/flame/effects/effects2/projectiles/projectiles2/explode_bitsint/string 1.13
Image Custom image file to use. Cannot be used with stripIndex. image 1.13
imageShadow Custom image file to use for shadows image
scaleTo Defaults to 1 float 1.13
scaleFrom Defaults to 1 float 1.13
color Defaults #FFFFFFFF color 1.13
drawUnderUnits bool 1.13
fadeInTime Fade alpha from 0% to 100% for this time at start float 1.13
fadeOut Fade alpha from 100% to 0% based on life. Set alpha is higher than 1 to delay fade bool 1.13
alpha Capped between 0-1. Can be set higher than 1 to delay fadeOut effects
shadow True to draw a shadow. Forced true if imageShadow is used
Animation
total_frames Total frames of 'image', used with animation or frameIndex. Only needed with custom images int 1.13
animateFrameStart int 1.13
animateFrameEnd int 1.13
animateFramePingPong int 1.13
animateFrameSpeed time 1.13
animateFrameSpeedRandom time 1.13

Section [animation_NAME]
Code Description Example Value Type
onActions : Unknown move, attack, idle, underConstruction, underConstructionWithLinkedBuiltTime, queuedUnits 1.13
onActionsQueuedUnitPlayAt : float For onAction: queuedUnits. Amount queue needs to reach before starting, set between 0-1 1.13
blendIn : time Blend with last animation for this time 1.13
blendOut : time Blend with next animation for this time 1.13
pingPong Play animation in reverse after it ends bool 1.13
KeyframeTimeScale : float Scales all keyframe times, useful to make an animation faster/slower without changing everything float 1.13
Keyframes - create as many as needed
arm#_[time] Adds a keyframe at time. Use multiple times to create animation. eg: arm1_5s: {x: 5, dir: 90 } 1.13
leg#_[time] Adds a keyframe at time. Use multiple times to create animation.
body_[time] Adds a keyframe at time for body. Only frame and scale allowed on body eg: body_4s: {frame: 4, scale: 0.5}
Deprecated Keys (can be used but there are better ways)
start : int Start image frame. deprecated 1.13
end : int End image frame. deprecated 1.13
scale_start : float Start scale. Deprecated, use body keyframes instead. 1.13
scale_end : float End scale. Deprecated, use body keyframes instead. 1.13
speed : float Speed, smaller is faster. Only effects start, end, scale_start, scale_end 1.13

Section [action_NAME]
Code Description Example Value Type
text Text shown in UI string
description A display text when you select your unit's action, used to explain it's purpose. string
displayType none, rally, upgrade, queueUnit, building, action, infoOnly, infoOnlyNoBox
displayRemainingStockpile Queue is shown as number of times action can be triggered based on price bool
pos Order action appears in UI float
Requirements to trigger or enable
price The price of your action for the unit. Disables action if not available. Defaults to credits if unlabelled price: credits=5, energy=5, hp=100, shield=5, ammo=1 resources
isActive Defaults true. If false then action is disabled and shown in red in UI. LogicBoolean
isVisible Defaults true. If false action is hidden from UI and disabled. LogicBoolean
isLocked Defaults false. If true action is disabled, and a lock icon is shown. Mostly used for no nuke game modes LogicBoolean
isLockedMessage string
onlyOneUnitAtATime When action is picked in UI, only one unit selected with get this action. Defaults to false. bool
autoTrigger When true triggers the effects of this action instantly (ignoring price, isActive, isVisible, buildSpeed, etc) autoTrigger: if self.overWater() LogicBoolean
ai_isDisabled Defaults false. Stop AI using this action. LogicBoolean
While action is queued
buildSpeed buildSpeed: 5s time
highPriorityQueue Defaults to false. If true this action skips all other low priority actions in queue. Useful for fireTurret actions. bool
canPlayerCancel bool
whenBuilding_cannotMove Stops unit moving while action is being applied. Useful for deploy like actions. bool
whenBuilding_playAnimation Play a custom animation from an [animation] section when in active queue animation ref
whenBuilding_rotateTo Rotate unit body to this direction when action is in active queue float
whenBuilding_rotateTo_orBackwards If true allow rotation in 180 degrees from whenBuilding_rotateTo when this is a smaller angle bool
whenBuilding_rotateTo_waitTillRotated Pause action queue till rotation is finished bool
whenBuilding_temporarilyConvertTo Convert to another unit while action is in active queue. Note: actions from the original unit will be kept unit ref
spawnEffectsOnQueue Effects to spawn at unit when action is first added to queue effect ref
playSoundToPlayerOnQueue Global sound to play to unit's player only when action is first added to queue sound ref
Results (What happens) - Must be at least one result listed
convertTo Convert your unit into another unit. properties are preserved. unit ref
fireTurretXAtGround When action finishes fire target turret at point on ground, bypasses canShoot rules in turret. fireTurretXAtGround: nukeSilo turret ref
fireTurretXAtGround_withOffset If not set player targets the ground with GUI, if a point is set this step is skipped fireTurretXAtGround_withOffset: 0,0 point
fireTurretXAtGround_withProjectile Used with fireTurretXAtGround. Defaults to target turret's normal projectile. projectile ref
addEnergy Adds energy to unit. Has no effect unless energyMax is set float
addResources Add these resources when action finishes. addResources: credits=5, energy=-5, hp=-100, shield=5, ammo=1 resources
alsoTriggerAction Trigger to results of another action as well. Ignores action's requirements action ref
alsoQueueAction Adds another action into the normal unit's queue. Ignores action's requirements action ref
alsoTriggerOrQueueActionConditional Defaults true. alsoTriggerAction and alsoQueueAction are ignored if this works out to be false. LogicBoolean
spawnEffects Effects to spawn at unit effect ref
playSoundAtUnit Local sound to play when action finishes sound ref
playSoundGlobally Global sound to play to all players in game sound ref
playSoundToPlayer Global sound to play to unit's player only sound ref
addUnitsIntoTransport Add units into transport, use self.transportingCount() to check for space before adding addUnitsIntoTransport: tank*3, heavyTank
resetCustomTimer Reset timer used with self.customTimer() LogicBoolean

Type LogicBoolean
Code Description Example Targets
true
false
if Start all logic booleans with if, unless just using true/false
and if self.isInWater() and self.energy(greaterThan=1)
or if (self.energy(greaterThan=1) or self.ammo(greaterThan=1)) and self.isFlying()
not if not self.isOverLiquid()
Unit location and movement
self.isUnderwater()
self.isAtGroundHeight()
self.isFlying()
self.isMoving()
self.isAtTopSpeed()
self.isInWater() Touching water
self.isOverwater() Touching or over a water tile
self.isOverLiquid()
self.isOverClift()
self.isOverPassableTile() (parameters: type)
self.isOverOpenLand() shortcut for self.isOverPassableTile(type='LAND')
Unit stats
self.hp() (parameters: greaterThan, lessThan, empty, full)
self.ammo() (parameters: greaterThan, lessThan, empty, full)
self.isAmmoEmpty() shortcut for self.ammo(empty=true)
self.ammoIncludingQueued() Also includes ammo from actions still in queue (parameters: greaterThan, lessThan, empty, full) if self.ammoIncludingQueued(lessThan=12)
self.energy() (parameters: greaterThan, lessThan, empty, full)
self.energyIncludingQueued() Also includes energy from actions still in queue (parameters: greaterThan, lessThan, empty, full)
self.isEnergyFull() shortcut for self.energy(full=true)
self.isEnergyEmpty() shortcut for self.energy(empty=true)
self.shield() (parameters: greaterThan, lessThan, empty, full)
Misc
game.nukesEnabled()
self.hasFlag() Boolean flag saved into units for mods to use. (parameters: id=0-31) Use addResources in action change this vaule
self.tags() (parameters: includes)
self.transportingCount() (parameters: greaterThan, lessThan, empty)
self.isAttacking()
self.transportingUnitWithTags() (parameters: includes) self.transportingUnitWithTags(includes='human')
self.hasTakenDamage() (parameters: withinSeconds=X, laterThanSeconds=X) self.hasTakenDamage(withinSeconds=1)
self.timeAlive() (parameters: withinSeconds=X, laterThanSeconds=X)
self.lastConverted() (parameters: withinSeconds=X, laterThanSeconds=X)
self.customTimer() (parameters: withinSeconds=X, laterThanSeconds=X)

Type Resources - used by addResources, price, etc


Code Description Example Targets
credits Global resource
energy
hp
shield price: hp=-100, shield=100
ammo Hidden value on each unit for use by mods
setFlag use with addResources, resourceUsage or price. 0-31. Flags are stored in each unit setFlag=1
unsetFlag use with addResources, resourceUsage or price. 0-31
hasFlag use with price or resourceUsage
hasMissingFlag use with price or resourceUsage
This sheet is for 1.12, for 1.13.2 see sheet tabs below.

Section [core]
Code Description Example Value Type

name: Defines the raw name for your unit, in which case the game uses to identify as a unique name. (This name is not displayed in-game) name: customTank_1 string

class: Reserved for future use, must be CustomUnitMetadata class: CustomUnitMetadata string

price: The cost of your unit from builders/buildings. price: 500 int

maxHp: The max health for your unit. (will spawn with this value) maxHp: 200 int

mass: The 'weight' of your unit, this will define how it collides with other units, a greater value means it is tougher to push. mass: 3000 int

techLevel: Defines the Tech Level of your unit, there are 3 levels and each will appear in a different color in the GUI. techLevel: 1 int

buildSpeed: Time it takes to build unit (may multiply with builder speed) Formulae for seconds: 10 ÷ 60 = 0.16 (0.16 will make it take 10 seconds to build) buildSpeed: 0.16 float

radius: Circular area around your unit that makes it selectable (mouse click/screen touch) radius: 20 int

isBio: Choose wether your unit is bioligical or not, will effect sound and splat (unless hideScorchMark is true) isBio: false bool

displayText: The name of your unit that the game shows to the player. displayText: Custom Tank string

displayDescription: Description of your unit that the game shows to the player. displayDescription: - Fast movement.\n- Light damage. string

copyFrom: Use unit data from another ini file as base copyFrom: customTank_Default file (ini)

dont_load: Do not load unit, and don't error on missing data. Can be useful when used with copyFrom dont_load: true bool

altNames: comma separated list of names. Like name but lower priority, useful for multiple optional mods. altNames: custTank1, customTank1, cTank1 string(s)

overrideAndReplace: Override another unit with this unit. Build links pointing to target unit will be replaced with this unit. And this unit will replace target on maps. overrideAndReplace: builder, combatEngineer string(s)

globalScale: Defaults to 1. Changing not recommend globalScale: 1 float

displayLocaleKey: Translation file key for unit name and description displayLocaleKey: units.mechArtillery string

showInEditor: Set to false to hide unit in sandbox editor (Default true) showInEditor: true bool

isLocked: Disallow building of this unit. Can be used with overrideAndReplace to restrict units the player is allowed to build. isLocked: false bool

experimental: Tag unit as experimental. Affects zoomed out icon and end game stats. experimental: false bool

generation_credits: Income unit creates generation_credits: 2 int

generation_delay: Defaults to 40, recommended only changing generation_credits generation_delay: 40 int

stayNeutral: Set to false to disable capture when unit is on the neutral team stayNeutral: false bool

resourceRate: Used with canReclaimResources. Experimental feature that is not yet finished. float

maxShield: int

startShieldAtZero: bool

shieldRegen: float

shieldDisplayOnlyDeflection: Hide shield (if active) unless deflecting shot bool

shieldDeflectionDisplayRate: Defaults to 4. High value causes shield deflection to fade disappear faster float

energyMax: Defaults to 0. Energy can be used as ammo for turrets or for laser defense float

energyRegen: float

energyStartingPercentage: float

energyNeedsToRechargeToFull: Disable weapons using energy after reaching zero till fully recharged float

displayRadius: Defaults to radius value. Set to show a larger or smaller selection box ui on units. displayRadius: 20 int

buildingSelectionOffset: int

buildingToFootprintOffsetX: float

buildingToFootprintOffsetY: float

fogOfWarSightRange: Set number of tiles this unit can see. Defaults to 15 fogOfWarSightRange: 15 int

exit_x: Defaults to 0 exit_x: 0 float

exit_y: Defaults to 5. Controls were newly created units appear. exit_x: 5 float

softCollisionOnAll: int

isBug: bool

hideScorchMark: bool

isBuilding: bool

placeOnlyOnResPool: Normally used for extractors bool

canRepairBuildings: ([ai]useAsBuilder:true is required as well right now) bool

canRepairUnits: ([ai]useAsBuilder:true is required as well right now) bool

autoRepair: Automatically try and repair damaged units in range ([ai]useAsBuilder:true is required as well right now) bool

nanoRange: int

nanoRepairSpeed: float

nanoBuildSpeed: float

nanoFactorySpeed: float

selfRegenRate: Passive self repair rate float

selfBuildRate: float

dieOnConstruct: Delete this unit when it starts making a building. Target building likely will need selfBuildRate set to be created without a builder. bool

numBitsOnDeath: int
nukeOnDeath: bool

nukeOnDeathRange: float

nukeOnDeathDamage: float

nukeOnDeathDisableWhenNoNuke: Defaults to false bool

fireOnDeath: int

canReclaimResources: Used with resourceRate. Experimental feature that is not yet finished. bool

maxTransportingUnits: Number of slots this units as for transporting other units. int

transportSlotsNeeded: Defaults to 1. Number of slots this unit uses up in a transport, Experimentals are often set to 5 to stop small transports holding them. int

builtFrom_#_name: string

builtFrom_#_pos: Order action appears in UI string

builtFrom_#_forceNano: Build as if it was a building even if it's a unit. bool

canBuild_#_name: (Note: canBuild and builtFrom have the same effect just in the opposite direction. Only one is needed to create a link.) string

canBuild_#_pos: Order action appears in UI string

canBuild_#_tech: int

canBuild_#_forceNano: Build target as if it was a building even if it's a unit. bool

canBuild_#_type: string

action_#_convertTo: Convert your unit into another unit. (All your sub actions will be linked to the # you use) (due to bug target must have the same number of legs) action_1_convertTo: customTank_2 string

action_#_pos: Order action appears in UI float

action_#_price: The price of your action for the unit. (All your sub actions will be linked to the # you use) action_1_price: 1000 int

action_#_text: A display text when you select your unit's action, used to explain it's purpose. (All your sub actions will be linked to the # you use) action_1_text: Upgrade to Custom Tank 2 string

action_#_description: string

action_#_addEnergy: Adds energy to unit. Has no effect unless energyMax is set float

action_#_whenBuilding_cannotMove: Stops unit moving while action is being applied. Useful for deploy like actions. bool

Section [graphics]
Code Description Example Value Type

total_frames Defaults to 1. Animations require this. int

frame_width: Calculated for you if total frames is set, but can be overridden int

frame_height: Defaults to image height int

image_offsetX: int

image_offsetY: int

teamColorsUseHue: False: Green pixels on unit gets converted to team color. True: Whole unit is tinted the team colour. Defaults to false bool

imageSmoothing: bool

image: file (image)

image_back: file (image)

image_wreak: file (image)

image_turret: file (image)

image_shadow: Image file, NONE, or AUTO. AUTO will use image and make it transparent black only. file (image)

shadowOffsetX: float

shadowOffsetY: float

teamColorsOnTurret: Defaults false. Apply team colours on turret as well. (Only works on image_turret right now, not image on each turret) bool

scaleImagesTo: float

imageScale: float

scaleTurretImagesTo: float

splastEffect: bool

dustEffect: bool

splastEffectReverse: bool

dustEffectReverse: bool

drawLayer: Set to experimentals, or leave line out string

lock_body_rotation_with_main_turret: Locks body image locked to first turret's direction bool

lock_shadow_rotation_with_main_turret:Locks body image shadow locked to first turret's direction bool

rotate_with_direction: Defaults to true. Makes unit body image locked to 0 degrees when false. Often used with animation_direction_* bool

animation_direction_units: 45 for 8 directions, 90 for 4 direction animation. Used with rotate_with_direction:false float

animation_direction_strideX: Animation frames to offset on direction change. int

animation_direction_strideY: Animation frames to offset on direction change. Used with frame_height. int

animation_direction_starting: Direction for first frame float

animation_TYPE_start: Animation start frame, from 0. Set total_frames to use (TYPE is moving/idle/attack) animation_moving_start: 0 int

animation_TYPE_end: End frame, must be larger then start animation_moving_end: 3 int

animation_TYPE_scale_start: Scale unit image. Defaults to 1. Useful for bio units or breathing effects. float

animation_TYPE_scale_end: Scale unit image. Defaults to 1. Useful for bio units or breathing effects. float

animation_TYPE_speed: Delay for each frame of animation. Larger values cause slower animation float

animation_TYPE_pingPong: Play animation in reverse before repeating. Useful with scale_start/scale_end bool

Section [attack]
Code Description Example Value Type

turretSize: (multiplied by globalScale) float

turretTurnSpeed: float

turretRotateWithBody: bool

attackMovement: normal/bomber string

disablePassiveTargeting: Unit only attacks manually ordered target. Rarely needed. bool

attackMovementSpeed: Unused float

maxAttackRange: (multiplied by globalScale) float

shootDelay: Global delay, can also use delay on each turret float

isMelee: Used with a low attack range (like maxAttackRange: 9) makes src and target radius get added to range, and effects AI. bool

dieOnAttack: bool

canAttack: If set to false, can not attack any unit. Regards of other canAttack options below. bool

canAttackFlyingUnits: can also be narrowed per turret LogicBoolean

canAttackLandUnits: can also be narrowed per turret LogicBoolean

canAttackUnderwaterUnits: can also be narrowed per turret LogicBoolean

canAttackNotTouchingWaterUnits: Default true. If false unit can only attack units in contact with the water. Used for units with torpedos. (can also be set per turret) LogicBoolean

isFixedFiring: Must aim body at target to shoot. Will often make the unit need to stop before it can aim and shoot. bool

aimOffsetSpread: bool

Section [turret_#]
Code Description Example Value Type

x: float

y: float

copyFrom: Copy all values from another turret as defaut values for this turret copyFrom: 1 int

idleDir: float

linkDelayWithTurret: int

delay: Override global shootDelay for this turret float

warmup: float

warmupCallDownRate: float

warmupNoReset: bool

warmupShootDelayTransfer: float

recoilOffset: Amount to offset turret after firing float

recoilOutTime: How long to get to offset value float

recoilReturnTime: How long to return back to default position. float

energyUsage: Required energy to fire weapon float

attachedTo: Id of another turret to attach to, will be positioned relative to it. int

canShoot: Defaults to true bool

shoot_sound: string

shoot_sound_vol: float

shoot_flame: Current types are: small, large, smoke, shockwave string

shoot_light color

slave: Locks this turret's direction and shot cooldown to attached turret. Often used with warmup for multiple barrel guns bool

invisible: Don't render this turret, but still can shoot, etc bool

canAttackFlyingUnits: Narrows targeting for this turret, note targeting for the whole unit in [attack] is applied first. (so you can only use this to target less not more) LogicBoolean

canAttackLandUnits: LogicBoolean

canAttackUnderwaterUnits: LogicBoolean

canAttackNotTouchingWaterUnits: Default true. If false unit can only attack units in contact with the water. Used for units with torpedos. LogicBoolean

canAttackCondition: Normally, used to optionally disable a turret based on a LogicBoolean. Eg: this unit's height canAttackCondition: if not self.flying LogicBoolean

size: float

limitingRange: Make this turret have less range than the maxAttackRange. Do not apply this to all turrets change maxAttackRange instead. float

laserDefenceEnergyUse: Set to enable a projectile laser defence from this turret. Should also set the energyMax in core. float

shouldResetTurret: Defaults true. False to disable the reseting turret angle when idle bool

idleSpin: Spin rate when idle, used on missile turrets float

isMainNanoTurret: Defaults to false. Turret to use for creating buildings, etc. should only be true on one turret, and should have canShoot set to false bool

image: Use custom image. Overrides unit's main turret image file (image)
chargeEffectImage:
Used with warmup. Shows a scaling effect image on turret barrel when charging. file (image)

Section [projectile_#]
Code Description Example Value Type

directDamage: Damage to target unit on hit. Does not work with targetGround. int

areaDamage: directDamage or areaDamage is required int

areaRadius: How wide areaDamage effects. Note this drops off.

deflectionPower: Defaults to 1. Energy needed for laser defence to deflect. -1 to disable deflection (only disable for special weapons like flames) float
targetGround: Target ground, and don't home in on target. Only areaDamage is applied if targeting ground. bool

life: How long till this projectile gets removed if it hasn't hit a target, 300 might be a good starting point, change depending on speed and range int

speed: float

instant: Hit target instantly bool

instantReuseLast: Recycles last projectile fired, only one projectile ever exists. Can turn lasers into beam weapons by using lower rate of fire and setting this to true bool

ballistic: bool

trailEffect: bool

lightSize: float

lightColor lightColor: #ffe92b color

largeHitEffect: bool

lightingEffect: bool

laserEffect: bool

ballistic_delaymove_height: float

ballistic_height: float

targetSpeed: Accelerate to this speed float

autoTargetingOnDeadTarget: Retarget to nearby unit if target dies while in transit bool

drawSize: Scale image. Defaults to 1 float

color color: #bebe50 color

image: Use custom image. Overrides drawType and frame file (image)

drawType Built-in image to use. 0:projectiles.png 1:projectiles_large.png 2:projectiles2.png drawType:1 int

frame Built-in image frame to use, starts at zero. int

flameWeapon: bool

hitSound: bool

targetGroundSpread: Randomly makes the shot inaccurate by this amount. Also used by weapons like the flamethrower float

speedSpread: Randomly change the starting projectile speed by this amount float

Section [movement]
Code Description Example Value Type

movementType: string

slowDeathFall: Used with large aircraft bool

moveSpeed: float

moveAccelerationSpeed: float

moveDecelerationSpeed: Don't make this too low or units will have trouble stopping at waypoints float

reverseSpeedPercentage: 0.6 default. Over 0.4 will reverse for short distances (at 40% speed). If set to 1 will drive in reverse same as forwards. Useful if slow turning float

landOnGround: Should flying unit land when idle. bool

targetHeight: Defaults to 0 but if AIR movementType default is 35 float

targetHeightDrift: Smooth animated height change. Defaults to 0 but if AIR movementType default is 1.5 float

maxTurnSpeed: float

turnAcceleration: float

moveSlidingMode: bool

moveIgnoringBody: bool

moveSlidingDir: int

joinsGroupFormations: Defaults to true. Changing not recommended bool

Section [ai]
Code Description Example Value Type

useAsBuilder: Set to true if unit can build or repair buildings. bool

disableUse: Disallow AI building this unit or building bool

maxGlobal: int

maxEachBase: int

buildPriority: 0-1. AI uses 0.8 for first land factory, 0.48 for air factory, 0.47 for first turret. float

noneInBaseExtraPriority: Adds to buildPriority, if this unit doesn't exist in the AIs base float

noneGlobalExtraPriority: Adds to buildPriority, if this unit doesn't exist in the any where on the map float

upgradedFrom: Create link to another unit to preserve max counts for upgraded and non-upgraded types in same base. string

Section [leg_#]
Code Description Example Value Type

x: float

y: float

copyFrom: Copy from another leg. Useful to only need to set leg values once copyFrom: 1 int

attach_x: float

attach_y: float
hidden: bool

rotateSpeed: float

resetAngle: Unused float

lockMovement Lock to unit body. Useful if walking unit converted to a flying unit. bool

heightSpeed: float

draw_foot_on_top: bool

dust_effect: bool

holdDisMin: Defaults to 7. Reposition leg at this distance if neighbor legs are not already repositioning. float

holdDisMax: Defaults to 16. Force reposition of leg at this distance. float

hardLimit: Defaults to 50. Force leg to never go this far. Better to not be reached. float
The spreadsheets to the right of this one are tools Feel free to copy and paste the spreadsheet into a new copy in order to
designed to automate specific processes so that edit it yourself, the tools are automated and will compile an Output based
they are not as time consuming for development. on the input values which can be changed in a sheet you own.
Table of Contents:
spawnProjectiles:LIST Tool A tool that automatically sets up
subprojectiles for turrets...
Translation Tool A tool that automatically compiles
translations into fields to insert into
an .ini...
Make sure to remove the "," from the end of an Simply edit the values in a new sheet that you have permissions
output if it is the last subprojectile in a series Spawn Projectiles Tool to edit and the values will change automatically for the outputs.

Example: If subprojectile1 and subprojectile2 Output is Only edit the values with numbers in them. Editing anything else
put together, remove the "," from the end of the Output will potentially break the Output.
of 2 but not 1

-- -- -- -- -- -- -- -- -- -- -- --
NAME: subprojectile1 -- NAME: subprojectile2 -- NAME: subprojectile3 -- NAME: subprojectile4 --
recursionLimit= 1 , recursionLimit= 1 , recursionLimit= 1 , recursionLimit= 1 ,
xOffsetRelative= 0 , xOffsetRelative= 0 , xOffsetRelative= 0 , xOffsetRelative= 0 ,
yOffsetRelative= 0 , yOffsetRelative= 0 , yOffsetRelative= 0 , yOffsetRelative= 0 ,
offsetHeight= 0 , offsetHeight= 0 , offsetHeight= 0 , offsetHeight= 0 ,
offsetDir= 0 , offsetDir= 0 , offsetDir= 0 , offsetDir= 0 ,
offsetRandomDir offsetRandomDir offsetRandomDir offsetRandomDir
= 0 , = 0 , = 0 , = 0 ,
offsetRandomX= 0 , offsetRandomX= 0 , offsetRandomX= 0 , offsetRandomX= 0 ,
offsetRandomY= 0 , offsetRandomY= 0 , offsetRandomY= 0 , offsetRandomY= 0 ,
offsetRandomXY= 0 offsetRandomXY= 0 offsetRandomXY= 0 offsetRandomXY= 0
subprojectile1 subprojectile2 subprojectile3 subprojectile4
(recursionLimit=1 (recursionLimit=1 (recursionLimit=1 (recursionLimit=1
, , , ,
xOffsetRelative=0 xOffsetRelative=0 xOffsetRelative=0 xOffsetRelative=0
, , , ,
yOffsetRelative=0 yOffsetRelative=0 yOffsetRelative=0 yOffsetRelative=0
,offsetHeight=0, ,offsetHeight=0, ,offsetHeight=0, ,offsetHeight=0,
offsetDir=0, offsetDir=0, offsetDir=0, offsetDir=0,
offsetRandomDir offsetRandomDir offsetRandomDir offsetRandomDir
=0, =0, =0, =0,
offsetRandomX=0 offsetRandomX=0 offsetRandomX=0 offsetRandomX=0
, , , ,
offsetRandomY=0 offsetRandomY=0 offsetRandomY=0 offsetRandomY=0
subprojectile1 , subprojectile2 , subprojectile3 , subprojectile4 ,
Combined offsetRandomXY= Combined offsetRandomXY= Combined offsetRandomXY= Combined offsetRandomXY=
Output: 0), -- Output: 0), -- Output: 0), -- Output: 0), -- --
-- -- -- -- -- -- -- -- -- -- -- --
NAME: subprojectile5 -- NAME: subprojectile6 -- NAME: subprojectile7 -- NAME: subprojectile8 --
recursionLimit= 1 , recursionLimit= 1 , recursionLimit= 1 , recursionLimit= 1 ,
xOffsetRelative= 0 , xOffsetRelative= 0 , xOffsetRelative= 0 , xOffsetRelative= 0 ,
yOffsetRelative= 0 , yOffsetRelative= 0 , yOffsetRelative= 0 , yOffsetRelative= 0 ,
offsetHeight= 0 , offsetHeight= 0 , offsetHeight= 0 , offsetHeight= 0 ,
offsetDir= 0 , offsetDir= 0 , offsetDir= 0 , offsetDir= 0 ,
offsetRandomDir offsetRandomDir offsetRandomDir offsetRandomDir
= 0 , = 0 , = 0 , = 0 ,
offsetRandomX= 0 , offsetRandomX= 0 , offsetRandomX= 0 , offsetRandomX= 0 ,
offsetRandomY= 0 , offsetRandomY= 0 , offsetRandomY= 0 , offsetRandomY= 0 ,
offsetRandomXY= 0 offsetRandomXY= 0 offsetRandomXY= 0 offsetRandomXY= 0
subprojectile5 subprojectile6 subprojectile7 subprojectile8
(recursionLimit=1 (recursionLimit=1 (recursionLimit=1 (recursionLimit=1
, , , ,
xOffsetRelative=0 xOffsetRelative=0 xOffsetRelative=0 xOffsetRelative=0
, , , ,
yOffsetRelative=0 yOffsetRelative=0 yOffsetRelative=0 yOffsetRelative=0
,offsetHeight=0, ,offsetHeight=0, ,offsetHeight=0, ,offsetHeight=0,
offsetDir=0, offsetDir=0, offsetDir=0, offsetDir=0,
offsetRandomDir offsetRandomDir offsetRandomDir offsetRandomDir
=0, =0, =0, =0,
offsetRandomX=0 offsetRandomX=0 offsetRandomX=0 offsetRandomX=0
, , , ,
offsetRandomY=0 offsetRandomY=0 offsetRandomY=0 offsetRandomY=0
subprojectile5 , subprojectile6 , subprojectile7 , subprojectile8 ,
Combined offsetRandomXY= Combined offsetRandomXY= Combined offsetRandomXY= Combined offsetRandomXY=
Output: 0), -- Output: 0), -- Output: 0), -- Output: 0), -- --
-- -- -- -- -- -- -- -- -- -- -- --
NAME: SubProjectile9 -- NAME: SubProjectile10 -- NAME: SubProjectile11 -- NAME: SubProjectile12 --
recursionLimit= 1 , recursionLimit= 1 , recursionLimit= 1 , recursionLimit= 1 ,
xOffsetRelative= 0 , xOffsetRelative= 0 , xOffsetRelative= 0 , xOffsetRelative= 0 ,
yOffsetRelative= 0 , yOffsetRelative= 0 , yOffsetRelative= 0 , yOffsetRelative= 0 ,
offsetHeight= 0 , offsetHeight= 0 , offsetHeight= 0 , offsetHeight= 0 ,
offsetDir= 0 , offsetDir= 0 , offsetDir= 0 , offsetDir= 0 ,
offsetRandomDir offsetRandomDir offsetRandomDir offsetRandomDir
= 0 , = 0 , = 0 , = 0 ,
offsetRandomX= 0 , offsetRandomX= 0 , offsetRandomX= 0 , offsetRandomX= 0 ,
offsetRandomY= 0 , offsetRandomY= 0 , offsetRandomY= 0 , offsetRandomY= 0 ,
offsetRandomXY= 0 offsetRandomXY= 0 offsetRandomXY= 0 offsetRandomXY= 0
SubProjectile9 SubProjectile10 SubProjectile11 SubProjectile12
(recursionLimit=1 (recursionLimit=1 (recursionLimit=1 (recursionLimit=1
, , , ,
xOffsetRelative=0 xOffsetRelative=0 xOffsetRelative=0 xOffsetRelative=0
, , , ,
yOffsetRelative=0 yOffsetRelative=0 yOffsetRelative=0 yOffsetRelative=0
,offsetHeight=0, ,offsetHeight=0, ,offsetHeight=0, ,offsetHeight=0,
offsetDir=0, offsetDir=0, offsetDir=0, offsetDir=0,
offsetRandomDir offsetRandomDir offsetRandomDir offsetRandomDir
=0, =0, =0, =0,
offsetRandomX=0 offsetRandomX=0 offsetRandomX=0 offsetRandomX=0
, , , ,
offsetRandomY=0 offsetRandomY=0 offsetRandomY=0 offsetRandomY=0
SubProjectile9 , SubProjectile10 , SubProjectile11 , SubProjectile12 ,
Combined offsetRandomXY= Combined offsetRandomXY= Combined offsetRandomXY= Combined offsetRandomXY=
Output: 0), -- Output: 0), -- Output: 0), -- Output: 0), -- --

Projectile 1-4 subprojectile1(recursionLimit=1,xOffsetRelative=0,yOffsetRelative=0,offsetHeight=0,offsetDir=0,


Combined Output: offsetRandomDir=0,offsetRandomX=0,offsetRandomY=0,offsetRandomXY=0),subprojectile2(recursionLimit=1,
xOffsetRelative=0,yOffsetRelative=0,offsetHeight=0,offsetDir=0,offsetRandomDir=0,offsetRandomX=0,
offsetRandomY=0,offsetRandomXY=0),subprojectile3(recursionLimit=1,xOffsetRelative=0,yOffsetRelative=0,
offsetHeight=0,offsetDir=0,offsetRandomDir=0,offsetRandomX=0,offsetRandomY=0,offsetRandomXY=0),
subprojectile4(recursionLimit=1,xOffsetRelative=0,yOffsetRelative=0,offsetHeight=0,offsetDir=0,
offsetRandomDir=0,offsetRandomX=0,offsetRandomY=0,offsetRandomXY=0),
offsetRandomDir=0,offsetRandomX=0,offsetRandomY=0,offsetRandomXY=0),subprojectile2(recursionLimit=1,
xOffsetRelative=0,yOffsetRelative=0,offsetHeight=0,offsetDir=0,offsetRandomDir=0,offsetRandomX=0,
offsetRandomY=0,offsetRandomXY=0),subprojectile3(recursionLimit=1,xOffsetRelative=0,yOffsetRelative=0,
offsetHeight=0,offsetDir=0,offsetRandomDir=0,offsetRandomX=0,offsetRandomY=0,offsetRandomXY=0),
subprojectile4(recursionLimit=1,xOffsetRelative=0,yOffsetRelative=0,offsetHeight=0,offsetDir=0,
offsetRandomDir=0,offsetRandomX=0,offsetRandomY=0,offsetRandomXY=0),
CCCCCC Description Change this column
OOOOOO
Text ONLY Output
ONLY Output Full Output
DDDDDD
Language English English English displayText:Frigate Information
EEEEEE
displayDescription:Frigate - These are versatile vessels that can carry out
3333T
33 displayDescription Frigate - These are versatile vessels that can carry out escort duties and diplomatic missions displayText:Frigate Information
escort duties and diplomatic missions with ease. Their small size and high
r English displayText:Frigate Information Frigate Information :Frigate - These with ease. Their small size and high maneuverability make them ideal for such tasks. However, en displayText displayDescription displayDescription:Frigate - These are versatile
maneuverability make them ideal for such tasks. However, one should not
a one should not underestimate their capabilities in battle as their agility can outmatch any vessels that can carry out escort duties and
are versatile underestimate their capabilities in battle as their agility can outmatch any
n other class of warship. diplomatic missions with ease. Their small size and
Language German vessels that can German German other class of warship.
s high maneuverability make them ideal for such tasks.
carry out escort displayText_de:Informationen zur Fregatte
l However, one should not underestimate their
displayDescrip
duties and Fregatte – Dies sind vielseitige Schiffe, die problemlos Begleitaufgaben und displayText_de:Informationen zur Fregatte displayDescription_de:Fregatte – Dies sind vielseitige Schiffe, die problemlos
a displayText_de:Informationen zur
Informationen zur Fregatte tion_de: capabilities in battle as their–agility
displayDescription_de:Fregatte canvielseitige
Dies sind outmatch
t
German
Fregatte diplomatic diplomatische Missionen durchführen können. Ihre geringe Größe und hohe de displayText_de displayDescription_de
any otherdie
class of warship.
Begleitaufgaben und diplomatische Missionen durchführen können. Ihre geringe
Fregatte – Schiffe, problemlos Begleitaufgaben und Größe und hohe Manövrierfähigkeit machen sie ideal für solche Aufgaben.
e missions
Dies with
sind Manövrierfähigkeit machen sie ideal für solche Aufgaben. Allerdings sollte man ihre diplomatische Missionen durchführen können. Ihre Allerdings sollte man ihre Fähigkeiten im Kampf nicht unterschätzen, da ihre
Language Italian ease. Their small
vielseitige Fähigkeiten im Kampf nicht unterschätzen, da ihre Agilität jede andere Klasse von
Italian Italian
geringe Größe und hohe Manövrierfähigkeit machen sie Agilität jede andere Klasse von Kriegsschiffen übertreffen kann.
t Schiffe,
size and high
displayDescrip die Kriegsschiffen
Fregata übertreffen
- Si tratta di navikann.
versatili che possono svolgere con facilità compiti di ideal für solche Aufgaben. Allerdings
displayText_it:Informazioni sollte man ihre
sulla fregata displayText_it:Informazioni sulla fregata
h displayText_it:Informazioni sulla problemlos Fähigkeiten im Kampf nicht unterschätzen, da navi
ihre
maneuverability
Informazioni sulla fregata tion_it: displayDescription_it:Fregata - Si tratta di displayDescription_it:Fregata - Si tratta di navi versatili che possono
i Italian
fregata Begleitaufgabe scorta e missioni diplomatiche. Le loro dimensioni ridotte e l'elevata manovrabilità it displayText_it displayDescription_it
Agilität jede andere Klasse voncon
Kriegsschiffen
Fregata
make them- ideal
Si versatili che possono svolgere facilità compiti di svolgere con facilità compiti di scorta e missioni diplomatiche. Le loro
s n und di navi
tratta li rendono ideali per tali compiti. Tuttavia, non bisogna sottovalutare le loro übertreffen
scorta kann. diplomatiche. Le loro dimensioni
e missioni dimensioni ridotte e l'elevata manovrabilità li rendono ideali per tali
for such tasks.
Language Chinese diplomatische
versatili che capacità in battaglia poiché la loro agilità può superare qualsiasi altra classe di
Chinese Chinese
ridotte e l'elevata manovrabilità li rendono ideali compiti. Tuttavia, non bisogna sottovalutare le loro capacità in battaglia
p However, one
Missionen
h
possono
displayDescrip navi da
护卫舰 - guerra.
这些是多功能船只,可以 轻松执行护航任务和外交任 务。它们的小尺寸和高机 动性使它们成为此类任 per tali compiti. Tuttavia, non bisogna sottovalutare
displayText_zh:有关护卫舰的信息 poiché la loro agilità può superare qualsiasi altra classe di navi da guerra.
should not con
durchführen
svolgere le loro capacità in battaglia poiché la loro agilità displayText_zh:有关护卫舰的信息
r Chinese displayText_zh:有关护卫舰的信息 有关护卫舰的信息 tion_zh:护卫舰 zh displayText_zh displayDescription_zh displayDescription_zh:护卫舰 - 这些是多功能船只,可以轻松执
underestimate
können.
facilità
这些是多功能船
Ihre 务的理想选择。然而,人 们不应该低估它们的战斗能力,因 为它们的敏捷性可以 胜过任何其他 级别的战舰。 può superare qualsiasi altra classe di navi da guerra. displayDescription_zh:护卫舰 - 这些是多功能船只,可以轻松执行护航任务和外交任务。它们的小尺
a -
geringe Größe 行护航任务和外交任务。它们的小尺寸和高机动性使它们成为此类任务的
their capabilities
compiti di 理想选择。然而,人们不应该低估它们的战斗能力,因为它们的敏捷性可 寸和高机动性使它们成为此类任务的理想选择。然而,人们不应该低估它们的战斗能力,因为它们的敏捷性可以
s
Language Japanese 只,可以轻松执行护
und hohe Japanese
e
scorta
in battle
航任务和外交任务。
e their
as Japanese
以胜过任何其他级别的战舰。 胜过任何其他级别的战舰。
Manövrierfähig
missioni
agility can
displayDescrip
它们的小尺寸和高机
keit machen フリゲート - これらは護衛任務や外交任務を容易に実行できる多用途の船です。小型で機動性が高いため、 displayText_ja:フリゲート艦に関する情報 displayText_ja:フリゲート艦に関する情報
displayText_ja:フリゲート艦に関する情 diplomatiche.
outmatch anyfür displayDescription_ja:フリゲート - これらは護衛任務や外交任 displayDescription_ja:フリゲート - これらは護衛任務や外交任務を容易に実行できる多用途の船で
t Japanese フリゲート艦に関する情報 tion_ja:フリゲー
动性使它们成为此类
sie ideal このような作業に最適です。ただし、その敏捷性は他のどのクラスの軍艦にも負けないため、戦闘能力を過小 ja displayText_ja displayDescription_ja
報 Le
ト -loro
これらは護衛 務を容易に実行できる多用途の船です。小型で機動性が高いため、この す。小型で機動性が高いため、このような作業に最適です。ただし、その敏捷性は他のどのクラスの軍艦にも
o other class
任务的理想选择。然
solche of 評価してはなりません。
dimensioni
任務や外交任務を容 ような作業に最適です。ただし、その敏捷性は他のどのクラスの軍艦に 負けないため、戦闘能力を過小評価してはなりません。
warship.
Aufgaben.
而,人们不应该低估
ridotte e も負けないため、戦闘能力を過小評価してはなりません。
t Language Russian 易に実行できる多用 Russian Russian displayText_ru:Информация о фрегатах
Allerdings
它们的战斗能力,因
途の船です。小型で
l'elevata displayDescription_ru:Фрегат — это универсальные суда, которые могут с
h
displayText_ru:Информация о
displayDescrip
機動性が高いため、
sollte man
为它们的敏捷性可以
manovrabilità Фрегат — это универсальные суда, которые могут с легкостью выполнять функции displayText_ru:Информация о фрегатах
легкостью выполнять функции сопровождения и дипломатические миссии. Их
e Russian Информация о фрегатах tion_ru:Фрегат
このような作業に最
ihre ru displayText_ru displayDescription_ru displayDescription_ru:Фрегат — это универсальные суда,
фрегатах li rendono
胜过任何其他级别的 сопровождения и дипломатические миссии. Их небольшой размер и высокая небольшой размер и высокая маневренность делают их идеальными для таких задач.
適です。ただし、そ
— это
Fähigkeiten которые могут с легкостью выполнять функции
ideali per im
战舰。 Однако не следует недооценивать их боевые возможности, поскольку их
f の敏捷性は他のどの
универсальные
Kampfcompiti.
nicht маневренность делают их идеальными для таких задач. Однако не следует сопровождения и дипломатические миссии. Их небольшой
tali
クラスの軍艦にも負
o Language Spanish суда, которые
unterschätzen, недооценивать их боевые возможности , поскольку их маневренность может превзойти
Spanish Spanish
размер и высокая маневренность делают их идеальными
маневренность может превзойти любой другой класс боевых кораблей.
けないため、戦闘能
Tuttavia, non displayText_es:Información de fragata
l
displayText_es:Información de
могут с
displayDescrip
da ihre
力を過小評価しては
bisogna Fragata: Son embarcaciones
любой другой класс боевых кораблей . que pueden realizar tareas de escolta y
versátiles для таких задач. Однако не de
displayText_es:Información следует недооценивать их
fragata
displayDescription_es:Fragata: Son embarcaciones versátiles que pueden realizar
l легкостью
なりません。
tion_es:
Agilität jede боевые возможности, поскольку их
displayDescription_es:Fragata: маневренность
Son может
embarcaciones
o
Spanish
fragata
Información de fragata sottovalutare
выполнять misiones diplomáticas con facilidad. Su pequeño tamaño y su gran maniobrabilidad los es displayText_es displayDescription_es
превзойти любой другойrealizar
класс боевых кораблей.
tareas de escolta y misiones diplomáticas con facilidad. Su pequeño tamaño y su
Fragata:
andere
le loroKlasse Son versátiles que pueden tareas de escolta y
w функции
embarcaciones
von hacen ideales para este tipo de tareas. Sin embargo, no se deben subestimar sus misiones diplomáticas con facilidad. Su pequeño tamaño
gran maniobrabilidad los hacen ideales para este tipo de tareas. Sin embargo,
capacità in no se deben subestimar sus capacidades en batalla, ya que su agilidad puede
i Language Tagalog сопровождения
versátiles
Kriegsschiffen
battaglia que capacidades en batalla, ya que su agilidad puede superar a cualquier otra clase de
Tagalog Tagalog
y su gran maniobrabilidad los hacen ideales para este
n superar a cualquier otra clase de buque de guerra.
и
pueden
übertreffen
displayDescrip
poiché la loro buque de-guerra.
Frigate Ito ay maraming nalalaman na sasakyang-dagat na maaaring magsagawa ng mga tipo de tareas. Sin embargo,
displayText_tl:Impormasyon sano se deben subestimar
frigate displayText_tl:Impormasyon sa frigate
g displayText_tl:Impormasyon sa дипломатически sus capacidades en batalla, ya-que
realizar
kann.
tion_tl: displayDescription_tl:Frigate Itosuayagilidad
maramingpuede
Tagalog
frigate
Impormasyon sa frigate agilità
е миссии.
può
Их tungkulin sa pag-escort at mga diplomatikong misyon nang madali. Ang kanilang maliit tl displayText_tl displayDescription_tl
superar a nacualquier otra clase
displayDescription_tl:Frigate - Ito ay maraming nalalaman na sasakyang-dagat na
tareas
Frigate de
superare- Ito nalalaman sasakyang dagat nade buque de
maaaring guerra. ng
magsagawa maaaring magsagawa ng mga tungkulin sa pag-escort at mga diplomatikong misyon
l небольшой
escolta
ay maraming
qualsiasi y na sukat at mataas na kakayahang magamit ay ginagawa silang perpekto para sa mga mga tungkulin sa pag escort at mga diplomatikong
a nang madali. Ang kanilang maliit na sukat at mataas na kakayahang magamit ay
Language Ukrainian размер и na
misiones
nalalaman
altra classe naturang gawain. Gayunpaman, hindi dapat maliitin ng isang tao ang kanilang mga
Ukrainian Ukrainian
misyon nang madali. Ang kanilang maliit na sukat at ginagawa silang perpekto para sa mga naturang gawain. Gayunpaman, hindi dapat
n высокая
g
diplomáticas
sasakyang-
di navi da
displayDescrip
маневренность kakayahan
Фрегат - цеsa універсальні
labanan dahilсудна,
ang kanilang liksi
які можуть ay maaaring
з легкістю higitan ang
виконувати anumang iba
обов'язки mataas na kakayahang magamit
displayText_uk:Інформація проay ginagawa silang
фрегат maliitin ng isang tao ang kanilang mga kakayahan sa labanan dahil ang kanilang
displayText_uk:Інформація про con
dagat facilidad.
na perpekto para sa mga naturang-gawain. Gayunpaman,
u Ukrainian Інформація про фрегат guerra.
tion_uk:Фрегат pang klase таng виконувати
barkong pandigma. uk displayText_uk displayDescription_uk displayDescription_uk:Фрегат це універсальні судна, liksi ay maaaring higitan ang anumang iba pang klase ng barkong pandigma.
фрегат делают
Suце их
pequeño супроводу дипломатичні місії. Їх невеликий розмір і висока hindi dapatзmaliitin
maaaring
- які можуть легкістюng isang taoобов'язки
виконувати ang kanilang mga
супроводу displayText_uk:Інформація про фрегат
a идеальными
tamaño
magsagawa y su
універсальні ngдля маневреність роблять їх ідеальними для таких завдань . Однак не слід недооцінювати kakayahan
та sa labanan
виконувати dahil місії.
дипломатичні ang kanilang liksi ay
Їх невеликий розмір displayDescription_uk:Фрегат - це універсальні судна, які можуть з легкістю
g Language Vietnamese таких
gran задач. Vietnamese
mga
судна,tungkulin
які їхні можливості в бою, оскільки їхня спритність може перевершити будь-який інший maaaring
Vietnamese
і higitan ang anumang
висока маневреність роблятьiba pang klase для
їх ідеальними ng barkong
таких виконувати обов'язки супроводу та виконувати дипломатичні місії. Їх невеликий
e Однако не
maniobrabilida
sa pag-escort
можуть з класkhu . tàu đa năng có thể thực hiện nhiệm vụ hộ tống và sứ mệnh pandigma.Однак не слід
завдань. недооцінювати їхні можливості в
s displayText_vi:Thông tin về tàu
displayDescrip
следует
d
at los
mgahacen Tàu trục - Đây
військових là những
кораблів displayText_vi:Thông tin về tàu khu trục розмір і висока маневреність роблять їх ідеальними для таких завдань. Однак не
Vietnamese легкістю
tion_vi:Tàu
Thông tin về tàu khu trục недооценивать vi displayText_vi displayDescription_vi бою, оскільки їхня спритність
displayDescription_vi:Tàu може -
khu trục перевершити будь
Đây là những tàu слід недооцінювати їхні можливості в бою, оскільки їхня спритність може
khu trục ideales para
diplomatikong
виконувати ngoại giao một cách dễ dàng. Kích thước nhỏ và khả năng cơ động cao khiến chúng trở який інший класthực
військових кораблів. перевершити будь-який інший клас військових кораблів.
u khu
este
misyontrục
их боевые
tipo - de
nang Đây đa năng có thể hiện nhiệm vụ hộ tống và sứ mệnh
s обов'язки
возможности,
là nhữngAng
tareas.
madali. tàu
Sin nên lý tưởng cho những nhiệm vụ như vậy. Tuy nhiên, người ta không nên đánh giá thấp ngoại giao một cách dễ dàng. Kích thước nhỏ và khả displayText_vi:Thông tin về tàu khu trục
Language Malaysian супроводу та Malaysian Malaysian
i поскольку
embargo,
đa năng có их
no se
thể khả năng chiến đấu của chúng vì sự nhanh nhẹn của chúng có thể vượt trội hơn bất kỳ năng cơ động cao khiến chúng trở nên lý tưởng cho displayDescription_vi:Tàu khu trục - Đây là những tàu đa năng có thể thực hiện
kanilang
виконувати
n displayDescrip
маневренность
deben
maliit na nhiệm Frigate - Ini adalah kapal serba boleh yang boleh menjalankan tugas pengiring dan displayText_ms:Maklumat tentang
những nhiệm vụ như vậy. Tuy pemusnah
nhiên, người ta không nên nhiệm vụ hộ tống và sứ mệnh ngoại giao một cách dễ dàng. Kích thước nhỏ và khả
g displayText_ms:Maklumat tentang дипломатичні
thực
Maklumat tentang pemusnah tion_ms:
hiện loại tàu chiến nào khác. displayDescription_ms:Frigate - Ini adalah kapal serba
Malaysian
pemusnah
может
subestimar
sukat
місії. atЇх sus misi diplomatik dengan mudah. Saiznya yang kecil dan kebolehgerakan yang tinggi ms displayText_ms displayDescription_ms đánh giá thấp khả năng chiến đấu của chúng vì sự năng cơ động cao khiến chúng trở nên lý tưởng cho những nhiệm vụ như vậy. Tuy
vụ hộ tống
Frigate
превзойти
capacidades vàen
- Ini boleh yang boleh menjalankan tugas pengiring dan misi
I
mataas
невеликий
adalah
sứ
любойmệnh
na
kapal
ngoại
другой menjadikannya sesuai untuk tugasan tersebut. Walau bagaimanapun, seseorang tidak nhanh nhẹn của chúng có thể vượt trội hơn bất kỳ loại
diplomatik dengan mudah. Saiznya yang kecil dan nhiên, người ta không nên đánh giá thấp khả năng chiến đấu của chúng vì sự
batalla,
kakayahang і ya tàu chiến nào khác.
S Language Korean розмірboleh
serba
класс
que
giao su боевых
một cách boleh memandang rendah keupayaan mereka dalam pertempuran kerana ketangkasan mereka
Korean Korean
kebolehgerakan yang tinggi menjadikannya sesuai untuk nhanh nhẹn của chúng có thể vượt trội hơn bất kỳ loại tàu chiến nào khác.
magamit
висока ay
O yang boleh
кораблей.
displayDescrip
agilidad
ginagawa
dễ dàng. Kíchpuede boleh mengatasi -mana-mana
프리깃(Frigate) 호위 임무와kelas 외교 kapal
임무를 perang
쉽게 수행할 yang수lain.
있는 다재다능한 선박입니다 . 크기가 작 tugasan tersebut. Walau
displayText_ko:해충 구제자에 bagaimanapun,
대한 정보 seseorang tidak displayText_ms:Maklumat tentang pemusnah
- displayText_ko:해충 구제자에 대한 정 маневреність
menjalankan boleh memandang rendah keupayaan mereka
displayDescription_ko:프리깃(Frigate) - 호위dalam
Korean 해충 구제자에 대한 정보 tion_ko:프리깃
superar
silang
роблять
thước nhỏ a và
їх 고 기동성이 뛰어나 이러한 작업에 이상적입니다 . 하지만 민첩성은 다른 어떤 군함보다도 뛰어날 수 있 ko displayText_ko displayDescription_ko 임무와 외교 displayDescription_ms:Frigate - Ini adalah kapal serba boleh yang boleh
6 보 tugas
(Frigate)
cualquierpara - 호
otra pertempuran
임무를 쉽게 수행할kerana ketangkasan
수 있는 다재다능한mereka boleh크기가
선박입니다. mengatasi
작고 menjalankan tugas pengiring dan misi diplomatik dengan mudah. Saiznya yang
perpekto
ідеальними для
3 khả năng
pengiring
위 임무와
clase de cơ
외교dan
buque임 으므로 전투 능력을 과소평가해서는 안 됩니다. mana mana
기동성이 kelas
뛰어나 이러한kapal perang
작업에 yang lain.
이상적입니다. 하지만 민첩성은 다 kecil dan kebolehgerakan yang tinggi menjadikannya sesuai untuk tugasan
sa mga
таких завдань.
9 Language Indonesian misi
무를 쉽게 Indonesian Indonesian
động не 수행할
cao
de guerra.
naturang
Однак
diplomatik
khiến
слід 른 어떤 군함보다도 뛰어날 수 있으므로 전투 능력을 과소평가해서 tersebut. Walau bagaimanapun, seseorang tidak boleh memandang rendah keupayaan
수 있는trở 다재다능
displayDescrip
chúng
gawain. nên Fregat – Ini adalah kapal serbaguna yang dapat dengan mudah menjalankan tugas 는 안 됩니다.
displayText_id:Informasi tentang pembasmi hama mereka dalam pertempuran kerana ketangkasan mereka boleh mengatasi mana-mana
c displayText_id:Informasi tentang Informasi tentang pembasmi недооцінювати
dengan
한 선박입니다. mudah.크
tion_id:Fregat displayDescription_id:Fregat – Ini adalah kapal kelas kapal perang yang lain.
o
Indonesian
pembasmi hama hama
Gayunpaman,

їхні tưởngyang
Saiznya cho pengawalan dan misi diplomatik. Ukurannya yang kecil dan kemampuan manuvernya yang id displayText_id displayDescription_id
기가
– Ini작고
hindi 기동성
adalah
dapat
можливості serbaguna yang dapat dengan mudah menjalankan tugas displayText_ko:해충 구제자에 대한 정보
d những
kecil nhiệmвvụ
dan tinggi menjadikannya ideal untuk tugas-tugas tersebut. Namun kemampuan mereka dalam
이 뛰어나
kapal
maliitin
бою, 이러한
ng
оскільки pengawalan dan misi diplomatik. Ukurannya yang kecil displayDescription_ko:프리깃(Frigate) - 호위 임무와 외교 임무를 쉽게 수행할 수 있는 다
e kebolehgerakan
như
작업에 vậy.
serbaguna
isang
їхня taoTuy
이상적입니 yang
ang bertempur tidak boleh dianggap remeh karena kelincahannya bisa melampaui kapal dan kemampuan manuvernya yang tinggi menjadikannya 재다능한 선박입니다. 크기가 작고 기동성이 뛰어나 이러한 작업에 이상적입니다. 하지만 민첩성은
s yang tinggi
:
displayText:Frigate Information 다.
nhiên,
dapat 하지만
kanilang người
dengan
displayDescrip
спритність
menjadikannya
민첩성
mga perang sekelas lainnya. ideal untuk tugas tugas tersebut. Namun kemampuan 다른 어떤 군함보다도 뛰어날 수 있으므로 전투 능력을 과소평가해서는 안 됩니다.

ta 다른
mudahkhông
kakayahan 어떤
tion:Frigate
може sa군함
nên - mereka dalam bertempur tidak boleh dianggap remeh displayText_id:Informasi tentang pembasmi hama
sesuai untuk
displayText_de:Informationen zur 보다도
labanan
These 뛰어날
menjalankan
đánh giá
are
перевершити thấp
dahil 수 karena kelincahannya bisa melampaui kapal perang displayDescription_id:Fregat – Ini adalah kapal serbaguna yang dapat dengan
tugasan
Fregatte 있으므로
tugas
ang năng 전투
kanilang
versatile
будь-який
khả chiến능 sekelas lainnya. mudah menjalankan tugas pengawalan dan misi diplomatik. Ukurannya yang kecil
tersebut.
liksi과소평가해서
력을
pengawalan
vessels
інший aythat
клас dan dan kemampuan manuvernya yang tinggi menjadikannya ideal untuk tugas-tugas
đấu
Walau của chúng
displayText_it:Informazioni sulla 는
misi안carry
maaaring
can 됩니다.
військових out tersebut. Namun kemampuan mereka dalam bertempur tidak boleh dianggap remeh
bagaimanapun,
vì sự nhanh
diplomatik.
fregata higitan
escort
кораблів. ang
duties karena kelincahannya bisa melampaui kapal perang sekelas lainnya.
seseorang
Ukurannya
nhẹn của iba yang
chúng
anumang
and diplomatic
tidak
kecil boleh
dan
displayText_zh:有关护卫舰的信息 pang
missions
có thểklase
vượt ng
with
memandang
kemampuan
barkong
ease.
trội Their
hơn bất kỳ
rendah
manuvernya
displayText_ja:フリゲート艦に関する情 pandigma.
small size and
keupayaan
loại tàu
yang tinggichiến
報 high
mereka dalam
nào khác.
menjadikannya
maneuverabilit
pertempuran
ideal
displayText_ru:Информация о y makeuntuk
them
kerana
tugas-tugas
фрегатах ideal for such
ketangkasan
tersebut.
tasks.
mereka boleh
Namun
displayText_es:Información de However, one
mengatasi
kemampuan
fragata should not
mana-mana
mereka dalam
underestimate
kelas kapal
bertempur
displayText_tl:Impormasyon sa their
perangboleh
tidak yang
frigate capabilities
lain.
dianggap
in battleremehas
displayText_uk:Інформація про karenaagility
their
фрегат kelincahannya
can outmatch
bisaother
any melampaui
displayText_vi:Thông tin về tàu kapal of
class perang
sekelas
warship.
khu trục lainnya.
displayText_ms:Maklumat tentang displayDescrip
pemusnah tion_de:
Fregatte –
displayText_ko:해충 구제자에 대한 정 Dies sind
vielseitige
보 Schiffe, die
problemlos
Begleitaufgabe
n und
diplomatische
Missionen
durchführen
können. Ihre
geringe Größe
und hohe
Manövrierfähig
keit machen
sie ideal für
solche
Aufgaben.
Allerdings
sollte man
ihre
Fähigkeiten im
Kampf nicht
unterschätzen,
da ihre
Agilität jede
andere Klasse
von
Kriegsschiffen
übertreffen
kann.

displayDescrip
tion_it:
Fregata - Si
tratta di navi
versatili che
possono
svolgere con
facilità
compiti di
scorta e
missioni
diplomatiche.
Le loro
dimensioni
ridotte e
l'elevata
manovrabilità
li rendono
ideali per
tali compiti.
Tuttavia, non
bisogna
sottovalutare
le loro
capacità in
battaglia
poiché la loro
agilità può
superare
qualsiasi
altra classe
di navi da
guerra.

displayDescrip
tion_zh:护卫舰
- 这些是多功能船
只,可以轻松执行护
航任务和外交任务。
它们的小尺寸和高机
动性使它们成为此类
任务的理想选择。然
而,人们不应该低估
它们的战斗能力,因
为它们的敏捷性可以
胜过任何其他级别的
战舰。

displayDescrip
tion_ja:フリゲー
ト - これらは護衛
任務や外交任務を容
易に実行できる多用
途の船です。小型で
機動性が高いため、
このような作業に最
適です。ただし、そ
の敏捷性は他のどの
クラスの軍艦にも負
けないため、戦闘能
力を過小評価しては
なりません。

displayDescrip
tion_ru:Фрегат
— это
универсальные
суда, которые
могут с
легкостью
выполнять
функции
сопровождения
и
дипломатически
е миссии. Их
небольшой
размер и
высокая
маневренность
делают их
идеальными для
таких задач.
Однако не
следует
недооценивать
их боевые
возможности,
поскольку их
маневренность
может
превзойти
любой другой
класс боевых
кораблей.

displayDescrip
tion_es:
Fragata: Son
embarcaciones
versátiles que
pueden
realizar
tareas de
escolta y
misiones
diplomáticas
con facilidad.
Su pequeño
tamaño y su
gran
maniobrabilida
d los hacen
ideales para
este tipo de
tareas. Sin
embargo, no se
deben
subestimar sus
capacidades en
batalla, ya
que su
agilidad puede
superar a
cualquier otra
clase de buque
de guerra.

displayDescrip
tion_tl:
Frigate - Ito
ay maraming
nalalaman na
sasakyang-
dagat na
maaaring
magsagawa ng
mga tungkulin
sa pag-escort
at mga
diplomatikong
misyon nang
madali. Ang
kanilang
maliit na
sukat at
mataas na
kakayahang
magamit ay
ginagawa
silang
perpekto para
sa mga
naturang
gawain.
Gayunpaman,
hindi dapat
maliitin ng
isang tao ang
kanilang mga
kakayahan sa
labanan dahil
ang kanilang
liksi ay
maaaring
higitan ang
anumang iba
pang klase ng
barkong
pandigma.

displayDescrip
tion_uk:Фрегат
- це
універсальні
судна, які
можуть з
легкістю
виконувати
обов'язки
супроводу та
виконувати
дипломатичні
місії. Їх
невеликий
розмір і
висока
маневреність
роблять їх
ідеальними для
таких завдань.
Однак не слід
недооцінювати
їхні
можливості в
бою, оскільки
їхня
спритність
може
перевершити
будь-який
інший клас
військових
кораблів.

displayDescrip
tion_vi:Tàu
khu trục - Đây
là những tàu
đa năng có thể
thực hiện nhiệm
vụ hộ tống và
sứ mệnh ngoại
giao một cách
dễ dàng. Kích
thước nhỏ và
khả năng cơ
động cao khiến
chúng trở nên
lý tưởng cho
những nhiệm vụ
như vậy. Tuy
nhiên, người
ta không nên
đánh giá thấp
khả năng chiến
đấu của chúng
vì sự nhanh
nhẹn của chúng
có thể vượt
trội hơn bất kỳ
loại tàu chiến
nào khác.

displayDescrip
tion_ms:
Frigate - Ini
adalah kapal
serba boleh
yang boleh
menjalankan
tugas
pengiring dan
misi
diplomatik
dengan mudah.
Saiznya yang
kecil dan
kebolehgerakan
yang tinggi
menjadikannya
sesuai untuk
tugasan
tersebut.
Walau
bagaimanapun,
seseorang
tidak boleh
memandang
rendah
keupayaan
mereka dalam
pertempuran
kerana
ketangkasan
mereka boleh
mengatasi
mana-mana
kelas kapal
perang yang
lain.

displayDescrip
tion_ko:프리깃
(Frigate) - 호
위 임무와 외교 임
무를 쉽게 수행할
수 있는 다재다능
한 선박입니다. 크
기가 작고 기동성
이 뛰어나 이러한
작업에 이상적입니
다. 하지만 민첩성
은 다른 어떤 군함
보다도 뛰어날 수
있으므로 전투 능
력을 과소평가해서
는 안 됩니다.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy