Giter Site home page Giter Site logo

bepinex / bepinex Goto Github PK

View Code? Open in Web Editor NEW
4.3K 68.0 554.0 4.35 MB

Unity / XNA game patcher and plugin framework

License: GNU Lesser General Public License v2.1

C# 96.10% Batchfile 0.04% PowerShell 0.01% Shell 3.84%
unity patcher unity3d framework modding bepinex il2cpp xna-framework xna mono

bepinex's Introduction

BepInEx

Github All Releases GitHub release BepInEx Discord

Bepis Injector Extensible


BepInEx is a plugin / modding framework for Unity Mono, IL2CPP and .NET framework games (XNA, FNA, MonoGame, etc.)

(Currently only Unity Mono has stable releases)

Platform compatibility chart

Windows OSX Linux ARM
Unity Mono ✔️ ✔️ ✔️ N/A
Unity IL2CPP ✔️
.NET / XNA ✔️ Mono Mono N/A

A more comprehensive comparison list of features and compatibility is available at https://bepis.io/unity.html

Resources

Latest releases

Bleeding Edge builds

How to install (latest releases)

How to install (Bleeding Edge, BepInEx 6)

User and developer guides

Discord server

Available plugin loaders

Name Link to project
BSIPA BepInEx.BSIPA.Loader
IPA IPALoaderX
MelonLoader BepInEx.MelonLoader.Loader
MonoMod BepInEx.MonoMod.Loader
MuseDashModLoader BepInEx.MDML.Loader
Partiality BepInEx-Partiality-Wrapper
Sybaris BepInEx.SybarisLoader.Patcher
UnityInjector BepInEx.UnityInjector.Loader
Unity Mod Manager Yan.UMMLoader
uMod BepInEx.uMod.Loader

Used libraries

IL2CPP libraries

License

The BepInEx project is licensed under the LGPL-2.1 license.

bepinex's People

Contributors

albeoris avatar astiob avatar bb010g avatar bbepis avatar ds5678 avatar exdownloader avatar gebo1 avatar geneishouko avatar ghorsington avatar ishitatsuyuki avatar js6pak avatar kasuromi avatar keelhauled avatar kein avatar kokaiinum avatar manlymarco avatar miniduikboot avatar notfood avatar simonkellly avatar thelounger avatar therzok avatar usagirei avatar xkiraichan avatar xoxfaby avatar zeroepoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bepinex's Issues

Some plug-ins incompatible with BepInEx 4.0

The new version of BepInEx is not Compatible with PatchWork.
If you run the PatchWork exe file, No load any plugin. Not problem at all with the BepInEx 0.3.2 version.

The new version of BepInEx is not Compatible with IPA plugins, the plugin IPA Plugin Loader 1.2 is loaded but not work any of IPA plugins.

Managed Dependencies, Managed & Plugin priorities, loading queue configuration

Specify by assembly name where in the load order a plugin is best loaded. Egs:
[ManagedDependency("UnityEngine.dll")]
[ManagedDependency("Assembly-CSharp-firstpass.dll")]
so a plugin would only load after these are initialized.

Inversely, an attribute to identify which assemblies a plugin should come before. These would be superseded by dependency attributes and, naturally, BepInEx.

Purpose of this assembly loader.

Hi,
We've had a bit of an indirect discussion before. I'm curious as to why this assembly loader was created since IPA fills a similar role as has plenty of features ready to use.
It feels like reinventing the wheel.

It's not a good idea to encourage users to adopt every new idea that's put out there, and people have been perfectly happy with IPA. I cannot see the motivation for discarding all of that work and starting over.

Full disclosure, I have no association with the developers of IPA.

what happen ?

i wanted to translate mobius final fantasy but it could not. here the log:

BepInEx 4.1.0.0 - mobiusff
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
  at Mono.Cecil.PE.ImageReader.ReadMetadata () [0x00000] in <filename unknown>:0 
  at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in <filename unknown>:0 
  at Mono.Cecil.PE.ImageReader.ReadImage (Disposable`1 stream, System.String file_name) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (Disposable`1 stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0 
  at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in <filename unknown>:0

Imcompatiblity with XtMasterSlave

In particular, when loading COM3D2.XtMS.Patcher.dll in Sybaris the body freeze like when changing, nor can the XtMasterSlave menu be loaded.

Not working

BepInEx 4.0.0.0 - Koikatu
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.MissingMethodException: Method not found: 'Mono.Cecil.AssemblyDefinition.Dispose'.
at BepInEx.Bootstrap.Preloader.Main (System.String[] args) [0x00000] in :0

i did what was asked

Debugging in dnSpy broke in v4.0 (worked in v3.2 and older)

Describe the bug
Trying to debug by replacing mono.dll and starting the game from dnSpy results in the game process hanging with no window open at around 200MB RAM usage and no activity. It worked flawlessly in older releases.

Game starts normally when not watched by dnSpy, but trying to connect to a running game doesn't work.

To Reproduce

  1. Install BepInEx v4.0 or latest master build with doorstep.
  2. Grab dnSpy and unity debug libs from here.
  3. Replace game's mono.dll with the x64 unity-5.6.2 one.
  4. Open dnSpy, drag Koikatu.exe over it, and start debugging it.

Expected behavior
The game should start normally, and dnSpy should not show a timeout message.

Desktop (please complete the following information):

  • Game and game version - latest official update
  • BepInEx version - tested under 4.0 and latest master

Additional context
Everything worked in v3.2, back in the patcher days. If I remove BepInEx.dll then the game loads and debugs correctly, even with the doorstep still in place. Removing harmony and cecil dlls doesn't seem to do anything.

Assembly.Location and Assembly.Codebase are empty when running with preloader

Describe the bug
When using the preloader to bootstrap BepInEx, Assembly.Location and Assembly.CodeBase are empty in preloaded assemblies.

To Reproduce
Create a basic plugin that has the following method:

using UnityEngine;

void Awake() 
{
    Console.WrtieLine("Location of UnityEngine.dll");
    Console.WriteLine(typeof(Application).Assembly.Location);
    Console.WriteLine(typeof(Application).Assembly.CodeBase);
}

Run the game with preloader and console enabled (i.e. through UnityDoorstop).
It will show the following messages on game launch:

Location of UnityEngine.dll


Expected behavior
Assembly location and codebase should be set for all preloaded assemblies and the above example should print

Location of UnityEngine.dll
<path to UnityEngine.dll>
<URI to UnityEngine.dll>

In other words, the path to UnityEngine (and other assemblies in the Managed folder) should have their locations set correctly

Desktop (please complete the following information):

  • BepInEx version [e.g. 4.0]: 4.1.0.0

Additional context
The issue is caused by preloader loading assemblies from memory, in which case the CLR simply can't set the paths correctly.
This should be fixable by caching assembly paths in a map during preloading and either patching Assembly.Location and Assembly.CodeBase via Harmony or by rerouting appropriate internal calls.

Can't Start the game with mods

Describe the bug
It seems like I can't start the game with any mods depending on BepInEx.

To Reproduce
Everything was fine with BepInEx and 2 or 3 mods like ShareSuite, ItemStatMods…
Until I try to run RiskofShame. I may have confirmed something too fast without reading it all...
Since then it seems BepInEx can't recognize any mods, launching the game on the Build ID 3830295

Expected behavior
I've tried to uninstall my steam Game, uninstall GCmanager and BepInEx… But Nothing, eversince then my game can only be launched unmodded, except when i use mods that Don't depend on BepInEx (like BanditPlus),

Screenshots and logs
Here is a copy of the Log Error, using BepInEx, and ShareSuite

[Message:   BepInEx] BepInEx 5.0.0.0 RC1 - Risk of Rain 2
[Message:   BepInEx] Compiled in Unity v2018 mode
[Info   :   BepInEx] Running under Unity v2018.3.0.7248423
[Message:   BepInEx] Preloader started
[Info   :   BepInEx] Loaded 1 patcher methods from BepInEx.MonoMod.Loader
[Debug  :   BepInEx] Loaded 0 patcher methods from Mono.Cecil.Mdb
[Debug  :   BepInEx] Loaded 0 patcher methods from Mono.Cecil.Pdb
[Debug  :   BepInEx] Loaded 0 patcher methods from Mono.Cecil.Rocks
[Info   :   BepInEx] 2 patcher plugin(s) loaded
[Info   :   BepInEx] Patching [UnityEngine.CoreModule] with [BepInEx.Chainloader]
[Info   :   BepInEx] Patching [Assembly-CSharp] with [BepInEx.MonoMod.Loader/BepInEx.MonoMod.Loader.Patcher]
[Message:   MonoMod] [Main] Scanning for mods in directory.
[Message:   MonoMod] [ReadMod] Loading mod dir: D:\Program Files (x86)\Steam\steamapps\common\Risk of Rain 2\BepInEx\monomod
[Message:   MonoMod] [Main] mm.PatchRefs(); fixup pre-pass
[Message:   MonoMod] [Main] mm.AutoPatch();
[Message:   MonoMod] [AutoPatch] Parsing rules in loaded mods
[Message:   MonoMod] [AutoPatch] PrePatch pass
[Message:   MonoMod] [AutoPatch] Patch pass
[Message:   MonoMod] [AutoPatch] PatchRefs pass
[Message:   MonoMod] [PostProcessor] PostProcessor pass #1
[Message:   MonoMod] [Main] Done.
[Message:   BepInEx] Preloader finished
[Message:   BepInEx] Chainloader ready
[Message:   BepInEx] Chainloader started
[Info   :   BepInEx] 1 / 1 plugins to load
[Info   :   BepInEx] Loading [ShareSuite 1.7.2]
[Error  : Unity Log] FileNotFoundException: Could not load file or assembly 'MMHOOK_Assembly-CSharp, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
Stack trace:
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.Application:.cctor()
RoR2.Console:RegisterLogHandler()

[Message:   BepInEx] Chainloader startup complete
Setting breakpad minidump AppID = 632360

Desktop (please complete the following information):

  • Risk of Rain 2 I Don't really know how to check on the version… but I've just installed it today from Steam.
  • bbepis-BepInExPack-2.0.0

Additional context
If you need any further informations please ask me :)

Bepinex 4.0 loads on Koikatsu studio, but not on main game.

Describe the bug
Not loading any plugins on main game. Works fine on studio.

To Reproduce
Everything was fine on previous version of Bepinex, since I upgraded to 4.0.

Expected behavior
Expected to load fine, already followed the migration guide step by step, and installed Visual C++ 2015

Screenshots and logs
preloader_20180719_213430_121.log

Desktop (please complete the following information):
Koikatsu 3.0
Bepinex 4.0

Additional context
Add any other context about the problem here.

BepInEx 4.0 / IPA 3.3 conflict ?

Describe the bug
A clear and concise description of what the bug is.

Error message when trying to launch Koikatu 3.0 if BepInEx 4.0 and IPA 3.3 are installed, no error message if one or the other is installed alone.

To Reproduce
A short description of what you did for the bug to happen.

Clean install of the game and then BepInEx and IPA.

Expected behavior
A clear and concise description of what you expected to happen.

Game launch normally without error message and if mods are installed, It's working correctly.

Screenshots and logs
Include a console log (output_log.txt and/or preloader_xxx_xxx.log), if the error is visible there.
If not possible, include a screenshot of the error.

preloader_20180713_144122_892.log

Desktop (please complete the following information):

  • Game and game version [e.g. COM3D2 1.15]: Koikatu 3.0
  • BepInEx version [e.g. 4.0]: BepInEx 4.0

Additional context
Add any other context about the problem here.

BepInEx 4.1 - black screen error

Describe the bug
Every time I want to run the game it seems like the process is internally frozen. It shows black screen and the only thing that works "well" is... just a cursor.

To Reproduce
Patched the game with BepInEx v. 4.1 and installed latest "[KK] Sexy Schoolgirl Pack D" mod by Roy12.

Expected behavior
I just wanted to play the game. Thought it would work well as always. I was wrong.

Screenshots and logs

Filename: "preloader_20180807_160946_288.log"

BepInEx 4.1.0.0 - Koikatu
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.Exception: BepInEx has been detected to be patched! Please unpatch before using a patchless variant!
  at BepInEx.Bootstrap.Preloader.PatchEntrypoint (Mono.Cecil.AssemblyDefinition& assembly) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.AssemblyPatcher.Patch (Mono.Cecil.AssemblyDefinition& assembly, BepInEx.Bootstrap.AssemblyPatcherDelegate patcherMethod) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.AssemblyPatcher.PatchAll (System.String directory, IDictionary`2 patcherMethodDictionary, IEnumerable`1 initializers, IEnumerable`1 finalizers) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.Preloader.Run () [0x00000] in <filename unknown>:0

Desktop:

  • Game and game version: Patched 1.2
  • BepInEx version: 4.1

System.PlatformNotSupportedException: Operation is not supported on this platform.

Describe the bug
I think preloader doesn't work because in new version of Unity is using .NET(v4.0.30319)

To Reproduce
Just start the game

Expected behavior
To use plugin with new version of game.

Screenshots and logs

 4.1.1.0 - AnyGame
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.PlatformNotSupportedException: Operation is not supported on this platform.
  at System.AppDomain.DefineDynamicAssembly (System.Reflection.AssemblyName name, System.Reflection.Emit.AssemblyBuilderAccess access) [0x00000] in <0000d56de0ae43ca875d7babfd990580>:0 
  at (wrapper remoting-invoke-with-check) System.AppDomain.DefineDynamicAssembly(System.Reflection.AssemblyName,System.Reflection.Emit.AssemblyBuilderAccess)
  at Harmony.HarmonySharedState.GetState () [0x00027] in <e89cc46b19014ee0becb32fcb0502f3d>:0 
  at Harmony.HarmonySharedState.GetPatchInfo (System.Reflection.MethodBase method) [0x00000] in <e89cc46b19014ee0becb32fcb0502f3d>:0 
  at Harmony.PatchProcessor.Patch () [0x00046] in <e89cc46b19014ee0becb32fcb0502f3d>:0 
  at Harmony.HarmonyInstance.<PatchAll>b__8_0 (System.Reflection.MethodInfo method) [0x000ce] in <e89cc46b19014ee0becb32fcb0502f3d>:0 
  at Harmony.CollectionExtensions.Do[T] (System.Collections.Generic.IEnumerable 1[T] sequence, System.Action 1[T] action) [0x00014] in <e89cc46b19014ee0becb32fcb0502f3d>:0 
  at Harmony.HarmonyInstance.PatchAll (System.Type type) [0x00008] in <e89cc46b19014ee0becb32fcb0502f3d>:0 
  at BepInEx.Bootstrap.PatchedAssemblyResolver.ApplyPatch () [0x0000a] in <5b314db111fe4288967731af4f02cd3a>:0 
  at BepInEx.Bootstrap.AssemblyPatcher.PatchAll (System.String directory, System.Collections.Generic.IDictionary 2[TKey,TValue] patcherMethodDictionary, System.Collections.Generic.IEnumerable 1[T] initializers, System.Collections.Generic.IEnumerable 1[T] finalizers) [0x00203] in <5b314db111fe4288967731af4f02cd3a>:0 
  at BepInEx.Bootstrap.Preloader.Run () [0x001c2] in <5b314db111fe4288967731af4f02cd3a>:0

Desktop (please complete the following information):

  • Any game compiled with Unity 2018.3.0
  • BepInEx version. 4.1.1

PEiD of Assembly-CSharp.dll
изображение

PEiD of BepInEx.dll
изображение

Problem with SliderUnlocker.dll ???

Hi. (English is not my native language)

I find a problem with SliderUnlocker, the slider called: 唇のツヤの強さ (Nipple Luster Strength), you can set for example with 200, and if you change the Coordinate Set to another the value resets to default one.

I not sure if the problem come from the Plugin or not...

verson 3.1 patching issue report

First of all, I greatly appreciate bbepis's good work.
Then about the feedback:
After patched, I found out that I can't load a save in the main game or studio game.
To be specific, the 'Yes' button didn't work.
Also, in the studio game, some rendering function in the config didn't work too.
I test out that there's something wrong with the UnityEngine.dll.

Sorry for my poor English, and that's all. Thank you!

Steam Overlay won't open

Describe the bug
Steam overlay no longer opens, and can't be focused if opened via invite button.

To Reproduce
Install BebInEx. Attempt to open overlay, or press invite button in a lobby to open it (won't be able to interact or close)

Desktop (please complete the following information):

  • BebInEx 1.3

System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.

When I start Koikatsu with BepInEX 4.1, the game doesn't load and I get stuck on the loading screen.

I get this :

System.BadImageFormatException: Format of the executable (.exe) or library (.dll) is invalid.
at Mono.Cecil.PE.ImageReader.ReadImage () [0x00000] in :0
at Mono.Cecil.PE.ImageReader.ReadImage (Disposable1 stream, System.String file_name) [0x00000] in <filename unknown>:0 at Mono.Cecil.ModuleDefinition.ReadModule (Disposable1 stream, System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in :0
at Mono.Cecil.ModuleDefinition.ReadModule (System.String fileName, Mono.Cecil.ReaderParameters parameters) [0x00000] in :0

Problem with ScreenCap Plugin 1.1

Hi. (English is not my native language)
The last version of the ScreenCap Plugin ignore the Color Shade when you use it.

How to:
Active or Not Color Shader (F6), try to make some ScreenShots using the Plugin ScreenCap (F9, F11), all the screencaps uses the color shader activate.

If i use the old version 1.01 of the plugin ScrenCap.dll i not get this error.

Improved Translation.txt file.

Hi. (English is not my native language).

This is a Improved translation.txt file:
translation.txt

Changes:
Improvement some long descriptions with short texts.
Improvement translation of some text, for example Questions, join points, etc.
Uppercase first letter in some texts.

Nipple Gloss Slider Issue

There's a problem with Nipple Gloss Slider.

  • It resets when I change to other menu and come back to nipple menu.
  • Can't save the value too, even I only set the nipple gloss and save the character right after it, still loaded with 0 nipple gloss.
  • Character I made before patch is loaded fine and not reset if Im going to nipple menu. re-saved also fine.
  • Seems like the trouble it only save the last value if loaded. so if I load character with 100 nipple gloss and change it, change menu and come back, it resets to 100.

Including multiple patcher classes within the same patcher assembly crashes the preloader

Describe the bug
If multiple patcher classes are included in the same preloader patcher assembly, the preloader will fail to run, causing BepInEx not running the chainloader.

To Reproduce

  1. Create a new preloader patcher assembly with two patcher classes:
public static class Patcher1
{
    public static IEnumerable<string> TargetDLLs { get; } = new [] { "Assembly-CSharp.dll" };

    public static void Patch(AssemblyDefinition ass)
    {
        Trace.TraceInformation("This is patcher 1!");
    }
}

public static class Patcher2
{
    public static IEnumerable<string> TargetDLLs { get; } = new[] { "Assembly-CSharp.dll" };

    public static void Patch(AssemblyDefinition ass)
    {
        Trace.TraceInformation("This is patcher 2!");
    }
}
  1. Put the patcher assembly into BepInEx/patchers
  2. Run the game

Expected behavior
Both patcher classes should be added to the patcher dictionary and run normally.

Screenshots and logs
The console reveals the problem quite clearly:

[Fatal] Could not run preloader!
[Fatal] System.ArgumentException: key already present in dictionary
Parameter name: key
  at System.Collections.Generic.SortedDictionary`2[System.String,System.Collections.Generic.KeyValuePair`2[BepInEx.Bootstrap.AssemblyPatcherDelegate,System.Collections.Generic.IEnumerable`1[System.String]]].Add (System.String key, KeyValuePair`2 value) [0x00000] in <filename unknown>:0
  at BepInEx.Bootstrap.Preloader.Run () [0x00000] in <filename unknown>:0

More precise location is Preloader.cs line 90

Desktop (please complete the following information):

  • BepInEx version [e.g. 4.0]: latest master

Additional context
This is currently a not very high-priority issue. Can be fixed by simply indexing the patcher class' full name (i.e. assembly + namespace + type name), which are guaranteed to be unique in this case.

error loading mods

whenever i try to load a mod i get an error message "MissingMethodException" it you do see this i would probably see it sooner on my discord @MingoDeMago.

thanks

Backwards compatibility with vanilla savegames

I noticed that when the game is patched, and then saving a game, the savegame no longer recognized by a vanilla one.

Is there any plans to make it work backwards? It would be very calming if you were able to solve this.
Thanks in advance and great work :)

Failed to load plugins by ReflectionTypeLoadException when VRPlugin is placed in BepInEx folder.

KoikatuVR.exe and Koikatu.exe (and CharaStudio.exe) shares same BepInEx forlder and if a plugin.dll (say VRPlugin.dll) which depends on VR-related classes in KoikatuVR_Data/Managed/Assembly-CSharp.dll is placed in the BepInEx folder, it failed to load all other plugins when you run Koikatu.exe (not KoikatuVR.exe), caused by "System.Reflection.ReflectionTypeLoadException" since the Assembly-CSharp.dll has not classes needed to load the VRPlugin.dll

So cloud you please ignore any exception in LoadTypes method?
If so, the VRPlugin.dll is just ignored and other plugin will be successfully loaded.

        public static IEnumerable<Type> LoadTypes<T>(string directory)
        {
            ...
            foreach (string dll in Directory.GetFiles(Path.GetFullPath(directory), "*.dll"))
            {
                  ...
             }
             catch (Exception) { }  //<- instead of catch(BadImageFormatException)

Game is crashing

Game is crashing when there are any plugins in the plugins folder.

Desktop (please complete the following information):

  • Game is Minion Masters, x86. I think it's using NET 3.5, Unity 2018.3.4f1
  • BepInEx version 5.0, both stable and bleeding edge

LogOutput.log

BepInEx 4 with the update of XUnity.Auto Translator-ReiPatcher-2.7.0. The following error appears

BepInEx 4.0.0.0 - Koikatu
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.Exception: Cyclic Dependency
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.TopologicalSort[AssemblyDefinition] (IEnumerable`1 nodes, System.Func`2 dependencySelector) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.AssemblyPatcher.PatchAll (System.String directory, IDictionary`2 patcherMethodDictionary, IEnumerable`1 initializers, IEnumerable`1 finalizers) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.Preloader.Main (System.String[] args) [0x00000] in <filename unknown>:0

BepinEx Errors with Risk on Rain 2

Description
Whenever I start the modded client of Risk of Rain 2, I get an error message which causes my game not being able to use steamoverlay and the mod not working either. This does not imply when I start RoR2 without any mods, but with BepinEx, but the moment one mod is installed it goes haywire.

Reproduction
Installing a mod, any mod of a kind. Excluding BepinEx. The error refers to the com.bepis.r2api.cfg which is responsible for being able to match with modded clients online. But putting that from true to false wont help.

Log Error highlighted
[Message: MonoMod] [Main] Scanning for mods in directory.
[Message: MonoMod] [ReadMod] Loading mod dir: D:\Games\steamapps\common\Risk of Rain 2\BepInEx\monomod
[Message: MonoMod] [Main] mm.PatchRefs(); fixup pre-pass
[Message: MonoMod] [Main] mm.AutoPatch();
[Message: MonoMod] [AutoPatch] Parsing rules in loaded mods
[Message: MonoMod] [AutoPatch] PrePatch pass
[Message: MonoMod] [AutoPatch] Patch pass
[Message: MonoMod] [AutoPatch] PatchRefs pass
[Message: MonoMod] [PostProcessor] PostProcessor pass #1
[Message: MonoMod] [Main] Done.
[Message: BepInEx] Preloader finished
[Message: BepInEx] Chainloader ready
[Message: BepInEx] Chainloader started
[Info : BepInEx] 1 / 1 plugins to load
[Error : BepInEx] Missing the following dependencies for [ItemStats]:- com.bepis.r2api
Loading will be skipped; expect further errors and unstabilities.

[Message: BepInEx] Chainloader startup complete
Exception of type 'System.Reflection.ReflectionTypeLoadException' was thrown.
Setting breakpad minidump AppID = 632360
Steam_SetMinidumpSteamID: Caching Steam ID: 76561198377159403 [API loaded no]

Desktop:

  • Game and game version : Risk of Rain 2; The Scorched Acres update (26-06-2019)
  • BepInEx version : BepinEx 5.0 RCI

Edit
The problem with steamoverlay also showed up with BepinEx installed without mods, so I deleted BepinEx, but forgot to look at error messages

BepInEx Problem with 真・痴漢の極み from Beelzebub (ベルゼブブ) (System.Exception: The entrypoint type is invalid!)

Describe the bug
I was trying to use BepinEx in 4.1 version with XUnity.AutoTranslator-BepIn-2.9.1 plugin to translate game 真・痴漢の極み from Beelzebub (ベルゼブブ) circle.

BepInEx does not work. There isn't any changes in game behavior with or without BepinEx. When I start game BepInEx create preloader_xx file.

To Reproduce
A short description of what you did for the bug to happen.
Installed BepInEx version 4.1 X86, started game once to create config, installed XUnity.AutoTranslator-BepIn-2.9.1. Started the game.

I also tried using BepInEx_x64_v4.1 but there is no respond at all, BepInEx does not even create config.

Expected behavior
I would like BepinEx to start with game and use XUnity.AutoTranslator-BepIn-2.9.1 plugin to translate ingame Japanse text in to English.

Screenshots and logs

Logs from preloader:
 BepInEx 4.1.0.0 - 真・痴漢の極み
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.Exception: The entrypoint type is invalid! Please check your config.ini
  at BepInEx.Bootstrap.Preloader.PatchEntrypoint (Mono.Cecil.AssemblyDefinition& assembly) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.AssemblyPatcher.Patch (Mono.Cecil.AssemblyDefinition& assembly, BepInEx.Bootstrap.AssemblyPatcherDelegate patcherMethod) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.AssemblyPatcher.PatchAll (System.String directory, IDictionary`2 patcherMethodDictionary, IEnumerable`1 initializers, IEnumerable`1 finalizers) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.Preloader.Run () [0x00000] in <filename unknown>:0

Desktop (please complete the following information):

  • Game and game version [e.g. COM3D2 1.15]: 真・痴漢の極み version:1.18.2.27
  • BepInEx version [e.g. 4.0]: BepInEx_x86_v4.1
  • Windows 7 Ultimate x64

Additional context
I also tried BepInEx with 1room -家出少女- and it also does not work.
However I tried with Koikatu and COM3D2_1.10.1.010 and had no problems, everything was working right .

Seems to no longer allow multiplayer with Bepinex preloaded

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
A short description of what you did for the bug to happen.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots and logs
Include a console log (output_log.txt and/or preloader_xxx_xxx.log), if the error is visible there.
If not possible, include a screenshot of the error.

Desktop (please complete the following information):

  • Game and game version [e.g. COM3D2 1.15]:
  • BepInEx version [e.g. 4.0]:

Additional context
Add any other context about the problem here.

[BepInEx v4.0] Cyclic dependency error after upgrading from BepInEx 3

After updating to Bepis Patcher v4, I can assure that Koikatsu runs smoothly with no problem. Thank you very much. However, when accessing CharaStudio

this following log came up :

_BepInEx 4.0.0.0 - CharaStudio
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.Exception: Cyclic Dependency
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.TopologicalSort[AssemblyDefinition] (IEnumerable`1 nodes, System.Func`2 dependencySelector) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.AssemblyPatcher.PatchAll (System.String directory, IDictionary`2 patcherMethodDictionary, IEnumerable`1 initializers, IEnumerable`1 finalizers) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.Preloader.Main (System.String[] args) [0x00000] in <filename unknown>:0_

It opens another window -that if closed, charastudio also closed.

Even so, the studio works fine, but the patcher keeps producing log.txt everytime I execute the Charastudio.exe =_=

Koikatsu won't launch with BepInEX 4.0

Describe the bug
A clear and concise description of what the bug is.

The InitSetting.exe was giving an error of my graphic card driver (nvspcap64.dll error) so I update it since it was a while before I did it. Now it gives no errors but the game simply won't launch if the winhttp.dll is present in the game directory. The koikatsu I have installed is 64 bits.

To Reproduce
A short description of what you did for the bug to happen.

I have used BepInEx 3.2 without issues and followed the instructions given. Deleted the 3 dlls on all 3 folders (Koikatsu_Data, Charastudio_Data, and in KoikatsuVR_Data) and restored the UnityEngine.dll.bak to UnityEngine.dll). I have depeted the patcher exe from the game root. The game simply will not run. It does run when removing the winhttp.dll. I did give permision to the files of the downloaded content too.

Expected behavior
A clear and concise description of what you expected to happen.

According to the description, the game should run normally and it should create a config.ini file on the BepInEx folder. I have not even reached to this point.

Screenshots and logs
Include a console log (output_log.txt and/or preloader_xxx_xxx.log), if the error is visible there.
If not possible, include a screenshot of the error.

Can't provide anything since I cannot run the game.

Desktop (please complete the following information):

  • Game and game version [e.g. COM3D2 1.15]: Koikatsu 3.0
  • BepInEx version [e.g. 4.0]: 4.0

Additional context
Add any other context about the problem here.

Putting the 32bit version of the winhttp.dll, the game will launch but thats because BepInEx is not loaded. It does not create any file. I am not sure what I am doing it wrong.

ArgumentException in preloader

I'm getting this error when executing Koikatsu

BepInEx 4.1.1.0 - Koikatu
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.ArgumentException: An element with the same key already exists in the dictionary.
at System.Collections.Generic.Dictionary2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in <filename unknown>:0 at BepInEx.Bootstrap.AssemblyPatcher.PatchAll (System.String directory, IDictionary2 patcherMethodDictionary, IEnumerable1 initializers, IEnumerable1 finalizers) [0x00000] in :0
at BepInEx.Bootstrap.Preloader.Run () [0x00000] in :0

can somple help me thanks!!

loading patcher methods

I have absolutely no experience with computer science or coding, and I'm trying to mod an eroge (Insult Order) to remove censorship and possibly translate from Japanese to English. I have the preloader log enable and whenever it comes up it registers that the censorship and texture pack .dll files are present but says it loaded 0 patcher methods. Please help!
Screenshot (3)

BepInEx version 3.2 makes game update cdp05v25 not work.

I'm not sure if it's an issue of incompatible plugins or something else, but after updating to update 05v25, Koikatu.exe starts up then instantly terminates itself after applying BepInEx.Patcher. I can confirm BepInEx is the issue here because after I re-applied the game update patch, Koikatu.exe starts working fine.

Now the main problem is that I need to roll back the game version to apply BepInEx to load the save game, because not applying BepInEx makes the game unable to load the save file. After that I'm not even sure if re-saving the game with BepInEx 3.2 would make the game recognize the save.

Unable to run in wine

BepInEx doesn't seem to load under wine (www.winehq.org).

I tried a game in wine. The game itself runs fine, but BepInEx doesn't seem to run. I tried verifying this by enabling the console, and it didn't show up. My guess is that the dll doesn't load for some reason, but I am not familiar with windows or mono, so I don't know how to debug it. One possibility is that another version of mono is being loaded, but I don't know which one or from where.

Game: insult Order 1.03
BepInEx 4.1 (I think, came with the game so it should be fine)

cheers,
//B

Help in development

Hi, I try to do a extension but it's doesnt work, the message doesn't appear when i press F12.

It's my code and configuration.

oki

3.1 unzip fail

Whenever I try to unzip the 3.1 version, the exe file fails to appear, even after it says it was successfully unzipped.

BepInEx 4 run failed

preloader_20180716_232431_103.log

BepInEx 4.0.0.0 - Koikatu
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.Exception: Cyclic Dependency
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.<TopologicalSort>g__Visit|9_0[AssemblyDefinition] (Mono.Cecil.AssemblyDefinition node, BepInEx.Common.<>c__DisplayClass9_0`1& ) [0x00000] in <filename unknown>:0 
  at BepInEx.Common.Utility.TopologicalSort[AssemblyDefinition] (IEnumerable`1 nodes, System.Func`2 dependencySelector) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.AssemblyPatcher.PatchAll (System.String directory, IDictionary`2 patcherMethodDictionary, IEnumerable`1 initializers, IEnumerable`1 finalizers) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.Preloader.Main (System.String[] args) [0x00000] in <filename unknown>:0

EDIT: reformatted the issue message

BepInEx 3.0

Targets for release:

  • Add BepInEx version to logger
  • Add plugin versions to logger
  • Transfer plugin metadata to attributes (breaking change)
  • Change ID checks to a full dependency system
    • Add minimum version checks for BepInEx and other plugins
  • Update Intellisense documentation
  • Update wiki documentation

Games run fine but i cant get the preloader to work

Describe the bug
Preloader just doesn't work , the game works fine
error code

To Reproduce
Just start the game
Expected behavior
The preloader to not encounter any conflict
Screenshots and logs
Include a console log (output_log.txt and/or preloader_xxx_xxx.log), if the error is visible there.
If not possible, include a screenshot of the error.

BepInEx 4.1.1.0 - Koikatu
[Message] Preloader started
[Fatal] Could not run preloader!
[Fatal] System.ArgumentException: An element with the same key already exists in the dictionary.
  at System.Collections.Generic.Dictionary`2[System.String,System.String].Add (System.String key, System.String value) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.AssemblyPatcher.PatchAll (System.String directory, IDictionary`2 patcherMethodDictionary, IEnumerable`1 initializers, IEnumerable`1 finalizers) [0x00000] in <filename unknown>:0 
  at BepInEx.Bootstrap.Preloader.Run () [0x00000] in <filename unknown>:0

Desktop (please complete the following information):

  • Koikastu 5.0
  • BepInEx version. 4.1.1

Problems with the Console Window

Hi. (English is not my native language)

Sometimes in Windowed mode, the Console Window appears over the Game window.
And if you use any program to make Borderless the game window console appears always over the game window.

The problems looks belong to the name of the new Console Window, is exact name of the Main Game Window Name, and the borderless program make the 2 window borderless, first the game window and after the console window, making the second window over the game window.

Character rendering (F11) gives transparent outline.

As the title has stated. I've tried both Legacy and Alphashot, however after exporting, the image would end up with no outline (it's as if there's an outline transparency option in-game and you've set it to 0). Would you please be so kind as to look at this issue? I'm wondering if it's a problem on my end or not.

BepInEx 4.0 messes up clothes on characters created under BepInEx 3.2 or earlier

Describe the bug
After migration to BepInEx 4.0 from 3.2 (or installing 4.0 from scratch) many characters that were created under 3.2 or earlier appear in game wearing wrong clothes or not wearing them at all. But these characters load with correct clothes in editor.

To Reproduce
Load a gamesave with charactes created under Bep 3.2 or earlier and start gameplay.

Expected behavior
Characters should load with clothes, shown on them in editor mode (depending on current state (in school, leaving school, etc)).

Screenshots and logs
A person under BepInEx 3.2:
koikatsu-2018-07-20-01-36-34

The same person from same save under BepInEx 4.0:
koikatu 2018-07-20 01-57-54-193

Also the console is constantly spamming with this (you can see it on the 2nd screenshot, don't know if it's an error or not):

Sideloader marker found
External info count: 0
Loading card []
Sideloader marker found
External info count: 0
Loading card []

Desktop

  • Game and game version: Koikatu with 06/29 cumilative update
  • BepInEx version: 4.0

Additional context
I can send my chara and sideloader folders if it's necessary.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.