Last dmg

Bugs found for osProse project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

Last dmg

Postby XxXshidoXxX on Tue Jun 23, 2009 3:27 pm

well , i were walking in luna and killing some wolf and i noticed that sometimes when you finish the mob , you reciveve a freaking high damage from something ( i guess its the monster )

Lets make it clear :

1) I see a wolf

2) atk him ( no problems here )

3) Wolf is dead ( at least that's what the game shows us )

4) I recieve a last damage and its over ( damage is recieved after the monster dead animation and it seems to be a bigger dmg than normal wolf's hits )


Please notice it doesn't happen all the time but when it happen it makes me crazy :D
I've take a look at the code but i can't find what's wrong ( maybe Synchro? )
My collection ( Tools, clients sources...)
https://mega.nz/#F!AdcFnQDL!sKp3O9tWGGdWvLEj_EYfwA
osrose mobile project
viewtopic.php?f=34&t=5787
OsRose Mobile development + Titan Rose redesign
https://github.com/shid0x
XxXshidoXxX
osiRose dev
osiRose dev
 
Posts: 445
Joined: Mon Aug 27, 2007 11:44 am

Re: Last dmg

Postby PurpleYouko on Tue Jun 23, 2009 3:39 pm

Synchro would definitely get my vote.

Timings are absolutely terrible in the servers.

Ever notice that you often get attacks that do double damage without a CRITICAL showing up?
That's attack timing.
The client moves at a certain attack rate and the server moves at a certain attack rate. They are rarely the same.
When the client attacks faster, the damage packets compound at the client so if you send two attack packets between any two client side attack animations, you get double damage.
If you send them too slow you get a MISS because the client has no damage to apply when it wants to display an attack.

Same thing at the end of a battle. You might think it's all over but there are still packets of damage that haven't been applied yet :lol:
All teh remaining damage gets added together and BAM you get a massive hit.

I've done some tests on this and even built in a bunch of new configs for attack timings (not in osprose yet). I can easily modify the attack packet speed from GM commands then test combat with various weapons. It's pretty easy then to make it work for any one weapon but as soon as you switch to something else it screws up again. For example i can get it so that i can empty a 999 clip of bullets into a monster and get exactly the same amount left at client and server after the battle is over (use a low level char and a christmas tree to test. They are huge and don't fight back)
Then switch to katars and watch it MISS, on every third hit because the attacks are at the wrong speed.

It's going to take a lot of work to get it all synchronized for every weapon
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Last dmg

Postby XxXshidoXxX on Tue Jun 23, 2009 3:52 pm

Thanks for the answer , i were afraid of something like that :s

it should be the same with osrose too , maybe lmame have an idea ?
My collection ( Tools, clients sources...)
https://mega.nz/#F!AdcFnQDL!sKp3O9tWGGdWvLEj_EYfwA
osrose mobile project
viewtopic.php?f=34&t=5787
OsRose Mobile development + Titan Rose redesign
https://github.com/shid0x
XxXshidoXxX
osiRose dev
osiRose dev
 
Posts: 445
Joined: Mon Aug 27, 2007 11:44 am

Re: Last dmg

Postby Bapao on Tue Jun 23, 2009 5:06 pm

PurpleYouko wrote:Synchro would definitely get my vote.

Timings are absolutely terrible in the servers.

Ever notice that you often get attacks that do double damage without a CRITICAL showing up?
That's attack timing.
The client moves at a certain attack rate and the server moves at a certain attack rate. They are rarely the same.
When the client attacks faster, the damage packets compound at the client so if you send two attack packets between any two client side attack animations, you get double damage.
If you send them too slow you get a MISS because the client has no damage to apply when it wants to display an attack.

Same thing at the end of a battle. You might think it's all over but there are still packets of damage that haven't been applied yet :lol:
All teh remaining damage gets added together and BAM you get a massive hit.

I've done some tests on this and even built in a bunch of new configs for attack timings (not in osprose yet). I can easily modify the attack packet speed from GM commands then test combat with various weapons. It's pretty easy then to make it work for any one weapon but as soon as you switch to something else it screws up again. For example i can get it so that i can empty a 999 clip of bullets into a monster and get exactly the same amount left at client and server after the battle is over (use a low level char and a christmas tree to test. They are huge and don't fight back)
Then switch to katars and watch it MISS, on every third hit because the attacks are at the wrong speed.

It's going to take a lot of work to get it all synchronized for every weapon

Couldn't you calculate it the same way the client does? Probably by using the current aspd value of the characters stats?

EDIT: Or are you saying that the aspd calculation is flawed?
Bapao
Jelly Bean
Jelly Bean
 
Posts: 26
Joined: Sat Oct 18, 2008 5:11 pm

Re: Last dmg

Postby lmame on Tue Jun 23, 2009 6:49 pm

XxXshidoXxX wrote:Thanks for the answer , i were afraid of something like that :s

it should be the same with osrose too , maybe lmame have an idea ?


I don't know, honnestly. I do know there are some weird "monster stay alive client side" or "monster follow you server side, but not client side" so those are due to bad "packets" (?) and problems with AIP timings.
Though to solve this I wanted to get some free time, like I did for Union Wars.
The world is full of love and peace ^_^
Image
User avatar
lmame
Admin
Admin
 
Posts: 8997
Joined: Mon Aug 06, 2007 4:42 pm
Location: July City

Re: Last dmg

Postby PurpleYouko on Tue Jun 23, 2009 7:35 pm

Couldn't you calculate it the same way the client does? Probably by using the current aspd value of the characters stats?

EDIT: Or are you saying that the aspd calculation is flawed?


yes we could do that and that is exactly how we probably will end up doing it.

However it's a bit more complicated than that.

It seems that the actual attack speed is the the aspd calculation (which we have matched perfectly between server and client) multiplied by some factor relates to the weapon you are using.
I have no idea what that factor is but I can find it by trial and error on a weapon by weapon basis. I can say for definite that this factor is different for the few weapons that i tried it with but I'm not sure if it is uniform for all guns or for all spears and so on. that needs more tests.
The factor is something like 1.65 for the beretta that i tested with and 1.3 for a wooden sword.

Basically i set the factor with a GM command then go beet up a really big monster (Christmas tree) then count the attacks on server (automated) and client (manual)
When they match after 100 attacks then I have the factor correct. :lol:
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Last dmg

Postby XxXshidoXxX on Mon Jul 06, 2009 12:54 pm

Ok , here is a temporal fix for people who uses osprose for there servers :

Monsterstats.ccp

  1. unsigned int CMonster::GetCritical( )
  2. {
  3.     return 0;  //60 = 20% of 300 our critical probability
  4. }
  5.  


first find the original code where the only difference is the 0 ( before it was 60 )
I put it to 0 because ( its personal )i think the critical way is totally wrong .

then find :
  1.  
  2. // Get Monster atk speed
  3. unsigned int CMonster::GetAttackSpeed( )
  4. {
  5.     unsigned int aspeed = (unsigned int)thisnpc->atkspeed ;


replace for :

  1. // Get Monster atk speed
  2. unsigned int CMonster::GetAttackSpeed( )
  3. {
  4.     unsigned int aspeed = (unsigned int)(thisnpc->atkspeed / 2 );


ok , ok the way its done can seems to be wierd , but in fact its kinda good , here i reduce the monster atk speed by 2 ( server side ) ( this doesn't affect damage or miss the player get ) but it fix the wierd damage you take during a battle , with this fix you take the same dmg evry time ( 17 , 18 , 19 , 17 )
before it was ( 17 , 32 , 17 , 56 , 17 )

ok so this is not the perfect solution , but trust me your players will like it because they will have a normal fight .

I tested from lvl 1 to 30 with it , seems ok





pd : personal again , i think the monster dmg are too high i suggest you to have monsterdmg=20
( wierd at start but good after some lvls )

should work with osrose too .
My collection ( Tools, clients sources...)
https://mega.nz/#F!AdcFnQDL!sKp3O9tWGGdWvLEj_EYfwA
osrose mobile project
viewtopic.php?f=34&t=5787
OsRose Mobile development + Titan Rose redesign
https://github.com/shid0x
XxXshidoXxX
osiRose dev
osiRose dev
 
Posts: 445
Joined: Mon Aug 27, 2007 11:44 am

Re: Last dmg

Postby T-Grave on Tue Jul 14, 2009 10:21 pm

That is kind of weird, since client and server attackspeed will differ, which might lead to new bugs :p
T-Grave
osiRose dev
osiRose dev
 
Posts: 211
Joined: Sun Jun 07, 2009 2:06 pm
Location: Belgium

Re: Last dmg

Postby PurpleYouko on Wed Jul 15, 2009 1:56 pm

Wouldn't the monsters tend to miss a lot and not really do the damage that they should?
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: Last dmg

Postby XxXshidoXxX on Wed Jul 15, 2009 3:28 pm

Wouldn't the monsters tend to miss a lot and not really do the damage that they should?


I don't know for the dmg ( because its been a long time since i played an official pre evo server ^^ )
But for the miss i was surprised too but it doesn't affect it .

which might lead to new bugs :p


well i haven't noticed any new bugg , a few last dmg bugg but less than before , anyways this bugg will be fixed because ''we'' (i guess ) will leak the new osrose rev fix that send a ''suicide packet''
My collection ( Tools, clients sources...)
https://mega.nz/#F!AdcFnQDL!sKp3O9tWGGdWvLEj_EYfwA
osrose mobile project
viewtopic.php?f=34&t=5787
OsRose Mobile development + Titan Rose redesign
https://github.com/shid0x
XxXshidoXxX
osiRose dev
osiRose dev
 
Posts: 445
Joined: Mon Aug 27, 2007 11:44 am

Next

Return to Bugs

Who is online

Users browsing this forum: No registered users and 3 guests