Skip to content

The Content Model

TL;DR

WorldStyle picks CityStyles. A CityStyle picks a Style (palette combinator) and building, street and park settings. Buildings pick Parts. Parts use a Palette. One chain, top to bottom. code review

Six asset types composing in a strict order. Break a link and the chain throws, not always where you were standing when you broke it. See Namespaces. game test

The chain

# Asset code review Picks Registry folder
1 World Style one or more City Styles, by biome and weight worldstyles/
2 City Style a Style, plus building, street, park and rail settings citystyles/
3 Style palettes, randomly per slot styles/
4 Building parts, per floor and cellar, conditionally buildings/
5 Building Part one palette parts/
6 Palette blocks, per character palettes/

Worked example

A world generates a chunk and decides this is a city, floor 2 of a building. code review

  1. The dimension's profile says worldStyle: "standard".
  2. The standard World Style rolls a biome-weighted pick and lands on citystyle_standard.
  3. That City Style says style: "standard" and inherits everything else from citystyle_common. It sets no buildingsettings of its own, so the building chance stays whatever the profile chose, 0.3 by default.
  4. The standard Style rolls one palette from each of its slots, say one wall-material slot and one roof-material slot, and merges them.
  5. The Building chosen for this chunk lists a part for floor 2, maybe gated on inbiome or chunkx.
  6. That Building Part draws using the merged palette from step 4, unless it sets its own refpalette or embeds one, in which case that palette wins. code review

Every step is a name lookup, and every name lookup follows the namespacing rules. code review

A Style is not a visual theme, and the chain above is not the only one

Despite the name, a Style describes no look. It is a weighted palette picker: each slot resolves to one palette from a list, and the resolved palettes are merged. Full detail on the Style page. code review

The chain above is the one a city chunk follows. Every chunk that is not a city chunk skips steps 2 to 5 and takes its palette from the World Style's outsidestyle instead, which is a second Style entirely. A character defined in one and not the other exists in half the world. game test

See also