It looks like you're new here. If you want to get involved, click one of these buttons!
I'm completely new to writing custom triggers for ACT and was wondering if anyone who has more knowledge could give me a quick hand. I opened the log file generated by ACT in vscode and used the "find using regex" feature to generate regex for triggers, but have run into 3 problems:
1) First the simplest, because the problem could just be that I'm dumb. In the
triggers I copied that made me look into making my own, the following
regex
14:3FEB:Leviathan starts using Temporary Current
is
finding a match even though the word "using" can't be found in the
entire document. Am I just looking at the wrong file? Are the log files
in Advanced Combat Tracker\FFXIVLogs not the ones we're searching in with the regex?
Text being searched: 3FE0|Rip Current|400048FD|Leviathan||
Comments
I would recommend right-clicking an encounter in ACT and using the View Logs window. You can search as regex there and be confident that the regex flavor is the same.
I analyzed what the FFXIV plugin does a bit and it seems there is a "raw" format of the log line and a "transformed" format of the log line that more resembles the FFXIV client chat log.
The FFXIV plugin modifies the network log file as it passes through the different stages in ACT. The Custom Trigger engine gets the log line during the second stage. So the original lines do not resemble the lines that get to ACT. Only plugins that subscribe to the BeforeLogLine event would see what the network log files are. OnLogLine event handlers and the Custom Trigger engine would see how the log lines are in the View Logs window.
Yeah if that's the correct file then the plugin definitely does some transformation, because in every single trigger I've copied (ones that actually work correctly) ":" is matching "|", and when I try to match "|" using "\|" it never works. I know this isn't traditional regex standards, that's why I've been so confused. If I could just match like I do in VSCode none of this would be an issue. But yeah, like I said, the triggers I've copied have words in the regex that don't even exist in the entire log file, so something is definitely going on, and I don't know how to figure it out. I've tried to look for guides specifically for FFXIV triggers but nothing really shows up aside from simple stuff using trivial regex.
In the last example I put, the actual regex I came up with to match
179A|Horrid Roar|E0000000|||b
was
179A\|Horrid Roar(.){12}[a-z0-9]
which works in VSCode. I know there's a lot of redundant detail and it could be simplified but I wanted to keep it readable to know at a glance what it's doing in case I need to debug.
Just to give an idea of what type of fuckery is going on, this: 179A:Horrid Roar(.){12}[a-z0-9]
Matches this: 179A|Horrid Roar|E0000000|Abc
But not this: 179A|Horrid Roar|E0000000|||b
I'll take a look at the actual log file by right clicking the encounter as you suggested when I get a chance and I'll update.
I really think you should abandon the idea of using VSCode on the raw network logs. The transformation makes them not the same.
Either use the regex search in ACT's View Logs window, or copy the logs out of that window to put in VSCode.
Holy crap thank you SO MUCH for your help, didn't think it'd be that simple. I didn't even know you could view the log directly from the encounter by right clicking on it, all I've ever done with ACT is follow instructions and copy/paste triggers. I just checked it out and yeah the format is entirely different, and ":" are all over the place, whereas in the log files I was looking at there wasn't a single ":". It was just me being dumb. Again thank you so much you just saved me a massive amount of time.