WALKTRU: Tileset: adding decorations (BLOCK definition)

Post Reply
Stratego (dev)
Site Admin
Posts: 9680
Joined: Fri Apr 25, 2014 9:28 pm

WALKTRU: Tileset: adding decorations (BLOCK definition)

Post by Stratego (dev) » Sat Aug 25, 2018 8:27 pm

Here I will add a few decorations to the current decorations image
and after i will set it as blocks (the big ones)


1. Finding the decoration.png - the decoration tileset
dec1.png
dec1.png (202.37 KiB) Viewed 522 times
2. Enlarging image and adding new tiles

I have elargetd the image by extra to rown on bottom (2x32 px)
We MUST NOT extend the image with ever, since all existing image ID-s and references will be ruined.

i have put some new tiles to have more decoration
dec2.png
dec2.png (276.25 KiB) Viewed 522 times
3. and now diving them TILE ID in all_terrain.json

searrching the decoration.png part and scrolling to the end of the tile definitions

here

Code: Select all

,
      {
         "id":2168,
         "imgTilesetPosition":168,
         "terrainClassName":"obst"
      },
      {
         "id":2169,
         "imgTilesetPosition":169,
         "imgTilesetPositionRange":"+18",
         "terrainClassName":"obst"
      }
      
so here the last id id 2169+18 = 2187
so next tile will start with that.
i see that the last definition was obstacle type, so it is easiest if i continue with the obstacles
so i go back to image and arracnge the tiles so most of the next tiles to be obstacles,
also to be many hills together
decoration_arranged.png
decoration_arranged.png (274.42 KiB) Viewed 516 times
so the 4 extra obstacles makes me add 4 to the latest definition where was 18 - so now 22
and now the rest, i calculate next id: 2169 + 22 +1 = 2192
and tehn comes 10 hills
and tehn comes 6 obstacles
and tehn comes 10 hills
and then comes the 2 water tiles
and then one snow tile
and then 3 decoration (plants) tile

so the result is:

Code: Select all

   
    {
         "id":2168,
         "imgTilesetPosition":168,
         "terrainClassName":"obst"
      },
      {
         "id":2169,
         "imgTilesetPosition":169,
         "imgTilesetPositionRange":"+22",
         "terrainClassName":"obst"
      },
      {
         "id":2192,
         "imgTilesetPosition":192,
         "imgTilesetPositionRange":"+9",
         "terrainClassName":"hill"
      },      
      {
         "id":2202,
         "imgTilesetPosition":202,
         "imgTilesetPositionRange":"+5",
         "terrainClassName":"obst"
      },      
      {
         "id":2208,
         "imgTilesetPosition":208,
         "imgTilesetPositionRange":"+9",
         "terrainClassName":"hill"
      },      
      {
         "id":2218,
         "imgTilesetPosition":218,
         "imgTilesetPositionRange":"+1",
         "terrainClassName":"water"
      },      
      {
         "id":2220,
         "imgTilesetPosition":220,
         "imgTilesetPositionRange":"+0",
         "terrainClassName":"snow"
      },      
      {
         "id":2221,
         "imgTilesetPosition":221,
         "imgTilesetPositionRange":"+2",
         "terrainClassName":"decoration"
      },      
        
4. now go testing

in mapeditor, checking if all ID-are correct (in list mode of terrain tiles)

5. Block setup
There are a fwe tiles that are ment to put down together (the haystack, the hills, and so on)
so i go open tile_join.json and locate inputBlocks part,
going down to the end i see:

Code: Select all

        ,
	{
	"master":2056,
	"comment": "grey huge mountain",
	"blockItemDefs":[
		"0,-1,2055",
		"-1,0,2054",
                "-1,-1,2053"
		]
  	}
	,
	{
	"master":2127,
	"comment": "big horizontal log",
	"blockItemDefs":[
		"0,-1,2126"
		]
  	}
so the latest is a big log (wood) definition, so we continue with all new ones
if u see the definition right before log there is the big mountain so we will start from that, the same alignment will be on all big mountains.

master: this sets the mastertile (where the red box appears, and that is the insert point to the map)
comment: is important so you dont get lost in file
blockItemDefs: here you can set the translation to the master tile and tile id

speciality: you see the volcano has a diffferent "dressing" when it is active volcano, we need to chose a new tile to be mastertile, and after this we can re-use the bottom tiles from the volcano to form an activ volcano.

so now we have all definled like this:

Code: Select all

 ,
	{
	"master":2056,
	"comment": "grey huge mountain",
	"blockItemDefs":[
		"0,-1,2055",
		"-1,0,2054",
                "-1,-1,2053"
		]
  	}
	,
	{
	"master":2127,
	"comment": "big horizontal log",
	"blockItemDefs":[
		"0,-1,2126"
		]
  	}
	,
	{
	"master":2209,
	"comment": "big volcano inactive",
	"blockItemDefs":[
		"0,-1,2208",
		"-1,0,2193",
                "-1,-1,2192"
		]
  	}  	
	,
	{
	"master":2208,
	"comment": "big volcano active",
	"blockItemDefs":[
		"0,1,2209",
		"-1,0,2194",
                "-1,1,2195"
		]
  	}  	
	,
	{
	"master":2213,
	"comment": "big haystack",
	"blockItemDefs":[
		"0,-1,2212",
		"-1,0,2197",
                "-1,-1,2196"
		]
  	}  	
	,
	{
	"master":2215,
	"comment": "big rocky mountain",
	"blockItemDefs":[
		"0,-1,2214",
		"-1,0,2199",
                "-1,-1,2198"
		]
  	}    	
  	,
	{
	"master":2217,
	"comment": "big ice mountain",
	"blockItemDefs":[
		"0,-1,2216",
		"-1,0,2201",
                "-1,-1,2200"
		]
  	}	
6. testing again the result in mapeditor

here:
blocked.jpg
blocked.jpg (50.64 KiB) Viewed 514 times
Attachments
decoration.png
decoration.png (274.37 KiB) Viewed 519 times

User avatar
Lynx Shafir
Posts: 1528
Joined: Mon May 28, 2018 4:24 am

Re: WALKTRU: Tileset: adding decorations and its jsoning

Post by Lynx Shafir » Sun Aug 26, 2018 6:21 am

I like the volcanos
Fancy
Can u add lava tiles too? (like water and not obstacle )
I saw in grafical collection.
If they aren't good, I can draw new?
Wear your scars with pride 'cos each has a story to tell .
What your scars tell about you?

Stratego (dev)
Site Admin
Posts: 9680
Joined: Fri Apr 25, 2014 9:28 pm

Re: WALKTRU: Tileset: adding decorations and its jsoning

Post by Stratego (dev) » Sun Aug 26, 2018 6:34 am

it is easy to add if you have nice image,
- open a topic (if there is no currently)
- and post there the images you found/made and if finished it is easy to put in.
- also make a post with a sample how it will look with existing tiles together (like a few tile sample eg. 5x5 or 8x8 sample mapsection)

so u want to make the jsoning too? (like i how in these walktru-s)

Post Reply

Return to “Terrains and Graphic Design”