[CSGO] Floating Damage Numbers

Release your plugins here!
User avatar
VinciT
Senior Member
Posts: 175
Joined: Thu Dec 18, 2014 2:41 am

[CSGO] Floating Damage Numbers

Postby VinciT » Wed Aug 08, 2018 11:06 pm

Image
This plugin adds damage numbers / combat text commonly seen in RPG games to your server. The numbers can only be seen by the player who did the damage.
Currently it only works in CS:GO, as that's the only game with the point_worldtext entity. I'm looking into using different methods (env_sprite, point_message) for creating the numbers in other games.
Image

Image ImageImage

How to install:

  1. Install Source.Python.
  2. Download the latest release of Floating Damage Numbers from the bottom of this post or GitHub.
  3. Extract the files into your game server's root folder (../csgo/).
  4. Add sp plugin load fdn to your autoexec file (../csgo/cfg/autoexec.cfg).
  5. Restart your server.
Image
If you find any bugs or have a feature request, don't hesitate to make a post here or on GitHub.


Changelog
v1.1.2
  • Fixed a bug that caused more than one decoy to spawn when calling FloatingNumber.world_damage().
  • Fixed incorrect angles being set for FloatingNumber entities without a decoy.
Image
v1.1
  • Added a way to display damage caused by the world.
    Set fdn_world_damage to 1 through the server console or the config file (..csgo/cfg/source-python/fdn/) in order to enable this feature.
Image
v1.0
  • Initial release of the plugin.


Image
Latest release
fdn_v1.1.2.zip
(8.05 KiB) Downloaded 185 times

Older releases
fdn_v1.1.zip
(7.95 KiB) Downloaded 209 times
fdn_v1.0.zip
(6.29 KiB) Downloaded 558 times
Last edited by VinciT on Wed Apr 22, 2020 4:50 am, edited 2 times in total.
decompile
Senior Member
Posts: 375
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: [CSGO] Floating Damage Numbers

Postby decompile » Thu Aug 09, 2018 12:52 am

Awesome Plugin!

Reminds me heavily from fortnite. :)
User avatar
satoon101
Project Leader
Posts: 2616
Joined: Sat Jul 07, 2012 1:59 am

Re: [CSGO] Floating Damage Numbers

Postby satoon101 » Thu Aug 09, 2018 3:49 am

Really cool plugin! Very interesting way of going about it. Nice work!
Image
User avatar
VinciT
Senior Member
Posts: 175
Joined: Thu Dec 18, 2014 2:41 am

Re: [CSGO] Floating Damage Numbers

Postby VinciT » Thu Aug 09, 2018 4:44 pm

Thanks guys!

decompile wrote:Reminds me heavily from fortnite. :)
That's basically why I started working on this. Been playing Fortnite a lot lately.
User avatar
BackRaw
Senior Member
Posts: 537
Joined: Sun Jul 15, 2012 1:46 am
Location: Germany
Contact:

Re: [CSGO] Floating Damage Numbers

Postby BackRaw » Sun Aug 12, 2018 12:13 am

Nice one!
User avatar
Doldol
Senior Member
Posts: 195
Joined: Sat Jul 07, 2012 7:09 pm
Location: Belgium

Re: [CSGO] Floating Damage Numbers

Postby Doldol » Thu Aug 16, 2018 4:04 am

That actually looks really neat
User avatar
zloykif
Junior Member
Posts: 3
Joined: Tue Aug 14, 2012 5:09 am

Re: [CSGO] Floating Damage Numbers

Postby zloykif » Tue Apr 14, 2020 7:54 am

Its possible, add showing damage (for all) from envirement\falling damage etc? For deathrun server
User avatar
VinciT
Senior Member
Posts: 175
Joined: Thu Dec 18, 2014 2:41 am

Re: [CSGO] Floating Damage Numbers

Postby VinciT » Wed Apr 15, 2020 4:51 am

zloykif wrote:Its possible, add showing damage (for all) from envirement\falling damage etc? For deathrun server
Sure thing. I'll try to add it in later today or tomorrow.
ImageImageImageImageImage
User avatar
zloykif
Junior Member
Posts: 3
Joined: Tue Aug 14, 2012 5:09 am

Re: [CSGO] Floating Damage Numbers

Postby zloykif » Thu Apr 16, 2020 8:38 pm

Did not work out? T_T
User avatar
VinciT
Senior Member
Posts: 175
Joined: Thu Dec 18, 2014 2:41 am

Re: [CSGO] Floating Damage Numbers

Postby VinciT » Fri Apr 17, 2020 4:22 am

Image

Added a way to create damage numbers for damage caused by the world (falling, drowning).
To enable this feature, load the latest version of the plugin on your server once to first generate the config file.
After doing that, head over to ../csgo/cfg/source-python/fdn/config.cfg and set fdn_world_damage to 1.
Reload the plugin and you should be seeing damage numbers appear when a player takes damage from the world.

zloykif wrote:Did not work out? T_T
Sorry for making you wait. Couldn't decide on how I wanted to implement this for a while.
Download the latest release and give it a shot, tell me if you encounter any bugs.
ImageImageImageImageImage
User avatar
zloykif
Junior Member
Posts: 3
Joined: Tue Aug 14, 2012 5:09 am

Re: [CSGO] Floating Damage Numbers

Postby zloykif » Fri Apr 17, 2020 6:20 am

Thank you ^_^ I will inform about bugs, first 10 min works fine
User avatar
L'In20Cible
Project Leader
Posts: 1331
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: [CSGO] Floating Damage Numbers

Postby L'In20Cible » Fri Apr 17, 2020 6:37 am

VinciT wrote:tell me if you encounter any bugs.

No bugs, since I didn't test, but here are some suggestions after hovering the code:


VinciT wrote:

Syntax: Select all

OFFSET_DUCK = Vector(0, 0, 54)
OFFSET_STAND = Vector(0, 0, 70)

I would recommend something more dynamic, perhaps:

Syntax: Select all

pl.maxs.z + (10 * pl.model_scale)



VinciT wrote:

Syntax: Select all

if angle:

I generally think this is bad practice and should be explicitly tested against is not None: instead because it can cause unexpected results and remove flexibility (take for example, the builtin logging module that suffers from this).


VinciT wrote:

Syntax: Select all

if 'BOT' in player_a.steamid or player_a.is_fake_client():

Player.is_bot()


VinciT wrote:

Syntax: Select all

# Offset for CBaseCombatCharacter::IsInFieldOfView(const Vector &pos).
IS_IN_FIELD_OF_VIEW_OFFSET = 273 if PLATFORM == 'windows' else 274

Why not make a PR? You could then remove your PlayerFDN class entirely, and updating would be automated by pushing the new offset to SP's repo (assuming the servers that use your plugin have auto_data_update set to True). :smile:


VinciT wrote:

Syntax: Select all

class PlayerFDN(Player):
def __init__(self, index, caching=True):
super().__init__(index, caching)

Could simply be:

Syntax: Select all

class PlayerFDN(Player):
caching = True
User avatar
VinciT
Senior Member
Posts: 175
Joined: Thu Dec 18, 2014 2:41 am

Re: [CSGO] Floating Damage Numbers

Postby VinciT » Fri Apr 17, 2020 5:23 pm

zloykif wrote:Thank you ^_^ I will inform about bugs, first 10 min works fine
Good! :grin:

L'In20Cible, my man.. I love it when you give me suggestions! I'll update the code later tonight.
L'In20Cible wrote:Why not make a PR? You could then remove your PlayerFDN class entirely, and updating would be automated by pushing the new offset to SP's repo (assuming the servers that use your plugin have auto_data_update set to True). :smile:
Usually I try to do this, but I was trying to add in zloykif's request as soon as possible. Guess I'll go make that pull request now.
ImageImageImageImageImage
User avatar
VinciT
Senior Member
Posts: 175
Joined: Thu Dec 18, 2014 2:41 am

Re: [CSGO] Floating Damage Numbers

Postby VinciT » Wed Apr 22, 2020 4:51 am

Image

If you're running the plugin with fdn_world_damage set to 1, I suggest you update as soon as possible. There is a small typo in the 1.1 release which might've caused some performance issues (depending on how many players were on the server). And of course as soon as you fix one bug, another one pops up, which led to the fixing of incorrect angles being set for damage numbers created by world damage.

Additionally, most of the suggestions made by L'In20Cible have been implemented, so there's that as well.
ImageImageImageImageImage

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 2 guests