Config files - Angry Koala

Discussion in 'Starbound Modding' started by michealv, Dec 24, 2013.

Thread Status:
Not open for further replies.
  1. michealv

    michealv Industrial Terraformer

    Hey All,

    I found it really difficult to understand bartwe's explanation of the new config file settings.

    Basically the confusion stems from his example he gives us, doesn't actually "add item and merge recipe list" , it more or less overwrites it with what you put into the overwritten tier.

    I'm quite shocked no one in the community has come out and put a SIMPLE EXAMPLE up like this...feel free to slap me later...

    If your after a quick code on how to "add item and merge recipe list" below is an example that is working for me.

    Adding an item, and merging the recipe list
    Code:
    
    {
    "__merge" : [],
           "defaultBlueprints" : {
    
                "tier1" : [
                    { "item" : "item_name1" },
                    { "item" : "item_name2" }
    
                ]
          }
    }
    
    Replacing an entire T1 recipe list, and adding ONLY items you specifcy
    Code:
    
    {
    "__merge" : [],
           "defaultBlueprints" : {
    
                 "__merge" : [
                     [ "overwrite", "tier1" ]
                ],
    
               "tier1" : [
                     { "item" : "item_name1" },
                     {"item" : "item_name2"}
    
               ]
          }
    }
    
    Add 1 recipe to tier 1,
    Overwrite all of tier 2 with 1 recipe,

    Remove tier 3,
    Change base health to 500,

    Adjust revive cost in pixels to 10% rather than 30% (provided by westeller)
    Code:
    
    {
      "__merge" : [],
    
       "defaultBlueprints" : {
          "__merge" : [
               ["overwrite", "tier2"],
               ["delete", "tier3"]
           ],
           "tier1" : [
              { "item" : "mycoolnewitem"  }
             ],
           "tier2" : [
              { "item" : "mycoolnewitem2" }
              ]
           },
    
       "maxHealth" : 500.0,
    
       "reviveCost" : {
         "percentile" : 10.0
        }
    
    }
    
    Example Screenshot

    [​IMG]
    Edit 5: Protip, don't use Indents in coding sections...what a mess...
    Edit 4: Added screenshot of a working example.
    Edit 3: Added example from westeller
    Edit 2: Multiple actions in the same .config is beyond me, asking for help for an example
    Edit: Tidied up example 1, thanks to Westeller
     
    Last edited: Dec 24, 2013
    Nightmares, The | Suit and Westeller like this.
  2. Westeller

    Westeller Space Penguin Leader

    The second __merge in your first example is unnecessary. Will work without it.



    Code:
    {
      "__merge" : [],
      "defaultBlueprints" : {
        "tier1" : [
          { "item" : "item_name1" },
          { "item" : "item_name2" }
         ]
       }
    }
    
    May I recommend you use a bit of spacing like I did here? I don't know about you, but my eyes roll back into my head when I try to read this stuff without the spacing.
     
    Last edited: Dec 24, 2013
    michealv likes this.
  3. michealv

    michealv Industrial Terraformer

    Thanks I'll fix that up.

    I basically just used what bartwe put up, and tidied it up a bit.
     
  4. The | Suit

    The | Suit Agent S. Forum Moderator

    Great tut - sorely needed
     
  5. Campaigner

    Campaigner Giant Laser Beams

    So we add a player.config with this layout and our mod items' IDs, and that's it? No editing the main config file?
     
  6. The | Suit

    The | Suit Agent S. Forum Moderator

    Exactly
    Its about injecting code into the file now
     
  7. Campaigner

    Campaigner Giant Laser Beams

    That's amazing. Can't believe it didn't start this simple.
     
  8. Dkm2

    Dkm2 Subatomic Cosmonaut

    So what do I do for additional tiers? Like this?:

    Code:
    {
        "__merge" : [],
          "defaultBlueprints" : {
            "tier1" : [
                           { "item" : "item_name1" },
                           { "item" : "item_name2" }
                          ]
            "tier2" : [
                           { "item" : "item_name1" },
                           { "item" : "item_name2" }
                          ]
                     }
    }
    
     
  9. CaptainDingo

    CaptainDingo 2.7182818284590...

    Sadly this isn't working at all.

    Can someone provide an example of what an entire, working player config file that adds a new item recipe looks like?

    Nothing I do is working anymore. I wish they just left it the way it was, honestly.
     
  10. michealv

    michealv Industrial Terraformer

    Yep that's fine, it will add items to T2 that way as well.

    Here is an exact copy of mine, named player.config located in the /Modname/ folder

    Code:
    {
      "__merge" : [],
      "defaultBlueprints" : {
        "__merge" : [
            
        ],
        "tier1" : [
        { "item" : "megaenhancedbandage" },
            { "item" : "superenhancedbandage" },
            { "item" : "enhancedbandage" },
            { "item" : "chest_copper" },
            { "item" : "chest_iron" },
            { "item" : "chest_gold" },
            { "item" : "joint" },
          
            // New Weapons
            { "item" : "CopperBroadSword" },
            { "item" : "IronBroadSword" },
            { "item" : "SilverBroadSword" },
            { "item" : "GoldBroadSword" },
            { "item" : "testgun" },
          
            // New ore types
            { "item" : "shinycopperore" },
            { "item" : "shinyironore" },
            { "item" : "shinysilverore" },
            { "item" : "shinygoldore" },
            { "item" : "cokeore" },
          
            // New Crafting benches/items
            { "item" : "cleaningtable" },
            { "item" : "medicalbay" },
            { "item" : "rollingstation" }
    
        ]
      }
    }
      
    Edit: Corrected missing bracket to avoid confusing people
     
    Last edited: Dec 24, 2013
  11. CaptainDingo

    CaptainDingo 2.7182818284590...

    Still nothing.

    Am I supposed to be doing something differently in my recipe file or something? I'm confused on about 100 different levels. I did this all successfully before Angry Koala.

    Edit: Actually, now Starbound just sticks on the loading screen forever. Bleugh.
     
    Last edited: Dec 24, 2013
  12. Karmos

    Karmos Space Penguin Leader

    Word. I'm also facing issues. I understand the new merging process, and I understood the old .modinfo / bootstrap.config interaction, but I'm not sure I understand the entire installation process any more. I'm still trying to figure it out on my own, but a new, complete tutorial would be helpful.
     
  13. Kyrosiris

    Kyrosiris Scruffy Nerf-Herder

    Can you provide yours? Because mine looks just like @michealv's, sans the pretty formatting, and works without issue.

    For your benefit, it's below:

    Code:
    {
      "__merge" : [],
      "defaultBlueprints" : {
      "tier1" : [
      { "item" : "bonfire" },
      { "item" : "estusflask" }
      ],
      "tier2" : [
        { "item" : "estusflaskplus1" }
      ],
      "tier4" : [
        { "item" : "estusflaskplus2" }
      ],
      "level33" : [
        { "item" : "estusflaskplus3" }
      ],
      "level35" : [
        { "item" : "estusflaskplus4" }
      ],
      "level37" : [
        { "item" : "estusflaskplus5" }
      ]
      }
    }
    
     
  14. Karmos

    Karmos Space Penguin Leader

    It may have been because there was an initial brace missing in michaelv's example. I copy-pasted uncritically and that caused my game to crash on startup.
     
  15. Stox

    Stox Poptop Tamer

    Wow, thanks Michealv! Looks like I wasn't the only one confused about the new merge command. I award you 100 points!
     
  16. Sevynn

    Sevynn Poptop Tamer

    Having this same problem. Starbound stays on the loading screen now. I understood how it worked before and the info here really helps as well. But there must be something I'm not doing right ..
     
  17. Kyrosiris

    Kyrosiris Scruffy Nerf-Herder

    Again, it would really help for troubleshooting if you provide your attempted merging player.config so more eyes could be on it.

    If you don't want to, at least pass it through something like JSONlint and make sure it's correctly formatted JSON.
     
  18. michealv

    michealv Industrial Terraformer

    Where is the missing brace? im trying to locate it and will correct it ASAP

    Edit: Both examples are working for me, its not crashing my game and i've copy / pasted from my examples above, not sure what issues your experiencing sorry.
     
    Last edited: Dec 24, 2013
  19. Sevynn

    Sevynn Poptop Tamer

    Here's what mine looks like :

    Code:
        "tier1" : [
        {
      "__merge" : [],
      "defaultBlueprints" : {
        "__merge" : [],
        "tier1" : [ { "item" : "vanitystation" } ]
      }
    }
    
    [​IMG]

    Go easy on me if I've done it like a complete noob lol...For whatever reason my mind gets boggled with this even though it seems so easy to do. ;w;
     
  20. Kyrosiris

    Kyrosiris Scruffy Nerf-Herder

    Okay, yeah, it looks like you're just trying to inject little bits into player.config.

    You don't need the entire body of player.config anymore, that's the whole point. Assuming you want to add item "vanitystation", this will do you just fine:

    Code:
    {
      "__merge" : [],
      "defaultBlueprints" : {
      "tier1" : [
      { "item" : "vanitystation" }
      ]
      }
    }
    
    That's literally all you need. ^^
     
Thread Status:
Not open for further replies.

Share This Page