Pryaxis / TShock

☕️⚡️TShock provides Terraria servers with server-side characters, anti-cheat, and community management tools.
GNU General Public License v3.0
2.43k stars 382 forks source link

Rewrite SSC #929

Open MarioE opened 9 years ago

MarioE commented 9 years ago
hakusaro commented 9 years ago

:+1:

ghost commented 9 years ago

So many work for 5.0! Good luck, @MarioE!

hakusaro commented 8 years ago

One of the things discussed in #1100 but not really highlighted as the primary issue is the ability to have an effectively passive SSC system, where the server sends and receives character data back and forth between server and client. This would enable owners to have SSC "enabled" but being permissive of existing inventories and flushing changes in server inventories back to characters as time progresses.

This can be accomplished by sending packet 7 to toggle SSC on and off and sending the inventory data back and forth. Alternatively, if this is a big issue we want to implement, yor seemed to imply that we could ask nicely for a new packet the exclusively toggles SSC on and off.

Patrikkk-zz commented 8 years ago

Thanks for addressing the issue we've discussed in PM @nicatronTg . I was going to write a comment but you ninja'd me and pretty much said what I've had on my mind. I remember SSC used to be called "server sided inventories" back in the days (SSI) and after a while it got changed to Server Sided Character. It would be awesome to allow servers to have SSC without necessarily having SSI because there are many great plugins which require access to modify TPlayer variables. Right now the two things are tied together. This can be accomplished as @nicatronTg described. I've personally used this method many times, and there is also a plugin in our resource manager by @ProfessorXZ If I'm correct, which uses this method, and it runs without issues. Of course it would be less hacky if we could convince the Terraria devs to introduce a new packet for this, or to modify SSC. (Maybe separate the things, have SSC and SSI)

DogooFalchion commented 8 years ago

I think we should break down the concepts in SSC and what we would need to do to make it something flexible.

The question quickly becomes, how much of this can be in tshock and how much should be in a plugin...

hakusaro commented 8 years ago

I support the bullet points @DogooFalchion outlined and have added them to the top of this issue.