PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

50M Downloads

Feature Enhancement: Summarize the Armor HUD notification text for entity targeting

HipHopHuman opened this issue ยท 7 comments

commented

Take this screenshot as an example:

image

The entity targets could be grouped together, and it's a little weird that the "Stopped spam on Entity Tracker" text is displayed to the player, it kind of breaks immersion a little.

This information could be reduced down to the following and still convey the same meaning:

- (3x) Skeleton is targeting you!
- (3x) Zombie is targeting you!

The mod "Pick Up Notifier" does this when the player picks up item entities and it works rather well.

commented

Less simple than it sounds, since all messages would need to be buffered up for a set time, and then sorted through to be coalesced. So it would introduce a lag on message display too...

commented

Update: actually, thinking about this some more, it's easier than I thought, although the buffering interval needs to be kept small, so e.g. a "Creeper is targeting you!" warning doesn't come in late. I'd say 1 second max, probably 0.5 second.

Regarding the "stopped spam" message, it probably isn't really necessary, no.

commented

Sounds good, can't wait to test it out ๐Ÿ™Œ

commented

When you say buffering, are you implying that the message would not be displayed until the max buffer interval is reached? If so, I think there's another way - If you poke around the "Pick Up Notifier" mod, you'll notice that the messages are shown instantly, but events of the same type that follow will sort of "edit" the existing notification, rather than wait for a buffer interval.

So, when you pick up cobblestone, it will say "1x Cobblestone". If you pick up another piece of cobblestone while that message is still on the screen, it will change to "2x Cobblestone".

I think this could work similarly, since they're both doing the same thing, sort of. Pick Up Notifier hooks into item pickup events to display a message, the Pneumatic Helmet HUD hooks into entity target events (are these even events? not a modder so don't know for sure) to display a message.

commented

The problem with that is how the Armor HUD messages are handled; editing an in-place message isn't really feasible, especially since the messages are very ephemeral.

I've done some testing, and with a 20-tick collection time, it actually works pretty well when you aggro a large crowd of mobs (e.g. fly into a nest of zombies...). There will be a dev build up for testing fairly soon (getting close to 2.13.0 beta release now...) for you to play with and see.

commented

I just tested it out and it is so much nicer than it was before. Thanks for the hard work :)

commented

Added in 2.13.0