Official Soldat Forums

Server Talk => Scripting Releases => Topic started by: Gizd on May 30, 2010, 09:45:39 am

Title: Damage Display v1.3
Post by: Gizd 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.

(http://img340.imageshack.us/img340/5707/39716044.png)
(http://img3.imageshack.us/img3/289/dd2m.png)
*Column stacking off

(http://img839.imageshack.us/img839/7/dd3.png)
*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.
Title: Re: Damage Display
Post by: Centurion 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.
Title: Re: Damage Display
Post by: Falcon` on May 30, 2010, 09:52:42 am
If no realistic mode then max health is 150
if yes, 65

Idk what if vested
Title: Re: Damage Display
Post by: Gizd on May 30, 2010, 09:58:31 am
I can make it display % of max health but plain damage is less confusing to me.
Title: Re: Damage Display
Post by: DorkeyDear 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.
Title: Re: Damage Display
Post by: DarkCrusade on May 30, 2010, 11:31:09 am
I like it very much, fits any RPG server perfectly!
Title: Re: Damage Display
Post by: DorkeyDear 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).
Title: Re: Damage Display
Post by: Hacktank on May 30, 2010, 03:13:44 pm
Soldat meets Borderlands, nice.
Title: Re: Damage Display
Post by: xmRipper on May 30, 2010, 04:57:54 pm
Woah creative. I really like this one.
Title: Re: Damage Display v1.1
Post by: Gizd 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.
Title: Re: Damage Display v1.1
Post by: L[0ne]R 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.
Title: Re: Damage Display v1.2
Post by: Gizd 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.
Title: Re: Damage Display v1.2
Post by: CheeSeMan. 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
Title: Re: Damage Display v1.2
Post by: Gizd 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).
Title: Re: Damage Display v1.2
Post by: Silnikos 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;
Title: Re: Damage Display v1.2
Post by: dnmr 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
Title: Re: Damage Display v1.2
Post by: Gizd on June 01, 2010, 12:29:10 pm
If weapon is using plain bullet Weapon = GetPlayerStat(Shooter,'primary') so yeah, buggy.
Title: Re: Damage Display v1.2
Post by: VirtualTT 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...
Title: Re: Damage Display v1.2
Post by: DarkCrusade 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..
Title: Re: Damage Display v1.2
Post by: Gizd 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...
Title: Re: Damage Display v1.2
Post by: Serial K!ller on June 02, 2010, 11:34:43 am
Nice script, can be usefull for weapon modding.
But for public's won't that generate much more traffic and possibly lag?
Title: Re: Damage Display v1.2
Post by: Gizd on June 02, 2010, 02:25:52 pm
Nice script, can be usefull for weapon modding.
But for public's won't that generate much more traffic and possibly lag?
I don't know how WorldText affects lag but it shouldn't imo.
Title: Re: Damage Display v1.2
Post by: absoulut1234 on June 03, 2010, 02:01:48 am
ohoh i can;t work it!my deside sever shutdown!!
why?? ???   :-[
Title: Re: Damage Display v1.2
Post by: Furai on June 03, 2010, 02:44:27 am
Maybe wrong server version?

EDIT: That was rhetorical question. :)
Title: Re: Damage Display v1.2
Post by: Hacktank on June 03, 2010, 03:18:07 am
Core Version: 2.7.0
Title: Re: Damage Display v1.2
Post by: absoulut1234 on June 03, 2010, 07:32:23 am
ohoh maybe is core version problems
because my core version is 2.60 :P

so,how can i change my core version?
where can download it or other ways? ???
Title: Re: Damage Display v1.2
Post by: Silnikos on June 03, 2010, 07:42:27 am
The script uses functions from beta server version for Soldat beta 1.5.1. Beta can be found here: http://enesce.com/
Title: Re: Damage Display v1.2
Post by: absoulut1234 on June 03, 2010, 07:49:20 am
i already do it~
but shutdown also@@''
(i only change my script folder,not all of the deside sever 2.70 beta)
Title: Re: Damage Display v1.2
Post by: Gizd on June 03, 2010, 07:55:53 am
i already do it~
but shutdown also@@''
(i only change my script folder,not all of the deside sever 2.70 beta)
You need to update whole server...

I made core version red in hope that people will notice but doesn't work I see.
Title: Re: Damage Display v1.2
Post by: Mercury92 on June 17, 2010, 06:29:16 pm
Gizd youre awesome

I would really love to use is it but >>>
(http://www.upload.ee/image/641871/gizderror.png)
Server uses +15 bots if it says anything.
Title: Re: Damage Display v1.2
Post by: Gizd on June 17, 2010, 11:10:09 pm
Made a debug version(attached to post), it will give more precise info about errors. Also done a small tweak that might fix that issue.
Title: Re: Damage Display v1.2
Post by: Mercury92 on June 18, 2010, 02:05:29 pm
Same stuff.
(http://www.upload.ee/image/643008/gizderror2.png)
Title: Re: Damage Display v1.2
Post by: Gizd on June 18, 2010, 03:02:55 pm
OK, I see where is the problem, thanks(update coming "soon" now).
Title: Re: Damage Display v1.2.2
Post by: frosty on July 11, 2010, 09:16:34 pm
hi, nice script, but ive found a bug, got this as soon as i added to to my server
Code: [Select]
[*]Compiling DamageDisplay -> DD.pas...
[*] DamageDisplay -> [Error] (57:2): Unknown identifier 'WorldText'
[*] Compiling DamageDisplay -> Done in 0.006 secs
Shutting down server...

debug version returns same error
Title: Re: Damage Display v1.2.2
Post by: dnmr on July 11, 2010, 10:10:54 pm
hi, nice script, but ive found a bug, got this as soon as i added to to my server
Code: [Select]
[*]Compiling DamageDisplay -> DD.pas...
[*] DamageDisplay -> [Error] (57:2): Unknown identifier 'WorldText'
[*] Compiling DamageDisplay -> Done in 0.006 secs
Shutting down server...

debug version returns same error
how god dam blind can you get?
Core Version: 2.7.0
Title: Re: Damage Display v1.2.2
Post by: frosty on July 11, 2010, 11:45:28 pm
heh
Title: Re: Damage Display v1.2.2
Post by: xmRipper on July 18, 2010, 09:26:49 pm
Suggestion:
It would be better if newer one is displayed above the previous one when they are on same position.
So we will be able to see the double damage given by the D.Eagles.

Fading text's slowly moving to up is also would be a nice feature.
Title: Re: Damage Display v1.2.2
Post by: Gizd on July 19, 2010, 01:17:18 am
Suggestion:
It would be better if newer one is displayed above the previous one when they are on same position.
So we will be able to see the double damage given by the D.Eagles.
Shall be done.
Fading text's slowly moving to up is also would be a nice feature.
I thought about that but don't want to put fast apponidle in such a script.
Title: Re: Damage Display v1.2.2
Post by: zyxstand on July 19, 2010, 01:24:07 am
i say show health out of 100... it's easier for ppl to process!

also:  PFFT!  i can tell how much health someone has by the blood that runs down their chests!  it's usually very easy to tell how much health someone has just based on that...
Title: Re: Damage Display v1.2.2
Post by: xmRipper on July 19, 2010, 02:01:47 am
(...)
I thought about that but don't want to put fast apponidle in such a script.
I think you already doing that to fade out the text. What about moving it up while reducing the transparency?
Title: Re: Damage Display v1.3
Post by: Gizd on July 19, 2010, 06:51:17 am
(...)
I thought about that but don't want to put fast apponidle in such a script.
I think you already doing that to fade out the text. What about moving it up while reducing the transparency?
I'm not and I'm pretty sure that moving text with 1 Hz frequency won't look good.


Updated to v1.3. Didn't have much time to test it but should work troublelessly.
Title: Re: Damage Display v1.3
Post by: zyxstand on July 19, 2010, 10:37:06 am
yeah you can't really move the text in any reasonable way.
also, aren't there only 10 slots to draw to? meaning you can only have 10 things written/drawn total?  this would restrict this feature not only to having 10 drawn to screen (which isn't that big of a deal) but also, no other scripts are allowed to be installed that use draw functions.
Now the problem comes for hosts who have no idea about programming that there may be compatibility issues between different scripts...
Title: Re: Damage Display v1.3
Post by: xmRipper on July 19, 2010, 11:14:36 am
(...)
I thought about that but don't want to put fast apponidle in such a script.
I think you already doing that to fade out the text. What about moving it up while reducing the transparency?
I'm not and I'm pretty sure that moving text with 1 Hz frequency won't look good.


Updated to v1.3. Didn't have much time to test it but should work troublelessly.
Thank you for update :)
Title: Re: Damage Display v1.3
Post by: Gizd on July 20, 2010, 01:37:26 am
also, aren't there only 10 slots to draw to? meaning you can only have 10 things written/drawn total?  this would restrict this feature not only to having 10 drawn to screen (which isn't that big of a deal) but also, no other scripts are allowed to be installed that use draw functions.
Now the problem comes for hosts who have no idea about programming that there may be compatibility issues between different scripts...
If people will provide information what IDs their scripts use and won't hardcode them everything should be OK.
Title: Re: Damage Display v1.3
Post by: zyxstand on July 20, 2010, 02:05:31 am
also, aren't there only 10 slots to draw to? meaning you can only have 10 things written/drawn total?  this would restrict this feature not only to having 10 drawn to screen (which isn't that big of a deal) but also, no other scripts are allowed to be installed that use draw functions.
Now the problem comes for hosts who have no idea about programming that there may be compatibility issues between different scripts...
If people will provide information what IDs their scripts use and won't hardcode them everything should be OK.

while that may be so (maybe have an .ini file where hosts can change stuff like that), there are still (currently) only 10 slots. i feel like that's way too low for many ideas that would implement it...
Title: Re: Damage Display v1.3
Post by: squareking on November 17, 2010, 02:15:20 pm
Sorry to bump an old thread, and likely in the wrong forum, but is there an interface modification similar to this that isn't server-side? As in, something I can use in all games I play?
Title: Re: Damage Display v1.3
Post by: Furai on November 17, 2010, 02:22:21 pm
Sorry to bump an old thread, and likely in the wrong forum, but is there an interface modification similar to this that isn't server-side? As in, something I can use in all games I play?
Asking for some hackz => wrong forum. There is no modification like this. It's only possible via server-side scripting.
Title: Re: Damage Display v1.3
Post by: squareking on November 17, 2010, 03:11:33 pm

Asking for some hackz => wrong forum. There is no modification like this. It's only possible via server-side scripting.

Weaksauce. Is it really a hack if I just want to display the damage I'm doing? And why isn't it as simple as applying a skin or HUD? I understand that's mostly a matter of swapping image files, but displaying damage isn't that difficult, right? I'm mostly just curious.  :D
Title: Re: Damage Display v1.3
Post by: L[0ne]R on November 17, 2010, 03:39:54 pm

Asking for some hackz => wrong forum. There is no modification like this. It's only possible via server-side scripting.

Weaksauce. Is it really a hack if I just want to display the damage I'm doing? And why isn't it as simple as applying a skin or HUD? I understand that's mostly a matter of swapping image files, but displaying damage isn't that difficult, right? I'm mostly just curious.  :D
Is it cheating? Personally, I don't think so. It doesn't provide any significant advantage.
Is it a hack? Unfortunately yes. Hacking is the only way to get that working client-side, and hacking is illegal.

Displaying damage numbers is nearly impossible client-side simply because such feature does not exist in the game in the first place. So if you want it to work on all servers - you'd have to create the damage display code from scratch and somehow insert it into a closed-source game (and that's basically what hacking is).
Title: Re: Damage Display v1.3
Post by: dnmr on November 18, 2010, 02:11:37 am
there are some gostek mods with healthbars iirc, try looking in the mods section (never used gfx mods myself too much tho, so you're on your own here)

From: November 18, 2010, 02:12:31 am
it's not precise at all though, as there are no client-side damage detection capabilities
Title: Re: Damage Display v1.3
Post by: Gizd on November 18, 2010, 07:55:44 am
there are some gostek mods with healthbars iirc, try looking in the mods section (never used gfx mods myself too much tho, so you're on your own here)
That just uses the blood effect I think.
Title: Re: Damage Display v1.3
Post by: dnmr on November 18, 2010, 08:58:25 am
That just uses the blood effect I think.
yeah, but that's as close as you can get to what he needs without actual hacks :/
Title: Re: Damage Display v1.3
Post by: binarypsycho on September 09, 2011, 05:22:51 am
Hi!
Nice script, I would like to implement it, but it's not working at the moment with 1.6 / 2.7.0.

The server doesn't even start with the script installed.
I've tried to start the server with only this script in scripts folder.

Log Error Entry -
11-09-09 07:17:46 

Thanks in advance for any help!
Bina
Title: Re: Damage Display v1.3
Post by: JotEmI on September 09, 2011, 08:26:52 am
That script was written for old 2.7.0 server, the one that EnEsCe released. It won't work with the new server.
Title: Re: Damage Display v1.3
Post by: binarypsycho on September 09, 2011, 09:15:46 am
Thanks, JotEmI!
Just now I've saw this and understood the full picture -> http://forums.soldat.pl/index.php?topic=39778.0
Damn. =/
Title: Re: Damage Display v1.3
Post by: xmRipper on September 13, 2011, 04:04:04 pm
Too bad new 1.6 server does not support EnEsCe's new awesome scripting features.
Title: Re: Damage Display v1.3
Post by: Falcon` on October 09, 2011, 03:01:51 am
You can't even read 3 previous posts, can you?
Title: Re: Damage Display v1.3
Post by: dnmr on October 09, 2011, 05:11:53 am
That script was written for old 2.7.0 server, the one that EnEsCe released. It won't work with the new server.

Hmm. I would like the author to make a script for newer versions of the soldat 2D.  :)
it won't work because it's not possible to make this script for new server. It does not have the required functionality
Title: Re: Damage Display v1.3
Post by: Mexer on February 07, 2012, 02:16:16 pm
I wonder if you can do this for the medics, so if you're healing someone , both will see a + sign over the wounded person's head
Title: Re: Damage Display v1.3
Post by: TheOne on February 07, 2012, 02:52:35 pm
Only with WriteConsole or DrawText. WorldText isn't included.
Title: Re: Damage Display v1.3
Post by: Tehbugerz0r on February 08, 2012, 01:15:46 am
I'd kill to have these functions back. Perhaps someone should try and hack into EnEsCe's computer  :-X.
Until then though, I think they should lock or even delete topics that have these functions to prevent further confusion.
Title: Re: Damage Display v1.3
Post by: machina on February 08, 2012, 05:16:30 am
Let me make that nabby question: How can I get it on my Soldat? Never before used something like this, so I don't know how to install it...

Btw. I want it on my Soldat - not server! Is it even possible?
Title: Re: Damage Display v1.3
Post by: Tehbugerz0r on February 08, 2012, 10:39:39 am
Let me make that nabby question: How can I get it on my Soldat? Never before used something like this, so I don't know how to install it...


Read some of the last posts before you make yours, it's very clear that this isn't possible anymore from them.

Btw. I want it on my Soldat - not server! Is it even possible?

If you mean the server that you start in soldat, it's only possible by hacking (which is a bad idea in general), if you mean in any server then it's impossible (not to mention that would be cheating).
Title: Re: Damage Display v1.3
Post by: machina on February 08, 2012, 02:40:45 pm
That's not cool :|
Title: Re: Damage Display v1.3
Post by: soldat-game on December 10, 2017, 01:39:19 pm
Leo he asked me for such a script so I decided to fix it :)
* Fix to work on 2.8.1+ servers
* Fix bug if player is healing using -Damage
+ New atribute in config section:
   FullOpacity = 140; //Specifies the level at which the display should start (~120 is 100% opacity), if the value is greater than 120, you will increase the time of the text.
   DecraseOpacity = 0.8; //Decrease text transparency in precent
   deoptick = 2; //The frequency of decrease (60 = 1s)

I was wondering to add that the hit gives bigger text, which decreases to the normal size. but I did not want to.
Title: Re: Damage Display v1.3
Post by: Leo on December 10, 2017, 01:42:14 pm
Many thanks ;)
Title: Re: Damage Display v1.3
Post by: soldat-game on December 10, 2017, 02:39:52 pm
1.5:
- Change text now be -NUM%
- Remove RealDamage in settings and add    DamageDisplay = 2;   //0 - show real damage 2 - percentage of max health 3 - old orginal convert method
Title: Re: Damage Display v1.3
Post by: KoGAi on December 27, 2017, 10:56:47 pm
Interesting, I was really looking forward to trying this on our servers, however I'm getting the following error when compiling it: "Script's sandbox level denied by global config."
Do you know what it might mean? I've tried different setups to no avail. Thanks! :)
EDIT: I figured it out, I changed a setting in the server.ini file. Now I'm trying to find out how to make the size of the text smaller, cause neither WT_Size nor WT_Style seem to be having any effect on the font. :\
Title: Re: Damage Display v1.3
Post by: soldat-game on December 28, 2017, 09:37:47 am
Interesting, I was really looking forward to trying this on our servers, however I'm getting the following error when compiling it: "Script's sandbox level denied by global config."
Do you know what it might mean? I've tried different setups to no avail. Thanks! :)
EDIT: I figured it out, I changed a setting in the server.ini file. Now I'm trying to find out how to make the size of the text smaller, cause neither WT_Size nor WT_Style seem to be having any effect on the font. :\
Work .. WT_Size = 0.06; set to WT_Size = 0.03; or set to WT_Size = 0.04;
Title: Re: Damage Display v1.3
Post by: soldat-game on September 11, 2020, 07:52:47 am
v.1.6:
- Smooth transition removed. (Less latency, on low end machines, dont use event OnClockTick)
- Fully support script core 3.
- Settings improved and removed not used.