Jump to content
anamutz86

Skills in safe zone kills the player

Recommended Posts

skillinfo.txt
skilleff.txt
skilleffect.lua
for example, you can pull out one skill from all these files that kills you, and show it here

Edited by Pr10ritet
  • Thanks 1

Share this post


Link to post
Share on other sites

Hello @anamutz86,

 

Are you sure that these zones are safe in both .map file (client-side) and .atr-file (server-side)?


Share this post


Link to post
Share on other sites

@V3ct0r
some times  it happens even if im on outzone , also you need to know when im near monsters i no die .. but if iam on zone that (safezone) this kills happend  ,, also motha told me it`s client src probl and i don`t know where i should start search which file 


@Pr10ritet

skilleff

24    Berserk    -1    0    State_Kb_Add    State_Kb_Rem    1    0    1    1    1    1    1    1    1    1    1    1    1    1    0    0    0    -1    0    0    0    118    1    0    0    0    s0084    0    0    0    s0084

skill info

0084    Berserk    1    1,10;8,10;9,10    1,-1    1,1;1,2    1,-1    -1    2    1    1    -1    81,4    1    1    1    0    1    1    0    0    0    0    0    SkillSp_Kb    0    0    0    0    Skill_Kb_End    0    0    0    0    0    0    0    0    0    0    0    0    0    0    SkillCooldown_Kb    1    1    12    0    46    2    117    0    -1    0,0    0,0    -1    -1    -1    0    0    -1    -1    0    -2    236    0    s0084.png    0    0    Put character into Berserk mode to increase attack speed    Increases attack speed of character tremendously over short duration. Effect increases with skill level    Fixed consumption of 15 SP    0
 

skillefflua

function Skill_Kb_End ( ATKER , DEFER , sklv ) 
    local statelv = sklv 
    local statetime = 20  
    AddState( ATKER , DEFER , STATE_KB, statelv , statetime ) 
    --LG( "Kb", "Berserk Skill Level=" , sklv , "Skill Damage= " , dmg , '\n" ) 
end 

Share this post


Link to post
Share on other sites
27 минут назад, anamutz86 сказал:

@Pr10ritet

skilleff

24    Berserk    -1    0    State_Kb_Add    State_Kb_Rem    1    0    1    1    1    1    1    1    1    1    1    1    1    1    0    0    0    -1    0    0    0    118    1    0    0    0    s0084    0    0    0    s0084

skill info

0084    Berserk    1    1,10;8,10;9,10    1,-1    1,1;1,2    1,-1    -1    2    1    1    -1    81,4    1    1    1    0    1    1    0    0    0    0    0    SkillSp_Kb    0    0    0    0    Skill_Kb_End    0    0    0    0    0    0    0    0    0    0    0    0    0    0    SkillCooldown_Kb    1    1    12    0    46    2    117    0    -1    0,0    0,0    -1    -1    -1    0    0    -1    -1    0    -2    236    0    s0084.png    0    0    Put character into Berserk mode to increase attack speed    Increases attack speed of character tremendously over short duration. Effect increases with skill level    Fixed consumption of 15 SP    0
 

skillefflua

function Skill_Kb_End ( ATKER , DEFER , sklv ) 
    local statelv = sklv 
    local statetime = 20  
    AddState( ATKER , DEFER , STATE_KB, statelv , statetime ) 
    --LG( "Kb", "Berserk Skill Level=" , sklv , "Skill Damage= " , dmg , '\n" ) 
end 

I don’t quite understand why in your skill in skillinfo, display as a picture, in my opinion it should have a different look
but in general, everything is in order with the functions, maybe you need to dig somewhere else
try to replace like mine


0084    Berserk    1    1,10;8,10;9,10    1,-1    1,1;1,2    1,-1    -1    2    1    1    -1    81,4    1    1    1    0    1    1    0    0    0    0    0    SkillSp_Kb    0    0    0    0    Skill_Kb_End    0    0    0    0    0    0    0    0    0    0    0    0    0    0    SkillCooldown_Kb    1    1    12    0    46    2    117    0    -1    0,0    0,0    -1    -1    -1    0    0    -1    -1    0    -2    236    0    s0084.tga    0    0    Put character into Berserk mode to increase attack speed    Increases attack speed of character tremendously over short duration. Effect increases with skill level    Fixed consumption of 15 SP    0

Share this post


Link to post
Share on other sites

Hello friends!

 

On 7/8/2022 at 6:16 PM, xiaoyuyu321 said:

Skill initialization problem

Do you can explain in more details what is the problem?

 

On 7/10/2022 at 2:57 PM, Mario said:

@Mario and @anamutz86, check if this problem occurs when using the official server and client executables. If there is no such bug in the official binaries, then someone made a mistake in the source codes. Here I can’t tell, it’s better to contact the developers of the source codes (create an issue in a bug tracker).


Share this post


Link to post
Share on other sites

previously about 9 or 11 months ago I had the problem of death by ability I really remember that I caused it by making some modifications I don't remember exactly what I was modifying but I think I still have the record of the area that I modified to cause the problem I remember that it could be reproduced in both bin and src

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, dragontechi said:

previously about 9 or 11 months ago I had the problem of death by ability I really remember that I caused it by making some modifications I don't remember exactly what I was modifying but I think I still have the record of the area that I modified to cause the problem I remember that it could be reproduced in both bin and src

cient side or server side?

Share this post


Link to post
Share on other sites

This happens due to a CRC check failure, AFAIK that the variable wasn't initialized and for some skills the server doesn't send anything , when the client do the checks, you get whatever garbage value that was in memory and the client/server thinks u are malicious, I couldn't find how classes' variables behavior were in C++03 but what I'm sure of is that unless you initialize ur variable in modern C++, you get whatever was leftover in that memory.

  • Like 2

Kind regards, AG.

Share this post


Link to post
Share on other sites

having this problem too but for some players it started since windows 11 i believe.

I am using v1.36 with mods no src and i heard other having same issue it keep happening each time reopen client and it go away once you logout to char screen I wonder where the problem is.

 

Edit: I tried seeing with another char my dead char and I found out that it's not dead means its only client sided death, although I can still equip items and unequip them but I cant use skills weird.

Edited by Fisal Moha

Share this post


Link to post
Share on other sites
2 hours ago, Fisal Moha said:

having this problem too but for some players it started since windows 11 i believe.

I am using v1.36 with mods no src and i heard other having same issue it keep happening each time reopen client and it go away once you logout to char screen I wonder where the problem is.

 

Edit: I tried seeing with another char my dead char and I found out that it's not dead means its only client sided death, although I can still equip items and unequip them but I cant use skills weird.

Im having the same issue on my server. No idea. They dead even with 1.36 clean . Tested already. Maybe is new hardware issues new graphic cards. Or mem ddr5

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, Fisal Moha said:

client sided death,

It is indeed a client side issue, I've described it earlier, there:

On 7/21/2023 at 7:17 PM, AlGhoul said:

when the client do the checks, you get whatever garbage value that was in memory and the client/server thinks u are malicious

Anywho, lemme put it in detail this time:
Well, there's a CRC skills check that happens on the client, the CRC is usually performed on the server and the client just merely verifies it and the issue lies in the following statement "sometimes the CRC is not being sent, to be more accurate on some types and/or specific skills", I haven't investigated which skills are exceptions for that, but, I've investigated the CRC check problem (in fact it is a garbage variable problem) and I'll describe it to you now.

In a struct called stNetNotiSkillEffect (I guess the name should ring a bell), there's a variable called SSrcState, to be specific it's defined in NetProtocol.h Line 120, another issue lies here (There's no constructor that initializes any of these variables declared here), Let's trace where that struct is being used:
In NetIF.cpp Line 60, you'll find that SC_CharacterAction (RPC function) is being called to notify the client with actions that are being performed, SC_CharacterAction is defined in PacketCmd_SC.cpp Line 692 (this is quite a big function/procedure, that's quite convenient since it's an RPC & usually they have to handle many different cases), if you scrolled down a bit, you'll find the only case (PacketCmd_SC.cpp  L850) that handles/fills the sSrcState variable is enumACTION_SKILL_TAR (and it does that in a specific sub-branch), here PacketCmd_SC.cpp Line 914, Now with that said, if you scrolled down a bit you'll find a call to NetActorSkillEff with the SSkillInfo struct being passed as the second argument (PacketCmd_SC.cpp Line 975), umm I wonder what that function does... Let's follow.

NetActorSkillEff is defined @ NetProtocol.cpp Line 937, wonderful where's the issue? Check this branch: NetProtocol.cpp from Line 1044 to Line 1066, alright, the issue lies here:
 

if( SkillEff.SSrcEffect.GetCount()>0 || SkillEff.SSrcState.GetCount()>0 || (SkillEff.sSrcState & enumFSTATE_DIE) ) // This is it --> (SkillEff.sSrcState & enumFSTATE_DIE) 

The sSrcState variable is being and-ed (Well if there's such a word, however this refers to the bitwise AND op) with enumFSTATE_DIE which is declared in the Common lib @ CompCommand.h Line 162, so what's up with it? what's the issue here? I'll tell you in a second but I've to still show that this branch and if that "and operation" succeeds (which is the case and the culprit for the issue), there's a sub-branch @ NetProtocol.cpp from Line 1057 to Line 1060 which handles self-performed skills (I noticed that death is mostly happening on skills like berserk or buffs (self-performed buffs) "skills & not notes or other ways of buffing") there's a death that is being applied on the targeted character and if you follow, this is a client side only effect.


The whole issue is that, sSrcState is not being explicitly initialized, by the time sSrcState is checked (and when the server doesn't send any value for it) there could be anything in that variable, it was never initialized and might trigger that death and might not, depending on whatever garbage value that's left there before C++ taking over it's memory.

 

  • Like 1
  • Thanks 1

Kind regards, AG.

Share this post


Link to post
Share on other sites
10 hours ago, AlGhoul said:

It is indeed a client side issue, I've described it earlier, there:

Anywho, lemme put it in detail this time:
Well, there's a CRC skills check that happens on the client, the CRC is usually performed on the server and the client just merely verifies it and the issue lies in the following statement "sometimes the CRC is not being sent, to be more accurate on some types and/or specific skills", I haven't investigated which skills are exceptions for that, but, I've investigated the CRC check problem (in fact it is a garbage variable problem) and I'll describe it to you now.

In a struct called stNetNotiSkillEffect (I guess the name should ring a bell), there's a variable called SSrcState, to be specific it's defined in NetProtocol.h Line 120, another issue lies here (There's no constructor that initializes any of these variables declared here), Let's trace where that struct is being used:
In NetIF.cpp Line 60, you'll find that SC_CharacterAction (RPC function) is being called to notify the client with actions that are being performed, SC_CharacterAction is defined in PacketCmd_SC.cpp Line 692 (this is quite a big function/procedure, that's quite convenient since it's an RPC & usually they have to handle many different cases), if you scrolled down a bit, you'll find the only case (PacketCmd_SC.cpp  L850) that handles/fills the sSrcState variable is enumACTION_SKILL_TAR (and it does that in a specific sub-branch), here PacketCmd_SC.cpp Line 914, Now with that said, if you scrolled down a bit you'll find a call to NetActorSkillEff with the SSkillInfo struct being passed as the second argument (PacketCmd_SC.cpp Line 975), umm I wonder what that function does... Let's follow.

NetActorSkillEff is defined @ NetProtocol.cpp Line 937, wonderful where's the issue? Check this branch: NetProtocol.cpp from Line 1044 to Line 1066, alright, the issue lies here:
 


if( SkillEff.SSrcEffect.GetCount()>0 || SkillEff.SSrcState.GetCount()>0 || (SkillEff.sSrcState & enumFSTATE_DIE) ) // This is it --> (SkillEff.sSrcState & enumFSTATE_DIE) 

The sSrcState variable is being and-ed (Well if there's such a word, however this refers to the bitwise AND op) with enumFSTATE_DIE which is declared in the Common lib @ CompCommand.h Line 162, so what's up with it? what's the issue here? I'll tell you in a second but I've to still show that this branch and if that "and operation" succeeds (which is the case and the culprit for the issue), there's a sub-branch @ NetProtocol.cpp from Line 1057 to Line 1060 which handles self-performed skills (I noticed that death is mostly happening on skills like berserk or buffs (self-performed buffs) "skills & not notes or other ways of buffing") there's a death that is being applied on the targeted character and if you follow, this is a client side only effect.


The whole issue is that, sSrcState is not being explicitly initialized, by the time sSrcState is checked (and when the server doesn't send any value for it) there could be anything in that variable, it was never initialized and might trigger that death and might not, depending on whatever garbage value that's left there before C++ taking over it's memory.

 

You are a Hero! Thanks ❤️

Share this post


Link to post
Share on other sites
On 11/22/2023 at 6:19 AM, AlGhoul said:

It is indeed a client side issue, I've described it earlier, there:

Anywho, lemme put it in detail this time:
Well, there's a CRC skills check that happens on the client, the CRC is usually performed on the server and the client just merely verifies it and the issue lies in the following statement "sometimes the CRC is not being sent, to be more accurate on some types and/or specific skills", I haven't investigated which skills are exceptions for that, but, I've investigated the CRC check problem (in fact it is a garbage variable problem) and I'll describe it to you now.

In a struct called stNetNotiSkillEffect (I guess the name should ring a bell), there's a variable called SSrcState, to be specific it's defined in NetProtocol.h Line 120, another issue lies here (There's no constructor that initializes any of these variables declared here), Let's trace where that struct is being used:
In NetIF.cpp Line 60, you'll find that SC_CharacterAction (RPC function) is being called to notify the client with actions that are being performed, SC_CharacterAction is defined in PacketCmd_SC.cpp Line 692 (this is quite a big function/procedure, that's quite convenient since it's an RPC & usually they have to handle many different cases), if you scrolled down a bit, you'll find the only case (PacketCmd_SC.cpp  L850) that handles/fills the sSrcState variable is enumACTION_SKILL_TAR (and it does that in a specific sub-branch), here PacketCmd_SC.cpp Line 914, Now with that said, if you scrolled down a bit you'll find a call to NetActorSkillEff with the SSkillInfo struct being passed as the second argument (PacketCmd_SC.cpp Line 975), umm I wonder what that function does... Let's follow.

NetActorSkillEff is defined @ NetProtocol.cpp Line 937, wonderful where's the issue? Check this branch: NetProtocol.cpp from Line 1044 to Line 1066, alright, the issue lies here:
 


if( SkillEff.SSrcEffect.GetCount()>0 || SkillEff.SSrcState.GetCount()>0 || (SkillEff.sSrcState & enumFSTATE_DIE) ) // This is it --> (SkillEff.sSrcState & enumFSTATE_DIE) 

The sSrcState variable is being and-ed (Well if there's such a word, however this refers to the bitwise AND op) with enumFSTATE_DIE which is declared in the Common lib @ CompCommand.h Line 162, so what's up with it? what's the issue here? I'll tell you in a second but I've to still show that this branch and if that "and operation" succeeds (which is the case and the culprit for the issue), there's a sub-branch @ NetProtocol.cpp from Line 1057 to Line 1060 which handles self-performed skills (I noticed that death is mostly happening on skills like berserk or buffs (self-performed buffs) "skills & not notes or other ways of buffing") there's a death that is being applied on the targeted character and if you follow, this is a client side only effect.


The whole issue is that, sSrcState is not being explicitly initialized, by the time sSrcState is checked (and when the server doesn't send any value for it) there could be anything in that variable, it was never initialized and might trigger that death and might not, depending on whatever garbage value that's left there before C++ taking over it's memory.

 

does that mean client is faster than server response? we arent c++ masters/reverse engineers xD, but is it possible to solve it via editing the game.exe I mean reverse engineer it or so? or it have to be fixed in server side.

again I am not pro in reverse engineering but according to my view if we could delay the check until the value is initialized maybe that solve it but i wonder how xD

Edit : i guess could also disable the line that trigger death after reading ur comment mutlipletimes xD could maybe NOP it but again I am not sure iif that is good practice haha

Edit: Solved

Edited by Fisal Moha

Share this post


Link to post
Share on other sites
On 11/27/2023 at 3:11 PM, Fisal Moha said:

does that mean client is faster than server response? we arent c++ masters/reverse engineers xD, but is it possible to solve it via editing the game.exe I mean reverse engineer it or so? or it have to be fixed in server side.

again I am not pro in reverse engineering but according to my view if we could delay the check until the value is initialized maybe that solve it but i wonder how xD

Edit : i guess could also disable the line that trigger death after reading ur comment mutlipletimes xD could maybe NOP it but again I am not sure iif that is good practice haha

Edit: Solved

how  did you fixed?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...