Project Zomboid

Project Zomboid

64 ratings
[B42] Random Power
2
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
61.970 KB
8 May @ 4:04pm
22 May @ 6:08am
4 Change Notes ( view )

Subscribe to download
[B42] Random Power

Description
Idea by u/Free_At_Last2

A simple mod that adds a random chance to turn the power back on for a few hours every now and then.

Note that this mod is low priority for me. I will fix game breaking bugs, but new features will likely not be added for a while.

------------------------------
IMPORTANT
------------------------------
If you want to use this mod and start with electricity being off, you must do this:
1. In sandbox World options, make sure Electricity Shutoff is NOT "Instant"
2. Go to sandbox settings for "Random Power" and enable the option
"Use Instant Power Shutoff"

------------------------------
HOW IT WORKS
------------------------------
First it will check if the power has been turned off in your world, if the power has been turned off, then it will run a check every 8 in-game hours, and when this runs it has a 20% chance (can be changed in sandbox settings) to turn the power back on for 2-6 hours.

NEW: There's now a sandbox option to make it so the power turns on at night and stays on until morning, and it's guaranteed every night (from 22.00 - 06.00)

------------------------------
FAQ
------------------------------
Q: Can I add this mid-save?
A: Yes, but only if you did NOT set Electricity Shutoff to instant when you started the save.

Workshop ID: 3478240794
Mod ID: RandomPowerMod
41 Comments
UsatoAsashi 27 Jul @ 4:35am 
after adding into mid-save, my world has power all the time
Pokemastuh 8 Jul @ 5:42pm 
Hello.

By any chance would this still work with build 41?

Thank you.
seronis 1 Jul @ 9:03am 
New to PZ in general so I dont know everything the base game has. Does there happen to be some kind of energy storage system you can build that will store power while its on (or while a generator runs) and provide that power like a generator while the grid is down? I think it would be interesting for someone to slowly build up energy storage capacity to take advantage when not in middle of a brown out
RedChili  [author] 18 Jun @ 4:45am 
@Timou I can look into it and see if it's just as easy. But I'm not sure how noticeable it would be that the water is back on. With the electricity you can see lights and devices turn on, but water will have to be checked manually.

@ditoseadio Thank you, glad you like it! The only setting you should be mindful of is the Electricity Shutoff and NOT set it to instant, because then the mod will not work. It will wait until the power is turned off before the mod activates, so you can set it to 0-30 days, 6 months, or any other time.

I will look into adding more options for controlling the intervals and stuff, it's just that this mod is not very high priority for me, but it seems a lot of people like the idea of it so I can see if it's quick to add more options.
ditoseadio 11 Jun @ 4:44pm 
Hi, congratulations on this mod—I love it!

I have a question: if I adjust the power settings in the sandbox options, what happens with the in-game setting under the mod tab?

Also, could you include the option to manually adjust how often it checks and how long the power can last? That would be awesome.
Timou 23 May @ 10:39pm 
Can you make the same for water?
RedChili  [author] 22 May @ 6:11am 
Okay the patch is released, it should fix the issues with power not turning back on, on old and new saves. It also fixes so you don't have to quit and load when power turns off to activate the mod, it will detect it by itself now.

I'm migrating the options from mod options to sandbox, it will make the mod compatible when multiplayer is released.

Also added a new option for turning lights on at night and keeping them on until morning
RedChili  [author] 22 May @ 4:17am 
Gonna release a small patch today that should fix the issues with power not turning back off.
I also found why it doesn't work when you set power turn-off to instant, because when you do it literally just does not create a power-grid in the world, so my function to turn power back on just does not do anything.
I will add a sandbox option where you can enable instant shut-off and still use my mod.
RedChili  [author] 20 May @ 4:59am 
So the latest B42.8 patch actually dropped a bunch of new functions for power grid management. I might actually look into making a full on mod where you can restore power to specific areas and stuff like that.
Hawk! 17 May @ 5:23pm 
maybe it has something to do with my day time length? I have days set to last 2 hours or irl time instead of the default one hour of irl time, also when checking in debug mode the electrical shut off was set to its max amount of days possible, unless your mod does that as a way to be able to have power go on n off over time