Page 1 of 1

Ground/terrain/asphalt

Posted: 27 Aug 2020, 20:53
by Lobby
Plugins of type ground can be used to add other ground type to the existing grass, sand, asphalt and so on.

Code: Select all    Reset

[{ "id":"$myground00", "type":"ground", "frames":[{"bmp":"frames.png","w":32,"count":6}], "border frames":[{"bmp":"border_frames.png","w":32,"handle y":8,"count":16}], "edge frames":[{"bmp":"edge_frames.png","w":16,"count":12}], "edge border frames":[{"bmp":"edge_border_frames.png","w":16,"count":32}], "texture":[{"bmp":"texture.png","w":32,"count":2}] }]
JSON checker
Check

frames
These frames are used for the (flat) surface of the ground. By providing multiple frames you can add some variation.
frames.png
frames.png (2.76 KiB) Viewed 5033 times

border frames
These frames are used for coasts, that is, where a neighboring tile is water. The order is important and works similar to the alignment of road frames.
border_frames.png
border_frames.png (13.38 KiB) Viewed 5033 times

edge frames
Edge frames are used for the edges of the map.
edge_frames.png
edge_frames.png (15.51 KiB) Viewed 5033 times

edge border frames
Edge border frames are used for tiles at the edge of the map that are also coast.
edge_border_frames.png
edge_border_frames.png (3.87 KiB) Viewed 5033 times

texture
These optional 2 frames are used for drawing slopes. Providing them is useful for better looking slopes since otherwise the game tries to use the regular frames for slope drawing.
texture.png
texture.png (4.64 KiB) Viewed 5033 times


Instead of edge frames and edge border frames you can use "template":"$template_ground" to use the game's default ones.

You can provide winter frames by adding " winter" suffix to the key of a frames attribute. E.g. "frames winter":[...] would be used to define winter frames. The amount of winter frames provided should match the defined amount of regular frames.

You can also define the color that will be used for the ground in the minimap:

Code: Select all

  "map color":{"r":68,"g":96,"b":48},
  "map color winter":{"r":239,"g":239,"b":239}
These would be the colors that are used by default.

You can use ground for example as ground under buildings.

Re: Ground/terrain/asphalt

Posted: 27 Aug 2020, 21:46
by Uncle Koala
If you don't want to draw border frames, you can "cheat" by putting 4 pixels below the tile.
example.png
If you reuse the normal frames, your tile will float above water and it makes your plugin look low quality.

Just putting this out there for all the "decal" makers who use one frame for everything and then end up releasing a very low quality plugin while it could be much better with a bit more effort. :space