Automatically demolishes abandoned, condemned, and destroyed buildings. Each category is toggleable in Options → Mods → Auto Bulldozer, with a master switch, a configurable grace period for abandoned buildings, an adjustable sweep frequency, and per-category session demolition counters (with a reset button).
- Windows with Cities: Skylines II installed.
- Visual Studio 2022 (free Community edition works) with the ".NET desktop development" workload.
- Install the CS2 modding toolchain: launch the game, go to Options → Modding (or via the Paradox launcher's game settings) and download/install all modding toolsets. This sets the
CSII_TOOLPATHenvironment variable that this project's.csprojrelies on. Restart Visual Studio afterwards so it picks up the variable.
Either run .\build.ps1 from the project folder (needs only the .NET SDK — no Visual Studio; the script sets DOTNET_ROLL_FORWARD=LatestMajor because the toolchain's post-processor targets .NET 6), or:
- Open
AutoBulldozer.slnin Visual Studio. - Set configuration to Release and build (Ctrl+Shift+B).
Either way, the toolchain automatically copies the built mod to %USERPROFILE%\AppData\LocalLow\Colossal Order\Cities Skylines II\Mods\AutoBulldozer\.
If the build fails with missing references or import errors, CSII_TOOLPATH isn't set — redo step 3 of the prerequisites.
- Launch CS2 and load a city (or start one).
- Check Options → Mods → Auto Bulldozer — you should see the toggles.
- Let the simulation run. Abandoned buildings are cleared a few times per in-game day. The log is at
%USERPROFILE%\AppData\LocalLow\Colossal Order\Cities Skylines II\Logs\AutoBulldozer.log.
- Add a thumbnail: place a square PNG (at least 256×256) at
Properties/Thumbnail.png. Optionally add screenshots and reference them inProperties/PublishConfiguration.xml. - Review
Properties/PublishConfiguration.xml— display name, descriptions, tags, version. - In Visual Studio, right-click the AutoBulldozer project → the toolchain adds publish options (Publish New Mod). You'll be asked to log in with your Paradox account the first time.
- After the first publish, the toolchain writes your
ModIdintoPublishConfiguration.xml. Keep it — future updates use Publish New Version (bumpModVersionand updateChangeLogfirst). - Your mod appears at https://mods.paradoxplaza.com/games/cities_skylines_2 under your Paradox account.
AutoBulldozerSystem is an ECS system that runs during the simulation phase (1–64 sweeps per in-game day, configurable, default 16; no cost while paused or in menus). It queries buildings tagged Abandoned, Condemned, or Destroyed (excluding temporary tool previews and already-deleted entities) and adds the game's Deleted component, letting the vanilla deletion pipeline tear them down cleanly — sub-buildings, renters, and network connections included. Because it only adds a vanilla component, it's save-safe and can be added or removed from a save at any time.
Destroyed buildings are handled more conservatively: only zoned growables (residential/commercial/industrial/office, identified by SpawnableBuildingData on their prefab) are cleared, since the game regrows a building on the freed zone cells. Service buildings, signature buildings, and anything the player placed by hand are skipped, so the option can never delete a service the player would otherwise rebuild.
The optional grace period delays demolition of abandoned buildings by N in-game days, read from the game's own Abandoned.m_AbandonmentTime timestamp — so it's exact and survives saving/loading. Note that vanilla CS2 (DestroyAbandonedSystem) eventually collapses long-abandoned buildings on its own, so a very long grace period may see the building collapse into rubble before the mod demolishes it.
Mod.cs— entry point (IMod): loads settings, registers options UI and locale, schedules the systemSetting.cs— options UI definition and persisted settingsLocaleEN.cs— English strings for the options UIAutoBulldozerSystem.cs— the actual demolition logicProperties/PublishConfiguration.xml— PDX Mods listing metadata