Author Topic: Damage Display v1.3  (Read 15703 times)

0 Members and 1 Guest are viewing this topic.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Damage Display v1.3
« on: May 30, 2010, 09:45:39 am »
Script Name: Damage Display
Version: 1.3
Script Description Displays damage dealt as numbers on the map.
Author: Gizd
Core Version: 2.7.0

Full Description:
On hit there's a number appearing showing damage dealt. New number is less transparent than old ones.
Max 10(if set so) numbers at once.
You can set range of WorldText layers( i.e. from 5 to 8 ), size of text, style etc etc etc(just everything you'd need).
Selfdamage is yellow, dealt to enemy - red, dealt to allies - green.



*Column stacking off


*Column stacking on

Players also know when they hit and when they don't.

Changelog:
1.0 -> 1.1

- Added real damage and percentage of max health options(screenshot #2)
- Damage from multiple hits stacks so you can read it clearly and eats 2 number slots max(screenshot #2)
- Commented settings on the top of script

1.1 -> 1.2
- Fixed black 0 appearing in the middle of map after respawn
- Added text fading

1.2 -> 1.2.2
- Fixes you wouldn't understand anyway

1.2.2 -> 1.3
- Fixed damage display after recompiling by command
- Added limiting damage to victim's health
- Added column stacking

Please report any problems with this script.
« Last Edit: July 19, 2010, 06:56:23 am by Gizd »

Offline Centurion

  • Flagrunner
  • ****
  • Posts: 699
Re: Damage Display
« Reply #1 on: May 30, 2010, 09:50:00 am »
Cool script. I've always wondered how much health soldiers have.
Since barrett kills with one shot and one shot damage is 495 then it must be below that.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: Damage Display
« Reply #2 on: May 30, 2010, 09:52:42 am »
If no realistic mode then max health is 150
if yes, 65

Idk what if vested
« Last Edit: May 30, 2010, 09:58:21 am by FalconPL »
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Damage Display
« Reply #3 on: May 30, 2010, 09:58:31 am »
I can make it display % of max health but plain damage is less confusing to me.

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1506
  • Also known as Curt
    • Soldat Global Account System
Re: Damage Display
« Reply #4 on: May 30, 2010, 11:02:45 am »
It may be best to have an option of how to display it, as a percent, or real damage. Some people are completely unaware how much heath a player has (whether or not it is realistic) and would prefer percent (I suggest without the % sign though), while others may find it confusing. If you really wanted to make this complicated, you could make a per-user choice, and save settings based on TagID / IP / Name :P but I don't think anybody expects that. GJ tho.
Soldat Global Account System (SGAS): QuakeNet in #soldat.sgas
Rent Cheap Servers: contact CurryWurst

DarkCrusade

  • Guest
Re: Damage Display
« Reply #5 on: May 30, 2010, 11:31:09 am »
I like it very much, fits any RPG server perfectly!

Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1506
  • Also known as Curt
    • Soldat Global Account System
Re: Damage Display
« Reply #6 on: May 30, 2010, 01:07:53 pm »
It may be possible to add tricks to make more than 10 numbers shown... Have a variable for X,Y for every one in an array[1..10] (or 0..9) or something, and on do damage, if the distance between that damage and that text is < some constant, edit that text instead; I haven't actually viewed this script so I'm not sure how it works when it comes to removal of the numbers, but you may need timing variables in there as well so it knows when to remove the numbers (if you remove the numbers after so much time).
Soldat Global Account System (SGAS): QuakeNet in #soldat.sgas
Rent Cheap Servers: contact CurryWurst

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Re: Damage Display
« Reply #7 on: May 30, 2010, 03:13:44 pm »
Soldat meets Borderlands, nice.


Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Macellan
Re: Damage Display
« Reply #8 on: May 30, 2010, 04:57:54 pm »
Woah creative. I really like this one.
CoFounder / CTO @ Macellan
Founder Turkish Soldat Community

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Damage Display v1.1
« Reply #9 on: May 31, 2010, 11:53:59 am »
Soldat meets Borderlands, nice.
I got inspired by Team Fortress 2 actually.

Here comes the update! I see you like the idea so I'm going to work on it more. More improvements coming soon.

Offline L[0ne]R

  • Soldat Beta Team
  • Rainbow Warrior
  • ******
  • Posts: 2078
  • need a life. looking for donors.
Re: Damage Display v1.1
« Reply #10 on: May 31, 2010, 01:32:33 pm »
Hehe, nice. I love that new addition to scriptcore. More and more interesting scripts are starting to pop up. Good job.


L[one]R, INF veteran
maps - remakes: inf_Warehouse ; inf_Fortress ; inf_(Sun)Rise ; inf_Outpost ; inf_Abel ; inf_Moonshine

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Damage Display v1.2
« Reply #11 on: June 01, 2010, 08:29:07 am »
Here's the next update. After some struggling with problems I like to solve and having fun with binary numbers. I'm out of ideas so if there are no bugs it should stay at v1.2.

Offline CheeSeMan.

  • Flagrunner
  • ****
  • Posts: 728
  • WOOT SLIPPERY PICKLES
Re: Damage Display v1.2
« Reply #12 on: June 01, 2010, 08:54:20 am »
would it be possible for the script to detect if someone was dealing too much damage? eg using damage modifier hacks and kick them from the server? I know it depends a lot on range and such, but when someone is doing a 1 hit rugar kill for example :/ ?

I'm sure some scripters could come up with some nifty ideas to defeat a few hacks! Get on it! :DDD
Banana Banging since summer 2008!     
cB. Cheeky Bananas                
#CheekyB.Soldat

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Damage Display v1.2
« Reply #13 on: June 01, 2010, 08:57:21 am »
would it be possible for the script to detect if someone was dealing too much damage? eg using damage modifier hacks and kick them from the server? I know it depends a lot on range and such, but when someone is doing a 1 hit rugar kill for example :/ ?

I'm sure some scripters could come up with some nifty ideas to defeat a few hacks! Get on it! :DDD
Not possible, there are just too many things that might affect damage(or weapon recognition).

Offline Silnikos

  • Soldier
  • **
  • Posts: 129
Re: Damage Display v1.2
« Reply #14 on: June 01, 2010, 09:39:16 am »
would it be possible for the script to detect if someone was dealing too much damage? eg using damage modifier hacks and kick them from the server? I know it depends a lot on range and such, but when someone is doing a 1 hit rugar kill for example :/ ?

I'm sure some scripters could come up with some nifty ideas to defeat a few hacks! Get on it! :DDD
Not possible, there are just too many things that might affect damage(or weapon recognition).
Why do you think so? Isn't checking the weapon and collating damage with some maximum amounts in OnPlayerDamage enough?

Let's say we pick up a ruger, then we shoot a headshot from really close distance - let's say dmg was 110. We add some just to be sure.

Code: [Select]
const
max_ruger = 130;

function OnPlayerDamage(Victim,Shooter: Byte;Damage: Integer;Weapon: Byte) : integer
begin
if Weapon = 6 and Damage > max_ruger then BanPlayer(Shooter,0,'Hacks');
end;
« Last Edit: June 01, 2010, 09:42:57 am by Silnikos »

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: Damage Display v1.2
« Reply #15 on: June 01, 2010, 09:45:25 am »
you should be able to approximate it pretty precisely. Also, the new parameter in onplayerdamage should help recognizing the weapon. But that sounds like a separate script already

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Damage Display v1.2
« Reply #16 on: June 01, 2010, 12:29:10 pm »
If weapon is using plain bullet Weapon = GetPlayerStat(Shooter,'primary') so yeah, buggy.

Offline VirtualTT

  • Veteran
  • *****
  • Posts: 1026
  • Movin' heaven and earth
    • Soldat and not Soldat related blog...
Re: Damage Display v1.2
« Reply #17 on: June 01, 2010, 12:49:59 pm »
Nice script, though it's a bit useless the way it is.
I'm planning to use the same concept in my medic script.

Also i think checking of the maximum damage value is already implemented in soldat itself - basic anti-cheat protection...

DarkCrusade

  • Guest
Re: Damage Display v1.2
« Reply #18 on: June 01, 2010, 02:50:12 pm »
Also i think checking of the maximum damage value is already implemented in soldat itself - basic anti-cheat protection...

Nope..

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: Damage Display v1.2
« Reply #19 on: June 02, 2010, 04:10:56 am »
Nice script, though it's a bit useless the way it is.
Players can estimate how much health enemy has left or what part of body they hit... and that's quite it...