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