Modding Discussion want to make modded dungeon

Discussion in 'Starbound Modding' started by KRANOT, Apr 8, 2017.

  1. KRANOT

    KRANOT Big Damn Hero

    so i wanted to add a dungeon to a mod i am working on, how do i exactly do this? like how do i make it so that an area on a planet is the dungeon, how do i package that in a mod, how ro i protect the blocks so players dont cheat, how do i spawn enemys?

    are there any guides that can answere these questions?
     
  2. Sparklink

    Sparklink Ketchup Robot

    First you are going to need a map editor, I use Tiled in all of map making. There is also a great guide to using Tiled on Starbounder written by the person who made the Starbound dungeons. Then you will have to patch your dungeon into the terrestrial_worlds.config like this
    "[
    {
    "op": "add",
    "path": "/planetTypes/forest/layers/surface/dungeons/-",
    "value": [
    1.0,
    "{dungeon name here}"
    ]
    }
    ]

    planetTypes/ determines the biome it will appear in. layers/ determines where on a type of planet it will appear (on the surface, underground, in the atmosphere).
    If you want to make your dungeon appear on more than one type of planet you will have to write the example I have up there for every biome.
     
  3. projectmayhem

    projectmayhem Spaceman Spiff

    I'm following that Tiled guide you linked, and after downloading the example mission, putting it in the mods folder, when I try to open the JSON in Tiled, it says Tile used but no tilesets specified. Any idea why?
     
  4. Sparklink

    Sparklink Ketchup Robot

    While I cannot figure out why it says it can not find any specified tile sets I have found that it is fixed by placing the .json file into the dungeons folder in your unpacked assets.
     
  5. projectmayhem

    projectmayhem Spaceman Spiff

    I moved the whole examplemissions folder over, but it still says the same thing
     
  6. Sparklink

    Sparklink Ketchup Robot

    Move only the .json file. Sorry about being unclear.
     
  7. projectmayhem

    projectmayhem Spaceman Spiff

    I tried that first. It didnt work.

    So...here is what I figured I would try. I went into the unpacked assets and copied dungeons/other/museum.json and dungeonfile. I tried opening it and I get the same error. I can open the museum file in the unpacked assets just fine, but not if I copy it and move it to my mods folders. I get that same tileset not specified error.

    I noticed this at the bottom of the JSON...

    Code:
    "tilesets":[
            {
             "firstgid":1,
             "source":"..\/..\/..\/tilesets\/packed\/materials.json"
            },
            {
             "firstgid":191,
             "source":"..\/..\/..\/tilesets\/packed\/supports.json"
            },
            {
             "firstgid":227,
             "source":"..\/..\/..\/tilesets\/packed\/miscellaneous.json"
            },
            {
             "firstgid":247,
             "source":"..\/..\/..\/tilesets\/packed\/liquids.json"
            },
            {
             "firstgid":275,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-race\/generic.json"
            },
            {
             "firstgid":2039,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-race\/apex.json"
            },
            {
             "firstgid":2407,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-race\/avian.json"
            },
            {
             "firstgid":2711,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-race\/floran.json"
            },
            {
             "firstgid":2906,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-race\/glitch.json"
            },
            {
             "firstgid":3131,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-race\/human.json"
            },
            {
             "firstgid":3410,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-race\/hylotl.json"
            },
            {
             "firstgid":3641,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-category\/decorative.json"
            },
            {
             "firstgid":4941,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-category\/door.json"
            },
            {
             "firstgid":5057,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-category\/furniture.json"
            },
            {
             "firstgid":5383,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-category\/light.json"
            },
            {
             "firstgid":5800,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-category\/pot.json"
            },
            {
             "firstgid":6097,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-category\/storage.json"
            },
            {
             "firstgid":6315,
             "source":"..\/..\/..\/tilesets\/packed\/objects-by-category\/teleporter.json"
            }],
    I assume that points to the tilesets, I don't know much about JSON, so no idea how to read those paths. Do any of them need changed?
     
  8. Sparklink

    Sparklink Ketchup Robot

    Yes those point to the tilesets that you build with. If the examplemission.json in the tutorial you can probably swap it out for blank template dungeon that is in the dungeons folder, all you need to do is simply copy it an rename it.
     
  9. projectmayhem

    projectmayhem Spaceman Spiff

    ok I think I may have figured out whats wrong, I mae my own custom map, just threw some dirt on it. Then saved it. When I open up the JSON, the paths look like this...

    "source":"..\/..\/..\/assets\/packed\/tilesets\/packed\/materials.json"

    So if I add /assets\/packed\ before the tilesets on the other json, it should open, going to try that now
     
  10. projectmayhem

    projectmayhem Spaceman Spiff

    Well wait...if I specifically set it to look in the unpacked assets, it won't work for people who haven't unpacked the assets will it?

    *edit*

    Or does the packed in the file path mean the packed.pak file. in the tutorial it said to make sure your unpacked assets is renamed to packed. Mine was called _unpacked when I first unpacked it.
     
  11. projectmayhem

    projectmayhem Spaceman Spiff

    I can get the copied museum file to load, if i put it in my dungeon folder, with the path ..\/..\/..\/assets\/packed\/tilesets\/packed\tilesetname.json

    but will it still work for everyone else?
     
  12. Sparklink

    Sparklink Ketchup Robot

    The tiles and objects placed are saved and should work across all who use the mod.
     
    projectmayhem likes this.
  13. projectmayhem

    projectmayhem Spaceman Spiff

    Ok, thank you :) Gonna try making a custom instanced area, access-able from the ships tech station panel. I think I saw a tutorial for that somewhere. Then hopefully, change my custom quest from auto-complete to "must turn in" at an NPC inside the instance.

    Hopefully it goes well!
     
  14. projectmayhem

    projectmayhem Spaceman Spiff

    Hmm... made it simple, just the outline of the building, one NPC, a teleporter and the Player Start. I got this error message

    "Caused by: (MapException) Key 'default' not found in Map::get()"

    Any idea what that means? tried looking on forums but all I found was an old old old post that didnt help.


    **edit**

    I used the /warp instanceworld:jeditemple to get there, not sure if that matters. I wasn't sure if you had to do anything special to make your area an instanced world. Do I have to add tags anywhere in the JSON?
     
  15. Sparklink

    Sparklink Ketchup Robot

    Did you make sure that the instance_worlds.config.patch, the dungeon_worlds.config.patch and the .dungeon files were all correct? The .dungeon should properly refer to the .json file and the instance and dungeon worlds should refer to the .dungeon file correctly.
     
  16. projectmayhem

    projectmayhem Spaceman Spiff

    Yeah, they are fine. I went ahead and recopied the museum files, renamed them and repathed the tilesets. Its letting me go into it fine, so I'm just going to redesign it, and go from there.

    I can't find any info on adding a warp/mission to the tech station. Do you know any tutorial or file I can look at it get pointed in the right way?
     
  17. projectmayhem

    projectmayhem Spaceman Spiff

    I think I have most everything now. I just gotta learn how to make picking up my Kyber Crystal activate the mission on the AI Tech Station.
     
  18. projectmayhem

    projectmayhem Spaceman Spiff

    Ok the only issues I am having now, is looking in the LUA file, im trying to edit it to suit my needs and learn a little about what I'm doing. There is a line in the humanmission1.lua that says

    self.mechanicUid = config.getParameter("mechanicUid")

    and then it's referenced later on with

    local findMechanic = util.uniqueEntityTracker(self.mechanicUid, self.compassUpdate)


    So, what file do I need to look at to learn about the Uid and where it gets set. I have some NPC's in my jedi temple, I just need to learn how to set one of them as the turn in NPC with this Uid right?


    *Edit*

    That came out wrong, I know where you set the Uid, I have it in my jeditemple.questtemplate

    "jediUid" : "jediknight",

    I just don't know where to go to set one of my NPC as "jediknight"


    **Edit Again**

    Ok, After posting this I had an idea and I think it turned right. In the human mission the shipyardcaptain is the turn in, and I been looking through NPC files for him and mission files and all that..but he is in the objects file. So, going to make a jediknight object and try to get the quest to turn in to him

    ***Yet Another Edit*** I guess in order to get the Jedi Knight Object into the map, I would have to learn how to make a new tileset, to upload to the Tiled
     
    Last edited: Apr 17, 2017

Share This Page