Bryan1029384756 / PaperRecorder

MIT License
15 stars 0 forks source link

Advanced Recording Behavior #6

Open MadDog443 opened 1 year ago

MadDog443 commented 1 year ago

Is your feature request related to a problem?

Using a recording whitelist and on a large server would eat up resources and generally would not work, nor would it be easy to share with other players due to x-raying.

Describe the solution you'd like.

The ability to set rules of: -when to record based on event listeners like "x amount of players doing damage to each other" or when there's a large gathering of players -the ability to set a radius on how large the area of recording should be or even have it expand to encompass whoever has been dealt damage in the last 30 seconds -end recordings if no pvp has occurred in the last 2 minutes -have the recording start based on where the event was triggered -support ore obfuscation -subterranean obfuscation of blocks based on a whitelist unless a player during the replay has the ability to see said block

Describe alternatives you've considered.

There are no alternatives at the moment, although there are plugins which would help complete these goals on the following GitHub: CivMC; namely a listener for pvp events (used for combat logging) and an obfuscator plugin, although I have no clue if it would integrate well.

Other

This is just a feature request of a set of ideal tools to make this software usable on large servers. Also, was it not possible to operate a server-side replaymod as a plugin, just curious?

Bryan1029384756 commented 1 year ago

So for recording depending on pvp i don't feel like that is what this fork is trying to accomplish. I can probably add better API support so it can be done using a plugin.

For ore obfuscation that could be a good feature to add and I can hook into paper's built-in ore obfuscation.

And for why it's not in a plugin it's because it creates new challenges and slower updates with the modded version. I created this because I wanted a version that can easily update with the Modded version

MadDog443 commented 1 year ago

That's pretty smart that you pull upstream from both the mod and papermc, letting them handle features and issues with their stuff while you focus on the core aspect of the fork. Honestly, if you added support for that in the API that would be freaking awesome as it would allow me to do a lot of other things like using Replaymod as a tool for moderation and more, and I would be more than happy to work on a plugin to solve the issue myself!

About the API, what would be available, is there any documentation, I'm not really sure how you are able to choose what regions you record as in client-side Replaymod it only records the chunks loaded by a player, my goal/hope is to use paper's API to get player positions of recent pvp events and then create a range of chunks to then tell your API to start recording in, but the issue I'm concerned about is changing that range during recording as players move around duing a pvp event...

Also, as for obfuscation of player made structures I think I have a way to solve that via a plugin for obfuscation but I'm wondering how your server-side implementation of Replaymod works, does it just record outgoing traffic sent to clients or is it recording events from the server itself? I ask that because the obfuscation plugins we use intentionally don't send certain information or send false information to clients to intentionally hide things like enchants, blocks underground, player health, and more.

Perhaps those 2 last questions would be better answered by the mod maker devs about the functionality of the mod and I will probs end up asking them more about how their mod works but I'd still be glad to hear what you have to say.

Bryan1029384756 commented 1 year ago

Yeah doing this allows me to update with the mod faster without so much changes. But I still add things over it. Like this fork has Simple Voice Chat compatibility to record voice chats in the replays.

Well, currently, there is no api or documentation to hook into it yet, but there is already a built in system for region recording

the command to start a region recording is: /replay region [region name] start [cornerx] [cornerz] [corner2x] [corner2z]

This gets all activity in the defined area and records it. So it doesn't follow just one player. As for changing the range, I would have to do more testing to see that.

For obfuscation, it records packets sent to players while region recording has its own packets. I've did test if paper obfuscation worked with it but it currently did not apply. Will have to look more into that. Really the only thing we have to hide is blocks everything else don't have to worry about

SeasonPhan commented 1 year ago

@Bryan1029384756 can you make a purpur version of paperRecorder? (or is there documentation somewhere so i can make my own fork with purpur's changes?)

Bryan1029384756 commented 1 year ago

@SeasonPhan I currently don't have plans to port to Purpur. You can learn how forks are done using PaperMC Contributing basically a small rundown will be building my version and see my patches and reapplying them to Purpur using their patches. In the future I would love to support multiple versions and Forks but I'm a bit too busy with work. Currently will only update to new releases of Paper for the mean time till I get more free time.