[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.

[v1.0.1] DamNums - Universal Damage Numbers

Postby Xaser » Tue Jan 24, 2017 12:02 am


Image
Image
DamNums - v1.0.1
- Release Archive
- Github

This mod pairs well with coldcite's Top HP Bars mod. Check it out!

[Requires GZDoom 2.4.0 / QZDoom 1.3.0, or newer]

DamNums is a pretty simple concept: shoot monsters and little numbers pop out that tell you how much damage you did -- like so:

Image

More giffy previews (click 'em):
https://i.imgur.com/Z6Ry4H7.gifv -- Works on any IWAD!
https://i.imgur.com/xLCi5Zu.gifv -- Works on mods! Ideally, any mod! ;)

Cool-ass features:
  • It's Universal!: it works with all IWADs, all mods, all everything. Just plug it in and watch the numbers fly!
  • A wide selection of colors and fonts! All IWADs supported!
  • Damagetype colors! The system is easily utilized by mods by adding some definitions to LANGUAGE (see the mod for some samples). No dependency required!
  • Most everything is exposed as a user option, e.g. font/color preferences, enabling/disabling damagetype coloration, and so forth.

Changes in v1.0.0:
  • Fonts added for basically all IWADs (and then some)!
  • Font choice defaults to the game you're playing; in Heretic, you'll get Heretic-y numbers, in Doom you'll get doom fonts, etc.
  • Damage type support! A few values are baked in (e.g. for "Fire" and "Ice" and whatnot), and mods can easily supply their own damagetype->color mappings voa LANGUAGE (see the mod itself for examples).
  • Font & color choice are now user options. Multiplayer-safe!

Changes in v0.2.0:
  • Added an option for number "physics," with two options at present ("Toss", the gravity-affected default, and "Float", a simple float-upwards style).
  • Added an option to allow all shootable objects (e.g. barrels) to toss numbers, not just monsters.
  • Revamped codebase, w/D4D gib-death compatibility -- thanks to Major Cooke and ZZYZX for hashing out a better way to do things.

Changes in v0.1.1:
  • MENUDEF no longer modifies the root Options menu, making it compatible with mods that include their own MENUDEF monkeying.

Thanks to Bodhisattva for randomly posting the inspiration for this mod, Mikk- for getting a head start on the event handler code, and (presumably) Kyle873 for sowing the seeds in the first place in DRPG. Also shoutouts to Major Cooke for lending a coding hand, and Zombie & Marrub for letting me bug them with ZScript questions and helping me avoid losing more brain cells than usual. ;)

Give it a whirl and let me know what you think -- and certainly report bugs if it happens.
Last edited by Xaser on Wed Sep 13, 2017 6:56 pm, edited 7 times in total.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Sleepyhead » Wed Feb 01, 2017 7:32 pm

Signed on here so I could express my gratitude for your making this. I've been waiting for a mod like this for awhile and this functions exactly how I hoped it would. Keep up the awesome work and I can't wait to see what you add onto this in the future!
Sleepyhead
 
Joined: 31 Jan 2017

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Nevander » Thu Feb 02, 2017 4:06 am

Epic work. I might suggest for higher damage amounts to be red or flash up a CRITICAL like how Borderlands does it. Just a thought.
Nevander
Banned User
 
Joined: 06 Jan 2014

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Gez » Thu Feb 02, 2017 6:30 am

The size of the damage could scale (probably a logarithmic scale to avoid crazy high damage from taking up all the screen) with the amount of damage inflicted.

Also perhaps the numbers could move up and disappear instead of falling down like blood droplets?
Gez
 
 
 
Joined: 06 Jul 2007

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Xaser » Fri Feb 03, 2017 1:13 am

Heh, was afraid for a bit that the mod fell outside folks' interest. :P

Good thoughts there re: criticals, size scaling, and number movement. I do want to be careful about colorization since at some point i plan on adding damage type colorization, but it's worth a sneak-in. The movement style is worth a user-option; I kept it Borderlands-y, but the no-gravity move-upwards style ain't a bad thing either.

Probably the next thing on my list for this, though, is a Classic Doom-style font choice, so you can see good ol' Doom-style digits rather than the Doom4-ish ones that are currently present. Will fit a bit more in the end.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Triple S » Fri Feb 03, 2017 4:18 am

This is definitely gonna be something I load all the time.

I'd love if there was a toggle between "flood of numbers" and "one solid number" for multi-hit (and maybe impact+radius explosive) weapons. Another nice feature would be how Team Fortress 2 allows you to set it so that all damage within an adjustable timeframe is continuously added up into one number, instead of a series of small numbers flying out. It's not something I tend to use (I like seeing a number per hit), but it's very nice to have.
User avatar
Triple S
 
Joined: 02 Nov 2008

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Xaser » Fri Feb 03, 2017 11:01 am

One weird quirk about the old "flood of numbers" approach (i.e. one number for every damage source) was that hitting someone with a rocket would spawn two numbers, because the projectile impact and the explosion are two distinct sources of damage. Between that and the unreadable (but fun) SSG shower, I figured a change was appropriate. But options are appropriate too...

Speaking of, I should probably put together some preview screenshots that aren't an unreadable number shower. The video thumbnail isn't exactly selling the mod well. :P
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Sleepyhead » Sat Feb 04, 2017 5:52 am

I actually have a few things I'd like to add on. First off, in terms of making this more "universal"; what are your thoughts/ideas on that end? I can see this mod being excellent for gameplay mods if that's what you have in mind. Being able to know the exact damage of modded weapons in-game would be fucking awesome.

Also, you mentioned something about enemy health bars. I don't know what you have planned specifically but I use that JP Hud health bar and if you haven't, the way it works is that it reveals the enemy's health and name when you mouse over it. The only problem with this is that you can abuse that fact to take advantage of hitboxes (seeing/shooting enemies around corners), trivialize stealth monsters and dark sections, and even discover certain fake wall secrets that have monsters hiding behind them (one in Doom 2's "The Spirit World" with some Pinkies/Spectres behind a fake wall comes to mind). If I may make a suggestion, perhaps enemy health bars could only appear near injured monsters so that you or another monster would have to already be attacking it (might be useful for picking out particularly injured demons in big messy crowd fights).
Sleepyhead
 
Joined: 31 Jan 2017

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Xaser » Sat Feb 04, 2017 11:52 am

I was planning on having health bars only appear once an actor gets below 100% health, then stick around until dead. No monster names since I haven't thought of a good way of printing strings in the world while offsetting things properly (on that note, not uber-happy with my current solution for numbers, but it's all I can think of at the moment).

Regarding universal-ness, there's a new event system coming soon to ZScript, and there's a "WorldThingDamaged" damage hook this mod ought to be able to take advantage of.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Shadow Hog » Mon Feb 06, 2017 6:26 pm

I don't suppose there's any way the numbers can forcibly render in front of the monsters in question?

Then again, if the numbers float up instead of being affected by gravity, it'd probably be a moot point.
Shadow Hog
 
Joined: 14 Aug 2015

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Mikk- » Thu Mar 02, 2017 9:01 am

Xaser wrote:Regarding universal-ness, there's a new event system coming soon to ZScript, and there's a "WorldThingDamaged" damage hook this mod ought to be able to take advantage of.


That there is! I'm only new to ZScript so this might not be the most graceful solution...
Code: Select allExpand view

class DamnumHandler 
: StaticEventHandler
{
    override void WorldThingDamaged(WorldEvent e)
    {
        if(e.Thing.bISMONSTER)
            {
            String src = "null";
            if (e.DamageSource) src = e.DamageSource.GetClassName();
            DamNum.spawnDamageNumbers(e.DamageSource, e.Thing, e.Damage, e.DamageType);
            }
    }
    
}
 

While it works (without modifying monsters, too!), it reverts to the old spray of numbers featured in the video posted. Perhaps there's a way to remedy that, but it's beyond my grasp.
User avatar
Mikk-
yooooooooooo
 
Joined: 30 Jun 2009
Location: Somewhere off Kanagawa
Discord: Mikk0451#3922

Re: [v0.0.1] DamNums - a damage numbers mod

Postby Xaser » Mon Mar 13, 2017 1:48 pm

Thanks for the sample! That indeed looks like the right starting point.

I'll noodle the damage accumulation a bit when I dedicate some time back to this. My current working idea is to give monsters a "DamageAccumulator" inventory item which tracks all damage dealt during a tic, then triggers the number spawn at the beginning of next tic. Yeah, we're back to inventory item shenanigans, but it's better than doing the other thing I had in mind (shoving "actors that got damaged this tic" into a dynamic array somewhere -- yuck). :P

I figure it's "okay" in this since because all Actors have inventory, and it's better than hijacking an existing Actor pointer (like Poisoner or something) and working around that. Shouldn't be much of a performance sink if I exclude Massacre damage; at least not more than spawning a zillion numbers would in case there's a map out there that mass kills a bunch of things via ACS.

Alternative ideas welcome, of course.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

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

Postby Xaser » Sat Apr 08, 2017 11:29 pm

Bumpdate! v0.1.0 is released, which (in theory) is universal -- i.e. it works with any IWAD, mod, or whatever! Thanks to ZZYZX's magic event system for enabling it.

Not much else to say about it, aside from mentioning that text colors are customizable too. Otherwise, load this and have some fun with it! And let me know if there's any wacko bugs or incompatibilities or shenanigans.
User avatar
Xaser
anarchivist
 
 
 
Joined: 20 Jul 2003

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

Postby unRyker » Sun Apr 09, 2017 2:53 pm

This update was just what I was waiting for! Excellent work, and to be honest I only have two other things to suggest: Show the damage number somewhere on the HUD as well in customizable locations would be useful, and an option to accumulate numbers in a certain time-frame which would make chainguns better to use. Other than that, it's complete to me and I'll be using this from now on!
User avatar
unRyker
 
Joined: 28 Jul 2015
Location: United States

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

Postby jpalomo » Sun Apr 09, 2017 4:18 pm

Nice stuff. I'll be sticking this in my autoloads. The only suggestion I have is with the menu. Picking a specific color for the font is a little annoying. Perhaps when you select the option it brings up another menu with the list of colors?
User avatar
jpalomo
 
Joined: 17 May 2010

Next

Return to Graphic/Audio Patches

Who is online

Users browsing this forum: No registered users and 7 guests