Project Zomboid

Project Zomboid

Blackouts [B41]
Showing 1-10 of 11 entries
< 1  2 >
Update: May 15, 2024 @ 7:28pm

Another crack at Restore Utilities compatibility improvement. Last try for tonight.

Update: May 15, 2024 @ 7:04pm

Attempt to improve compatibility with Restore Utilities and other mods that change ElecShutModifier.

Update: Apr 29, 2024 @ 3:03am

Code clean-up update. Nothing interesting in this one.

Update: Apr 25, 2024 @ 4:15am

Tentative solution to the conflicts with Restore Utilites. Please let us know how things go in the Discussion, as this particular error is not easy to test without feedback from players. I cannot reproduce the issue right now, so it may be resolved, but we will keep the discussion open until players report that things are working as expected.

Update: Apr 19, 2024 @ 5:28am

Burryaga fixed as many things as he could fix, including the conflict with Vishnya's latest update to his timer, power override not working as expected, and fuel pumps and jukeboxes (and probably many other objects from vanilla and other mods) not losing power as expected. Also added French translation (courtesy of Inkredibehl) and a modder-friendly variable for tracking the state of blackouts in this mod.

Update: Feb 27, 2024 @ 4:08am

Fixed a small multiplayer issue involving use of the electricity override in multiplayer servers that had passed the shutoff date. Override should now work correctly, even if you enable it after the shutoff date.

Update: Feb 24, 2024 @ 10:14pm

Changes in this version:
- Added multiplayer compatibility! Thanks to the help of Burryaga!
- Added weather effect option in sandbox (on by default)!
- Added manual blackout trigger for playtests, modders, and server admins!

triggerEvent("BlackoutsForceShutoff") triggerEvent("BlackoutsForceRestore")
- Massive optimization improvements!
- Not a change, but confirmed that the mod works if installed mid run
- Changed the minimum blackout duration and added a sandbox option to control number of hours (sorry for the inconvenience). The default is 1 hour, so most players should not be significantly affected


Known bugs:
- There may be a double sound effect in multiplayer if multiple players are around the same house. Some minor workarounds were made to reduce this effect.
- During a blackout event, public communication like radios will still work as normal. Not a major issue, but it does feel a little weird.
- Not a bug, but there are now multiple empty files in the workshop mod folder. This is to prevent any code from being duplicated and broken.


Explanation of how bonus rolls work for Ramp Up option and Weather Event options:

Ramp up: when the world is less than 14 days away from the world shutoff event, the chance for a blackout will roll twice (same rate as base sandbox option)
Weather event: when the weather reaches a certain intensity, the chance for a blackout will roll twice (same rate as base sandbox option)

Chance is calculated by multiplying the inverse of each chance, then inverting the result

This method is a lot more rigid and might not let people make the odds exactly how they like, so I plan on looking at it again in the future


https://github.com/JoyTomaro/Zomboid-Blackouts

Update: Feb 10, 2024 @ 5:15am

Updated:
- fixed the sound not playing when the power comes back on (i renamed the file to what it says in the script)

- fixed the override option (it used to just store the override date so i can shift it back and forth in the old version). it now properly overrides the shutoff date

- added a simple option to make blackouts ramp up (tried making it exponentially increase over time, but it came with many complications). when you are 2 weeks away from the shutoff date, the blackout chance will "double" (roll chance twice).

-fixed a bug that lets power come back on after the whole grid shuts off
> new bug: if the power is out on the last day before the shutoff, it will not come back on (you will still hear the "BOOM" from the global shutoff, which is cool in its own right)

Update: Feb 7, 2024 @ 8:49pm

Update: Feb 7, 2024 @ 8:45pm

Wrong media folder was uploaded. This is the new version now. Sorry!