Modding Help Crafting Blueprints

Discussion in 'Starbound Modding' started by SmartBadger, Dec 28, 2013.

  1. SmartBadger

    SmartBadger Scruffy Nerf-Herder

    I need some help. I've been trying for ages to figure this out, and I'm not sure if it is even possible :/

    What I want to do is this:

    Player will make a custom crafting station {done}
    Player uses crafting station to make 'blank' blueprint (custom object) {done}
    Player combines blank blueprint with other stuff to make actual blueprint (just as would be found in chest, etc) <--- I cannot get this!

    Is it even possible to 'create' a blueprint as the result of a crafting? I know, obviously, that blueprints can be found as loots, but using the same call as the treasurepools use doesn't work - for example:
    Code:
    "output" : {
        "item" : "burger-recipe",
        "count" : 1
      },
    Does *not* give me a burger blueprint - it just chucks an error when starting the server ("could not instantiate item")

    Any ideas?
     
  2. infinitetech

    infinitetech Big Damn Hero

    check what the actual item code is, it might not actually be called that off of the treasure item list
     
  3. SmartBadger

    SmartBadger Scruffy Nerf-Herder

    Here is a section of default.treasurepools (with some *snippage*)

    Code:
    "humanBunkerLore" : [
        [1, {
            "pool" : [
               ...
              [0.01, [ "burger-recipe", 1] ],
              [0.01, [ "vegetablesoup-recipe", 1] ],
              [0.02, [ "chilistew-recipe", 1] ],
              [0.01, [ "fishnchips-recipe", 1] ],
              [0.02, [ "mashedpotato-recipe", 1] ],
              [0.02, [ "gardensalad-recipe", 1] ],
              [0.01, [ "sweetcorn-recipe", 1] ],
              [0.02, [ "cake-recipe", 1] ],
              [0.02, [ "applepie-recipe", 1] ],
              [0.03, [ "candyapple-recipe", 1] ],
              [0.03, [ "icecream-recipe", 1] ],
              ...
    
      ],
    There does not seem to be any actual object or item files for blueprints (except for a generic 'blueprint' item) - at least, not that I have found. So, I think that the loot table is coded to pull info from "burger.consumable" (such as its icon), overlay that on the generic blueprint, and create a consumable item which unlocks the "burger.recipe" when used. I would really like to duplicate that behaviour from crafting.
     
    Last edited: Dec 28, 2013
  4. SmartBadger

    SmartBadger Scruffy Nerf-Herder

    bump. Anyone out there can help with this?

    Surely I am not the first to try this?
     
  5. -Soler

    -Soler Pangalactic Porcupine

    i did it in my mod let's say you want to make a recipe for the floran's bed which item name it's floranbed

    so i made a scanner that works just like a furnace and put this recipe

    Code:
    {
      "input" : [
        { "item" : "floranbed", "count" : 1 }
      ],
      "output" : { "item" : "floranbed-recipe", "count" : 1 },
      "groups" : [ "scanner" ]
    }
    if you want to make it with food and blank blueprint's it'll be like this

    Code:
    {
      "input" : [
      { "item" : "blankblueprint", "count" : 1 },
      { "item" : "item1", "count" : 1 },
      { "item" : "item2", "count" : 1 }
      ],
      "output" : { "item" : "burger-recipe", "count" : 1 },
      "groups" : [ "YOURCUSTOMGROUP" ]
    }
    being blankblueprint the itemname of your "blank blueprint" item 1 & 2 the itemnames of what you want to use.. etc etc (of couse you can have more than 2 or 3 or 4...

    Edit: EVEN IF IT'S A CUSTOM ITEM JUST MAKE IT LIKE THIS TO GET IT'S BLUEPRINT " ITEMNAME-RECIPE "

    i would like if you take a look at my mod maybe you can find something interesting ? http://community.playstarbound.com/index.php?resources/logicalrecipes.632/
     
    Last edited: Dec 29, 2013
    infinitetech likes this.
  6. SmartBadger

    SmartBadger Scruffy Nerf-Herder

    Thank you soler, that was a big help. It seems that I was going along the right lines (your mod produces the same errors as mine, but it does work despite them) - and taking a look at the code of your mod and Tabula Rasa helped me find the last few issues I was having :)

    Yay!
     
  7. -Soler

    -Soler Pangalactic Porcupine

    glad to help =)

    can you tell me which "errors" are you talking about ?
     
  8. SmartBadger

    SmartBadger Scruffy Nerf-Herder

    Code:
    Error: Could not instantiate item '[burger-recipe, 1, {}]'. ItemException: No such item 'burger-recipe'
      ... (3)
      0058BFE6 (E:/Steamworks/Starbound/git/starbound/source/game/StarItemDatabase.cpp:200)
      005BEFF5 (E:/Steamworks/Starbound/git/starbound/source/game/StarRecipeDatabase.cpp:67)
      004DD72F (E:/Steamworks/Starbound/git/starbound/source/game/StarRoot.cpp:174)
      004016D8 (E:/Steamworks/Starbound/git/starbound/source/client/StarClientApplication.cpp:302)
      009681DC (E:/Steamworks/Starbound/git/starbound/source/core/StarThread_windows.cpp:74)
      7749336A
      77CC9F72
      77CC9F45
    
    Error: Could not instantiate item '[burger-recipe, 1, {}]'. ItemException: No such item 'burger-recipe'
      ... (3)
      0058C79B (E:/Steamworks/Starbound/git/starbound/source/game/StarItemDatabase.cpp:230)
      005BEFF5 (E:/Steamworks/Starbound/git/starbound/source/game/StarRecipeDatabase.cpp:67)
      004DD72F (E:/Steamworks/Starbound/git/starbound/source/game/StarRoot.cpp:174)
      004016D8 (E:/Steamworks/Starbound/git/starbound/source/client/StarClientApplication.cpp:302)
      009681DC (E:/Steamworks/Starbound/git/starbound/source/core/StarThread_windows.cpp:74)
      7749336A
      77CC9F72
      77CC9F45
    From Starbound.log (when running my test mod). Your mod produces the same error for every 'something-recipe' you use in a crafting recipe.
     
  9. -Soler

    -Soler Pangalactic Porcupine

    ohh that's weird.. i didn't had any problem and neither read the logs because it was ""working"" xD how did you managed to fix that?
     
  10. SmartBadger

    SmartBadger Scruffy Nerf-Herder

    I didn't :p

    It seems like the error report is not really an error - the code is complaining, but nothing is actually broken, really. I guess, unless the devs fix the error reporting, we just have to put up with a little console/log spam :)
     
    -Soler likes this.

Share This Page