Dicey Table

Preferences and Display Units

File ▸ Preferences… holds the settings that belong to you rather than to the mod: things that follow your account into every project instead of being published with one. Today that is one setting — the unit lengths are shown in.

The one rule worth knowing#

Changing the unit changes nothing in your files.

Every position, size, offset, radius, spacing and range in DiceyTable is stored in world units, and one world unit is one foot. That is true of the scene document, the mod manifest, a model's .meta.json sidecar, a pack document and a replicated snapshot alike.

Your unit choice sits between the file and the field:

file (world units)  →  ×304.8  →  "76.2"  [mm]   ← you type here
                    ←  ÷304.8  ←

So if you select millimetres, type 76.2 into Position Y and save, the file gets 0.25 — exactly the number it would have got if you had typed 0.25 in feet. Switch a project to millimetres, publish it, and the diff is empty.

Two consequences follow, and both are deliberate:

  • Nothing is converted on import or export. A mod authored in millimetres and a mod authored in feet are the same mod. There is no unit recorded in the file, because there is nothing to record.
  • Other people see their own unit, not yours. The preference is per author. A collaborator who works in inches opens your scene and reads inches.

Choosing a unit#

Unit System One world unit reads as
Millimetres (mm) metric 304.8
Centimetres (cm) metric 30.48
Metres (m) metric 0.3048
Inches (in) imperial 12
Feet (ft) — the default imperial 1
Yards (yd) imperial 0.333

Feet is the default because it is the world unit: with it selected, every field shows the raw stored number, which is what the editor did before this setting existed.

The dialog shows a live table of familiar lengths (a playing card, a card's thickness, a die, the table's short edge, the room height) in whichever unit is selected, so you can see what your numbers will look like before committing to one.

Where it applies#

Every length field in the editor, and every readout that quotes one:

  • The Inspector's Position, and a collision shape's Size, Offset, Radius and Height
  • Snap point grid spacing, a seat zone's Size X / Size Z, an auto-arrange Cell size and Gutter
  • A poster's Width / Height, a room opening's Width / Height, a seat label's box size and Font Size (which is a world-space text height, not a point size)
  • A table pack's Surface Y, Half X, Half Z, its model Offset and its collider's Half-height
  • A light's Range, Shadow distance and Penumbra size; a camera's Near clip, Far clip and Ortho height
  • A button's Width / Diameter, Depth, Cap height, Travel and bezel dimensions
  • The Model editor's Spawn height, Move origin to, trigger Position / Size, and the measured bounds in Errors & stats
  • The derived readouts: the table metrics list, the realised collider geometry, the floor-gap warnings, and every "N objects move X" preview

Each field carries its unit as a small suffix beside the box, so a number is never shown without saying what it is.

What does not get a unit#

Three kinds of number look like lengths and are not, so they stay as they are:

Kind Examples
Angles Rotation, Rotation Y, Yaw, cone angles, sky spin — always degrees
Multipliers Scale (all three axes), a seat template's Scale, texture Tiling, Scale ×
Fractions and normalised values A button's corner rounding and edge fillet, a poster's U/V, an image inset, a card layout's percentages, shadow bias

Pixel dimensions are not lengths either: a deck sheet's Card width (px) is a count of image pixels, and it keeps its px label.

Where the setting is stored#

Under editorUnits in your per-user preferences (users.preferences_json), reached through PUT /api/me/preferences — the same bag your VR controls, audio and asset-explorer layout use. It is also mirrored to localStorage under diceytable.editorUnits, so:

  • Signed out or offline, your choice still sticks in that browser.
  • Signed in, the server copy is what you last chose on any device, and it wins over the local mirror on load — but never over a choice you make in this session, however late the server answers.

Nothing about the setting is replicated to other players, and nothing about it reaches a mod script: a script's world is the snapshot, which is always in world units.

Rounding and precision#

Fields run at seven decimal places in whichever unit is selected, which is far finer than anything authorable (a ten-millionth of a millimetre). Two guarantees come out of that:

  • A field you did not touch is written back bit-identically. Editing X in a Position does not perturb Y and Z, even in a unit where they have no exact decimal form.
  • A value that is merely redisplayed — by a gizmo drag, a re-render, an undo — is never re-committed, so repeatedly opening a scene in millimetres cannot walk a stored number.

Nudge steps are converted too, and rounded to something you would type: a field that steps by 0.1 ft steps by 1 in in inches, and 20 mm in millimetres, rather than 1.2 and 30.48.