-
-
Notifications
You must be signed in to change notification settings - Fork 123
Compiling These Plugins
To compile these plugins you will need Visual Studio, the free Visual Studio 2019 Community Edition is perfectly acceptable. Download the source code from GitHub by clicking the green "Clone or download" button. Extract the files and run the .sln
When Visual Studio starts it will likely show many errors, this is normal. The project does not include any of the references needed for the code to compile. Create a folder called "lib" in the KK_Plugins folder, then add the .dlls needed. In particularly you'll need the following: From Koikatu\BepInEx\core: 0Harmony.dll BepInEx.dll
From Koikatu\Koikatu_Data\Managed: Assembly-CSharp.dll Assembly-CSharp-firstpass.dll TextMeshPro-1.0.55.56.0b12.dll UnityEngine.dll UnityEngine.UI.dll
From Koikatu\BepInEx: KKAPI.dll ExtensibleSaveFormat.dll
For the EmotionCreators projects, you'll need to create a folder called "EC" inside the lib folder (KK_Plugins\lib\EC). You'll need to add most of the same .dlls you did for Koikatsu, except get them from your EmotionCreators install instead.
If all goes well the errors should disappear and the projects should be read to use. You can right click a project inside Visual Studio and click "Build", this will output the .dll to KK_Plugins\bin. Move it to your game's Bepinex folder. Tweak the code, start the game, and see your changes. Some of these projects are simple enough that they make excellent learning tools.
Optionally, you can create a PostBuild.bat file in the KK_Plugins folder and put in the following:
IF "%2" == "KK" (
IF EXIST "C:\Illusion\Koikatu\BepInEx\" XCOPY /y "%1" "C:\Illusion\Koikatu\BepInEx\"
IF EXIST "D:\Steam\steamapps\common\Koikatsu Party\BepInEx\" XCOPY /y "%1" "D:\Steam\steamapps\common\Koikatsu Party\BepInEx\"
)
IF "%2" == "EC" (
IF EXIST "C:\Illusion\EmotionCreators\BepInEx\plugins\EC_Plugins\" XCOPY /y "%1" "C:\Illusion\EmotionCreators\BepInEx\plugins\EC_Plugins\"
)
Replace the paths with the location of your own game(s). This .bat file is executed when a project is built and will copy the compiled .dlls to your bepinex folder. Simply compile and run the game, no need to manually copy .dlls anymore.
You can find a list of various guides on the right.
Make sure to also check the Guides folder in the repository.