{"id":51174773,"url":"https://github.com/phobos-dthorga/mod-pz-epr-cleanup","last_synced_at":"2026-06-27T03:03:49.622Z","repository":{"id":339510213,"uuid":"1160946716","full_name":"phobos-dthorga/mod-pz-epr-cleanup","owner":"phobos-dthorga","description":"Utility mod to remove Extensive Power Rework (EPR) data from Project Zomboid B42 save files","archived":false,"fork":false,"pushed_at":"2026-03-18T23:15:07.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-19T12:40:35.537Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phobos-dthorga.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-18T15:01:37.000Z","updated_at":"2026-03-18T23:15:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/phobos-dthorga/mod-pz-epr-cleanup","commit_stats":null,"previous_names":["phobos-dthorga/mod-pz-epr-cleanup"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/phobos-dthorga/mod-pz-epr-cleanup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phobos-dthorga%2Fmod-pz-epr-cleanup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phobos-dthorga%2Fmod-pz-epr-cleanup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phobos-dthorga%2Fmod-pz-epr-cleanup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phobos-dthorga%2Fmod-pz-epr-cleanup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phobos-dthorga","download_url":"https://codeload.github.com/phobos-dthorga/mod-pz-epr-cleanup/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phobos-dthorga%2Fmod-pz-epr-cleanup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34839888,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-27T02:00:06.362Z","response_time":126,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-27T03:03:49.056Z","updated_at":"2026-06-27T03:03:49.608Z","avatar_url":"https://github.com/phobos-dthorga.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n  ________________________________________________________________________\n / Copyright (c) 2026 Phobos A. D'thorga                                \\\n |                                                                        |\n |           /\\_/\\                                                         |\n |         =/ o o \\=    Phobos' PZ Modding                                |\n |          (  V  )     All rights reserved.                              |\n |     /\\  / \\   / \\                                                      |\n |    /  \\/   '-'   \\   This source code is part of the Phobos            |\n |   /  /  \\  ^  /\\  \\  mod suite for Project Zomboid (Build 42).         |\n |  (__/    \\_/ \\/  \\__)                                                  |\n |     |   | |  | |     Unauthorised copying, modification, or            |\n |     |___|_|  |_|     distribution of this file is prohibited.          |\n |                                                                        |\n \\________________________________________________________________________/\n--\u003e\n\n# PhobosEPRCleanup\n\n**Version:** 1.0.0 | **Requires:** Project Zomboid Build 42.14.0+ | PhobosLib 1.3.0+\n\nA small utility mod that removes all **Extensive Power Rework (EPR)** data from save files, allowing you to cleanly uninstall EPR without lingering side effects.\n\n## Problem\n\nThe EPR mod (Workshop ID 3643765614) crashes on load in certain PZ Build 42 versions, leaving orphaned data in save files that causes:\n\n- **Power and water never shutting off** (EPR sets ElecShutModifier/WaterShutModifier to max int)\n- **Water coolers showing \"zone is offline\"** (EPR modifies building power/water state)\n- **Orphaned world modData** bloating save files\n\n## What It Does\n\n1. **Restores sandbox variables** -- reads EPR's backed-up original ElecShutModifier/WaterShutModifier values and writes them back to disk via `getSandboxOptions():set()` + `toLua()`\n2. **Resets building state** -- calls `setHasElectricity(false)` / `setHasWater(false)` on all EPR-connected buildings, letting vanilla mechanics re-evaluate power\n3. **Removes EPR world modData** -- deletes `EPR_GridData`, `EPR_PowerController`, `EPR_GlobalData`, and `EGO_GridData`\n4. **Notifies the player** -- shows a modal dialog summarizing exactly what was cleaned\n\n## What It Does NOT Do\n\n- Does **not** scan every world object for `EPR_SpriteGenerator` markers on individual generators. These orphaned boolean markers are harmless and ignored by the game when EPR is not loaded.\n- Does **not** modify save files on disk directly -- operates through PZ's normal modData API at runtime.\n- Buildings not currently loaded in memory (far from the player) may retain EPR state until visited. Use `ForceRerun` if needed.\n\n## Usage\n\n1. **Unsubscribe from / disable EPR** (the mods are declared incompatible and cannot both be active)\n2. Subscribe to **PhobosLib** and **PhobosEPRCleanup** on Steam Workshop\n3. Enable both mods in your mod list\n4. Load your save -- cleanup runs automatically on first load\n5. Check the on-screen modal for results\n6. Unsubscribe from PhobosEPRCleanup (and PhobosLib if no other Phobos mods are installed)\n\n## Sandbox Options\n\n| Option | Default | Description |\n|--------|---------|-------------|\n| Run EPR Cleanup | ON | Execute full EPR data removal on next load |\n| Restore Sandbox Variables | ON | Restore ElecShutModifier/WaterShutModifier to pre-EPR values |\n| Force Re-run | OFF | Clear guard flag and re-run cleanup (one-shot, resets after use) |\n\n## Dependencies\n\n| Mod | Workshop ID | Purpose |\n|-----|-------------|---------|\n| [PhobosLib](https://steamcommunity.com/sharedfiles/filedetails/?id=3668598865) | 3668598865 | World modData stripping, sandbox variable access |\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphobos-dthorga%2Fmod-pz-epr-cleanup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphobos-dthorga%2Fmod-pz-epr-cleanup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphobos-dthorga%2Fmod-pz-epr-cleanup/lists"}