You are viewing a potentially older version of this package. View all versions.
The_Protectorate-CityPlanner-1.2.0 icon

CityPlanner

Design your own city in a planner that sends it straight to the game. Paint districts and let the game fill in the rest, or choose every building, facing and street yourself. Also loads city packs like Margin City.

Date uploaded a week ago
Version 1.2.0
Download link The_Protectorate-CityPlanner-1.2.0.zip
Downloads 17
Dependency string The_Protectorate-CityPlanner-1.2.0

This mod requires the following mods to function

BepInEx-BepInExPack_IL2CPP-6.0.755 icon
BepInEx-BepInExPack_IL2CPP

BepInEx pack for IL2CPP x64 Unity games. Preconfigured and ready to use.

Preferred version: 6.0.755

README

City Planner

Design your own Shadows of Doubt city instead of rolling random seeds. You decide the size, how many people live there, where each district goes and how rich it is. Then plan as much or as little of the rest as you like: choose every building and street yourself, or leave any of them to the game. Interiors and residents are always generated as usual.

Plan it loosely or exactly:

  • Quick: paint the districts and leave everything else on game decides. The game picks buildings that suit each district and lays out the streets itself.
  • In between: place the landmarks you care about (City Hall, a hotel, a park belt) and let the game fill in the rest.
  • Exact: choose the building on every tile, which way each one faces, the businesses inside it, and which gaps between tiles are main roads, back streets or alleys.

City Planner is what built Margin City. It also installs city packs: any mod that ships city files gets them added to your city list.

What you control

  • Size: how many blocks wide and tall, from 3 × 3 to 14 × 14, so bigger than the game's own largest if you want. The game adds a ring of waterfront around the blocks you plan.
  • Population: fewer or more residents than the game would normally put in.
  • Districts: where each one is, its name, its type (Residential, CBD, Chinatown, Red Light, Industrial…), its wealth and its density.
  • Buildings (optional): which building goes on each tile, and which side its front faces. Tiles left on game decides get a building the game picks for that district.
  • Businesses (optional): choose what goes in a building's shop units: the bar on the corner, the pharmacy next door, the gambling den in the basement. Units you leave alone are filled by the game.
  • Streets (optional): paint any gap between two tiles as a main road, back street or alley. Gaps you leave alone are decided by the game.

The plan also changes how wealth works in your city:

  • Homes take their wealth from their district, so a rich district is rich from the ground floor up (in the base game it mostly depends on how high up a flat is).
  • Clean streets in rich districts. Shacks, barrel fires and street junk stay out of them.
  • Themed streets follow the districts. Chinatown's gates appear where streets enter or leave Chinatown.
  • Optional open alleys: in districts you list, alleys become back streets without dead-end walls.

How to plan a city

  1. Start the game, open New Game, and click City Planner. The planner opens in your web browser, on the plan the game is using if you have one, otherwise on a blank 5 × 5 blocks. Load Margin City example shows a finished plan to learn from.
  2. Plan the city: set the size, Paint districts, then pick buildings tile by tile or leave them on game decides. Paint streets lets you paint the strips between tiles. The Checks panel flags anything the game won't allow.
  3. Click Send to game. The game must be running; any screen is fine. If it's busy generating a city, your plan is used for the next one.
  4. On the New Game screen, pick "Planned city (… blocks)" as the city size and generate. Keep the game window in front while it generates: it pauses in the background.

Your plan is also saved as BepInEx/config/cityplan.txt, so it's still there next time you start the game. Prefer a text editor? Write that file yourself (cityplan.example.txt in the mod's folder is Margin City's plan, with comments); City Planner picks up changes when you open New Game. city-planner.html in the mod's folder also works if you open it straight from disk.

Not happy with the result? Generate again with a different seed: your districts, buildings and painted streets stay where you put them, while everything else changes.

Painted streets

Every pair of neighbouring buildings has a road between them; you choose what kind:

  • Main road: a named street. Main roads run straight and change name where they cross another main road.
  • Back street: a quiet lane.
  • Alley: a narrow-feeling lane with alley dressing. Alleys that touch become one alley, so no dead-end walls split them.

Buildings turn to face the busiest street beside them, and shops prefer busy streets, so a painted main road gets the frontages and the businesses. A front you set on a tile always wins.

In cityplan.txt the streets are a [Streets] section, counted like the map (rows and columns from the top left):

[Streets]
R3 C1-C7 S = main          # the south side of row 3, columns 1 to 7
R5-R7 C1-C3 edge = main    # all the way round a 3 x 3 block
R5-R7 C1-C3 inside = back  # the lanes inside it

The gaps can't be added, removed or narrowed: every road is as wide as the game makes it. Without a [Streets] section, the game lays out all streets itself.

Businesses

Buildings with shop units show them when you click the tile: pick a business for any unit, or leave it to the game.

Unit Businesses
Eatery (street level) Bar, Fast food, Chinese restaurant
Shop (street level) Pharmacy, Launderette, Hardware store, Pawn shop, Supermarket, Sync clinic
Den (back rooms and basements) Gambling den, Loan shark, Black market trader, Black market sync clinic, Weapons dealer, Squat, Empty
Building Eateries Shops Dens
Commercial Tower 1 2 5
Apartment Tower (One Fifth) 1–2 0–1 8
Apartment Tower (Netherland) 0–1 1–2 8–12
Town-house with shopfront 1 1 4
Town-house – – 5
Mixed Industrial 1 – 3
Fathoms – – 2
Hotel – – 4

The two apartment towers have two possible street-level layouts, and the game picks one for each tower. A business marked if room in the planner only appears if the tower gets the layout with that unit. The game allows at most 3 hardware stores, pawn shops, gambling dens, loan sharks, black market traders and black market sync clinics, and 4 weapons dealers. Extra ones are left to the game. If a business can't be placed, the unit is left to the game and LogOutput.log says why.

In cityplan.txt the businesses are a [Businesses] section, one line per tile:

[Businesses]
R5 C1 = Bar, Pharmacy, Gambling Den
R3 C3 = Sync Clinic, Supermarket

Settings

In BepInEx/config/sodmods.cityplanner.cfg:

Setting What it does
Wealth / DistrictHomeWealth Homes take their wealth from their district (on by default).
Wealth / AverageStreetWealth Street decoration follows the average wealth along the street (on).
Wealth / StreetThemes Themed street decoration follows the districts a street runs through (on).
Wealth / ChinatownGatesAtEdges Chinatown's gates only where streets enter or leave it (on).
Wealth / GritDecorations, GritFreeFrom Which street decorations count as grit, and from which wealth level they're kept out.
Streets / OpenAlleysIn Districts (by planned name) where alleys become back streets. Not used when the plan paints its own streets.
Sizes / Keep Every city size you've planned, so cities made at those sizes still load. Filled in automatically; never remove or reorder entries.
Planner / Port The port the planner page uses to send plans to the game (on this PC only). Change it only if another program needs port 47811.

Every setting only affects cities generated with a plan. Without a cityplan.txt, city generation is unchanged.

Is the planner connection safe?

Send to game goes from your browser to the game over a connection that only works on your own PC. Nothing goes over the internet, and only the City Planner page can use it: plans from anywhere else are refused. It's open only while the game is running.

Safe to remove?

Not for planned cities with a custom size. A city made at a size the game doesn't have (such as 9 × 10) needs City Planner to load, and so does any city pack built that way, including Margin City. Saves in normal-sized cities aren't affected and load without it.

Compatibility

  • Built for the main (IL2CPP) branch of the game.
  • Works alongside other mods, including The Protectorate's.

Feedback

Built a city you're proud of? Share the plan or the share code on the Thunderstore page.


Made with the help of AI (Claude, by Anthropic). Designed, play-tested and released by The Protectorate.

CHANGELOG

Changelog

1.7.1

  • Fixed the purple laser screen still showing at the entrance to the old Echelon floors in cities built with Echelon floors off. The screen switches itself on by floor number, not by whether the floor is an Echelon floor; it now stays off on ordinary floors. This part needs City Planner installed while you play. Reported by Tayelikel.

1.7.0

  • No Echelons, if you like: untick Echelon floors in the planner and the towers' top floors are built as ordinary floors, with normal apartments and decor and no trespassing rules. It's baked into the city, so it holds without City Planner. In the plan it's Echelons = off under [City]. If a city ever stops partway through generating with Echelons off, generate it again (another seed, or with Echelons on), and send me your LogOutput.log.

1.6.0

  • Dead ends: a new Dead end brush in Streets paints an alley with a wall across its middle, so each half is a dead end, like the game's own walled-off alleys. One strip is enough. In the plan it's = deadend. Suggested by Tayelikel.

1.5.0

  • Paint your own colours: under the floor, walls and ceiling you've chosen in Decor, a colour picker for each part you can paint (marble walls get base and veins, carpets two or three colours). Unpainted parts keep the scheme's colours. Painted colours are saved in the city itself, so they stay even without City Planner.
  • Grime: tick Override grime in Decor and pick spotless to filthy for a building or a whole district. It covers every interior surface: shared spaces, apartments and businesses.
  • Rich lobbies are clean now. The game set lobby grime from the district's value the wrong way round, so the richer the district, the grimier its lobbies and stairwells. In planned cities it now goes the right way: very rich is spotless, very poor is filthy.
  • No more flooded basements, if you like: set Basements / Flooded to false and the water in the lowest basements is gone in every city while you play (needs City Planner installed).
  • Paint, grime and dry basements were all suggested by Tayelikel.

1.4.1

  • Wood tone: choose how light or dark the wood is in a building's shared spaces. Wood floors, marble floors and wooden trim take the wood tone, not the colour scheme, so until now they came out light or dark by chance.
  • See what the colours do: under each floor, wall and ceiling, dots in your scheme's colours show which of its five colours it takes, so you can see "white marble" before you pick it. Ones that keep their own colours say so.

1.4.0

  • Decor: a new Decor step in the planner sets the colours, floor, walls, ceiling and era of a building's shared spaces (lobby, stairwells, building bathrooms), for one building or as a default for a whole district. Pictures of each floor and wall come from the game itself. Lobbies keep what you chose instead of swapping to lino or marble on the ground floor and in stairwells. In the plan this is a [Decor] section. Suggested by Tayelikel.

1.3.0

  • Choose your apartment: pick a building and an apartment number under Your apartment in the planner (a [Home] section in the plan). With Home / Mode on Own it's your starting apartment; on Buy nobody moves in and it's listed for sale. Idea and first version by Tayelikel.
  • Added a Thanks section to the README.

1.2.2

  • Corrected the README's Safe to remove? section: cities and saves load without City Planner (tested with Margin City). You only need it to generate a planned city. No changes to the mod itself.

1.2.1

  • Towers get the layout your businesses need. One Fifth and Netherland towers have two street-level layouts, and the game used to pick one at random, so a Netherland asked for Fast Food and a Launderette could roll the layout with two shops and no eatery. City Planner now picks the layout that fits, and the planner warns about a mix neither layout holds.
  • Fixed loading a second save in one session in custom-size cities (planned cities, Margin City): it froze on Creating Blueprints. Going back to the main menu rebuilt the game's list of city sizes without the extra ones, so the game looked for the city at 5 × 5. The extra sizes are now added back every time.
  • Tighter planner link: only the planner page the game opens can send plans to it now. Each game session makes a new secret code that's written into that page, and requests without it are refused. Before, a page opened from disk was also accepted, and a website could pretend to be one. A planner tab left open from an earlier session asks you to reopen it from the City Planner button; your plan is kept.
  • New setting Planner / Link: turn it off and the game opens no connection at all. The City Planner button then opens the page from disk, and you save plans with Copy cityplan.txt.

1.2.0

  • Choose the businesses in a building: click a tile to pick what goes in each of its shop units, such as a bar, pharmacy, launderette, pawn shop or sync clinic at street level, or a gambling den, loan shark or weapons dealer in the back rooms. Units you leave alone are filled by the game as before. In the plan file this is a [Businesses] section.
  • The planner warns when a plan asks for more of a business than the game allows, or fills every unit without one the city needs, such as a sync clinic.

1.1.1

  • Fixed saves that wouldn't load (stuck on "Creating interiors" or "Loading game state") in cities planned with some tiles left on game decides. Placed buildings were numbered ahead of the rest, so on load an address could lose its number and every citizen who liked that place broke the load. Cities you already generated load again with this update; new cities are numbered the way the game expects.
  • Planned city sizes are set up as soon as the game starts, not only after opening New Game.

1.1.0

  • City Planner is now its own mod. It used to ship inside Margin City; Margin City is now a city pack that uses it.
  • City packs: any installed mod that ships city files gets them added to your city list, not just Margin City.
  • Planner in the game: a City Planner button on the New Game screen opens the planner in your browser, and Send to game hands your plan straight to the game. No files to copy, no restart. The planner also comes with the mod as city-planner.html.
  • Plan as much or as little as you like: any tile can be left on game decides (? in the plan), so you can just paint districts and let the game choose the buildings.
  • New planner buttons: Start blank, Clear districts, Clear streets, and Undo for the last clear.
  • Hand-edited cityplan.txt changes are picked up when you open New Game, and every planned city size is remembered automatically.
  • Painted streets: choose which gaps between tiles are main roads, back streets or alleys (Paint streets on the planner page, or a [Streets] section in the plan). Buildings face the busiest street beside them, so main roads get the frontages and shops. Touching alleys join up with no dead-end walls.

1.0.0 – 1.0.4

Released as part of Margin City; see its changelog.