PEAK

Details

Last Updated
4 weeks ago
First Uploaded
4 weeks ago
Downloads
51K
Likes
1
Size
138KB
Dependency string
lammas123-PEAKERRpcInfo-1.1.0
Dependants

What is this for?

Whenever an Rpc is invoked, you won't know who invoked the Rpc unless it contains an info parameter. This preloader patcher inserts the info parameter into every Rpc in the base game, for other modders to utilize.

Notice for Modders

While this is installed, you shouldn't (but can as of v1.1.0) invoke Rpcs directly. For example, instead of using character.RPCA_Die() you should use character.view.RPC(nameof(Character.RPCA_Die), PhotonNetwork.LocalPlayer).

As of v1.1.0, this patcher will now patch every dll in the BepInEx/plugins folder that directly calls Rpc methods, to prevent InvalidIL and MissingMethod exceptions.

Potential issues for Transpilers/Modders

Due to the base game directly invoking some Rpc methods, this patcher has to modify the IL of some methods to account for the extra parameter (and dlls in the BepInEx/plugins folder as of v1.1.0).

These changes in IL, and some changes caused by simplifying and re-optimizing maros (IL) with Mono.Cecil.Rocks may cause some issues for transpilers.

  • The patcher logs all modified methods on the Debug channel. If you're encountering strange issues, I recommend checking these logs to see which methods are being modified.
  • To go a step further, you can enable Preloader.DumpAssemblies in your BepInEx.cfg, and check the modified IL for any changes that may be breaking your transpilers.
    • Patched dll's in the BepInEx/plugins folder (that were actually modified) will be renamed to "FILENAME.dll-unrpcpatched.old", and the patched version will take its place.

Installation (Manual)

  1. Download BepInEx if you don't already have it installed. If you do, skip to step 4.
  2. Extract the contents of BepInEx_win_x64_5.4.23.3.zip into your game's root directory.
    • You may navigate there directly by: opening your Steam library, right clicking them game, selecting Manage, and then Browse local files.
  3. Run the game once, wait for the game's window to appear, then you may close the game.
  4. Download the latest release of this mod, or whichever one you'd prefer.
  5. Move the PEAKERRpcInfo.dll contained within the .zip to your BepInEx/patchers folder.
  6. Enjoy!
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.