Page 1 of 1

How to properly code coast-like tiles

Posted: Sun Feb 09, 2020 1:43 pm
by Wahazar
I would like to implement Mangrove tiles in hex topology, which should work like coast ocean tiles trees standing on ocean blend, sand beach along nearby land, not around trees).
I literally copied hexemplio water*.spec files and changed coast to mangrove:

Code: Select all

gfx = "hexemplio/water1"
...
 2, 0,  "t.l1.mangrove_cell_u000"
 2, 1,  "t.l1.mangrove_cell_u100"
 2, 2,  "t.l1.mangrove_cell_u010"
 2, 3,  "t.l1.mangrove_cell_u110"
 2, 4,  "t.l1.mangrove_cell_u001"
 2, 5,  "t.l1.mangrove_cell_u101"
 2, 6,  "t.l1.mangrove_cell_u011"
 2, 7,  "t.l1.mangrove_cell_u111"
...
}

of course same for tilespec file:

Code: Select all

[tile_mangrove]
tag = "mangrove"
blend_layer = 2
num_layers = 2
layer0_match_type = "coast"
layer1_match_type = "water"
layer1_match_with = "water"
layer1_sprite_type = "corner"


but client crashes with message:
Loading tileset "augmentedi".
0: Don't have graphics tags "t.l1.mangrove_cell_u000" or "" for same cell terrain "Mangrove".

No idea what is going wrong, surely I have t.l1.mangrove_cell_u000 (mangrove.spec is included in tileset files section).

Are coast tiles somewhat hardcoded? Version 2.6.

Re: How to properly code coast-like tiles

Posted: Sun Feb 09, 2020 3:25 pm
by cazfi
Wahazar wrote:No idea what is going wrong, surely I have t.l1.mangrove_cell_u000 (mangrove.spec is included in tileset files section).

In most cases such problems have been caused by forgetting to add comma to the end of the line listing previously last filename in tilespec 'files', so the new filenames are not part of 'comma separated list'.

Re: How to properly code coast-like tiles

Posted: Sun Feb 09, 2020 7:02 pm
by Wahazar
Not in this case:

Code: Select all

  ...
  "augmented2/terrain/taiga.spec",
  "augmented2/terrain/mangrove.spec",
  "augmented2/terrain/activities.spec",
  "augmented2/misc/techs.spec"