Browse Source

Update to .NET 4.8 and and latest GC folder layout

base
NGnius 5 years ago
parent
commit
d63060eb1e
5 changed files with 18 additions and 13 deletions
  1. +4
    -1
      .gitignore
  2. BIN
      IllusionPlugin.dll
  3. +7
    -5
      README.md
  4. +4
    -4
      TestMod/TestMod.csproj
  5. +3
    -3
      TestMod/TestPlugin.cs

+ 4
- 1
.gitignore View File

@@ -337,4 +337,7 @@ ASALocalRun/
.localhistory/

# BeatPulse healthcheck temp database
healthchecksdb
healthchecksdb

# references
ref

BIN
IllusionPlugin.dll View File


+ 7
- 5
README.md View File

@@ -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



+ 4
- 4
TestMod/TestMod.csproj View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net45</TargetFramework>
<TargetFramework>net48</TargetFramework>
</PropertyGroup>

<ItemGroup>
@@ -10,13 +10,13 @@

<ItemGroup>
<Reference Include="IllusionPlugin">
<HintPath>..\..\..\IPA\IPA\bin\Debug\IPA\Data\Managed\IllusionPlugin.dll</HintPath>
<HintPath>..\IllusionPlugin.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\RobocraftX_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>..\ref\Gamecraft_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\Gamecraft\RobocraftX_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
<HintPath>..\ref\Gamecraft_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
</ItemGroup>



+ 3
- 3
TestMod/TestPlugin.cs View File

@@ -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()