Let's fix the Collision Bug in Tera Server 1725
Hi everyone¡
I'm new in Tera world, first, I want to sorry for my low english level.
I was playing in the Tera Server 1725 released by P5y10 (¡great work man!), the most stable server offline as far as I know despite it's outdated. I know the java emulator it's working fine by now, but as far as I know this release has much more server funcionalities (quests, npc, spawn points, skills, more depth combat, etc.).
The first thing that caught my attention was the famous collision bug, I didn't even know if that was a bug or some kind of random check in order to attack.After a little of internet documentation (very few, it's almost unknown and most of the documentation about this release was here) I see it's a common bug in the two related releases of the P5y10's work.
It's maybe possible to fix this?.
I downloaded the source code and after a couple of days messing with it and trying to understand how it works the client server relationship, I'm doing some tests to solve it.
Ok, let's talk about the code itself;
Thanks the P5y10's debbuger, we can see the opcodes in real time.
So, the Attack opcode it's "BDEE". No matter if it's against a foe or just hitting the air, it seems everytime we attack the client "throws" this opcode. When we're close to a foe and this bug appears, the client throws the "5B5A" opcode. In the P5y10's original code it's treated as "unknown". More facts about this opcode; appears ONLY when we should be hitting. Attacking the air just throws the "BDEE" again.
First; It's possible to assign this opcode to the "attack" function. What happens in the game? Nothing, the debbuger just throw some errors about failed readings wich leads us to think the information that "carries" (I don't know how to say this properly) the opcode "5B5A" it's different from the "BDEE" code, all relative to the player's position and some other info. So...
Second; How about to assign that "extra" information to use it when the "5B5A" opcode pops out?. Ok, so if we "save" the buffer information about the "BDEE" opcode and use it along the "attack action" we did previously, what happens? Good news; it works¡¡ Still with some flaws but now, once we're attacking an enemy, as long we don't fail the attack (because then the BDEE information would store the "air" information), ALL the attacks impact successfully, even with the enemy in the floor, so I guess it's one step to the right direction :P:.
Update: As Buffer it's the "succesful" attack and the 5B5A code repeats alot in close combat (very very much...) the player repeats the first hit all the time and it's almost a fast killing machine. Of course this should be fixed because it's some kind of cheating...
It's everything I was able to do in so few time (I've a full time job and a 7 month baby, so it's sleep time or nothing). :*:
What's next? The next time I want to "save" that buffer information about BDEE ONLY when we're attacking an enemy (mainly to avoid that "reset" when we fail one hit fighting one enemy) and, do you think it would be possible to somehow save in a file that buffer information to assign it just the first time that 5B5A damned code appears, without the necessary first successful BDEE attack?
I don't know if I have expressed this correctly, this it's very hard to me, I don't even know if somebody it's really interested in fixxing this besides me, I hope I'm not alone!
Thanks for reading¡
EDIT2:
After a couple of days going a little deeper in the code, and a little tired of messing with the code, I found where occurs: In "SkillEngine" class, "ProcessArea". It seems the code does three checks to "validate" a succesful hit, related with both radius (creature and target) and some geometric calculating that honestly I can't understand. The last check in the "bug scenary" always returns 0.
I guess this it's something well known by the people that wrote this code, I wish someone had told me before.
How to fix it? Honestly, no idea. It seems related with the radius of the target creature, if you just don't hit the center, it returns nothing.
As I didn't wanted to waste more time, I made this to "fix" it; the last two checks, if the attacker it's the player and isn't archer (to not to mess with projectiles, worked fine), just simply ignores them.
So this "fix" brings this flaw; You hit the enemy no matter the direction you're attacking, as a "radius" attack (only melee attacks). Just for your attacks, the creatures still have to go for the three checks (it's unfair that the enemy hit you even you're dodging their attacks).
Yeah, it's a "cheap" workaround, but testing with the pad, I'm more than pleased, I think it works very well; no more missing attacks (0 missing attacks, by the way) in that moose like creature at the beginning. In a combat focused rpg like Tera I think it's essential that all attacks land in the enemy within your sword radius, right now, with this little fix, no more "air swinging" in front on enemies, all attacks hit and do damage, and I LOVE that¡ ;)
Well, I guess that now I'll try to fix the character skills's loading in the personal bar and the "delete that doesn't deletes" of the characters.
Sorry for my english (I'm from Spain) and I don't think I will update this thread again as nobody seems interested (of course I understand, it's an "old" release, even I still think it's by far the most stable public server emulator, as I'm not a Tera player, this it's more than enough for my "offline" games).
If in case anyone cares about the release of this fixes, let me know.
Thanks for reading!
Re: Let's fix the Collision Bug in Tera Server 1725
ty for that info...it ll help me i think...
ill take my work on in a few days/weeks..
having again a bit time now.. and doing the loginserver now hopefully ready...
for the gameserver i ll have more time in a few weeks..
cause of missing a lot of updates/time to the official now it will take some time to get behind the current state...
Re: Let's fix the Collision Bug in Tera Server 1725
Metis for the delete that doesnt delete fix check my release source code in the release sections i fixed that but was to annoyed with the collision bug that i gave up on it.
Great job on fixing it! :)
Re: Let's fix the Collision Bug in Tera Server 1725
i will waiting for new fix :3
Re: Let's fix the Collision Bug in Tera Server 1725
@P5yl0 did u have a repo ? or team, or site of TERA development?
Re: Let's fix the Collision Bug in Tera Server 1725
Quote:
Originally Posted by
Grund
@
P5yl0 did u have a repo ? or team, or site of TERA development?
https://github.com/P5yl0
Re: Let's fix the Collision Bug in Tera Server 1725
This issue kinda sorted itself out for me once I rewrote the skill engine, literally most of the performance issues lie there.