Jump to content

Custom categories?


BuzzFeed4Lief

Recommended Posts

so i am developing a mod that would really help if it had its own categories, except i have no clue how, iv tried the tutorial on the wiki but that didnt help, i have the icon made but im just terrible at this so if anyone can help it would be great thanks.

BuzzFeed4Lief

Link to comment
Share on other sites

The non-code solution could add a dependency on the Community Category Kit mod and ship a custom filter config file.

 

If you'd like to go it yourself, PartCategorizer.AddCustomSubcategoryFilter() looks promising, e.g. used like this:

https://github.com/allista/AT_Utils/blob/master/Addons/SimplePartFilter.cs
https://github.com/allista/GroundConstruction/blob/master/GCFilterManager.cs

 

Edited by HansAcker
Link to comment
Share on other sites

On 10/10/2020 at 7:37 PM, BuzzFeed4Lief said:

so i am developing a mod that would really help if it had its own categories, except i have no clue how, iv tried the tutorial on the wiki but that didnt help, i have the icon made but im just terrible at this so if anyone can help it would be great thanks.

BuzzFeed4Lief

I use a patch like this to add a cat with custom icons. You simply use the part name to add parts to list.

 

ODCAT
{
    folderName = NSI
    normalPath = NSI/Category/NSIIcon
    selectedPath = NSI/Category/NSIIconActive
    title = Next Star Industries
}

CUSTOM_PARTLIST_CATEGORY
{

    categoryName = NSI
    icon = NSI/Category/NSIIconActive

    SUBCATEGORY
    {
            name = Engines
            icon = Squad/PartList/SimpleIcons/R&D_node_icon_advancedmotors

        PARTS
        {
            part = NSILV-1
        }
    }

    SUBCATEGORY
    {
            name = Probes
            icon = Squad/PartList/SimpleIcons/R&D_node_icon_basicprobes

        PARTS
        {
            part = NSI1m-PCC
            part = TDS22
            part = Peacekeeper
            part = MQ9
        }
    }
    SUBCATEGORY
    {
            name = Weapons
            icon = Squad/PartList/SimpleIcons/R&D_node_icon_experimentalelectrics

        PARTS
        {
            part = B61m12GPS
            part = Diamondback
            part = Typhoon
            part = exocetMM40b3
            part = FatMan
            part = Pumpkin Bomb
            part = LittleBoy
            part = W87
            part = Peacekeeper
            part = MK24
            part = MK81GPS
            part = MK81Laser
            part = MK81UGB
            part = MK82GPS
            part = MK82Laser
            part = MK82UGB
            part = MK83GPS
            part = MK83Laser
            part = MK83UGB
            part = MK84GPS
            part = MK84Laser
            part = MK84UGB
            part = R23r
            part = R27r
            part = R33
            part = R37
            part = R60
            part = R73
            part = Honest John Conventional LR GPS
            part = Honest John Conventional UGM
            part = Honest John Nuclear LR GPS
            part = Honest John Nuclear UGM
    `       part = Honest John Improved Conventional UGM
            part = Honest John Improved Nuclear UGM
        }
    }
}

Edited by Next_Star_Industries
Link to comment
Share on other sites

On 10/16/2020 at 2:19 AM, Next_Star_Industries said:

I use a patch like this to add a cat with custom icons. You simply use the part name to add parts to list.

 

ODCAT
{
    folderName = NSI
    normalPath = NSI/Category/NSIIcon
    selectedPath = NSI/Category/NSIIconActive
    title = Next Star Industries
}

CUSTOM_PARTLIST_CATEGORY
{

    categoryName = NSI
    icon = NSI/Category/NSIIconActive

    SUBCATEGORY
    {
            name = Engines
            icon = Squad/PartList/SimpleIcons/R&D_node_icon_advancedmotors

        PARTS
        {
            part = NSILV-1
        }
    }

    SUBCATEGORY
    {
            name = Probes
            icon = Squad/PartList/SimpleIcons/R&D_node_icon_basicprobes

        PARTS
        {
            part = NSI1m-PCC
            part = TDS22
            part = Peacekeeper
            part = MQ9
        }
    }
    SUBCATEGORY
    {
            name = Weapons
            icon = Squad/PartList/SimpleIcons/R&D_node_icon_experimentalelectrics

        PARTS
        {
            part = B61m12GPS
            part = Diamondback
            part = Typhoon
            part = exocetMM40b3
            part = FatMan
            part = Pumpkin Bomb
            part = LittleBoy
            part = W87
            part = Peacekeeper
            part = MK24
            part = MK81GPS
            part = MK81Laser
            part = MK81UGB
            part = MK82GPS
            part = MK82Laser
            part = MK82UGB
            part = MK83GPS
            part = MK83Laser
            part = MK83UGB
            part = MK84GPS
            part = MK84Laser
            part = MK84UGB
            part = R23r
            part = R27r
            part = R33
            part = R37
            part = R60
            part = R73
            part = Honest John Conventional LR GPS
            part = Honest John Conventional UGM
            part = Honest John Nuclear LR GPS
            part = Honest John Nuclear UGM
    `       part = Honest John Improved Conventional UGM
            part = Honest John Improved Nuclear UGM
        }
    }
}

thanks so much i will see if i can get it too work

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...