TheHamester / HitIndicator

Minecraft mod that adds hit indicators.
Creative Commons Attribution Share Alike 4.0 International
5 stars 4 forks source link

[Feature Request] Hit prediction mode #19

Closed SheReyy closed 4 months ago

SheReyy commented 4 months ago

Hi! I'm interested in using this mod on a 1.20.1 forge modpack I'm currently working on. I wanna add a combat system based on Better Combat and Elenai Dodge 2. I'd like to somehow mimic the dodge functionality from marvel's spider-man, or the counter from batman arkham.

Would it be possible to add a new indicator around the player's crosshair whenever a mob or projectile entity is getting close? The indicator can be light blue by default. It can be transparent initially. The closer the mob/entity gets to the player, the more opaque the indicator becomes, until it disappears when the player gets hit. This way, a player can determine when and where an attack might be coming from and they can attempt a dodge. Of course, this feature would have a config so it can be disabled if desired

TheHamester commented 4 months ago

hitindication-1.20.1-1.5.zip Hi, sending you an early build, if thats to your satisfaction get back to me and i will push it to all versions when im able

TheHamester commented 4 months ago

rn its on by deafult so you can test it, in final build itll be off by default. there are 3 new config options one for enabling it, second for proximity radius and third for color

TheHamester commented 4 months ago

oops left a small bug with block color in, heres fix hitindication-1.20.1-1.5.zip

SheReyy commented 4 months ago

Omg, thank you! I did not expect this at all. I'll test it asap and get back with feedback

SheReyy commented 4 months ago

Ok, so I tried it. I think it already works pretty good. I think there are some things that would really improve it and turn in into a indispensable tool. Some of these are a bit confusing, so I hope I can explain them well.

  1. A key bind for quick disabling/enabling - I imagine a player wouldn't want this indicator in a place such as a mob farm/spawner

Ok, here are the bits I hope I can explain properly.

  1. Add a new configurable radius. This will be dedicated to a white border that will appear around the indicator when an entity is near. Why? I found that, often, the maximum opacity of the indicator is not contrasting enough to trigger my reflexes into trying to dodge. I was thinking it could look somehow like this, so it really pops up: Screenshot_1

Or something more nice looking

One more thing that would be amazing, would be to allow this config, to be indicated per entity. Basically allow a bigger reaction window for arrows, and a smaller reaction window for zombies.

It can look something like this maybe?

/# A list of entity ids. Used to assign the proximityDanger radius around the player

whitelist = ["minecraft:zombie; priximityDangerRadius = 2", "minecraft:arrow; priximityDangerRadius= 5", "minecraft:spider; priximityDangerRadius= 5"]

If nothing is specified here, maybe this can default to 3 radius for each entity? It would also be amazing if this could work with entity tags too.

  1. A whitelist/blacklist (this can be toggled in the config) for entities that can trigger the proximity indicator - this would be more useful for pack makers as they might be interested in configuring the mod so maybe only arrows can work with this system.
/# Setting this to `false` will turn the blacklist into a whitelist
isblacklist = true

/# A list of entity ids. Used to disable the Proximity Indicators for certain entities
blacklist = ["minecraft:zombie", "minecraft:arrow"]
  1. Lastly, this one applies only if you're interested in adding the previous suggestions. Add a debug mode so a pack maker would be able to see the entity ids

Sorry for all the text and sorry if this sounds like too much. I don't want this to look or sound demanding in any way. This is just what I thought might make this feature better than it already is. Thanks again for the time and effort spent into making this feature

TheHamester commented 4 months ago

Thank you for having interest in this mod, I can manage with keybinds, I can try adding contrast qol, but i don't think ill do with whitelists/blacklists unfortunately, maybe in the future, but its a big maybe. as for debug mode that shows entities uuids... i dont think its should be a job for my mod, i just believe it should be a seperate thing

SheReyy commented 4 months ago

Got it. Thanks a lot, this is gonna be amazing for me!

SheReyy commented 4 months ago

oops left a small bug with block color in, heres fix hitindication-1.20.1-1.5.zip

Oh, just a thing I noticed in this version, don't know if you're aware. The Edge of Screen mode doesn't work with the proximity indicator

TheHamester commented 4 months ago

Hello again, my friend and i decided to go a different direction with this mod, and this feature might not stay. You can keep and use this jar for 1.5 but it might not make it into final release.

TheHamester commented 4 months ago

hitindication-1.20.1-1.5.zip