Patch to add fall damage.

Talk about the development of the emulator and related services.
Check out new and upcoming features to be implemented onto the server.
Forum rules
Before posting on this forum, be sure to read the Terms of Use
User avatar
chaoscode
Posts: 202

Re: Attempt to add falldamage to server.

Post#11 » Fri Dec 26, 2014 2:25 am

This is a lot harder then I was thinking. The client changes the speed that it sends packets. So the difference between each packs Z is smaller when falling. when walking it sends 1 packet a second. So the difference between Z is larger. I need to rethink how to detect falling.

Ads
mirko92
Posts: 110

Re: Attempt to add falldamage to server.

Post#12 » Fri Dec 26, 2014 3:00 am

Tesq wrote:
MaxHayman wrote:Good work!

I had a look at this. When teleporting, it would cause you to instantly die. Also doing the damage relative to level isn't a good idea. I did it as a percentage of your maximum health.

Let me know your changes.
i add somethings:

-damage are calculate in %
-if you are mount you get more fall damage
-When you get knock back you never get fall damage even if you fall in a canyon (so fall damage apply only if you go from ground A to ground B with out knock back)
-Being knock back then touch ground---> slide and fall get you take fall damage.
-The fall distance is calculate only from ground A to B never from the knock back. ( if you get KB, fall from 100 m then touch ground and fall for 50 and stop fall, you get 50 m only for the calculation)
-None absorb in game can prevent fall damage nor any invincible morale ( IB one for exemple)

It should be all
hey, i have to add that your don't take any damage even when / if u fall in a canyon after (as a witch elf) u have used the skill that pull you back and set you out of combat( now i search the name)

User avatar
Azarael
Posts: 5332

Re: Attempt to add falldamage to server.

Post#13 » Fri Dec 26, 2014 3:00 am

The WH version is Declare Anathema, and it counts as a knockback against self.

User avatar
chaoscode
Posts: 202

Re: Attempt to add falldamage to server.

Post#14 » Fri Dec 26, 2014 3:02 am

I think I have a solution. I track the time you are falling and if its over 500 millsecond then it applies the damage based on how far you fell between when you started to fall and when you quit falling. If it was a sharp fall then you get damage base on the distence of that sharp fall.

mirko92
Posts: 110

Re: Attempt to add falldamage to server.

Post#15 » Fri Dec 26, 2014 3:15 am

[youtube] https://www.youtube.com/watch?v=N1gY0fqShX0 [/youtube]

in this video you can see what i mean from 3 minutes the ability i mean is setted with "v" on his bar.

mmm with 500 milisecond lag from client can cause issue or not ?

mirko92
Posts: 110

Re: Attempt to add falldamage to server.

Post#16 » Fri Dec 26, 2014 3:22 am

the skill for WE is this - "Agile Escape"

User avatar
chaoscode
Posts: 202

Re: Attempt to add falldamage to server.

Post#17 » Fri Dec 26, 2014 4:05 am

Its not just based on time but time and how far down you go as well.

Londo
Posts: 217

Re: Attempt to add falldamage to server.

Post#18 » Fri Dec 26, 2014 4:19 am

I believe fall damage in war was based on duration of free fall. It's a simple matter of just keeping track of free fall state and duration (one of values in PLAYER_STATE2 indicates if player is in free fall). If free fall was triggered by ability, then give fall damage immunity for 6-7 seconds. (So players punted off a cliff would die when hitting the ground).

1 sec = no damage
2 seconds 20% damage
3 seconds 60% damage
and so on.

Ads
User avatar
chaoscode
Posts: 202

Re: Attempt to add falldamage to server.

Post#19 » Fri Dec 26, 2014 4:50 am

Okay, here it is. I could not find a quick way to check for mounts. If anyone know the forumla , Please let me know.
Londo, if you can prove that I will add it like that but I do not remember it being that easy. Enjoy the patch. I hope to see it addeed .

This is based off your level and the time it took for you land in millsecond divided by the (length of the fall- 200) in millsecond

Code: Select all


Last edited by chaoscode on Thu Jan 01, 2015 4:29 am, edited 2 times in total.

Londo
Posts: 217

Re: Attempt to add falldamage to server.

Post#20 » Fri Dec 26, 2014 5:11 am

Check combat byte in F_PLAYER_STATE2. It will tell you duration of free fall.

Also, there should be immunity to fall damage if triggered by an ability, that immunity should end the moment target hits a wall or exceeds ability duration. I remember getting punted, hitting a wall then when landing taking fall damage.

Ktobs punt was 4-5 seconds of free fall and very high up in the air. Black guard at full hate was even longer but not as high up in the air (The joy of getting punted in nordenwatch all the way out into the sea by a black guard).

Who is online

Users browsing this forum: No registered users and 3 guests