27 May 2017

7 October 2015

The terraform command allows you to terraform land.

CommandRequired ParametersRequired Corrade PermissionsRequired AbilitiesExample
terraformgroup, passwordland
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Raise the land 1m at a given point
            // with the size equal to a 1m square
            // using the small brush.
            "command", "terraform",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            // the size in meters -1 to lower 1m, 1 to raise 1m
            "amount", "1",
            // the width and height of the rectangle
            "width", "0.5",
            "height", "0.5",
            // Raise the land
            "action", "Raise",
            // Use brush size
            "brush", "Small",
            // the terraform rectangle centre in region local coordinates
            "position", wasURLEscape("<197.27211, 71.869392, 0>"),
            "callback", wasURLEscape(URL)
        ]
    )
);

In order to better understand how the terraform command works, consider a rectangular parallelepiped projected onto the a plane that represents the region map:

                                +---------+
                               /.        /|
                              / .       / |
                             /  .      /  |
                            /   .     /   |
          +----------------+---------+    |
          ^                |    .    |    |
          |         NW +---|    .    |    |--------------+
          |           /////|    .    |    |//////////////
  amount  |          //////|    +....|....+------------------+
          |         ///////|   .     |   //////////////     /
          |        ////////|  .   x  |  //////////////     /
          |       /////////| .     position//////////     /  height
          v      //////////|.        |//////////////     /
          +---------------------------------------------+
               ////////////|/////////|////////////
              ///Region//////////////////////////
             +---------------------------------+
                           |         |          SE
                           +<------->+
                              width

With the following observations:

ParameterPossible ValueDescription
actionAny member name of the TerraformAction enumeration.Whether to raise, lower, flatten, etc…
brushAny member name of the TerraformBrushSize enumeration.The brush size.
Optional ParameterPossible ValueDescription
amountPositive or negative integer.The size in meters (negative to lower, positive to raise, default is $1m$).
altitudeAn altitude in meters.The altitude at which to apply the brush (default is $0m$, ground level).

Terraform Demonstration

[video: secondlife_scripted_agents_corrade_api_terraform_demonstration.mp4]