Modding Help Need Help with Ore Distribution and Recipes

Discussion in 'Starbound Modding' started by windwalker13, Oct 16, 2016.

  1. windwalker13

    windwalker13 Void-Bound Voyager

    I've been trying to make a kind of unique mod, and have followed tutorials on making ores, patches, and weapons. Somehow, however, I'm getting these errors, and don't know what exactly is causing them.

    The mods I currently have installed are:
    Squids in Space!: A Splatoon Species Mod
    Felin Objects+
    Felin Fur+
    Felin
    Felin Costumes+
    Xbawks Character Extender
    annoying dog instrument
    The Tabula Rasa
    Hoenn Trumpet
    Lamia Race
    Extended Songbook
    Anastas Game Music Pack 2.12
    CrazyFreak's Musical Collection
    Kemono Race Mod ver 1.15

    I will also provide the mod folder too.
     

    Attached Files:

  2. Mioure

    Mioure Scruffy Nerf-Herder

    This is a relatively simple fix thankfully.
    So what you are experiencing is what is known as JSON Parsing Errors
    This occurs when you did not type out the code correctly, or in a correct format.
    The error in question actually tells you where and what is wrong.
    You have to look for KEY words and phrases among the mess of coding.
    Code:
    ...
    [12:02:21.832] [Error] Exception caught loading asset: /player.config, (AssetException) Could not read JSON asset /player.config
    ...
    Caused by: (JsonParsingException) Cannot parse json file: /player.config
    ...
    Caused by: (JsonParsingException) Error parsing json: bad array, should be ',' or ']' at 2:1
    
    This means you have an incorrect format in the file "/player.config" at the array 2:1, and it recommends using a "," or "]" to fix it.

    Looking at your player.config.patch file, you have incorrectly coded the addition of a couple items.
    Code:
    [{"op":"add","path":"/defaultBlueprints/tier3/-","value":{"item":"Yangblade"}}
    [{"op":"add","path":"/defaultBlueprints/tier3/-","value":{"item":"Yinblade"}}]
    [{"op":"add","path":"/defaultBlueprints/tier3/-","value":{"item":"Yiniumbar"}}]
    [{"op":"add","path":"/defaultBlueprints/tier3/-","value":{"item":"Yangiumbar"}}]
    
    The error tells you that you need an extra bracket on the last character of the first line, but instead most people follow the single bracket and commas format.
    you really only need 1 bracket.
    This is an opener for coding, and it allows the person to group similar codes together.
    You are not changing format, so you do not need a second, third, or even a fourth bracket.

    Additionally, you need to add commas in between the same coding that you want to work together.
    Commas are essentially a way of telling the decoder that there is more code on the next line that needs to work with the top one.
    For the player.config.patch file, you need to add a comma for every line, BUT THE LAST. this shows that there is no more coding after the last line.

    it should look like this:
    Code:
    [
      {"op":"add","path":"/defaultBlueprints/tier3/-","value":{"item":"Yangblade"},
      {"op":"add","path":"/defaultBlueprints/tier3/-","value":{"item":"Yinblade"},
      {"op":"add","path":"/defaultBlueprints/tier3/-","value":{"item":"Yiniumbar"},
      {"op":"add","path":"/defaultBlueprints/tier3/-","value":{"item":"Yangiumbar"}
    ]
    
    Hope this helps, and maybe you learned a couple things about Troubleshooting your errors, and proper coding format :)
     
    IHart likes this.
  3. windwalker13

    windwalker13 Void-Bound Voyager

    Thanks a lot for the help! Now Starbound is able to run my mod without crashing, but there's two more problems I'm having now. The bars are not appearing in the level 2 furnace, the swords are not appearing in the level 2 anvil, and finally for some reason the swords are not appearing in my characters hands when equipped. Is this because it's trying to find a hilt and a blade separately, and if so, what should the coding look like if I want it to only need one image?
     
  4. Mioure

    Mioure Scruffy Nerf-Herder

    Hello again,
    First off, I have not done any coding work with swords, so im sorry to say that I cannot help you in that regard as of this moment.
    However,
    Seeing as you added the blueprints to the player.config.patch you should be able to see the recipes.
    If you can't then I would recommend putting them all at tier 1.
    Code:
      { "op": "add", "path": "/defaultBlueprints/tier1/-", "value": { "item" : "Name" } },
    
    Being completely honest, Im not sure why, but Tier 1 usually works for almost every mod, and it doesn't do anything different than the other tiers.
    If I'm correct in assuming, Tier 2 and Tier 3 require you to add extra coding to allow the player to "Learn" then recipe rather than Tier 1 where its available from the start.

    Either way, If you make them all tier 1, as long as the recipe itself has the correct categories, then it will appear in the section you want it to. The categories are on the last line of the recipes themselves and are usually
    Code:
    "Crafting Station", "Section", "Race"
    
    where Race = All for default, or remove it all together for default.
     
  5. windwalker13

    windwalker13 Void-Bound Voyager

    UPDATE: I have weapons working fine, but now ore distribution, and crafting recipes are not working. The ores are supposed to be as rare as titanium to find, and appear where titanium is, and they do not. As I said aswell, crafting still is not working, I thought I did the coding for learning the recipes when finding the ore but I don't know. Here is the updated ZIP if anyone wants to help me figure this out.
     

    Attached Files:

Share This Page