Go Back   EQ2Flames Forum > Information and Resources > EQ2 Fan Site and Resource Provider Forums > Advanced Combat Tracker Forums > Plugin Discussion

Reply
 
LinkBack Thread Tools
Old 10-09-2009, 02:58 PM  
Lil Newbie
 

Posts: 8
Photos: (0)

Default Aion Parse Plugin for ACT: v.0.1.0.3

Download

I have made a basic parser for Aion to be used as a plugin in ACT. Mentioned this to a few friends, and no I'm sick of distributing it out per email.

It does works, but there is some issues with Aion's log, and the syntax variation in the log is a nightmare. I'm currently using this to parse as much as possible to find every variation in the log, and bugs in the parsing. So, I will probably release a new version in not that long time.

Hope you do enjoy it, and bug me with bugs so that I can fix them.


Updated Version 0.1.0.3:
* ACT do now find the file after you have found the log file once. No need to refind the log evrytime you start ACT. (Thanks Aditu for updating ACT for this).
* Included use of the /act commands.
* Regions are added as zones, thus splitting the encounters up in regions.
* Block, perry, resist and evades are added.
* Reflects are added
* Cures and dispells are added
* Power heals are added
* Some minor bugs fixed

Last edited by EQAditu; 10-12-2009 at 05:10 PM. Reason: Version change title sync
Creub is offline   Reply With Quote
Old 10-09-2009, 04:28 PM  
ACT Developer
 
EQAditu's Avatar
 
Character: Aditu
Guild: Cataclysm
Server: Permafrost

Posts: 1,419
Photos: (16)

Send a message via ICQ to EQAditu Send a message via AIM to EQAditu Send a message via MSN to EQAditu Send a message via Yahoo to EQAditu
Default Re: Aion Parse Plugin for ACT, v.0.1.0.2

I took a look at it and commend you on implementing it almost entirely using string manipulation. I'm far too lazy myself and rely on regexes for at least half of ACT's parsing.
EQAditu is offline   Reply With Quote
Old 10-09-2009, 05:14 PM  
Lil Newbie
 

Posts: 8
Photos: (0)

Default Re: Aion Parse Plugin for ACT, v.0.1.0.2

Quote:
Originally Posted by EQAditu View Post
I took a look at it and commend you on implementing it almost entirely using string manipulation. I'm far too lazy myself and rely on regexes for at least half of ACT's parsing.
Yeah have based the first version on string manipulations. But, I have also prepered it for regex's on a file here too (locally atm). The thing about string manipulations is that it will also get some "non" right syntax lines, which I then can spot in ACT instead of checking the log all the time.

And the thing is that I never looked at C# before 3 days ago, and I learned regex last night
Creub is offline   Reply With Quote
Old 10-09-2009, 06:13 PM  
Lil Newbie
 

Posts: 8
Photos: (0)

Default Re: Aion Parse Plugin for ACT, v.0.1.0.2

One thing I do wonder a bit on. How do I interupt the import/export encounters and get it to parse thourgh like the live parsing?
Creub is offline   Reply With Quote
Old 10-09-2009, 08:11 PM  
ACT Developer
 
EQAditu's Avatar
 
Character: Aditu
Guild: Cataclysm
Server: Permafrost

Posts: 1,419
Photos: (16)

Send a message via ICQ to EQAditu Send a message via AIM to EQAditu Send a message via MSN to EQAditu Send a message via Yahoo to EQAditu
Default Re: Aion Parse Plugin for ACT, v.0.1.0.2

I think you lost me. Importing from file/clipboard will use a different thread and method than so called live parsing. SetEncounter should manage splitting the encounters in either case by the timestamps. The plugin except by the isImport flag shouldn't really see anything different between file and live imports and probably shouldn't act different in your case.

EDIT: I looked at some of the forum threads that started pointing to my site... seems you're talking about the difference between BeforeLogLineRead events called by ReadLog, ImportClip or ImportFile. Though I did notice a bug where ImportFile wasn't setting isImport to true like it should. Anyways, there really shouldn't be a difference... what sort of trouble are you running into with ImportClip/ImportFile?

Last edited by EQAditu; 10-10-2009 at 04:14 AM.
EQAditu is offline   Reply With Quote
Old 10-10-2009, 07:27 AM  
ACT Developer
 
EQAditu's Avatar
 
Character: Aditu
Guild: Cataclysm
Server: Permafrost

Posts: 1,419
Photos: (16)

Send a message via ICQ to EQAditu Send a message via AIM to EQAditu Send a message via MSN to EQAditu Send a message via Yahoo to EQAditu
Default Re: Aion Parse Plugin for ACT, v.0.1.0.2

PS, if you can think of anything API wise that I should include or make less reliant on EQ2 stuff, say so and I'll see what's feasible.

I wrote a tiny parsing engine for LotRO in another thread and didn't even get that working perfectly. I need to somehow deal with generic file names for log files... currently it has trouble when you cannot parse the player name out of the path, right?
EQAditu is offline   Reply With Quote
Old 10-10-2009, 11:07 AM  
Lil Newbie
 

Posts: 8
Photos: (0)

Default Re: Aion Parse Plugin for ACT, v.0.1.0.2

Quote:
Originally Posted by EQAditu View Post
PS, if you can think of anything API wise that I should include or make less reliant on EQ2 stuff, say so and I'll see what's feasible.

I wrote a tiny parsing engine for LotRO in another thread and didn't even get that working perfectly. I need to somehow deal with generic file names for log files... currently it has trouble when you cannot parse the player name out of the path, right?
Yes.

I found out what issues I had with importing old encounters from file (not history). First of all I had to find the log file again, it didn't take the current log file I had choosed, so I had to find the log file again. This is maybe good for EQ2 (since different chars results in different log files), but for Aion there is just one big log file.

Second on that importing thing. Some lines seemed to be "cut". One error message complained on date, which I understand since the line had "lost" half of the date string. Other places resultet in errors too, mostly due to the string was cut either on the begninning or end of the line. This happend maybe 3-4 times if I imported 3-4 hours of logs.

These cutting problems never happens on the live parsing.

If I bring up an list of encounters from the history, it stops me infront of all encounters and ask me to type the name. This is abit annoying if you want 20+ encounters picked out of the history. Maybe let it remember the name between each encounters if you choose multiple encounters?

The biggest issue I kinda got is the manualling adding the log for each start. First of all, since open/browser for logs only lists .txt files, it will never show the Chat.log file that Aion creates. This has made a bit confusing for some people trying it out, since you have to type the name full out yourself, and not find it and double click it.

And, it had been nice for it to find the "last used" log file when you start ACT. Currently I have to click open log, find the log, and it is ready. It's not that big issue, but just a bit annoying.

Edit:
When we are at it, it may be a function of it (so I have to look for it), is a method to change "new line" function used in the text-only exporting. Since Aion do not allow multiple posts per text paste, so the new line thingy has to be modifed to get a new line within the same line. Seen a couple of spammer used this technique, so I have to find out how they did

Last edited by Creub; 10-10-2009 at 01:26 PM.
Creub is offline   Reply With Quote
Old 10-10-2009, 08:42 PM  
ACT Developer
 
EQAditu's Avatar
 
Character: Aditu
Guild: Cataclysm
Server: Permafrost

Posts: 1,419
Photos: (16)

Send a message via ICQ to EQAditu Send a message via AIM to EQAditu Send a message via MSN to EQAditu Send a message via Yahoo to EQAditu
Default Re: Aion Parse Plugin for ACT, v.0.1.0.2

Quote:
Originally Posted by Creub View Post
Yes.

I found out what issues I had with importing old encounters from file (not history). First of all I had to find the log file again, it didn't take the current log file I had choosed, so I had to find the log file again. This is maybe good for EQ2 (since different chars results in different log files), but for Aion there is just one big log file.
If you allow it, ACT will probably start splitting large log files it opens. In this case, you'll need to choose which log file also.
Quote:
Originally Posted by Creub View Post
Second on that importing thing. Some lines seemed to be "cut". One error message complained on date, which I understand since the line had "lost" half of the date string. Other places resultet in errors too, mostly due to the string was cut either on the begninning or end of the line. This happend maybe 3-4 times if I imported 3-4 hours of logs.

These cutting problems never happens on the live parsing.
ReadLog() will suppress any exceptions that make it back because you don't want to be interrupted while you play. ImportFile() is slightly different and provides feedback for exceptions. If you don't want these messages to appear, catch the exceptions yourself and do not allow them to make it back to ACT's code. (In either case, exceptions are written to ACT's error log, suppressed or not)

Example:
Code:
try
{
     // Error prone code
}
catch (Exception ex)
{
     // Write the exception message and stack to ACT's error log
     ActGlobals.oFormActMain.WriteExceptionLog(ex, "Parse error of some sort");
}
Quote:
Originally Posted by Creub View Post
If I bring up an list of encounters from the history, it stops me infront of all encounters and ask me to type the name. This is abit annoying if you want 20+ encounters picked out of the history. Maybe let it remember the name between each encounters if you choose multiple encounters?
It's asking you for the character name or the file name of the likely log file? I'm adding ActGlobals.oFormActMain.LogPathHasCharName in the next version to determine if the filename should be ever parsed for the character name. I'm betting that some again hardcoded functionality looking for "eq2log" in the file name is what you're talking about. It's not finding any file names by that filter so it asks for the file.

Quote:
Originally Posted by Creub View Post
The biggest issue I kinda got is the manualling adding the log for each start. First of all, since open/browser for logs only lists .txt files, it will never show the Chat.log file that Aion creates. This has made a bit confusing for some people trying it out, since you have to type the name full out yourself, and not find it and double click it.
I'll have the open file dialogs follow ActGlobals.oFormActMain.LogFileFilter.

Quote:
Originally Posted by Creub View Post
And, it had been nice for it to find the "last used" log file when you start ACT. Currently I have to click open log, find the log, and it is ready. It's not that big issue, but just a bit annoying.
The problem here apparently was some code I don't know why I had there. When ACT started, it would only load old files with "eq2log" in them. I removed that so in the future it should open any file it had previously open.

Quote:
Originally Posted by Creub View Post
Edit:
When we are at it, it may be a function of it (so I have to look for it), is a method to change "new line" function used in the text-only exporting. Since Aion do not allow multiple posts per text paste, so the new line thingy has to be modifed to get a new line within the same line. Seen a couple of spammer used this technique, so I have to find out how they did
Are you sure they are not simply multiple chat commands sent in quick succession by macro?
EQAditu is offline   Reply With Quote
Old 10-10-2009, 09:33 PM  
ACT Developer
 
EQAditu's Avatar
 
Character: Aditu
Guild: Cataclysm
Server: Permafrost

Posts: 1,419
Photos: (16)

Send a message via ICQ to EQAditu Send a message via AIM to EQAditu Send a message via MSN to EQAditu Send a message via Yahoo to EQAditu
Default Re: Aion Parse Plugin for ACT, v.0.1.0.2

I'll push these changes out tonight as a minor ACT revision.

As some additional things... I notice that you replace ActGlobals.oFormActMain.ZoneChangeRegex but don't end up using it in your actual parsing engine. ACT's backend parsing won't do this for you... the property is for the use of the quick zone detection method that ACT uses on startup or changing logs. I think you set up the regex slightly wrong as well. You don't include matching for the timestamp(assuming the zone change log line is prefixed with something like, "2009.09.30 08:37:43 : ") Prefix your existing regex with, "[\d :\.]{22}". (Meaning 22 characters of a digit, space, colon or a period)

This is all you should need to add for parsing...
Code:
if (ActGlobals.oFormActMain.ZoneChangeRegex.IsMatch(logInfo.logLine))
{
     ActGlobals.oFormActMain.ChangeZone(ActGlobals.oFormActMain.ZoneChangeRegex.Replace(logInfo.logLine, "$1"));
}
Remember to set ActGlobals.oFormActMain.LogPathHasCharName as false in the future.

You should set ActGlobals.oFormActMain.LogFileFilter to "Chat*.log" in the event that ACT splits the file by date.
EQAditu is offline   Reply With Quote
Old 10-10-2009, 10:39 PM  
ACT Developer
 
EQAditu's Avatar
 
Character: Aditu
Guild: Cataclysm
Server: Permafrost

Posts: 1,419
Photos: (16)

Send a message via ICQ to EQAditu Send a message via AIM to EQAditu Send a message via MSN to EQAditu Send a message via Yahoo to EQAditu
Default Re: Aion Parse Plugin for ACT, v.0.1.0.2

I'm prompted to add some fixes with the View Logs window as well for parsing plugins. You will be able to change the text color of a log line by code similar to this:
Code:
logInfo.detectedType = System.Drawing.Color.Red.ToArgb();
I personally find the View Logs window coloring invaluable to see if all log lines are parsed correctly.

Additionally I needed to fix some linking by making a variable public to plugins. In your plugin you're prompted to make a log sorting variable and increment it. Instead, use ActGlobals.oFormActMain.GlobalTimeSorter and increment it before entering the data. (IE i++ increments after, ++i increments before) This will allow you to double-click a single event in the Main tab and it will be selected in the View Logs window. Also very useful for debugging parsing engines.
EQAditu is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are Off
Pingbacks are Off
Refbacks are On


Sponsor Ads


All times are GMT -4. The time now is 12:42 PM.


Design By: Miner Skinz.com Powered by: vBulletin
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Template-Modifications by TMS