14% found this document useful (7 votes)
4K views22 pages

Rusted Warfare: Modding Reference PDF

This document contains a summary of keys used to define units in a game. It includes keys for common identification like name and altNames, unit stats like maxHp and armour, economic values like price and generation rates, and UI properties like displayText and displayRadius. The keys are organized into sections for common, stats, economic, and UI properties. Each key is described along with an example value and data type. Some keys were added in later versions, and others like generation_resources allow for custom resources.

Uploaded by

C31g
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
14% found this document useful (7 votes)
4K views22 pages

Rusted Warfare: Modding Reference PDF

This document contains a summary of keys used to define units in a game. It includes keys for common identification like name and altNames, unit stats like maxHp and armour, economic values like price and generation rates, and UI properties like displayText and displayRadius. The keys are organized into sections for common, stats, economic, and UI properties. Each key is described along with an example value and data type. Some keys were added in later versions, and others like generation_resources allow for custom resources.

Uploaded by

C31g
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/ 22

Section [core]

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 = Errors 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. price: 500 int
mass: The 'weight' of the unit, defines how it collides with other units, 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 it takes to build the unit. (may multiply with builder speed) buildSpeed: 3s float / s
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 bool
isBug: Changes some death defaults, and sort order in Sandbox. isBug: false bool
isBuilder: Normally required if this unit places buildings. Defaults to [ai]useAsBuilder. isBuilder: true bool 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 start with 0 hitpoints if startShieldAtZero:true. maxShield: 500 int
startShieldAtZero: Unit starts with a 0 hitpoints shield on created if true. startShieldAtZero: true bool
shieldRegen: Passive shield regen rate. shieldRegen: 0.15 float
energyMax: Defaults to 0. Energy that can be used as ammo for turrets, laser defense and 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. 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. (not currently used in any vanilla units) armour: 6 int 1.13
armourMinDamageToKeep: Min damage to keep from received damage. Defaults to 1. armourMinDamageToKeep: 2 int 1.13
borrowResourcesWhileAlive: Takes these resources when created and returns them when removed or destroyed. borrowResourcesWhileAlive: gold=10 price 1.13.3
generation_resources: Income unit creates. (custom resource version) generation_resources: credits=5, gold=20 price 1.13.3
generation_active: Disables generation_resources when false. (logic_boolean) generation_active: if not self.hp(lessThan=100) logicBoolean 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 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 bool
displayText: The unit name that the game shows to the player. displayText: Custom Tank LocaleString
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 LocaleString
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 bool
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 bool 1.13.3
showActionsWithMixedSelectionIfOtherUnitsHaveTag: Shows a merged action list if all units selected includes one of these tags. Useful for converted units. showActionsWithMixedSelectionIfOtherUnitsHaveTag: true bool 1.13.3
#==== Building Only Keys #====
isBuilding: Defines if the unit is a building. isBuilding: true bool
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 in a resource pool. placeOnlyOnResPool: true bool
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(s) (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: 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. 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 bool
isLockedIfGameModeNoNuke: Disallows building of this unit if nukes are disabled during match setup. isLockedIfGameModeNoNuke: true bool 1.13
experimental: Tag unit as experimental. Affects zoomed out icon and end game stats. experimental: true bool
stayNeutral: Set to false to disable capture when unit is on the neutral team. stayNeutral: false bool
createNeutral: Set to true to always spawn the unit on the neutral team. createNeutral: true bool 1.13
createOnAggressiveTeam: Set to true to always spawn the unit on aggressive teams on single player matches. createOnAggressiveTeam: true bool
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 bool
isUnrepairableUnit: No unit can repair this unit if true. isUnrepairableUnit: true bool 1.13
isUnselectable: If true unit cannot be selected. (includes AI players) isUnselectable: true bool
isPickableStartingUnit: If true, unit is added to dropdowns for starting unit in game setup menus. isPickableStartingUnit: true bool 1.13
startFallingWhenStartingUnit: Unit will appear falling from skies when starting unit if true. startFallingWhenStartingUnit: true bool 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 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 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 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 bool
canNotBeDamaged Defaults to value of canNotBeDirectlyAttacked (becareful setting this without canNotBeDirectlyAttacked, as AI will attack forever)
canNotBeGivenOrdersByPlayer: If true unit will not take player or AI orders. canNotBeGivenOrdersByPlayer: true bool 1.13.3
canOnlyBeAttackedByUnitsWithTags: List of tag strings, only units with these tags can directly target this unit. canOnlyBeAttackedByUnitsWithTags: piercingTank, powerfulTank strings(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 movementTypes 1.13
transportUnitsBlockAirAndWaterUnits: Defaults to true. This unit can only transport LAND units if true. transportUnitsBlockAirAndWaterUnits: false bool 1.13

transportUnitsKeepBuiltUnits: Makes built units stay inside transport instead of exiting it once ready if true. transportUnitsKeepBuiltUnits: true LogicBoolean 1.13
transportUnitsCanUnloadUnits: Defaults to: if not self.isOverLiquid() and not self.isMoving(). This unit cannot unload units if false. transportUnitsCanUnloadUnits: false LogicBoolean 1.13
transportUnitsAddUnloadOption: Defines if unload button should be added to the unit menu transportUnitsAddUnloadOption: false LogicBoolean 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() LogicBoolean 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 bool
whileNeutralTransportAnyTeam: This unit can transport units of any team while neutral if true. whileNeutralTransportAnyTeam: true bool 1.13.3
whileNeutralConvertToTransportedTeam: Converts this unit to transported team while neutral. Useful with whileNeutralTransportAnyTeam. whileNeutralConvertToTransportedTeam: true bool 1.13.3
convertToNeutralIfNotTransporting: Reverts back this unit to neutral when unloaded. Useful with whileNeutralTransportAnyTeam. convertToNeutralIfNotTransporting: true bool 1.13.3
Keeps transported units on their orginal team when this unit is converted if true.
transportUnitsOnTeamChangeKeepCurrentTeam: transportUnitsOnTeamChangeKeepCurrentTeam: true bool 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 1.13.3
#==== Resource Harvester Keys #==== 1.13.3
canReclaimResources: If true this unit can gather resources, useful with resourceRate. canReclaimResources: true bool
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 bool
canRepairUnits: This unit can heal ally units if true. (isBuilder:true is required) canRepairUnits: true bool
autoRepair: Automatically try and repair damaged units in nano range. (isBuilder:true is required) autoRepair: true bool
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 bool 1.13.3
nanoRangeForReclaimIsMelee: Defines if this unit must touch its target to reclaim it. nanoRangeForReclaimIsMelee: true bool 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 bool
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) LogicBoolean 1.13.3
builtFrom_#_isLockedMessage: Message shown when this build link is locked. builtFrom_1_isLockedMessage: -Needs more population LocaleString 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 bool
dieOnZeroEnergy: Kills this unit if energy level reaches zero when true. dieOnZeroEnergy: true bool 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 bool
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 bool
fireTurretXAtSelfOnDeath: Auto-shoot a specific turret when this unit dies. fireTurretXAtSelfOnDeath: turret_1 turret ref
explodeOnDeath: Defaults to true. Disables the unit death explode built-in effect if false. explodeOnDeath: false bool 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 bool
hideScorchMark: Disables the death scorch mark leaved when unit dies if true. hideScorchMark: true bool
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. time (seconds) 1.13.3
#==== 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 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 bool deprecated 1.13
canBuild_#_name/pos/isLocked: Use canBuild section instead. canBuild_1_name: tank string deprecated 1.13.3

Section [canBuild_NAME] 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 bool 1.13.3
isVisible: Hide this build link if true in this unit UI. isVisible: if not self.energy(greaterThan=100) LogicBoolean 1.13.3
isLocked: Dynamically locks this build option and shows isLockedMessage if true. isLocked: if self.hp(lessThan=100) LogicBoolean 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) LogicBoolean 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() LogicBoolean 1.13.3
isLockedAlt2Message: Message for isLockedAlt2. isLockedAlt2Message: -Needs to be quiet string 1.13.3
addResources: Adds these resources to self when placing the building or producing the unit. addResources: ammo=5, setFlag=1 price(s) 1.13.3
price: Overrides builded units/buildings price. Defaults to target unit prices. price: credits=1000, ammo=5 price(s) 1.13.3
isGuiBlinking: Generates a blinking effect in UI if true. isGuiBlinking: true LogicBoolean 1.13.3

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
isVisible If false will hide the unit. logic 1.13.3
teamColorsUseHue: False: Green pixels on unit gets converted to team color. True: Whole unit is tinted the team colour. Defaults to false bool

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)
icon_zoomed_out_neverShow
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
image_shadow_frames If shadow image should use frame animation of main image bool 1.13.3
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
reclaimEffect 1.13.3
reclaimEffectAtTarget 1.13.3
reclaimEffectRate 1.13.3
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
disableLowHpFire 1.13.3
disableLowHpSmoke 1.13.3
showTransportBar bool 1.13.3
showHealthBar bool 1.13.3
showEnergyBar bool 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_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
canOnlyAttackUnitsWithTags tags 1.13.3
canOnlyAttackUnitsWithoutTags tags 1.13.3
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
meleeEngangementDistance 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) 1.13.3
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
showRangeUIGuide 1.13.3
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. Controls horizontal position for projectile spawn. 1.13
barrelY Defaults to size. Note: size and barrelY have the same meaning 1.13
barrelHeight Height of barrel in 3d. Effect projectile and shoot flame starting height 1.13.3
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
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]
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 Applies area damage as an expanding blast wave rather than instantly. Useful for nuke projectiles float 1.13
areaHitAirAndLandAtSameTime Defaults to false 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 Applies mutators to this projectile if target has corresponding tags eg: mutator1_ifUnitWithTags: infantry 1.13.3
mutatorX_ifUnitWithoutTags Same as ifUnitWithTags, but applies if target doesn't have the set tags 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 Controls the speed rampup for targetSpeed float 1.13
ballistic: Makes projectiles fly up into the air and come down, instead of going in a straight line 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 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.13.3
1.13.3
1.13.3
Graphics and effects 1.13
color Recolors this projectile using a hex value. 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]
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 movementType:
types. 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
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_#] / [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 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]
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]
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]
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}

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


direction_strideX: Overrides [graphics]animation_direction_strideX int
direction_strideY: Overrides [graphics]animation_direction_strideY int
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 line


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 LogicBoolean
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 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()
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 Prices/Resources lines - 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
X Any resource defined in [global_resource_x] or [resource_x] sections gold=5, stone=20 1.13.3

Section [global_resource_NAME]
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]
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]
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
@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) 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
This sheet is for 1.13.2 an older 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 be
action_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 movementType:
types. 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 an older 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
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 be
action_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 movementType:
types. 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.3 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

You might also like