local ws = world.get_size()local tool = command_x(tool_set_climate)local err = tool.work(player_x(1), square_x( ws.x/2, 1 ).get_ground_tile(), square_x( ws.x/2, ws.y-1 ).get_ground_tile(), ""+cl_desert)This code snippet tries to turn one line of the map into desert. It does not work on deep water and on non-empty tiles, but is a start.

I realize that this is a slightly older topic, but posting here as it seems closely connected to what I'm trying to do.

I have built a large "continental style" map and I would like to write a script to set climate formulaically as a function of both elevation and "latitude" (meaning, in this context, the distance from the top of the map). The game engine itself is only able to base climate on elevation, but I would like to simulate the effect of having colder climates in the northern parts of the map and warmer climates in the south. Currently I'm doing this using a complicated system of lakes that are disguised as oceans to give the impression of the sea level being in successively warmer climates as you go southwards on the map...it's not entirely satisfactory.

I think I may be able to adapt the snippet of code provided in this thread to create the formula I want, but it would be really helpful if I could see how the snippet should be used in practice (i.e. how it appears in the context of a working scenario). Wondering if either Yona or Dwachs could provide an example of this.