A dynamic counter for VRChat. This script uses parameters setup inside VRC Contact Receivers. It will track and temporarily display set properties into VRC's chatbox each time one of those properties is incremented.
- Add a
VRC Contact Receiver
component to your avatar. - Checkmark
Allow Others
inside theVRC Contact Receiver
- Set the Parameter you would like to track in the
Parameter
field ofVRC Contact Receiver
. This must be named with aTrack_
before the parameter name in order to work with this script (see example below). - Add which collisions you want to trigger the increment of the parameter inside the
VRC Contact Receiver
.
Note: that in the above example the collider has been attached to my head and the
Track_Headpats
parameter will only triger when aHand
,HandL
, orHandR
enter that collider.
You can Add any parameter you want. It does not need to be headpats. See the steppies example to see a different parameter implementation.
⚠️ You can skip this step if you have never enabled OSC in game before as the Avatar folder will be empty and your OSC Avatar JSON files will be auto generated after you enable OSC in game.
Your avatar will need your new parameters put into it's VRC OSC file. The file can be found in a path such as C:\Users\your_user_name\AppData\LocalLow\VRChat\VRChat\OSC\your_user_id\Avatars
Each avatar has automatically created files for OSC parameters when it is first loaded so long as OSC has been enabled in game. The files are named using that avatars ID. If you have enabled OSC in the past and have loaded into the avatar before putting in your custom tracker parameters you will then need to do one of the three options:
Option 1 -> Reset Config in VRChat OSC radial menu (Might not work)
Option 2 -> Delete the OSC file associated with that avatar so that it will automatically generate a new one when you next load your avatar in game.
Option 3 -> Manually add the parameters in the avatars OSC file. (Note: the types must be Bool's)
Note: you can find your avatars ID inside the
Pipeline Manager(Script)
component in Unity.
Simple Method
- Run VRCHeadpatCounter.exe
- (Optional for autostartup with SteamVR) Run manifest.vrmanifest and enable it in SteamVR Startup Overlay Apps
- In game ensure that OSC has been toggled on (inside your radial menu), and that you have Avatar interactions enabled.
Alternative Method
- Download Python
- Download this Github Repo as Zip
- Extract Zip
- Run
launch.bat
for Windows orlaunch3.bat
for Linux - In game ensure that OSC has been toggled on (inside your radial menu), and that you have Avatar interactions enabled.
Value | Info | Default |
---|---|---|
ParamPersistance | Determines how long interactions will continue to populate in the chatbox since the last time it was triggered. | 60 |
ListeningPort | Port to listen for OSC data on | 9001 |
Sending port | Port to send OSC data to | 9000 |
IP | Address to send OSC data to | 127.0.0.1 |
Log | Tracks the contacts in the output.txt file and exe | false |
This script is not limited to Headpats or just one parameter at a time! You can have multiple trackers setup at once. Under "What is this?" I have both Headpats
, and Steppies
setup on my avatar. You can easily add many more. The only limitation would come from the character limit inside VRC's chatbox.
Each Parameter will need its own VRC Contact Receiver
and remember to name each parameter starting with Track_
. So for steppies it is Track_Steppies
.
![]()
In this example I have named my parameterTrack_Steppies
and have set the collision to react toFoot
,FootR
, andFootL
Program not working as expected? This may be a helpful checklist.
-
Restart VRChat if this program launched successfully and shows you receiving increments in the terminal when your interacted with, but the chatbox in game is not displaying the results.
-
Does your named parameter(s) start with
Track_
-
Do you see your custom parameter(s) in the Avatars OCS file found in a path like
C:\Users\your_user_name\AppData\LocalLow\VRChat\VRChat\OSC\your_user_id\Avatars
. Your avatar may or may not have a json file in thisAvatars
folder Reference OSC Parameters Setup for more detailed instructions. -
In Game: Did you turn on OSC (Inside the radial menu)?
-
In Game: Do you have interactions turned on?