oceijt / DeadTraps

Checks for dead hunter traps
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Now Possible to Fix Dead Trap Plugin? #4

Open Elite-Mercenary-Raven opened 1 year ago

Elite-Mercenary-Raven commented 1 year ago

Hey Oceijt!

In the latest update Jagex fixed the bug that was preventing chinchompas from correctly facing towards the box traps that were luring them. The update with that bug was what broke the dead traps plugin. Being able to instantly spot dead traps was extremely helpful, so hopefully this means the plugin can be restored! Is it possible to look into this?

Thank you!

inewman commented 1 year ago

NB: I am not the plugin dev.

Even if that interaction were transmitted again (and I don't think it is currently), seeing which box the chins target is only half of the problem (and in fact is not necessarily required for this plugin). The main problem is not being able to see which chin the boxes target.

This is because the invisible NPCs that are placed when you lay a box trap (and their associated statuses, including with which entity they are targeting/interacting) are no longer transmitted to the client, in an optimization measure by Jagex. This information is required because the "dead trap" mechanic happens when a box targets a chin and then the chin is otherwise despawned (most commonly when 2+ boxes target the same chin and one of them successfully catches it).

It may be possible to determine how the traps target chins; if the targeting mechanics were fully understood, that logic could be replicated by a plugin to determine exactly when boxes target chins and which chin they target to obtain the same info as before. But this is a pretty daunting task even if you already have the game knowledge required to make accurate assumptions with which to start testing.

If anyone at Jagex were reading this and wanted a super easy fix to allow this plugin to work again... give the previously invisible NPC a very small model (or, enable whatever flag is required for it to transmit to the client) and then give that NPC the same properties as a post-TOA thrall, such that players have no means to examine/interact with it. This does not require a rewrite of hunter code, is basically invisible to all players, and will provide all of the necessary information to the client.

oceijt commented 1 year ago

You are completely correct. I talked with some people about the exact point you're making with trying to understand trap targeting mechanics but I did not get far. There may very well be bits of RNG involved and the process of figuring it out is a very tedious and complicated one

Elite-Mercenary-Raven commented 1 year ago

Belated reply, but better late than never (sorry about that!)... I appreciate the explanation and confirmation from you guys. Given how this game is getting more calculation heavy, it's got to be unlikely we'll ever see an (intentional) update to the chin code. I don't see a reason why they'd do it. I don't even know if the spaghetti code is likely to help us out here. The plugin was nice while it lasted.

inewman commented 1 year ago

No worries on the late reply. I managed to find an old clip of mine when I was explaining this mechanic to someone at the time. You can see how the game transmits the null NPC and its targeting information, how both traps target the same chin, and also how the trap on the right dies since the one on the left catches it.

https://i.imgur.com/3NZBNfp.mp4