Modding Help Recipe and Image Not Showing Up

Discussion in 'Starbound Modding' started by Mackinz, Feb 9, 2015.

  1. Mackinz

    Mackinz The Waste of Time

    Still working on a mod for farming. I decided to add a recipe for the Thatch block, and change "shroom.png" to a more appealing alternative. Problem is, going in-game, the recipe for Thatch does not show up upon picking up Reed as I patched it to, and the change in shroom.png does not show.

    The recipe issue is one I've encountered a few times before, which I've resolved by settling for Campfire or Terramart recipes but I refuse to do so with this recipe.

    Here is the vanilla reed.item:

    Code:
    {
      "itemName" : "reed",
      "rarity" : "Common",
      "inventoryIcon" : "reed.png",
      "description" : "A bunch of cut reeds.",
      "shortdescription" : "Reed",
    
      "learnBlueprintsOnPickup" : [ "reedblock" ]
    }
    
    Here is my reed.item.patch (I've tried adding and replacing, but neither work):

    Code:
    [
    { "op": "replace", "path": "/learnBlueprintsOnPickup",
    "value": [ "reedblock", "thatch" ]
    }
    ]
    
    Code:
    [
    { "op": "add", "path": "/learnBlueprintsOnPickup/-",
    "value": "thatch"
    }
    ]
    
    Here is what the output should look like:

    Code:
    {
      "itemName" : "reed",
      "rarity" : "Common",
      "inventoryIcon" : "reed.png",
      "description" : "A bunch of cut reeds.",
      "shortdescription" : "Reed",
      "learnBlueprintsOnPickup" : [ "reedblock", "thatch" ]
    }
    
    Here is my thatch.recipe:

    Code:
    {
      "input" : [
        { "item" : "reed", "count" : 2 }
      ],
      "output" : {
        "item" : "thatch",
        "count" : 1
      },
      "groups" : [ "plain", "materials", "all" ]
    }
    
    And, finally, here is my shroom.png replacement:

    shroom.png


    Please help!

    The full mod is also attached in a ZIP file.
     

    Attached Files:

    Last edited: Feb 9, 2015
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    Best Answer
    The patch file has to be in the EXACT parallel location. Which means
    This is probably why all your other
    recipes are not working either.
    Code:
    items/generic/crafting/reed.patch
    you kept it in
    Code:
    generic/crafting/reed.patch.
    Fixed zip attached.

    [​IMG]
     

    Attached Files:

    Last edited: Feb 10, 2015
    Mackinz likes this.
  3. SleepySquidd

    SleepySquidd Tragically Magic Hands

    Is an item called reedblock already in the game? If not try changing the itemName to reed, thatch, or the name of the thatch block. Admittedly its been a while since I've done code for recipes, but a bit of tinkering with those variables should do the trick.
     
  4. Mackinz

    Mackinz The Waste of Time

    Reedblock is, indeed, in the game. You find reed on desert planets with healing oasis subbiomes, and use it to craft reed blocks. I want to add thatch to the recipes learned, and nothing I've done, thus far, has worked. I've done what you've suggested.
     
  5. SleepySquidd

    SleepySquidd Tragically Magic Hands

    Once I get back on my computer today I'll take a look at it and see what I can do.
     
  6. The | Suit

    The | Suit Agent S. Forum Moderator

    Both work fine - remember it will only occur on a fresh instance.
    In another words planets already generated will not have it.
    You will need to go to a completely unvisited planet.

    Or cheat in reed with admin. Otherwise there is nothing readily apparent wrong with your code.
    I am not really sure what you are doing with the shroom. Maybe go into a bit more detail on that..


    Use this - Don't use replace unless absolutely necessary.
    Code:
    [
    { "op": "add", "path": "/learnBlueprintsOnPickup/-",
    "value": "thatch"
    }
    ]
    ==
    I won't be able to test any code today as nightly is currently broken
     
  7. Mackinz

    Mackinz The Waste of Time

    I have reed stored on my character. That's not the problem. When I throw it down and pick it back up, I still don't get my recipe even though I'm sure that, if I added "cooking" to the categories, it would work just fine in a campfire.

    And the shroom should be a simple image replacement. It isn't working.
     
  8. The | Suit

    The | Suit Agent S. Forum Moderator

    Right you will need new reed. Just delete all that reed - and spawn in fresh one through admin.

    I am still not sure what isn't working with your shroom - you need to be more specific.
    Remember current shroom will not change. Only shrrom on planets you never visited before.
     
    SleepySquidd likes this.
  9. Mackinz

    Mackinz The Waste of Time

    Why won't current shroom change? It's an image replacement. It shouldn't require a new shroom to see the change, since it's a direct replacement of the image. Radioactive Metals (my mod) works fine, and it is solely an image replacement mod.

    I'll have to try the reed, though I'm not sure if what you're saying is true. If it is, that is a terrible decision by the developers...
     
  10. Mackinz

    Mackinz The Waste of Time

    Actually, I realized that, since I added reed to the Terramart and bought some while testing, that that is not the problem either. Maybe it's just a bug...
     
  11. SleepySquidd

    SleepySquidd Tragically Magic Hands

    Yup, when you make a mod affecting an item it doesn't change all the existing ones, just newly generated ones.
     
  12. Mackinz

    Mackinz The Waste of Time

    Quote for emphasis.

    Not the issue.

    If you would like to verify that that is not the issue, you can try installing and using the test mod I attached. Buy reed from the Terramart at the Outpost.
     
  13. The | Suit

    The | Suit Agent S. Forum Moderator

    Best Answer
    The patch file has to be in the EXACT parallel location. Which means
    This is probably why all your other
    recipes are not working either.
    Code:
    items/generic/crafting/reed.patch
    you kept it in
    Code:
    generic/crafting/reed.patch.
    Fixed zip attached.

    [​IMG]
     

    Attached Files:

    Last edited: Feb 10, 2015
    Mackinz likes this.
  14. Mackinz

    Mackinz The Waste of Time

    Actually, I'm fairly confident that this was a one-off thing caused by me not double-checking the file locations because I was dead tired when I posted. Still, thanks sooooo much! I'm gonna go cry in a corner now of embarrassment.
     
    SleepySquidd and The | Suit like this.

Share This Page