# llModifyLand

*LSL function*

```lsl
void llModifyLand(integer action, integer brush);
```

- `integer action`: LAND_* action flag to perform (e.g., LAND_LEVEL, LAND_RAISE, LAND_LOWER, LAND_SMOOTH, LAND_NOISE, or LAND_REVERT).
- `integer brush`: Brush size (0, 1, or 2, representing 2m x 2m, 4m x 4m, or 8m x 8m).

- Energy: 10

Modifies the terrain using the specified land action and brush size (0, 1, or 2, corresponding to 2m x 2m, 4m x 4m, or 8m x 8m).

Modify land with **action** on **brush**

The position of the prim is used to determine the input for various flags.

```lsl title="How to use" frame="terminal"
llModifyLand(0, 0);
```

## Specification

| Action |  | Description |
| --- | --- | --- |
| [LAND_LEVEL](/constants/LAND_LEVEL/) | 0 | Levels on prim center |
| [LAND_RAISE](/constants/LAND_RAISE/) | 1 | Raises the land |
| [LAND_LOWER](/constants/LAND_LOWER/) | 2 | Lowers the land |
| [LAND_SMOOTH](/constants/LAND_SMOOTH/) | 3 | Smooths the land |
| [LAND_NOISE](/constants/LAND_NOISE/) | 4 | Makes the land rough |
| [LAND_REVERT](/constants/LAND_REVERT/) | 5 | Restores to baked value |

<table>
	<tr>
		<th>Brush</th>
		<th>Value</th>
		<th>Size</th>
	</tr>
	<tr>
		<td>[LAND_BRUSH_SMALL](/constants/LAND_BRUSH_SMALL/)</td>
		<td>0</td>
		<td>2m x 2m</td>
	</tr>
	<tr>
		<td>[LAND_BRUSH_MEDIUM](/constants/LAND_BRUSH_MEDIUM/)</td>
		<td>1</td>
		<td>4m x 4m</td>
	</tr>
	<tr>
		<td>[LAND_BRUSH_LARGE](/constants/LAND_BRUSH_LARGE/)</td>
		<td>2</td>
		<td>8m x 8m</td>
	</tr>
	<tr>
		<td>~~[LAND_SMALL_BRUSH](https://wiki.secondlife.com/wiki/LAND_SMALL_BRUSH)~~</td>
		<td>1</td>
		<td>4m x 4m</td>
	</tr>
	<tr>
		<td>~~[LAND_MEDIUM_BRUSH](https://wiki.secondlife.com/wiki/LAND_MEDIUM_BRUSH)~~</td>
		<td>2</td>
		<td>8m x 8m</td>
	</tr>
	<tr>
		<td>~~[LAND_LARGE_BRUSH](https://wiki.secondlife.com/wiki/LAND_LARGE_BRUSH)~~</td>
		<td>3</td>
		<td>8m x 8m</td>
	</tr>
	<tr>
		<td colspan="3"><small>The "LAND\_\*\_BRUSH constants are wrong.<br />Use the "LAND_BRUSH\_\*" constants instead.</small></td>
		<td></td>
		<td></td>
	</tr>
</table>

## Caveats

- This function has no effect if the script's owner is offline or not in the same sim as the scripted object.
- Uncontrolled use of `llModifyLand` in scripted objects may force the region's navmesh to rebake continually and cause Memory Allocated for the region to exceed its limit, making it impossible to rez objects. ([BUG-9047](https://jira.secondlife.com/browse/BUG-9047))
- This function has no effect if the scripted object is deeded to a group.
- "LAND_BRUSH\_\*" constants are only present on Lua-enabled sims. On older sims, use their values 0, 1, and 2 instead. The "LAND\_\*\_BRUSH" constants have incorrect values and are not recommended
- If the script is in a prim that is attached to an avatar or is in the child prim of a linkset, then the local position relative to it's attachment point or root prim is used rather than the position within the region. ([BUG-4929](https://jira.secondlife.com/browse/BUG-4929))
- If land is not owned by script owner or the owner doesn't have terraform permissions, the script will silently fail.
- You cannot change altitude beyond land terraform limits for the specified parcel..

## Examples

<details open>
<summary>Example 1</summary>

```lsl
default
{
    state_entry()
    {
        llSetTimerEvent(0.1);
    }

    timer()
    {
        llModifyLand(LAND_LEVEL, LAND_BRUSH_SMALL);
    }
}
```

</details>

## Known issues

From the issue templates included by the wiki article:

- SVC-3272 (fs): LSL: llModifyLandStrength
- STORM-2006: type=bug|Brush constants are all off-by-one.

---

*Source: [LlModifyLand](https://wiki.secondlife.com/wiki/LlModifyLand) on the Second Life Wiki. Content from the Second Life Wiki articles LlModifyLand (revision 1218890, 2026-06-05), Template:Issues/SVC-3272 (revision 1179046, 2013-06-10), Template:Issues/STORM-2006 (revision 1187664, 2014-02-10) and Template:Issues (revision 1214336, 2023-08-20), CC BY-SA 3.0.*

---

From lsl.dev: https://lsl.dev/functions/llModifyLand/
