Wednesday, May 14, 2008

Issue 12 beta changes

So Issue 12 is in open beta now, and there's a ton of changes. Lots of quality-of-life improvements, many of which relate to chat messages. Unfortunately, those changes mean much of what HeroStats does has to be changed in order to work with I12.

By far the biggest change is how message channel is identified. Pre-I12, the channel type was hardcoded to a particular value, and each message was tagged with the appropriate channel type value. Now that's no longer the case. Messages are instead stored in the client memory with pseudo-HTML tags that set the message color and other attributes. This is great for the game client - it enables the linking you see in I12, and the ability to change the color of each channel on your tabs. But it's not so good for HeroStats, because there's now no good way to take a message and figure out which channel it came from. Those pseudo-HTML tags don't help, because they can be changed by the user at will.

So, we're going back to an approach that I tried once before - scanning each tab of the chat message window, rather than looking for individual channels. This can potentially give us better performance, but does require that the users have their chat tabs set up in certain ways. I'm working on a way to make this transparent to the user, or at the very least use the new I12 feature to load tab settings from a file to make it easy to set up.

This also means that we no longer know which channel a particular message belongs to. Previously the channel was used to 1) let people choose which channels that HeroStats would log and 2) filter out messages on channels that never contained any information needed for stats gathering. Both of those features will no longer be available with the new system.

I haven't had as much time as I'd like to work on this, so the new scanning system isn't completely ready for prime time just yet. I'm hoping to have it finished before Memorial Day, hopefully prior to I12 actually going live.

Thursday, February 14, 2008

To-Hit messages: the good, bad, and ugly

As of February 12, the new combat log messages reporting To-Hit rolls are live on the CoX servers. This is a mixed blessing for HeroStats users. As of right now, the unstable builds (3.9.9.12 at the moment) use these messages, and by this weekend the stable builds will as well.

The Good: I previously posted about accuracy tracking improvements when these messages were on Test. Pretty much all of that still applies. For many powers, the To-Hit messages are going to make accuracy tracking better.

The Bad: There are some powers have no To-Hit message when they hit (Blazing Aura, for instance). That makes it difficult to track accuracy for those - it could be done, but it requires us to count damage messages as hits. That's an ugly kludge that I was hoping to get rid of.

The Ugly: Then there's powers that have a chance for a secondary effect to occur (for example, the chance to disorient on Barrage). For these, you see two To-Hit messages - the first for the secondary effect, the second for the actual damage. The power name is exactly the same in both cases. To make it worse, the secondary effect message only shows up for misses, and unlike the powers mentioned above, there's no damage message to use.

Because of the ugliness mentioned here, I'm leaving the old Power Accuracy calculations in HeroStats as well as using the new To-Hit message method. You'll be seeing two sections for accuracy now, one called Player Accuracy (the To-Hit message method) and one called Power Accuracy (the old method based on power activation/damage/miss messages).

What I'd like to see is a fix on these To-Hit messages by the CoX devs, so we can use only those for all powers and ditch the "Power Accuracy" section altogether. Suggestions:
  • Refer to what the roll is actually being used for - i.e. "Barrage Chance to Disorient" or "Barrage Damage".
  • Always show the To-Hit message, whether it's a hit or a miss.
That's pretty much all it would take.

Saturday, January 26, 2008

Test server 25-Jan release

The 25-Jan-2008 build of the Test server has a bunch of new combat log messages available to help track accuracy. You can see the patch notes on the official forums. What this means to HeroStats is that it's now much easier to track accuracy of a power, and it's even possible to see the accuracy of an enemy's powers!

The latest unstable build (download it from the unstable web site) takes these new combat log messages into account. You'll see a bunch of new statistics related to accuracy if you're running the unstable build on Test. Here's a brief rundown of what's new:
  • Both player and enemy accuracy is tracked. Each section discussed below comes in two flavors, one for player stats and one for enemy stats. For players, everything is tracked by power. For enemies, it's tracked by both enemy type and power (since a Behemoth's version of Fire Sword might be different than the Fire Thorn Caster version of Fire Sword).
  • [Player/Enemy] Accuracy: This section measures the actual accuracy for each power over the time you've been collecting statistics. It's calculated from actual hits / (actual hits + actual misses).
  • [Player/Enemy] Hits and Misses: A detailed breakdown of the number of hits and misses per power.
    • Hits and Misses are simply counted from the new log messages.
    • Hits (calculated) is generated by looking for messages where the roll is less than or equal to the percent chance to-hit. That's a debugging tool, mainly - in theory Hits should always equal Hits (calculated) - if it doesn't then something's not right.
    • Number of Rolls is the count of times you had to make a to-hit roll. You might think this should always be equal to the number of times you attacked, but it's not always the case - sometimes a power is auto-hit, and sometimes the streakbreaker gets involved.
    • Streakbreaker Count is the number of times the streakbreaker was used to force a hit. I'm not going to try to describe the streakbreaker here, Arcanaville's Guide to Defense does it better than I would.
  • [Player/Enemy] To-Hit Chance: The to-hit chance percentage from the new combat log messages.
    • Average is exactly what you'd expect, the average of the percentages from all the hits and misses for the power. Note that auto-hit and streakbreaker "hits" aren't counted.
    • Total isn't all that useful, it just adds up all the to-hit numbers. It's used for calculating the average.
  • [Player/Enemy] To-Hit Rolls: The to-hit rolls from the new combat log messages. This is the same as the to-hit chance above except it's the roll numbers.
The old accuracy and hit/miss stats are still in HeroStats for now. Once these new combat log messages are stabilized I'll probably remove that, but for now it's interesting to see how the old and new ways differ. From the little testing I've done so far, they're pretty much the same, which is a good thing.

All this information is accurate as of the 25-Jan-2008 Test build and the 3.9.9.8 version of HeroStats. New Test builds and new HeroStats versions could be a bit different, keep an eye on the change logs for each.

Friday, January 11, 2008

HeroStats, Real Numbers, and City Vault

With the new year, NCSoft has announced several upcoming features for City of Heroes/Villains in their 2008 State of the Game article. There's a lot of good information there which I encourage everyone interested in CoX to read. Here, I'd like to address a couple of things of interest to HeroStats users.

The Real Numbers

As a general quality of life improvement we will be adding new functionality in a coming version of the game to display the “real” numbers behind your characters and their powers. This includes a user configurable display of important characteristics such as movement rate, regeneration rate, resistances and many more! Additionally, you will be able to see how those statistics are affected in real time by buffs and/or debuffs affecting your character.

The article mentions the ability to display the actual values for the various statistics that your character has - regeneration, resistance, movement, etc. Let me first say that I think this is long overdue, and a welcome change. I remember this request coming up way back in City of Heroes beta, and it's been a regular discussion topic ever since. It's great to hear that it's coming.

One of the core functions of HeroStats has always been to track the actual values during a play session for the accuracy of your powers, damage dealt, damage received, etc. Note that the article didn't mention any of these sorts of statistics. It's possible they may be included, and that would be wonderful, but I have my doubts. As long as this sort of information is not available through the game client, HeroStats will continue to provide it.

What was mentioned in the article is the type of information you see in a build planner. How much resistance to smash/lethal do I have? What's my total regeneration? Those sorts of statistics have never been tracked by HeroStats (because they don't show up in the combat log). It's great to see that this information will be available without having to put all my information into an external build planner tool. (Side note - build planners will still be useful, though. There was no mention in the article of any way to do a "what if" scenario, and that's where the build planners are most useful.)

There's one possible area of overlap - recharge timers. If the UI is going to be able to display how much time is left before a power recharges, the recharge timer function of HeroStats may become obsolete. This wouldn't break my heart - recharge timers are less than completely accurate, as I've described before. If the developers want to change the game UI to do a better job, more power to 'em.

Here again, however, I have my doubts. There was much furor on the forums about the UI change to have buff timers blink 10 seconds before expiration, and how it would make HeroStats buff timers obsolete. Hasn't happened - plenty of people still use HeroStats for tracking buffs, because 10 seconds just isn't enough warning much of the time. We'll have to see exactly how the UI changes are implemented before making any assumptions about what HeroStats functions will become obsolete.

City Vault

We gave a sneak peak of the new “City Vault” feature at the recent San Jose Meet ‘n Greet. The City Vault is coming soon to the City of Heroes website and will showcase the millions of interesting Heroes and Villains found in Paragon City and the Rogue Isles. It will allow you to search for characters by a number of different criteria, and then view those characters, including images of different costumes, powers, badges, friends, stats by zone and other fun information! As we have previously announced, you can manage what information will be displayed through the City Vault for your characters via several in game options.

Again, let me first say that I'm very happy to see this. The ability to see in-game info outside of the game has been a much-requested feature for a long time. It's great to see it becoming reality.

None of the functions mentioned in the article will impact HeroStats directly. The core function of HeroStats, tracking statistics within a play session, is in no way impacted by the ability to view character information on the web.

HeroStats does, however, have some secondary functions that could be impacted by the City Vault. Several community websites (see our affiliates list at http://herostats.org) use HeroStats to gather information about characters. Much of this information may now be viewable through the City Vault.

We'll have to wait for the actual City Vault to be available to know exactly how it will impact these community websites. At the moment, I'm willing to say that it's highly unlikely that the City Vault feed will be real-time (for performance reasons) and therefore a site like City Game Tracker, which allows you to see who is online at a particular time, will still be useful. Badge tracking sites typically provide quite a bit more functionality than simply listing badges - showing uncollected badges, for instance, or listing the top badge collectors on a server - so those will still be useful as well.

As for HeroStats, the main impact will be in the data we're sending to the community websites. Some, like City Game Tracker, probably won't change at all. Others, like the badge sites, might start getting their information from the City Vault and not need HeroStats at all. It's difficult to say until we see the City Vault in action, and have some idea how easy or difficult it will be to use that information.

Friday, January 4, 2008

Why does it take so long to load HeroStats?

I've seen a few people ask this question in the past. I freely admit that HeroStats takes a good long time to start up initially. And to make matters worse, while it's starting, it eats up most of your CPU so other programs are impacted. So why does this happen?

The answer, as in most programming, comes down to a trade-off. HeroStats makes heavy use of regular expressions (also known as regexs) to parse the text of the combat log into the stats that everyone wants. Regexs are a great way to recognize text messages and get information out of them, but they require a good deal of setup time if you want them to run quickly. This is known as compiling the regexs and it takes a lot of your computer's CPU time.

And we certainly want them to run quickly. HeroStats scans the CoX client chat tabs twice every second to look for new messages. Every time a new message is found, we have to run through the regexs to figure out what that message means. The code is pretty smart about checking the most common regexs first, but it can still take quite a while to go through them all, especially if your message happens to be one that isn't used very often.

So we want the regexs to run quickly, but in order to do that we need to spend the time to set them up first. And this is why your HeroStats takes a while to start up. It's loading up all those regexs so that while you're actually playing the game, your statistics/timers/etc. are being pulled quickly from those log messages.

Thursday, December 6, 2007

Tracking Incoming Damage

Over on the CoH forums, there was an interesting question posted:

Can HeroStats separate out sources of damage?

Short answer: In theory, yes. In practice, no.

Long answer: Damage messages have a ton of different formats. Some show mob names, some show the power the mob used, some show damage type, and various combinations thereof (including none of the above).

Because of all this variety, it would take an inordinate amount of effort to track every single variation of every damage message. So I made a decision a while back that the only thing we would try to keep track of is damage type (and amount, of course). There's always a few messages with "Unknown" type, but most are tracked.

Even with this approach, we have dozens of different damage message formats to maintain, and every new patch seems to add a few more. It's really not feasible to keep up with all the various possibilities.

Monday, November 12, 2007

Windows Vista Compatibility

Ever since the Windows Vista release, I've gotten a lot of questions about using HeroStats with Vista. I haven't upgraded any of my own computers to Windows Vista, mainly because of hardware driver issues and because I really have no need for any of the new features - XP works fine for what I need. So my ability to develop for Vista is limited.

Some other folks in the community do use Vista, and they've provided some tips which can be found in our Known Issues. There are two main tips: run HeroStats in Windows XP compatibility mode, and use .NET Framework 2.0. Both of these things are effectively allowing you to run HeroStats on Vista as if it was running on XP.