Advanced Combat Tracker Forum Index Advanced Combat Tracker
Advanced Combat Tracker Forums
Alternate Forums



Welcome
It is very likely that this forum will be discontinued in favor of the current alternate forums. Since this is a free forum, I do not control much about it and believe it or not, there are more helpful people in the alternative forums. By switching, there will be only one forum and a more active user base that actually helps me answer questions. It is preferred that new topics are started there instead of here.

Parse Export Formatter

 
Post new topic   Reply to topic    Advanced Combat Tracker Forum Index -> Plugin Development
View previous topic :: View next topic  
iddy



Joined: 18 Apr 2008
Posts: 21

 PostPosted: Tue Apr 22, 2008 9:58 am    Post subject: Parse Export Formatter Reply with quote Back to top

EDIT: *****

http://everquest2.graceamazing.com/ParseByCategory/ParseByCategory.aspx
Got files and instructions there. Plug-in is working great. Let me know if you have any issues so i can improve it. Thanks!

Verify your assembly version is
[assembly: AssemblyVersion("3.0.0.0")]
to know you have the latest version

----------------------------------------------------------------------------------------------
I started working on a plugin that will display a # of players per category back to back.

My end-result/goal is a parse that looks someting like this (presuming I only wanted 4 sections. I could want 1 or 100):

======DPS======
Iddy 1000 (30%) | 3.6
Bitty 10000 (70%) | 133.6
======HEAL======
Iddy 10000 (100%) | 1503.6
Bitty 10 (0%) | 0.1
======Best Heal======
Bobbo 900 - Divine Heal
======Most DPS Crits======
Jojo 20



I started writing a plugin that i've got the interface working, but now that i'm into developing the actual code to handle what i've done i'm stumbling just at the beginning.
What I want to do i believe is pretty simple, i just need some direction or an example of some code to get what i'm looking for.
Is there a way to attach to the following?
1) General Options > Text only Formatting

I would like to attach to parts of this. Specifically I want to have my plug-in mimic the Clipboard Export Formatting.
My goal is grab the data of the last completed event, modify how it is parsed, and the export it as usual.
The total goal is to grab the current data, format it much the way that the Combat Export Formatting does it, store that in a variable sFirstForExport and then change the Combat Export Formatting, store the new parse in sSecondForExporting and then push them both out back to back.


Any help is much appreciated!




Specifically, I am getting into what appears to be alot of code or a clunky system of parsing the settings myself (in a for-next loop or a if then replace string set) which is fine. but being able to attach to the existing and make use of the standard interface would be nice.

Additionally, the pop-up prefix generator would be great to attach to. however, again, worst case scenario I just create my own.[b]


Last edited by iddy on Mon May 05, 2008 10:13 am; edited 2 times in total
 
iddy



Joined: 18 Apr 2008
Posts: 21

 PostPosted: Thu Apr 24, 2008 8:16 am    Post subject: Progress Reply with quote Back to top

as you can see in the progress I have made, I am able to do what I want to do for the most part.

However, under oFormActMain_OnCombatEnd you will see that i'm still having some formatting issues (the // commented out items that are string replace are items that have no clear representation).

Anyone got any ideas?


Last edited by iddy on Fri Apr 25, 2008 4:25 pm; edited 1 time in total
 
iddy



Joined: 18 Apr 2008
Posts: 21

 PostPosted: Fri Apr 25, 2008 4:24 pm    Post subject: Work in Progress Reply with quote Back to top

As you can see, this is a work in progress. This version works fully.

you can add an unlimited number of sections, lots of features. I'm having to do a lot of stuff that it would have been nice to get otherwise, but it works none the less. The pop-up formatter isn't finished yet, and the whole process is still a little buggy (i expect perfection... /cry).

Hopefully someone can take a look and give some suggestions, let me know if i did anything wrong, or just could have did it in a way they think is better!


The files have been located at http://everquest2.graceamazing.com/ParseByCategory/ParseByCategory.aspx. This way the files are accurate and up to date every time I make a Change.
 
Aditu
Site Admin


Joined: 27 Nov 2007
Posts: 302

 PostPosted: Mon Apr 28, 2008 12:57 pm    Post subject: Reply with quote Back to top

It doesn't seem like the .cs file links work on that site. I receive response 404 errors.
 
iddy



Joined: 18 Apr 2008
Posts: 21

 PostPosted: Mon Apr 28, 2008 6:37 pm    Post subject: Reply with quote Back to top

Aditu wrote:
It doesn't seem like the .cs file links work on that site. I receive response 404 errors.



It won't let you view the file (i'd have to set it up).

Right click save as works properly
 
Aditu
Site Admin


Joined: 27 Nov 2007
Posts: 302

 PostPosted: Mon Apr 28, 2008 7:19 pm    Post subject: Reply with quote Back to top

All I download is a file with this fragment:
Code:
<body>
<div><h1>Server Error</h1></div>
<div>
 <div><fieldset>
  <h2>404 - File or directory not found.</h2>
  <h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
 </fieldset></div>
</div>
</body>
 
iddy



Joined: 18 Apr 2008
Posts: 21

 PostPosted: Tue Apr 29, 2008 11:00 am    Post subject: Reply with quote Back to top

Sorry about that. Forgot iis dosen't play friendly with linking .cs or .vb files directly. I changed the link to instead point to filename.cs.txt and every time the page loads, it refreshes .txt with a new copy of the .cs file.

Thus, when you save the file (notes put on the link) you have to save as filename.cs instead of filename.cs.txt.


This is a work in progress. It is buggy. It works, but dosen't work perfectly. If you come across something, please let me know. If you know how to fix it, even better!. Thanks.
 
iddy



Joined: 18 Apr 2008
Posts: 21

 PostPosted: Mon May 05, 2008 9:51 am    Post subject: Reply with quote Back to top

Hopefully the links are working and everything.

Last night i successfully tested the plugin and believe it is ready for general consumption. Hope you all enjoy!
 
Frank_Harmann



Joined: 10 Mar 2008
Posts: 44

 PostPosted: Thu May 08, 2008 5:05 am    Post subject: Reply with quote Back to top

Very nice job Very Happy

Do you(or Aditu) know if it is possible to call functions in one plugin from a different plugin? If it's possible i would try to add your customized view to the directx overlay. I think you only would have to put everything inside your OnCombatEnd callback in a public function which will return a string. I can then periodically call that function to display info online with the directx overlay.
Your new function would then look like this:

void oFormActMain_OnCombatEnd(bool isImport, CombatToggleEventArgs encounterInfo) {
if (isImport) return;
String result = computeResult(bool isImport, CombatToggleEventArgs encounterInfo); // new public function with original content of OnComatEnd callback

ActGlobals.oFormActMain.SendToMacroFile(
this.txtExportToFile.Text.ToString(), //"ParseByCategory.txt",
result,
""
);
}


My own function would look like this:

void onEncounterInfoTick() {
String result = computeResult(false,ActGlobals.oFormActMain.ActiveZone.ActiveEncounter);
Eq2Hook.updateEncounterInfo(result);
}


Frank
 
iddy



Joined: 18 Apr 2008
Posts: 21

 PostPosted: Thu May 08, 2008 7:08 am    Post subject: Reply with quote Back to top

Frank_Harmann wrote:
Very nice job Very Happy

Great. I hope you enjoy it alot!


Frank_Harmann wrote:
Do you(or Aditu) know if it is possible to call functions in one plugin from a different plugin?

As far as i know it is if you import that other function, but you effectively now bridge the two together unless you make some arbitrary method (one saves a file, the other constantally loads it for example or you override a property of a built in function

Frank_Harmann wrote:
I think you only would have to put everything inside your OnCombatEnd callback in a public function which will return a string. I can then periodically call that function to display info online with the directx overlay.

I will play around with possible solutions.

It looks as though your function simply loops through on a tick and performs an action. Theoretically you would simply load the exported file (ParseByCategory.txt) on each tick and update with the contents. Though that's not an elegant fix.

Option two is since yours goes by tick and not by on combat end, you could constantally call oncombatend across plugins, but you now require both our plugins to be present in order to function.
 
Aditu
Site Admin


Joined: 27 Nov 2007
Posts: 302

 PostPosted: Thu May 08, 2008 9:05 am    Post subject: Reply with quote Back to top

Calling functions across plugins is somewhat problematic... I'd be new at that as well. You either need an instance handle of the plugin class or the plugin has to provide static methods.

For the instance handle, you'd either need to create your own instance which might be a duplicate with a separate memory space, or somehow get the instance that ACT creates when starting the plugin. I didn't give access to plugin handles that I know of(I'd have to look), but if you did get the instance handle somehow, you'd need to box it into the plugin's native type as ACT would only hold it as a member of the plugin interface. What gets tricky is that you'd need to have the other plugin as a project reference when you're compiling. It gets more complicated as I write about it.

Providing a static method may be easier. This of course requires that all of the data that the static method uses is static as well, which isn't so easy. You still need to reference the other plugin to use the static method anyhow.

Unless you want to get crazy and use pure reflection.
 
Aditu
Site Admin


Joined: 27 Nov 2007
Posts: 302

 PostPosted: Thu May 08, 2008 9:06 am    Post subject: Reply with quote Back to top

I forgot to ask... do you want to create another thread devoid of this technical talk for me to move into the Plugin Downloads section?
 
Frank_Harmann



Joined: 10 Mar 2008
Posts: 44

 PostPosted: Fri May 09, 2008 3:34 am    Post subject: Reply with quote Back to top

Thanks for the info Aditu. I guessed that this would not be easy.
I think the easier way will be the other way round. I will provide a custom text area in my overlay and a public function in my hook-dll which can be called by anyone to write some text in that area. As the only function the other plugin needs to know of is that dll-function (which is only referenced by an import declaration, so only needed at runtime, not compile-time), that should solve all depency problems.
Thinking of it, this approach could be extended to use more then one custom area, but for a start i will only use one (i have to implement some other features like dps/hps graphs and my time is very limited in the moment).

Frank
 
Anjel



Joined: 16 Jun 2008
Posts: 1

 PostPosted: Mon Jun 16, 2008 6:43 pm    Post subject: Reply with quote Back to top

I have recently started using ACT for raids. I have downloaded these files and placed them in the correct folders ... however when I enable the macro and use the /do_file_commands nothing happens. Where is the default location for the text file that is created?

Thanks
 
Display posts from previous:   
Post new topic   Reply to topic    Advanced Combat Tracker Forum Index -> Plugin Development All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Community Chest