Troubleshooting
The Build Script Cannot Find CS1
Edit the $game path in scripts/build.ps1 so it points to your Cities: Skylines install directory. The script checks for Cities_Data\Managed\ICities.dll before compiling.
The API Does Not Respond
Check these in order:
- The mod is enabled in the CS1 content manager.
- A city is loaded.
- Port
32123is not already in use. scripts/start-resume.ps1orscripts/start-new-map.ps1finished with a/healthresponse.
Roads Look Connected but Traffic Fails
CS1 network crossings are not intersections unless a real node exists. Use:
powershell
Invoke-RestMethod "http://127.0.0.1:32123/state/road-anomalies?nearMissDistance=18&shortSegmentLength=32&includeDeadEnds=false"Then remove the bad segment with /commands/bulldoze and rebuild with endpoints close enough to reuse the intended road nodes.
Service Buildings Intersect Roads
Use:
powershell
Invoke-RestMethod http://127.0.0.1:32123/state/building-anomalies?limit=200Move or replace the building with /commands/move-building or /commands/place-building, then re-check the anomaly endpoint.
Saves Are Not Visible Yet
/commands/save uses CS1's normal save panel path and writes asynchronously. Poll /state/saves after requesting a save, or use:
powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\save-city.ps1 -Name AgentAutoSave-clean