guide_firstsrmod
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
guide_firstsrmod [2019/07/04 11:48] – [Method 2 (Harmony Postfix)] umfdev | guide_firstsrmod [2019/07/04 11:50] – [Method 2 (Harmony Postfix)] umfdev | ||
---|---|---|---|
Line 247: | Line 247: | ||
- Rename '' | - Rename '' | ||
- Add the following to the top of '' | - Add the following to the top of '' | ||
- | * This lets us target the **PlayerModel** class which is inside the **MonomiPark.SlimeRancher.DataModel** namespace. | + | * This lets us target the **PlayerModel** class which is inside the **MonomiPark.SlimeRancher.DataModel** namespace |
- | * You could also use **MonomiPark.SlimeRancher.DataModel.PlayerModel** instead for anything targeting it. | + | |
- Set **typeof** in the first HarmonyPatch attribute to use the **PlayerModel** class we discovered with dnSpy. <sxh csharp> | - Set **typeof** in the first HarmonyPatch attribute to use the **PlayerModel** class we discovered with dnSpy. <sxh csharp> | ||
+ | * You could also use **MonomiPark.SlimeRancher.DataModel.PlayerModel** instead for the type. | ||
- Set the second **HarmonyPatch** attribute to the **ApplyUpgrade** function we discovered with dnSpy. <sxh csharp> | - Set the second **HarmonyPatch** attribute to the **ApplyUpgrade** function we discovered with dnSpy. <sxh csharp> | ||
- Inside the patch class create the following postfix function: <sxh csharp> | - Inside the patch class create the following postfix function: <sxh csharp> |
guide_firstsrmod.txt · Last modified: 2019/07/04 12:27 by umfdev