First Aid

First Aid

15M Downloads

Some suggestions on Max Health Calculation & Damage System

Ch3225 opened this issue · 0 comments

commented

First, I really love your ideas. But here's some ideas, I guess they could make your mod better.
1.Max Health is not fully configurable in the .toml file or the json file. I suggest using an expression like this(just a random example):
let x be vanilla health and y be positional health of body part, I hope we can support expression like this in .toml or json file in config folder
[head]
y=x×0.1+1
[body]
y=x×0.15+2
......
In this example:
If you have 20 max health in vanilla, you will get 2 hearts on head and 3.5 hearts on body.
If you have 40 max health in vanilla, you will get 3 hearts on head and 5 hearts on body.
Even if it is 21 or 22, 23, 24 max health, it could work better and there will be with no occur of the situations like the left arm's health is 6 heart unequal to the right arm's health's 8 hearts, and the multiplier become more customizable using this.

2.Damage problem: Sometimes players are instantly killed by the arrow, or pillager or zombie with a sword, because their damage are too high and the random make the critical part suffer the damage.
Solution: For damage on projectiles, we can define more precise hitboxes onto the player (if you can do this, we can get headshot now!)(I seen a mod called simply headshots, and it might be useful). If it is hard to implement using hitboxes, or for dealing with other attack sources like melee Attacks, we can check whether player's sight is towards the attacker(a range of angle bias should be accepted), if so, arms should take the damage for heads & bodys first. Arms should take the damage for the thorns damage too. Otherwise head & body will take the damage(head will have more chance to take the damage).(This makes sence like you will use your arms to protect you when you see someone tries to hit you) For other damage source like freezing or explosion damage select some body parts and distribute the damage randomly on them (or Normal distribution if you want).
Here, I suggest using different possibilityOnWard for different situations(e.g. face to enemy&melee attack:100; back to enemy&melee attack:5), let the possibility be whether the limbs could take the damage for the critical body parts successfully.'

  1. Capability with mod Shield Mechanics(Mods which change how it works on damaging)
    if shield is used on block: transfer all the damage left to arms;
    else random the damage to different body parts.
    I think using techniques of checking face towardings mentioned in 2 could help.

  2. Capability with mod Artifacts and Spice of Life(Mods which make a change on max health in different ways)
    Cystal heart in artifact add 1 heart on each body part, while health_boost have an weird effect on the health on each limb(the left arm's health can be unequal to the right arm's health) I've seen your code. It is still hard to customize how it works on MaxHealth. Max health could have a better, and more clear way to work, I guess using techniques of checking face towardings mentioned in 1 could help.