lammas123-PEAKERRpcInfo icon

PEAKERRpcInfo

A dependency for mods that need the info parameter on Rpcs.

Last updated a month ago
Total downloads 51379
Total rating 1 
Categories Tools Misc Client Side
Dependency string lammas123-PEAKERRpcInfo-1.1.0
Dependants 27 other packages depend on this package

This mod requires the following mods to function

BepInEx-BepInExPack_PEAK-5.4.2403 icon
BepInEx-BepInExPack_PEAK

BepInEx pack for PEAK. Preconfigured and ready to use.

Preferred version: 5.4.2403

README

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!