• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Electricity Overhaul Mod

Wow, finally someone did a mod for electricity !
If I could wish me stuff what I am waiting for is a mod that supports logic gates (xor, or / nand / and ...) and a kind of mod that can wire up blocks that can react (move) to electricity signals (like Minecraft pistons or so:


).

 
Hey ocbMaurice!

I am trying to install this mod on my server (Ubuntu 18) but I am not having any luck with it. It looks like it has problems loading BepInEx libraries.

System.TypeInitializationException: The type initializer for 'BepInEx.Unix.UnixStreamHelper' threw an exception. ---> System.TypeInitializationException: The type initializer for 'MonoMod.Utils.DynDll' threw an exception. ---> System.DllNotFoundException: dl
  at (wrapper managed-to-native) MonoMod.Utils.DynDll.dlerror()
  at MonoMod.Utils.DynDll..cctor () [0x00013] in <e54299200d7d4726aec081e4ca77de7e>:0
   --- End of inner exception stack trace ---
  at BepInEx.Unix.UnixStreamHelper..cctor () [0x00046] in <21687ed02f254d4d983e1f2ff8bf6eb1>:0
   --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
  at BepInEx.Unix.LinuxConsoleDriver.Initialize (System.Boolean alreadyActive) [0x00007] in <21687ed02f254d4d983e1f2ff8bf6eb1>:0
  at BepInEx.ConsoleManager.Initialize (System.Boolean alreadyActive) [0x0002c] in <21687ed02f254d4d983e1f2ff8bf6eb1>:0
  at BepInEx.Preloader.Preloader.Run () [0x0000a] in <de825a3c20cb41c5b2a60e492584dd77>:0


I can also not add any of the configurations, otherwise the server will not start. Here's the last few line of the output.log (even though I'm sure they won't help):
 

Caught fatal signal - signo:11 code:1 errno:0 addr:0x50
Obtained 10 stack frames.
#0  0x007f818e60c980 in funlockfile
#1  0x007f818fbe7eb7 in PhysicsManager::GetDefaultPhysicsSceneHandle() const
#2  0x007f818fb23fab in UnityScene::~UnityScene()
#3  0x007f818fb20f6c in RuntimeSceneManager::~RuntimeSceneManager()
#4  0x007f818fb207e5 in StaticDestroyRuntimeSceneManager(void*)
#5  0x007f818f86898f in RegisterRuntimeInitializeAndCleanup::ExecuteCleanup()
#6  0x007f818fb0670a in RuntimeCleanup()
#7  0x007f818fcdeb8a in PlayerMain(int, char**)
#8  0x007f818e22abf7 in __libc_start_main
#9  0x0055e2aab98029 in _start


In game whenever I try to do any electricity related activity, the console opens with an "EXC EndOfStreamException".

I am not that familiar with C# and do not want to randomly try and update BepInEx or whatever dependencies your mod uses. Would you be willing to look into this?

If it helps, I'd be willing to give you a call on Discord or Jitsi and try to debug it with you together.

 
Last edited by a moderator:
Is there any way to prevent this from loading when connecting to an MP dedicated server over the internet that does NOT run the mod?

I have 2 servers, one has mods, one vanilla. If this mod is in my client mod folder, I get errors in the non modded server, so I have to move the mod out of the mods folder if I want to play in the non modded server...

And then, I have to move it back to play in the modded server.

Same goes for the Electricity Workarounds mod you authored, but the other electricity mods (windmill, wire colors, no wires) seem to work fine so far no matter which server I connect to.

 
Last edited by a moderator:
Is there any way to prevent this from loading when connecting to an MP dedicated server over the internet that does NOT run the mod?

I have 2 servers, one has mods, one vanilla. If this mod is in my client mod folder, I get errors in the non modded server, so I have to move the mod out of the mods folder if I want to play in the non modded server...

And then, I have to move it back to play in the modded server.

Same goes for the Electricity Workarounds mod you authored, but the other electricity mods (windmill, wire colors, no wires) seem to work fine so far no matter which server I connect to.


Why don't you have 2 copies of 7 Days, one moded and one not?  Just copy and paste your 7 Days directory, create a shortcut to the new exe and bam.

image.png.82385286c10a9e3715182968637d329e.png


image.png.417cb74264c9843fbe90094c01cef815.png


 
Why don't you have 2 copies of 7 Days, one moded and one not?  Just copy and paste your 7 Days directory, create a shortcut to the new exe and bam...
First, because it is unnecessary and wasteful of limited SSD capacity, it is only necesary to copy the mods folder not the entire 7DTD folder.

Second, it is unnecessary because it CAN be done this way, as several other similar mods do not load unless the server is also running the same mod.

Thnaks for your input though, all ideas are helpful in the long run...

 
First, because it is unnecessary and wasteful of limited SSD capacity, it is only necesary to copy the mods folder not the entire 7DTD folder.

Second, it is unnecessary because it CAN be done this way, as several other similar mods do not load unless the server is also running the same mod.

Thnaks for your input though, all ideas are helpful in the long run...


Create a simple batch file to move all the necessary files to a diff location and then run 7 days?  Prob pretty easy to do both ways. 

 
On 2/8/2022 at 10:03 AM, WhiteLion said:

Wow, finally someone did a mod for electricity !
If I could wish me stuff what I am waiting for is a mod that supports logic gates (xor, or / nand / and ...) and a kind of mod that can wire up blocks that can react (move) to electricity signals (like Minecraft pistons or so:



Off topic I know but man if you want a game with electrics, try Rust lol (edited video link, it was massive and spammy...)

This Electricity Overhaul Mod does seem awesome but I have not tried it because I am a little scared of the BepInEx stuff outside of the mods directory.  I am used to DLLs and whatnot inside the mods directory but not so much the BepInEx stuff which I have only come across in some Valheim stuff.

 
Last edited by a moderator:
...I have not tried it because I am a little scared of the BepInEx stuff outside of the mods directory...
The only issue so far with BepInEx is that on client first load the menus are screwed up so you have to ALT F4 to quit the client, thereafter everything "just works"...

 
I want to know how to correctly install the jo game mod, because my game, doing the common installation, has the menu totally buggy.

 
sorry for the late update, took a week break from 7DTD, the patches you had made to the dev branch for hosted servers are working well. have not noticed any issues so far. once again thanks for the help great mod and looking forward to seeing what happens in the future

 
Works fine on latest stable, but tested on fresh install latest-exp 20.4 b38, no other mods installed, but with the new Mod folder location used...

Mods are now loaded from <UserDataFolder>/Mods (i.e. the folder that also stores saves, e.g. on Windows %APPDATA%/7DaysToDie/Mods) in addition to <game folder>/Mods. In a future build this will change to only load from that new location so no data is written/changed in the program folder at any time.
Tested and failed Bepin install, just same red error as usually get first run, but now everytime, and not functioning.

 
Last edited by a moderator:
Note that I released a faulty dll with version 0.9.2 (which should have been the first version compatible with A20.4).
Please try version 0.9.3, which should hopefully be the correct fix for 20.4 (and backwards) compatibility.
Btw. the new mod location is not supported by this mod and it may never will be (or only on PC).
AFAICT the game will probably support both locations for some time, so for now we stick to what works.
Let's see how things evolve. I guess this is only a first step and more is to come ...

 
Last edited by a moderator:
Note that I released a faulty dll with version 0.9.2 (which should have been the first version compatible with A20.4).
Please try version 0.9.3, which should hopefully be the correct fix for 20.4 (and backwards) compatibility.
Btw. the new mod location is not supported by this mod and it may never will be (or only on PC).
AFAICT the game will probably support both locations for some time, so for now we stick to what works.
Let's see how things evolve. I guess this is only a first step and more is to come ...
OK thanks!

Also did you ever see this post I asked a question, has this issue been looked at?

Is there any way to prevent this from loading when connecting to an MP dedicated server over the internet that does NOT run the mod?

I have 2 servers, one has mods, one vanilla. If this mod is in my client mod folder, I get errors in the non modded server, so I have to move the mod out of the mods folder if I want to play in the non modded server...

And then, I have to move it back to play in the modded server.


 
After some more testing yesterday I've release version 0.9.4 (find it on nexusmods or github).
The problem was a bit more complicated since it hard-baked some values for the changed GamePrefs enum.
Basically it meant the version I compiled was only compatible with the same version as the game dll used during compilation.
I've changed that now to resolve the enum values on runtime instead of hard baking it into the compiled code.

 
After some more testing yesterday I've release version 0.9.4 (find it on nexusmods or github).
The problem was a bit more complicated since it hard-baked some values for the changed GamePrefs enum.
Basically it meant the version I compiled was only compatible with the same version as the game dll used during compilation.
I've changed that now to resolve the enum values on runtime instead of hard baking it into the compiled code.
Unfortunately version 0.9.4 still doesn't work with the A20.4 b42 version of the game.

 
Last edited by a moderator:
Back
Top