Modding Help I believe I messed up.

Discussion in 'Starbound Modding' started by Ertas10, Oct 29, 2016.

  1. Ertas10

    Ertas10 Void-Bound Voyager

    So, I followed Naddox's tutorial on how to make crafting stations, but at some point I probably messed up and now my crafting station doesn't have an image in-game (the icon for the item still appears tho). I would love if someone looked at my files and told me what's wrong with it (after spending over 1,5 hours doing this, and now being 3:40 has kinda made me quit searching for it for the day).
    Thanks in advance and here's the code:
    Path: "Interface\objectcrafting\Ertas10terrariaworkbench":
    Code:
    {
      "gui" : {
        "background" : {
          "type" : "background",
          "fileHeader" : "/interface/objectcrafting/campfire_header.png",
          "fileBody" : "/interface/objectcrafting/campfire_body.png",
          "fileFooter" : "/interface/objectcrafting/campfire_footer.png"
        },
        "toggleCrafting" : {
          "type" : "button",
          "position" : [42, 36],
          "base" : "/interface/objectcrafting/cook.png",
          "hover" : "/interface/objectcrafting/cookover.png",
          "caption" : "Craft"
        },
        "close" : {
          "type" : "button",
          "base" : "/interface/inventory/x.png",
          "hover" : "/interface/inventory/xhover.png",
          "press" : "/interface/inventory/xpress.png",
          "position" : [123, 105]
        },
        "lblText" : {
          "type" : "label",
          "position" : [70, 78],
          "hAnchor" : "mid",
          "wrapWidth" : 125,
          "value" : "^#b9b5b2;Place one or more ingredients in the left slot."
          },
        "itemGrid" : {
          "type" : "itemgrid",
          "position" : [40, 54],
          "dimensions" : [1, 1],
          "spacing" : [19, 19],
          "backingImage" : "/interface/inventory/empty.png"
        },
        "outputItemGrid" : {
          "type" : "itemgrid",
          "slotOffset" : 1,
          "position" : [76, 54],
          "dimensions" : [1, 1],
          "spacing" : [19, 19],
          "backingImage" : "/interface/inventory/empty.png"
        },
        "pointer" : {
          "type" : "image",
          "position" : [62, 57],
          "file" : "/interface/objectcrafting/arrow.png"
        },
        "overlay" : {
          "type" : "image",
          "file" : "/interface/objectcrafting/campfire_shine.png",
          "position" : [-20, 20]
        }
      }
    }
    
    Path: "Interface\windowconfig\craftingErtas10terrariaworkbench":
    Code:
    {
      "requiresBlueprint" : true,
      "craftingSound" : "/sfx/interface/crafting_furnace.ogg",
    
      "paneLayout" : {
        "background" : {
          "type" : "background",
          "fileHeader" : "/interface/crafting/craftingheader.png",
          "fileBody" : "/interface/crafting/craftingbody.png",
          "fileFooter" : "/interface/crafting/craftingfooter.png"
        },
        "close" : {
          "type" : "button",
          "base" : "/interface/inventory/x.png",
          "hover" : "/interface/inventory/xhover.png",
          "press" : "/interface/inventory/xpress.png",
          "position" : [321, 261]
        },
        "windowtitle" : {
          "type" : "title",
          "title" : " Work Bench",
          "subtitle" : " ^#b9b5b2;Terrarian Crafting",
          "position" : [-5, 252],
          "icon" : {
            "type" : "image",
            "file" : "/interface/crafting/craftingicon.png",
            "position" : [0, -20],
            "zlevel" : -1
          }
        },
        "bgShine" : {
          "type" : "image",
          "file" : "/interface/crafting/shine.png",
          "position" : [-15, 0],
          "zlevel" : -10
        },
        "btnUpgrade" : {
          "type" : "button",
          "disabledImage" : "/interface/crafting/upgradeUnready.png",
          "base" : "/interface/crafting/upgradeReady.png",
          "position" : [139, 258],
          "zlevel" : 5
        },
        "lblSchematics" : {
          "type" : "label",
          "position" : [88, 245],
          "hAnchor" : "mid",
          "value" : "^#b9b5b2;BLUEPRINTS"
        },
        "lblProducttitle" : {
          "type" : "label",
          "position" : [265, 245],
          "hAnchor" : "mid",
          "value" : "^#b9b5b2;PRODUCT"
        },
        "spinCount" : {
          "type" : "spinner",
          "position" : [220, 46],
          "upOffset" : 36
        },
        "tbSpinCount" : {
          "type" : "textbox",
          "position" : [232, 46],
          "textAlign" : "center",
          "maxWidth" : 16,
          "regex" : "x?\\d{0,4}",
          "hint" : ""
        },
        "imgAmountInput" : {
          "type" : "image",
          "file" : "/interface/crafting/amount.png",
          "position" : [226, 45],
          "zlevel" : -3
        },
        "btnCraft" : {
          "type" : "button",
          "base" : "/interface/button.png",
          "hover" : "/interface/buttonhover.png",
          "position" : [271, 43],
          "caption" : "Craft"
        },
        "btnStopCraft" : {
          "type" : "button",
          "base" : "/interface/buttonactive.png",
          "hover" : "/interface/buttonactivehover.png",
          "position" : [271, 43],
          "caption" : "Stop"
        },
        "imgCraftBg" : {
          "type" : "image",
          "file" : "/interface/crafting/craftbg.png",
          "position" : [196, 40],
          "zlevel" : -5
        },
        "currentRecipeIcon" : {
          "type" : "itemslot",
          "callback" : "null",
          "position" : [197, 41]
        },
        "btnFilterHaveMaterials" : {
          "type" : "button",
          "base" : "/interface/crafting/checkboxnocheck.png",
          "baseImageChecked" : "/interface/crafting/checkboxcheck.png",
          "checkable" : true,
          "checked" : false,
          "position" : [40, 59]
        },
        "lblProduct" : {
          "type" : "label",
          "position" : [51, 59],
          "hAnchor" : "left",
          "value" : "MATERIALS AVAILABLE"
        },
    
        "scrollArea" : {
          "type" : "scrollArea",
          "rect" : [5, 68, 174, 230],
          "children" : {
            "itemList" : {
              "type" : "list",
              "schema" : {
                "selectedBG" : "/interface/crafting/craftableselected2.png",
                "unselectedBG" : "/interface/crafting/craftablebackground.png",
                "spacing" : [0, 1],
                "memberSize" : [159, 20],
                "listTemplate" : {
                  "background" : {
                    "type" : "image",
                    "file" : "/interface/crafting/craftablebackground.png",
                    "position" : [2, 0],
                    "zlevel" : -1
                  },
                  "itemName" : {
                    "type" : "label",
                    "position" : [25, 5],
                    "hAnchor" : "left",
                    "wrapWidth" : 116,
                    "value" : "Replace Me"
                  },
                  "itemIcon" : {
                    "type" : "itemslot",
                    "position" : [3, 1],
                    "callback" : "null"
                  },
                  "newIcon" : {
                    "type" : "image",
                    "position" : [119, 5],
                    "file" : "/interface/crafting/new.png",
                    "zlevel" : 2
                  },
                  "moneyIcon" : {
                    "type" : "image",
                    "position" : [122, 1],
                    "file" : "/interface/money.png"
                  },
                  "priceLabel" : {
                    "type" : "label",
                    "position" : [134, 1],
                    "hAnchor" : "left",
                    "value" : "0"
                  },
                  "notcraftableoverlay" : {
                    "type" : "image",
                    "file" : "/interface/crafting/notcraftableoverlay.png",
                    "position" : [0, 0],
                    "zlevel" : 1
                  }
                }
              }
            }
          }
        },
        "description" : {
          "type" : "widget",
          "position" : [190, 41],
          "size" : [140, 220]
        },
        "filter" : {
          "type" : "textbox",
          "position" : [60, 43],
          "hint" : "Search",
          "maxWidth" : 70,
          "escapeKey" : "close",
          "enterKey" : "filter",
          "focus" : true
        },
        "categories" : {
          "type" : "radioGroup",
          "toggleMode" : true,
          "buttons" : [
          ]
        },
        "rarities" : {
          "type" : "radioGroup",
          "toggleMode" : true,
          "buttons" : [
          ]
        }
      }
    }
    
    Path: "Objects\Work Bench\Work Bench.frames":
    Code:
    {
      "frameGrid" : {
        "size" : [16, 8],
        "dimensions" : [1, 1],
        "names" : [
          [ "default.0" ]
        ]
      },
    
      "aliases" : {
        "default.default" : "default.0"
      }
    }
    
    Path: "objects\Work Bench\Work Bench.object":
    Code:
    {
      "objectName" : "Ertas10terrariaworkbench",
      "colonyTags" : ["crafting"],
      "printable" : false,
      "price" : 30,
      "rarity" : "Uncommon",
      "interactAction" : "OpenCraftingInterface",
      "interactData" : {
        "config" : "/interface/windowconfig/craftingErtas10terrariaworkbench.config",
        "filter" : [ "workbench" ]
      },
      "description" : "A Work Bench used to create items from another world",
      "shortdescription" : "^orange;Work Bench^white;",
      "race" : "generic",
      "category" : "crafting",
    
      "apexDescription" : "I can use it to craft items from the world of Terraria.",
      "avianDescription" : "I can use it to craft items from the world of Terraria.",
      "floranDescription" : "I can use it to craft items from the world of Terraria.",
      "glitchDescription" : "I can use it to craft items from the world of Terraria.",
      "humanDescription" : "I can use it to craft items from the world of Terraria.",
      "hylotlDescription" : "I can use it to craft items from the world of Terraria.",
      "novakidDescription" : "I can use it to craft items from the world of Terraria",
    
      "inventoryIcon" : "WorkBenchicon.png",
      "orientations" : [
        {
          "dualImage" : "TerrariaWorkBench.png:<color>.<frame>",
          "direction" : "left",
          "flipImages" : true,
    
          "imagePosition" : [0, 0],
          "frames" : 1,
          "animationCycle" : 1.0,
    
          "spaces" : [ [0, 0], [0, 1], [0, 2],
                       [1, 0], [1, 1], [1, 2] ],
          "anchors" : [ "bottom" ]
        },
        {
          "dualImage" : "TerrariaWorkBench.png:<color>.<frame>",
          "direction" : "right",
          "flipImages" : true,
    
          "imagePosition" : [0, 0],
          "frames" : 1,
          "animationCycle" : 1.0,
    
          "spaces" : [ [0, 0], [0, 1], [0, 2],
                       [1, 0], [1, 1], [1, 2] ],
          "anchors" : [ "bottom" ]
        }
      ]
    }
    
    The .png are the following:
    Path: "objects\Work Bench\TerrariaWorkBench.png": TerrariaWorkBench.png (16x8)
    Path: "objects\Work Bench\WorkBenchicon.png": WorkBenchicon.png (16x16)

    Here is a screenshot of what it looks like in-game: Sem TĂ­tulodawdaw.png
    If there is anything else needed, just ask me and I'll upload it ASAP, so that I can help you help me.
     
    Last edited: Oct 29, 2016
  2. Antyrus

    Antyrus Pangalactic Porcupine

    Have you looked at your log? If there's an actual error, it'll be there.
    I don't really know where to start otherwise, but I haven't seen a crafting table that uses two "orientations"(I also haven't done a lot of searching, so there might be a reason you're doing this that I'm not aware of)
    The anvil crafting object(the generic one found in dungeons that you can't upgrade) uses

    Code:
    "orientations" : [
        {
          "dualImage" : "ironanvil.png:<color>",
    
          "imagePosition" : [-8, 0],
          "frames" : 1,
          "animationCycle" : 1.0,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ]
    
        }
      ],

    and I have a custom animated crafting table that works perfectly fine that uses

    Code:
    "orientations" : [
        {
          "dualImage" : "legsterminator.png:<color>.<frame>",
    
          "imagePosition" : [-16, 0],
          "frames" : 6,
          "animationCycle" : 0.4,
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ]
    
        }
      ]

    Also, if your crafting table doesn't upgrade, you might consider cleaning up that part of the code, as it might cause errors later.
    Again, look at that log file, it'll tell you what file has the error, if nothing else.
     
  3. Ertas10

    Ertas10 Void-Bound Voyager

    The thing is, I don't think there's an error going on, since it loads just fine and I can even place it and use it, it's just that the object itself is not loading the image in-game and I can't seem to pick up the problem.
    But yeah, I'll try to clean up the "upgrade" part later since I don't believe I'm going to need it.
     
  4. Antyrus

    Antyrus Pangalactic Porcupine

    Image loading isn't usually a fatal error, though; I've personally broken all sorts of things this way, and there's always an error, even if the game doesn't crash.
    just to be safe:
    Open starbound
    Spawn your crafting table
    Place your crafting table
    Exit starbound
    Post your log here, even if there's nothing wrong with it
     
  5. Mioure

    Mioure Scruffy Nerf-Herder

    Ok for one: you do not need an Objectcrafting file page.

    Objectcrafting is only for stations that use one item and makes another like the refinery, or the old Coffee Machine/Campfire
    These files are not used for the stations with multiple recipes showing on a list format.

    Second: You should probably search around for a crafting table you want with the correct amount of tabs.
    The Windowconfig file sets up your tabs. If you do not one any, then fine by it, but Honestly I would just copy a table that already exists and change the coding to suit your item names and tab names.

    Finally: Try putting this code for your .frames file.
    Code:
    {
    
      "frameGrid" : {
      "size" : [x, y],
      "dimensions" : [1, 1],
      "names" : [
      [ "default" ]
      ]
      }
    }
    Ive had some issues with the starbound client unable to find "Default.default" when there was only 1 image.
    After just changing it to "default" it seemed to work for the most part. This may not work for you, but its worth a shot.

    Edit: Also Good choice on making a Terraria mod. I don't think I've seen any, and It would be cool to see what you add to starbound. I recommend not using a direct rip of the assets and instead edit them to suit starbound's pixel style if you can.
     
  6. Ertas10

    Ertas10 Void-Bound Voyager

    Here's the log
    [03:32:25.917] [Info] Root: Preparing Root...
    [03:32:25.918] [Info] Root: Done preparing Root.
    [03:32:25.919] [Info] Client Version 1.1.1 (windows x86_64) Source ID: 82604f6097b124f2ed38ee58a7ae18c51e916dd8 Protocol: 724
    [03:32:25.919] [Info] Root: Scanning for asset sources in directory '..\assets\'
    [03:32:26.664] [Info] Root: Scanning for asset sources in directory '..\mods\'
    [03:32:26.670] [Info] Root: Detected asset source named 'base' at '..\assets\packed.pak'
    [03:32:26.670] [Info] Root: Detected asset source named ' Terraria mod' at '..\mods\Terraria mod'
    [03:32:26.670] [Info] Root: Detected unnamed asset source at '..\assets\user'
    [03:32:26.670] [Info] Loading assets from: '..\assets\packed.pak'
    [03:32:27.641] [Info] Loading assets from: '..\mods\Terraria mod'
    [03:32:27.648] [Info] Loading assets from: '..\assets\user'
    [03:32:29.687] [Info] Assets digest is 6d893741c3131f3baa9d1225539804288167b08591e5664425a05b67bfd22940
    [03:32:29.687] [Info] Root: Loaded Assets in 3.76821 seconds
    [03:32:29.696] [Info] Application: Initializing SDL Video
    [03:32:29.701] [Info] Application: Initializing SDL Joystick
    [03:32:29.808] [Info] Application: Initializing SDL Sound
     
  7. Ertas10

    Ertas10 Void-Bound Voyager

    I finally got it working by changing
    Code:
    "dualImage" : "TerrariaWorkBench.png:<color>.<frame>",
          "direction" : "left",
          "flipImages" : true,
    
          "imagePosition" : [0, 0],
          "frames" : 1,
          "animationCycle" : 1.0,
    
          "spaces" : [ [0, 0], [0, 1], [0, 2],
                       [1, 0], [1, 1], [1, 2] ],
          "anchors" : [ "bottom" ]
        },
        {
          "dualImage" : "TerrariaWorkBench.png:<color>.<frame>",
          "direction" : "right",
          "flipImages" : true,
    
    to
    Code:
      "dualImage" : "terrariaworkbench.png",
          "direction" : "left",
          "flipImages" : true,
    
          "imagePosition" : [0, 0],
          "frames" : 1,
          "animationCycle" : 1.0,
    
          "spaces" : [ [0, 0], [0, 1], [1, 0], [1, 1] ],
          "anchors" : [ "bottom" ]
        },
        {
          "dualImage" : "terrariaworkbench.png",
          "direction" : "right",
          "flipImages" : true,
    (the uppercase to lowercase wasn't necessary, I just did that to try out everything)
    Thank you both for your help
     

Share This Page