Jump to content

Shooting Dragon Fix


Gurgarath

Recommended Posts

  • Forum Moderator

Hello friends,

 

While I was adjusting my skills and doing some updates to them, I encoutered a funny bug I had never noticed. I asked my friends and tried some servers and they either had this bug or they had it "fixed" already. I didn't try the official but they surely patched it in 17.5NB.

You will see that when you use this skill, two things can happen based on your server:

 

  1. Your character will walk toward the ennemy and launch the skill. The skill will hit the target but nothing will happen. No processing, no damage, no aggro, simply nothing. The skill will be effective only at point blank range. Screencap below.
  2. You will launch the skill as long as you have an attackable opponent targeted. That's the "fix" I talked about, which is more like a workaroundNB.

 

Preview of the bug: https://metin2.download/picture/U1z68dRY2Z2Pt6ac1jB50HO9LFX4t148/.gif (Thanks @Veltor88)

 

This is an easy fix that probably anyone can come up with, but I would like to share it with you, let's make the game better for everyone.

 

Open Server/char_battle.cpp and search for the following case in class CFuncShoot:

				case SKILL_YONGBI:
					{
						m_me->OnMove(true);
					}
					break;

Delete the case. It simply makes you move to the target, launch the skill and that's it. Probably an unfinished piece of code that made it's way to the final game.

 

Search for (in the same class):

				case SKILL_TUSOK:
				case SKILL_BIPABU:
				case SKILL_NOEJEON:
				case SKILL_GEOMPUNG:
				case SKILL_SANGONG:
				case SKILL_MAHWAN:
				case SKILL_PABEOB:

And extend the check with:

case SKILL_YONGBI: //Fix for Shooting Dragon

 

Now your character will walk to the ennemy, launch the skill and deal damages as well as triggering the aggro and stuff like that.

 

NB: The bug highlighted in the screecap was made and reproduced on the latest official client (as of February the 20th). A matching 17.5 skilltable (client->server) was also running at that time. The "work-around" I mentioned is surely happening if you have skill datas prior to the patch 17.5 as it was probably how the skill was back then and how it was intended to work. It might seem odd anyway and you might want to fix it. Also, you may encounter a "double-triggering" bug when launching the skill at point black. For those two cases, I forward you to this great post, giving you a fix. I don't know if I have this bug (and will provide you with all the necessary files if I happen to have it). I didn't do any checks on the clientside as I was simply trusting Ymir and using latest (supposedly working and tested) skill datas both serverside and clientside.

 

Enjoy!

 

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 6
  • Good 1
  • Love 26

Gurgarath
coming soon

Link to comment
Share on other sites

@Gurgarath Hello, I'm trying to reproduce the bug but I'm working on a "worked-around" source, do you know how this work around was made? 

 

EDIT: After a bit of testing, as i was expecting is a client fix made on skilltable.txt. Your solution is also not a real fix, this skill as the majority of them checks on client side for hit collision. So the real problem is in client data inconsistencies in skill range set in skilltable.txt and hit data from skill yongpa(_2,_3,_4).msa.
The following are the "actual hitting" ranges, while range in skilltable.txt is the range your character walks up to before casting the skill, so basically those two values have to match.

 Group Event03
    {
        MotionEventType      4
        StartingTime         1.193431
        DuringTime           0.200000
        EnableHitProcess     1
        
        AttackType           0
        HittingType          1
        StiffenTime          0.000000
        InvisibleTime        0.500000
        ExternalForce        0.000000
        HitLimitCount        5
        CollisionType        4
        
        SphereDataCount      1
        Group SphereData00
        {
            Radius           200.000000
            Position         0.000000 -200.000000 150.000000
        }
    }
    Group Event04
    {
        MotionEventType      4
        StartingTime         1.445256
        DuringTime           0.200000
        EnableHitProcess     1
        
        AttackType           0
        HittingType          1
        StiffenTime          0.000000
        InvisibleTime        0.500000
        ExternalForce        0.000000
        HitLimitCount        5
        CollisionType        4
        
        SphereDataCount      1
        Group SphereData00
        {
            Radius           200.000000
            Position         0.000000 -600.000000 150.000000
        }
    }

those hitting spheres are positioned in front of the character at radius distance from you and from the first sphere covering a total distance of 4*radius so 800, I suggest to use this value lowered by a 50 for latency and moving victims, you can fiddle with this value and get the desired result, for skilltable.txt (and skill_proto as well, DB is not used but if you want to add a check serverside for skillrange hacks and such you'd better have consistent data).
So with current .msa file settings the correct value for skilltable.txt is 750; hitsphere, however, is noticeably smaller than the dragon head range. Another good solution would be to increase sphere radius to 250 (for each of the 4 msa) and skilltable.txt value to 950.
This solution has been tested and works with no double damage computation( @Heathcliff™) and with the default m_me->OnMove(true) function (no need to change source). If you want any further explaination about OnMove usage here do not esitate to ask.

Edited by OtherChoice
  • Love 2
Link to comment
Share on other sites

  • Forum Moderator
6 hours ago, OtherChoice said:

@Gurgarath Hello, I'm trying to reproduce the bug but I'm working on a "worked-around" source, do you know how this work around was made? 

 

EDIT: After a bit of testing, as i was expecting is a client fix made on skilltable.txt. Your solution is also not a real fix, this skill as the majority of them checks on client side for hit collision. So the real problem is in client data inconsistencies in skill range set in skilltable.txt and hit data from skill yongpa(_2,_3,_4).msa.
The following are the "actual hitting" ranges, while range in skilltable.txt is the range your character walks up to before casting the skill, so basically those two values have to match.


 Group Event03
    {
        MotionEventType      4
        StartingTime         1.193431
        DuringTime           0.200000
        EnableHitProcess     1
        
        AttackType           0
        HittingType          1
        StiffenTime          0.000000
        InvisibleTime        0.500000
        ExternalForce        0.000000
        HitLimitCount        5
        CollisionType        4
        
        SphereDataCount      1
        Group SphereData00
        {
            Radius           200.000000
            Position         0.000000 -200.000000 150.000000
        }
    }
    Group Event04
    {
        MotionEventType      4
        StartingTime         1.445256
        DuringTime           0.200000
        EnableHitProcess     1
        
        AttackType           0
        HittingType          1
        StiffenTime          0.000000
        InvisibleTime        0.500000
        ExternalForce        0.000000
        HitLimitCount        5
        CollisionType        4
        
        SphereDataCount      1
        Group SphereData00
        {
            Radius           200.000000
            Position         0.000000 -600.000000 150.000000
        }
    }

those hitting spheres are positioned in front of the character at radius distance from you and from the first sphere covering a total distance of 4*radius so 800, I suggest to use this value lowered by a 50 for latency and moving victims, you can fiddle with this value and get the desired result, for skilltable.txt (and skill_proto as well, DB is not used but if you want to add a check serverside for skillrange hacks and such you'd better have consistent data).
So with current .msa file settings the correct value for skilltable.txt is 750; hitsphere, however, is noticeably smaller than the dragon head range. Another good solution would be to increase sphere radius to 250 (for each of the 4 msa) and skilltable.txt value to 950.
This solution has been tested and works with no double damage computation( @Heathcliff™) and with the default m_me->OnMove(true) function (no need to change source). If you want any further explaination about OnMove usage here do not esitate to ask.

 

I completely agree with you, and you did a great work, respect! To be fair, the reason I focused my attention on serverside and completely ditched clientside was because of the latest gf client.

Using the most recent client containing all of the 17.5 updates and newer, I expected client datas to be tested thoroughly and to be bug-free (as it was working already on official server) and then I just tried to remove every mismatch I got between official clientside and my seemingly outdated serverside. By the way, I think the "worked-around" version is on every client having pre 17.5 skilltable and that's why no one had to worry. The bug described in my post seems to occur only on post 17.5 skilltable.

I also want to say that this bug occured with matching serverside and clientside skilltable, that's when I started to look into server sources and found the problem I described. Here's how I came up with this fix (or work-around actually). I will try to test about the double computation of the skill as well, but I didn't see it when I tested it at first.

Gurgarath
coming soon

Link to comment
Share on other sites

  • 4 weeks later...
  • Forum Moderator
58 minutes ago, Mafuyu said:

you will do double damage when u are closer to the target, when u run away, it only hits once but thats fail too, u can literally hit a target across the map as long as u has clicked on it, thats not rly a fix

No you can't, you will walk onto the target and launch the skill. About the double triggering, it has already been stated. It is related to the file "yongpa(_2,_3,_4).msa". if you launch the skill from afar, it's related to this file as well. I stated that this has been tested with the latest official files.

Gurgarath
coming soon

Link to comment
Share on other sites

On 3/22/2020 at 10:46 PM, Gurgarath said:

No you can't, you will walk onto the target and launch the skill. About the double triggering, it has already been stated. It is related to the file "yongpa(_2,_3,_4).msa". if you launch the skill from afar, it's related to this file as well. I stated that this has been tested with the latest official files.

yes you can, i tested it. Without your changes everything is fine, when i apply your "fix", it doubles the damage and you can shoot across the map and deals damage, as long as you has targeted the enemy.

 

maybe game related to some serverfiles, i have no "range" configuration in skill_proto, what kind of range you have in your skill proto for the skill?

Edited by Mafuyu
  • Confused 1
Link to comment
Share on other sites

  • Forum Moderator
1 hour ago, Mafuyu said:

yes you can, i tested it. Without your changes everything is fine, when i apply your "fix", it doubles the damage and you can shoot across the map and deals damage, as long as you has targeted the enemy.

 

maybe game related to some serverfiles, i have no "range" configuration in skill_proto, what kind of range you have in your skill proto for the skill?

I said everything in the main post and in the comments, I will try to straighten that out for everyone:

 

I have everything from the latest gf client. Skill_table and msa files included. About your question it must be 750 serverside or something like that.

Just read what my code do, if you can shoot it from anywhere, you probably have skill files prior to the patch 17.5. In that case, this "fix" is useless for you as you have, I quote:

Quote

You will launch the skill as long as you have an attackable opponent targeted. That's the "fix" I talked about, which is more like a workaround.

 

My fix is for people having the latest client and the latest skill_table. I should have mentioned it but as I already sent a gif and a description of the bug, it's up to everyone to decide whether they need the fix or not.

 

At last but not least, I've never encountered any of the bugs aforementioned, however, I can't try right now. I will try as soon as possible to reproduce the "double triggering" bug. If it happens, I will fix and share it with everyone there. However, our friend OtherChoice already gave us a fix as well as a wonderful explaination. To answer him, the "worked-around" files are probably client skill data files prior to 17.5, which I simply didn't know as I had no way to test. In the meantine, a little NB was added in the main topic.

 

Regards,

Gurgarath
coming soon

Link to comment
Share on other sites

14 hours ago, Gurgarath said:

I said everything in the main post and in the comments, I will try to straighten that out for everyone:

 

I have everything from the latest gf client. Skill_table and msa files included. About your question it must be 750 serverside or something like that.

Just read what my code do, if you can shoot it from anywhere, you probably have skill files prior to the patch 17.5. In that case, this "fix" is useless for you as you have, I quote:

 

My fix is for people having the latest client and the latest skill_table. I should have mentioned it but as I already sent a gif and a description of the bug, it's up to everyone to decide whether they need the fix or not.

 

At last but not least, I've never encountered any of the bugs aforementioned, however, I can't try right now. I will try as soon as possible to reproduce the "double triggering" bug. If it happens, I will fix and share it with everyone there. However, our friend OtherChoice already gave us a fix as well as a wonderful explaination. To answer him, the "worked-around" files are probably client skill data files prior to 17.5, which I simply didn't know as I had no way to test. In the meantine, a little NB was added in the main topic.

 

Regards,

what exactly is your "dwTargetRange" and "dwSplashRange" ?

Link to comment
Share on other sites

  • 1 year later...
  • Forum Moderator
On 1/19/2022 at 11:00 PM, TonisBoss said:

I have problem with this fix. Shaman can dmg from far or they do double damage. If you could help me please.

I have actually went back a couple of days ago to porting my skills to the latest patch. Technically, it just gave me an insight on how messed up some skills are in the game. For example, some Mental warrior skills, or horse skills will trigger the damage BEFORE the actual animation and effect (notably) because of the splash not being correctly used, but this is another topic.

Well, back on your question, if you have these issues, you should not follow this fix, the skill is working great by itself, this "fix" is pretty much useless for most people as it will most likely make you double compute the skill (because of the hittingspheres as OtherChoice explained). The explaination I can find is that I probably had a mismatch between the client and the server, or the skilltable and the actual PC files, the latter would be the most realistic explanation on why I did not check and why I ended up with mismatching files considering on what I worked back then.

Anyway, if your skill is working great by itself, you should not follow this guide because it can make it worse because it will compute when you launch it and when the hitting spheres will actually hit.

Hope I was clear enough, because this post has created confusion 😄

Gurgarath
coming soon

Link to comment
Share on other sites

On 1/19/2022 at 11:00 PM, TonisBoss said:

I have problem with this fix. Shaman can dmg from far or they do double damage. If you could help me please.

Check skill proto database for the double damage in "iMaxHit" table, and for the far range check client side skill_proto last string (on db is dwSplashRange) make sure is not set on 0, If you have it on 0 you will get unlimited range.

Edited by MentaLL

mindset

Link to comment
Share on other sites

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.