Modding Help Unable to place objects in Tiled

Discussion in 'Starbound Modding' started by link481, Jul 17, 2016.

  1. link481

    link481 Void-Bound Voyager

    I have just started following the modding guide for creating dungeons or missions for Starbound using Tiled on the wiki (http://starbounder.org/Modding:Tiled/Example_Mission) and everything works fine until it comes to objects.
    I am placing the objects on the object layer using the right tool and I am making sure they don't overlap with any other objects but for whatever reason once I have placed any object on the map I can no longer warp to it (I presume this means there is a problem with the map). So my question would be is this a problem with Tiled or a problem with Starbound or some combination of the two, and if so what can I do to fix this?
     
  2. FadedSketch

    FadedSketch Subatomic Cosmonaut

    hm... could you post your Starbound logs? Those should give some hint as to what is wrong. :)
     
  3. link481

    link481 Void-Bound Voyager

    Code:
    Start logging at: 2016-07-17 15:27:38.981
    [15:27:38.983] Info: Star::Root using bootstrap file 'C:\Program Files (x86)\Steam\steamapps\common\Starbound\win32\sbboot.config'
    [15:27:38.983] Info: Star::Root using storage directory 'C:\Program Files (x86)\Steam\steamapps\common\Starbound\giraffe_storage\'
    [15:27:38.983] Info: Preparing Star::Root...
    [15:27:38.984] Info: Detected mod 'examplemission' at '../giraffe_storage/mods\examplemission\.'
    [15:27:38.984] Info: Loading Configuration with config file: 'starbound.config'
    [15:27:38.984] Info: Loading Star::Configuration from 'Just (.\..\giraffe_storage\starbound.config)'
    [15:27:38.986] Info: Writing Star::Configuration to '.\..\giraffe_storage\starbound.config'
    [15:27:38.990] Info: Initializing Star::Root with 3 assets sources
    [15:27:38.990] Info: Done preparing Star::Root.
    [15:27:38.991] Info: Client Version 'Beta v. Glad Giraffe - Update 3' Revision: 30555b17a491c2a97ab0afbff3b848a1fd937dbd Protocol: 711
    [15:27:38.991] Info: Initialized SDL
    [15:27:39.247] Info: Initialized SDL Video
    [15:27:39.423] Info: Initialized SDL Joystick
    [15:27:39.427] Info: Initialized SDL Sound
    [15:27:39.450] Info: Opened default audio device with 44khz / 16 bit stereo audio, 2048 sample size buffer
    [15:27:39.451] Info: Loading Assets
    [15:27:39.451] Info: Loading assets from: '../assets/packed.pak'
    [15:27:39.451] Info: Loading assets from: '../assets/user'
    [15:27:39.451] Info: Loading assets from: '../giraffe_storage/mods\examplemission\.'
    [15:27:39.842] Info: Done loading Assets in 0.391 seconds
    [15:27:39.849] Info: Loading NameGenerator
    [15:27:39.850] Info: Initializing SDL Window
    [15:27:39.858] Info: Done loading NameGenerator in 0.00900006 seconds
    [15:27:39.858] Info: Loading ObjectDatabase
    [15:27:39.952] Info: Created initial window 1000x600
    [15:27:39.966] Info: Renderer initialized
    [15:27:39.969] Info: Renderer destroyed
    [15:27:39.969] Info: Initializing SDL Window
    [15:27:40.081] Info: Re-created window 1920x1017
    [15:27:40.120] Info: Renderer initialized
    [15:27:40.120] Info: Loading ImageMetadataDatabase
    [15:27:40.121] Info: Done loading ImageMetadataDatabase in 0.000999928 seconds
    [15:27:40.809] Info: Done loading ObjectDatabase in 0.951 seconds
    [15:27:40.809] Info: Loading PlantDatabase
    [15:27:40.966] Info: Done loading PlantDatabase in 0.157 seconds
    [15:27:40.966] Info: Loading ProjectileDatabase
    [15:27:41.946] Info: Done loading ProjectileDatabase in 0.98 seconds
    [15:27:41.947] Info: Loading MonsterDatabase
    [15:27:42.345] Info: Done loading MonsterDatabase in 0.398 seconds
    [15:27:42.345] Info: Loading NpcDatabase
    [15:27:42.430] Info: Done loading NpcDatabase in 0.085 seconds
    [15:27:42.430] Info: Loading StagehandDatabase
    [15:27:42.431] Info: Done loading StagehandDatabase in 0.000999928 seconds
    [15:27:42.431] Info: Loading VehicleDatabase
    [15:27:42.435] Info: Done loading VehicleDatabase in 0.00399995 seconds
    [15:27:42.435] Info: Loading PlayerFactory
    [15:27:42.439] Info: Done loading PlayerFactory in 0.00400019 seconds
    [15:27:42.440] Info: Loading EntityFactory
    [15:27:42.440] Info: Loading VersioningDatabase
    [15:27:42.442] Info: Done loading VersioningDatabase in 0.00199986 seconds
    [15:27:42.442] Info: Done loading EntityFactory in 0.00199986 seconds
    [15:27:42.442] Info: Loading ItemDatabase
    [15:27:43.991] Info: Writing Star::Configuration to '.\..\giraffe_storage\starbound.config'
    [15:27:48.996] Info: Loading FunctionDatabase
    [15:27:49.031] Info: Done loading FunctionDatabase in 0.0350001 seconds
    [15:27:49.035] Info: Loading ParticleDatabase
    [15:27:49.158] Info: Done loading ParticleDatabase in 0.123 seconds
    [15:27:53.255] Info: Done loading ItemDatabase in 10.813 seconds
    [15:27:53.256] Info: Loading MaterialDatabase
    [15:27:53.423] Info: Done loading MaterialDatabase in 0.167 seconds
    [15:27:53.423] Info: Loading TerrainDatabase
    [15:27:53.496] Info: Done loading TerrainDatabase in 0.073 seconds
    [15:27:53.496] Info: Loading BiomeDatabase
    [15:27:53.578] Info: Done loading BiomeDatabase in 0.082 seconds
    [15:27:53.578] Info: Loading LiquidsDatabase
    [15:27:53.581] Info: Done loading LiquidsDatabase in 0.00300002 seconds
    [15:27:53.581] Info: Loading StatusEffectDatabase
    [15:27:53.610] Info: Done loading StatusEffectDatabase in 0.0279999 seconds
    [15:27:53.610] Info: Loading DamageDatabase
    [15:27:53.847] Info: Done loading DamageDatabase in 0.237 seconds
    [15:27:53.847] Info: Loading EffectSourceDatabase
    [15:27:53.868] Info: Done loading EffectSourceDatabase in 0.0209999 seconds
    [15:27:53.868] Info: Loading TreasureDatabase
    [15:27:53.919] Info: Done loading TreasureDatabase in 0.0510001 seconds
    [15:27:53.920] Info: Loading DungeonDefinitions
    [15:27:54.384] Info: Done loading DungeonDefinitions in 0.464 seconds
    [15:27:54.385] Info: Loading TilesetDatabase
    [15:27:54.385] Info: Done loading TilesetDatabase in 0 seconds
    [15:27:54.385] Info: Loading EmoteProcessor
    [15:27:54.385] Info: Done loading EmoteProcessor in 0 seconds
    [15:27:54.385] Info: Loading SpeciesDatabase
    [15:27:54.400] Info: Done loading SpeciesDatabase in 0.0150001 seconds
    [15:27:54.400] Info: Loading QuestTemplateDatabase
    [15:27:54.430] Info: Done loading QuestTemplateDatabase in 0.03 seconds
    [15:27:54.431] Info: Loading AiDatabase
    [15:27:54.455] Info: Done loading AiDatabase in 0.0239999 seconds
    [15:27:54.456] Info: Loading TechDatabase
    [15:27:54.460] Info: Done loading TechDatabase in 0.00399995 seconds
    [15:27:54.460] Info: Loading CodexDatabase
    [15:27:54.691] Info: Done loading CodexDatabase in 0.231 seconds
    [15:27:54.692] Info: Loading BehaviorDatabase
    [15:27:54.789] Info: Done loading BehaviorDatabase in 0.098 seconds
    [15:27:54.789] Info: Loading DanceDatabase
    [15:27:54.793] Info: Done loading DanceDatabase in 0.00399995 seconds
    [15:27:54.793] Info: Loading SpawnTypeDatabase
    [15:27:54.805] Info: Done loading SpawnTypeDatabase in 0.0120001 seconds
    [15:27:54.806] Info: Done fully loading Star::Root
    [15:27:54.812] Info: Renderer destroyed
    [15:27:56.049] Info: Renderer initialized
    [15:27:58.655] Info: Renderer destroyed
    [15:27:58.866] Info: UniverseServer: Acquiring universe lock file
    [15:27:58.875] Info: UniverseServer: Loading settings
    [15:27:58.876] Info: UniverseServer: No default world set; using randomized starter worlds
    [15:27:58.878] Info: UniverseServer: Starting UniverseServer with UUID: 509b622bbf1e37f2486740d122e9eb78
    [15:27:58.883] Info: UniverseServer: Logged in player 'Aleksei Kelly' locally
    [15:27:58.883] Info: UniverseServer: Logged in account '<anonymous>' as player 'Aleksei Kelly' from address local
    [15:27:58.890] Info: UniverseServer: Reviving player at ClientShipWorld:f1c155a93395dd4fdce0407e05045054
    [15:27:58.891] Info: UniverseServer: Client 'Aleksei Kelly' <1> (local) connected
    [15:27:58.892] Info: UniverseClient: Joined server as client 1
    [15:27:58.992] Info: UniverseServer: Loading client ship world ClientShipWorld:f1c155a93395dd4fdce0407e05045054
    [15:27:59.367] Info: Renderer initialized
    [15:28:00.263] Info: UniverseServer: Loading celestial world 365318124:221814557:72121624:4:5
    [15:28:07.263] Info: Chat: <server> Lets do the space warp again
    [15:28:07.381] Info: UniverseServer: Creating temporary world file for world InstanceWorld:examplemission:-:-
    [15:28:07.382] Info: UniverseServer: Creating temporary instance world 'InstanceWorld:examplemission:-:-'
    [15:28:07.580] Info: Placing dungeon examplemission
    [15:28:08.161] Error: UniverseServer: error during world create: (DungeonException) Error loading dungeon '/dungeons/missions/examplemission/examplemission.dungeon': (JsonException) No such key in Json::get("properties")
    [0] 186366a
    [1] 1860ad8
    [2] 162530e
    [3] 161fa37
    [4] 1628f7c
    [5] 1625543
    [6] 161f84a
    [7] 161fac4
    [8] 1677447
    [9] 166cec3
    [10] 13c3312
    [11] 13cc48a
    [12] 13d3be5
    [13] 13c4916
    [14] 13ca006
    [15] 13c6fd6
    [16] 13d61da
    [17] 15d845a
    [18] 13d30e9
    [19] 18b5666
    [20] 1873ee1
    [21] 75617c04 BaseThreadInitThunk
    [22] 77dbab8f RtlInitializeExceptionChain
    [23] 77dbab5a RtlInitializeExceptionChain
    [15:28:08.965] Info: Clearing broken world InstanceWorld:examplemission:-:-
    [15:28:10.938] Info: UniverseServer: Stopping world CelestialWorld:365318124:221814557:72121624:4:5 due to inactivity
    [15:28:11.038] Info: UniverseServer: World thread has stopped due to inactivity, removing world CelestialWorld:365318124:221814557:72121624:4:5
    [15:28:12.692] Info: Renderer destroyed
    [15:28:12.694] Info: UniverseClient: Client disconnecting...
    [15:28:12.751] Info: Client received world stop packet, leaving: Removed
    [15:28:13.023] Info: UniverseServer: Client 'Aleksei Kelly' <1> (local) disconnected
    [15:28:13.123] Info: UniverseServer: World thread has stopped due to inactivity, removing world ClientShipWorld:f1c155a93395dd4fdce0407e05045054
    [15:28:13.924] Info: UniverseServer: Stopping UniverseServer
    [15:28:13.964] Info: Renderer initialized
    [15:28:15.719] Info: Renderer destroyed
    [15:28:15.719] Info: Application quitting!
    [15:28:15.719] Info: Client shutdown gracefully
    [15:28:15.878] Info: Shutting down Star::Root
    
    I hope this is the log which you meant if not please tell me which one, however the "[15:28:08.161] Error: UniverseServer: error during world create: (DungeonException) Error loading dungeon '/dungeons/missions/examplemission/examplemission.dungeon': (JsonException) No such key in Json::get("properties")" part seems to be what the problem is.
     
    Last edited: Jul 17, 2016
  4. FadedSketch

    FadedSketch Subatomic Cosmonaut

    Yup, that's the right log. :)
    By the sounds of it certain properties of an object are causing the problem.. what objects are you using? And are you mapping for stable or unstable?
     
  5. link481

    link481 Void-Bound Voyager

    I'm mapping on stable and in this case I am using the horizontal fluorescent light(called "bunkerlighth" in Tiled), this is the only object in the whole map.
     
  6. FadedSketch

    FadedSketch Subatomic Cosmonaut

    I can't seem to replicate it in Tiled. Could you post the contents of your examplemission.dungeon file? Sorry for taking so long to help you. :unsure:
     
  7. link481

    link481 Void-Bound Voyager

    its fine, here is the examplemission.dungeon file:
    Code:
    {
      "metadata" : {
        "name" : "examplemission",
        "species" : "generic",
        "rules" : [
        ],
        "anchor" : [ "examplemission" ],
        "gravity" : 80,
        "maxRadius" : 1000000,
        "maxParts" : 100,
        "protected" : true
      },
    
      "parts" : [
        {
          "name" : "examplemission",
          "rules" : [
            [ "maxSpawnCount", [1] ]
          ],
          "def" : [ "tmx", "examplemission.json" ]
        }
      ]
    }
    
    but if you meant the examplemission.json file then here is the contents of that:
    Code:
    { "backgroundcolor":"#000000",
     "height":100,
     "layers":[
            {
             "compression":"zlib",
             "data":"eJzt2EsKwjAUQNEOsxvBdboTNykOFAlNmj7NRzgH3kQFpbeNabcNAAAAAAAAAAAAAAAAAAD4d2n2D+AtfQxzpZ1hjr0WmsxRa6HJWC0tNBnjTAtN+noe20tgNOnnWph75T36KbV4jR5j6THerTJ6jHe2x9HYd8VF9k8t+ytNYiLn\/9H+yv1JXLRF7f\/DPWPcrB6a7IusS7UetXXM\/utY5Do4+7oe7b5Zl6Kfp0yPteixltY91S+HMj3Wkj\/r6HH88++gXX7+ug4AAAAAAAAAAAAAAAAAgNU9AL86cUA=",
             "encoding":"base64",
             "height":100,
             "name":"back",
             "opacity":0.5,
             "type":"tilelayer",
             "visible":true,
             "width":100,
             "x":0,
             "y":0
            }, 
            {
             "compression":"zlib",
             "data":"eJzt2EFOw0AQRFEvfRuUI\/i87LkZ+whZYEcxJB6n53fj\/6RaISRXF0SGYZAkSZIkSZIkSZIkSZIkSZIkSZIkSZJU3Ug\/gH6Mq4g1bkSMrS3chPHXFm7S1zNbuEkfe7Zwk1hft512fs80uEkme\/dTrHf6AXTDPY559eeLn1fHROzhe1e7t4Z8rrL1dd+F2\/X8\/XCTx4g93OR31B5ucq\/l7+9nTA+ie98\/o73v4x6vt36\/kiRpjw\/6Af6Rlv+RROTMLolzBvSN3WRG3\/Xsu9D3c5MZfTM3WdC3cpMZfR83WdB3cZMFfQ862dD3yJAs6DtkSgb0DbKFRHfPGBLdPWModO\/MIdCds6cnumuF9EL3rJRodL9qiUR3q5oodK+qiUL3qpoodK+qiUL3qpwIdKfKiUB3qpwodK+qiUL3qpwodK+qiUL3qpoodK+qiUR3q5hodL9K6YHuWCm90D0rpDe6b9aQ6O6ZctQV99sGBQ==",
             "encoding":"base64",
             "height":100,
             "name":"front",
             "opacity":1,
             "type":"tilelayer",
             "visible":true,
             "width":100,
             "x":0,
             "y":0
            }, 
            {
             "draworder":"topdown",
             "height":100,
             "name":"objects",
             "objects":[
                    {
                     "gid":466,
                     "height":8,
                     "id":55,
                     "name":"",
                     "rotation":0,
                     "type":"",
                     "visible":true,
                     "width":40,
                     "x":344,
                     "y":432
                    }],
             "opacity":1,
             "type":"objectgroup",
             "visible":true,
             "width":100,
             "x":0,
             "y":0
            }],
     "nextobjectid":56,
     "orientation":"orthogonal",
     "renderorder":"right-down",
     "tileheight":8,
     "tilesets":[
            {
             "firstgid":1,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/materials.json"
            }, 
            {
             "firstgid":179,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/miscellaneous.json"
            }, 
            {
             "firstgid":197,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/liquids.json"
            }, 
            {
             "firstgid":223,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/supports.json"
            }, 
            {
             "firstgid":257,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/light.json"
            }, 
            {
             "firstgid":628,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/crafting.json"
            }, 
            {
             "firstgid":688,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/decorative.json"
            }, 
            {
             "firstgid":1686,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/door.json"
            }, 
            {
             "firstgid":1779,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/other.json"
            }, 
            {
             "firstgid":1973,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/pot.json"
            }, 
            {
             "firstgid":2233,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/storage.json"
            }, 
            {
             "firstgid":2428,
             "source":"..\/..\/..\/..\/..\/..\/assets\/packed\/tilesets\/packed\/objects-by-category\/teleporter.json"
            }],
     "tilewidth":8,
     "version":1,
     "width":100
    }
    
    also i have zipped the mod so you can download it if you prefer,(if there is a better way to upload a zipped file please tell me) https://www.dropbox.com/s/yzjl6qvb7em18s9/examplemission.rar?dl=0
     
  8. FadedSketch

    FadedSketch Subatomic Cosmonaut

    Thanks for posting all the extra info! ;) I loaded up the mission, and it didn't work. So I cleared the object layer, placed the same light in the same spot, and somehow it worked. Not sure what the issue is, but just removing it and placing it back seemed to work.
     
  9. link481

    link481 Void-Bound Voyager

    unfortunately that did not seem to work so I'm at a loss for how to fix this :(, thanks for trying to help:up:.
     
  10. FadedSketch

    FadedSketch Subatomic Cosmonaut

    Aw man, that's a bummer, sorry about that. :( I'll poke around some more and see if I can't find the issue.
    --- Post updated ---
    Stupid question, but you aren't editing the file while you're in-game, or while starbound is launched, right? I tried my fix again and it seemed to work again. >.>
    here's the .json file: https://drive.google.com/file/d/0B99y4wWRB6B5Mmlxa2t3dW9VSjQ/view?usp=sharing
     
  11. link481

    link481 Void-Bound Voyager

    so after some further investigation, most importantly comparing the file you had and my own there is one distinct differnce:
    yours:
    Code:
    "gid":466,
                     "height":8,
                     "id":56,
                     "name":"",
                     "properties":
                        {
    
                        },
                     "rotation":0,
                     "type":"",
                     "visible":true,
                     "width":40,
                     "x":344,
                     "y":432
    mine:
    Code:
    "gid":466,
                     "height":8,
                     "id":59,
                     "name":"",
                     "rotation":0,
                     "type":"",
                     "visible":true,
                     "width":40,
                     "x":336,
                     "y":432
    
    For whatever reason Tiled isn't writing in the properties part of the code. If I manually enter this part it seems to work, but this doesn't explain why or how to just stop it in the first place but if no other solution comes up this will have to do.
     
    Inf_Wolf14 likes this.
  12. FadedSketch

    FadedSketch Subatomic Cosmonaut

    Oh I see, must be a glitch with tiled then? Well, glad you got it to work. :up: Sorry for not being much help. :unsure:
     
  13. link481

    link481 Void-Bound Voyager

    its fine thank you for trying
     
  14. Inf_Wolf14

    Inf_Wolf14 Giant Laser Beams

    A little advice for when you make larger and more complex dungeons, and you don't have time to insert the properties key for EVERY object, wire, etc...

    If you use Notepad++, hit 'Search' in the top bar, 'Replace...', and enter this:
    For the 'Find what':
    Code:
    "name":"",
    
    And in 'Replace with':
    Code:
    "name":"", \n\t\t\t\t "properties":\n\t\t\t\t\t{\n\n\t\t\t\t\t},
    
    After that, enable 'Extended' search mode in the lower left and hit 'Replace All'.

    Boom. Automated JSON corrections with proper formatting! I've been doing this for a while, and it saves SO MUCH TIME. Just bear in mind you have to do this every time you gen a new file from Tiled. But luckily NP++ saves the lines to search and replace.

    (If other text editors have a similar replace function, same deal just figure out where to put the stuff. :up:)

    This, sadly, breaks the properties for containers with treasure pools, possibly NPCs, etc. Meaning you have to remove it in those places, because it'll create duplicate entries. But in the scope of the matter, it saves time from adding that to several hundred objects that need it.

    Its not perfect, but it works until Tiled's dev fixes it. Hope I helped. :)
     
    Last edited: Jul 19, 2016
    toadkid1234 and FadedSketch like this.
  15. FadedSketch

    FadedSketch Subatomic Cosmonaut

    This is incredibly helpful, seems i was using an older version of Tiled. I recently updated, and it is omitting the properties in objects for me too now. >.> Thank you!
     
    Inf_Wolf14 likes this.
  16. kyleetehkitty

    kyleetehkitty Title Not Found

    Tiled's developer changed how this works in 0.16 http://discourse.mapeditor.org/t/tiled-0-16-0-not-save-custom-properties/1214/4

    A work around inside of Tiled would be to mass select objects that don't have aby custom properties, then add a property called parameters with the value of {}

    The find and replace method is likely easier for editing anything in the vanilla game though.
     
    Last edited: Jul 30, 2016
  17. Inf_Wolf14

    Inf_Wolf14 Giant Laser Beams

  18. kyleetehkitty

    kyleetehkitty Title Not Found

    If you add a custom property named parameters with the empty {} it will include them. But going through and doing that to, the Outpost, for example takes longer than the find and replace method mentioned above. Just the workaround I got working for a custom dungeon so I didn't have to stop and do a find and replace outside of tiled for simple little tests. The dev said he removed spitting out empty bits due to it being to verbose.
     
  19. Inf_Wolf14

    Inf_Wolf14 Giant Laser Beams

    Hmm, oh well. Ill just stick to my find, replace method. I might write a script to more accurately edit the files later on...
    Too bad, I'm sure CF has the same problem when they use Tiled for there dungeons too.
     
  20. kyleetehkitty

    kyleetehkitty Title Not Found

    I found going to https://github.com/bjorn/tiled/releases/ and downloading the 0.15.2 release let me edit dungeons without the above workarounds, it doesn't include the changes to Tiled that remove output of the empty parameters JSON.
     
    bk3k, link481 and Inf_Wolf14 like this.

Share This Page