ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
Version Section[core]
2
AddedCode
Value Type
DescriptionExample
3
Necessary Code, will cause error if these are not included
4
name:
5
mass:
6
radius:
7
price:
8
maxHp:
9
#====#====Common Keys
10
name:string
Defines the unit raw name, game uses it to identify as a unique name. (This is not displayed in-game)
name: customTank1
11
altNames:string(s)Comma separated list of names. Like name but lower priority, useful for multiple optional mods.altNames: custTank1, customTank1, cTank1
12
class:stringReserved for future use, must be CustomUnitMetadata by default.class: CustomUnitMetadata
13
1.13.3strictLevel:float
Defaults to 0. 1 = Errors if keys are duplicated. Add to "all-units.template" in root to apply to all units.
strictLevel: 1
14
price:int / priceThe unit cost from builders/buildings. Defaults to credits if no resource type is usedprice: 500, price: gold=5, stone=10
15
mass:int
The 'weight' of the unit, defines how it collides with other units, a greater value means it's tougher to push.
mass: 3000
16
techLevel:int
Defines the Tech Level of the unit, there're 3 levels and each will appear in a different color in the GUI.
techLevel: 1
17
buildSpeed:float / sTime it takes to build the unit. (may multiply with builder speed)buildSpeed: 3s
18
radius:intCircular area around the unit that makes it selectable. (mouse click/screen touch)radius: 20
19
isBio:bool
Choose whether the unit is bioligical or not, affects sound and splat (unless hideScorchMark:true)
isBio: true
20
isBug:boolChanges some death defaults, and sort order in Sandbox.isBug: false
21
1.13isBuilder:boolNormally required if this unit places buildings. Defaults to [ai]useAsBuilder.isBuilder: true
22
1.15streamingCostprice
Like price but paid for overtime while this unit is being queued or built. Construction or queue is paused if resources run out while building.
23
1.15switchPriceWithStreamingCostbool
Shortcut to set streamingCost to price value and clear price, add to all-units.template to quickly switch a mod over to streaming resources.
24
#====#====Unit Stats Keys
25
maxHp:intThe max health for the unit. (will spawn with this value)maxHp: 200
26
selfRegenRate:floatPassive self repair rate.selfRegenRate: 0.01
27
maxShield:intThe max shield hitpoints of the unit. Can start with 0 hitpoints if startShieldAtZero:true.maxShield: 500
28
startShieldAtZero:boolUnit starts with a 0 hitpoints shield on created if true.startShieldAtZero: true
29
shieldRegen:floatPassive shield regen rate.shieldRegen: 0.15
30
floatDefaults to 0. Energy that can be used as ammo for turrets, laser defense and actions.energyMax: 1
31
energyRegen:floatPassive energy regen rate.energyRegen: 0.001
32
energyStartingPercentage:floatSets the percentage of charged energy when the unit is first built.energyStartingPercentage: 0.5
33
energyNeedsToRechargeToFull:floatDisables weapons using energy after reaching zero till fully recharged if true.energyNeedsToRechargeToFull: true
34
energyRegenWhenRechargingfloatRegen rate while recharging.
35
1.13armour:intDamage taken away from each hit. (not currently used in any vanilla units)armour: 6
36
1.13armourMinDamageToKeep:intMin damage to keep from received damage. Defaults to 1.armourMinDamageToKeep: 2
37
1.13.3borrowResourcesWhileAlive:priceTakes these resources when created and returns them when removed or destroyed.borrowResourcesWhileAlive: gold=10
38
1.15borrowResourcesWhileBuilt:priceLike borrowResourcesWhileAlive but doesn't take affect till built. Mostly useful for buildings like houses that have negative resources to add to the unit cap, etc.borrowResourcesWhileBuilt: supplyCap = -10
39
1.13.3generation_resources:priceIncome unit creates. (custom resource version)generation_resources: credits=5, gold=20
40
1.13.3generation_active:logicBooleanDisables generation_resources/credits when false. (logic_boolean)generation_active: if not self.hp(lessThan=100)
41
generation_credits:intIncome unit creates. (credits only)generation_credits: 2
42
generation_delay:int
How often generation_resources/credits is added. Defaults to 40. (changing not recommended)
generation_delay: 40
43
#====#====UI and Graphics Keys
44
showInEditor:boolSet to false to hide unit in Sandbox editor. (Defaults to true)showInEditor: false
45
displayText:LocaleStringThe unit name that the game shows to the player.displayText: Custom Tank
46
1.13displayText_{LANG}:stringLANG = ISO 639-1 Code to show this text instead when game is in this language.displayText_es: Tanque Personalizado
47
displayDescription:LocaleStringUnit description that the game shows to the player.displayDescription: -Fast movement\n-Light damage
48
1.13displayDescription_{LANG}:stringLANG = ISO 639-1 Code to show this text instead when game is in this language.displayDescription_es: -Movimiento rápido\n-Daño ligero
49
displayLocaleKey:stringTranslation file key for unit name and description.displayLocaleKey: units.mechArtillery
50
displayRadius:intDefaults to radius value. Set to show a larger or smaller selection circle UI on units.displayRadius: 20
51
uiTargetRadiusintDefaults to displayRadius value. Radius used when attacking/reclaiming/etc this unit
52
shieldRenderRadius:intDefaults is a little bigger than radius. Set to show a larger or smaller shield circle on units.shieldRenderRadius: 12
53
shieldDisplayOnlyDeflection:boolHide shield unless deflecting shot if true.shieldDisplayOnlyDeflection: true
54
shieldDeflectionDisplayRate:floatDefaults to 4. High value causes shield deflection to fade disappear faster.shieldDeflectionDisplayRate: 3
55
1.13.3showOnMinimap:boolDefaults to true. Hide units on minimap if false.showOnMinimap: false
56
1.13.3showActionsWithMixedSelectionIfOtherUnitsHaveTag:bool
Shows a merged action list if all units selected includes one of these tags. Useful for converted units.
showActionsWithMixedSelectionIfOtherUnitsHaveTag: true
57
1.14showOnMinimapToEnemiesboolUseful for stealth units
58
#====#====Building Only Keys
59
isBuilding:boolDefines if the unit is a building.isBuilding: true
60
footprint:intsLeft, up, right, down. Tiles taken up which block unit movement. Defaults to 0,0,0,0 = 1 center tile.footprint: 0,0,1,1
61
constructionFootprint:intsTiles taken up for placement of other buildings. Defaults to 0,0,0,0 = 1 center tile.constructionFootprint: -1,-1,1,3
62
displayFootprint:intsLeft, up, right, down. Only applies to buildings, just used for GUI. Defaults to footprint.displayFootprint: 0,0,1,1
63
buildingSelectionOffset:intDefaults to 0. Adds or removes padding on the drawn selection rect in UI.buildingSelectionOffset: 4
64
buildingToFootprintOffsetX:floatDefaults to 10. Change the building position in the footprint on the X-axis.buildingToFootprintOffsetX: 4
65
buildingToFootprintOffsetY:floatDefaults to 10. Change the building position in the footprint on the Y-axis.buildingToFootprintOffsetY: 6
66
placeOnlyOnResPool:boolNormally used for extractors, forces building construction in a resource pool. placeOnlyOnResPool: true
67
selfBuildRate:floatRate unit builds itself when placed without a builder.selfBuildRate: 0.0008
68
1.14ignoreInUnitCapCalculationdefaults to true for buildings otherwise false. Set to true to not count this unit in unit cap.
69
#====#====Misc Keys
70
copyFrom:file(s) (ini)Uses unit data from another ini file as default for this unit, supports multiple files.copyFrom: ROOT:defaultTanks.template, tankT1.ini
71
dont_load:boolDo not load unit, and don't error on missing data. Can be useful when used with copyFrom.dont_load: true
72
overrideAndReplace:string(s)Overrides another unit with this unit. Build links and map positions to target unit will be replaced.overrideAndReplace: builder, combatEngineer
73
1.13.3onNewMapSpawn:string
Values: emptyResourcePools_asNeutral, emptyOrOccupiedResourcePools_asNeutral, mapCenter_asNeutral, mapCenter_eachActiveTeam, spawnPoint_eachActiveTeam
74
globalScale:floatDefaults to 1. Changing not recommended.globalScale: 2
75
isLocked:bool
Disallow building of this unit. Can be used with overrideAndReplace to restrict units player can build.
isLocked: true
76
1.13isLockedIfGameModeNoNuke:boolDisallows building of this unit if nukes are disabled during match setup.isLockedIfGameModeNoNuke: true
77
experimental:boolTag unit as experimental. Affects zoomed out icon and end game stats.experimental: true
78
stayNeutral:boolSet to false to disable capture when unit is on the neutral team.stayNeutral: false
79
1.13createNeutral:boolSet to true to always spawn the unit on the neutral team.createNeutral: true
80
createOnAggressiveTeam:boolSet to true to always spawn the unit on aggressive teams on single player matches.createOnAggressiveTeam: true
81
1.13tags:string(s)List of comma separated strings. Used to classify units, create special actions and balances.tags: tank, smallTank, piercingDamage
82
1.15defineUnitMemorycreates variables for custom storage unique to each unit. Allowed types: boolean, float/number, unit, stringdefineUnitMemory: boolean nukeActive, boolean laserReady, float experience, unit nextTarget, unit homeBase, string customText
83
fogOfWarSightRange:intSets number of tiles this unit can see through the fog of war. Defaults to 15.fogOfWarSightRange: 18
84
1.14fogOfWarSightRangeWhileNotBuiltintFog of War range when unit/building is incomplete. Defaults to fogOfWarSightRange
85
softCollisionOnAll:intCreates a soft collision effect when touching other units.softCollisionOnAll: 3
86
disableAllUnitCollisions:boolUnit cannot collide with others if true.disableAllUnitCollisions: true
87
1.13isUnrepairableUnit:boolNo unit can repair this unit if true.isUnrepairableUnit: true
88
isUnselectable:boolIf true unit cannot be selected. (includes AI players)isUnselectable: true
89
1.14isUnselectableAsTargetbool
Defaults to isUnselectable. Can be used to create units that cannot be selected but can be targeted for attack, reclaim, etc
90
1.13isPickableStartingUnit:boolIf true, unit is added to dropdowns for starting unit in game setup menus.isPickableStartingUnit: true
91
1.13startFallingWhenStartingUnit:boolUnit will appear falling from skies when starting unit if true.startFallingWhenStartingUnit: true
92
soundOnAttackOrder:sound(s)List of sound names. Only one will be played on each attack order. Only .ogg and .wav formats.soundOnAttackOrder: tankAttackOrder1.ogg, tankAttackOrder2.ogg
93
soundOnMoveOrder:sound(s)List of sound names. Only one will be played on each move order. Only .ogg and .wav formats.soundOnMoveOrder: tankMoveOrder1.ogg, tankMoveOrder2.ogg
94
1.13.3soundOnNewSelection:sound(s)List of sound names. Only one will be played on each unit selection. Only .ogg and .wav formats.soundOnNewSelection: tankSelection1.ogg, tankSelection2.ogg
95
canNotBeDirectlyAttacked:boolNo unit can directly target this unit. If true this will also skip this unit in victory/defeat checks.canNotBeDirectlyAttacked: true
96
canNotBeDamagedbool
Defaults to value of canNotBeDirectlyAttacked (be careful setting this without canNotBeDirectlyAttacked, as AI will attack forever)
97
1.13.3canNotBeGivenOrdersByPlayer:boolIf true unit will not take player or AI orders.canNotBeGivenOrdersByPlayer: true
98
1.13.3canOnlyBeAttackedByUnitsWithTags:strings(s)List of tag strings, only units with these tags can directly target this unit.canOnlyBeAttackedByUnitsWithTags: piercingTank, powerfulTank
99
1.14disableDeathOnZeroHpbool
Setting to true allows unit to continue living even at 0 HP, useful for custom "death" action. Warning: If not used with an autoTrigger, etc units will attack this unit forever.
100
#====#====Transport Keys