Modding Help Need more help with recipe and custom crafting table.

Discussion in 'Starbound Modding' started by Fearytiger, May 20, 2017.

  1. Fearytiger

    Fearytiger Scruffy Nerf-Herder

    I made a mod with a custom crafting table to craft every modded item in and a mod item in the in the crafting interface for empty hands. It works perfectly fine and you can craft it as long as your in admin mode or used to be an admin as every blueprint was unlocked when you became an admin. Is there any code I can add to allow me to craft these without going into admin mode?
     
  2. projectmayhem

    projectmayhem Spaceman Spiff

    You need to patch the player.config file to they "know" the recipe. Let's say one of your mod items is called SuperAwesomeGun. You would need to make a text file in someting like Notepad++ and name it player.config.patch , put it in your mods base folder.
    [
    {
    "op" : "add",
    "path" : "/defaultBlueprints/tier1/-",
    "value" : { "item" : "SuperAwesomeGun" }
    }
    ]


    If you add more items, just insert a comma and do the next one.

    [
    {
    "op" : "add",
    "path" : "/defaultBlueprints/tier1/-",
    "value" : { "item" : "SuperAwesomeGun" }
    },
    {
    "op" : "add",
    "path" : "/defaultBlueprints/tier1/-",
    "value" : { "item" : "SuperAwesomeChestpiece" }
    }
    ]
     
  3. Fearytiger

    Fearytiger Scruffy Nerf-Herder

    I tried doing that, but it crashes the game whenever I do.
     
  4. projectmayhem

    projectmayhem Spaceman Spiff

    did you make sure to name it player.config.patch
    If you want to post your mod or a log file I'll look through
     
  5. Fearytiger

    Fearytiger Scruffy Nerf-Herder

    I renamed it to player.config patch. Here is the file I created to test the mod before uploading an update to the actual mod.
     

    Attached Files:

  6. bk3k

    bk3k Oxygen Tank

    Line 8 of player.config.patch was missing a double quotation symbol.

    Code:
    [
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "sharicitecrafting" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "nepgearsailorchest" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "nepgearskirt" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "nepgearhair" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "NeptuneLeggings" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "neptunehoodiechest" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "NeptuneHair" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "unichest" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "unilegs" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "noirechest" }},
      { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "noireskirt" }}
    ]
    
    I suggest to use an advanced text editor(notepad++ etc) and utilize a JSON language profile. Most things in starbound are JSON except the .lua files and obviously image/sound files. When using such profiles, these errors really pop right out at you. I found the problem in about half a second because the coloring was off.
     
  7. Fearytiger

    Fearytiger Scruffy Nerf-Herder

    I use Notepad++ but don't know how to utilize a language profile. And thanks a lot!
     
  8. bk3k

    bk3k Oxygen Tank

    Up top where it says "language" select either JSON or Javascript(where JSON came from).
     
    projectmayhem likes this.
  9. Fearytiger

    Fearytiger Scruffy Nerf-Herder

    Thank you!
     

Share This Page