Feature Request: Add target position to 20/21/22 lines, and ability facing
xpdota opened this issue · 2 comments
For ground-targeted abilities, there is currently no indication of the target location in the log. This information is in the packet, but is not written to the log file.
For 20-lines, the last 8 bytes of the ActorCast packet might look like this:
824D8BCA|00007ED2
Using ACT's XYZ terminology, it would be ZX|0Y
So X = 8BCA, Y = 7ED2, Z = 824D
To convert to real coordinates, first subtract 7FFF
X = BCB, Y = -12D, Z = 24E
Decimal:
X = 3019, Y = -301, Z = 590
Then, the last part is to divide by a constant. I'm still trying to figure out the exact value of said constant, but it seems to be somewhere between 32 and 33. Sapphire uses 32.767, so I'll go with that. We divide by that constant and we get:
X = 92.13538, Y = -9.18608, Z = 18.00592
I was using a macro to cast the skill on myself, so I could use my own position as a reference:
20|2023-01-18T15:44:01.9140000-08:00|10941DD1|My Name|2C84|Bomb Toss|E0000000||1.834|92.14|-9.17|18.00|-3.13|6a96cdd5cf048b28
X = 92.14, Y = -9.17, Z = 18.00
It's also in the 21-line packet, so you can see hit positions even for things with no casts (might be useful for fflogs/analsys):
252|2023-01-18T15:44:03.2470000-08:00|0000029C|10941DD1|10941DD1|00000003|024A0014|00290000|63C88443|00000000|E0000000|00000000|00002C84|00003FBA|3DCCCCCD|E0000000|00900018|01002C84|<lots of zeroes>|00000000|824D8BCA|00007ED2|00000000||193cfec2f7eccac4
My request would be to add this information to 20/21/22 lines in a more friendly format, e.g.
20|2023-01-18T15:44:01.9140000-08:00|10941DD1|My Name|2C84|Bomb Toss|E0000000||1.834|92.14|-9.17|18.00|-3.13|92.14|-9.17|18.00|6a96cdd5cf048b28
I think there's still a small investigation needed to confirm the constants. Sapphire subtracts 8000 rather than 7FFF, but that causes all three of my values to become further off than using 7FFF.
Ability facing can also be done. This is needed if you want to know the "direction" of a line/cone ability in the case that it differs from the entity's facing direction.
Here is a test using BLU Surpanakha (brackets for emphasis):
252|2023-05-12T17:57:32.5660000-07:00|0000029C|1001ABCD|1001ABCD|00000000|02EF0014|00000000|645EE07C|00000000|1001ABCD|00000000|00004793|00000985|3F19999A|E0000000|>>>FFF4<<<036F|01004793|...|
252|2023-05-12T17:57:33.5920000-07:00|0000029C|1001ABCD|1001ABCD|00000000|02EF0014|00000000|645EE07D|00000000|1001ABCD|00000000|00004793|00000986|3F19999A|E0000000|>>>FFF4<<<0370|01004793|...|
252|2023-05-12T17:57:35.1080000-07:00|0000029C|1001ABCD|1001ABCD|00000000|02EF0014|00000000|645EE07F|00000000|1001ABCD|00000000|00004793|00000987|3F19999A|E0000000|>>>BB59<<<0371|01004793|...|
252|2023-05-12T17:57:36.2240000-07:00|0000029C|1001ABCD|1001ABCD|00000000|02EF0014|00000000|645EE080|00000000|1001ABCD|00000000|00004793|00000988|3F19999A|E0000000|>>>8ACA<<<0372|01004793|...|
The first two are the same angle, the second two are rotated.
It appears that 0000 is north, and increments counter-clockwise (i.e. +1 = 1/65536 turn in the CCW direction).
For 20-lines, the same exists, this time with BLU Faze:
252|2023-05-12T18:11:05.7960000-07:00|00000040|1001ABCD|1001ABCD|00000000|015F0014|00000000|645EE3A9|00000000|00012C8B|00002C8B|3FEAC083|1001ABCD|0000>>>F94C<<<|E0000000|820B8CAB|00008063||a22941641241472f