VTuber Plus

VTuber Plus

Not enough ratings
WebSockets With Python!
By FOD
This guide will show you how to use Websockets with Python. (3.10.6)
   
Award
Favorite
Favorited
Unfavorite
Websocket setup
To use the Websocket with Vtuber plus, you must make sure it's open.

Next get the IP and port that the server is operating on. (This can be found in General > Websocket Server)

https://gtm.steamproxy.vip/ugc/1834675989599431055/3EC48C285059FFB7D60FF4824B6919AF5A956E3F/?imw=256&&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false

In python you want to import websocket to use it.

import websocket

Next you want to create the connection.

ws = websocket.WebSocket()

Then to use the connection, you need to connect to the server.

ws.connect("ws://127.0.0.1:4430/vtplus")

once you are connected, you can send messages to the server. Here are some examples.

ws.send("VTP_Avatar:2") ws.send("VTP_Camera:1") ws.send("VTP_Throw:3:8:5:0") ws.send("VTP_Drop:6:2:0")

Once you are done with your commands, you want to close the connection.
ws.close()


Here are the list of currently available messages.
(Found on) https://vtuberplus.com/

VTP_Throw:Count(default 0):ItemIndex(default -1):CustomItemIndex(default -1):Damage(default 0) VTP_Drop:ItemIndex(default -1):CustomItemIndex(default -1):Damage(default 0) VTP_Food:ItemIndex(default -1):CustomItemIndex(default -1):Damage(default 0):Floating(default false) VTP_Confetti VTP_Splash VTP_Goo VTP_Bucket VTP_Camera:(1 to 9) VTP_Avatar:(1 to 14) VTP_Light VTP_Bloom VTP_FX:[Blur, Glitch, Grayscale, Pixelate, Rainbow, Shake, Wave] VTP_OSC_INT:(Parameter:Value) VRChat Exclusive VTP_OSC_STR:(Parameter:Value) VRChat Exclusive VTP_OSC_BOOL:(Parameter:Value) VRChat Exclusive VTP_Mesh:(Mesh Index) VTP_HeadPat:Speed VRChat OSC