Next, you remove all existing blocks under ItemIds
from the category and replace them with entries for your own blocks. An entry consists of a block’s TypeId
and SubtypeId
, separated by a /
slash.
Note that these entries are additive, which means that you will not have to include all entries in the vanilla BlockCategory if you’d like to add your own.
For this example, I’m going to use my conveyor mod. As you can see below, I added the relevant blocks both to the Large Blocks
and the Conveyor
-categories. If my blocks were also available for small grid, I would be adding them to that category here too.
<?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">
<CategoryClasses>
<Category xsi:type="MyObjectBuilder_GuiBlockCategoryDefinition">
<Id>
<TypeId>GuiBlockCategoryDefinition</TypeId>
<SubtypeId/>
</Id>
<DisplayName>DisplayName_Category_LargeBlocks</DisplayName>
<Name>LargeBlocks</Name>
<ItemIds>
<string>Conveyor/AQD_LG_ConveyorJunctionTubes</string>
<string>Conveyor/AQD_LG_ConveyorX</string>
<string>ConveyorConnector/AQD_LG_ConveyorStraight5x1</string>
<string>ConveyorConnector/AQD_LG_ConveyorStraightArmored</string>
<string>ConveyorConnector/AQD_LG_ConveyorCornerArmored</string>
<string>Conveyor/AQD_LG_ConveyorTArmored</string>
<string>Conveyor/AQD_LG_ConveyorXArmored</string>
<string>CargoContainer/AQD_LG_ConveyorAccess</string>
<string>CargoContainer/AQD_LG_ConveyorVent</string>
</ItemIds>
</Category>
<Category xsi:type="MyObjectBuilder_GuiBlockCategoryDefinition">
<Id>
<TypeId>GuiBlockCategoryDefinition</TypeId>
<SubtypeId/>
</Id>
<DisplayName>DisplayName_Category_ConveyorBlocks</DisplayName>
<Name>Conveyors</Name>
<ItemIds>
<string>Conveyor/AQD_LG_ConveyorJunctionTubes</string>
<string>Conveyor/AQD_LG_ConveyorX</string>
<string>ConveyorConnector/AQD_LG_ConveyorStraight5x1</string>
<string>ConveyorConnector/AQD_LG_ConveyorStraightArmored</string>
<string>ConveyorConnector/AQD_LG_ConveyorCornerArmored</string>
<string>Conveyor/AQD_LG_ConveyorTArmored</string>
<string>Conveyor/AQD_LG_ConveyorXArmored</string>
<string>CargoContainer/AQD_LG_ConveyorAccess</string>
</ItemIds>
</Category>
</CategoryClasses>
</Definitions>