Out now on Steam. The full career is available for Windows today. Get it now

Guide

Grip motifs: repeating patterns milled over a barrel's grip zone

A motif is a small tile that the barrel creator repeats over a grip zone: raised hexagons in a honeycomb, chevron pockets, three-lobed clovers, fish scales, a diamond lattice. Motifs are data in the barrel creator's data (data/kit/barrel-maker.json, the barrelMaker record; see Equipment, kit and signature development), in the block grip.motifs, so a pack or mod adds a new pattern with no code. A grip zone with the cut motif names one by its id. The core pack ships the block with five motifs: hex, chevron, clover, scales and diamond. The rest of the creator's data is described in barrel-[creator](barrel-creator).

The creator offers the motif cut only when the block is there and complete (its three ranges and at least one motif). A career keeps its own copy of the creator's data. A data update (the add-only refresh described in barrel-[creator](barrel-creator#how-data-reaches-careers-already-under-way)) brings the whole block into a copy that lacks it, and adds a new motif (a new id) to a copy that has the block; it never changes a motif, a range or a limit the copy already has, so a motif redrawn in a pack does not reach careers already under way.

The block#

"motifs": {
  "minFeatureMm": 0.3, "maxWallSlope": 6,
  "depthMm": [0.1, 0.7, 0.01, 0.5], "count": [4, 40, 1, 16], "angleDeg": [0, 45, 1, 0],
  "list": [ { motif }, { motif } ]
}
KeyMeaning
minFeatureMmThe thinnest land or groove the barrel's mesh can show cleanly (mm). A zone with so many cells round that the motif's thinnest feature drops below this is not makeable (the problem motifTooFine, "The pattern is too fine to cut"). Left out, or not above 0: 0.3.
maxWallSlopeThe steepest wall allowed (depth over the bevel's width). Every edge is widened to at least the zone's depth divided by this, so the mesh shows a wall as a clean slope. Left out, or not above 0: 6.
depthMm, count, angleDegA pattern zone's numbers as [min, max, step, starting value] (four numbers each): its depth (mm), its cells round, and its slant (degrees). Core: [0.1, 0.7, 0.01, 0.5], [4, 40, 1, 16], [0, 45, 1, 0]: a new pattern starts 0.5 mm deep, the groove paint's least depth (paintMinDepthMm), so a painted one gives no advice, and may be cut to 0.7 mm. If any of the three is missing or not four numbers, the creator does not offer the motif cut at all. A new zone starts with the count nearest the motif's own size that divides the mesh's vertices round (288) evenly, so every cell is drawn alike, and never so many that it is too fine; the player can choose any count in the range.
listThe motifs, in the order the creator offers them. A later motif with an id already in the list replaces the earlier one, within the one record's list. The creator reads a single barrelMaker record (the last that has data) and does not merge records, so a mod that restyles a core motif ships a complete record with its own list. A motif that cannot be read is left out and named in the log with the field at fault (for example hex: featureMm); the rest stay.

A motif#

KeyMeaning
idIts id, 1 to 40 characters. The text key barrelEditor.motif.<id> names it in the creator: a mod's motif brings that text in its own pack's texts.
cellMm[round, along]: the size of one cell at the motif's own scale, in mm, round the barrel and along it. Two numbers above 0.
staggerHow far each row is turned round from the row before, as a share of a cell (0: straight columns; 0.5: a brick or honeycomb layout). Only the part after the decimal point counts (1.25 is 0.25). Left out: 0.
baseThe depth outside the shapes, as a share of the zone's depth, 0 to 1: 1 a cut floor (the shapes stand up from it), 0 the untouched surface (the shapes are sunk into it). Left out: 0.
bevelMmThe width of each edge's wall at the motif's own scale (mm), 0 or more. The wall is a straight ramp centred on the edge, so the metal a shape takes is its own area. Left out: 0 (then only the wall limit widens it).
featureMmThe thinnest land or groove in the tile at its own scale (mm), above 0; required (a motif without it is left out). It limits how many cells may go round a barrel.
facingtrue when the motif points one way along the barrel (chevrons, scales): a zone may then turn it to face the nose.
shapesThe cell's shapes, painted in order, each over what is under it (see below).
gridInstead of shapes: a grid of depths (see below).

Coordinates are mm from the cell's centre: x round the barrel (the way the angle grows), y along it toward the rear. A shape may reach into the cells beside its own, but not more than one whole cell from the centre (no further than ±cellMm[0] round or ±cellMm[1] along); the cells round each cell are taken into account, so shapes that cross a cell's edge join up seamlessly.

A shape has a kind and its depth:

KeyMeaning
kindpolygon (points: the corners as one list of numbers, [x1, y1, x2, y2, ...], three corners or more, any shape, even concave; a list of [x, y] pairs is read too), circle (at: [x, y], r above 0), line (from, to, widthMm above 0: a band with round ends), arc (at, r and widthMm above 0, fromDeg left out 0, toDeg left out 360, the sweep above 0 and at most 360: part of a ring with round ends; angles from +x toward +y, so 270 points to the nose).
depthIts depth as a share of the zone's, 0 to 1: 0 raised (the untouched surface), 1 cut to the full depth, or anything between (a step). Left out: 1.
bevelMmOptional: its own edge width instead of the motif's.
turnsOptional, 1 to 12: the shape is repeated that many times, turned evenly round the cell's centre (a three-lobed clover is one lobe with turns: 3).
mirrorOptional, around or along: a mirrored copy is added (across the line along the barrel, or the line round it).

Shapes one after another with the same depth count as one shape (their union), so where their edges meet the wall is no steeper than one edge.

A grid is { "size": [nx, ny], "depths": [ ... ] }: nx by ny depth shares (0 to 1), row by row, the first row at the nose side of the cell, each row from small x to large x. Each value sits in the middle of its square of the cell and the depth is blended smoothly between them. With a stagger, stagger × nx must be a whole number (the rows' values then line up). Each side 2 to 256, and 2000 values at most (a pack's lists hold 2000 numbers).

How a zone lays a motif out#

  • Seamless round the barrel. The zone takes a whole number of cells round (its count); the cell is scaled evenly, round and along, so that number fits exactly on the zone's middle radius. The pattern always closes on itself.
  • Whole rows, centred in the zone. The band between the rows and the zone's ends is left untouched, and the rows start with a bevelled wall. A zone too short for one row cuts nothing and is not makeable (the problem "No whole row of the pattern fits").
  • Along a taper the count round stays the same (the pattern is indexed round, as a dividing head does), so the cells get narrower round the barrel as it thins, while their length stays. The thinnest feature is checked at the zone's thinnest radius.
  • The zone's numbers: depthMm (the full depth), count (cells round), angleDeg (a slant: the rows wind round the barrel as a helix; 0 runs them straight round), facing (nose turns a motif that has facing), and invert (raised and cut swapped: raised hexagons become hexagonal pockets).
  • In the record, a motif zone is a grip operation with "cut": "motif", motif (the id), depthMm, count, angleDeg, and facing ("nose", written only then) and invert (true, written only then): { "op": "grip", "cut": "motif", "fromMm": 8, "toMm": 40, "depthMm": 0.25, "count": 12, "motif": "hex" }. A zone naming a motif that neither the barrel's own copy nor the data has takes the data's first motif; facing "nose" is kept only for a motif with facing: true.
  • Finish and paint: the untouched surface keeps the zone's finish; anything cut is bare metal or the groove paint.
  • Weight: the metal the pattern takes is weighed like any cut; like every grip cut, a motif changes the barrel's look and its measured weight and balance only. A deeper cut is weighed and checked like a shallower one: over a bore it leaves less metal round the thread (wallNose, wallRear, "Too thin round the thread"); on the core pack's slimmest bar, 6 mm, a pattern over the rear thread is too thin past about 0.25 mm (3 mm less the thread's 2.35 mm radius leaves 0.65 mm; the least wall is 0.4 mm).
  • Price: a motif zone costs what any grip zone costs (kitBarrel.work.perZone).

A made barrel keeps its own copy#

When a barrel with a motif zone is ordered, its record keeps a copy of each motif it uses, so the barrel keeps its look whatever later happens to the motif data (a mod removed, a motif redrawn). The copy is one operation for each motif, in the record's ops, before the grip zones, holding the motif in the record's own form (words, numbers and lists of numbers), with the wall limit it was cut with (wallSlope):

{ "op": "motif", "id": "hex", "cellMm": [1.6, 1.385641], "stagger": 0.5, "base": 1.0, "bevelMm": 0.06, "featureMm": 0.34,
  "wallSlope": 6.0, "s1.kind": "polygon", "s1.depth": 0.0, "s1.points": [0.0, 0.727461, 0.63, 0.363731, ...] }

Each shape's keys are numbered (s1., s2. ...); a grid is grid.size and grid.depths; facing is 1. The made barrel is drawn and weighed from its copy, and a copy wins over the data's motif of the same id. New design from this keeps working from it even when the data no longer has that motif. Picking a motif again in the creator takes the installed data's and lets the copy of that id go. A design only being made in the creator, not yet ordered, uses the data's motifs, and a barrel's record keeps a copy only of the motifs its zones use. A copy that cannot be read is left out of the design: its zones then use the data's motif of that id, or are drawn plain without one.

Example: the hex honeycomb#

{
  "id": "hex", "cellMm": [1.6, 1.385641], "stagger": 0.5, "base": 1, "bevelMm": 0.06, "featureMm": 0.34,
  "shapes": [
    { "kind": "polygon", "depth": 0,
      "points": [0, 0.727461, 0.63, 0.363731, 0.63, -0.363731, 0, -0.727461, -0.63, -0.363731, -0.63, 0.363731] }
  ]
}

A hexagon 1.26 mm across its flats, standing up from a cut floor, in a honeycomb: cells 1.6 mm round, rows 1.386 mm apart (√3/2 of 1.6), every other row turned half a cell. The grooves between hexagons are 0.34 mm wide everywhere (featureMm). It takes away 38% of the metal over the zone's depth. On a 7 mm barrel its own size is 14 round; a new zone starts at 12 (16 would make the grooves 0.29 mm, under the 0.3 mm limit).

Limits the mesh sets#

The barrel is drawn as a grid: 288 vertices round at full detail (0.065 mm apart on a 6 mm barrel, 0.076 mm on 7 mm, 0.087 mm on 8 mm) and rows 0.04 mm apart along. A land or groove needs about four vertices across to read with a flat top and two walls, so keep features at 0.3 mm or more; a wall needs a bevel of about the depth / 6 or more. At the core's deepest cut, 0.7 mm, that bevel is 0.117 mm, under the 0.3 mm thinnest feature, so every land and groove of the core motifs still has its flat top and floor (checked for all five, raised and swapped, at the finest count on a 6 mm and a 9 mm barrel). At full detail the mesh follows a motif's edges, slanted and curved ones included, so they are clean; below full detail (while a slider is held, and the small pictures of made barrels) the plain grid is used and slanted edges show small steps.

Written for Darts Player Simulator 0.50.35. Built from the game's own schemas and its base pack.