Skip to content

Definition Fields

Ashley Bennett edited this page Apr 11, 2024 · 29 revisions

Type

(Attribute) What type(s) of tool this is - if multiple, the user will be able to switch between modes.
Valid values: Drill - Grind - GrindDrill - Weld - WeldDrill - WeldGrind - Multi


EffectShape

Shape of the volume affected by the tool.
Valid values: Sphere - Cylinder - Cuboid - Line - Ray
Note: Line will hit everything along its path, Ray will only hit the first item in its path.


WorkOrder

Order in which blocks/voxels are worked on in the tool volume.
Valid values:
Uniform - All objects are worked on simultaneously
InsideOut - Objects nearest to the centre of the volume are worked on first
OutsideIn - Objects farthest from the centre of the volume are worked on first
Forward - Objects are worked on starting from the back of the volume and moving forward relative to the tool
Backward - Objects are worked on starting from the front of the volume and moving backward relative to the tool


WorkOrigin

The location the tool volume should be centred at.
Valid values:
Centre - The volume will be centred on the centre of the block
Emitter - The volume will be centred on the specified model dummy
Hit - The volume will be centred on the first object hit directly in front of the tool


Emitter

(Optional) The name of the dummy to centre the tool volume on, if applicable.
(If this is a subpart, include the "subpart_" in the name.)


Offset

(Optional) The vector by which to offset the centre of the volume from the location specified in WorkOrigin.


HalfExtent

Required only for Cuboid shape: the dimensions of the volume.


Radius

Required for Sphere and Cylinder shape, and for drills using Line and Ray shape: the radius of the volume.


Length

Required for Cylinder, Line, and Ray shapes, or when using the Hit setting for WorkOrigin:
The length of the volume, or max distance from the emitter.


Speed

(Optional) The working speed of the tool - a value of 1 equates to normal weld/grind speed, or one meter of voxel per pass.
Default value: 1


HarvestRatio

(Optional, for drills) Effectiveness of ore harvesting from voxels - 1 is 100%, 0 = 0% or no ore harvested.
Default value: 1


WorkRate

(Optional) Maximum number of blocks the tool can work on at once.
Default value: int.MaxValue


UpdateInterval

(Optional) Number of ticks between tool updates (60 ticks = 1 second). This is approximately 90 for vanilla drills and 20 for other vanilla tools.
Default value: 20


IdlePower

(Optional) Power draw in MW while the tool is enabled but not activated.
Default value: 0


ActivePower

(Optional) Power draw in MW while the tool is activated.
Default value: 1


DamageCharacters

(Optional) Whether the tool should damage characters in its effect volume.
Default value: true


PickUpFloatings

(Optional) Whether the tool should pick up floating objects in the work area or destroy them.
Default value: false


AffectOwnGrid

(Optional) Whether the tool should be able to affect its own grid.
Default value: false


CacheBlocks

(Optional) Whether previously worked on blocks should be cached and worked on until complete, regardless of whether they remain in the work area.
Default value: false


Debug

(Optional) Whether debug display should be enabled for tools of this type - only recommended for development use.
Default value: false


Action

(Optional) Set of modifiers specific to a certain mouse function or UI selection. Up to two of these can be specified.
Attributes:
Type - which function to apply the modifiers to: Primary = left click, Secondary = right click
SizeRatio - how much to multiply the size of the effect volume when this function is active: 1 = no change
SpeedRatio - how much to multiply the speed of the tool by when this function is active: 1 = no change
HarvestRatio - how much to multiply the harvest ratio of the tool by when this function is active: 1 = no change
Note: if no Actions are specified, a Primary action will be created with all modifiers equal to 1.


Event

(Optional) Structure specifying animations and other effects tied to specific events. A maximum of one of these can be specified per event.
See page on Event fields


MaterialSpecificModifiers

(Optional) Array of Material allowing the specification of different speed and HarvestRatio values against different categories of material.

Material attributes

Subtype - (Optional) SubtypeId of the material these values should apply to.
Category - (Optional) Which category of materials these values should apply to.
Valid values: Sand - Snow - Soil - Grass - Ice - Rock - Ore
SpeedRatio - (Optional) Speed of the tool when work on this particular material (is multiplied by the base speed of the tool).
HarvestRatio - (Optional, drills only) Harvest ratio of the tool when harvesting this particular material (is multiplied by the base harvest ratio of the tool).
Note: These modifiers currently only apply to drills, but may be expanded to other types of tools later.