BlockVariantGroups
Jump to navigation
Jump to search
This is the entry for the BlockVariantGroup that starts with the basic
BlockVariantGroups (BVGs) are the “scroll-groups” of blocks, marked with a +
, that you can find in the G
-menu. They generally group blocks with similar purposes or of similar types together into one hotbar item, for ease of use.
Wrapper & Entry Example
<?xml version="1.0" encoding="utf-8"?>
<Definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<BlockVariantGroups>
<!-- One or more BlockVariantGroup entries are placed here. -->
</BlockVariantGroups>
</Definitions>
A typical BlockCategories.sbc entry
<BlockVariantGroup>
<Id Type="MyObjectBuilder_BlockVariantGroup" Subtype="ArmorLightCubeGroup" />
<Icon>Textures\GUI\Icons\Cubes\light_armor_cube.dds</Icon>
<DisplayName>DisplayName_Block_LightArmorBlock</DisplayName>
<Description>Description_LightArmor</Description>
<Blocks>
<Block Type="MyObjectBuilder_CubeBlock" Subtype="LargeBlockArmorBlock" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="LargeBlockArmorSlope" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="LargeBlockArmorCorner" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="LargeBlockArmorCornerInv" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="LargeBlockArmorCornerSquare" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="LargeBlockArmorCornerSquareInverted" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="SmallBlockArmorBlock" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="SmallBlockArmorSlope" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="SmallBlockArmorCorner" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="SmallBlockArmorCornerInv" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="SmallBlockArmorCornerSquare" />
<Block Type="MyObjectBuilder_CubeBlock" Subtype="SmallBlockArmorCornerSquareInverted" />
</Blocks>
</BlockVariantGroup>
Light Armor Block
.Elements
Note that in most cases, the defined
Icon
, DisplayName
and Description
for a BlockVariantGroup don’t actually seem to be used. Instead, the Block
at the top of the Blocks
-list is used as the source for that information. This might, however, differ on Xbox and generally when using a gamepad, so it is recommended to still define these variables.Element | Description |
---|---|
IconString: |
Path to the icon texture defined for this BlockVariantGroup. |
DisplayNameString: |
The reference to the RESX entry for the localized name of the BlockVariantGroup as shown in the G -menu or a plaintext name, if RESX is not used.
|
DescriptionString: |
The reference to the RESX entry for the localized description of the BlockVariantGroup as shown in the G -menu or a plaintext description, if RESX is not used.
|
BlocksSubelement: |
This element can contain one or multiple subelements called Blocks , which define single entries into the variant group.
Note that unlike BlockCategories, this list is non-additive. This means that you have to redefine the entire BlockVariantGroup and all its entries if you would like to extend one that exists in the base game. It also means that if two mods edit the same group, the one higher in the mod list will entirely overwrite the one lower in the list. A
Note the differentiation between Type and TypeId . The Type of a block definition generally is its TypeId prefixed by MyObjectBuilder_ . There is no such difference between Subtype and SubtypeId , however - they are synonymous.Avoid using the block's xsi:type , that is not its Id! |
Take note that there are two common sources of trouble for BlockVariantGroups:
- DLC-blocks: If a DLC-block is first in the list of blocks, it will block a player that does not own said DLC from accessing the entire BVG, even if subsequent blocks may not be DLC blocks.
- Small / Large Grid Pairs: Blocks that have a paired block of the other grid size will always be preferred in the BVG order ingame, no matter the order the group is defined in the SBC. This means that if the first block in the SBC list does not have a paired small grid / large grid block, it will be substituted ingame by the first block in the BVG that does.