Hud Definition

From Space Engineers Wiki
Jump to navigation Jump to search

Found in Data\Hud\Default.sbc. Customizes some of the HUD.
Cockpits/Cryos and characters can optionally request a different HUD subtypeId, otherwise they too use the Default subtypeId.

Elements

OptimalScreenRatio

<OptimalScreenRatio>
Type: Nullable<Vector2I>Defaultnull
Required or it gets errors.

Aspect ratio that the HUD was designed for, anything else will affect scaling according to this formula:

ScaleMultiplier = ScreenX / ScreenY / (OptimalScreenRatioX / OptimalScreenRatioY)

That multiplier is applied to most cases where <CustomUIScale> is also used, and also only HUD elements with <ApplyHudScale> enabled.

Usage example:

<OptimalScreenRatio>
  <X>16</X>
  <Y>9</Y>
</OptimalScreenRatio>

CustomUIScale

<CustomUIScale>
Type: Nullable<Single>Defaultnull
Optional. Affects scale of things in this HUD, but only ones with <ApplyHudScale> enabled.
If null it uses the current resolution's height divided by 1080.

(Top)

Crosshair

<Crosshair>
Type: CrosshairStyleDefaultnull
Same syntax as one <StatControl>.

TargetingMarkers

<TargetingMarkers>
Type: TargetingMarkersStyleDefaultnull
Same syntax as one <StatControl>.

(Top)

GravityIndicator

<GravityIndicator>
Type: GravityIndicatorVisualStyleDefaultnull
<OffsetPx>Type: Vector2Default0, 0
<OriginAlign>Type: MyGuiDrawAlignEnumDefaultHORISONTAL_LEFT_AND_VERTICAL_TOP
Available values:
  • HORISONTAL_LEFT_AND_VERTICAL_TOP
  • HORISONTAL_LEFT_AND_VERTICAL_CENTER
  • HORISONTAL_LEFT_AND_VERTICAL_BOTTOM
  • HORISONTAL_CENTER_AND_VERTICAL_TOP
  • HORISONTAL_CENTER_AND_VERTICAL_CENTER
  • HORISONTAL_CENTER_AND_VERTICAL_BOTTOM
  • HORISONTAL_RIGHT_AND_VERTICAL_TOP
  • HORISONTAL_RIGHT_AND_VERTICAL_CENTER
  • HORISONTAL_RIGHT_AND_VERTICAL_BOTTOM
<SizePx>Type: Vector2Default0, 0
<VelocitySizePx>Type: Vector2Default0, 0
<FillTexture>Type: MyStringHashDefault
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<VelocityTexture>Type: MyStringHashDefault
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<OverlayTexture>Type: MyStringHashDefault
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<VisibleCondition>Type: ConditionBaseDefaultnull
See the Conditions section.
Elements that exist in the game code or vanilla SBC, but do nothing
<Position>Type: -Default-
Found in SBC but does not exist in game code.

(Top)

Toolbar

<Toolbar>
Type: ToolbarControlVisualStyleDefaultnull
<VisibleCondition>Type: ConditionBaseDefaultnull
See the Conditions section.
<CenterPosition>Type: Vector2Default0, 0
Example:
<CenterPosition>
  <X>0.496</X>
  <Y>0.866</Y>
</CenterPosition>
<SelectedItemPosition>Type: Vector2Default0, 0
Example:
<SelectedItemPosition>
  <X>0.02</X>
  <Y>-0.012</Y>
</SelectedItemPosition>
<SelectedItemTextScale>Type: Nullable<Single>Defaultnull
<OriginAlign>Type: MyGuiDrawAlignEnumDefaultHORISONTAL_LEFT_AND_VERTICAL_TOP
Available values:
  • HORISONTAL_LEFT_AND_VERTICAL_TOP
  • HORISONTAL_LEFT_AND_VERTICAL_CENTER
  • HORISONTAL_LEFT_AND_VERTICAL_BOTTOM
  • HORISONTAL_CENTER_AND_VERTICAL_TOP
  • HORISONTAL_CENTER_AND_VERTICAL_CENTER
  • HORISONTAL_CENTER_AND_VERTICAL_BOTTOM
  • HORISONTAL_RIGHT_AND_VERTICAL_TOP
  • HORISONTAL_RIGHT_AND_VERTICAL_CENTER
  • HORISONTAL_RIGHT_AND_VERTICAL_BOTTOM
<ItemStyle>Type: ToolbarItemStyleDefaultnull
Styling applied to each toolbar slot.
<Texture>Type: MyStringHashDefaultTextures\GUI\Controls\grid_item.dds
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<TextureHighlight>Type: MyStringHashDefaultTextures\GUI\Controls\grid_item_highlight.dds
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<TextureFocus>Type: MyStringHashDefaultTextures\GUI\Controls\grid_item_focus.dds
Seems it might not be used.
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<TextureActive>Type: MyStringHashDefaultTextures\GUI\Controls\grid_item_active.dds
Seems it might not be used.
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<VariantTexture>Type: MyStringHashDefaultTextures\GUI\Icons\VariantsAvailable.dds
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<VariantOffset>Type: Nullable<Vector2>Defaultnull
<ItemTextureScale>Type: Vector2Default0, 0
<FontNormal>Type: StringDefaultBlue
Status text's font.
Expects a SubtypeId from a Font Definition.
<FontHighlight>Type: StringDefaultWhite
Status text's font when slot is highlighted.
Expects a SubtypeId from a Font Definition.
<TextScale>Type: SingleDefault0.75
Scale multiplier of the status text on the slot.
<Margin>Type: Nullable<MyGuiOffset>Defaultnull
Spacing in each direction.
Example:
<Margin>
  <Left>0.004</Left>
  <Right>0.004</Right>
  <Top>0.002</Top>
  <Botton>0.002</Botton> <!-- must be with n because of game code typo -->
</Margin>
Full example:
<ItemStyle>
  <Texture>ToolbarItem_normal</Texture>
  <TextureHighlight>ToolbarItem_highlight</TextureHighlight>
  <VariantTexture>ToolbarVariantIcon</VariantTexture>
  <FontNormal>Blue</FontNormal>
  <FontHighlight>White</FontHighlight>
  <TextScale>0.46</TextScale>
  <ItemTextureScale>
    <X>0.7</X>
    <Y>0.7</Y>
  </ItemTextureScale>
  <Margin>
    <Left>0.004</Left>
    <Right>0.004</Right>
    <Top>0.002</Top>
    <Botton>0.002</Botton> <!-- must be with n because of game code typo -->
  </Margin>
  <VariantOffset>
    <X>0.92</X>
    <Y>0.36</Y>
  </VariantOffset>
</ItemStyle>
<PageStyle>Type: ToolbarPageStyleDefaultnull
Styling for the pages list.
<PageCompositeTexture>Type: MyStringHashDefaultnull
<SubtypeName> of a Composite GUI texture (GuiTextures.sbc).
<PageHighlightCompositeTexture>Type: MyStringHashDefaultnull
<SubtypeName> of a Composite GUI texture (GuiTextures.sbc).
<PagesOffset>Type: Vector2Default0, 0
<NumberSize>Type: Nullable<Single>Defaultnull
Optional scale multiplier for each page's number.
Full example:
<PageStyle>
  <PageCompositeTexture>ToolBarTabs</PageCompositeTexture>
  <PageHighlightCompositeTexture>ToolBarTabsHighlight</PageHighlightCompositeTexture>
  <PagesOffset>
    <X>-0.206</X>
    <Y>0.065</Y>
  </PagesOffset>
  <NumberSize>0.5</NumberSize>
</PageStyle>
<ColorPanelStyle>Type: ColorStyleDefaultnull
Color preview and voxel hand material preview HUD elements.
<Offset>Type: Vector2Default0, 0
<VoxelHandPosition>Type: Vector2Default0, 0
<Size>Type: Vector2Default0, 0
Size of both the voxel hand preview and color preview.
Values from 0.0 to 1.0 where 1.0 is the entire screen.
<Texture>Type: MyStringHashDefaultnull
<SubtypeName> of a Composite GUI texture (GuiTextures.sbc).
Full example:
<ColorPanelStyle>
  <Offset>
    <X>0.329</X>
    <Y>0.086</Y>
  </Offset>
  <VoxelHandPosition>
    <X>0.76</X>
    <Y>0.982</Y>
  </VoxelHandPosition>
  <Size>
    <X>0.042</X>
    <Y>0.011</Y>
  </Size>
  <Texture>ToolBarColorVariant</Texture>
</ColorPanelStyle>
<StatControls>Type: MyObjectBuilder_StatControls[]Defaultnull
Same syntax as the <StatControls>, list and all.
Elements that exist in the game code or vanilla SBC, but do nothing
<TabsOffset>Type: -Default-
Found in SBC file but does not exist in game code therefore it does nothing.

(Top)

DPad

<DPad>
Type: DPadControlVisualStyleDefaultnull
<CenterPosition>Type: Vector2Default0, 0
<OriginAlign>Type: MyGuiDrawAlignEnumDefaultHORISONTAL_LEFT_AND_VERTICAL_TOP
Available values:
  • HORISONTAL_LEFT_AND_VERTICAL_TOP
  • HORISONTAL_LEFT_AND_VERTICAL_CENTER
  • HORISONTAL_LEFT_AND_VERTICAL_BOTTOM
  • HORISONTAL_CENTER_AND_VERTICAL_TOP
  • HORISONTAL_CENTER_AND_VERTICAL_CENTER
  • HORISONTAL_CENTER_AND_VERTICAL_BOTTOM
  • HORISONTAL_RIGHT_AND_VERTICAL_TOP
  • HORISONTAL_RIGHT_AND_VERTICAL_CENTER
  • HORISONTAL_RIGHT_AND_VERTICAL_BOTTOM
<VisibleCondition>Type: ConditionBaseDefaultnull
See the Conditions section.

(Top)

StatControls

<StatControls>
Type: MyObjectBuilder_StatControls[]Defaultnull
List of HUD elements, can have as many as you want.

Each <StatControl> can contain:

<ApplyHudScale>Type: BooleanDefaulttrue
<Position>Type: Vector2Default0, 0
<OriginAlign>Type: MyGuiDrawAlignEnumDefaultHORISONTAL_LEFT_AND_VERTICAL_TOP
Available values:
  • HORISONTAL_LEFT_AND_VERTICAL_TOP
  • HORISONTAL_LEFT_AND_VERTICAL_CENTER
  • HORISONTAL_LEFT_AND_VERTICAL_BOTTOM
  • HORISONTAL_CENTER_AND_VERTICAL_TOP
  • HORISONTAL_CENTER_AND_VERTICAL_CENTER
  • HORISONTAL_CENTER_AND_VERTICAL_BOTTOM
  • HORISONTAL_RIGHT_AND_VERTICAL_TOP
  • HORISONTAL_RIGHT_AND_VERTICAL_CENTER
  • HORISONTAL_RIGHT_AND_VERTICAL_BOTTOM
<VisibleCondition>Type: ConditionBaseDefaultnull
See the Conditions section.
<StatStyles>Type: MyObjectBuilder_StatVisualStyle[]Defaultnull
See the Stat Styles section.

(Top) | From DefinitionBase:

Common

Id

<Id>
Type: SerializableDefinitionIdDefault(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.

<TypeId>Type: stringDefault(invalid)
Must be an existing type with or without the "MyObjectBuilder_" prefix.

Some types require an xsi:type, refer to the vanilla files for the exact pairing.

TypeId vs xsi:type
<SubtypeId>Type: stringDefault(empty)
This can be invented and only needs to be unique per TypeId.

Vanilla game re-uses some subtypes over multiple types (e.g. Iron is used for Ore type and Ingot type).

An empty value is also a valid subtype (which vanilla also uses on at least 5 blocks).
Type (attribute[1])Type: stringDefault(invalid)
Same behavior as <TypeId>, do not define both.
Subtype (attribute[1])Type: stringDefault(empty)
Same behavior as <SubtypeId>, do not define both.
Example:
<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: StringDefaultnull
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.
If the text contains DisplayName_ then:

Description

<Description>
Type: StringDefaultnull
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.
If the text contains Description_ then:

If the final text (plain, localized or variable-replaced) contains {0}, {1}, etc, then they will replaced by kb&m control binds defined in <DescriptionArgs>.

DescriptionArgs

<DescriptionArgs>
Type: StringDefaultnull
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.

The control IDs can be found in your %appdata%/SpaceEngineers/SpaceEngineers.cfg at the ControlsButtons section.

Icon

<Icon>
Type: String[]Defaultnull
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
  • Working: Blocks, BlockVariantGroups and component items seen in G-menu, BlockInfo (HUD right side) and toolbars; Blueprints in terminal production tab; Blocks and PhysicalItems in gamepad HUD.
  • Partial: Blocks seen in terminal.
  • Not working: HandItems (uses PhysicalItem's icon instead); Blocks and BlockVariantGroups seen in build planner, radial menu and some economy GUIs; PhysicalItems in economy GUIs and stores; Prefabs in stores; BlueprintClass (tabs) in terminal production tab; BankingSystemDefinition (Game\BankingSystem.sbc); Emotes (both kinds of definitions) in gamepad HUD; Block skins; RespawnShips.
  • Special cases: Economy contracts, FactionIcons Definition.

DLC

<DLC>
Type: String[]Defaultnull
Optional. The DLC subtypeId that this definition will require.

For the IDs, refer to <SE>\Content\Data\Game\DLCs.sbc.
Can be declared multiple times to require multiple DLCs.

Most definition types won't check for this, the ones that do: blocks, emotes and possibly anything else that can be placed in the toolbar.

AvailableInSurvival

<AvailableInSurvival>
Type: BooleanDefaulttrue
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: BooleanDefaulttrue
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.

Enabled

Enabled (attribute[1])
Type: BooleanDefaulttrue
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 <DisplayName> is.

The opening node can have a different name for other definitions, some examples <Component>, <Blueprint>, etc.

xsi:type

xsi:type (attribute[1])
Type: stringDefaultnull

Name of an object that this definition will be deserialized as.
Sometimes required, depends on the definition. The wiki page for any given definition will mention at the top what xsi:type it requires, if any. The game's sbc files are also a reference on what xsi:types are required for a given definition.

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 <MinPlanetaryInfluence>) that no other block definitions have.

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

Elements that exist in the game code or vanilla SBC, but do nothing

Note: this list only contains root-level from this definition only, nothing from inherited ones.

<VisorOverlayTexture>Type: Nullable<MyStringHash>Defaultnull
Does not function.





Conditions

The condition starts from:
<ElementName xsi:type="ConditionTypeHere">
Where ConditionTypeHere has to be one of the below types, which also determines what elements you can add inside.
The ElementName depends on where you enter this.

Condition
<Operator>Type: StatLogicOperatorDefaultAnd
Available values:
  • And - all terms must be true for this to evaluate true.
  • Not - all terms must return false for this to evaluate true.
  • Or - any of the terms returning true will make this evaluate true.
<Terms>Type: ConditionBase[]Defaultnull
List of <Term xsi:type="ConditionTypeHere"> where ConditionTypeHere is either Condition (this) or StatCondition shown below.

The contents will be the elements of the chosen condition type.

See below for full example.
StatCondition
<Operator>Type: StatConditionOperatorDefaultBelow
The operator to use when comparing <Value> against the StatId's internal code value in order for this entire condition to evaluate as true.

Available values:

  • Below - <Value> must be smaller than stat's value (and not equal).
  • Above - <Value> must be larger than stat's value (and not equal).
  • Equal
  • NotEqual
<Value>Type: SingleDefault0
The value to check with the Operator against the StatId's internal code value.
<StatId>Type: MyStringHashDefault
ID of a HudStat logic.

Full example:

<VisibleCondition xsi:type="Condition">
  <Operator>And</Operator>
  <Terms>
    <Term xsi:type="StatCondition">
      <StatId>controller_mode</StatId>
      <Operator>Equal</Operator>
      <Value>0</Value>
    </Term>
    <Term xsi:type="StatCondition">
      <StatId>hud_mode</StatId>
      <Operator>Above</Operator>
      <Value>0</Value>
    </Term>
  </Terms>
</VisibleCondition>


Stat Styles

List of objects that can differ depending on the xsi:type given.

But first, shared things between all styles:

Shared with all styles
<Category>Type: Nullable<VisualStyleCategory>Defaultnull
Available values:
<FadeInTimeMs>Type: Nullable<UInt32>Defaultnull
<FadeOutTimeMs>Type: Nullable<UInt32>Defaultnull
<MaxOnScreenTimeMs>Type: Nullable<UInt32>Defaultnull
<MaxTextWidth>Type: Nullable<Single>Defaultnull
<OffsetPx>Type: Vector2Default0, 0
<SizePx>Type: Vector2Default0, 0
<StatId>Type: MyStringHashDefault
ID of a HudStat logic.
<VisibleCondition>Type: ConditionBaseDefaultnull
See the Conditions section.
<Blink>Type: MyAlphaBlinkBehaviorDefaultnull
Optional. Example:
<Blink>
  <MinAlpha>0.2</MinAlpha>
  <MaxAlpha>0.8</MaxAlpha>
  <IntervalMs>400</IntervalMs>
  <ColorMask>
    <X>1</X>
    <Y>0</Y>
    <Z>0</Z>
    <W>0.8</W>
  </ColorMask>
  <Blink>true</Blink>
</Blink>
<BlinkCondition>Type: ConditionBaseDefaultnull
Optional. Condition for activating <Blink>.
See the Conditions section.
Elements that exist in the game code or vanilla SBC, but do nothing
<StatCriticalValue>Type: -Default-
Found in SBC file but does not exist in game code therefore it does nothing.

Styles:

MyObjectBuilder_CircularProgressBarStatVisualStyle
<Animate>Type: Nullable<Boolean>Defaultnull
<AnimationDelayMs>Type: Nullable<Double>Defaultnull
<AnimationSegmentDelayMs>Type: Nullable<Double>Defaultnull
<AnimatedSegmentColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<AnimatedSegmentColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</AnimatedSegmentColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<EmptySegmentColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<EmptySegmentColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</EmptySegmentColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<FullSegmentColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<FullSegmentColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</FullSegmentColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<NumberOfSegments>Type: Nullable<Int32>Defaultnull
<SpacingAngle>Type: Nullable<Single>Defaultnull
<AngleOffset>Type: Nullable<Single>Defaultnull
<ShowEmptySegments>Type: Nullable<Boolean>Defaultnull
<SegmentOrigin>Type: Nullable<Vector2>Defaultnull
<SegmentSizePx>Type: Vector2Default0, 0
<BackgroudTexture>Type: Nullable<MyStringHash>Defaultnull
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<SegmentTexture>Type: MyStringHashDefault
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<FirstSegmentTexture>Type: Nullable<MyStringHash>Defaultnull
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<LastSegmentTexture>Type: Nullable<MyStringHash>Defaultnull
<SubtypeName> of a GUI texture (GuiTextures.sbc).
MyObjectBuilder_TargetingProgressBarStatVisualStyle
<EnemyFocusSegmentColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<EnemyFocusSegmentColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</EnemyFocusSegmentColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<EnemyLockingSegmentColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<EnemyLockingSegmentColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</EnemyLockingSegmentColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<FriendlyFocusSegmentColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<FriendlyFocusSegmentColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</FriendlyFocusSegmentColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<FriendlyLockingSegmentColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<FriendlyLockingSegmentColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</FriendlyLockingSegmentColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<NeutralFocusSegmentColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<NeutralFocusSegmentColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</NeutralFocusSegmentColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<NeutralLockingSegmentColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<NeutralLockingSegmentColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</NeutralLockingSegmentColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<NumberOfSegments>Type: Nullable<Int32>Defaultnull
<ShowEmptySegments>Type: Nullable<Boolean>Defaultnull
<SegmentOrigin>Type: Nullable<Vector2>Defaultnull
<SegmentSizePx>Type: Vector2Default0, 0
<SpacingAngle>Type: Nullable<Single>Defaultnull
<AngleOffset>Type: Nullable<Single>Defaultnull
<BackgroudTexture>Type: Nullable<MyStringHash>Defaultnull
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<FilledTexture>Type: Nullable<MyStringHash>Defaultnull
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<SegmentTexture>Type: MyStringHashDefault
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<FirstSegmentTexture>Type: Nullable<MyStringHash>Defaultnull
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<LastSegmentTexture>Type: Nullable<MyStringHash>Defaultnull
<SubtypeName> of a GUI texture (GuiTextures.sbc).
Elements that exist in the game code or vanilla SBC, but do nothing
<Animate>Type: -Default-
Found in SBC file but does not exist in game code, therefore it does nothing.
MyObjectBuilder_ProgressBarStatVisualStyle
<Inverted>Type: Nullable<Boolean>Defaultnull
<NineTiledStyle>Type: Nullable<NineTiledData>Defaultnull
<Texture>Type: MyStringHashDefaultnull
<SubtypeName> of a Composite GUI texture (GuiTextures.sbc).
<ColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<ColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</ColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<SimpleStyle>Type: Nullable<SimpleBarData>Defaultnull
<BackgroundTexture>Type: MyStringHashDefaultnull
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<ProgressTexture>Type: MyStringHashDefaultnull
<SubtypeName> of a GUI texture (GuiTextures.sbc).
<BackgroundColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<BackgroundColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</BackgroundColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<ProgressColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<ProgressColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</ProgressColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<ProgressTextureOffsetPx>Type: Vector2IDefaultnull
MyObjectBuilder_TextStatVisualStyle
<ColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<ColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</ColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<Font>Type: StringDefaultnull
Text's font.
Expects a SubtypeId from a Font Definition.
<MaxWidth>Type: SingleDefault0
<Scale>Type: SingleDefault0
<Text>Type: StringDefaultnull
The text to print.
Supports text variables, and additionally {STAT} is replaced with the HudStat's current value.
<TextAlign>Type: Nullable<MyGuiDrawAlignEnum>Defaultnull
Elements that exist in the game code or vanilla SBC, but do nothing
<Percentage>Type: -Default-
Found in SBC file but does not exist in game code therefore it does nothing.
<Precision>Type: -Default-
Found in SBC file but does not exist in game code therefore it does nothing.
MyObjectBuilder_ImageStatVisualStyle
<ColorMask>Type: Nullable<Vector4>Defaultnull
Usage:
<ColorMask>
  <X>0.5</X>
  <Y>0.2</Y>
  <Z>1.0</Z>
  <W>0.25</W>
</ColorMask>
Where X/Y/Z/W = Red/Green/Blue/Alpha.
<Texture>Type: MyStringHashDefault
<SubtypeName> of a GUI texture (GuiTextures.sbc).



HudStat logic

HudStats are programmed to do something and return it as a decimal number.

These can be referenced by an ID by various things above which either print it or check it as a condition.
IDs which sound like on/off will return 1 for on and 0 for off.

Mod scripts can create HudStats or even override existing IDs: Example_HudStatOverride.cs.

All built-in IDs
  • controlled_broadcasting
  • controlled_can_target
  • controlled_dampeners
  • controlled_estimated_time_remaining_energy
  • controlled_estimated_time_remaining_hydrogen
  • controlled_handbreak - parking brake
  • controlled_hydrogen_capacity
  • controlled_is_grid
  • controlled_is_static
  • controlled_is_turret
  • controlled_mass
  • controlled_power_usage
  • controlled_reactors
  • controlled_reloading - reloading progress ratio (0.0 to 1.0)
  • controlled_reloading_count - how many weapons are reloading
  • controlled_remote_access
  • controlled_speed
  • is_weapon_selected - when controlling a cockpit or RC, returns 1 if any target-locking-capable weapon is selected in the toolbar.
  • controller_mode - returns 1 if any joystick/gamepad was last used, otherwise 0 for keyboard/mouse.
  • environment_oxygen_level
  • environment_temperature_level
  • hud_mode - 0 is hidden, 1 is with hints and 2 is without hints.
  • hud_show_keys - has no logic, always 1
  • hud_show_states - has no logic, always 0
  • artificial_gravity
  • natural_gravity - in g (1.0 means 9.81m/s/s)
  • player_broadcasting
  • player_energy
  • player_flashlight
  • player_health
  • player_helmet
  • player_hydrogen
  • player_hydrogen_bottles
  • player_inventory_capacity
  • player_inventory_capacity_changed
  • player_inventory_full
  • player_jetpack
  • player_magboots
  • player_oxygen
  • player_oxygen_bottles
  • player_refilling_hydrogen
  • player_refilling_oxygen
  • player_suffocating
  • target_in_focus
  • target_locked
  • targeting_circle - target locking progress ratio (0.0 to 1.0).
  • offscreen_target_circle - only while controlling a target-locking-capable block, returns target locking progress ratio (0.0 to 1.0); otherwise returns 0.
  • toolbar_align_to_mountpoint
  • toolbar_grid_size
  • toolbar_symmetry

New in 207:

  • session_food_consumption_rate - returns the exact same value that the FoodConsumptionRate world setting is set to.
  • player_radiation - ratio, (0.0 to 1.0).
  • player_radiation_immunity - ratio, (0.0 to 1.0).
  • player_is_using_cryo_chamber - 0 or 1
  • player_food - ratio, (0.0 to 1.0).
  • player_cant_sprint - turns 1 when player attempts to sprint while being unable to.