Tropic shore tiles

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Tropic shore tiles

Post by Gigigonzalez »

Hi all. Im trying to figure out where the values are stored that determines the small green stroke between sea/water and land(desert)

It seems to be like 4/5 tiles wide? I suspect the actual values are in genland.h but not hundred percent certain(called from by landscape.cpp). But if so, can someone elaborate a bit on the structure with the numbers?

If id really have to speculate id say the numbere are for each direction, but the last numbers at the bottom make no sense to me.

ty
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Tropic shore tiles

Post by planetmaker »

What do you really want to know? Which structure of which numbers?

Whether a tile is desert, grass or tropic zone (which also shows as grass) is stored in the map array (thus somewhere in the landscape files). The distribution of those is determined once on game start (thus in the genworld files).

Additionally, adjacent to grass or water (like rivers), desert tiles are not drawn as desert but as desert-grass transition tiles. This information is not specifically stored in the map but determined from the tile type of adjacent tiles.
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Tropic shore tiles

Post by Gigigonzalez »

As I've explained, when the map is created there is like a stroke of green near water tiles (4/5 tiles wide) before it transitions into desert, im trying to find where this stored.
planetmaker wrote:What do you really want to know? Which structure of which numbers?
Genland.h
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Tropic shore tiles

Post by Gigigonzalez »

Anyone? :D
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Tropic shore tiles

Post by Rubidium »

CreateDesertOrRainForest (landscape.cpp) in conjunction with _make_desert_or_rainforest_data (table/genland.h).
Gigigonzalez
Engineer
Engineer
Posts: 91
Joined: 12 Jun 2014 14:24

Re: Tropic shore tiles

Post by Gigigonzalez »

Thanks, starting to see how it works, hard to decipher the numbers to visually i guess ill try it in a spreadsheet or something.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Semrush [Bot] and 12 guests