WALKTRU: Tileset image design and jsoning (Road - autotileing)

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

WALKTRU: Tileset image design and jsoning (Road - autotileing)

Post by Stratego (dev) »

This is the 2nd part of defining the Road - now with the Autotileing!

INSANELY HARD! part! :)

0. Before All keep in mind there is nice desctiption about autotiling here viewtopic.php?f=217&t=3192

but here we will walktru

1. As a first step we open the assets/terrain/terrain_join.json file
there are many things that are told here : viewtopic.php?f=217&t=6041

Now we will autotile.

2. setting tile behaviours
find "tileIsBasically" and set your tiles to be the dirt roads - so should not be mixed with grey roads
duplicated the grey road and filled with my id (i will make option to give as intervals ...)

Code: Select all

    "nicegreyroad-97,98,99,113,114,119,120,121,122,129,131,135,136,137,138",
    "nicedirtroad-7100,7101,7102,7103,7104,7105,7106,7108,7109,7110,7111,7116,7117,7118,7119",
3. setting mastertile and istead-of tiles
Here we set which tile to be "symbolize" dirt road - this will appear in red box
and also the other tiles that shouldbe use if the given alignment occur (eg has road on top but nowhere else)

so, here is the stoneroad definitions we will modify:

Code: Select all

{
     {

      "id": 114,
      "comment": "nicegreyroad-grass definitions",

      "insteadofTiles": {

        "grass": {

          "byteTileRel": [

            "0x1x1x0x-97",
            "0x1x0x1x-98",
            "1x1x0x0x-99",
            "1x0x1x0x-113",
            "1x1x1x1x-114",
            "0x0x1x1x-129",
            "1x0x0x1x-131",
            "1x0x1x1x-119",
            "0x1x1x1x-120",
            "1x0x0x0x-121",
            "0x0x0x1x-122",
            "1x1x0x1x-135",
            "1x1x1x0x-136",
            "0x1x0x0x-137",

            "0x0x1x0x-138"

          ]
        }

      }
    },
    
    
id: mastertile ID
comment: is a comment so you know which definition is it
insteadofTiles / grass: means the tile type to look for as "not road" tile - in the byte definition it is the 0 value
byteTileRel here is a byte definition telling us which direction what tile is
meanings:
1 - represents the road tiles
0 - represents the grass tiles
x - represents any tile that is not road

etc, etc.
(see the lecture here: viewtopic.php?f=217&t=3192)

but in our case it was easy:
- i looked the first line "0x1x1x0x-97", from here the 97 was the grey road tile,
- i searched in mapeditor in listmode and saw its image
- and i scrolled to the new images the same image and i saw the id is 7100
- so i simply changed the id to 7100, because i already had the bytecode of that "alignment"
and so on here is the result:

Code: Select all

{

      "id": 7100,
      "comment": "nicedirtroad-grass definitions",

      "insteadofTiles": {

        "grass": {

          "byteTileRel": [

            "0x1x1x0x-7100",
            "0x1x0x1x-7111",
            "1x1x0x0x-7102",
            "1x0x1x0x-7105",
            "1x1x1x1x-7109",
            "0x0x1x1x-7116",
            "1x0x0x1x-7118",
            "1x0x1x1x-7117",
            "0x1x1x1x-7108",
            "1x0x0x0x-7106",
            "0x0x0x1x-7119",
            "1x1x0x1x-7110",
            "1x1x1x0x-7101",
            "0x1x0x0x-7103",
            "0x0x1x0x-7104"

          ]
        }

      }
    },

4. Readdy, testing

now comes testing in mapeditor, and it works:
result.jpg
result.jpg (55.4 KiB) Viewed 2106 times
Post Reply

Return to “Terrains and Graphic Design”