Modding Help Questions about merging planetgen.config

Discussion in 'Starbound Modding' started by Karmos, Dec 29, 2013.

  1. Karmos

    Karmos Space Penguin Leader

    Hi all,

    I'm experimenting with a new underground minibiome, but I can't get my mod's planetgen.config to merge right. I'm not getting any errors, but my minibiome isn't showing up (and I've disabled all the others for testing).

    Has anyone had success with this? I'd appreciate your insight.

    Here's what I have in my mod's planetgen.config:
    Code:
    {
      "__merge" : [],
      "undergroundLayers" : [
        {
          "biomes" : [],
          "detachedBiomes" : [ "newcave" ],
          "terrain" : []
        },
        {
          "biomes" : [],
          "detachedBiomes" : [ "newcave" ],
          "terrain" : [ ]
        },
        {
          "biomes" : [],
          "detachedBiomes" : [ "newcave" ],
          "terrain" : []
        }
      ]
      }
     
  2. Josiah_

    Josiah_ Void-Bound Voyager

    what does your log file say? I know I'm trying to modify oredistributions, and it doesn't seem to want to replace the default with what I specify;

    Error: Exception caught in Thread Async root loader: StarException: Named config function 'surfaceOres' defined twice, second time from /oredistributions.configfunctions

    it recognizes what I've written, but it doesn't replace it. Does your biome generate if you paste it into the default planetgen instead of merging it in the mods folder? I know that my code works if it's in the default oredistribution, but not in the mods folder...

    Maybe it's a bug with the merge function?
     
  3. Karmos

    Karmos Space Penguin Leader

    Yeah, my biome generates when pasted into the default planetgen. I remember someone saying that __merge only works with .config files, which is, I imagine, why you're having trouble with the .configfunctions file. (I could be wrong.) I guess the only workaround would be to make a set of substitute distributions rather than edit the existing ones found in the .configfunctions file, which is incredibly unwieldy given that you'd have to edit every reference to the old ore distributions.

    Nothing unusual in the log file. Just doesn't register the new biome.
     
  4. Karmos

    Karmos Space Penguin Leader

    Alternatively, you could just copy the entire old .configfunctions file, make your alterations, and include it in the mod for bootstrap.config to switch with the original. It's not precise, and it'll cause conflicts with anyone else playing with that file, but, given the current limitations, I imagine anyone else playing with that file is also doing a full substitution.
     
  5. Karmos

    Karmos Space Penguin Leader

    I've updated my planetgen.config, but to no effect.
    Code:
    {
      "__merge" : [],
      "undergroundLayers" : [
        { "__merge" : [],
          "biomes" : [],
          "__merge" : [],
          "detachedBiomes" : [ "icecrystalcave" ],
          "terrain" : []
        },
        { "__merge" : [],
          "biomes" : [],
          "__merge" : [],
          "detachedBiomes" : [ "icecrystalcave" ],
          "terrain" : [ ]
        },
        { "__merge" : [],
          "biomes" : [],
          "__merge" : [],
          "detachedBiomes" : [ "icecrystalcave" ],
          "terrain" : []
        }
      ]
      }
     
  6. Karmos

    Karmos Space Penguin Leader

    Apparently I was wrong about __merge and non-.config files. See bartwe's explanation here.
     

Share This Page