Skip to content

Commit 81ee146

Browse files
authored
Replaced mod creation with wiki link
1 parent 967c3a4 commit 81ee146

File tree

1 file changed

+2
-71
lines changed

1 file changed

+2
-71
lines changed

‎README.md‎

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Injects a basic mod loader into [*PULSAR: Lost Colony*][10].
2929

3030
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.
3131

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.
3333

3434
### Removal
3535

@@ -41,73 +41,4 @@ Optionally remove `PulsarModLoader.dll` and `Assembly-CSharp.dll.bak` from `PULS
4141

4242
## Creating Mods
4343

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]).
45-
46-
[11]: https://i.imgur.com/X7bDnYr.png "New Project"
47-
[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-
class MyMod : PulsarMod
64-
{
65-
public MyMod() : 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.
75-
76-
[13]: https://github.com/pardeike/Harmony "HarmonyLib"
77-
78-
### Basic Mod Example
79-
80-
```csharp
81-
using PulsarModLoader;
82-
83-
namespace ExampleMod
84-
{
85-
class MyMod : PulsarMod
86-
{
87-
public override string HarmonyIdentifier()
88-
{
89-
// Make this unique to your mod!
90-
return "com.example.pulsar.mods";
91-
}
92-
}
93-
}
94-
```
95-
96-
```csharp
97-
using Harmony;
98-
99-
namespace ExampleMod
100-
{
101-
[HarmonyPatch(typeof(PLNetworkManager))]
102-
[HarmonyPatch("Start")]
103-
class VersionModifier
104-
{
105-
static void Postfix(PLNetworkManager __instance)
106-
{
107-
__instance.VersionString += "\nCool Kid Version";
108-
}
109-
}
110-
}
111-
```
112-
113-
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

Comments
 (0)