mirror of
https://github.com/rehan-remade/universal-modder.git
synced 2026-11-05 01:37:40 +00:00
[PR #251] [MERGED] kb: Cities: Skylines 1 read-only live city dashboard (HTTP server inside a C# mod, Linux, mcs) + example #253
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
rehan-remade/universal-modder#253
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/rehan-remade/universal-modder/pull/251
Author: @GustavoHSCruz
Created: 10/12/2026
Status: ✅ Merged
Merged: 10/12/2026
Merged by: @rehan-remade
Base:
main← Head:kb/cities-skylines-city-dashboard📝 Commits (3)
d22820akb: Cities: Skylines 1 read-only live city dashboard (HTTP server inside a C# mod, Linux, mcs) + examplef7d7e96kb: cities-skylines dashboard: review fixesbf887e3Merge remote-tracking branch 'origin/main' into resolve/pr-251📊 Changes
21 files changed (+3719 additions, -2 deletions)
View changed files
📝
AGENTS.md(+2 -1)➕
examples/cities-skylines-city-dashboard/.gitignore(+2 -0)➕
examples/cities-skylines-city-dashboard/README.md(+143 -0)➕
examples/cities-skylines-city-dashboard/build.sh(+34 -0)➕
examples/cities-skylines-city-dashboard/media/charts.png(+0 -0)➕
examples/cities-skylines-city-dashboard/media/city.png(+0 -0)➕
examples/cities-skylines-city-dashboard/media/day-and-night.png(+0 -0)➕
examples/cities-skylines-city-dashboard/media/deathcare-reach.png(+0 -0)➕
examples/cities-skylines-city-dashboard/mod/CityDashboard.cs(+1145 -0)➕
examples/cities-skylines-city-dashboard/remove.sh(+8 -0)➕
examples/cities-skylines-city-dashboard/tools/mock_game.py(+340 -0)➕
examples/cities-skylines-city-dashboard/web/src/1-nucleo.js(+238 -0)➕
examples/cities-skylines-city-dashboard/web/src/2-mapa.js(+407 -0)➕
examples/cities-skylines-city-dashboard/web/src/3-regras.js(+230 -0)➕
examples/cities-skylines-city-dashboard/web/src/35-telas.js(+163 -0)➕
examples/cities-skylines-city-dashboard/web/src/4-visoes.js(+493 -0)➕
examples/cities-skylines-city-dashboard/web/src/base.html(+49 -0)➕
examples/cities-skylines-city-dashboard/web/src/estilo.css(+207 -0)📝
knowledge/INDEX.md(+2 -1)➕
knowledge/games/cities-skylines/read-only-live-city-dashboard-for-cities-skylines-1-an-http-.md(+215 -0)...and 1 more files
📄 Description
A second field note for Cities: Skylines (the existing one maps the APIs and containers and says no mod was built) plus a worked example: a read-only mod that serves a live browser dashboard of the running city.
What the note records
IUserModAPI, compiled on Linux with plainmcsagainst the game's assemblies. No Unity editor, no Harmony, nothing patched.FindPluginInfoskips disabled plugins; overwriting the DLL in a running game does nothing.SimulationManager.AddAction(runs even while paused), and the measured cost of collecting a 9,600-building map on each.ImmaterialResourceManager, the natural resource grid, zone-block geometry, road segments as Bézier curves, service vehicles, the budget-to-capacity curve, day/night budgets, engine limits.Player.logis truncated on every start; core dumps from the Steam runtime container do not unwind on the host.What the example contains (
examples/cities-skylines-city-dashboard)mod/CityDashboard.cs: the mod (aTcpListenerHTTP responder, on-demand collection on the simulation thread, weekly history, day/night sampler).web/src/: the page (canvas map, info views, advisor rules, full-screen charts, day/night budget advice).tools/mock_game.py: serves the page against a synthetic city in the same wire format, so it opens without the game. The screenshots come from it.build.sh/remove.sh. The game's assemblies are referenced at compile time and never copied.Honesty
in-progress, notworking: on the machine it was built on, the game aborted one second into a save with the mod installed and a never-saved city was lost. Three scripted save runs with the same DLL did not reproduce it, the cause is unknown, and the mod is not cleared. The note's Gotcha 1 and the example README say so up front.Checks
um kb check <note>andum kb check --index: pass (183 notes).um publish check examples/cities-skylines-city-dashboard --game <install>: pass, 17 files, 0 warnings.um publish check .: 0 failures (the 2 warnings are in existing notes).uv run --with pytest pytest -q tests: 99 passed, 1 skipped.Also adds the example to the "Worked examples" line in
AGENTS.md.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.