PEAKERRpcInfo
A dependency for mods that need the info parameter on Rpcs.
| Date uploaded | a year ago |
| Version | 1.0.0 |
| Download link | lammas123-PEAKERRpcInfo-1.0.0.zip |
| Downloads | 42067 |
| Dependency string | lammas123-PEAKERRpcInfo-1.0.0 |
This mod requires the following mods to function
BepInEx-BepInExPack_PEAK
BepInEx pack for PEAK. Preconfigured and ready to use.
Preferred version: 5.4.2403README
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 cannot (and shouldn't) invoke Rpcs directly. For example, instead of using character.RPCA_Die() you should use character.view.RPC(nameof(Character.RPCA_Die), PhotonNetwork.LocalPlayer).
Reason being, you'll be invoking the Rpc methods improperly, missing the info parameter, leading to exceptions.
You can get around these exceptions with things like reflection, or depending on a modified Assembly-CSharp, but it's easier (and better practice) to not directly invoke Rpc methods.
Potential issues for Transpilers
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.
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.DumpAssembliesin yourBepInEx.cfg, and check the modified IL for any changes that may be breaking your transpilers.
Installation (Manual)
- Download BepInEx if you don't already have it installed. If you do, skip to step 4.
- Extract the contents of
BepInEx_win_x64_5.4.23.3.zipinto 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.
- Run the game once, wait for the game's window to appear, then you may close the game.
- Download the latest release of this mod, or whichever one you'd prefer.
- Move the
PEAKERRpcInfo.dllcontained within the .zip to yourBepInEx/patchersfolder. - Enjoy!
CHANGELOG
1.1.0
- The patcher will now go through every dll in your BepInEx/plugins folder and patch any direct calls to Photon Rpc methods to include the patched in info parameter, preventing InvalidIL exceptions.
- Patched dll's (that were actually modified) will be renamed to "FILENAME.dll-unrpcpatched.old", and the patched version will take its place.
1.0.0
- Initial release, yippee!