Modding Help Make Weapon Craftable (T1) - And Related Issues (Solved)

Discussion in 'Starbound Modding' started by ImHereForTheMods, Feb 9, 2017.

  1. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    So, as the title says, I would like to know how to make a weapon craftable, right off, when you play a character (specifically the tier 1 variant)
    I got it working so that as you pick up spear 1, spear 2 becomes craftable and so on, however, how do I make spear 1 craftable in the first place?

    Thanks in advance!

    =)
     
  2. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Then again, or make it craftable once they pick up a certain ore?
     
  3. IHart

    IHart Scruffy Nerf-Herder

    to have it immediately for anyone patch it into player.config. immediately per race patch into their species file.
    you already know how to make it craftable by ore pickup. the same code you have in spear 1 that points to spear 2 patch into your desired ore pointing at spear 1.
     
  4. Cyel

    Cyel Scruffy Nerf-Herder

    Last edited: Feb 10, 2017
    IHart likes this.
  5. MetaFace

    MetaFace Guest

    Two parts to it, the patch and recipe...
    1.) { "op" : "add", "path" : "/defaultBlueprints/tier1/-", "value" : { "item" : "itemname" }},
    2.)
    Code:
    {
        "input" : [
            { "item" : "itemusedtobuild", "count" : 1 }
        ],
        "output" : { "item" : "item name", "count" : 1},
        "groups" : [ "plain", "wheretheitemwouldbefound", "all" ]
    }
    that's about it really, that's how my mod works right now, you can open the crafting menu from the very beginning (without bench or anything) and build my items...
     
  6. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Hello my friend. Thanks for your help, once again, with yet another problem!

    That's what I thought too, but it just doesn't seem to show up without admin mode on...

    Here is my recipie file :
    Code:
    {
      "input" : [
        { "item" : "ironbar", "count" : 4 }
      ],
      "output" : { "item" : "aviantier1axebasic", "count" : 1 },
      "groups" : [ "craftinganvil", "weapons", "all" ]
    }
    and my patch file :
    Code:
    [ {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1axebasic"} } ]
    I recently (30 mins ago from when I am posting this) created a flying augment, using the exact same recipie set-up, and patch file set-up as this, and the augment shows up for crafting just fine, in survival.

    Only difference between this and that is that I have the recipie file in different places. For the axe, in : /recipes/weapons/unique and for the augment, well, just in the main folder.
    I guess I could try moving the recipie and see if that works, but will see if it does.
     
  7. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    What I'm still confused about though is how to patch it into species file. In the other topic, this was said.

    and that is helpful, but, I didn't really understand it fully, which I guess I should have said, but what I didn't understand specifically, is this part:

    Code:
    [ { "op": "add", "path": "/defaultBlueprints/tier1/-", "value":"aviantier1daggerbasic" } ]
    This code looks identical to the code for the player.config, So, is it done into a different file, perhaps a file called avian.species.config, in a folder "species" in the mod? Or?
    That I do not understand. Because, I already have the code :

    [ {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1daggerbasic"} } ]

    in the player.config, so, that is not any different than what I have now, so, if that was true, then it should be already set to avian specific?
    So was just confused about that.

    Hopefully that didn't come off as a bit rude, and I do appreciate your trying to help me out. And hopefully, I'm not being totally dense, and missing something obvious here. =P
     
  8. Cyel

    Cyel Scruffy Nerf-Herder

    Wellyes, as I said on the line above, the patch I mentionned would be for the /species/avian.species file

    The player.config file is applied to all characters, while the /species/x.species is only applied to the specific specie the character is. The code's identical because the two files follow the same structure
     
  9. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Yes, but what do I do, inside my mod, to patch into that species file? Do I create a new file, named avian.species.config, or something?
    Or would I rename what I have (player.config) it to avian.config?

    Thanks again.
     
  10. Cyel

    Cyel Scruffy Nerf-Herder

    Oh, sorry, I missunderstood

    To patch something, you need to place to recreate the path going into that item inside your mod (just empty directories) up to the file you wanna patch, and place your .patch file there. For example, if you wanted to patch \items\active\weapons\melee\hammer\uncommonhammer.activeitem, you'd need to create the same \items\active\weapons\melee\hammer\, and place your uncommonhammer.activeitem.patch in there.

    In your case you simply need to create a species directory in your mod's root and place the avian.species.patch file in there, with the mentionned patch
     
  11. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    No problem, perhaps I wasn't exactly clear.
    Thanks for the info!

    Putting avian.species (renamed player.config) in a folder called species, seems to have done the trick!

    However, still have the problem that 1st weapon (tier 1) ain't craftable.

    Once again:

    Here is my recipie file :
    Code:
    {
    "input" : [
    { "item" : "ironbar", "count" : 4 }
    ],
    "output" : { "item" : "aviantier1axebasic", "count" : 1 },
    "groups" : [ "craftinganvil", "weapons", "all" ]
    }
    and my patch file :
    Code:
    [ {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1axebasic"} } ]

    All looks right, but... T1 is not craftable in survival.

    Thanks again for all the help!
     
    Last edited: Feb 11, 2017
  12. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Ohh... I think I get it now. I missed that bit yesterday. (Yes, I'm not the bightest at times) So, like I patched into the species file, I can do that for the ore's file.
    I'll give that a go and see how it works out!

    Thanks again!
     
  13. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Okay, I must be doing something wrong, because the recipe still doesn't show up, even on newly created characters.

    I made a patch to the ironore.item that looks like this :
    Code:
    [
        {"op":"add","path":"/learnBlueprintsOnPickup","value": [ "aviantier1axebasic" ] }
    ]
    and it's filepath is : /aviantier1axe/items/generic/crafting/ironore.item.patch

    then I got the avian.species patch :
    Code:
    [ {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1axebasic"} } ]
    and it's filepath is : /aviantier1axe/species/avian.species.patch

    then I got the recipe :
    Code:
    {
      "input" : [
        { "item" : "ironbar", "count" : 4 }
      ],
      "output" : { "item" : "aviantier1axebasic", "count" : 1 },
      "groups" : [ "craftinganvil", "weapons", "all" ]
    }
    
    and it's filepath is : /aviantier1axe/aviantier1axebasic.recipe (so, it's right in the folder of the item, no special filepath, not sure if that's a problem, but I did the exact same thing with an augment mod, and it shows up for crafting)

    So, where am I going wrong? Could it be incorrect filepath useage, incorrect spelling? I really don't know.

    I also tried referencing Fracking Universe, and their setup seems similar.

    Thanks in advance.
     
    Last edited: Feb 11, 2017
  14. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Okay, so, I decided to try something, and I just removed a couple of the axes from the huge pack of avian weapons I got (about 60) and, with just those two added, they show up for crafting. Which, is rather weird.

    Not sure why that would be...

    If anyone has any ideas, I'm listening.

    But until then, gonna mess about with it some more I suppose, and see if I can't figure out what's up with it.\

    I do have about 60 metadata files though, so not sure if that'd have something to do with it.

    Or could be my layout, as for the mod, I don't have just all the recipes for all the axes in a folder, but each axe has a folder within it that has it's own recipe.
     
    Last edited: Feb 11, 2017
  15. Cyel

    Cyel Scruffy Nerf-Herder

    Is your log file mentionning anything about recipes / multiples of the same item?

    60 "metadata files"? you mean the mod's _metadata file? Why would you have 60 of them?
     
  16. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    The closest I have to an error is this : [15:51:29.026] [Info] Root: Detected unnamed asset source at '..\mods\megamod'
    (Megamod is the name of my pack of weapons, basically the main folder is called megamod, and then i have folders for the races, currently only an avian folder, which has folders for each type of weapon, hammer, axe, etc)

    As for why I have 60 metadata files, I couldn't tell ya.. Just thought I needed them I guess.

    Maybe I'll try just putting 1 metadata in the megamod folder.

    Also, quick question, does each weapon need it's own modinfo file? Cause, I have 60 of those too.
     
    Last edited: Feb 12, 2017
  17. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    I moved some stuff about and changed it up, and that seems to have done it, as far as making it specific, to a race.

    The patch for pickup of iron ore to trigger the t1 recipies still appears to not work though, so gonna keep working on that.

    Attached is the updated zip in case you have suggestions of how to fix the new issue (pickup of iron ore does not trigger t1 axe recipe, which is my test subject atm. )

    So, a debriefing, all avian t1's are now craftable right off the bat by avian players exclusively, however the ironore.item.patch:

    Code:
    [
        {"op":"add","path":"/learnBlueprintsOnPickup","value": [ "aviantier1axebasic" ] }
    ]
    Pickup of iron ore, does not cause a recipe to be learned for the t1 avian axe (test subject)
    Which I guess is ok, as you would have the recipe already anyway, but just to make it more polished would like to get that to work if someone knows how.

    Thanks again!
     

    Attached Files:

    Last edited: Feb 12, 2017
  18. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Ok, so, this should probably be a W.I.P topic by now... ha..
    Anyways, I did some file clean-up and re-formatting, removing some unneccessary files, such as 59 .modinfos and like 50 player.config files.

    Everything seems to work pretty alright, I guess, not exactly as planned, but I guess it'll do, for now.
    The recipe for the 2nd tier is learned on pickup, by any race, whereas I'd like it to be just exclusively for avians.

    I tried using this script / method :
    Code:
    [
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1axebasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier2axebasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier3axebasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier4axebasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier5axebasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier6axebasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier7axebasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier8axebasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier9axebasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier10axebasic"} },
    
    
    
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1daggerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier2daggerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier3daggerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier4daggerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier5daggerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier6daggerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier7daggerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier8daggerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier9daggerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier10daggerbasic"} },
    
    
    
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1hammerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier2hammerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier3hammerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier4hammerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier5hammerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier6hammerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier7hammerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier8hammerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier9hammerbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier10hammerbasic"} },
    
    
    
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1spearbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier2spearbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier3spearbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier4spearbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier5spearbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier6spearbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier7spearbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier8spearbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier9spearbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier10spearbasic"} },
    
    
    
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1shortswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier2shortswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier3shortswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier4shortswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier5shortswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier6shortswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier7shortswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier8shortswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier9shortswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier10shortswordbasic"} },
    
    
    
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier1broadswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier2broadswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier3broadswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier4broadswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier5broadswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier6broadswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier7broadswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier8broadswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier9broadswordbasic"} },
    {"op":"add","path":"/defaultBlueprints/tier1/-","value":{"item":"aviantier10broadswordbasic"} }
    ]
    but then all recipes became immediately craftable for some reason, instead of tiered, so I reverted.

    So I'm gonna have a go at the "consumeOnPickup" method mentioned here:
    http://community.playstarbound.com/threads/make-weapon-tiered-dagger-mod-solved.129962/
    If I can figure out how to go about that.

    Anyways, if anyone can figure out, as well, why the learn 1st tier recipe on pick-up of iron ore isn't working, I'd really appreciate that.
    Attached is the my latest edit of the pack.

    Just keeping you updated on the condition of my problems. I'm sure you need that.

    Thanks for your help / support with this project!
     

    Attached Files:

    Last edited: Feb 12, 2017
  19. ImHereForTheMods

    ImHereForTheMods Cosmic Narwhal

    Hate to keep posting like this, but...
    Okay, just so ya'll know, this is why I'm having problems.
    Attached (patch.png) is an image showing that my ironore.patch is indeed valid, showing it working, just as it should.
    That is, when tested with : http://json-schema-validator.herokuapp.com/jsonpatch.jsp

    Which, by the way I found out about after reading this :
    http://community.playstarbound.com/threads/basic-patching-now-with-path-guide-v1-9.84496/
    and this :
    http://community.playstarbound.com/resources/unofficial-modding-ebook-2-0.2930/

    So, it should work, but, it doesn't. Maybe the species.patch and ironore.patch conflict somehow / cancel one out?
    I don't know. All I know is that, for some odd reason, beyond any reasoning I can find, it just doesn't work.

    ironore.item.patch file :
    Code:
    [
        {"op":"add","path":"/learnBlueprintsOnPickup","value": [ "aviantier1axebasic", "aviantier1spearbasic", "aviantier1hammerbasic", "aviantier1shortswordbasic", "aviantier1broadswordbasic", "aviantier1broadswordbasic"] }
    ]    
    Thanks in advance for any assistance you can give. =)
     

    Attached Files:

  20. IHart

    IHart Scruffy Nerf-Herder

    what is not working.
     

Share This Page