Bablo ResourcesDocs

Array Tool

The Array tool repeats the props you selected in a pattern: a row of fence posts, a grid of parking bollards, a ring of chairs around a table, a spiral staircase or a fence around a lot. You aim and size the pattern by dragging across the ground, see every copy before it is saved, and Apply places them all in one go.

Pick Array in the top bar. The move and rotate handles are hidden while the tool is open. Esc goes back to the Select tool.


The source

The source is the current selection. All selected placed props are repeated together, as one group.

  • Select the props before you open the tool, or open it with nothing selected and click one of your placed props: Source set. Drag across the ground to aim and size the pattern.
  • A click that misses your placed props: That click missed your placed objects. Aim right at one to use it as the source. Locked props can’t be used.
  • Opening the tool without a selection shows Array has no source yet. Select one of your placed objects, or click one while the tool is open.
  • When the selection changes while the tool is open, the new selection becomes the source.

The pattern starts in the direction the camera faces. The source itself never moves.


Modes

Pick the pattern under Mode:

ModePatternPanel settings
LineA row of copies.Count, Spacing, Climb per slot
GridRows and columns.Columns, Rows, Spacing, Row spacing, Rows to the right
RadialA ring, part of a ring or a spiral.Count, Radius, Arc start, Arc end, Climb per slot, Turn with the ring, Run clockwise
PerimeterThe outline of a rectangle.Spacing, Depth

Line

Count is the number of slots, the source’s own slot included. The slots run in the direction you drag, Spacing apart.

Climb per slot puts every slot this much higher than the one before it, from -10 to 10 metres. Use it for ramps and stairs.

Grid

Columns run in the direction you drag, Rows to the left of it. Rows to the right puts the rows on the other side. Spacing is the gap between columns, Row spacing the gap between rows.

Row stagger under Advanced shifts every second row sideways by a share of the column gap, from -100% to 100%, for a brick pattern.

Radial

The ring runs through the source. Its centre lies Radius away in the direction you drag. The copies go round from Arc start to Arc end, in degrees from -1080 to 1080:

  • With exactly 360 degrees between them, the ring is closed and the Count slots are spread evenly around it.
  • With any other arc, the first and the last slot sit at both ends of the arc.
  • The ring runs counter-clockwise. Run clockwise sends it the other way.
  • Turn with the ring turns every copy to follow the ring. Off, every copy keeps the rotation of the source.
  • With Climb per slot, every copy is higher than the one before it: a spiral, also over more than one turn. Without a climb, slots of several turns that land on the same spot get one copy: Several turns land on the same spots, so each spot gets one copy. Add a climb to stack the turns.

Perimeter

The first side runs in the direction you drag and is as long as your drag, from 1 to 300 metres. Before you drag, it is four gaps long. Depth is the length of the other two sides; 0 makes a square.

The copies are spread evenly along each side, about Spacing apart and at least one per side, and turn 90 degrees at every corner. Drag the orange marker in the middle of the far side to set the depth and the side of the first edge the rectangle lies on.


Aiming the pattern

Press the left mouse button on the ground and drag. The pattern points from the source to the cursor:

ModeThe drag sets
LineThe direction and the Count: as many slots as fit along the drag.
GridThe direction and the Columns.
RadialThe direction, and the Radius while Auto is off.
PerimeterThe direction and the length of the first side.

While you drag, a readout next to the cursor shows the result, for example 5 slots · 8.0 m · 90°, 3 columns · 4.0 m · 90°, radius 4.00 m · 90° or side 8.0 m · 90°. While you drag the orange marker it shows the depth, for example depth 3.0 m.

  • Hold Shift while dragging to turn the pattern in steps of 45 degrees. Otherwise it turns in the gizmo’s turn steps, Config.Gizmo.turnStep (15 degrees), while turn snapping is on. It is on by default (Config.Gizmo.turnSnap); switching Snap in the top bar on and off again turns it off.
  • With Snap on, the length also snaps to Config.Gizmo.gridStep (0.5 metres).
  • Points closer to the source than Config.ArrayTool.dragDeadZone (0.3 metres), or than a quarter of the source’s size, are ignored, so the pattern can’t flip or collapse.
  • When the cursor points at the sky, only the direction follows it.
  • Heading shows the direction in degrees. Type a value to set it exactly. Flip direction turns the pattern around.

Spacing

Auto is on by default. It fits the gap to the size of the props, so the copies sit side by side, and Spacing shows the fitted value. In Radial mode, Auto makes the ring just big enough for the copies to sit side by side.

Typing a gap or a radius (0.02 to 300 metres), or turning the gap with Shift and the mouse wheel, switches Auto off. Click Auto to turn it on again.

Note in the panelWhen
Some copies overlap each other at this gap.A typed gap is smaller than the props.
Auto follows the model’s size box (14.5 m), which can be larger than the prop looks. Type a gap to override it.Auto is on and the props are bigger than Config.ArrayTool.autoNoticeSize (12 metres) in the direction of the pattern.

Auto extra gap under Advanced adds this much to every fitted gap, from -10 to 10 metres. A negative value makes the copies overlap.


Placement options

OptionWhat it does
Skip the source’s slotOn by default: the first slot is the source itself and gets no copy. Off: a copy is placed exactly on top of the source.
Rest copies on the groundSets every copy on the ground below it.
Lean with the ground slopeTilts every copy to the slope of the ground below it.
Keep the source in the next arrayAfter Apply, the source stays selected together with the new copies, so the next array repeats all of them. Off: only the new copies are selected.

Random variation

SliderRangeWhat it does
Vary position0 to 20 mMoves every copy up to this far in a random direction.
Vary height0 to 10 mRaises or sinks every copy by up to this much.
Vary rotation0 to 180°Turns every copy by up to this much either way.

As soon as one of them is above zero, Seed appears. The same seed always gives the same result. New seed picks another one.


Mouse wheel

The mouse wheel changes the pattern while the cursor is over the world, not over a panel:

ModeWheelShift + wheelAlt + wheelAlt + Shift + wheel
LineCount, 1 per notchSpacing, 0.05 m per notch
GridColumns, 1 per notchSpacing, 0.05 m per notchRows, 1 per notchRow spacing, 0.05 m per notch
RadialCount, 1 per notchArc end, 10° per notch
PerimeterDepth, 0.5 m per notchSpacing, 0.05 m per notch

The steps are wheelGapStep, wheelAngleStep and wheelDepthStep in Config.ArrayTool. The wheel never makes Depth smaller than one step; with Depth at 0 it starts from the length of the first side. Alt is the key of Slow in the Keybinds tab, Alt by default.


The preview

Every copy shows up before you apply:

  • See-through copies of the props (ghosts). At most Config.Tools.ghostCap props (250) get a ghost, so with a source of two props the first 125 copies have ghosts. Ghosts use the opacity Config.Tools.ghostAlpha (120).
  • The copies after that are drawn as box outlines, at most Config.ArrayTool.wireBoxLimit (64) boxes per frame. With more copies, neighbouring copies share one box. The panel says 125 copies shown as ghosts, the rest as box outlines, and the first time you also get Ghosts are shown for the first 125 copies, the others appear as box outlines.
  • Copies that don’t fit under the apply limit are drawn in red, see Apply, cancel and undo.
  • Lines show the shape of the pattern, with a round handle at its end (the centre in Radial mode).

The panel header shows how much an apply places, for example 4 copies, 8 objects total. After a change in the panel, the preview is rebuilt previewDelayMs (150 ms) later. Dragging and the mouse wheel update it at once.


Apply, cancel and undo

Apply saves all copies in one go and selects them: Saved 8 object(s) across 4 copies. The new copies are now the source, together with the old source when Keep the source in the next array is on. The preview stays hidden until you drag or change a setting, so you can build the next array on top of the first one right away.

LimitWhat happens
Config.ArrayTool.objectLimit (600)The most props one apply places: copies times props in the source. Count, Columns and Rows can’t go above it either. A bigger pattern is cut off: Layout cut short at the 600-object apply limit. In Grid mode the rows that don’t fit are left out as a whole.
The map and server limitsWhen the map or the server is full, nothing is saved: This map has reached its object limit. or The server object limit is reached. See Configuration.

Other messages:

MessageWhen
Only 120 of 160 objects were saved. The apply limit or the server stopped the rest.Some copies were not saved.
No objects came out of that apply.No copy could be made, for example because the models did not load.
That model isn’t allowed.A prop in the source has a model that is not in the prop catalogue, for example an adopted GTA prop. See Box Select.

Cancel or X hides the preview. The source stays, and dragging again or changing a setting brings the preview back.

One apply is one step in the undo history. Ctrl + Z removes all copies of that apply and shows the preview again. See Undo & Redo.


Remembered settings

The panel keeps its settings while you play, also when you close and open the tool. With Config.ArrayTool.rememberSettings set to true (the default), they are also saved in each player’s own game (client KVP, key mapeditor_array_settings) and come back the next time they join. With false, the panel starts from Config.ArrayTool.start again in every session.

The direction is not saved: each time you open the tool, the pattern starts in the direction the camera faces.

Restore defaults under Advanced puts every setting except Mode back to the values in Config.ArrayTool.


Settings

LUA
Config.Tools = {
    ghostCap = 250, -- most preview props one tool shows at once; the rest are drawn as simple markers
    ghostAlpha = 120, -- preview prop opacity (0-255)
}
 
-- Array tool: repeat the selected props along a line, a grid, a ring or a
-- rectangle outline. start is what the panel shows the first time.
Config.ArrayTool = {
    start = {
        mode = 'line', -- line (a row), grid (rows x columns), radial (a ring) or perimeter (a rectangle outline)
        count = 5, -- slots in a line or ring, counting the original
        columns = 3, -- grid columns
        rows = 3, -- grid rows
        autoSpacing = true, -- fit the gaps and the ring size to the props' own size
        spacing = 2.0, -- gap along a line or outline while Auto is off (m)
        columnSpacing = 2.0, -- grid column gap while Auto is off (m)
        rowSpacing = 2.0, -- grid row gap while Auto is off (m)
        radius = 4.0, -- ring radius while Auto is off (m)
        depth = 0.0, -- outline depth (m); 0 = square
        startAngle = 0.0, -- ring start (degrees)
        endAngle = 360.0, -- ring end (degrees); a full turn closes the ring
        mirror = false, -- grid rows to the right of the aim, and rings running clockwise
        climb = 0.0, -- Line and Radial: each slot sits this much higher than the last (m); makes ramps, stairs and spirals
        turnWithRing = true, -- ring copies turn to follow the ring
        keepOriginal = true, -- no copy is placed on top of the original
        chainSource = false, -- after Apply, the next source keeps the original as well as its new copies
        tiltToSurface = false, -- tilt each copy to the ground slope
        dropToGround = false, -- set each copy on the ground below it
        seed = 1234, -- seed for the random shift and turn
        randomTurn = 0.0, -- random turn of each copy (degrees)
        randomOffset = 0.0, -- random shift of each copy (m)
        randomHeight = 0.0, -- random raise or sink of each copy (m)
    },
    objectLimit = 600, -- most props one Apply places; count cannot go above it
    fitGap = 0.0, -- starting extra gap Auto adds between copies (m); negative overlaps them (panel: Advanced)
    rowShift = 0.0, -- starting sideways shift of every other grid row, share of the column gap (-1 to 1; panel: Advanced)
    wheelGapStep = 0.05, -- Shift+wheel gap step (m)
    wheelAngleStep = 10.0, -- Shift+wheel arc end step in Radial mode (degrees)
    wheelDepthStep = 0.5, -- wheel depth step in Perimeter mode (m)
    dragDeadZone = 0.3, -- a drag point closer to the source than this (m) leaves the pattern alone, so it cannot flip or collapse
    autoNoticeSize = 12.0, -- Auto gaps above this (m) show a note that the model's size box may be larger than it looks
    rememberSettings = true, -- keep each player's panel settings between game sessions (client KVP)
    wireBoxLimit = 64, -- most copies drawn as boxes per frame once the preview cap is reached
    previewDelayMs = 150, -- wait before the preview rebuilds after a change (ms)
    panelIntervalMs = 50, -- least time between panel updates (ms)
}

start holds what the panel shows the first time, and what Restore defaults goes back to. The keys match the panel: mirror is Rows to the right in Grid mode and Run clockwise in Radial mode, keepOriginal is Skip the source’s slot, chainSource is Keep the source in the next array.

SettingWhat it does
objectLimitMost props one apply places, from 1 to 5000.
fitGap, rowShiftStart values of Auto extra gap and Row stagger.
wheelGapStep, wheelAngleStep, wheelDepthStepMouse wheel steps, see Mouse wheel.
dragDeadZoneDrag points closer to the source than this are ignored.
autoNoticeSizeAbove this size the panel warns that Auto follows the model’s size box.
rememberSettingsSaves the panel settings in each player’s game.
wireBoxLimitMost box outlines drawn per frame.
previewDelayMs, panelIntervalMsWait before the preview rebuilds, and least time between panel updates.

See Configuration and Tool previews.