Modding Help Dungeon that should appear on surface is stuck below

Discussion in 'Starbound Modding' started by xaliber, Feb 19, 2017.

  1. xaliber

    xaliber Scruffy Nerf-Herder


    I was trying to salvage an old dungeon mod. The dungeon is kinda old that it doesn't use Tiled but still PNG image. One of the dungeon included in this mod is this base dungeon. I've made it compatible with Starbound 1.2 (changing objects to appropriate object and NPCs to appropriate NPCs), but I haven't been successful to solve a weird bug: the dungeon being stuck under surface instead on the surface.

    It looks like this:


    I have compared to other dungeons and there is nothing really peculiar that made it to spawn below the surface. Can someone help me finding the problem?

    This is what I have in the terrestrial_worlds.config.patch

    {"op" : "replace", "path" : "/planetTypes/garden/layers/surface/dungeonCountRange", "value" : [3, 3] },
    {"op" : "add", "path" : "/planetTypes/garden/layers/surface/dungeons/-", "value" : [1.0, "uscmbase"] }

    Attached are the dungeon files.

    Attached Files:

    Last edited: Feb 19, 2017
  2. The | Suit

    The | Suit Agent S. Forum Moderator

    You have to designate air on top part.
    Make sure the top part is designated as air and not ground.
  3. xaliber

    xaliber Scruffy Nerf-Herder

    Ooooh just realized that... so the solution is in the image after all. All this time I'm trying to look at the codes. Going to try that.

    Okay just went after quick test, apparently they're still below the ground. The difference is now they look like this.


    Looks quite neat tho as an underground settlement, but not really what I'm trying to do.

    Do I have to make the purple color taller? I.e. changing the image height. Or is there something else to do?

    This is one of the dungeon file attached.

    Attached Files:

    • 10.png
      File size:
      1.5 KB
  4. xaliber

    xaliber Scruffy Nerf-Herder

    Oookay so I haven't found a way... this is frustrating.

    Can you please clarify what do you mean by that? How do you designate air on top? I've colored the PNG to pink but it's still the same.

    I also have this
          "value" : [0, 0, 0, 255],
          "rules" : [ [ "worldGenMustContainAirBackground" ], [ "allowOverdrawing" ] ],
          "brush" : [ [ "clear" ] ]
    But... the dungeon still spawns below ground.
  5. The | Suit

    The | Suit Agent S. Forum Moderator

    Look at the vanilla file, dungeon \ microdungeon \ random encounter \ glitch
  6. xaliber

    xaliber Scruffy Nerf-Herder

    Okay, I've found the culprit!

    I have to recheck vanilla dungeon and re-read this guide: over and over again, but now I understand.

          "value" : [255, 255, 255, 255],
          "rules" : [ [ "worldGenMustContainSolidBackground" ], [ "allowOverdrawing" ] ],
          "brush" : [ [ "surface" ] ]
    ...and THIS white little dot on the left...


    ...are the KEYS.

    The white little dot is the surface indicator. It determines the surface of the dungeon. Anything above that white dot will be put on top of the surface, anything below will be put below the surface.

    The code above tells the game that white dot is the surface. It was missing the "brush" : [ [ "surface" ] ] parameter before, so it keeps generating below the surface.

    FINALLY it's done...
    IHart, Zavender and The | Suit like this.

Share This Page