The Citynauts · Facade Mods GuideContentsPDF

Facade Mods Guide

The Citynauts · make your own building textures

How the game dresses its 3D buildings in pixel-art facades, and how to make, pack, load and share a mod that brings your own: the picture layout, the measurements in facades.json, how the game stacks and tiles them on real buildings, and what the game checks.

The five example facades
The example textures in this guide and in the game (Brownstone, Limestone, Art Deco, Mediterranean, Shop Terrace) are from Pixel Facades – 100 Building Textures by najjar320: najjar320.itch.io/pixel-facades-100-building-textures

Contents

  1. A mod in one minute
  2. The three pictures of a facade
  3. facades.json
  4. How the game builds a wall
  5. Across a wall: tiling
  6. Light and shade
  7. Maps and roofs
  8. Packing the zip
  9. Loading a mod in the game
  10. Sharing a mod
  11. When a mod is refused
  12. Checklist, tips and credits

1. A mod in one minute

A mod is a zip file with one facades.json and three pictures for each facade. Nothing else in it is used and nothing in it is ever run.

1
Draw a facade as three pictures of the same width: top (roof edge + last floor), floors (whole floors that repeat) and ground (the ground floor). Name them facade_<name>_top.png, _floors.png, _ground.png.
2
Write their sizes in pixels into facades.json (section 3).
3
Zip the json and the pictures together (section 8).
4
In the game: Map menu › User Mod › Choose zip file... Your facades appear on the 3D buildings at once and the mod is kept in your browser (section 9).
5
To share it, put the zip online where other sites may download it and give people the link for Mod Link... (section 10).
Start from the demo mod: demo-mod.zip is a complete, working mod: three facades, a facades.json that uses every option, and a README.txt listing them. Load it with User Mod to see it, then change the pictures and the numbers. (The game's own facades are next to this guide too: facades.json and the facade_*_*.png pictures.)

The game's own facades

brownstone
brownstone
limestone
limestone
artdeco
artdeco
mediterranean
mediterranean
shopterrace
shopterrace

Textures by najjar320 — Pixel Facades – 100 Building Textures.

↑ Contents

2. The three pictures of a facade

Each facade is cut into three horizontal parts. All three have the same width (w) and the same scale: every floor is exactly floorRows pixels high.

brownstone facade
_top.png 109 px
_floors.png 177 px
_ground.png 98 px
roof edge 50 px
last floor 59
floor 59
floor 59
floor 59
ground 98
w = 192 px
top
facade_brownstone_top.png
192 × 109 px
floors
facade_brownstone_floors.png
192 × 177 px
ground
facade_brownstone_ground.png
192 × 98 px

Brownstone, drawn at 1.1×. Red: where the three files are cut. Blue: the floors inside them. Right: the three files the game reads. The whole picture (facade_brownstone.png, 192×384) is only a preview.

PictureWhat it holdsHow it is used
_topThe roof edge (cornice, parapet) at its top, and under it the last floor of the building: exactly floorRows pixels. Its height is top = roof edge + floorRows.Once, at the top of every wall. A low building gets only its roof-edge part.
_floorsWhole floors, usually 3 (floorsInPart), each floorRows high, so floors = floorsInPart × floorRows.Between top and ground, as many floors as the building needs; it repeats upwards for tall buildings.
_groundThe ground floor: doors, shop fronts, steps, base. Any height (ground).Once, at the foot of every wall.
Edges must join. The pictures are repeated side by side along a wall, so the left edge of each picture has to continue its right edge. The floors picture also repeats upwards, so its top edge has to continue its bottom edge. And where the parts meet (top over floors, floors over ground) the brickwork should line up.
↑ Contents

3. facades.json

One file for the whole mod. Sizes are in pixels of your pictures; the game turns them into metres from the floor height.

{
  "$schema": "https://www.thecitynauts.com/mods/facades.schema.json",
  "title": "Old Town",          // optional - the name shown in the game
  "map": "roadmap",            // optional - "roadmap" (default) or "satellite"
  "roofs": "flat",             // optional - "flat" (default) or "photo" (satellite only)
  "roofColor": "#3b3e44",      // optional - flat roof colour (satellite only)
  "floorMetres": 3.1,          // optional - how high one floor is drawn (default 3.1)
  "facades": [
    { "name": "brownstone", "w": 192, "top": 109, "floors": 177, "ground": 98,
      "floorRows": 59, "floorsInPart": 3 },
    { "name": "limestone", "w": 182, "top": 82, "floors": 174, "ground": 72,
      "floorRows": 58, "floorsInPart": 3 }
  ]
}

The comments above are only for this guide: JSON itself does not allow comments, so leave them out of your file. Fields the game does not know (like the note and metres in the game's own file) are ignored, so you can keep notes in them.

Help in your editor. With the "$schema" line above, code editors such as VS Code read facades.schema.json: they show what each option does when you point at it, offer the options as you type, and underline a wrong value before you ever zip the mod. The game ignores the line.

The mod

FieldValueMeaning
$schemathe schema's addressOptional. Help for code editors (see above); the game ignores it.
facadeslist, 1 to 24Required. The facades of the mod. Each building gets one of them, picked by where it stands, so it is always the same one and they are spread evenly.
titletext, up to 60Shown in the User Mod popup. Without it the zip's file name is used.
map"roadmap" / "satellite"The map the mod is shown on. Default roadmap.
roofs"flat" / "photo"On the satellite map: one colour, or the satellite photo of the real roof. Default flat. (On the roadmap roofs are always the game's dark grey.)
roofColor"#rrggbb"The flat roof colour on the satellite map. Default #3b3e44.
floorMetres2 to 6How many metres one floor (floorRows pixels) is on the buildings. Default 3.1. All facades of the mod share it.

Each facade

FieldValueMeaning
nameletters, digits, _ -; up to 40Required. Names the pictures: facade_<name>_top.png etc. Unique in the mod.
w1 to 4096 pxRequired. The width of all three pictures.
top1 to 4096 pxRequired. Height of _top: roof edge + one floor. Must be more than floorRows.
floors1 to 4096 pxRequired. Height of _floors: floorsInPart × floorRows.
ground1 to 4096 pxRequired. Height of _ground.
floorRows1 to 4096 pxRequired. The height of one floor in your pictures. It sets the scale: floorRows pixels = floorMetres metres.
floorsInPart1 to 12How many floors the _floors picture holds. Default 3.
Write the real sizes of your pictures. If a number does not match its picture, the game still draws it, but stretched: a wrong floors or floorsInPart makes floors come out cut in the wrong place.
↑ Contents

4. How the game builds a wall

The game takes the real buildings of the map (their outline and height) and lays your pictures on every outside wall, 6 cm in front of it. Up the wall, from the bottom:

  1. the ground floor (_ground),
  2. as many floors as fit, taken from _floors from its top down and repeated for tall buildings,
  3. the last floor and the roof edge (_top).

The number of floors is the one that fits the building's height best; the whole stack is then stretched or squeezed a little to the exact height. Nothing is cut in the middle of a floor.

Building height (wall)What it gets
2.6 m or lowerno facade (sheds, walls, kiosks)
too low for ground floor + roof edgeonly the ground floor, stretched to the height (or nothing, if it would be squeezed below 72 %)
about ground floor + roof edgethe ground floor and the roof-edge part of _top
tallerground floor + floors + top, as many floors as fit

The same Brownstone on buildings of different heights, drawn exactly as the game does (here 8 m wide walls):

4.2 m high
the ground floor alone
82 % high
8 m high
ground floor + roof edge
+3 %
13 m high
ground + 1 floor + top
−7 %
19 m high
ground + 3 floors + top
−6 %
26 m high
ground + 5 floors + top
−1 %

Brownstone: 19.0 px per metre (59 px = 3.1 m); ground floor 5.15 m, roof edge 2.63 m, each floor 3.1 m. The percentage is how much the stack is stretched (+) or squeezed (−) to the building's height.

So a good _ground reads well when stretched a little, and a good _top works with and without the floor under its roof edge.
↑ Contents

5. Across a wall: tiling

Along a wall the pictures are laid side by side at their own size (w pixels = w / floorRows × floorMetres metres; about 10 m for the game's facades). They are not stretched to fit a wall, with one exception:

2 pictures wide
ground + 2 floors + top
−3 %
2.08 pictures: fitted
ground + 2 floors + top
−3 %
2.5 pictures: cut ends
ground + 2 floors + top
−3 %
0.62: the middle
ground + 2 floors + top
−3 %

Limestone on 14 m high walls. 2.08 pictures: fitted: 2 whole tiles, squeezed 3.8 %; 2.5 pictures: 2 whole tiles, the same cut piece at both ends; 0.62 pictures: narrower than a tile: the middle of one.

Because the cut pieces come from both edges of your picture, put something sensible at the edges: a pilaster, a corner stone, or plain wall. A window cut in half at the corner of a building looks wrong.

Sizes of the game's facades

namewtopfloorsgroundfloorRowsfloorsInPartpx / mone pictureground floorroof edge
brownstone1921091779859319.010.09 m5.15 m2.63 m
limestone182821747258318.79.73 m3.85 m1.28 m
artdeco210841867462320.010.50 m3.70 m1.10 m
mediterranean224831927764320.610.85 m3.73 m0.92 m
shopterrace196841927664320.69.49 m3.68 m0.97 m

With floorMetres 3.1. Keep your facades roughly 8 to 12 m wide and at the same pixel density as each other, so neighbouring buildings look alike in detail.

↑ Contents

6. Light and shade

The game shades the facades itself, so draw your pictures evenly lit, without a strong shadow of their own. Each wall is darkened by the way it faces: the sun stands in the south, a little to the west.

facing the sun (south-south-west)
× 1
south
× 0.94
west
× 0.72
east
× 0.44
north
× 0.31

On top of that every wall is a little darker towards the ground: 70 % at its foot, full brightness at its top (the dark band at the bottom of each sample). Pictures are drawn with sharp pixels up close and smoothly far away, so pixel art stays crisp.

Test your colours on the darkest side: a facade that is fine facing the sun can turn muddy on north walls at 31 %. Mid-tone walls with clear, light window frames read best everywhere.
↑ Contents

7. Maps and roofs

The game's own texture modes, in the Map menu, show the three combinations a mod can choose:

Map menuMod settingsWhat you see
Textured"map": "roadmap" (default)The road map; facades on the walls; flat dark roofs.
Fully Textured"map": "satellite"The satellite photo as the ground; facades; flat roofs in roofColor.
Realistic"map": "satellite", "roofs": "photo"The satellite photo; facades; each roof shows the photo of the real roof above it.

Facades are on the 3D map only; choosing a texture mode on the 2D map switches it to 3D. The map menu has one choice ticked at a time: Roadmap, Satellite, Night, or one of the texture modes. Picking Roadmap, Satellite or Night turns the textures off.

↑ Contents

8. Packing the zip

Put facades.json and the pictures at the top of the zip:

old-town.zip
 ├─ facades.json
 ├─ facade_brownstone_top.png
 ├─ facade_brownstone_floors.png
 ├─ facade_brownstone_ground.png
 ├─ facade_limestone_top.png
 ├─ facade_limestone_floors.png
 └─ facade_limestone_ground.png

or all of them in one folder inside it:

old-town.zip
 └─ old-town/
    ├─ facades.json
    ├─ facade_brownstone_top.png
    └─ ...

Zipping a folder with Windows "Send to › Compressed folder" or macOS "Compress" gives this layout. The pictures must be in the same folder as facades.json.

Limits

WhatLimit
the zip25 MB, 400 files
facades in a mod24
one picture8 MB, 4096 × 4096 px
facades.json200 kB
Small is fast: the game's own five facades are about 80 kB together. Pictures go to the graphics card of every player's phone, so a mod of 5–10 facades at around 200 px wide loads instantly and keeps the game smooth.
↑ Contents

9. Loading a mod in the game

From your device: User Mod

Map menu › User Mod › Choose zip file... The mod is checked, shown at once, and kept in this browser: next time User Mod offers Use this mod or another zip. Tapping the ticked User Mod again turns it off.

From the internet: Mod Link...

Map menu › Mod Link..., paste the https:// address of the zip, Download. It is then kept and used the same way as a zip from your device.

One mod is kept at a time; a new one replaces it. The chosen mode is remembered, so the game starts with your mod on.

↑ Contents

10. Sharing a mod

Mod Link downloads the zip straight from the browser, so the site it is on must allow other sites to download its files (it sends the CORS header Access-Control-Allow-Origin). Many do not.

WhereWorks with Mod Link?
GitHub, raw file link
https://raw.githubusercontent.com/<user>/<repo>/main/old-town.zip
Yes. Put the zip in a public repository and copy the link of the Raw button.
GitHub Pages
https://<user>.github.io/<repo>/old-town.zip
Yes.
Your own site or a storage bucketYes, if it sends Access-Control-Allow-Origin: * for the zip.
GitHub Releases download linksUsually not (their redirect does not allow it): use a raw link instead.
Google Drive, Dropbox, OneDrive, WeTransfer, DiscordNo. Share the zip there for people to download and load with User Mod instead.
Only https:// links are taken, and links with a login in them are not used. The zip is checked the same way as one from a device.

Licence and credit

Only share textures you made or may share. If your mod is based on someone's texture pack, follow its licence and credit its author in your mod's page or readme, as this guide does for najjar320's Pixel Facades.

↑ Contents

11. When a mod is refused

The game says exactly what is wrong; nothing of a refused mod is used and the mod you had stays.

MessageWhat to do
That is not a zip file.The file is not a zip, or it is damaged. Make it again with your system's "Compress" / "Send to zip".
There is no facades.json in the zip (at its top, or in one folder).Put facades.json at the top of the zip, or inside one folder at most (my-mod/facades.json).
facades.json is not valid JSON.A comma or quote is wrong. Check it in any JSON checker.
facades.json has no "facades" list.The file needs "facades": [ ... ] with at least one facade.
A mod can have 24 facades at most.Split it into several mods.
… needs a "name" of letters, digits, _ or - (40 at most).Names like old_town-2. No spaces, dots or slashes.
the name "…" is there twice.Each facade needs its own name (letter case ignored).
"… w" must be a number from 1 to 4096.Every size is a whole number of pixels, 1 to 4096 (floorsInPart 1 to 12, floorMetres 2 to 6).
"floorRows" must be less than "top"The top picture holds the last floor AND the roof edge above it, so it is taller than one floor.
Missing picture: facade_…_top.pngEach facade needs its three pictures, named exactly facade_<name>_top / _floors / _ground (.png, .jpg or .webp), next to facades.json.
… is not a PNG, JPEG or WebP picture.Only real pictures are read. Re-export it as PNG.
… is too big: 8 MB at most.Make the picture smaller, or save it as PNG with fewer colours.
The mod is too big: 25 MB at most.The whole zip must be under 25 MB.
Some of its pictures could not be read (or are bigger than 4096 dots a side).A picture is broken, or wider / taller than 4096 px.
That site does not let the game download the file. …Mod Link only: the site does not allow downloads from other sites. Host the zip where it does (see "Sharing a mod").
The link answered 404 - check that it is right.Mod Link only: the address is wrong, or the file is private.
Only https:// links can be used.Mod Link only: use the https:// address of the file.
↑ Contents

12. Checklist, tips and credits

Before you share

Tips

Credits

The example facades — Brownstone, Limestone, Art Deco, Mediterranean and Shop Terrace — shown throughout this guide and used by the game are from
Pixel Facades – 100 Building Textures by najjar320
https://najjar320.itch.io/pixel-facades-100-building-textures

The Citynauts · Facade Mods Guide · for the map menu's Textured, Fully Textured, Realistic, User Mod and Mod Link... modes. Also as a PDF.

↑ Contents