ABCDEFGHIJKLMNOPQRSTUVWXYZAA
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
#====#====Unit Stats Keys
23
maxHp:intThe max health for the unit. (will spawn with this value)maxHp: 200
24
selfRegenRate:floatPassive self repair rate.selfRegenRate: 0.01
25
maxShield:intThe max shield hitpoints of the unit. Can start with 0 hitpoints if startShieldAtZero:true.maxShield: 500
26
startShieldAtZero:boolUnit starts with a 0 hitpoints shield on created if true.startShieldAtZero: true
27
shieldRegen:floatPassive shield regen rate.shieldRegen: 0.15
28
energyMax:floatDefaults to 0. Energy that can be used as ammo for turrets, laser defense and actions.energyMax: 1
29
energyRegen:floatPassive energy regen rate.energyRegen: 0.001
30
energyStartingPercentage:floatSets the percentage of charged energy when the unit is first built.energyStartingPercentage: 0.5
31
energyNeedsToRechargeToFull:floatDisables weapons using energy after reaching zero till fully recharged if true.energyNeedsToRechargeToFull: true
32
energyRegenWhenRechargingfloatRegen rate while recharging.
33
1.13armour:intDamage taken away from each hit. (not currently used in any vanilla units)armour: 6
34
1.13armourMinDamageToKeep:intMin damage to keep from received damage. Defaults to 1.armourMinDamageToKeep: 2
35
1.13.3borrowResourcesWhileAlive:priceTakes these resources when created and returns them when removed or destroyed.borrowResourcesWhileAlive: gold=10
36
1.13.3generation_resources:priceIncome unit creates. (custom resource version)generation_resources: credits=5, gold=20
37
1.13.3generation_active:logicBooleanDisables generation_resources/credits when false. (logic_boolean)generation_active: if not self.hp(lessThan=100)
38
generation_credits:intIncome unit creates. (credits only)generation_credits: 2
39
generation_delay:int
How often generation_resources/credits is added. Defaults to 40. (changing not recommended)
generation_delay: 40
40
#====#====UI and Graphics Keys
41
showInEditor:boolSet to false to hide unit in Sandbox editor. (Defaults to true)showInEditor: false
42
displayText:LocaleStringThe unit name that the game shows to the player.displayText: Custom Tank
43
1.13displayText_{LANG}:stringLANG = ISO 639-1 Code to show this text instead when game is in this language.displayText_es: Tanque Personalizado
44
displayDescription:LocaleStringUnit description that the game shows to the player.displayDescription: -Fast movement\n-Light damage
45
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
46
displayLocaleKey:stringTranslation file key for unit name and description.displayLocaleKey: units.mechArtillery
47
displayRadius:intDefaults to radius value. Set to show a larger or smaller selection circle UI on units.displayRadius: 20
48
uiTargetRadiusintDefaults to displayRadius value. Radius used when attacking/reclaiming/etc this unit
49
shieldRenderRadius:intDefaults is a little bigger than radius. Set to show a larger or smaller shield circle on units.shieldRenderRadius: 12
50
shieldDisplayOnlyDeflection:boolHide shield unless deflecting shot if true.shieldDisplayOnlyDeflection: true
51
shieldDeflectionDisplayRate:floatDefaults to 4. High value causes shield deflection to fade disappear faster.shieldDeflectionDisplayRate: 3
52
1.13.3showOnMinimap:boolDefaults to true. Hide units on minimap if false.showOnMinimap: false
53
1.13.3
showActionsWithMixedSelectionIfOtherUnitsHaveTag:
bool
Shows a merged action list if all units selected includes one of these tags. Useful for converted units.
showActionsWithMixedSelectionIfOtherUnitsHaveTag: true
54
1.14showOnMinimapToEnemiesboolUseful for stealth units
55
#====#====Building Only Keys
56
isBuilding:boolDefines if the unit is a building.isBuilding: true
57
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
58
constructionFootprint:intsTiles taken up for placement of other buildings. Defaults to 0,0,0,0 = 1 center tile.constructionFootprint: -1,-1,1,3
59
displayFootprint:intsLeft, up, right, down. Only applies to buildings, just used for GUI. Defaults to footprint.displayFootprint: 0,0,1,1
60
buildingSelectionOffset:intDefaults to 0. Adds or removes padding on the drawn selection rect in UI.buildingSelectionOffset: 4
61
buildingToFootprintOffsetX:floatDefaults to 10. Change the building position in the footprint on the X-axis.buildingToFootprintOffsetX: 4
62
buildingToFootprintOffsetY:floatDefaults to 10. Change the building position in the footprint on the Y-axis.buildingToFootprintOffsetY: 6
63
placeOnlyOnResPool:boolNormally used for extractors, forces building construction in a resource pool. placeOnlyOnResPool: true
64
selfBuildRate:floatRate unit builds itself when placed without a builder.selfBuildRate: 0.0008
65
1.14ignoreInUnitCapCalculationdefaults to true for buildings otherwise false. Set to true to not count this unit in unit cap.
66
#====#====Misc Keys
67
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
68
dont_load:boolDo not load unit, and don't error on missing data. Can be useful when used with copyFrom.dont_load: true
69
overrideAndReplace:string(s)Overrides another unit with this unit. Build links and map positions to target unit will be replaced.overrideAndReplace: builder, combatEngineer
70
1.13.3onNewMapSpawn:string
Values: emptyResourcePools_asNeutral, emptyOrOccupiedResourcePools_asNeutral, mapCenter_asNeutral, mapCenter_eachActiveTeam, spawnPoint_eachActiveTeam
71
globalScale:floatDefaults to 1. Changing not recommended.globalScale: 2
72
isLocked:bool
Disallow building of this unit. Can be used with overrideAndReplace to restrict units player can build.
isLocked: true
73
1.13isLockedIfGameModeNoNuke:boolDisallows building of this unit if nukes are disabled during match setup.isLockedIfGameModeNoNuke: true
74
experimental:boolTag unit as experimental. Affects zoomed out icon and end game stats.experimental: true
75
stayNeutral:boolSet to false to disable capture when unit is on the neutral team.stayNeutral: false
76
1.13createNeutral:boolSet to true to always spawn the unit on the neutral team.createNeutral: true
77
createOnAggressiveTeam:boolSet to true to always spawn the unit on aggressive teams on single player matches.createOnAggressiveTeam: true
78
1.13tags:string(s)List of comma separated strings. Used to classify units, create special actions and balances.tags: tank, smallTank, piercingDamage
79
fogOfWarSightRange:intSets number of tiles this unit can see through the fog of war. Defaults to 15.fogOfWarSightRange: 18
80
1.14fogOfWarSightRangeWhileNotBuiltintFog of War range when unit/building is incomplete. Defaults to fogOfWarSightRange
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.14isUnselectableAsTargetbool
Defaults to isUnselectable. Can be used to create units that cannot be selected but can be targeted for attack, reclaim, etc
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
canNotBeDamagedbool
Defaults to value of canNotBeDirectlyAttacked (be careful setting this without canNotBeDirectlyAttacked, as AI will attack forever)
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.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.
96
#====#====Transport Keys
97
1.13transportSlotsNeeded:intDefaults to 1. Number of slots this unit uses up in a transport, experimentals are often set to 5.transportSlotsNeeded: 2
98
maxTransportingUnitsintNumber of slots this units has for transporting other units.maxTransportingUnits: 5
99
1.13transportUnitsRequireTag:string(s)Only allows trasport of units that have one of these tags.transportUnitsRequireTag: smallTank, soldier
100
1.13transportUnitsRequireMovementType:
movementTypes
Only allows trasport of units that have one of these movement types.transportUnitsRequireMovementType: AIR, WATER