Problem adding Tileset to mod

Hello,
I am trying to make a tileset for a small mod I am working on. The idea I had was to make an engine that sat in the center area of a vehicle and thus could be rendered, which Iv succeeded at doing. I changed the sprite and was injecting it into a tileset. I figured I would try and split it off from that tileset and put it into a mod so I dont have to inject and modify the GFX set every time I update the game. I just update my mod as necessary.

Well I found another mod that added tiles, mainly for outfits and weapons, and attempted to reverse engineer and copy their file just as a test bed for mine. When I try and load or make a new world it gives me the following error. Image also includes the engine modification and a graphical change for the tanker drum 200L so it has a tile. The Heavy Frame on the left of each image is a V12 in the normal engine slot, the Engine on the right is the modded V12 in the central slot.

This is the Code I am using for the Tile.json file

[
{
“type”: “mod_tileset”,
“compatibility”: [“MSX++DEAD_PEOPLE”],
“tile_info”: [{ “height”: 32, “width”: 32}],
“tiles-new”: [
{
“file”: “GoldTiles1.png”,
“tiles”: [
{“id”: [“vp_grei_tanker_drum”, “vp_internal_tank_xxl”], “fg”: 4868, “rotates”: true},
{“id”: [“vp_diesel_engine_v12”, “vp_engine_v12”, “vp_engine_v8”, “vp_diesel_engine_v8”, “engine_block_massive”, “engine_block_large”], “fg”: 1440, “rotates”: true},
{“id”: “v12_combustion”, “fg”: 1440},
{“id”: “v12_diesel”, “fg”: 1440},
{“id”: “vp_v12_combustion”, “fg”: 1440},
{“id”: “vp_v12_diesel”, “fg”: 1440}
]
}
]
}
]

Sounds like it cant find the image, are you sure the path is correct and theres no typos?

Do not forget to also put UNDEAD_PEOPLE in compatibility field.

@Stone didnt think of it being a problem, Iv seen it multiple ways as people structure their mods differently but I tried adding the folder name to the path so its like this.

“file”: “Tile/GoldTiles1.png”,

And it worked. I cant believe I missed something so simple. Thank you.

@SomeDeadGuy Why? Im not saying no just curious.

It’s the simple things that are easiest to miss :wink:

Cause i have two tilesets. “MSX++DEAD_PEOPLE” and “UNDEAD_PEOPLE”. They are identical. Undead version not gets replaced by old version when you update main game.

1

A Small preview of what Iv gotten working so far. Left to Right.
Redesigned Treads to have no gaps and look more like treads rather then tires.
200L Tanker Drum and Engine (in Engine Compartment, not rendered due to core coding)
200L Tanker Drum again, V12 Engine in Central compartment, and stock Engine Crane.

Hi I also have a little problem and its about adding new items with new tilesets I just don’t know where to start.

Im guessing you have the items coded already and have tested them to make sure they work in game (craftable/useable/wearable, ect).

If you dont, I would start there, If you dont know how to write items id suggest just looking at how items are written in the base games json files or mods to start developing an understanding. You will also need a program called Notepad ++ or something similar, Programs like Microsoft word will not work as they have hidden formatting characters that will mess up the game files.

If your ready to make tiles though. Youll need a drawing program which supports transparency, such as Photoshop, Gimp, ect.

First thing youll want to do is make a “tile” folder in your mod folder like this (this is my mod folder)

Next youll want to create a tile.json file inside the folder. I wont post a pic of this but my file is named
“tile_Goldmod.json”

Next youll want to make a blank PNG file with a transparent background and name it what ever you like. For me I made my PNG file
“GoldTiles1.png”

I made it Tiles1 incase I ever want to make a secondary file, or sort the type of tiles. Aka having one for weapons, one for vehicle parts and so on.

So far all the files you should have made for the tileset should be inside the tile folder. If your putting them in the root folder of your mod it will not work.

Next youll want to open your tile file and start it with a block of code like this. Youll see my PNG’s file name, youll want to change that for yourself.
[
{
“type”: “mod_tileset”,
“compatibility”: [“MSX++DEAD_PEOPLE”, “UNDEAD_PEOPLE”],
“tile_info”: [
{
“height”: 32,
“width”: 32
}
],
“tiles-new”: [
{
“file”: “tile/GoldTiles1.png”,
“tiles”: [
]

In the “Tiles”:[ ] section is where youll want to describe what tile in the file represents each item or object. Youll want to do this second but im putting it first so you know what to expect. For example here is my code for the V12 engine I added in my mod.
{
“id”: [“vp_diesel_engine_v12”, “vp_engine_v12”],
“fg”: 0,
“rotates”: true,
“additional_tiles”: [ { “id”: “broken”, “fg”: 6, “bg”: 0 } ]
}

The id line is the name of the item, in this case Vehicle Part Diesel Engine v12 & Vehicle Part Engine V12

The line that reads “fg”:0 means the tile used for the fore ground of the graphic is tile 0 in the file. Ill come back to this. There is also a “bg”:# field which Im not using but that is for the background of the tile (useful for things like shadows)

“rotates”: true, is a control which allows the tile to rotate as the vehicle does in this case. Turning this off can be funny but most vehicle tiles rotate.

“additional_tiles”: [ { “id”: “broken”, “fg”: 6, “bg”: 0 } ] this is a line that adds a broken tile, so when the engine is destroyed you have the Engine itself as a background tile, with the damage/broken effect on the foreground overlaying the engine.

And Finally… The Tiles Themselves. I made this to help me know what the bounries are for each file. You can use this all you like. The File should be 512x512. If you distort it either way, scale up or down, it will not be accurate. The other thing you need to keep in mind, Tiles start from 0 not 1. So the first lines of tiles are

0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
16,17,18,19,20… and so on

This file is 16 tiles per line/row

2 Likes