Tutorial [Adv] Create your own mission / outpost! Includes basic biome knowledge

Discussion in 'Starbound Modding' started by Kayuko, May 15, 2015.

  1. Kayuko

    Kayuko Oxygen Tank

    Hello!
    It's fluffy fluffy foxy! x'3

    Since I'm on a run, I'll keep writing tutorials on stuff I know about. Or at least I think I know about.
    As you probably noticed this one is just picked completely random and is not aimed at modding beginners.
    (This does NOT mean I don't encourage you to try it, you can use whatever experience you can get!)
    However, I will not explain all JSON functions like I did in my other tutorials, here's stuff you should have basic knowledge about:
    NPCs, Biomes, Materials and Tiles, Objects and NPC Movement Controllers.

    We will go through the process of creating a png used to generate a "dungeon" world (even if it's not really a dungeon, it's still defined as one), spawn npcs (permanently) and modify the base-biome setting of a dungeon world.
    This will influence the music played, ambient sounds, the parallax, hell even which trees will grow in your dungeon world (I'll adress that as instance from now on, since dungeon world is quite long).

    First, things you need:

    Gimp or paint -- Yes, you can use paint this time, do not use paint for usual modification of sprites however, since it's transparent color management is useless, but we won't be using transparents this time.
    Notepad++ / Whatever UTF-8 text-editor you prefer

    ========================================================================================

    So... where to start...
    I guess it's picture time.

    lunarbase.png

    This, my little tutorial following guy, is the Erchius Mining Facility map as it's found in the assets.
    That's pretty straight forward, the pink area is "transparent", but as I said earlier, we are not really using transparent backgrounds.

    So, here a little explanation how exactly this stuff works.

    This map is not read as a map!
    Actually, the client itself just reads the RGB values of single pixels.
    For example, you see the darker blue stuff thats everywhere?
    RGB values for these pixels are [143, 186, 204].
    Now, the client knows those values. The next thing it does is checking the lunarbase.dungeon file in the same directory, as that's where the distribution of blocks to pixels is set.
    The corresponding line to this RGB value is:

    {
    "value" : [143, 186, 204, 255],
    "comment" : "foreground moonrock block",
    "brush" : [ [ "clear" ], [ "back", "moonrock" ], [ "front", "moonrock" ] ]
    }


    This basically means, "where rgb color 143, 186, 204 with an opacity of 255 is I will place the brush".
    Brush specifies a certain object or material that's spawned where those pixels are.
    In this case, the whole thing says:

    "Hey, whereever I find the matching RGB values I will place one block of "moonrock" in the backlayer and one block of "moonrock" in the frontlayer."

    So, if you would visit the Erchius Facility now you would notice that, compared to the map I posted earlier, there's the tile "moonrock" everywhere where the (darker) blue color is.

    If you understand that we can close that topic for now. We will get back to this later, don't worry. But that's the basic knowledge you need to create your instance.

    Oh and one more thing. You notice the yellowish lines? Those are map limitations. Invisible walls, if you want to call 'em that. You can't pass those.

    Tip: Place them one block above the surface. Trust in a fellow modder here. If you set them right above the ground they will project a shadow, if you place them one pixel above the shadow can't be seen anymore but your character will still not fit through that hole.

    ==========================================================================================

    Next picture!
    Now, you might want to download this one and zoom it in, as this is something rather special.

    lunarbase-objects.png

    This is the object file.
    And that's also the reason most people use an image-editor with layer function.
    Straight away to answer a question that will surely come to your mind later: "Where do these pixels belong to?! Halp!"

    This map has the exact same dimension as the basemap (I posted earlier).
    So, whereever you set a pixel on here you can basically think of it setting the same pixel on the basemap, on the exact same px-coordinates. [Y, X axis]

    But, what exactly does this map to?
    This map is used to create objects and npcs and stuff in your instance.
    It works just like the basemap, converting specified RGB values to brushes in your .dungeon file.

    There's not really much more to explain here, so next picture!

    =============================================================================================

    lunarbase-wires1.png

    These dots specify the wire connections.
    They are used for several things, we all know wiring is a little complicated. But that's basically what you want to use to open doors, link them to events, link them to buttons, you know, wiring stuff.


    {
    "value" : [2, 0, 0, 255],
    "comment" : "wire #2",
    "brush" : [ [ "wire", { "group" : "group2", "local" : true } ] ]
    },

    {
    "value" : [3, 0, 0, 255],
    "comment" : "wire #3",
    "brush" : [ [ "wire", { "group" : "group3", "local" : true } ] ]
    },

    {
    "value" : [4, 0, 0, 255],
    "comment" : "wire #4",
    "brush" : [ [ "wire", { "group" : "group4", "local" : true } ] ]
    },

    {
    "value" : [5, 0, 0, 255],
    "comment" : "wire #5",
    "brush" : [ [ "wire", { "group" : "group5", "local" : true } ] ]
    },


    Hah, what, you thought they're all the same color?
    NO! They're not! How would they link to each other if they were!
    Pay close attention to RGB values while dungeoneering, only one number too high or too low and your dungeon will probably not even load, leaving you floating in the air without ground to land on.

    =============================================================================

    Those were all necessary explanations (I repeat here, this tutorial is for advanced JSON modders, if you don't understand the functions just keep studying them by yourself, I will explain dungeon-specific ones at the end of this tutorial, as a reference).

    Now, I take it you created your instance.png, instance-objects.png and instance-wires1.png, linked the RGB colors and the image files itself properly in the corresponding instance.dungeon file? Great!

    Then, your dungeon is finished. Empty, but finished.
    So, to make it more lively here are two example lines you might want to take a look at.
    They are all aimed at the instance-objects.png file! Not the instance.png file!
    Keep things in order, that's one thing you should ALWAYS do.


    {
    "value" : [210, 0, 0, 255],
    "comment" : "human mutant miner",
    "brush" : [ [ "npc",
    {
    "kind" : "npc",
    "species" : "human",
    "typeName" : "mutantminer"
    }
    ] ]
    }



    {
    "value" : [111, 191, 19, 255],
    "comment" : "signdispenser",
    "brush" : [ [ "clear" ], [ "object", "signdispenser", { "direction" : "right" } ] ]
    }


    If you want more things to look at, study and compare, open your assets and roam the "/dungeons/" folder.

    ===================================================================================

    Now to actually link this thing to a biometype.

    This is NOT done in the dungeons assets, it's done in something way easiert to find: The "dungeon_worlds.config" file in the assets root directory.

    Here's an example of a patch.
    This is not the whole file, it is just the patch version!
    Never - ever mess with the dungeon_worlds.config file unless you patch it, you will probably crash the outpost and all missions!


    [
    {
    "op":"add",
    "path":"/soutpost1",
    "value":
    {
    "primaryDungeon" : "soutpost1",
    "threatLevel" : 3,
    "gravity" : 80,
    "worldSize" : [2000, 2000],
    "dungeonBaseHeight" : 1000,
    "dungeonSurfaceHeight" : 810,
    "ambientLightLevel" : [32, 32, 32],
    "biome" : "forest",
    "musicTrack" : "/music/arctic-battle2.ogg"
    }
    }
    ]


    So, that's something we didn't encounter in any of my tutorials before so I'll mention it here.
    "soutpost1" is the name of my custom outpost. However, why does the patch-path lead to a (seemingly) existing "soutpost1" path?
    It doesn't! If you want to create a new function within the file's root you do it like this.
    It then automatically adds the function to the file, without altering any other functions.

    So now, the important part.
    "primaryDungeon" specifies your dungeons name, set in your "instance.dungeon" file. This is used to link those two files together, just like always (Objects, Codex, Items, Quest, really anything).
    "threatLevel" specifies the difficulty of the mission itself, or the instance if you want to use it like that. Possible values are 1-10, not 1-6. The game itself only supports 6 threatLevels yet, but the assets are all set-up for threatLevels up to ten.
    "worldSize" is, apparently, the world size. Just use the px * px size of your "instance.png".
    "dungeonBaseHeight", "dungeonSurfaceHeight" are both used to specify where the upper border of the map is and where the surface is specified. We already visited the topic "map limitation" once, so those values aren't that important.
    "ambientLightLevel" is the RGB color code used for the planets light level. That basically works like the backglow status effect for the lanternstick. The brighter the RGB color, the brighter the world.
    "biome" sets several things: Ambient Sounds, Hazards, the Parallax, biome settings, you know.²
    "musicTrack" is a basic JSON function often used, so no explaining here.

    ² I will make that an extra topic since that's kinda important to how dungeon_worlds work.
    Everytime you enter a world this world is generated upon using a random seed. Then it calls the biome settings and builds the world with blocks specified in the biome settings.
    Now, the dungeons actually avoid the seed thing.
    Simply said, it's YOU deciding how the world is built, however, the biome you specify here can help you speed things up and get more variety. As in, you can't add grass per "instance-objects.png" that easily. If you use a specific function found in many .dungeon files, you can however. This grass is a parental function, however. It's dynamic. So, whenever you change the biome in the "dungeon_worlds.config" file it will also change the grasstype used in your instance.

    There's one file left to edit: The instance_worlds.config.
    Apparently this is the file that defines your dungeon as a missionWorld or uniqueWorld.


    [
    {
    "op" : "add",
    "path" : "/soutpost1",
    "value" :
    {
    "type" : "FloatingDungeon",
    "dungeonWorld" : "soutpost1",
    "seed" : 1234,
    "spawningEnabled" : false,
    "skyParameters" :
    {
    "dayLength" : 10000,
    "surfaceLevel" : 1000,
    "spaceLevel" : 3000,
    "seed" : -5288806180628666923,
    "skyType" : "atmospheric",
    "skyColoring" :
    {
    "mainColor" : [200, 200, 255],
    "morningColors" : [[200, 200, 255], [200, 200, 255]],
    "dayColors" : [[200, 200, 255], [200, 200, 255]],
    "eveningColors" : [[200, 200, 255], [200, 200, 255]],
    "nightColors" : [[200, 200, 255], [200, 200, 255]],
    "morningLightColor" : [200, 200, 200],
    "dayLightColor" : [200, 200, 200],
    "eveningLightColor" : [200, 200, 200],
    "nightLightColor" : [200, 200, 200]
    },
    "satellites" :
    [{
    "pos" : [ 0.310561, 0.21497 ],
    "drawables" :
    [{
    "scale" : [ 0.055, 0.055 ],
    "mirrored" : false,
    "rotation" : 0,
    "flipHorizontal" : false,
    "centered" : true,
    "image" : "/celestial/system/terrestrial/biomes/desert/maskie3.png?hueshift=-45"
    },
    {
    "scale" : [ 0.055, 0.055 ],
    "mirrored" : false,
    "rotation" : 0,
    "flipHorizontal" : false,
    "centered" : true,
    "image" : "/celestial/system/terrestrial/biomes/desert/maskie3.png?hueshift=-45?addmask=/celestial/system/terrestrial/dynamics/2.png"
    },
    {
    "scale" : [ 0.055, 0.055 ],
    "mirrored" : false,
    "rotation" : 0,
    "flipHorizontal" : false,
    "centered" : true,
    "image" : "/celestial/system/terrestrial/biomes/desert/maskie2.png?hueshift=-45?addmask=/celestial/system/terrestrial/dynamics/20.png"
    },
    {
    "scale" : [ 0.055, 0.055 ],
    "mirrored" : false,
    "rotation" : 0,
    "flipHorizontal" : false,
    "centered" : true,
    "image" : "/celestial/system/terrestrial/biomes/desert/maskie1.png?hueshift=-45?addmask=/celestial/system/terrestrial/dynamics/5.png"
    },
    {
    "scale" : [ 0.055, 0.055 ],
    "mirrored" : false,
    "rotation" : 0,
    "flipHorizontal" : false,
    "centered" : true,
    "image" : "/celestial/system/terrestrial/shadows/9.png"
    }]
    }],
    "planet" :
    {
    "pos" : [ 0.00538729, 0.46961 ],
    "drawables" :
    [{
    "scale" : [ 0.15, 0.15 ],
    "mirrored" : false,
    "rotation" : 0,
    "flipHorizontal" : false,
    "centered" : true,
    "image" : "/celestial/system/gas_giant/gas_giant_base.png"
    },
    {
    "scale" : [ 0.15, 0.15 ],
    "mirrored" : false,
    "rotation" : 0,
    "flipHorizontal" : false,
    "centered" : true,
    "image" : "/celestial/system/gas_giant/gas_giant_clouds.png?addmask=/celestial/system/gas_giant/gas_giant_dynamics/17.png+/celestial/system/gas_giant/gas_giant_dynamics/29.png"
    },
    {
    "scale" : [ 0.15, 0.15 ],
    "mirrored" : false,
    "rotation" : 0,
    "flipHorizontal" : false,
    "centered" : true,
    "image" : "/celestial/system/gas_giant/shadows/9.png"
    }]
    },
    "horizonImages" :
    [{
    "right" : "/celestial/system/terrestrial/horizon/liquids/water_r.png",
    "left" : "/celestial/system/terrestrial/horizon/liquids/water_l.png"
    },
    {
    "right" : "/celestial/system/terrestrial/horizon/textures/forest_r.png?hueshift=-30?addmask=/celestial/system/terrestrial/horizon/masks/32_r.png;0;0",
    "left" : "/celestial/system/terrestrial/horizon/textures/forest_l.png?hueshift=-30?addmask=/celestial/system/terrestrial/horizon/masks/32_l.png;0;0"
    },
    {
    "right" : "/celestial/system/terrestrial/horizon/atmosphere/atmosphere_r.png",
    "left" : "/celestial/system/terrestrial/horizon/atmosphere/atmosphere_l.png"
    },
    {
    "right" : "/celestial/system/terrestrial/horizon/shadow/shadow_r.png",
    "left" : "/celestial/system/terrestrial/horizon/shadow/shadow_l.png"
    }]
    }
    }
    }
    ]


    There's not much explaining needed.
    Filepaths are set, so check them to see what you need to do.
    Names are the usual ones, in this case "soutpost1".
    "FloatingDungeon" is the only known value regarding the type, so keep it at that.


    ===========================================================================================

    Now all that's left is a way to gain access to this mission or dungeon.
    There are several ways to do this, we will talk about my two favorites.

    Number one: Add the mission ["instance"] to a quest-accept script.
    This will enable the mission (if done correctly).
    Here's how to do it, this includes also basic AI knowledge, but that's really simple.


    {
    "missionName" : "mission1",
    "icon" : "lunarbaseicon.png",
    "missionWorld" : "lunarbase",

    "speciesText" : {
    "apex" : {
    "buttonText" : "Erchius Mining Facility",
    "repeatButtonText" : "Repeat Erchius Mining Facility",
    "selectSpeech" : [
    {
    "animation" : "talk",
    "text" : "We've received a distress signal from a lunar outpost identifying itself as the EMF (Erchius Mining Facility). Erchius Ore is used to build and repair FTL drives. I think we should investigate. I recommend you craft steel equipment before setting out.",
    "speedModifier" : 1.0
    }
    ]
    },
    "avian" : {
    "buttonText" : "Erchius Mining Facility",
    "repeatButtonText" : "Repeat Erchius Mining Facility",
    "selectSpeech" : [
    {
    "animation" : "talk",
    "text" : "We've received a distress signal from a lunar outpost identifying itself as the EMF (Erchius Mining Facility). Erchius Ore is used to build and repair FTL drives. I think we should investigate. I recommend you craft steel equipment before setting out.",
    "speedModifier" : 1.0
    }
    ]
    },
    "floran" : {
    "buttonText" : "Erchius Mining Facility",
    "repeatButtonText" : "Repeat Erchius Mining Facility",
    "selectSpeech" : [
    {
    "animation" : "talk",
    "text" : "We've received a distress signal from a lunar outpost identifying itself as the EMF (Erchius Mining Facility). Erchius Ore is used to build and repair FTL drives. I think we should investigate. I recommend you craft steel equipment before setting out.",
    "speedModifier" : 1.0
    }
    ]
    },
    "glitch" : {
    "buttonText" : "Erchius Mining Facility",
    "repeatButtonText" : "Repeat Erchius Mining Facility",
    "selectSpeech" : [
    {
    "animation" : "talk",
    "text" : "We've received a distress signal from a lunar outpost identifying itself as the EMF (Erchius Mining Facility). Erchius Ore is used to build and repair FTL drives. I think we should investigate. I recommend you craft steel equipment before setting out.",
    "speedModifier" : 1.0
    }
    ]
    },
    "human" : {
    "buttonText" : "Erchius Mining Facility",
    "repeatButtonText" : "Repeat Erchius Mining Facility",
    "selectSpeech" : [
    {
    "animation" : "talk",
    "text" : "We've received a distress signal from a lunar outpost identifying itself as the EMF (Erchius Mining Facility). Erchius Ore is used to build and repair FTL drives. I think we should investigate. I recommend you craft steel equipment before setting out.",
    "speedModifier" : 1.0
    }
    ]
    },
    "novakid" : {
    "buttonText" : "Erchius Mining Facility",
    "repeatButtonText" : "Repeat Erchius Mining Facility",
    "selectSpeech" : [
    {
    "animation" : "talk",
    "text" : "We've received a distress signal from a lunar outpost identifying itself as the EMF (Erchius Mining Facility). Erchius Ore is used to build and repair FTL drives. I think we should investigate. I recommend you craft steel equipment before setting out.",
    "speedModifier" : 1.0
    }
    ]
    },
    "hylotl" : {
    "buttonText" : "Erchius Mining Facility",
    "repeatButtonText" : "Repeat Erchius Mining Facility",
    "selectSpeech" : [
    {
    "animation" : "talk",
    "text" : "We've received a distress signal from a lunar outpost identifying itself as the EMF (Erchius Mining Facility). Erchius Ore is used to build and repair FTL drives. I think we should investigate. I recommend you craft steel equipment before setting out.",
    "speedModifier" : 1.0
    }
    ]
    }
    }
    }



    Only the really important things:

    "missionName" is used to link the mission into a quest. That's the name you specify in the questscript
    "missionWorld" is the dungeons name. This is specified in the "instance.dungeon" file

    Once you've done that, added the questscript, created a .modinfo file and placed all the files in their respective folders you can start up starbound, accept the quest and you will have access to the mission via. S.A.I.L.

    Now, the second thing.

    This is not used for missions but rather for custom outposts and easy to access dungeons.
    It's modifying a teleporter (we will use the Ark-Teleporter in this example) to get you to the world.
    For this one we will use a .patch file again.


    [
    {
    "op" : "replace",
    "path" : "/destinations",
    "value" :
    [
    {
    "name" : "Outpost",
    "planetName" : "Survivors' Settlement",
    "warpAction" : "UniqueWorld:eek:utpost",
    "icon" : "outpost"
    },
    {
    "name" : "Ark",
    "planetName" : "Mysterious Ruin",
    "warpAction" : "UniqueWorld:monolith",
    "icon" : "ark"
    },
    {
    "name" : "Castle Outpost",
    "planetName" : "InDev",
    "warpAction" : "UniqueWorld:soutpost1",
    "icon" : "ark"
    }
    ]
    }
    ]


    Yep, that's a dirty edit.
    That's a good example how you shouldn't do it.
    This one replaces all the array entries instead of adding a new array index, you should use "add" instead of "replace".

    "name" is the displayed name at the teleporter.
    "planetName" is the description at the teleporter.
    "warpAction" sets the destination, but pay attention to the format. UniqueWorld:soutpost1 will teleport you to the dungeon "soutpost1".
    "icon" is just the icon displayed at the teleporter, nothing important here.

    And that's basically all the knowledge you need to create a custom outpost, mission or dungeon.
    Obviously a few things differ between the three.
    For example, threatLevel doesn't matter in an outpost, but it does matter very much in missions or dungeons.
    Also note the "protected" function in your .dungeon file.
    This specifies if you can or can not mine materials or collect objects in this world.

    So, we've come to an end of another tutorial.
    I somehow feel like spamming them, so please tell me if the content isn't good enough, not helpful or if I'm missing something important.

    //Addition:

    Copyright BlackSpectrum, huehuehue.

    Whatever, as always:

    [​IMG]
    Red Panda approves.
    [/spoiler]
     
    Last edited: May 18, 2015
  2. Peelz

    Peelz Giant Laser Beams

    Code:
    {
    "value" : [143, 186, 204, 255],
    "comment" : "foreground moonrock block",
    "brush" : [ [ "clear" ], [ "back", "moonrock" ], [ "front", "moonrock" ] ]
    }
    What does the "clear" mean?
     
  3. Kayuko

    Kayuko Oxygen Tank

    Shiet, I friggin figured SOMEONE would ask this.

    So I just did a little research. Apparently there are different functions: "surface", "clear" and "wire".
    My guess is it defines which kind of brush it uses, obviously, so surface for the surface layer, clear as a variable for any kind of thing, really and wire for wires obviously.

    Might ask meta tomorrow about it, maybe he can get me sum answers.
     
  4. Peelz

    Peelz Giant Laser Beams

    Thanks for looking into it. I am trying to wrap my head around making my own mission at the moment and this is all very helpful!
     
  5. Kieron_59

    Kieron_59 Scruffy Nerf-Herder

    I can't seem to figure out this error I get when I try to warp to my dungeon.

    Code:
    [10:19:53.640] Error: Access violation detected at 0x55ffd4 (Read of address 0x649803c4)
    [10:19:54.061] Error: Stack Trace...
      SignalHandlerImpl::sehTrampoline()
      void CellularLighting::calculateLightRegion<WorldClient::render(WorldRenderData, unsigned int)::{lambda(CellularLighting::Query*)#3}, WorldClient::render(WorldRenderData, unsigned int)::{lambda(Vector<int, 2u>, WorldClient::render(WorldRenderData, unsigned int)::{lambda(CellularLighting::Query*)#3}<float, 3u>)#4}>(Box<int, 2u>, WorldClient::render(WorldRenderData, unsigned int)::{lambda(CellularLighting::Query*)#3}, WorldClient::render(WorldRenderData, unsigned int)::{lambda(Vector<int, 2u>, WorldClient::render(WorldRenderData, unsigned int)::{lambda(CellularLighting::Query*)#3}<float, 3u>)#4})
      WorldClient::render(WorldRenderData, unsigned int)
      ClientApplication::render()
      StarApplicationBase::run()
      _SDL_main
      _console_main
     
  6. Kayuko

    Kayuko Oxygen Tank

    Stack traces can actually have tons of origins.
    This one (don't pin me on that) seems to be caused by something regarding lightmaps or the lightning system.
    I'm not entirely sure, but you can send me the files (.config's are enough) and I'll check them, if you want.
     
  7. Kieron_59

    Kieron_59 Scruffy Nerf-Herder

  8. Kayuko

    Kayuko Oxygen Tank

    Hm... that's a rather strange problem, as far as I can see your configs are fine.
    Last thing I can do to help you is taking a look at all modfiles you got.
    If you want to keep them secret you can send me a pm with the link, I'm too lazy to steal mod-ideas anyways.
     
  9. Kieron_59

    Kieron_59 Scruffy Nerf-Herder

  10. Kayuko

    Kayuko Oxygen Tank

    So sorry the answer took so long, was eating. :D

    However, your "worldSize" was too small, try keeping it a bit higher then the dungeons actual size.
    Also, next time mention what happened before the error, too, that's what tells you what causes the error.
    This time he tried to teleport you to a dungeon that didn't exist cause he failed to place the dungeon at all possible points due to the world being too small.

    I've set the worldSize to [2000, 2000] to test things, but [200, 200] should even suffice in your case.
     
    The | Suit likes this.
  11. Kieron_59

    Kieron_59 Scruffy Nerf-Herder

    Thanks for your help, Kayuko.
     
    Kayuko likes this.
  12. BlackSpectrum

    BlackSpectrum Void-Bound Voyager

    I can add a little about .aimission and .aicommand files. If all race-specific texts are supposed to actually be the same, you can simply set the default one. It's placed at /speciesText/default and used if and only if there isn't a race-specific one. And even if the text differs between races, you may still consider adding a default one for compatibility with custom races (otherwise name and description of the button will be blank for them).
     
    Kayuko likes this.
  13. Kayuko

    Kayuko Oxygen Tank

    Got hold of meta today, so apparently:

    Clear sets the brush to clear all existing blocks in that position before adding the set brush.
    For example (he used): If you put air on a solid block with the clear brush it'll empty that solid block out.
     
    The | Suit likes this.
  14. Peelz

    Peelz Giant Laser Beams

    Oooookay, so does "surface" place the block on TOP of existing blocks?
     
  15. Kayuko

    Kayuko Oxygen Tank

    Apparently, I only asked for clear, since thats really the only thing that makes sense and he was quite busy.
    So, I'm 95% sure it forces foreground blocking.
     
    Peelz likes this.
  16. The MechE

    The MechE Existential Complex

    Last edited: May 25, 2015
  17. Kayuko

    Kayuko Oxygen Tank

    I highly suspect that's where the world-"compression" is handled, so it won't use the whole worldsize to generate a dungeon.
    BaseHeight being the lowest part of the map (for example, 1000 on a worldsize of 2000 if the dungeon is ~1000 px high)
    SurfaceHeight being the surface part, so ... say, the surface is at height 500 of the tilemap, it'd be +/- 1500.

    Those seem to be optional values tho, as far as I can tell.
    Might ask a bit around if I get the chance, maybe I can get more info.
     
  18. Dekadrachm

    Dekadrachm Heliosphere

    What exactly do you need in order to spawn in a dungeon?

    Do you just need a ground and a player spawn? I keep getting this error

    Code:
    1.
    [21:16:54.021] Info: Protected dungeonIds for world set to (0)
     
    2.
    [21:16:54.650] Info: Client received world stop packet, leaving: Removed
     
    3.
    [21:17:05.983] Info: UniverseServer: Stopping world CelestialWorld:-736755480:989639246:-46300845:12 due to inactivity
     
    4.
    [21:17:06.122] Info: UniverseServer: World thread has stopped due to inactivity, removing world CelestialWorld:-736755480:989639246:-46300845:12
     
    5.
    [21:17:28.397] Info: UniverseServer: Loading client ship world ClientShipWorld:3f2222893df884016c25c59917b13579
     
    6.
    [21:17:30.584] Info: Client received world stop packet, leaving: Removed
     
    7.
    [21:17:30.633] Error: Could not load  asset, using placeholder default.
     
    8.
    (AssetException) Path '' must be absolute
     
    9.
    [21:17:40.351] Info: UniverseServer: Stopping world UniqueWorld:outpost due to inactivity
     
    10.
    [21:17:40.453] Info: UniverseServer: World thread has stopped due to inactivity, removing world UniqueWorld:outpost
     
    11.
    [21:17:45.437] Info: UniverseServer: Creating temporary world file for world MissionWorld:evaoutpost1-3f2222893df884016c25c59917b13579
     
    12.
    [21:17:45.449] Info: UniverseServer: Creating temporary mission world 'MissionWorld:evaoutpost1-3f2222893df884016c25c59917b13579'
     
    13.
    [21:17:45.615] Error: UniverseServer: error during world create: (JsonException) No such key in Json::get("evaoutpost1")
     
    14.
     
    15.
    [21:17:47.838] Info: Clearing broken world MissionWorld:evaoutpost1-3f2222893df884016c25c59917b13579
    
    I included my work. I started from scratch and I want to keep things slim until I get the hang of this. That's why I'm only using like 3 blocks for my simple mission. Once I get everything working I was gonna build off of it. I'm not sure what I did wrong.
     

    Attached Files:

    Last edited: May 26, 2015
  19. Kayuko

    Kayuko Oxygen Tank

    There are a few things I noticed.
    First of all, I tested all this as a UniqueWorld using the outpost system, not the mission system, simply because it was easier, but that shouldn't make any difference.

    1. Your file was called Unique_worlds.config.patch, the origins filename was, however, instance_worlds.config.patch, so I renamed it, making it able to spawn.
    2. The next thing I noticed was, you set the playerspawn twice, once in the object-file and once in the main-file, so the player spawn was blocked by a dirt block. You only need to declare that in the object-file.
    3. Your background consisted of dirt, since it was an underground dungeon, or at least that's what I'm suspecting, this resulted in a few things:
    1. The ambient light level was way too low (or maybe you wanted the map pitch black, I don't know).
    2. The objects you placed in the pink area couldn't spawn since it was filled with dirt blocks, you gotta declare air-blocks or background fills (like you did everywhere else) if you want to spawn objects.
    3. Once I set the things right, some objects still didn't spawn due to the object anchors. You see those once you try to place them in-game. It's the point where your cursor sets itself once you have the item selected. The anchor point is where the pixel on the object map has to be in order for this item to spawn correctly, double check these the next time.
    4. Your instance was literally called "instance" but declared as "evaoutpost1" everywhere else. Keep naming tradition, you need to call it evaoutpost1 in the .dungeonfile itself, too, or he can't call upon that and won't be able to spawn that.
    5. Your spawnground was too small. As explained a little above, I suggest using 1000, 1000 or 2000, 2000 worldSize so you won't run into any generation problems.

    Once you did all this you should be able to spawn your dungeon / mission.
     
  20. Dekadrachm

    Dekadrachm Heliosphere

    okay, i'm new to the dungeon stuff, the background is a rock 01/cobble stone I have foreground and background. Do I need more than that?
     

Share This Page