• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Stable Feedback
  • /DZG-702
Back
2

Expose terrain heightfield write access to Enforce Script (runtime SetTerrainHeight equivalent)

Feature RequestEnvironmentMap / TerrainModdedWorkbench / Tools
2

State

User feedback
Issue key
DZG-702
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
yuki
Created
Sep 9, 2026
Views
42
Platform
PC Steam
What happened?

There is currently no way for a mod to modify terrain height at runtime. All script-side terrain access is read-only: CGame.SurfaceY, SurfaceRoadY, SurfaceRoadY3D, SurfaceGetNormal, GetSurface, GetOceanHeight. The only runtime mutation of the ground exposed to scripts is grass flattening (World.FlattenGrassSphere/Ellipse/Box/Rect), which is a purely visual client-side effect and does not touch the heightfield.

I would like to request a scripted write path to the terrain heightfield, comparable to what Arma 3 exposes through setTerrainHeight.

Reproduction steps

Arma 3 exposes exactly this capability through a single scripting command:
setTerrainHeight [[[x, y, z], ...], true];

The community mod Deformer by Sams (Steam Workshop ID 2822758266, https://steamcommunity.com/sharedfiles/filedetails/?id=2822758266) is built entirely on top of that one command. It provides raise / lower / smooth / flatten brushes in the 3DEN editor, works on any terrain, persists edits into the mission file, and is SP and MP compatible — in multiplayer only the server needs the mod, because the engine replicates the height changes itself.

Architecturally the mod is thin. Everything except the actual write is ordinary script: a brush weight table, a hash map of [gridX, gridY] → [newHeight, baseHeight], an undo stack, and a compressed serialisation of the edit set. The engine call itself appears in only a handful of places, batched at ~10,000 points per call. The one thing the mod has to work around in script is static object placement — it disables simulation on affected objects, applies the heights, restores world positions, and then patches up client-local and simple objects over the network. That workaround is precisely what an adjustObjects parameter should make unnecessary.

The equivalent mod cannot exist in DayZ, and the only missing piece is the engine call.

Why this looks feasible in DayZ

The engine already implements heightfield editing — it is simply not reachable from game script.

  • 1_core/workbenchapi.c exposes WorldEditorAPI.BeginTerrainAction() / EndTerrainAction(), i.e. undo-transaction brackets around terrain edits, but no vertex setter alongside them.

  • 5_mission/gui/scriptconsole.c lists the Buldozer input bindings, which include UABuldSampleTerrainHeight, UABuldSetTerrainHeight, UABuldElevateMod, UABuldSmoothMod, UABuldFlattenMod, plus the full brush control set (UABuldBrushOuterUp/Down, UABuldBrushStrengthUp/Down, UABuldBrushRatioUp/Down).

So sampling, setting, elevating, smoothing and flattening terrain with a configurable brush all exist at engine level — the same operation set Deformer offers in Arma 3. The request is to surface that capability to scripts.

Exact build version (optional)
1.29
Where did it happen?
Unknown
Is it modded?
No
Expected result
—
Reactions

Activity

    17 days ago
  • yuki
    created issue17 days ago
  • 16 days ago
  • l909
    changed state to
    USER FEEDBACK
    16 days ago

You are not signed in. Please sign in to see more details and to reply.

State

User feedback
Issue key
DZG-702
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
yuki
Created
Sep 9, 2026
Views
42