diff --git a/.gitignore b/.gitignore index 4ce6fdd..0bda091 100644 --- a/.gitignore +++ b/.gitignore @@ -337,4 +337,7 @@ ASALocalRun/ .localhistory/ # BeatPulse healthcheck temp database -healthchecksdb \ No newline at end of file +healthchecksdb + +# references +ref diff --git a/IllusionPlugin.dll b/IllusionPlugin.dll new file mode 100644 index 0000000..aa7fa2e Binary files /dev/null and b/IllusionPlugin.dll differ diff --git a/README.md b/README.md index f2575cd..05d596f 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,16 @@ # TestMod -Proof of concept mod and reference implementation +Mod base implementation ## Installation -1. Patch Gamecraft with [IPA](https://github.com/Eusth/IPA). -You will need to build it yourself; the latest release does not work (in the future the latest build will be available for download) -2. Build TestMod solution and copy `obj\Debug\net45\TestMod.dll` into Gamecraft's `Plugins\` folder (IPA should have created this automatically in the previous step) +1. Patch Gamecraft with [GCIPA](https://git.exmods.org/modtainers/GCIPA). +You should download the latest release and extract it to the Gamecraft folder. +To patch, drag `Gamecraft.exe` onto `IPA.exe`. You will need to redo this step whenever Gamecraft is updated. +2. Extract the TestMod zip into Gamecraft's `Plugins\` folder (GCIPA should have created this automatically in the previous step). You should see `0Harmony.dll` and `TestMod.dll` in the `Plugins\` folder. If those files are in another folder in `Plugins\` it will not work. 3. Launch Gamecraft. -You can check the log file `%APPDATA%\..\LocalLow\FreeJam\RobocraftX\Player.log` to confirm +You can check the log file `%APPDATA%\..\LocalLow\FreeJam\Gamecraft\Player.log` to confirm. +You should be able to see a message near the top showing how many plugins have been loaded and their names. ## Development diff --git a/TestMod/TestMod.csproj b/TestMod/TestMod.csproj index c034e29..443fb59 100644 --- a/TestMod/TestMod.csproj +++ b/TestMod/TestMod.csproj @@ -1,7 +1,7 @@  - net45 + net48 @@ -10,13 +10,13 @@ - ..\..\..\IPA\IPA\bin\Debug\IPA\Data\Managed\IllusionPlugin.dll + ..\IllusionPlugin.dll - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\RobocraftX_Data\Managed\UnityEngine.dll + ..\ref\Gamecraft_Data\Managed\UnityEngine.dll - ..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\RobocraftX_Data\Managed\UnityEngine.CoreModule.dll + ..\ref\Gamecraft_Data\Managed\UnityEngine.CoreModule.dll diff --git a/TestMod/TestPlugin.cs b/TestMod/TestPlugin.cs index 07c60ad..9379208 100644 --- a/TestMod/TestPlugin.cs +++ b/TestMod/TestPlugin.cs @@ -10,7 +10,7 @@ namespace TestMod { public static HarmonyInstance harmony { get; protected set; } - public string[] Filter { get; } = new string[] { "RobocraftX", "Gamecraft" }; + public string[] Filter { get; } = new string[] { "Gamecraft" }; public string Name { get; } = "TestPlugin"; @@ -21,7 +21,7 @@ namespace TestMod public void OnApplicationQuit() { harmony.UnpatchAll(HarmonyID); - Debug.Log("TestPlugin shutdown complete"); + Debug.Log(Name + " shutdown complete"); } public void OnApplicationStart() @@ -31,7 +31,7 @@ namespace TestMod harmony = HarmonyInstance.Create(HarmonyID); harmony.PatchAll(Assembly.GetExecutingAssembly()); } - Debug.Log("TestPlugin start & patch complete"); + Debug.Log(Name + " start & patch complete"); } public void OnFixedUpdate()