You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-71Lines changed: 2 additions & 71 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,7 +29,7 @@ Injects a basic mod loader into [*PULSAR: Lost Colony*][10].
29
29
30
30
By default, PML will attempt to patch the Steam version of the game in Steam's default install location. To patch a PULSAR installation in another location (non-Steam version, copy of client, etc), simply specify the path to `Assembly-CSharp.dll` as shown above.
31
31
32
-
Afterwards, add mods to then`PULSARLostColony\Mods` directory, then run PULSAR normally. `PulsarModLoaderInstaller.exe` is not needed after this.
32
+
Afterwards, add mods to the`PULSARLostColony\Mods` directory and run PULSAR normally. `PulsarModLoaderInstaller.exe` is not needed after this.
33
33
34
34
### Removal
35
35
@@ -41,73 +41,4 @@ Optionally remove `PulsarModLoader.dll` and `Assembly-CSharp.dll.bak` from `PULS
41
41
42
42
## Creating Mods
43
43
44
-
All mods must be C# Class Libraries targeting .NET Framework 4.0 or later (to work around some jankery). See [this screenshot][11] for an example of project creation settings in Visual Studio Community 2019 ([free download][12]).
[12]: https://visualstudio.microsoft.com/vs/community/"Visual Studio 2019"
48
-
49
-
You Should reference the following assemblies in your mod project:
50
-
51
-
*`PulsarModLoader.dll` (PML code)
52
-
*`Assembly-CSharp.dll` (Game code)
53
-
54
-
Additionally, the following Assemblies might be needed.
55
-
*`0Harmony.dll` (Patch Code)
56
-
*`ACTk.Runtime.dll` (Obscured Object Code)
57
-
*`UnityEngine.CoreModule.dll` (Engine code)
58
-
*`UnityEngine.*.dll` (optional; specific DLL depends what changes are made)
59
-
60
-
Mods must also contain a subclass of `[PulsarModLoader.PulsarMod]` for mod initialization. This class is instantiated once during game startup (currently before `PLGlobal.Awake()`), so do mod setup in its constructor. The base constructor already loads Harmony, so only overriding `protected string HarmonyIdentifier()` may be enough for simple mods. To extend setup, override the constructor with a call to base:
61
-
62
-
```csharp
63
-
classMyMod : PulsarMod
64
-
{
65
-
publicMyMod() : base()
66
-
{
67
-
// Do additional setup here
68
-
}
69
-
70
-
[...]
71
-
}
72
-
```
73
-
74
-
Using [`HarmonyLib`] to hook PULSAR methods is strongly recommended due to its simple API and tools that help multiple mods play nicely when modifying the same methods (stacking hooks instead of overwriting each other, prioritization, etc). Any class using Harmony decorators will magically hook their methods.
Distribute mods as `.dll` assemblies. To install, simply drop the assembly into the `Mods` folder; any properly-defined `*.dll` mods assemblies are automatically loaded.
44
+
[Check out the wiki for basic instructions on creating mods.](https://github.com/PULSAR-Modders/pulsar-mod-loader/wiki/Creating-Mods)
0 commit comments