Next, you create entries for each of the blocks you want to add to the group under Blocks
. Note that the first entry in the list defines the block that is shown on the “face” of the group, marked with the +
and the order in which they are listed in the BVG corresponds to the order of the entries under Blocks
. An entry for a block consists of the following:
<Block Type="MyObjectBuilder_CubeBlock" Subtype="LargeBlockArmorBlock" />
Type is your block’s TypeId with MyObjectBuilder_
added to the front of it.
Subtype is the same as your block’s SubtypeId
.
Note that BVGs are 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.
As an example of amending an existing BVG, I’m going to use my conveyor expansion mod. Below you’ll see an example of a BVG I have adjusted, which is the ConveyorThickGroup
that is essentially the large grid and medium size small grid conveyor group:
<?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>
<BlockVariantGroup>
<Id Type="MyObjectBuilder_BlockVariantGroup" Subtype="ConveyorThickGroup" />
<Icon>Textures\GUI\Icons\Cubes\ConveyorTube.dds</Icon>
<DisplayName>DisplayName_ConveyorTube</DisplayName>
<Description>Description_ConveyorTube</Description>
<Blocks>
<Block Type="MyObjectBuilder_ConveyorConnector" Subtype="ConveyorTube" />
<Block Type="MyObjectBuilder_ConveyorConnector" Subtype="ConveyorTubeCurved" />
<Block Type="MyObjectBuilder_Conveyor" Subtype="ConveyorTubeT" />
<Block Type="MyObjectBuilder_Conveyor" Subtype="AQD_LG_ConveyorX" />
<Block Type="MyObjectBuilder_Conveyor" Subtype="AQD_LG_ConveyorJunctionTubes" />
<Block Type="MyObjectBuilder_ConveyorSorter" Subtype="LargeBlockConveyorSorter" />
<Block Type="MyObjectBuilder_ConveyorConnector" Subtype="ConveyorTubeMedium" />
<Block Type="MyObjectBuilder_ConveyorConnector" Subtype="ConveyorTubeCurvedMedium" />
<Block Type="MyObjectBuilder_Conveyor" Subtype="SmallShipConveyorHub" />
<Block Type="MyObjectBuilder_ConveyorConnector" Subtype="ConveyorFrameMedium" />
<Block Type="MyObjectBuilder_Conveyor" Subtype="SmallBlockConveyorConverter" />
<Block Type="MyObjectBuilder_ConveyorSorter" Subtype="MediumBlockConveyorSorter" />
</Blocks>
</BlockVariantGroup>
</BlockVariantGroups>
</Definitions>