NightmareXIV/AntiAfkKick

Dalamud plugin version

Closed this issue · 33 comments

the dalamud plugin version seems to not work most of the time, gonna try ACT now

Are you using dalamud api3 or api4? If it's 4, I can send you debug version, though it really should work just fine

I'm using 4

Yeah its weird, it is working for me, but not for a friend of mine. API4 too.

latest.zip
Disable plugin from custom repo and Unpack this archive into %appdata%\XIVLauncher\devPlugins and load it instead
and then please send me dalamud log from a pc where it doesn't works so I can take closer look on it

I will grab that debug version as well, because:

I just installed AntiAfkKick Dalamud version and idled in my FC house for a while, the plugin didn't kick in for some reason.

EDIT: Here is a snippet from my Dalamud.log from when the plugin started "tracking" to the point of supposedly sending keypresses

2021-10-12 14:12:31.643 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000010328; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

2021-10-12 14:12:41.644 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000010328; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

2021-10-12 14:12:51.645 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000010328; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

2021-10-12 14:13:01.646 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000010328; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

2021-10-12 14:13:11.647 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000010328; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

2021-10-12 14:13:11.647 +02:00 [INF] [AntiAfkKick-Dalamud] Sending anti-afk keypress - beginning: 00000000000F0CB2

2021-10-12 14:13:11.751 +02:00 [INF] [AntiAfkKick-Dalamud] Sending anti-afk keypress - ending 00000000000F0CB2

2021-10-12 14:13:21.751 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000010328; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

2021-10-12 14:13:31.752 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000010328; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

2021-10-12 14:13:41.753 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000010328; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

2021-10-12 14:13:51.753 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000280B48; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

2021-10-12 14:14:01.754 +02:00 [INF] [AntiAfkKick-Dalamud] [Debug] fgWH:0000000000280B48; proc.MWH:00000000000F0CB2; GCP.MWH:00000000000F0CB2

yet, the game went into "AFK Camera" Mode and reduced the FPS to 15 FPS. No idea if the plugin should prevent the AFK Cam and FPS throttling, tho.

EDIT 2:

Aaaand, interesting. After monitoring it for a bit now, manually resetting the AFK Cam + FPS Throttling, the plugin seems to kick in just fine. It is just this first time, where the plugin somehow says, that it is sending a keypress, but it actually is not getting registered.

I'm not really sure what's the problem, I myself can't reproduce it, but could you test this version now?
Easiest way is to go to any dungeon and afk for 10 minutes, you shouldn't get kicked or get message that more than 7 minutes has elapsed
If this doesn't work, I have another option in mind as well
latest.zip

This one works fine, it seems. Installed it as a devPlugin, logged in and activated it, went for a short break and still no AFK Cam after nearly 10 minutes.

that's nice, thank you! I'll upload it to repo and see how things will go

No problem. I will remove the devPlugins version and install the repo version and continue testing ^^

Hmm, it started to happen again, that the AFK Camera activated and the plugin not kicking in, despite sending a keypress (according to the xllog window)

Is there maybe a plugin conflict with another plugin or an inconsistency if the "AFK Camera" is enabled, FPS Limit of 15 active, gamepad mode and tabbed out (on a second monitor to browse, discord etc)? My AFK Timer is also set to kick in after 5 minutes.

EDIT: It is very inconsistent, tho, if the plugin kicks in or not.

So far I tested it with idling camera and fps limits and had no problems
As for afk timer, can you try disabling it?
Also if you have switched back to repo version, make sure it's updated successfully to v2.0.0.1
It shouldn't conflict with other plugins at all
If you can confirm it's version is correct and it doesn't works even with afk timer disabled, I will make a version that uses different functions and upload it here

Starting a test run. I have the AFK Timer disabled and the plugin is on version v2.0.0.1.

I will edit my reply as soon as possible, just entered a dungeon in Explorer Mode.

EDIT:

Okay, I was in a dungeon now, in explorer mode with nothing changed, except the AFK Timer disabled and no popup whatsoever about getting kicked or anything. AntiAfkKick also did send 3 keypresses in the meantime. Maybe the Auto AFK-Cam Timer is the culprit? I personally use it, since I tend to go afk for 5 to 10 minutes for small stuff and have the game go into this Idle Cam mode.

EDIT 2:

Test Run 2. Left Dungeon, enabled Auto AFK-Cam again, set to 5 minutes. AntiAfkKick-Dalamud works properly and prevents it.
I can't nail it down yet, but I assume that AntiAfkKick-Dalamud has a problem to properly kick in after the first login. Whenever I let the first Auto AFK-Cam trigger, go back to being active and then just idle around, it works all fine.

latest.zip
Can you please test this one?

Removed Repository Version, installed this one into devPlugins, commencing test ^^

EDIT:

After some long testing now and with doing PotD runs etc, porting around a lot...it seems to finally work?

Could you please upload your dalamud log as well or inspect it yourself to see if there were any cases of keypresses sent that did not reset afk timer?

With the latest version you uploaded, I no longer had any issues. It worked every time without issues and the AFK Cam never kicked in.

EDIT:

I just did a longer test, to be sure. Went afk for over 1 hour and when I got back, I was still ingame, no AFK Cam kicked in.

I updated repo plugin version to 2.0.0.3 which uses same principle of sending keys as debug version but is restricted to send it only every 1-2 minutes. Please let me know if you will have any problems with it.
What I think was happening is game just wasn't executing fast enough to register click. By ensuring that click happens inside game's framework update event I hope it will be always registered from now on.

Okay, going to delete the devplugin version and switching to the repo version. I will let you know how it goes ^^.

And interesting, that might be it. Huh...

EDIT: Working flawlessly so far ^^ Thank you a lot for your patience and work, Eternita-S! I highly appreciate it!

using latest repo version, sadly doesn't work for me
dalamud.log

Just had the latest Dalamud plugin version (2.0.0.3) fail to work for me earlier, but I don't have a log to provide unfortunately.

using latest repo version, sadly doesn't work for me dalamud.log

hmm... is this a log just after you got kicked...?

Just had the latest Dalamud plugin version (2.0.0.3) fail to work for me earlier, but I don't have a log to provide unfortunately.

If you could give a log just after you got kicked that'd be a good help!

Also I can forcibly stop afk timer from functioning at all in it's root. But I'm not sure how safe it would be

using latest repo version, sadly doesn't work for me dalamud.log

hmm... is this a log just after you got kicked...?

Just had the latest Dalamud plugin version (2.0.0.3) fail to work for me earlier, but I don't have a log to provide unfortunately.

If you could give a log just after you got kicked that'd be a good help!

Also I can forcibly stop afk timer from functioning at all in it's root. But I'm not sure how safe it would be

no the log is immediately after I came back and was kicked

heres a log as it went into afk status, note that there was an update yesterday, when I did the update it worked and didn't go into afk status until I restarted game and then now where it doesn't seem to prevent afk

dalamud.log

latest.zip
Could you please use this debug version?
It won't fix the problem but hopefully it's logs will help me to understand the problem.
Worst thing is that I can't reproduce it myself...

heres one using that version

dalamud.log

I updated it to version 2.0.0.5 in the repo, please see if it fixes the problem.
Also logs will be enabled by default in debug logging channel, so if you'll have a problem again, set the log level to debug before collecting new logs
image_460

there were few updates recently so if you still had problems, they should be resolved now

I'll give the new version a shot and I'll set it to debug; if anything happens I'll send it here. For the meantime I was using the test (from here: #1 (comment)) and I didn't have a problem.

I'll remove that build and use the current one. Hopefully this resolves it.

The only thing I wish I could do is set my status to AFK manually and have it stay that way, as this seems to interrupt my status to say I'm available, even if I'm not. I usually do this to have the game automatically reduce my FPS so I'm not working my system over for no reason.

Edit: You should probably mention to people that to grab logs and set the log level they need to use the command /xldev -- I had to look this up after numerous searches since it isn't mentioned nearly anywhere, nor is it an option in Dalamud Settings.

I went AFK for about an hour and it seems to be functioning as expected. There was a line in the log that was out of place compared to the rest, so I'll provide that snippet here in case it's important:

12:53:58.386 | DBG [AntiAfkKick-Dalamud] [Debug] proc.MWH:00000000006E05A8; GCP.MWH:00000000006E05A8
12:53:58.386 | DBG [AntiAfkKick-Dalamud] Afk timers: 50.00579/0/50.00579
12:54:00.692 | DBG HandlePrintMessageDetour String modified: System.Byte -> Dalamud.Game.Libc.StdString(2727894574032)

On the other hand, I'll let it run overnight tonight to see if anything happens.

12:54:00.692 | DBG HandlePrintMessageDetour String modified: System.Byte -> Dalamud.Game.Libc.StdString(2727894574032)
that's not a line from the plugin so it's fine

The only thing I wish I could do is set my status to AFK manually and have it stay that way, as this seems to interrupt my status to say I'm available, even if I'm not. I usually do this to have the game automatically reduce my FPS so I'm not working my system over for no reason.

well that would make plugin rather complicated which I don't really want
probably you could instead alt-tab to other window or minimize game using mini plugin? that'd reduce fps as well, if you have appropriate option enabled

Edit: You should probably mention to people that to grab logs and set the log level they need to use the command /xldev -- I had to look this up after numerous searches since it isn't mentioned nearly anywhere, nor is it an option in Dalamud Settings.

yeah, makes sense, command for bringing log window directly is /xllog

After leaving it to run overnight, I didn't seem to have any issues with the latest version. However, here's the log in case you wanted to check it over for any discrepancies.

log.txt

from the log it would seem like everything is working as intended. What about other participants of the issue though?
@Nypheena @Maxunit

theres been a lot of version updates but so far yeah everything seems to work smoothly, over a few days now I've left the game on for an hour alt tabbed while watching and waiting and no issues