Page 3 of 6

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Sun Apr 16, 2017 3:29 pm
by Lord Misfit
While it's a nice addon and a good template for ZScript learning with this kind of thing, I was wondering if damage indicators for the player [like maybe on-screen/HUD indicators ala DoomRPG/Aetherius/Wrath of Cronos] were possible to do in this?

Also, in the future, would this be able to work with "healing" elements in the rare situation that happens to a monster? :o

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Sun Apr 16, 2017 8:33 pm
by kadu522
Lord Misfit wrote:While it's a nice addon and a good template for ZScript learning with this kind of thing, I was wondering if damage indicators for the player [like maybe on-screen/HUD indicators ala DoomRPG/Aetherius/Wrath of Cronos] were possible to do in this?

Also, in the future, would this be able to work with "healing" elements in the rare situation that happens to a monster? :o


I asume is preaty easy to do.

Just detect that a heal has bean done and change the color acordingly(Defalt Grean mostly).
If you want to take a step futher you could allow individual constumisation for healing and damage as well!

as for hud however the hard part in inplementing it on a non-intrusive maner, DoomRPG got the right idea of concentrating them on the botton part of the screen so that your area of vision is not "Number Cloged"; it is also a good candidate for constumisation itself.

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Mon Apr 17, 2017 3:55 am
by ZZYZX
For some reason the numbers don't spawn when monsters explode in Doom4Doom. They do with regular damage (non-xdeath).
I first thought they are just not visible in the blood mess, but then I just typed freeze and apparently there are actually no numbers :(

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Mon Apr 17, 2017 2:07 pm
by Tekish
I tried this out yesterday and now I use this with everything - nice work. There are two issues I've noticed:

- More resilient enemies that move toward you while taking damage can block the numbers with their own sprites.
- When the game auto-kills a lost soul from a pain elemental, it displays 99999 damage. I'm not sure if this is intended behavior (because I guess the game is doing that much damage to kill the lost soul), but it can get a bit spammy when a lot of pain elementals are confined to a small area.

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Mon Apr 17, 2017 3:58 pm
by Enjay
Tekish wrote:- When the game auto-kills a lost soul from a pain elemental, it displays 99999 damage. I'm not sure if this is intended behavior (because I guess the game is doing that much damage to kill the lost soul), but it can get a bit spammy when a lot of pain elementals are confined to a small area.

If you hit an enemy with the MDK console command, the same thing happens - but I quite like it. :P

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Fri Apr 21, 2017 7:49 am
by Major Cooke
The max limit for the numbers is 99999. That's the highest it can go.

@Xaser: Made a pull request. This fixes the issue ZZYZX mentioned and also cleans things up a bit.

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Fri Apr 21, 2017 12:58 pm
by Xaser
I'm planning on extending the number of digits eventually. Right now I'm using some TEXTURES voodoo to offset all the numbers (that way they look correct from all angles), but the definitions are pretty tedious. There's a suggestion for an A_SpriteOffset function that Graf is planning on taking a look at after 3.0's release. Failing that, I'll write a script to generate the TEXTURES lump so definitions of new fonts doesn't totally suck; I'll probably bump the max digit count way up at that point.

Either way, for the Lost Souls, there's not a super-easy way to detect for that case since A_PainAttack (well, its scripted sub-function A_PainShootSkull) is just dealing a million damage with DamageType 'None'. So, uh... "it's a feature," I guess. It's not like it's incorrect. :P

@Major Cooke: thanks for the PR! It's hella good seeing Git working as intended for mod development. :D

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Fri Apr 21, 2017 8:03 pm
by Major Cooke
Be warned: When you set a name for a thinker, you better stick with it. I just discovered the hard way that by changing DamageKeeper's name, it broke my saved games.

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Sat Apr 22, 2017 12:06 am
by Xaser
I wouldn't hold my breath on any savegames working between mod updates, for any mod, frankly. It's a rather rare occurrence when it does.

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Sat Apr 22, 2017 10:55 am
by ZZYZX
And that's why GZDoom should maintain checksum of ZScript classes between savegames. I've opened a ticket at the tracker, Graf closed it instantly and said "it's not needed because we've been here for decades without it and it works".

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Wed Apr 26, 2017 7:19 am
by Major Cooke
Is there a reason why you're using floats instead of doubles?

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Wed Apr 26, 2017 10:10 am
by Xaser
If you see something that looks incorrect, please point it out as "hey this looks wrong," not "why did you do 'x'?" The latter wastes time and brain cells.

Related, though: I was under the impression that "float" aliased to "double" in ZScript -- though according to Graf here, it looks like the answer is "sometimes," which is really weird on the surface. I'm guessing this was a case of being forced to support single-precision for compatibility or somesuch.

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Wed Apr 26, 2017 4:27 pm
by Major Cooke
The reason I didn't say it's wrong is because of just that. I thought you had a particular use case for floats and wanted to know. That wasn't a trick question.

But now that we're on that channel with your response, floats only truly mean doubles in DECORATE. That was randi's doing.

Re: [v0.1.1] DamNums - Universal Damage Numbers

PostPosted: Sun May 21, 2017 12:44 pm
by Major Cooke
Shot up a new pull request. This one's pretty critical and probably should warrant another version release after doing some extensive testing (which I'm working on now).

Re: [v0.2.0] DamNums - Universal Damage Numbers

PostPosted: Tue May 23, 2017 8:59 am
by Xaser
Update! Whoop!

Version v0.2.0 is live and available at the usual place. Aside from sporting totally rewritten (read: less-hacky) internals, the big changes are the addition of a couple of new options:
  • Physics: choose between the gravity-affected "Toss" (default) or a more subtle vertical "Float" style.
  • Spawn Numbers For... allows you to choose whether numbers should spawn on just monsters (default), or all shootable objects (including barrels).

As always, give it a whirl and let me know if there's anything funkular (particularly with the "works with any mod" bit -- there was a D4D edge case that got patched in this version, so it's getting better-er now).