Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

If requesting help, make sure to mention what game you are attempting to use ACT with.
For the best FFXIV support, join Ravahn's Discord Server. Also check out OverlayPlugin's FFXIV FAQ and Setup Guide.

possible to calculate total time in a collection of encounters?

I use ACT with FFXIV, and it would be nice to be able to get a "total duration" measure which would be the time of the start of the oldest encounter to the time of the end of the newest encounter.

Specifically this would be to have a variation of the "duration" field which shows that time from start  to end instead of only the "in combat" or "in encounter" time. This is important to me because it would help understand the total time in a single dungeon, rather than just the time fighting. Any time spent running between encounters is lost.

I thought perhaps I could write a plugin to do this: API has a column field definition. But I don't understand if I implement that class how to get it added into the list of possible fields...
Tagged:

Comments

  • You're looking for this, but wall time instead of combat time?


  • Yep. I figured out how to do what I want from the example code at https://advancedcombattracker.com/plugincode.php?id=4

    I basically calculated the time between StartTime and EndTime for an ecounter and added a TotalDuration column to the list.

    This is useful because total wall time is often very useful when dealing with something like a dungeon where you want to see how long it took to complete the entire thing instead of excluding the time between encounters.

    I think its probably niche enough that keeping it as a plugin for myself is fine with me.

    I'm happy to share the source here if anyone else is interested.
  • It's interesting that you found that version of the example instead of the one that's still public on GitHub.

    Anyways, yeah... I was going to offer making the same thing if that's what you ended up wanting. 
  • For anyone else who reads this, I published this work at https://github.com/jacob-keller/act-total-duration/
  • Would it be possible to get it listed in the official plugins listing?
  • Just as some random comments. 

    If you're going to enable the plugin, it might stand to reason that you want the columns it provides.  In that case, making them enabled by default makes sense.

    The data itself is somewhat valuable as data rather than as a string, so for the SQL export, you might consider not using VARCHAR and creating something similar to the other duration fields in ACT.
    I realize an integer as the number of total seconds is awkward, but database engines don't agree on a good way to store a TimeSpan.

  • Sure. those changes make sense. I wasn't quite sure what the best method is but matching Duraiton makes sense. (Would be nice if SQL databases agreed on timespan... Oh well).

    Is there a way to change the default ordering as well? I'd be kinda nice if I could get the total duration field to be next to the duration by default. Not a huge deal if that can't be changed. 
  • I made a v2 which has the fixes for the column visibility as well as exporting the total seconds as a double (Since TotalSeconds from the TimeSpan is already a double to account for fractions of a second).
Sign In or Register to comment.