Modding Help Crafting tab for hand crafting

Discussion in 'Starbound Modding' started by Qbi Wan, Jul 3, 2020.

  1. Qbi Wan

    Qbi Wan Pangalactic Porcupine

    Is there any way to do it? I want to add some recipes and I don't want to mix then with others

    Wysłane z mojego MAR-LX1A przy użyciu Tapatalka
     
  2. projectmayhem

    projectmayhem Spaceman Spiff

    probably. You would need to patch the empty hand crafting window config to add new tabs
     
  3. Qbi Wan

    Qbi Wan Pangalactic Porcupine

    Thx [emoji6] I searched for the TABs, and comparing craftinganvil.config and crafting.config I know where tabs are, but are there any files that binds certain recipes to TAB names?
    F.e. anvil have lblArmourTab, and every tier1head.recipe have armour in their group - logic.
    But crafting.config (I think it's for bare hands crafting speculating from its subtitle [emoji39]) have no TAB, which is obvious, BUT campfire.recipe, and all recipes from basic crafting have "plain" group.
    So question is
    1. How game knows that "plain" is for no category crafting tables? Will I have to create specific file for hand to know this group?
    2. If I create new tab will I have to change groups of all basic recipes? Will I overcome it if I actually create "Plain" group?



    Wysłane z mojego MAR-LX1A przy użyciu Tapatalka
     
  4. projectmayhem

    projectmayhem Spaceman Spiff

    So, this is just my thoughts, but I think "plain" is hardcoded in the files we dont have access too. So, the game itself knows that "plain" means open hand.

    As far as how the game knows what tabs to put items on, you will have to look at other recipes and windowconfig files. Take for instance the anvil window config. Near the bottom you will find the categories { }

    Code:
    "categories" : {
          "type" : "radioGroup",
          "toggleMode" : false,
          "buttons" : [
            {
              "selected" : true,
              "position" : [18, 221],
              "baseImage" : "/interface/crafting/unselectedTab.png",
              "baseImageChecked" : "/interface/crafting/selectedTab.png",
              "data" : {
                "filter" : [ "armours" ]
              }
            },
            {
              "position" : [45, 221],
              "baseImage" : "/interface/crafting/unselectedTab.png",
              "baseImageChecked" : "/interface/crafting/selectedTab.png",
              "data" : {
                "filter" : [ "weapons" ]
              }
            },
            {
              "position" : [72, 221],
              "baseImage" : "/interface/crafting/unselectedTab.png",
              "baseImageChecked" : "/interface/crafting/selectedTab.png",
              "data" : {
                "filter" : [ "consumables" ]
              }
            },
            {
              "position" : [99, 221],
              "baseImage" : "/interface/crafting/unselectedTab.png",
              "baseImageChecked" : "/interface/crafting/selectedTab.png",
              "data" : {
                "filter" : [ "hazardgear" ]
              }
            }
          ]
        }

    As you can see, these categories have filters. This is how the game knows which tab to send it to.
    If you open a recipe from the anvil, you see this...
    Code:
    "groups" : [ "craftinganvil", "armours", "all" ]
    
    So, this item will go to the craftinganvil and under the tab filter armours.

    Now you may be wondering where craftinganvil comes into play. If you look at the object file for craftinganvil you see see this...
    Code:
      "filter" : [ "craftinganvil" ]
    
    As you upgrade the anvil (visable by scrolling down in the object file) you will notice it adds craftinganvil2 and craftinganvil3 to its filter list as it gets upgraded.

    Since open hand has no object, we can't really inspect it. But I would assume, somewhere on their side it is coded as filter : "plain"



    EDIT -- as for your last question. I would try to patch the crafting.config to add tabs with filters. See what happens when you make a recipe "plain" and "newfilter" (whatever filter you add).

    If everything shows right, you got it. If vanilla items vanish, try patching 1 of them to a second tab that you create. If it shows up, then patch all the vanilla plain recipes.

    However, if you have to end up patching the vanilla files, your mod wont be compatible with any mod that adds to the "C" menu
     

Share This Page