-
Notifications
You must be signed in to change notification settings - Fork 14
KeyValues
Martin Noya edited this page Jan 25, 2016
·
5 revisions
All KVs should go between quotation marks.
Key | Value | Description |
---|---|---|
Building |
1 | Marks this as a building ability |
AbilityCastRange |
Number | Max range at which the building will be placed |
AbilityGoldCost |
Number | Gold cost for building placement |
BuildTime |
Number | Time it takes to complete this building |
PlayerCanControl |
1 or 0 | Whether the building is controllable by the placer |
Scale |
1 or 0 | Whether the building should scale progressively or start at full size. |
UnitName |
String | The unit to build. With the special keyworld "self" , the builder will place itself as the new building. |
Key | Value | Description |
---|---|---|
OverrideBuildingGhost |
String | npc_dota_hero to override, necessary when UnitName is hero-based with AttachWearables |
AbilityCooldown |
Number | Seconds between building placement |
MaxScale |
Number | Final model size. By omission, the unit's ModelScale will be used instead |
Adding any of this keyvalues to the ability will change the way that the building is constructed. The default behavior for building placement is "Place and Forget", the building will construct by itself over its BuildTime.
-
BuilderInside
: Hides the builder the building during construction -
ConsumesBuilder
: Kills the builder after the construction is done -
RequiresRepair
: Place the building and doesn't update its health nor send theOnConstructionCompleted
callback until its fully healed.
It queues the usage of aRepairAbility
, more on this on the Unit area.
As a third component to any ability/item for building placement, it should have a "RunScript"
call to a lua file such as builder.lua with all the exposed callbacks and can hold any sort of custom actions your gamemode requires.
Custom unit definition for each "UnitName"
is used to stablish the rest of the building properties.
Key | Value | Description |
---|---|---|
ConstructionSize |
Number | Blocks construction of other buildings in this area. Requires a valid square of this same size. |
BlockPathingSize |
Number | Blocks pathing with obstruction entities, for mazing. It can be 0 |
Key | Value | Description |
---|---|---|
DisableTurning |
1 or 0 | Whether the building should hide its turning-rotation or not |
DestructionEffect |
.vpcf String | The particle effect to play when the building is destroyed |
FireEffect |
.vpcf String | The particle effect to play when the building is below the FIRE_EFFECT_FACTOR (0.5 default) |
ModelRotation |
Angle Number | Rotates the building by a certain amount for particle ghost and placement. |
ModelOffset |
Number | Positions the building at a height offset from the ground. |
PedestalModel |
.vmdl String | Puts a model prop at the buildings feet. |
PedestalModelScale |
Number | Defines the model scale of the pedestal |
Key | Value | Description |
---|---|---|
Requires |
Spaced String | Adds an specific restriction when placing this building. Default by omission is Buildable , but this can be skipped if necessary.Example: "GoldMine" or "Buildable Blight"
|
Prevents |
Spaced String | Disallows building on grid defined by any of the passed types. |
RestrictGoldMineDistance |
Number | Used to prevent a building from being placed too close to another. Hardcoded to only check gold_mine for now. |
Grid |
Table | Block that tells the Grid types generated by this entity. Radius /Square determines the size, RemoveOnDeath is used to clear or keep the grid when the building is destroyed.Examples below |
"Grid"
{
"GoldMine"
{
"Square" "8"
"RemoveOnDeath" "true"
}
}
"Grid"
{
"Blight"
{
"Radius" "768"
"RemoveOnDeath" "false"
}
}
Key | Value | Description |
---|---|---|
RepairAbility |
String | The name of the ability to use when placing buildings with RequiresRepair. It needs to be already added and learned on the builder unit. |