[v1.0.1] DamNums - Universal Damage Numbers

For high-res texture/sprite projects, sprite-fix patches, music add-ons, music randomizers, and other graphic/sound-only projects.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

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

Postby Lord Misfit » Sun Apr 16, 2017 4:29 pm

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
User avatar
Lord Misfit
Servant of Aetherius?
 
Joined: 27 Dec 2006
Location: Canton, OH
Discord: Lord Misfit#9594

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

Postby kadu522 » Sun Apr 16, 2017 9:33 pm

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.
User avatar
kadu522
A gameplay lover,heck i play a ASCII Based game is your gameplay is good enough.
 
Joined: 03 Mar 2017
Location: Brasil,Rio de janeiro
Discord: kadu522#0658

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

Postby ZZYZX » Mon Apr 17, 2017 4:55 am

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 :(
User avatar
ZZYZX
le chat du rabbin
 
Joined: 14 Oct 2012
Location: Ukraine

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

Postby Tekish » Mon Apr 17, 2017 3:07 pm

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.
Tekish
 
Joined: 28 Jun 2016

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

Postby Enjay » Mon Apr 17, 2017 4:58 pm

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
User avatar
Enjay
Everyone is a moon, and has a dark side which he never shows to anybody. Twain
 
 
 
Joined: 15 Jul 2003
Location: Scotland

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

Postby Major Cooke » Fri Apr 21, 2017 8:49 am

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.
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

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

Postby Xaser » Fri Apr 21, 2017 1:58 pm

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
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

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

Postby Major Cooke » Fri Apr 21, 2017 9:03 pm

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.
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

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

Postby Xaser » Sat Apr 22, 2017 1:06 am

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.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

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

Postby ZZYZX » Sat Apr 22, 2017 11:55 am

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".
User avatar
ZZYZX
le chat du rabbin
 
Joined: 14 Oct 2012
Location: Ukraine

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

Postby Major Cooke » Wed Apr 26, 2017 8:19 am

Is there a reason why you're using floats instead of doubles?
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

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

Postby Xaser » Wed Apr 26, 2017 11:10 am

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.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

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

Postby Major Cooke » Wed Apr 26, 2017 5:27 pm

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.
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

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

Postby Major Cooke » Sun May 21, 2017 1:44 pm

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).
User avatar
Major Cooke
Slaughterer of Sewers
 
Joined: 28 Jan 2007
Discord: Major Cooke#0846

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

Postby Xaser » Tue May 23, 2017 9:59 am

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).
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

PreviousNext

Return to Graphic/Audio Patches

Who is online

Users browsing this forum: No registered users and 3 guests