|
After a recent Spirit of the Law video on Keshik, another trivia question that almost makes no real sense dawned upon me: how does Keshik gold generation ability actually work? How can gold generation be calculated? There’s already gold generation rate mentioned by Spirit of the Law and in AoE Wikia): 0.363 ('~21.8 gold / min') or 0.367 gold / sec, respectively. SotL even mentioned 1 gold is generated roughly every 2 attack animations of Keshik, or once every 2.8 seconds (~0.357 gold / sec). Case closed, no more info is needed for any practical purpose. I have big problems with practicality, though. ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ In Advanced Genie Editor (AGE; available in ‘Tools_Builds’ folder of your root AoE 2: DE folder), section ‘Units’, line ‘1228 - Keshik’ you can find ‘Tasks’ section. There you can see ‘HD 151: Feitoria Ability’ for every unit class in the game (see the screenshot below; I wish I knew how to resize images here). Here, work rate is 0.01; resource 213 is mentioned as well. In ‘Civilizations’ section, every civ (not only the Tatars) has its value set to 50 (see another screenshot below). (This could be the reason of a 'bug' where Keshiks did not generate gold if converted.) Additionally, we can obtain Keshik’s attack speed (which is 1.9 sec; section ‘Units’) and Keshik’s attack animation duration (1.4 sec; section ‘Graphics’, line ‘10399 - Keshik (Attack)’). This is everything I can think of that could affect the generation rate. Well, from coded values department at least. Then, I observed the rate with which Keshik generates gold while fighting both stationary and fleeing unit with modified (amplified) gold generation rate. (I changed resource 213 value from 50 to 5000.) It appeared to be close to 70 gold per hit, or, if we downscale it using genuine coded value, 0.7 gold per hit. That led me to a thought that Keshik actually ‘works’ its target (as if it were a resource) with the work rate of 0.01 gold / sec (see the first screenshot, field work value 1) multiplied by resource 213 value (by analogy with how Mayans/Tatars resource gathering civ bonuses work, with their nerfed work rates being multiplied by buffed resource productivity) and further multiplied by attack animation length of 1.4 sec; or: 0.01 (work rate, resource per second) × 50 (productivity multiplier) × 1.4 (attack animation, sec) = 0.7 (gold / sec). Or, if you prefer a formula style:
Using attack reload speed of Keshik (1.9 sec), we receive a rate of 0.7 / 1.9 = ~0.368 gold / sec. If no final hit is inflicted (e. g. Keshik dies in a fight), looting value (total gold collected by Keshik while 'farming' a target) is roughly 0.7 times number of hits inflicted. For fleeing targets, their looting value is 0.7 × (x–0.5), with x being hits-to-kill and 0.5 subtracted to take final hit into account (damage is inflicted at 50% of every hit attack animation duration for an initial hit for a stationary target and every hit for a fleeing target; gold generation immediatly stops when the victim dies). The calculations are still theoretical at this point; in reality, a deviation between this predicted 0.7 gold per hit and actually observed gold generation exists. This was already called out in an ‘old’ SotL video to be caused by existing mismatch between attack speed and attack animation duration of the unit. Watching through a single recording of a Keshik ‘farming’ a stationary target (×1.0 game speed, ~270 FPS, 60 FPS recording) reveals that the start of gold generating cycle always corresponds to 1.9 sec time frames starting from the beggining of the first attack animation, i. e. ignoring initial attack delay of 0.7 sec. (These 1.9 sec time frames experience a slight build-up of residuals with increasing number of hits, up to 0.15 sec after 10 hits.) Although periodicity of these cycles matches the attack speed of the unit, these time frames do not correspond to actual hits (when the damage is inflicted) due to two reasons:
The second factor does impact Keshik’s gold generation as well. The end of the gold generating cycle precedes the start of a new attack animation by one frame (at least in 60 FPS recording), unless current attack speed time frame is 1.4 sec (in that case, gold generation does not stop). (I wish I could graphically present all the info above to make things clear, but sadly, I’m even worse in drawing than in maths or explaining.) Observed rates are further a subject to minor discrepancies caused by game speed and internal framerate. I believe these factors to be a prime reason of a mentioned build-up of 0.15 seconds and resulting attack speed being 1.86… sec instead of 1.9 sec (though the latter can originate from the game forecasting attack speeds in a far away future). I ran a simple test for a stationary and a fleeing target where Keshik was able to kill the victim in 10 hits. For the former, five samples of different framerates (20, 30, 47, 60 and ‘unrestricted’ (~270 in my case) FPS) for ×1.0 and ×1.7 game speeds were gathered. (47 FPS was chosen as a random prime figure; Bandicam was used as a framecap tool.) For the fleeing target, only a single run result was recorded as I previously observed them to be more stable in nature (they are not affected by attack speed at all). These are the values I received (sorry for an image, not an actual table): Game speed and framerate impact on Keshik's gold generation ability I also tried to play around with attack animation duration and attack speeds a little. Indeed it resulted into modified gold collection rates and total looting value if 1.4 sec / 1.9 sec rate was broken. (E. g.: attack animation set to 1.8 sec, attack speed not modified, total looting increased from 620 to 689 (×1.0 game speed, ‘unrestricted’ framerate); setting attack animation duration to 1 sec resulted in 512 gold instead.) But not to tread on dangerous ground, I gave up on these efforts. ⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯ So, to recap:
Though this is way too wordy for a small mechanic that almost makes no real impact on the game, it still touches upon an important mechanic of attack speed, as well as an impact of game speed and framerate. [link] [comments] |
from newest submissions : aoe2 https://ift.tt/3d2gaTP
No comments :
Post a Comment