Log inGet started
World

Painted Metropolis

Branchmain
Commit1e1d3a3d4d

README.md

config

Paint tools, paint arms, pigments, cover, colour and surface effects as one data table.

paintKit holds no numbers of its own. `Config.DEFAULTS` is a complete neutral set; a game overrides it:

  local Config = require("~.modules.config")
  local cfg = Config.merge(Config.DEFAULTS, { tools = { spray = { coverage = 1 } } })
  local ok, problems = Config.validate(cfg)

Schema (the module that reads each part is in brackets):
  cell                      metres per canvas cell (the grain of every mural)                       [canvas]
  tools[name] = {           what paints a canvas                                                    [painter]
      mode = "stream"               paints while held
      radius                        metres of the mark on the surface
      coverage                      square metres per second
      tinPer                        square metres one tin covers
      reach                         metres above the painter's feet the tool reaches
      range                         metres from the surface it works at
      spill                         0..1: extra radius, as a share, painted at half strength (sloppy edges)
      loudness                      how visible using it is (the game feeds this to whatever watches)
      masked = true                 paints only the cells of the region it was prepared for (a stencil)
  }
  arms[name] = {            what fires paint at things                                              [arms]
      mode = "pellet" | "lob" | "stream" | "cone"
          pellet: `pellets` projectiles a shot, flying flat and fast; lob: one heavy projectile on a high arc
          that bursts over `splash` metres; stream: droplets while held; cone: no projectile, everything in a
          short cone gets `cover` per second (a spray can in a face)
      pellets, spread               projectiles a shot, and the half-angle of their scatter in degrees
      speed, gravity, range         metres a second at the muzzle, m/s2 pulling down, metres before it is spent
      radius                        metres of the mark one projectile leaves
      cover                         cover one projectile adds to what it hits (cone: per second)
      splash                        metres round the impact that also take cover and marks (lob)
      shotsPerTin                   shots one tin gives (stream and cone: seconds of fire a tin gives)
      interval                      seconds between shots (stream: between droplets)
      halfAngle                     cone only: half-angle in degrees
      loudness, heard               how visible firing it is, and how far away its report is heard (metres)
      mount                         nil = carried; a name = only usable from that mount (the host says which)
      scope                         zoom factor when aimed (nil = none)
  }
  ballistics = { step, maxShots }   longest sub-step in seconds; projectiles alive at once            [ballistics]
  pigments[id] = {          tactical properties; a pigment with no entry is plain                   [pigments]
      cover                         multiplies the cover a hit adds (default 1)
      blind                         multiplies the seconds of any "blind" effect it causes (default 1)
      fade                          multiplies how long its marks last where marks fade (default 1)
      effects = { { effect, on = { kind, ... }, seconds?, radius?, factor? } }
                                    extra effects when it lands on a thing of one of those kinds
  }
  cover = { kinds[kind] = { what can be painted out                                                 [cover]
      parts[part] = { capacity, effects = { { at, effect, seconds?, offence? } } }
                                    capacity: cover that fills the part (1 = one full-strength hit);
                                    effects fire when the part's cover rises through `at` (0..1)
      defaultPart                   the part a hit lands on when the host names none
      out = { part?, at, seconds?, effect?, offence? }
                                    painted out when `part` (or, with no part, the mean of all parts) reaches
                                    `at`; for `seconds` (nil: until repaired)
      wipe = { after, rate }        parts lose `rate` cover a second once `after` seconds pass without a hit
      persist = true                kept in a save (fixed things: lenses, relays)
  } }
  colour = {                the painter's own colour, stripped by solvent                           [colour]
      recover = { delay, rate, friendly }   seconds unseen before it returns, share per second, and the extra
                                    factor at full `friendly` ground (rate * (1 + friendly * ground))
      edges                         the colour below which the picture starts to drain (for the screen)
      washedOut = { reviveAt, speed, canPaint, canFire, grabWindow }
                                    at zero colour the painter is washed out until colour is back to reviveAt:
                                    speed factor, what the hands can do, and the factor on a pursuer's grab window
  }
  quality = { fillAt, overAt, tiers = { { name, coverage, accuracy?, overspray? } best first } }       [canvas]
  repaint = { keep }        painting a different pigment over a cell keeps this share of its fill   [canvas]
  scrub = { gone }          a canvas whose painted share falls below this is "scrubbed"             [canvas]
  surfaces[kind][arm|tool|"any"] = { effect, seconds?, radius?, offence? }                          [surfaces, impact]
                            what paint does to plain surfaces ("mark" leaves a splat)
  splats = { max, bucket, mergeWithin, maxRadius, maxPerTarget,
             rules[surface] = { life?, scrub? } }   life: seconds a mark lasts there (nil: until scrubbed)  [splats]

The interface is documented in the header of init.luau; this file repeats it for the asset browser.