Tutorial Basic Patching Now With Path Guide [v1.9]

Discussion in 'Starbound Modding' started by The | Suit, Sep 19, 2014.

  1. Mackinz

    Mackinz The Waste of Time

    If you want to add a bunch of new recipes, then you won't have to patch as they are all new. You only have to patch when you want to change something about a vanilla file, or if you want to make a mod of a mod.
     
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    I think he means patching player.config
     
  3. Lazy Joe

    Lazy Joe Scruffy Nerf-Herder

    nope, dont know anything about programming at all, all i have been doing in modding in the last 2 or 3 days has only been copying(pasting words and numbers, and see what others do and try to mimic it.

    but i guess with excel and notepad++ i can still manage it somehow.

    another question though, why does it have to be a patch? why is "adding the recipes to player.config" not working?

    the weird thing is that it works sometimes, and sometimes not, i have been adding tons of items to player.config already, but from time to time i meet cases that will just not do what i want it to do.
     
  4. Mackinz

    Mackinz The Waste of Time

    Yeah, maybe, but there are ways to integrate new recipes without patching player.config. Plenty of ways. From the Terramart, to the Campfire, to just plain ol' learnBlueprintsonPickup. Well, for the last one you need at least one patch, but that is super-easy.
     
    Shadow Wolf TJC likes this.
  5. Lazy Joe

    Lazy Joe Scruffy Nerf-Herder

    How do you do that?

    I am working on a mod that can allow me to craft most items in game from nothing to minimum input, so i dont have to go find a floran settlement first if i plan to build a floran themed treehouse.

    I just noticed the "learn blueprints on pickup" today few hours earlier, but have not done anything with it yet.
     
  6. The | Suit

    The | Suit Agent S. Forum Moderator

  7. Lazy Joe

    Lazy Joe Scruffy Nerf-Herder

    Although i suck at it, i still enjoy making that possible little by little.

    Not sure if thats normal, but all the changes i have done sofar are also working on multiplayer, and /admin fails there i think.

    So as long it's possible, i still prefer it this way.

    The thing with /admin is also that i get the entire list of items (and i still have no idea how those roofs and walls of floran buildings are called, ot they arent even in the list, because of being non-craftable)
    To be able to use /spawnitem well, i need to know all the item names first.

    the huge amount of items lags me pretty hard, and i still wanna craft items that arent crafted usually, like..... uh.... unrefined woods :D
     
  8. The | Suit

    The | Suit Agent S. Forum Moderator

  9. Mackinz

    Mackinz The Waste of Time

    For example, you could copy, IDK, the campfire.object, change the object so it doesn't cause conflicts (rename, etc), and, finally, change the "recipeGroup" value to something you want to use, then add a bunch of recipes using that same value under their "categories".

    Of course, that requires obtaining that item in the first place... Could be done with another recipe, now that I think about it. Just gotta put it in the Terramart/Infinity Express, or add it to the Campfire's recipes.
     
  10. Lazy Joe

    Lazy Joe Scruffy Nerf-Herder

    So basically, i make a .recipe file for each of those items

    and i add every single one of them into my player.config.patch

    right?
     
  11. The | Suit

    The | Suit Agent S. Forum Moderator

    Well if you want the recipes to be known by default - yes.
    Otherwise if you want to explore and get them - do it mackinz way.
     
  12. Lazy Joe

    Lazy Joe Scruffy Nerf-Herder

    Will the file still work if i write it like:

    { "input" [ { "item" : "....", "count" : * } ], "output" { "item" : "....", "count" : * }, "groups" [ "...", "..." ] }

    instead of like this?

    {
    "input" [
    { "item" : "....", "count" : * }
    ],
    "output" { "item" : "....", "count" : * },
    "groups" [ "...", "..." ]
    }

    because if it's ok to do it in one line, then i can just paste all the item names into excel and add a column before and after, which contain the rest of the recipe text.
     
  13. The | Suit

    The | Suit Agent S. Forum Moderator

    Ya single line is fine. Just make sure the commas and brackets are in the appropriate places.
    We break it into multiple lines for sake of legibility.
     
    Shadow Wolf TJC likes this.
  14. Lazy Joe

    Lazy Joe Scruffy Nerf-Herder

    ok cool, i can get all the recipes in one file then

    getting rid of the tab-space between the 3 columns that excel would give us

    all i need to figure it out now is to find a way to make each line a separated .recipe file....
     
  15. donpapillon

    donpapillon Scruffy Nerf-Herder

    Is it possible for a patch to test the value previously added by another patch?

    I'm trying to make an A.I. patch that works with custom races in general. The custom race adds several values to the game through patches, and my custom A.I. was supposed to replace some of the the values added by the custom race. The thing is, when I use the replace op targeting the name of the custom race it doesn't find anything. It may be searching the original game assets, or it may be loading before the custom race mod. Either way I don't know how to solve this.
     
  16. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    Is there a way to get mods to require other mods to be loaded before they themselves are loaded. Does Starbound support it? I think I saw something like this being demonstrated with the Tabula Rasa mod.
     
  17. The | Suit

    The | Suit Agent S. Forum Moderator

  18. Fruzstrated

    Fruzstrated Subatomic Cosmonaut

    You said you dont know how to batch add items to an already existing array.
    Formating it like this works for me.

    Code:
    [
        {"op": "add", "path": "/defaultBlueprints/tier1/-", "value": { "item": "armor_chest" }},
        {"op": "add", "path": "/defaultBlueprints/tier1/-", "value": { "item": "armor_legs" }}
    ]
    
     
    Shadow Wolf TJC likes this.
  19. Olxinos

    Olxinos Scruffy Nerf-Herder

    I don't know if it's what he was thinking about, the result is the same (you add two elements at the end of the array), but you have to use two add operations.
    I feel like he was thinking of something less verbose, which could have looked like that (it's an illegal patch don't use this, it doesn't work: "splice" operation doesn't exist, and no operation uses or requires a "list"):
    Code:
    [
      {
        "op":"splice",
        "path":"/defaultBlueprints/tier1/-",
        "list":
        [
          { "item": "armor_chest" },
          { "item": "armor_legs" }
        ]
      }
    ]
    It's just a convenience/readability issue (especially relevant when you want to add a couple dozens of elements).
     
  20. PoeShmoe

    PoeShmoe Space Spelunker

    I'm a bit slow when it comes to coding... So let's say I want to replace an in-game music file, such as the title menu music, with something not existing in the base game. I can't code at all, but I was wondering of somebody could help me. Maybe just make a string or something to...

    Replace "titlemenumusic.ogg" contained in this vanilla game folder "/assets/music/"
    with "[Filename].ogg" contained in this other folder "/mods/[modname]/assets/music/"
     
    Last edited: Feb 14, 2015

Share This Page