Modding Help How do I patch cockpit.config to show my ore in Geological Analysis?

Discussion in 'Starbound Modding' started by imnotactuallynew, May 2, 2020.

  1. imnotactuallynew

    imnotactuallynew Space Hobo

    Hi! I made a mod that adds a new ore, but I can't figure out how to make my ore visible in Geographical Analysis in the cockpit. May someone point out what I'm doing wrong?

    cockpit.config:
    Code:
    [
      {
      "op":"add",
      "path":"/displayOres/-",
      "value": "smore" : {
      "displayName" : "Smores",
      "icon" : "/smoreanimation/smore.png"
      }
      }
    ]
    smorefragment.matmod:
    Code:
    {
      "modId" : 717,
      "modName" : "smorefragment",
      "itemDrop" : "smore",
      "description" : "Smore fragment.",
      "health" : 1,
      "harvestLevel" : 1,
      "breaksWithTile" : true,
    
      "miningSounds" : [ "/sfx/tools/pickaxe_ore.ogg", "/sfx/tools/pickaxe_ore2.ogg" ],
      "miningParticle" : "orespark",
    
      "renderTemplate" : "/tiles/classicmaterialtemplate.config",
      "renderParameters" : {
        "texture" : "smorefragment.png",
        "variants" : 8,
        "multiColored" : false,
        "zLevel" : 0
      }
    }
    
    smore.consumable:
    Code:
    {
      "itemName" : "smore",
      "rarity" : "Common",
      "price" : 10,
      "category" : "preparedFood",
      "inventoryIcon" : "smore.png",
      "description" : "A delicious smore.",
      "shortdescription" : "Smore.",
      "foodValue" : 10,
      "tooltipKind" : "food",
      "builder" : "/items/buildscripts/buildfood.lua",
      "maxStack" : 9999,
      "itemAgingScripts" : ["/scripts/items/rotting.lua"],
      "rottingMultiplier" : 0.0,
      "blockingEffects" : [
        "wellfed"
      ],
      "learnBlueprintsOnPickup" : [ "pearlpeabroth" ]
    }
    
    oredistributions.configfunctions.patch:
    Code:
    [
      {
        "op": "add",
        "path":"/surface/0/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/surface/1/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/surface/2/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/surface/3/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/surface/4/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/surface/5/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth1/0/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth1/1/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth1/2/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth1/3/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth1/4/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth1/5/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth2/0/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth2/1/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth2/2/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth2/3/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth2/4/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth2/5/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth3/0/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth3/1/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth3/2/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth3/3/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth3/4/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/depth3/5/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/core/0/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/core/1/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/core/2/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/core/3/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/core/4/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      },
      {
        "op": "add",
        "path":"/core/5/1/-",
        // "0" is the first line/"1" is oredistribution, "2" would be planetlevel/ "-" means it goes at the end of the line
        "value":  [ "smorefragment", 0.80]
      }
    ]
    I wasn't sure if it was necessary to post anything after cockpit.config so I just went all out.
    Thank you for reading!:)
     
  2. projectmayhem

    projectmayhem Spaceman Spiff

    Your cockpit patch should look like this...

    Code:
    [
        {
            "op": "add",
            "path": "/displayOres/smore",
            "value": {
                "displayName": "Smores",
                "icon": "/items/generic/other/smore.png"
            }
        }
    ]

    I moved the icon file path to match the vanilla file location for ore png's. It's best to follow vanilla file pathing as much as possible, but if you really want to, change it back to
    /smoreanimation/smore.png
     

Share This Page