I tried loading a map I made with LDtk, where one of the layers is an intgrid without an associated tileset (I'm using autotile layers for the actual output), but while loading there's a NPE thrown:
This is the level json content (I cut out some parts for clarity, you can create a test file by having a single level in an LDtk file with an IntGrid layer with no tileset associated), where the intgrid's __tilesetRelPath is null:
{
"__header__": {
"fileType": "LDtk Project JSON",
"app": "LDtk",
"doc": "https://ldtk.io/json",
"schema": "https://ldtk.io/files/JSON_SCHEMA.json",
"appAuthor": "Sebastien 'deepnight' Benard",
"appVersion": "1.1.3",
"url": "https://ldtk.io"
},
"jsonVersion": "1.1.3",
"appBuildId": 458364,
"levels": [
{
"identifier": "Level_0",
"iid": "4d1cda10-dbe0-11ec-a7eb-cb7b38a20b96",
"uid": 0,
"worldX": 0,
"worldY": 0,
"worldDepth": 0,
"pxWid": 256,
"pxHei": 256,
"__bgColor": "#696A79",
"bgColor": null,
"useAutoIdentifier": true,
"bgRelPath": null,
"bgPos": null,
"bgPivotX": 0.5,
"bgPivotY": 0.5,
"__smartColor": "#ADADB5",
"__bgPos": null,
"externalRelPath": null,
"fieldInstances": [],
"layerInstances": [
{
"__identifier": "IntGrid",
"__type": "IntGrid",
"__cWid": 16,
"__cHei": 16,
"__gridSize": 16,
"__opacity": 1,
"__pxTotalOffsetX": 0,
"__pxTotalOffsetY": 0,
"__tilesetDefUid": null,
"__tilesetRelPath": null,
"iid": "83bc4fb0-dbe0-11ec-a7eb-53534ccf5b88",
"levelId": 0,
"layerDefUid": 2,
"pxOffsetX": 0,
"pxOffsetY": 0,
"visible": true,
"optionalRules": [],
"intGridCsv": [
1,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,0,1,1,0,0,0,1,1,0,
0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,0,0,0,0,0,
0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0
],
"autoLayerTiles": [],
"seed": 30204,
"overrideTilesetUid": null,
"gridTiles": [],
"entityInstances": []
}
],
"__neighbours": []
}
],
"worlds": []
}
I tried loading a map I made with LDtk, where one of the layers is an intgrid without an associated tileset (I'm using autotile layers for the actual output), but while loading there's a NPE thrown:
I think this happens because of this line, which expects a tileset file to be present.
This is the level json content (I cut out some parts for clarity, you can create a test file by having a single level in an LDtk file with an
IntGridlayer with no tileset associated), where the intgrid's__tilesetRelPathis null:{ "__header__": { "fileType": "LDtk Project JSON", "app": "LDtk", "doc": "https://ldtk.io/json", "schema": "https://ldtk.io/files/JSON_SCHEMA.json", "appAuthor": "Sebastien 'deepnight' Benard", "appVersion": "1.1.3", "url": "https://ldtk.io" }, "jsonVersion": "1.1.3", "appBuildId": 458364, "levels": [ { "identifier": "Level_0", "iid": "4d1cda10-dbe0-11ec-a7eb-cb7b38a20b96", "uid": 0, "worldX": 0, "worldY": 0, "worldDepth": 0, "pxWid": 256, "pxHei": 256, "__bgColor": "#696A79", "bgColor": null, "useAutoIdentifier": true, "bgRelPath": null, "bgPos": null, "bgPivotX": 0.5, "bgPivotY": 0.5, "__smartColor": "#ADADB5", "__bgPos": null, "externalRelPath": null, "fieldInstances": [], "layerInstances": [ { "__identifier": "IntGrid", "__type": "IntGrid", "__cWid": 16, "__cHei": 16, "__gridSize": 16, "__opacity": 1, "__pxTotalOffsetX": 0, "__pxTotalOffsetY": 0, "__tilesetDefUid": null, "__tilesetRelPath": null, "iid": "83bc4fb0-dbe0-11ec-a7eb-53534ccf5b88", "levelId": 0, "layerDefUid": 2, "pxOffsetX": 0, "pxOffsetY": 0, "visible": true, "optionalRules": [], "intGridCsv": [ 1,1,1,1,1,1,0,1,0,1,0,1,1,1,1,1,1,0,1,0,1,1,0,1,1,1,0,1,1,0,0,0,1,1,0, 0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0, 0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,0,0,0,0,0, 0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0 ], "autoLayerTiles": [], "seed": 30204, "overrideTilesetUid": null, "gridTiles": [], "entityInstances": [] } ], "__neighbours": [] } ], "worlds": [] }