Jump to content

Electricity Overhaul Mod


Recommended Posts

I recently read through the patch notes for A20 and it looks like the patching software that DMT uses (HarmonyX) is going to be shipping with the new alpha. Which may or may not be able to completely remove the necessity of using DMT. IF it does, and it is possible, would there be any chance to update the mods for that "new" system?

Link to comment
Share on other sites

Sorry to bother you. but I really love the idea of this mod. I have it working for single player, but I can't figure out how to get it on my dedicated host. It's provided by Bisect Hosting. I tried to just copy the dll's and the mods, but the server won't start that way.
I've never messed with DMT and I can't seem to find how to do this with several google searches.

Link to comment
Share on other sites

One can add the dedicated server path also in the DMT settings:




Once you compile the wanted mods, the patched dlls should be in that folder.
If your remote server is the same version and OS, you should be able to copy them over.
Other than that I also don't have any experience how to patch dedicated servers...


BTW: A20 compatibility is probably still not possible out of the box.
Although we might find a way to make it somewhat smoother than it is ATM.

Edited by ocbMaurice (see edit history)
Link to comment
Share on other sites

Yeah just copied those 3 files, and the mods to the mods folder. I left them on my host, just renamed the Assembly-CSharp.dll and it's fine. But using the patched Assembly and the server tries to connect to localhost and fails to launch.

Localhost [*IP] *port (tproxy) : Connection refused
Waiting for telnet connection...


*has real numbers.
Just repeats that over and over.

Link to comment
Share on other sites

I've update the top post on this thread since I successfully ported this mod to A20.

There are a few edge issues with this mod, as it needs to modify the assembly-csharp.dll.
Previously this was either done via DMT or 7D2DModLauncher, but with A20 no such established

method exists. Therefore I tried to be smart and added BepInEx to the mix, with a "some-what"

auto-detection and install method. You will need to store this mod under a specific name in your

`Mods` folder in order for it to find the necessary files to install on the first run. The game will

give you a scrambles/broken screen on the first run, but should recover on a second run 🤞

Link to comment
Share on other sites

I am confused on the current install process. I am playing on Alpha 20 and I am a noob to modding. 


Do I simply unpack the archive into the Mods directory? From my understanding of the comments I've seen on here you've built the mod to install BepInEx automatically, which works for me, but when I try to load or create a map the terminal outputs a load of errors saying:

ERR: GamePrefs: Trying to access non-existing pref 210
ERR: GetBool: GamePref 210/Last does not have a value/default

Am I missing steps? Do I need to use DMT to build the new files? From what I have seen, DMT isn't yet compatible with A20, and it seems that BepInEx integration was intended to replace it. Can anyone point to where I am going wrong?



Link to comment
Share on other sites

Amazing work, ocbMaurice. Truly. It feels like the way things should have been implemented in the vanilla game from the start.


I would like to request some clarification on which mods are add-ons/companions to the overhaul and which are included within the overhaul itself. Its hard to figure out which is which for me and there is some conflicting information regarding that. For example the main post here has a list of mods after a statement saying the overhaul "consists of several other smaller mods that should all work standalone." However, when you go to the Overhaul's github there is another list of "additional recommended mods." The problem is that these lists are for the same mods. Very confusing. Is there any way that I could get a list of addon mods only so that I do not download mods that are already included within the actual overhaul itself?


I apologize for my confusion and I thank you for your time.

Link to comment
Share on other sites

I've updated the main page a little since I successfully tested it on linux (needs a custom startup script though).

It also seems some people got confused what is included in this mod directly and what not:
I hope the sentence "Pick the ones you like and install them beside the overhaul mod." clarifies that.
First I had everything included in this mod but then started to break things out into their own mods.
That's why the docs are sometimes a bit misleading (keeping everything up to date is a chore).


To be clear: There are not "overlapping" mods.

Edited by ocbMaurice (see edit history)
Link to comment
Share on other sites

1 hour ago, leosky said:

Hello, i have a issue with this mod used in conjunction with https://www.nexusmods.com/7daystodie/mods/1783


When the power of a single generator in the bank, it seems to max each one to 50w. I can give you access to the server to check if you want.

I have that other mod as well. When I placed one of those generators it gave an error to every player. And I get the same error every time I open one. Any chance at a compatibility patch? Or should we ask that modder?

Link to comment
Share on other sites

29 minutes ago, Arlack said:

I have that other mod as well. When I placed one of those generators it gave an error to every player. And I get the same error every time I open one. Any chance at a compatibility patch? Or should we ask that modder?

well, i that's the point of this post, i saw fallback to 50w in the code but didn't checked too far. I think it's not a More Power issue, just some fix to make to the mod.

Link to comment
Share on other sites

4 hours ago, ocbMaurice said:

That's why I have this disclaimer at GitHub:
"Probably incompatible with anything else touching electricity!"
I may take a look, but no guarantee if or when that will be ...


The said mod just use xml, that's why i though it was a bug. But i admit i didn't read all the things 🤐

Link to comment
Share on other sites

I removed the other mod, as I wanted to use yours more, and the problems did not go away. I had to remove the overhaul mod of yours from my local mods folder as I could not launch the game with it in single player or on the server. Even with it not on the server anymore. Not sure what's going on. But after I removed Overhaul and put back in mo power, everything has been fine. I don't remember the exact error, but something about trying to read past the end or something. Sorry I can't recall the exact error message. 

Link to comment
Share on other sites

  • 2 weeks later...

FYI: There have been some updates in the meantime:


0.8.0: https://github.com/OCB7D2D/ElectricityOverhaul/releases/tag/0.8.0

  • Fixed some compatibility issues with other mods
    We now use OutputPerStack as a scaling factor
    We no longer hard-code MaxFuel for generators
  • Cleaned up and refactored update routine a bit
  • Improved and fixed EnumGamePrefs patching

0.9.0: https://github.com/OCB7D2D/ElectricityOverhaul/releases/tag/0.9.0


This release only tries to optimize CPU utilization and to improve frame update
congestion. As such this update is kinda experimental, although the changes seem
rather safe, but there will always be dragons. So if you're happy with version 0.8.0
you don't need to upgrade immediately. Upgrading existing maps should be possible,
but you should always make a Backup when early adopting such a mod upgrade!

Link to comment
Share on other sites

Hi, I am new to the forum. I am very sorry if this has all ready been answered or in the wrong place. I am trying to add your Electric Overhaul mod to my hosted server and as such do not have direct access to the server config xml file to add the options that you outline in your github.


is it necessary to add these options to the server config xml, or can I add these options to another area and if so where would that be?

<property name="LoadVanillaMap" value="false" />
<property name="BatteryPowerPerUse" value="25" />
<property name="MinPowerForCharging" value="20" />
<property name="FuelPoweerPerUse" value="750" />
<property name="PowerPerPanel" value="30" />
<property name="PowerPerEngine" valu="50" />
<property name="PowerPerBattery" value="50" />
<property name="ChargePerBattery" value="35" />


Link to comment
Share on other sites

Hi, I have just been in contact with the admin team at the company who host my server. They were kind enough to try and add the additional options to the server and came up with these errors.

2022-01-19T10:02:41 0.419 INF Parsing server configfile: C:/TCAFiles/Users/[Username]/24824/7DaysToDieServer_Data/../serverconfigmain.xml
2022-01-19T10:02:41 0.441 ERR ====================================================================================================
2022-01-19T10:02:41 0.441 ERR Error parsing configfile property 'LoadVanillaMap': Could not parse config value 'false'
2022-01-19T10:02:41 0.441 INF Make sure your configfile is updated the current server version!
2022-01-19T10:02:41 0.441 INF Startup aborted due to the given error in server configfile
2022-01-19T10:02:41 0.441 ERR ====================================================================================================
2022-01-19T10:02:41 0.441 INF Dedicated server only build

They have asked me to confirm with yourself exactly which file these options need to be added to and where in the file they should be added.

Edited by TitanOfWarer
Remove personal info (see edit history)
Link to comment
Share on other sites

Unfortunately the log is not complete, so I can only speculate.
The mod needs two startups if you don't install BepInEx manually.
So my suspicion would be they only started the server once?
Or that they didn't disable EAC or on linux, didn't use the startup script?
The error simply means the mod is not loaded correctly AFAICT.


Edit: made a sanity check and it seems this feature has regressed with A20.
Simply put my hooks are called too late and no easy way to hook before config parsing.
This means I'd have to port that part to be patched with BepInEx instead of Harmony.

Edited by ocbMaurice (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...