DroneBehavior Definition
Requires an xsi:type attribute:
<DroneBehavior xsi:type="MyObjectBuilder_DroneBehaviorDefinition">
Found in DroneBehaviors.sbc and used by Remote Control blocks, more details there.
The vanilla game mostly stopped using these, in favor of the AI blocks.
Maneuvering
AvoidCollisions<AvoidCollisions> | Type: Boolean | Default: true |
| Whether the drone is careful about bumping into nearby things while flying, except when ramming. | ||
SpeedLimit<SpeedLimit> | Type: Single | Default: 50 |
| The drone's maximum flight speed in m/s. Ignored when ramming. | ||
RotateToPlayer<RotateToPlayer> | Type: Boolean | Default: true |
| If true, the ship will use its gyros to rotate the ship towards the target. | ||
PlayerYAxisOffset<PlayerYAxisOffset> | Type: Single | Default: 0.9 |
| When the target is a character, offset the target vector upwards (relative to the character) by this many meters, because their pivot is at their feet. It gets doubled when the ramming behavior is engaged, unclear why. | ||
MaxManeuverDistance<MaxManeuverDistance> | Type: Single | Default: 250 |
| Distance in meters past which the target is considered too far to do a strafe maneuver. | ||
TargetDistance<TargetDistance> | Type: Single | Default: 200 |
| When too far away (as per <MaxManeuverDistance>), this TargetDistance will be the distance (in meters) at which the next waypoint is set. | ||
StrafeWidth<StrafeWidth> | Type: Single | Default: 10 |
Used for strafing maneuver. A value between this and its negative is randomly chosen, for example, if using 10 it results in a random range of -10 to 10.That value is how many meters it will offset to the right (or left if negative) relative to the direction between this ship and the target ship. | ||
StrafeHeight<StrafeHeight> | Type: Single | Default: 10 |
| Same as <StrafeWidth> but for up/down axis instead. | ||
StrafeDepth<StrafeDepth> | Type: Single | Default: 5 |
| Same as <StrafeWidth> but for forward/backward axis instead. | ||
MinStrafeDistance<MinStrafeDistance> | Type: Single | Default: 2 |
| Minimum meters for the randomly created waypoint for the strafing maneuver. See <StrafeWidth> for details on how that point is calculated and how this value is involved. | ||
UsePlanetHover<UsePlanetHover> | Type: Boolean | Default: false |
| If true, this affects the strafing and far-away maneuvers only if there's a planet nearby. First, it gets the altitude of the current waypoint relative to original heightmap (meaning voxel changes or grids would be ignored). | ||
PlanetHoverMin<PlanetHoverMin> | Type: Single | Default: 2 |
| Only used if <UsePlanetHover> is true. The altitude in meters that the ship won't go below (details in <UsePlanetHover>). Can be negative to specify under the surface. | ||
PlanetHoverMax<PlanetHoverMax> | Type: Single | Default: 25 |
| Only used if <UsePlanetHover> is true. The altitude in meters that the ship won't go above (details in <UsePlanetHover>). Can be negative to specify under the surface. | ||
UseRammingBehavior<UseRammingBehavior> | Type: Boolean | Default: false |
| If this is enabled and the drone is no longer operational (weapons and tools broken) and the target is within <RammingBehaviorDistance> meters, then the drone will begin its ramming mode and fly towards the target at 100m/s (ignoring <SpeedLimit>). | ||
RammingBehaviorDistance<RammingBehaviorDistance> | Type: Single | Default: 75 |
| See <UseRammingBehavior>. | ||
LostTimeMs<LostTimeMs> | Type: Int32 | Default: 20000 |
WaypointDelayMsMin<WaypointDelayMsMin> | Type: Int32 | Default: 1000 |
WaypointDelayMsMax<WaypointDelayMsMax> | Type: Int32 | Default: 3000 |
WaypointMaxTime<WaypointMaxTime> | Type: Int32 | Default: 15000 |
WaypointThresholdDistance<WaypointThresholdDistance> | Type: Single | Default: 0.5 |
Equipment
SoundLoop<SoundLoop> | Type: String | Default: (empty) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Optional. Plays continuously from the RC block while the drone operates.SubtypeId (without Arc or Real prefix) of an audio definition (Audio_*.sbc). | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AlternativeBehavior<AlternativeBehavior> | Type: String | Default: (empty) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Optional. SubtypeId of another drone behavior definition which the drone will change to when its weapon configuration is no longer valid. For example, a drone with static weapons can switch to a ramming behavior when it loses its weapons in a firefight. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UseTools<UseTools> | Type: Boolean | Default: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Whether the tools from the drone are controlled by this. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ToolsUsage<ToolsUsage> | Type: Single | Default: 8 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Tools are engaged if the target is within this many meters from the RC block. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UseStaticWeaponry<UseStaticWeaponry> | Type: Boolean | Default: true | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Whether stationary weapons from the drone are controlled by this. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
StaticWeaponryUsage<StaticWeaponryUsage> | Type: Single | Default: 300 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Stationary weapons are engaged if the target is within this many meters from the RC block. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
UsesWeaponBehaviors<UsesWeaponBehaviors> | Type: Boolean | Default: false | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Weapon behaviors are used if this is true and <WeaponBehaviors> has at least one entry and <UseStaticWeaponry> is also true. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WeaponBehaviorNotFoundDelay<WeaponBehaviorNotFoundDelay> | Type: Single | Default: 3 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Cooldown in seconds before checking weapons again after not finding a target or not finding any valid weapons. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
WeaponBehaviors<WeaponBehaviors> | Type: List<MyWeaponBehavior> | Default: null | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Optional. Each
<WeaponBehaviors>
<WeaponBehavior>
<Name>Gatling Burst</Name>
<Priority>30</Priority>
<TimeMin>1</TimeMin>
<TimeMax>3</TimeMax>
<IgnoresVoxels>false</IgnoresVoxels>
<IgnoresGrids>false</IgnoresGrids>
<RequirementsIsWhitelist>true</RequirementsIsWhitelist>
<Requirements>
<Weapon>SmallGatlingGun</Weapon>
<!-- ... -->
</Requirements>
<WeaponRules>
<WeaponRule>
<Weapon></Weapon>
<TimeMin>2</TimeMin>
<TimeMax>3</TimeMax>
<FiringAfterLosingSight>true</FiringAfterLosingSight>
<CanGoThroughVoxels>true</CanGoThroughVoxels>
</WeaponRule>
<!-- ... -->
</WeaponRules>
</WeaponBehavior>
<!-- ... -->
<WeaponBehaviors>
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(Top) | From DefinitionBase:
Common
Id<Id> | Type: SerializableDefinitionId | Default: (invalid) | ||||||||||||||||||||||||
| The type and subtype combined make up a unique identifier for this definition. If two definitions use the same Type+Subtype (Subtypes are only unique per Type), then the last to load will override the first one(s). For more details see Things to know about SBC.
<Id>
<TypeId>CubeBlock</TypeId>
<SubtypeId>FancyTable</SubtypeId>
</Id>
Because it has attribute alternatives it can also be declared as: <Id Type="CubeBlock" Subtype="FancyTable" />
| ||||||||||||||||||||||||||
DisplayName<DisplayName> | Type: String | Default: null | ||||||||||||||||||||||||
| If the object defined here is visible anywhere in the game GUI, this would be the name shown for it. In cases where it is used, it is very much required. Can be plain-text.
| ||||||||||||||||||||||||||
Description<Description> | Type: String | Default: null | ||||||||||||||||||||||||
| Optional. If the object defined here is shown with a description in the game GUI (Hotbar/G-menu, HUD, etc) then this is the place to write it. Can be plain-text.
{0}, {1}, etc, then they will replaced by kb&m control binds defined in <DescriptionArgs>. | ||||||||||||||||||||||||||
DescriptionArgs<DescriptionArgs> | Type: String | Default: null | ||||||||||||||||||||||||
Optional. A comma-separated list of control IDs which are referenced in <Description> by {number} tags, which then get replaced by the keyboard or mouse bind that the viewer has for those controls.Example: <Description>Press {0} to fire, {1} to change color, {2} to interact.</description>
<DescriptionArgs>PRIMARY_TOOL_ACTION,CUBE_COLOR_CHANGE,USE</DescriptionArgs>
And each player will see their current binds for those actions. | ||||||||||||||||||||||||||
Icon<Icon> | Type: String[] | Default: null | ||||||||||||||||||||||||
| Icon(s) for the definition which may or may not be used depending on the definition type. Path to a .dds or .png file relative to current mod's folder. Falls back to game folder if not found in current mod.
Referencing assets in other mods Can be declared multiple times which will stack icons on top of eachother, however it will not work for all definitions. Known definitions to work or not work with multiple icons
| ||||||||||||||||||||||||||
DLC<DLC> | Type: String[] | Default: null | ||||||||||||||||||||||||
| Optional. The DLC subtypeId that this definition will require. For the IDs, refer to <SE>\Content\Data\Game\DLCs.sbc. | ||||||||||||||||||||||||||
AvailableInSurvival<AvailableInSurvival> | Type: Boolean | Default: true | ||||||||||||||||||||||||
| Depends on the definition if it uses this, and if it does then this determines whether it can be accessible in survival game mode.
Currently known definitions that do use this:
| ||||||||||||||||||||||||||
Public<Public> | Type: Boolean | Default: true | ||||||||||||||||||||||||
| If the definition is visible or accessible in some cases. For blocks, this only hides them and they can still be built using projectors and other means. | ||||||||||||||||||||||||||
EnabledEnabled (attribute[1]) | Type: Boolean | Default: true | ||||||||||||||||||||||||
If set to false it will remove the definition after it's been loaded.Example usage: <Definition Enabled="false">
The "Definition" above is the opening element that for the entire definition, not an inner node like <Component>, <Blueprint>, etc. | ||||||||||||||||||||||||||
xsi:typexsi:type (attribute[1]) | Type: string | Default: null | ||||||||||||||||||||||||
Name of an object that this definition will be deserialized as. This attribute is available on all elements and comes from the XML specification. This game relies on this attribute to change which sub-definition object is used to deserialize that element's contents. It's what allows, for example, a thruster to have unique elements (such as For more details on how this relates to the TypeId, and usage examples, see: Things to know about SBC - TypeId vs xsi:type. | ||||||||||||||||||||||||||
Obsolete Elements
Note: this list only contains root-level from this definition only, nothing from inherited ones.
| <CanBeDisabled> | Type: Boolean | Default: true |
| Not used. | ||