Modding Help [Solved] Need help for learnBlueprintsOnPickup

Discussion in 'Starbound Modding' started by Shadox2.0, Aug 25, 2016.

  1. Shadox2.0

    Shadox2.0 Spaceman Spiff

    Hello , so i'm not sure how it work so i've add the line :

    "learnBlueprintsOnPickup" : [ "frozenwater", "ice", "iceblock", "icemachine", "snowflake", "smallsnowflake", "giantsnowflake", "snow", "snowball", "mediumsnowball", "largesnowball", "fancysnowman", "snowman", "giganticsnowball", "cryonicextract" ],

    In the tribalfridge.object of my modded item , and also the line :

    "learnBlueprintsOnPickup" : [ "tribalfridge" ],

    In the ice.material file ( it's enough for test the line).

    But even with that , i don't learn the blueprint when looting an ice block , and i dont know it yet because without /admin it don't appear in the craft list.

    Also the path in the target folder before packing should be good :

    ..... -frigo-avian (target folder)
    ................-tiles
    .........................-materials
    ................................. -ice.material
    ................-object
    .........................-avian
    ..................................-tribalfridge.object
    ..................................-tribal.recipe
    ..................................-(other tribal.things : metadata / icon / picture right,left ..)


    And the command :
    "D:\SteamLibrary\steamapps\common\Starbound\win32\asset_packer.exe" "D:\SteamLibrary\steamapps\common\Starbound\modage\frigo-avian" "D:\SteamLibrary\steamapps\common\Starbound\mods\tribalfridgemod1.0.pak"
     
  2. Naddox

    Naddox Cosmic Narwhal

    Need to see the entire code for the item and the code for your patch file. Please post it to a paste board like Pastebin so you don't get emotes or use code brackets like so.

    Code:
    [code]
    Code goes inside and doesn't make emotes :)
    [ /code]
    
     
    Shadox2.0 likes this.
  3. Shadox2.0

    Shadox2.0 Spaceman Spiff

    ok ^^

    ice.material
    Code:
    {
      "materialId" : 32,
      "materialName" : "ice",
      "particleColor" : [145, 186, 233, 255],
      "itemDrop" : "ice",
      "shortdescription" : "Ice",
      "description" : "Solid ice, tingly to the touch.",
      "glitchDescription" : "Observant. It appears this ice is naturally frozen.",
      "floranDescription" : "Frossty ssolid ice.",
      "novakidDescription" : "Buncha ice.",
      "footstepSound" : "/sfx/blocks/footstep_ice.ogg",
      "health" : 2,
      "category" : "materials",
      "damageTable" : "/tiles/flammableDamage.config",
      "learnBlueprintsOnPickup" : [ "tribalfridge" ],
    
      "renderTemplate" : "/tiles/classicmaterialtemplate.config",
      "renderParameters" : {
        "texture" : "ice.png",
        "variants" : 5,
        "lightTransparent" : false,
        "occludesBelow" : false,
        "multiColored" : true,
        "zLevel" : 1880
      }
    }
    
     
  4. Shadox2.0

    Shadox2.0 Spaceman Spiff

    and .object
    Code:
    {
      "objectName" : "tribalfridge",
      "colonyTags" : ["avian","avianvillage","cooking","storage"],
      "rarity" : "Common",
      "category" : "fridgeStorage",
      "price" : 180,
      "printable" : true,
      "description" : "Perfect for storing a lot of food and keeping it fresh, in a tribal theme.",
      "shortdescription" : "Tribal Fridge",
      "race" : "avian",
      "health" : 1.5,
      "learnBlueprintsOnPickup" : [ "frozenwater", "ice", "iceblock", "icemachine", "snowflake", "smallsnowflake", "giantsnowflake", "snow", "snowball", "mediumsnowball", "largesnowball", "fancysnowman", "snowman", "giganticsnowball", "cryonicextract" ],
    
      "apexDescription" : "A tribal wooden fridge. Hopefully it contains banana milkshake.",
      "avianDescription" : "A tribal wooden fridge. Ideally filled with drinks and snacks.",
      "floranDescription" : "Floran can sssmell meat inside.",
      "glitchDescription" : "Pleased. This wooden container includes ice, which helps keep food fresh",
      "humanDescription" : "I'm practically vibrating with excitement thinking about the possible contents.",
      "hylotlDescription" : "Underwater, refrigeration is easier. These devices are a clever substitute.",
      "novakidDescription" : "A plain ol' fridge.",
    
      "inventoryIcon" : "tribalfridgeicon.png",
      "orientations" : [
        {
          "image" : "tribalfridgeleft.png",
          "direction" : "left",
    
          "imagePosition" : [-8, 0],
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ],
          "collision" : "platform"
        },
        {
          "image" : "tribalfridgeright.png",
          "direction" : "right",
    
          "imagePosition" : [-8, 0],
    
          "spaceScan" : 0.1,
          "anchors" : [ "bottom" ],
          "collision" : "platform"
        }
      ],
    
      "objectType" : "container",
      "tooltipKind" : "container",
      "openSounds" : [ "/sfx/objects/fridge_open.ogg" ],
      "closeSounds" : [ "/sfx/objects/fridge_close.ogg" ],
      "slotCount" : 32,
      "uiConfig" : "/interface/chests/chest<slots>.config",
      "frameCooldown" : 5,
      "autoCloseCooldown" : 3600,
    
      "itemAgeMultiplier" : 0.0,
    
      "soundEffect" : "/sfx/objects/fridge_hum.ogg"
    }
    
    But i dont have patch file , what do you mean ? (im still pretty noob i've start 2 days ago)
     
  5. Naddox

    Naddox Cosmic Narwhal

    A patch file is used when you want to alter vanilla code. What you have done is referred to as a 'dirty edit' where you're replacing the code all together. When you do a dirty edit it makes your mod incompatible with any other mod that edits that same item.

    You're issue though is that you're adding the learnBluePrints on a material and not the actual item for ice. find "ice.item" and add the learnBluePrints code into that in a patch file. And I am going to suggest you check out my modding series on youtube so you can get a better grasp on modding Starbound and how to make a patch file. https://www.youtube.com/playlist?list=PL5U6FxzZh4JBnqwaE7lNFehB1dzaudIle
     
    Shadox2.0 likes this.
  6. Shadox2.0

    Shadox2.0 Spaceman Spiff


    Ok , i've search in unpacked asset folder but i've only found "icecrystal.item" :x , also i check a video you made but like my connection is very bad these days it take a year for loading (currently 2minute loaded lol) , but i'll wait.

    Edit : do you think i must create it ? (it for learn the craft of my modded fridge while looting a vanilla ice block)
     
    Last edited: Aug 25, 2016
  7. The | Suit

    The | Suit Agent S. Forum Moderator

    You must always have an item block for every material file . Also Learn Blueprints must be in the Item file and not Material file.
     
  8. Shadox2.0

    Shadox2.0 Spaceman Spiff

    So if i don't find the ice.item it mean i must create it myself ?


    And if it's for know the recipe since the begining i've read that on another topic :

    "Well you either need to add the recipes to player.config in blueprints tier 1"

    So if i add it to player.config like this it's ok ? (line 118)
    (it's the first time i edit this file so i havent add/remove/change something except the line 118 added , so you dont need to check everything ^^ , juste confirm the correct location)

    Thanks
     
  9. The | Suit

    The | Suit Agent S. Forum Moderator

    Since the code already lists an item file - if you make another it will cause an error.
    All recipes added to player.config will be "automatically" learned by the user from the very beginning of the game.
     
    Shadox2.0 likes this.
  10. Shadox2.0

    Shadox2.0 Spaceman Spiff

    But after search the ice.item file in the unpacked asset and the nearest file found was icecystral.item.

    I've try add them to player.config on 2 mod (tribal and medieval fridge) , for see if it work + for see if 2 player.config can work together.

    Edit : a fressssh screen from a fresh new floran character :
    [​IMG]

    + the primitive fridges didnt have the "new" tag (i prefer like that) , maybe due to some "floran" setting i've put in some line , so it seem all good ^^

    thanks for your help guys
     
    Last edited: Aug 25, 2016
  11. The | Suit

    The | Suit Agent S. Forum Moderator

    You either did not unpack all your files completely.
    Or you need to learn to search better.

    Capture.JPG
     
  12. Shadox2.0

    Shadox2.0 Spaceman Spiff

    Of cours the result arent the same if the research isnt good , people said me .item file , so i've enter "ice.item" in search field....so yeah , can't be found like that xD

    Atleast my unpacking was correct cuz i see it , but the change in player.config look easier (and seem work).

    Thanks you again , now i can post my third mod ^^ (Avian fridge)
     
  13. Shadox2.0

    Shadox2.0 Spaceman Spiff

    Hum , how can i make work multiple player.config together , i think i was in admin when testing (on the last screen) , i've juste create an avian for try tribal/primitive/medieval fridge and see the primitive (and it the first in the mod list) , so i think player.config from this mod overwrite player.config under , i'll check again the ebook x)
     
    Last edited: Aug 25, 2016
  14. The | Suit

    The | Suit Agent S. Forum Moderator

    Something tells me you don't know how to patch.
    http://community.playstarbound.com/resources/unofficial-modding-ebook-2-0.2930/
     
  15. Shadox2.0

    Shadox2.0 Spaceman Spiff

    I though patch was for dirty edit only so like i've make standalone mod i wasnt sure , i already read this and do the flashlight test but when trying to replace the defaut fridge by mine , but ok i'lll try again.


    So it mean i must create a player.config.patch ?

    If this case what i must put in it ? i see an example but its for an item , me its for a recipe :
    Code:
     [ { "op": "replace", "path" : "/shortdescription", "value": "Test Flashlight" }, { "op": "replace", "path" : "/lightColor", "value": [100,100,100] } ] 
    So i don't know what i should put in it.

    Edit i've find that on a forum (of cours i've change things) :
    Code:
    {
    "__merge" : [],
    "defaultBlueprints" : {
    "__merge" : [],
    "tier1" : [  
          { "item" : primitivefridge" },
         { "item" : primitiveminifridge" }
    ]
    }
    }
    
    (in pastebin if you prefer http://pastebin.com/SbvGvtnt )
     
    Last edited: Aug 25, 2016
  16. Shadox2.0

    Shadox2.0 Spaceman Spiff

    I've try something like that :

    Tribal fridge mod:
    ...-frigo-avian (target folder)
    ................-object
    .........................-avian
    ..................................-tribalfridge.object
    ..................................-tribal.recipe
    ..................................-(other tribal.things : metadata / icon / picture right,left ..)
    ................-player.config (i've check if the file extension was really PATCH and not CONFIG , and it's the case)

    content of player.config.patch :
    Code:
    {
    "__merge" : [],
    "defaultBlueprints" : {
    "__merge" : [],
    "tier1" : [
          { "item" : tribalfridge" },
         { "item" : tribalminifridge" }
    ]
    }
    }
    
    (some things are green (everything except the line with " { "item" : tribalfridge" }," ), and i've heard something about line used as note , without any effect , maybe something is wrong in these line and almost everything count as note ? if its the case how can i fix it please ?)

    And it's the same for medieval and primitive fridge mod.

    After packing them and starting the game i've a crahsh before main menu x)

    (better for see) :
    [​IMG]
    i think some space are missing...also when i said i've started 2-3 days ago , i dont speak about modding only , i speak about modding , notepadd++ and coding and everything xD

    Edit 2 : maybe like that ?
    Code:
    {
      "__merge" : [],
      "defaultBlueprints" : {
        "__merge" : [
          []
        ],
        "tier1" : [
        { "item" : "tribalfridge" },
        { "item" : "tribalminifridge" }
        ]
      }
    }
    
    edit 3 , ok all is black when i put the code above , but when i save it as a patch file ("player.config.patch") , some line turn green :
    [​IMG]

    I dont know why x(
     
    Last edited: Aug 25, 2016
  17. The | Suit

    The | Suit Agent S. Forum Moderator

    You should read the book.
    Merge, has not been used for more than a year now.
     
  18. Shadox2.0

    Shadox2.0 Spaceman Spiff

    I see that :
    Code:
    [ { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "fo_cube" } } ]
    
    but its for learnonpickup no ? i'll try

    Edit : it look good like that i'll try http://pastebin.com/RLV8isqK

    Edit again : it look good in notepad++ but the game crash before main menu , and when i check log i have more than 10k line with all recipe broken , a sample :
    [16:08:01.027] [Error] Could not instantiate item '[devstatuegeorge, 1, {}]'. (AssetException) Error loading asset /player.config:beamGunConfig
    [16:08:01.030] [Error] Could not load recipe /recipes/furniturestore/devstatuegeorge.recipe: (AssetException) Error loading asset /player.config:beamGunConfig

    So something is wrong with my player.config.patch but idk what , i investigate ^^
     
    Last edited: Aug 25, 2016
  19. Mackinz

    Mackinz The Waste of Time

    Please post your log file.
     
  20. Shadox2.0

    Shadox2.0 Spaceman Spiff

    ok i've more than 13.000 line and even when i take a pack of 3000 its too big for pastebin so i send you the log itself (file at bottom of this post).

    But i'm almost sure its a newbie error in the player.config.patch

    Also one of my player.config.patch if never it can help you to help me ^^
    Code:
    
    [
      {
        "op":"add",
        "path":"/defaultBlueprints/tier1/-",
        "value":{"item":"medievalfridge"}
      },
      {
        "op":"add",
        "path":"/defaultBlueprints/tier1/-",
        "value":{"item":"medievalminifridge"}
      }
    ]
    
    
     

    Attached Files:

Share This Page