[Solved] Adding a new designationCategory and showing it in the Architect Menu

Started by sumghai, August 12, 2017, 05:08:07 PM

Previous topic - Next topic

sumghai

[Solved - see solution in second post]

I have some buildings and furniture that I would like to assign to a new designationCategory, to avoid cluttering up the Production tab of the Architect Menu.

Which XML file do I define my new custom designationCategory, and how do I add it to the Architect Menu when the required research prerequisites have been met?

(I searched for existing threads on this subject, but the only ones I found dated back to 2014 for Alpha 3 and 4, and the information in them were heavily redacted because they were private to the internal testing group or age)

sumghai

Special thanks for Xen for showing me the following solution on Discord:

<?xml version="1.0" encoding="utf-8" ?>
<Defs>


    <DesignationCategoryDef>
        <DefName>DEFNAME_HERE</DefName>
        <label>LABEL_HERE</label>
        <description>DESCRIBE ME</description>
        <order>499</order>
        <specialDesignatorClasses>
            <li>Designator_Cancel</li>
            <li>Designator_Deconstruct</li>
        </specialDesignatorClasses>
    </DesignationCategoryDef>


</Defs>



  • DEFNAME_HERE should be of the format ModName_CustomCategory, as to prevent mod conflicts
  • <order> determines the list order in which the category is displayed in the Architect menu
  • This can be placed in any XML file under mod's corresponding Defs folder; in my case, I've put mine under Mods\<MyMod>\Defs\Misc\Designations\DesignationCategories.xml, which is similar to the game's own Mods\Core\Defs\Misc\Designations\DesignationCategories.xml

kaptain_kavern

Nice of you to post the answer ;-)

Also for the records I think Fluffy's mod : Architect Sense is a tool for grouping some designators (for not cluttering some Architecture menu) as another approach.

sumghai

Quote from: kaptain_kavern on August 12, 2017, 07:41:49 PMAlso for the records I think Fluffy's mod : Architect Sense is a tool for grouping some designators (for not cluttering some Architecture menu) as another approach.

An interesting suggestion!

That said, I'm trying keep this mod lightweight and standalone, so I'm avoiding dependencies as much as possible.