cactbot
cactbot copied to clipboard
Request a translate of improvement in docs/LogGuide.md #line-21-0x15-networkability
i have some research on the ability web event 0X15/0X16 here about how to deal with ability effects better and some bug fix in chinese But i have some trouble on translating it to make a PR for docs/LogGuild.me because of my poor english, are there any contributor could give me some help?
I'll do it, wait a moment. Looks good, the post.
I am not sure where should put the content of the post to, so I upload my translations here first, and see how can we deal with it.
Translation here
The Log Line Structure
This is a type 15 log line.
15:10654321:Stupid Knight:4094:Dia:40123456:Striky Dummy:750003:23ED0000:4090E:74F0000:1B:40948000:0:0:0:0:0:0:0:0:0:0:7400000:7400000:0:10000:0:1000:14.61666:-47.99499:24.99997:-1.571156:116379:116379:10000:10000:0:1000:17.92044:-49.72444:24.99986:-1.088545:000059D5:0
Analize it, we'll know the structure as below:
[15/16]:[source_aid]:[source_name]:[skill_id]:[skill_name]:[target_aid]:[target_name]:[flag1]:[param1]:[flag2]:[param2]:[flag3]:[param3]:[flag4]:[param4]:[flag5]:[param5]:[flag6]:[param6]:[flag7]:[param7]:[flag8]:[param8]:[source_current_hp]:[source_max_hp]:[source_current_mp]:[source_max_mp]:[source_current_tp]:[source_max_tp]:[source_posX]:[source_posY]:[source_posZ]:[source_heading]:[target_current_hp]:[target_max_hp]:[target_current_mp]:[target_max_mp]:[target_current_tp]:[target_max_tp]:[target_posX]:[target_posY]:[target_posZ]:[target_heading]:[sequence]:[target_idx]
It looks like the log line is very long-winded, but it is not if we analyse it.
index | description | example | regex |
---|---|---|---|
0 | type | 15/16 | 1[56] |
1 | actor aid | 10654321 | [0-9A-F]{7} |
2 | actor name | Stupid Knight | [^:]* |
3 | activity id | 4094 | [0-9A-F]{1,8} |
4 | activity name | Dia | [^:]* |
5 | target aid | 40123456 | [0-9A-F]{7} |
6 | target name | Striky Dummy | [^:]* |
7-22 | (effect flag + effect parameters)*8 | (see the example above) | |
23-32 | other data of target | (see the example above) | |
33-42 | other data of actor | (see the example above) | |
43 | network info number | 000059D5 | [0-9A-F]{8} |
44 | target number | 1 | \d+ |
~~well, it is not long-winded, but ugly like sh*t~~
effect flag + effect parameters
The following is the most important part of this post, please pay attention to it.
You can see there are 8 * 2
hex numbers, in a loose sense, every two continuous hex number would be a "effect": the first is a flag, and the second is a parameter.
~~It is definitely blame to the parse plugin that it don't know what exactly this data is. So the parse plugin split them in 4 bytes, which makes us difficultly to analyse and research...~~
In my research, I concatenate them into 8 bytes, and then I can see the structure of the data.
Note: the letter of the "position" field means the position in two 8-length hex number as "ABCDEFGH:12345678". (if the hex number is not exactly 8-length, it will be padded with 0
s)
offset | data type | parameter name | position |
---|---|---|---|
0x0 | ubyte | effect type | GH |
0x1 | ubyte | param1 | DE |
0x2 | ubyte | param2 | CD |
0x3 | ubyte | param3 | AB |
0x4 | ubyte | param4 | 78 |
0x5 | ubyte | param5 | 56 |
0x6 | ushort | main parameter | 1234 |
effect type
How is the current activity affect the target, can be heal/damage, or buff addition, or instant death, or others else.
parameter | type |
---|---|
0x1 | "miss"-ed damage |
0x2/0x3 | damage |
0x4 | heal |
0x5 | "block"-ed damage |
0x6 | "parri"-ed damage |
0x7 | invincible |
0xA | power_drain(I don't know what it is, so just copied the name) |
0xB | mp recover |
0xD | tp recover |
0xE | add buff to target |
0xF | add buff to actor |
0x18/0x19 | provoke |
0x20 | knockback |
0x21 | pull (like Rescue or Sticky Tougue) |
0x33 | instant death |
0x37 | invulnerable from debuff because resisted |
0x3D | actor's job gauge changes |
main parameter
-
When the type is "damage" or "hp/mp/tp recover", this parameter equals to the damage value or recovered value.
- When param5 is 0x40 (64 in decimal), the value is
param4 * 65535 + main-parameter
- When param5 is 0x40 (64 in decimal), the value is
-
When the type is add-buff (0xE or 0xF), the main parameter is the buff id.
other parameters
The meaning of parameters is different in different effect type, as other post mentioned:
- damage/heal crit hit? =
param1 & 0 x 1
- damage direct hit? =
param1 & 0 x 2
- activity main parameter =
lower 4 bits of param2
- activity sub parameter =
higher 4 bits of param2
Activity Main Parameters Ref
parameter | type |
---|---|
1 | physics-blunt |
2 | physics-piercing |
3 | physics-slashing |
4 | physics-shot |
5 | magic |
6 | darkness |
7 | sound wave |
8 | limit break |
Activity Sub Parameters Ref
parameter | type |
---|---|
1 | fire |
2 | ice |
3 | wind |
4 | earch |
5 | thunder |
6 | water |
7 | unaspected |
and so on. That's what we should dig more on.
Example
For the example that mentioned before:
750003:23ED0000:4090E:74F0000:1B:40948000:0:0:0:0:0:0:0:0:0:0
There are 3 effect in it.
00750003:23ED0000
Normal damage, unaspected magic skill, no crit, no direct hit, damage value is 0x23ed=9197
0004090E:074F0000
add buff that id is 0x074F (Dia)
0000001B:40948000
Unknown, most skill has this effect, the main parameter is activity id
Character Data
Same as other posts, but I'll say that others always ignore the heading field after x/y/z fields of character data, so the index is not current when I am debugging.
Network Info Number / Target Number
- These data is always used to determine if damages come from the same activity.
- The same network info number means that there is one activity doing multiple effects, this number is not came from game client/server, it is the incremental number from act, refers to the n-th skill-related network package.
- If one skill-related network package that shows the current skill does effects onto multiple targets, act would split them into multiple log lines, and the Target Number is the number of targets.
- In most situation, target number is by the distance between himself and the actor, from the nearest to the further ones.
Last but not least
Maybe you can do the researching to find out all the flags, and then fill up this post, or we can analyse them in other place?