Replies: 2 comments 13 replies
-
If you're trying to play with the TShock SSC system (as opposed to just turning SSC on and using it manually) you need to update the TShock database and then send message 5 (player inventory slot) back to the client with the updated data. You can see an example here: https://github.com/Pryaxis/TShock/blob/general-devel/TShockAPI/PlayerData.cs#L417
The parameters for the packet are here, but you can use SendData in the same way that call uses it to achieve the expected result as opposed to crafting packets yourself and sending them over the wire. The precise packet is this: https://tshock.readme.io/docs/multiplayer-packet-structure#player-inventory-slot-5
When SSC is enabled on the server, the clients will take updates from the server as the true state and update their records according to the messages sent from the server. The reason why you have to relog if you've been playing with the database is that without sending the sync data, the client has no idea that the inventory has changed. You can either leverage the existing SSC system to update a player's inventory and have TShock "restore" the data, or you can reimplement things by hand (just depends on what you're going for).
GitHub <[email protected]> wrote:
“I'm learning how to make plugins right now,
I can actually change an items ID, Stack, Prefix, etc. but only server-side,
it doesn't show client-side, so I won't see the change until I relog to the server.
I know I'm supposed to use packets to achieve this, but after trying like 7 times I thought I could ask here.
How can I send the info from an inventory slot to the player's client-side?
(I'm using SSC)”
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
5 replies
-
The Pryaxis organization on GitHub has a repo for downloading and decompiling the game — just open it in Avalonia/ILSpy and it’ll be done in a jiffy.
GitHub <[email protected]> wrote:
“Are there any guides or resources on how to decompile the game?
Also, is that allowed by ReLogic?”
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm learning how to make plugins right now,
I can actually change an items ID, Stack, Prefix, etc. but only server-side,
it doesn't show client-side, so I won't see the change until I relog to the server.
I know I'm supposed to use packets to achieve this, but after trying like 7 times I thought I could ask here.
How can I send the info from an inventory slot to the player's client-side?
(I'm using SSC)
Beta Was this translation helpful? Give feedback.
All reactions