[*Back to Index*](index.md.html) Build Menu Subcategory ====================== This mod item type allows you to create new building menu subcategories. Examples of subcategories can be seen inside the "Storages" category - "Depot" and "Storage". This mod item chould be used to add items to the build menu that do something different from placing a building (see `Action` below). Build Menu Subcategory Properties ================================= Id (*self.Id*) ------- The ID of this subcategory. Display Name (*self.display_name*) ------- Display name used in the build menu. Icon (*self.icon*) ------- Icon used in the build menu. Description (*self.description*) ------- Subcategory description. Displayed in the build menu button rollover text. Position in category (*self.build_pos*) ------- Position in the build menu category. Parent category (*self.category*) ------- The main category inside which the subcategory will appear. Allow Change Template Variants (*self.allow_template_variants*) ------- If the player can switch between the buildings of this subcategory using the "cycle visual variant" buttons (by default `[` and `]`). This is useful in cases like the "Depots" and "Storage" subcategory. It is far simpler to use the "cycle visual variant" keys, instead of going through the build menu, when placing multiple depots for different resources. Close build menu on selection (*self.close_parent*) ------- If clicking the subcategory button will close the build menu immediately. This could be used in conjunction with the `Action` function below. Action (*self.action(self, context, button)*) ------- Function to execute when clicking the subcategory button. The default will open the build menu subcategory, but it could do something completely different, like opening some other interface, activating an ingame action or anything else. (insert footer.md.html here)