part of World Components
VRC PlayerMods
Player mods are how you modify characteristics of the player in your world. Currently the only options available are jump and movement speed. Older mods may still be listed, but do not use them. You may have multiple different mods enabled at a time in your world. Each player may even have a different set of mods. The VRC_PlayerMods component can be added to any GameObject. Most creators will add room mods to the VRCWorld prefab to easily find it.
Parameters
| Parameter | Description |
|---|---|
| isRoomPlayerMods | Set to true if you want the player mods to be applied to the players in your world when they join. |
Having a player mod component with isRoomPlayerMods set to true will set the default player mods for the entire world. When you join, these mods will be applied to the user for the duration of the world. If no mods are enabled at start, players will have the default walk/run speed and no jump until mods are set. If you have a player mod component with isRoomPlayerMods set to true but it is disabled at start, it will only apply the mods when the object is enabled. This is not recommended as you can change mods at runtime with isRoomPlayerMods set to false and calling the AddPlayerMods and RemovePlayerMods RPCs. See table below. If you have more than one player mods component with isRoomPlayerMods set to true, only one will be used and the rest will be ignored.
If you have a player mod component with isRoomPlayerMods set to false, you must add them manually with triggers to take effect. See RPC options below. When adding player mods, they will replace any version of that mod you had previously. If you have a mod with jump and speed, and add a new jump mod, only your jump will be changed and your speed will remain as the previous mod had set. If you ever call RemovePlayerMods, ALL mods are removed and the player will be left with the default room mods. When removing mods, you must wait at least one frame before adding new player mods. Calling remove mods and add mods in the same frame will result in only default room mods. Each player in the world can have different mods enabled at a time.
Player Mods With Triggers
When using the SendRPC action with Triggers, you can call a few methods on the player mods itself:
| RPC | Description |
|---|---|
| AddPlayerMods | Add the mods to the player. The broadcast type must always be set to Local. This method only works on the local player and if the local player is the instigator. See Triggers for more information on instigators. |
| RemovePlayerMods | Remove all non room mods from the player. The broadcast type must always be set to Local. This method only works on the local player and if the local player is the instigator. See Triggers for more information on instigators. |
Mods
Jump
The jump mod allows players to jump in your world. This is unrelated to gravity which can be changed in the project's Physics Settings.
| Parameter | Description |
|---|---|
| jumpPower | The height of a jump. Default is set to 3 units which will be the amount of force applied to the player. |
Speed
The speed mod allows you to change how fast the player moves in your world. You can control walk speed, run speed, and strafe speed individually.
| Parameter | Description |
|---|---|
| runSpeed | The top speed of the player when they are moving forward. Default is set to 4 m/s. |
| walkSpeed | The default speed of the player when moving forward. Default is set to 2 m/s. |
| strafeSpeed | The speed of the player when moving left or right from their view direction. Default is set to 2 m/s. |
Voice
This is a legacy mod. Please do not use this, but instead use the option listed on the VRC_SceneDescriptor or VRCWorld prefab. Change to new player voice overrides
Health
This is a legacy mod. Please do not use this, but instead use the VRC_CombatSystem.
Example
Example of what it looks like having different mods within the same world:
https://twitter.com/CyanLaser/status/1184340419309494272
Setup for non room mods that will make the player move fast and jump high.