RumbleModdingAPI
API to Help Modders Get Started and to remove the necessity of GameObject.Find
About this mod Author’s original text
I created this API to Help others get into the Modding Scene for Rumble.
RUMBLE Modding Discord
RMAPI Documentation
Video Guide to Make Mods
- (outdated)
- Easier Method: Copy an existing Git posted in
- Alternate Method:
How to Include the API in your Project:
- Install MelonLoader Version 0.7.2 (or above currently)
- Run Game (This initialized MelonLoader) (Close at T-Pose)
- Put RumbleModdingAPI.dll in your Mods Folder
- Add RumbleModdingAPI.dll as a Reference in your Project
- Add "using RumbleModdingAPI.RMAPI;" at the top of your code / with the other "using"s
- Here is a list of different Classes containing different Methods:
- "Actions" Contains all the Actions to be able to Have listeners happen under certain conditions
- "AssetBundles" Unsed to Load AssetBundles
- "Calls" Contains Methods to get info about different stuff (stuff I couldn't figure out where to put it)
- "Create" Contains Methods to create new objects easily at any time
- "GameObjects" Contains access to almost every GameObject in Rumble Maps
- "Utilities" Contains the contents of RMAPI's RaiseEvent Manager
- "PhotonRPCs" This is the Class containing PunRPC to use Custom RPCs
- "AudioManager" This is the Class containing Methods to Help with Audio.
- "Lighting" This exposes the Lighting so multiple Mods can change the Lighting without incompatibilities.
RPCs
- 1: in order to use RPCs, create a new Component class and inherit from MonoBehaviourPun instead of MonoBehaviour
- 2: inside of your new class create a method and give it the [PunRPC] attribute (RumbleModdingAPI.RMAPI.PhotonRPCs.PunRPC),
- 3: create a new gameobject or take an existing object,
- 4: give that object a PhotonView, store it in a variable and assign a unique ViewID to it (must be consistent across all players),
- 5: give that object your new components with the RPC,
- 6: use photonView.RPC("your method name here") to send the RPC (for a better explanation go to the photon docs)
RaiseEvent
setup:
- 1: on your main mod, inherit from RumbleMod instead of MelonMod (RumbleModdingAPI.RMAPI.Utilities.RumbleMod)
- 2: the first time you load into the gym, call RegisterEvents(), (RumbleMod.RegisterEvents() )
- 3: override the OnEvent(List data) function (RumbleMod.OnEvent(List data) )
- 4: add whatever logic you need to your OnEvent, (if you need to get data such as a Vector3 or Quaternion use.Unbox() or.Unbox())
- note: if you need to send integers, use a 'short' or 'int16' as normal ints dont work properly
actually raising an event
- 1: create a new RaiseEventOptions (Il2CppPhoton.Realtime.RaiseEventOptions) and set set the Receivers variable
- 2: create your data (most variables like Vector3 and Quaternions have a.BoxToIl2CppObject() method to convert them to an Il2CppSystem.Object, the others can be simply cast to it)
- 3: Call RaiseEvent(List data, RaiseEventOptions raiseEventOptions, SendOptions sendOptions) (from RumbleMod)
SendOptions.SendReliable will make sure every player actually receives the event but might take a bit longer
SendOptions.SendUnreliable does not guarantee that the event will be received, use this for things like position values where losing out on it once every so often isn't too bad
ControllerInputPoller
- 1: right and left controller are defined by RumbleModdingAPI.RMAPI.Utilities.ControllerInputPoller.RightController and LeftController respectively
- 2: each controller contains 5 buttons and the joystick position (Vector2)
the buttons are: primary, secondary, trigger, grip and stick click
- 3: each button contains 4 variables
(float) value: how much pressed in the button is, 0-1 for trigger and grip
(bool) pressed: if the button is currently held down
(bool) WasPressedThisFrame: if the button was pressed in this frame
(bool) WasReleasedThisFrame: if the but
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.
Install these first, or the mod will not work: