arcdps: gw2 dps meter (and general metrics tool)
 WARNING: MODIFYING GUILD WARS 2 THROUGH ANY 3RD PARTY TOOLS IS NOT SUPPORTED BY ARENANET OR NCSOFT.
 THERE IS NO HELP OR WARRANTY. THIS IS ENTIRELY AT YOUR OWN RISK AND YOU ASSUME ALL RESPONSIBILITY
 FOR USING THIS TOOL. IF YOU FEEL THIS PROVIDES GAMEPLAY ADVANTAGE OR AUTOMATION, OR BREAKS ANY OTHER RULES,
 DO NOT USE THIS.

 stance: https://forum-en.guildwars2.com/forum/support/support/Policy-3rd-Party-Programs-Multi-Boxing-Macros/first#post354869.
 user agreement: https://www.guildwars2.com/en/legal/guild-wars-2-user-agreement/
 rules of conduct: https://www.guildwars2.com/en/legal/guild-wars-2-rules-of-conduct/
 feb 2017 ama: https://www.reddit.com/r/Guildwars2/comments/5svug8/the_head_of_the_snake_devs_here_ask_us_anything/ddi77u2/
 another explicit what is allowed clarification (and good thread to read): https://www.reddit.com/r/Guildwars2/comments/66m13h/anet_this_really_should_be_part_of_the_game/dgjwapj/
 what cc's warning in the above reddit thread references: https://www.reddit.com/r/Guildwars2/comments/60t7pq/bgdm_isnt_actually_anet_compliant/

how does it work
 arcdps hooks several gw2 engine routines to read temporal client data.
 what that means is that it modifies the engine to provide me my own mod framework, making it not user agreement friendly.
 however, in the feb 2017 ama, arenanet has granted 3rd party tools permission to collect and display combat data via means previously not allowed.
 these are runtime modifications only, no changes are made to gw2 files on disk.

how do i use it
 don't be a dick.
 save d3d9.dll into 'guildwars2installdir/bin64/' with the other dlls.
 arcpds.ini will be created in' documents/arcdps/' on first run, ini options template can be found in the download folder to override some defaults.
 alternatively, create folder "arcdps" under '%appdata%/roaming/' - if found, all configuration and containers will be loaded from there.
 all template ini options are commented to let me adjust their defaults - make sure to uncomment to override.
 for languages other than english, place translation ini alongside regular ini.
 character model limit should be set to highest for best results.
 alt shift t is the hotkey to bring up the options window.
 never send in crash reports to arenanet or post about client crashes/bugs on the forums while using this.
 copy these crash reports and send them to me instead, following the notes near the bottom about 'report a bug'.
 to update, replace the dll with the newest.
 to reset to a "fresh start" state, exit gw2 and delete everything with arcdps.* in the name and replace the ini with the template.
 to disable/remove it, exit gw2 and rename/delete the dll, and optionally delete everything with arcdps.* in the name.

what is the forbidden fruit
 a collection of qol that should be harmless to every other player and provide no advantage for the user, but is still against the rules.
 this means no features such as gearcheck, boss mods, or heads-up data the native client doesn't show.
 combat meters were allowed as a leap of faith by anet, this serves to act as an example of what else i feel could be ok'd.
 the improvements here fall into three categories - the invisible, the modifications, and the interactives.
 invisible improvements contain game fixes and suppressions like the 2min wvw waypoint bug, and follow last pasted link.
 modifications contain visible modifications such as contact notes, window flashing on whisper/invite/enter combat.
 interactives interact with the client such as item autoclicking, reward autoaccept, waypoint bookmarks, and build templates.
 if you do not agree with my modular approach or feel it could have consequences for non-restricted, do not use this mod.
 given cc's post i am no longer distributing all in hopes it will be reconsidered at a later date.
 build templates brought back due to surge in chatter about build templates.

can i chain load another wrapper d3d9.dll
 arcdps will attempt to load d3d9_chainload.dll, and if found, redirect the direct3dcreate9 call to it instead of the system library.
 make sure you are using the 64bit version of wrappers (gemfx, sweetfx).
 due to how reshade works, arcdps (like most wrappers) will not chainload reshade: https://reshade.me/forum/suggestions/244-adding-another-wrapper-as-a-proxy#1839.

ascii ui (deprecated, unsupported)
 left clicks and right clicks with modifiers always set the panel underneath to selected.
 selected panels do not require modifiers for clicking (unless required set in options).
 click outside the panel (not on another panel) to deselect.
 up/down, mousewheel: sroll.
 mousewheel: scroll.
 q: close.

alternate ui
 does not have any keyboard hotkeys, everything is tied to lclick and mouseovers.
 holding down the configured modifiers will pass input to game, ignoring the ui.
 some components of the ascii ui cannot be recreated in imgui and will function using ascii ui and rules.
 font can be changed by placing arcdps_font.ttf in the config dir (documents/arcdps/).

hotkeys
 with modifiers held.
 h: toggle global hide/unhide.
 k: lock target for stats.
 o: reload config.
 t: toggle options visibility.

evtc logging
 available in instanced content only.
 auto start when an npc with species id in a boss_encounter_ids_ ini option enters combat and stops when all players exit combat.
 npc species id can be found by selecting it in chcli via healthbar click and looking at ####hs in the name.
 resulting logs are written to 'arcdps/arcdps.cbtlogs/.../date-time.evtc', intermediate path depending on options.
 compression requires powershell with compress-archive, which has only been tested on windows10.
 evtc code and readme: https://www.deltaconnected.com/arcdps/evtc/

evtc parsers
 /u/ghandi-gandhi: https://github.com/phoenix-oosd/EVTC-Log-Parser/releases
 /u/loseyre: https://www.padl.tk/
 /u/maxlepeh: https://www.raidheroes.tk/
 /u/faerym: https://www.reddit.com/r/Guildwars2/comments/5u87jw/gw2act_an_arcdps_log_parser_plugin_for_advanced/
 if you would like a link to your project from here, let me know.

translations
 /u/nodooooka: https://www.deltaconnected.com/arcdps/translations/chinese/arcdps_lang.ini (chinese)
 Ainillia.5794: https://www.deltaconnected.com/arcdps/translations/french/arcdps_lang.ini (french)
 creating a translation: https://www.deltaconnected.com/arcdps/translations/

limitations
 potato machines will sometimes lack minion or player info (ptr instead of name on chcli) - likely related to model count too.
 potato machines will sometimes process the combat event before combat state change - first or last hit may be dropped.
 chcli is missing siphons and similar because they are internally flagged as buffs - not notified by server.
 chcli is missing gadgets eg engineer turrets or sylvari turrets - not notified by server (except some buff applications).
 chcli uses approximated condition damage from gear, traits, and buffs.
 chcli adds time-to-tick damage on applicatation, and then the max of 1second/time remanining each tick.
 chcli condition damage scaling is probably different from the game's scaling, affecting accuracy at sub-80 zones.
 chcli condition damage may be off if the fight contains long periods of "skill lag" - represented by r in metrics.
 chcli condition damage will not scale to 50% for wvw cannons/mortars as they are currently indistinguishable.
 chcli condition damage can have high inaccuracy in fights with lots of fast cleanses and resistance.
 chcli has best-guess is friend/foe identification, may be off on sourceless events - not notified by server.
 chcli strips ignore last-stack stability - cc and strip indistinguishable.
 chcli torment is weird on the server (be it moving or last tick rounding) - i use formula value in sim.
 chcli gadgets lack crit/glance/result flags in combat events - not notified by server.
 phys skill activation count will only count skills which have animations - not shouts or other instants (eg feedback, signets, technobauble).
 overstack and applied do not include stacks that are ignored (lower than lowest existing stack) - not notified by server.
 area healing and absolute buff damage are presently impossible - not notified by server.
 area breakbar damage is presently impossible - not notified by server.
 area combo field finishers are presently impossible - not notified by server.
 area knockback, knockdown, pull, and blowout have no origin context - not notified by server.
 overseer spawns in-combat which generates small evtc files after failed attempts.

known bugs
 alt ui becomes unresponsive to clicks.
 minion events against themselves are ignored.
 alt ui widths are hardcoded and may not work on all fonts and sizes.
 short drag clicks near the borders in ascii ui can crash the process or do other strange things.
 the damage reduction formula is currently best-guess until someone provides better (48 stacks of -2 result in 10.2k being reduced to 3.0k).
 a rounding difference is causing the summed total and displayed to be off by 1 sometimes (chcli, personal).

do i need to update arcdps with a new guildwars 2 build
 most required changes and data points are autodetected - yes if attach point fails, broken things, or crashes.
 no need to remove or disable while the game is updating either.
 recommended to update at least once a week or so for now.

its not working
 check your 'documents/arcdps/' folder for an arcdps.log (will appear after you launch and are in char select).
 if there is no log, the dll isn't being loaded. the cause for this is system-specific, likely because some other application changed path.
 if there is a log, check to see there's no error and the date matches. attach point find fail means you may need to wait for me to update.
 some systems require placing d3d9.dll alongside gw2.exe (commonly with geforce experience).
 if you use the nopatchui switch, it needs to be alongside gw2.exe as well.
 if you get a coherentui.dll error (0x7e), make sure directx9 june2010 runtimes are installed (as well as redist below).
 if you get an msvcr120.dll error, or any startup error, make sure visual studio 2013 x64 redist is installed.
 some directx context stealing overlays and programs may cause it to crash on character select (eg d3dgear).

will there be source released
 no. it is fundamentally a hack, could be modified for advantage or malicious purposes, and was denied.
 the context of the above was the underlying combat sim using other players' traits and gear, and my dev tools that have since been moved to restricted.
 a different project, that provides nothing that can be used maliciously, may recieve a different response.
 there will never be any connect or network resource originating from within this module.
 if you don't trust me, i make no effort to obfuscate or pack or encrypt or anti-debug.
 if you are interested in x64 flow redirection code, take a peek at rafzi's hacklib or a cheat programming forum.

where do i complain this game doesn't need a meter or report a bug
 deltaconnected.4058 or deltaconnected on reddit (usually invis in game).
 if you suspect arcdps as the cause of a crash, open '%appdata%/guild wars 2/arenanet.log' in notepad and scroll to the bottom.
 check that timestamps match and paste everything in "*--> Crash <--*" and below in an unlisted http://pastebin.com/ paste, 24hr expiry.
 include the contents of 'documents/arcdps/arcdps.log'.
 send me the link.
 repro steps and specifics of where/when/who/what are appreciated.
 if you suspect something wrong with condition damage simulation, take screenshots comparing area stats skill list vs local stat skill list.
 these tend to be in one of three categories: 'is damage low/high across all condis', 'is it a specific condi', 'is a source of damage missing'.

to-do/wishlist (may or may not happen)
 dynamic widths with non-monospace fonts (alt ui).
 attempt to glue alt ui window positioning to old system for surround/eyefinity centering.
 options/configuration flexibility.
 sorting flexibility.

credits
 imgui: https://github.com/ocornut/imgui (alt ui)
 bgdm/bhagawan: http://gw2bgdm.blogspot.ca/p/faq.html (invaluable help to piece together gw2's text engine)
 codeguru: http://www.codeguru.com/cpp/g-m/directx/directx8/article.php/c11453/Intercept-Calls-to-DirectX-with-a-Proxy-DLL.htm (for the idea of proxy d3d9)

changes
 may.25.2017: testing torment always hitting 2x against raid bosses defined in ini.
 may.25.2017: torment move synced to combattracker.
 may.25.2017: name resolver adjustments to maybe prevent memguid crashes.
 may.25.2017: reduced memory footprint.
 may.23.2017: torment duration rounding test.
 may.23.2017: fixed some manual trait effects overriding others (since torment changes).
 may.23.2017: added what is presumably all-stat effect type detection and handling (malyx elite).
 may.23.2017: evtc: fixed role hints.
 may.21.2017: adjusted movement detection to better simulate how the server uses it (torment only).
 may.20.2017: resisted line should work now.
 may.18.2017: fixed a torment change applying to all conditions.
 may.18.2017: changed bursting sigil manual effect to better match game.
 may.18.2017: re-fixed weapon set override when wielding bundles/environment weapons (since may16).
 may.18.2017: changed torment simulation to compensate for server anomalies (needs testing).
 may.18.2017: buff total stat no longer includes removed duration.
 may.18.2017: buff avg application duration no longer includes removed duration.
 may.18.2017: buff min should properly ignore zero values.
 may.18.2017: added removed duration line to area buff stat info.
 may.18.2017: added effective resisted percentage line to area buff stat info (damaging only, zero by nonzero ticks).
 may.18.2017: fixed wnd exit exception (may be affecting altui location saving).
 may.18.2017: evtc: single-stack buffremove will be in logs as cbtb_manual (all-stack trigger, for adjusting outgoing volume).
 may.17.2017: fixed last stat being ignored for stats table gen since may16 game build.
 may.17.2017: aded manual cases for rev fa and ye traits.
 may.16.2017: better compatibility for mumble overlay.
 may.16.2017: better prevent these kinds of crashes in the future (will still result in broken functionality).
 may.16.2017: adjusted for may16 game build.
 may.16.2017: distributing build template module - no other qol at this time.
 may.16.2017: changed personal stats to be compact, area is the main focus and source of non-damage stats.
 may.16.2017: added shard id to metrics mouseover (instanced maps are not unique).
 may.16.2017: changed weaponswap from polling to engine hook.
 may.14.2017: this build will reset altui window locations.
 may.14.2017: added basic option to hide totals lines.
 may.14.2017: added basic option to hide menu lines/bars without modifiers.
 may.14.2017: evtc: added gwbuild statechange (game build).
 may.12.2017: better prevent buff bar exception thrashing.
 may.12.2017: ignore minion0-to-minion0 replication while investigating log dispatch bug (evtc unchanged).
 may.11.2017: adjust for spec-weapon buff format (occasional exception on scrape).
 may.11.2017: discord overlay workaround.
 may.09.2017: more cleanup.
 may.09.2017: added u value under metrics mouseover for guessed map uptime.
 may.09.2017: fixed a rare crash on unexpected enter-combat's.
 may.07.2017: prevent some npc/gadget names from not being updated after first detect.
 may.07.2017: prevent bars showing up gray in some cases after joining squad.
 may.07.2017: another small change to maybe prevent input from locking up.
 may.05.2017: possibly fix crash on log creation (boss being killed/ooc).
 may.05.2017: adjusted gadget id generation to reduce wall/gate spam from wvw.
 may.05.2017: fixed prof getting trashed in logs since gadget change.
 may.04.2017: fixed overlay not coming back after closing world map in rare cases.
 may.04.2017: maybe fixed gadget duplication in evtc in previous.
 may.04.2017: added ini key table_buff_ids that controls buff table list.
 may.04.2017: minor adjustment for may02 game build.
 may.04.2017: restored summary buff list as additional_buff_ids.
 may.04.2017: fixed name cache ignoring unlocalized.
 may.04.2017: added gadget name detection and caching.
 may.04.2017: gadget pseudo id may be volatile and may overlap with npcs, will keep an eye on this.
 may.04.2017: evtc: gadgets are now identified by upper half of cbtitem.prof (attempting to maintain backwards comp).
 may.04.2017: evtc: lower half of cbtitem.prof will be species id or pseudo id on non-players, see evtc readme.
 may.04.2017: evtc: gadgets do not have crit/glance/results in combat message, make sure to ignore for percent calcs.

downloads
 x64: current 20170525-0404