Tuesday, July 28, 2015

On Allowing "Incomplete" Replays

Since Clan Tools started allowing replays to be uploaded, it has only ever permitted "complete" replays. Typically, a replay will be complete if the player doesn't exit the battle before it ends. Sometimes though, replays don't save correctly which also results in incomplete replays.

The problem with using incomplete replays is they simply don't contain enough data to work, not to mention much of the data that does exist is far from ideal in format.

In short: Unless WG changes the replay format, allowing incomplete replays to be uploaded is highly unlikely.

However, I do have an alternative idea that would be better than nothing. The ability to grant a code to the clan members in an uploaded replay. In this case, the replay wouldn't be saved, but it would still allow for one of the core purposes of replay uploading.

Technical Details

The core problem is Clan Tools uses the unique battle ID (which isn't included in incomplete replays) in the replay to identify individual battles. Identifying the battle the replay is for in any other way, especially with the very small amount of incomplete data from incomplete replays, is going to be an error prone process on which I have no interest in embarking upon.

Other issues with the data include:

  • The only timestamp is a formatted time string in the user's local timezone, with no timezone information present. There's a "probably would work" way around this by requiring the uploader to also be the person who recorded the replay, and requiring them to have their timezone set on Clan Tools.
  • Player list only includes player names, not player IDs. For clan members, these names can easily be translated to player IDs (in most cases). For the other team (which isn't even listed in clan wars due to fog of war) I honestly wouldn't bother as it isn't important.

Saturday, July 18, 2015

Changelog for 2015-07-18

New Reward Rule Filters for Payouts

Clan Wars

  • Battle Round (CW2.0 only)
  • Province Income (CW2.0 only)

Strongholds

  • Pays Mode (new options):
    • Raid Battles - Pays for every based on number of stronghold raid battles.
    • Skirmish Battles
    • Stronghold (Raid & Skirmish) Battles
  • Pays Divisor (formally Pays IR Step) - Divisor for whatever value Pays Mode is set to.
  • Rank by IR Earned, IR Earned, Raid Battles, Skirmish Battles, and Stronghold Battles filters (for minimums and maximums).

Other Changes

  • Added Battle deltas to Stronghold Player Data (data recording started 2015-07-08).
  • Renamed "Industrial Resources" tab to "Player Data" on Clan Stronghold page.
  • Added "pretty" display for the currently displayed span to the Clan Stronghold page.
  • Users' names are now clickable on the Clan Stronghold Player Data list.
  • Added support for Republic of Korea server in public tools.
  • Disabled Fame Lookup for all servers (WG API no longer provides the data used for the fame lookup).
  • Disabled Clan Wars Map viewer for ASIA as they no longer have a CW1.0 map and WG's API doesn't support CW2.0 as of yet.
  • Inline help has been removed from all of the Reward Rules on the Payouts Editor; help is now provided on the CMS Help section.

Fixes

  • Stopped using "demo" WG API key for RU and ASIA server.
  • Fixed To or From date being ignored on Clan Stronghold page, resulting in loading the link displaying different data then expected.
  • Fixed alignment issues on Replay Details view.

Friday, July 17, 2015

Changelog for 2015-07-17 (2)

Fixes

  • Added "new" Clan Wars mode to Replay processor. Pre 9.9 Clan Wars and Post 9.9 Clan Wars are apparently different replay types (or it may be, CW2.0 Clan Wars replays are now a new replay type, I am unsure).

Changelog for 2015-07-17

Fixes

  • Fixed error on Activity Report page when using "Disregard Unattendable Days" when a clan has no activity data.

Wednesday, July 15, 2015

[Updated 2015-07-18] Regarding the RU and ASIA Regions

Update (2015-07-18)

WG was quite quick with replying to my email, and as such the RU and ASIA regions are now using real API keys instead of the "demo" key.

Original Post:

As a result of my inaction in conjunction with an upcoming change to WG API, the public tools on Clan Tools for the RU and ASIA regions may become unusable for a time (Player lookup may still work, the rest will probably be unusable).

In short, WG requires an API key for all requests to their API; for the RU and ASIA regions I have been using the generic "demo" key as it seemed to work the same as an actual key. WG it seems (understandably) wants to curtail this, and is introducing strong rate limits to the demo key (10 requests a minute). For reference, the Clan Lookup sends around 100 requests (1 per a player, plus 3 for various clan info [this is why it takes forever to load]).

WG announced this over a month ago, I however forgot about it and never got around to writing an email to request API keys for RU and ASIA until today.

So that's the situation; apologies for any inconvenience this causes.

Changelog for 2015--07-15

Changes

  • Added warning message to client when tank data is missing; this does not need to be reported, an automated error is (and has always been) sent when this is detected. Now though, instead of silently ignoring the tank stats with missing tank data, it displays a message.
  • Updated tank list for 9.9 tank additions.

Fixes

  • Fixed error in Player and Clan lookup due to missing tank data.

Tuesday, July 14, 2015

Changelog for 2015-07-14

Changes

  • Up to 5 replays should now be uploadable at a time.

Friday, July 10, 2015

Changelog for 2015-07-11

Changes

  • Disabled all Stronghold Reward Rules Min/Max Mode options except for days; the other two options will be added back in the future (and the Min/Max Mode option will be completely removed) as soon as I get the time. I'm doing this because the current setup wasn't flexible enough; you were forced to chose between one of three limiting measures, when in reality you should be able to limit by all three if you want.

Fixes

  • Improved Stronghold IR fetcher's error handling to better deal with a specific edge case.

Monday, July 6, 2015

Changelog for 2015-07-06

Changes

  • Renamed Stronghold Attack & Defense (and Stronghold Battle) to Stronghold Raid, thus it is now Stronghold Skirmish and Stronghold Raid for the types of Stronghold battles.
  • Added dynamic help to Payouts when the total amount paid is zero.
  • Added how to use an existing payout as a Template to the "Changing over to Pay Groups from Code Type Payouts" guide.
  • Added a "Payout Template" guide.

Sunday, July 5, 2015

Changelog for 2015-07-05 (Hotfix)

Fixes

  • Fixed issue preventing CW2.0 replays from being uploaded.
  • Made integrations request processor more robust to random failures in the WG API or other related issues.

Changelog for 2015-07-05

Changes

CW2 Battle Integration Status

  • Battle Loading - Working
  • Battle Replay Uploading - Working
  • Battle Reward Rules - Working

Saturday, July 4, 2015

Changelog for 2015-07-04

Changes

  • Added "Disregard Unattendable Days" option to Activity Report (click the cogs). This setting disregards all days which aren't attendable (days which don't have at least one code entry) when performing calculations for Attendance Percents, Average Inactivity, and Inactive For.

    This option is useful for viewing activity data that has day gaps (for example, perhaps your clan does training three times a week, now you can view training Activity without having to do any mental math to know that 42.85% attendance is actually 100% training attendance (and so forth).
  • Activity Report Inactive For now (more logically) calculates Inactive For to the last day in the Activity Span (or the last Attendanable Day if Disregard Unattendable Days is enabled) rather than the current date. If you prefer the old view, use the "Inactive For" to Now setting (in the cogs menu).

Fixes

  • Members that joined after the current Activity Span are now indicated correctly, rather than just having negative values that didn't make much sense.
  • Incorrect (case-sensitive) member sorting in User Balances dropdowns.
  • Payout 'Target Share Value not Met' warning now shows correct gold needed to reach target share value.

Regarding Match Types

Earlier today I released an update to the site, one of the changes involved switch from using a Start Time and Duration to a Start Time and End Time for a Match Type setting. This required a conversion from a duration to an End Time (using the Start Time). This conversion when fine (to my knowledge), however there was a side effect due to the way the System was setup, which was all of the Allowed Replay Types settings for all of the Match Types were deleted.

I have restored this data from the daily backup; any changes (to the Allowed Replay Type setting) made during the day will have been lost though.

Sorry for any problems this caused.

Friday, July 3, 2015

Changelog for 2015-07-03

Notice

The Default Duration setting for Match Types has been removed. This setting was used to set the default duration of the generated Code (if any). Please use the Default Span setting for the selected Code Type instead to achieve the same result.

New way of Granting/Revoking Codes

The New (and recommended) way of granting codes is via the Member's List, either on the Clan Home page, the Member's page, or the Attendance Management page. Simply select the member(s) you want to grant or revoke a code from, click the Check icon that appeared in the bottom left corner of the page (or Grant or Revoke Code button at the bottom of the list), fill in the fields, and finally click either Grant or Revoke.

Attendance Page Changes

  • Primary Group rather than clan role is now displayed.
  • Check box controls are now present in the same way as the Member's list.
  • Each Major Code Type column is now sortable.
  • Each Major Code Type column now displays the number of members with a code entry of that type for the day.
  • Member's list can now be refreshed without reloading the page.
  • Improved support for having two Majors Code Types with one being Linked to the other (both should correctly show up as being granted, via the link connection).
  • A tip now appears if a clan has no codes set as Major.
  • Valid Codes list can now be refreshed without reloading the page.
  • The validity of each code on the Valid Codes list now dynamically updates (newly created codes are not loaded dynamically though).
  • A tip now appears if a clan has no valid codes to display.
  • Added a link to the Activity Report for the current day being shown.

Other Changes

  • Help text is now displayed on the Codes > New and Matches > New pages if the clan has no displayable Codes/Matches.
  • Obsolete Match Types are no longer shown on the New Match page.
  • Matches and Match Types now use a Start and End for spans, rather than a Start and a Duration. Match Type's durations have been converted automatically.
  • Added One Battle per Match setting to Match Types; enabling this ensures that each (in game) battle will be associated with a distinct Match.
  • Switched New Match and Edit Match pages to tabbed interface.
  • Added Note to the Group editor (accessed via the Member's list Edit Groups button) that the Primary Group listed won't refresh till the page is reloaded.
  • "Lie" to users who enter a code that is invalid because they've already entered it, or a code of the same type (for once per a day Code Types), already by using the same behavior as if the code was valid. The message displayed though is different and indicates both that the code was rejected, and why.
  • Added floating action panel for the Members List when one or more members are selected checked) so you don't need to scroll to the bottom of the page just to trigger the desired action.

Fixes

  • Fixed errors relating to For Date vs. Replay Date being displayed in user's local time, leading to the possibility that the expected date and actual date would display as the same date.

Notes

I looked into automatic For Date detection on Match creation from uploaded replay. Unfortunately it's a catch-22 situation which could be worked around, but it simply isn't worth the investment in time currently.

I've also been gathering data for battles loading for CW2.0, it's looking promising and I'm going to start coding that now.

Thursday, July 2, 2015

Changelog for 2015-07-02

Fixes

  • Fixed typo causing Balances to not be displayed; added checks to prevent this from occurring again.

Wednesday, July 1, 2015

Changelog for 2015-07-01

Fixes

  • Fixed error on Fame Lookup page if Clan has no icon set.

CW 2.0 and Battle Loading

Firstly, battle loading for CW 2.0 is most likely a few days out, at minimum. However, you can still upload replays for battles using the Matches system. See this guide for information on setting up a new Match Type.

As to what can be loaded, indications are promising that all existing functionality should be transferable (it actually looks like it might even be far easier), but I'll need to gather more data before I can be sure.