A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Version | Section | [core] | |||||||||||||||||||||||
2 | Added | Code | Value Type | Description | Example | |||||||||||||||||||||
3 | #==== | #==== | Necessary Code: will cause error if these are not included | |||||||||||||||||||||||
4 | name: | string | Defines the unit raw name, game uses it to identify as a unique name. (This is not displayed in-game) | name: customTank1 | ||||||||||||||||||||||
5 | 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 | ||||||||||||||||||||||
6 | radius: | int | Circular area around the unit that makes it selectable. (mouse click/screen touch) | radius: 20 | ||||||||||||||||||||||
7 | price: | int / price | The unit cost from builders/buildings. Defaults to credits if no resource type is used | price: 500, gold=5, stone=10 | ||||||||||||||||||||||
8 | class: | string | Reserved for future use, must be CustomUnitMetadata by default. | class: CustomUnitMetadata | ||||||||||||||||||||||
9 | maxHp: | int | The max health for the unit. (will spawn with this value). | maxHp: 200 | ||||||||||||||||||||||
10 | 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 | ||||||||||||||||||||||
11 | buildSpeed: | float / s | Time 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.3 | strictLevel: | float | Defaults to 0. 1 = Errors if keys are duplicated. Add to "all-units.template" in root to apply to all units. | strictLevel: 1 | |||||||||||||||||||||
15 | isBio: | bool | Choose whether the unit is bioligical or not, affects sound and splat (unless hideScorchMark:true) | isBio: true | ||||||||||||||||||||||
16 | isBug: | bool | Changes some death defaults, and sort order in Sandbox. | isBug: false | ||||||||||||||||||||||
17 | 1.13 | isBuilder: | bool | Normally required if this unit places buildings. Defaults to [ai]useAsBuilder. | isBuilder: true | |||||||||||||||||||||
18 | 1.15 | streamingCost: | price | Like price but paid for overtime while this unit is being queued or built. Construction or queue is paused if resources run out while building. | streamingCost: gem=420 | |||||||||||||||||||||
19 | 1.15 | switchPriceWithStreamingCost: | bool | Shortcut to set streamingCost to price value and clear price, add to all-units.template to quickly switch a mod over to streaming resources. | switchPriceWithStreamingCost: true | |||||||||||||||||||||
20 | #==== | #==== | Unit Stats Keys | |||||||||||||||||||||||
21 | selfRegenRate: | float | Passive self repair rate. | selfRegenRate: 0.01 | ||||||||||||||||||||||
22 | maxShield: | int | The max shield hitpoints of the unit. Can start with 0 hitpoints if startShieldAtZero:true. | maxShield: 500 | ||||||||||||||||||||||
23 | startShieldAtZero: | bool | Unit starts with a 0 hitpoints shield on created if true. | startShieldAtZero: true | ||||||||||||||||||||||
24 | shieldRegen: | float | Passive shield regen rate. | shieldRegen: 0.15 | ||||||||||||||||||||||
25 | energyMax: | float | Defaults to 0. Energy that can be used as ammo for turrets, laser defense and actions. | energyMax: 1 | ||||||||||||||||||||||
26 | energyRegen: | float | Passive energy regen rate. | energyRegen: 0.001 | ||||||||||||||||||||||
27 | energyStartingPercentage: | float | Sets the percentage of charged energy when the unit is first built. | energyStartingPercentage: 0.5 | ||||||||||||||||||||||
28 | energyNeedsToRechargeToFull: | float | Disables weapons using energy after reaching zero till fully recharged if true. | energyNeedsToRechargeToFull: true | ||||||||||||||||||||||
29 | energyRegenWhenRecharging: | float | Regen rate while recharging. | |||||||||||||||||||||||
30 | 1.13 | armour: | int | Damage taken away from each hit. (not currently used in any vanilla units) | armour: 6 | |||||||||||||||||||||
31 | 1.13 | armourMinDamageToKeep: | int | Min damage to keep from received damage. Defaults to 1. | armourMinDamageToKeep: 2 | |||||||||||||||||||||
32 | 1.13.3 | borrowResourcesWhileAlive: | price | Takes these resources when created and returns them when removed or destroyed. | borrowResourcesWhileAlive: gold=10 | |||||||||||||||||||||
33 | 1.15 | borrowResourcesWhileBuilt: | price | Like 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.3 | generation_resources: | price | Income unit creates. (custom resource version) | generation_resources: credits=5, gold=20 | |||||||||||||||||||||
35 | 1.13.3 | generation_active: | logicBoolean | Disables generation_resources/credits when false. (logic_boolean) | generation_active: if not self.hp(lessThan=100) | |||||||||||||||||||||
36 | generation_credits: | int | Income unit creates. (credits only) | generation_credits: 2 | ||||||||||||||||||||||
37 | generation_delay: | int | How often generation_resources/credits is added. Defaults to 40. (changing not recommended) | generation_delay: 40 | ||||||||||||||||||||||
38 | #==== | #==== | UI and Graphics Keys | |||||||||||||||||||||||
39 | showInEditor: | bool | Set to false to hide unit in Sandbox editor. (Defaults to true) | showInEditor: false | ||||||||||||||||||||||
40 | displayText: | LocaleString | The unit name that the game shows to the player. | displayText: Custom Tank | ||||||||||||||||||||||
41 | 1.13 | displayText_{LANG}: | string | LANG = ISO 639-1 Code to show this text instead when game is in this language. | displayText_es: Tanque Personalizado | |||||||||||||||||||||
42 | displayDescription: | LocaleString | Unit description that the game shows to the player. | displayDescription: -Fast movement\n-Light damage | ||||||||||||||||||||||
43 | 1.13 | displayDescription_{LANG}: | string | LANG = ISO 639-1 Code to show this text instead when game is in this language. | displayDescription_es: -Movimiento rápido\n-Daño ligero | |||||||||||||||||||||
44 | displayLocaleKey: | string | Translation file key for unit name and description. | displayLocaleKey: units.mechArtillery | ||||||||||||||||||||||
45 | displayRadius: | int | Defaults to radius value. Set to show a larger or smaller selection circle UI on units. | displayRadius: 20 | ||||||||||||||||||||||
46 | uiTargetRadius | int | Defaults to displayRadius value. Radius used when attacking/reclaiming/etc this unit | uiTargetRadius: 10 | ||||||||||||||||||||||
47 | shieldRenderRadius: | int | Defaults is a little bigger than radius. Set to show a larger or smaller shield circle on units. | shieldRenderRadius: 12 | ||||||||||||||||||||||
48 | shieldDisplayOnlyDeflection: | bool | Hide shield unless deflecting shot if true. | shieldDisplayOnlyDeflection: true | ||||||||||||||||||||||
49 | shieldDeflectionDisplayRate: | float | Defaults to 4. High value causes shield deflection to fade disappear faster. | shieldDeflectionDisplayRate: 3 | ||||||||||||||||||||||
50 | 1.13.3 | showOnMinimap: | bool | Defaults to true. Hide units on minimap if false. | showOnMinimap: false | |||||||||||||||||||||
51 | 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 | |||||||||||||||||||||
52 | 1.14 | showOnMinimapToEnemies | bool | Useful for stealth units | showOnMinimapToEnemies: false | |||||||||||||||||||||
53 | #==== | #==== | Building Only Keys | |||||||||||||||||||||||
54 | isBuilding: | bool | Defines if the unit is a building. | isBuilding: true | ||||||||||||||||||||||
55 | footprint: | ints | Left, up, right, down. Tiles taken up which block unit movement. Defaults to 0,0,0,0 = 1 center tile. | footprint: 0,0,1,1 | ||||||||||||||||||||||
56 | constructionFootprint: | ints | Tiles taken up for placement of other buildings. Defaults to 0,0,0,0 = 1 center tile. | constructionFootprint: -1,-1,1,3 | ||||||||||||||||||||||
57 | displayFootprint: | ints | Left, up, right, down. Only applies to buildings, just used for GUI. Defaults to footprint. | displayFootprint: 0,0,1,1 | ||||||||||||||||||||||
58 | buildingSelectionOffset: | int | Defaults to 0. Adds or removes padding on the drawn selection rect in UI. | buildingSelectionOffset: 4 | ||||||||||||||||||||||
59 | buildingToFootprintOffsetX: | float | Defaults to 10. Change the building position in the footprint on the X-axis. | buildingToFootprintOffsetX: 4 | ||||||||||||||||||||||
60 | buildingToFootprintOffsetY: | float | Defaults to 10. Change the building position in the footprint on the Y-axis. | buildingToFootprintOffsetY: 6 | ||||||||||||||||||||||
61 | placeOnlyOnResPool: | bool | Normally used for extractors, forces building construction in a resource pool. | placeOnlyOnResPool: true | ||||||||||||||||||||||
62 | selfBuildRate: | float | Rate unit builds itself when placed without a builder. | selfBuildRate: 0.0008 | ||||||||||||||||||||||
63 | 1.14 | ignoreInUnitCapCalculation | defaults 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: | bool | Do 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.3 | onNewMapSpawn: | string | Values: emptyResourcePools_asNeutral, emptyOrOccupiedResourcePools_asNeutral, mapCenter_asNeutral, mapCenter_eachActiveTeam, spawnPoint_eachActiveTeam | onNewMapSpawn: spawnPoint_eachActiveTeam | |||||||||||||||||||||
69 | globalScale: | float | Defaults to 1. Changing not recommended. | globalScale: 2 | ||||||||||||||||||||||
70 | isLocked: | bool | Disallow building of this unit. Can be used with overrideAndReplace to restrict units player can build. | isLocked: true | ||||||||||||||||||||||
71 | 1.13 | isLockedIfGameModeNoNuke: | bool | Disallows building of this unit if nukes are disabled during match setup. | isLockedIfGameModeNoNuke: true | |||||||||||||||||||||
72 | experimental: | bool | Tag unit as experimental. Affects zoomed out icon and end game stats. | experimental: true | ||||||||||||||||||||||
73 | stayNeutral: | bool | Set to false to disable capture when unit is on the neutral team. | stayNeutral: false | ||||||||||||||||||||||
74 | 1.13 | createNeutral: | bool | Set to true to always spawn the unit on the neutral team. | createNeutral: true | |||||||||||||||||||||
75 | createOnAggressiveTeam: | bool | Set to true to always spawn the unit on aggressive teams on single player matches. | createOnAggressiveTeam: true | ||||||||||||||||||||||
76 | 1.13 | tags: | string(s) | List of comma separated strings. Used to classify units, create special actions and balances. | tags: tank, smallTank, piercingDamage | |||||||||||||||||||||
77 | 1.15 | defineUnitMemory | Can 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.15p11 | Add a pair of square brackets to turn them into arrays for those specific data types | defineUnitMemory: unit[] squad, float[] mango | |||||||||||||||||||||||
79 | fogOfWarSightRange: | int | Sets number of tiles this unit can see through the fog of war. Defaults to 15. | fogOfWarSightRange: 35 | ||||||||||||||||||||||
80 | 1.14 | fogOfWarSightRangeWhileNotBuilt | int | Fog of War range when unit/building is incomplete. Defaults to fogOfWarSightRange | fogOfWarSightRangeWhileNotBuilt: 10 | |||||||||||||||||||||
81 | softCollisionOnAll: | int | Creates a soft collision effect when touching other units. | softCollisionOnAll: 3 | ||||||||||||||||||||||
82 | disableAllUnitCollisions: | bool | Unit cannot collide with others if true. | disableAllUnitCollisions: true | ||||||||||||||||||||||
83 | 1.13 | isUnrepairableUnit: | bool | No unit can repair this unit if true. | isUnrepairableUnit: true | |||||||||||||||||||||
84 | isUnselectable: | bool | If true unit cannot be selected. (includes AI players) | isUnselectable: true | ||||||||||||||||||||||
85 | 1.14 | isUnselectableAsTarget | bool | Defaults to isUnselectable. Can be used to create units that cannot be selected but can be targeted for attack, reclaim, etc | isUnselectableAsTarget: false | |||||||||||||||||||||
86 | 1.13 | isPickableStartingUnit: | bool | If true, unit is added to dropdowns for starting unit in game setup menus. | isPickableStartingUnit: true | |||||||||||||||||||||
87 | 1.13 | startFallingWhenStartingUnit: | bool | Unit 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.3 | soundOnNewSelection: | sound(s) | List of sound names. Only one will be played on each unit selection. Only .ogg and .wav formats. | soundOnNewSelection: tankSelection1.ogg, tankSelection2.ogg | |||||||||||||||||||||
91 | canNotBeDirectlyAttacked: | bool | No unit can directly target this unit. If true this will also skip this unit in victory/defeat checks. | canNotBeDirectlyAttacked: true | ||||||||||||||||||||||
92 | canNotBeDamaged | bool | Defaults to value of canNotBeDirectlyAttacked (be careful setting this without canNotBeDirectlyAttacked, as AI will attack forever) | canNotBeDamaged: true | ||||||||||||||||||||||
93 | 1.13.3 | canNotBeGivenOrdersByPlayer: | bool | If true unit will not take player or AI orders. | canNotBeGivenOrdersByPlayer: true | |||||||||||||||||||||
94 | 1.13.3 | canOnlyBeAttackedByUnitsWithTags: | strings(s) | List of tag strings, only units with these tags can directly target this unit. | canOnlyBeAttackedByUnitsWithTags: piercingTank, powerfulTank | |||||||||||||||||||||
95 | 1.14 | disableDeathOnZeroHp | bool | Setting to true allows unit to continue living even at 0 HP, useful for custom "death" action. Warning: If not used with an autoTrigger, etc units will attack this unit forever. | disableDeathOnZeroHp: true | |||||||||||||||||||||
96 | 1.15p9 | allowCaptureWhenNeutralByAI | bool | When true, it lets to be captured on contact by AI as well. Defaults as false | allowCaptureWhenNeutralByAI: true | |||||||||||||||||||||
97 | #==== | #==== | Transport Keys | |||||||||||||||||||||||
98 | 1.13 | transportSlotsNeeded: | int | Defaults to 1. Number of slots this unit uses up in a transport, experimentals are often set to 5. | transportSlotsNeeded: 2 | |||||||||||||||||||||
99 | maxTransportingUnits | int | Number of slots this units has for transporting other units. | maxTransportingUnits: 5 | ||||||||||||||||||||||
100 | 1.13 | transportUnitsRequireTag: | string(s) | Only allows trasport of units that have one of these tags. | transportUnitsRequireTag: smallTank, soldier |