Health and Defense

Pages: 12
MiiNiPaa wrote:
You seem to not understand: first guy should take 430 hits before dying even with 100% shield. Second should only withstand 210 hits.
Then make the 100% defense lower priority than the minimum-effect defense. What's the problem, other than a miscommunication?
MiiNiPaa wrote:
Also note that even though first guy receives more heaklth from medkits, it still takes more medkits to heal him completely than second guy
Yeah, I don't understand why you're telling me this again.
Disch wrote:
But again I don't see how it's any simpler. It just seems more complicated to me.
Needing to know the max health is a bad thing and results in more complicated code. I've learned first-hand from working with Minecraft. It's not fun.
MiiNiPaa wrote:
I posted example where it is too much work to use this system.
Your code is invisible. But mine is too.
MiiNiPaa wrote:
LB, what time zone you are? I always see your threads after midnight when I sleepy and in the morning there always like 3 pages of messages.
I am GMT-6; for me your post was created at 4:27pm. I am generally up early and up late.
Needing to know the max health is a bad thing and results in more complicated code. I've learned first-hand from working with Minecraft. It's not fun.


The only times I can think of where you'd need to know the max health is when:

1) You are recovering life (can't exceed maximum)
2) You are doing something that works on health percentages, rather than fixed health values. (ie, a potion that recovers half of your life instead of one that recovers 10 HP)


The former isn't an issue, as any code that has access to modify the health directly will also have access to the maximum.

And the latter largely defeats the point of having a variable maximum in the first place. Which is why you don't see a lot of it in games.


Conversely, the replacement 'resilience' stat would need to be factored into all health calculations except for percentage-based ones.

So I guess it would make sense in games where things operate more on percentages. But again I don't see a whole lot of that in the games I play. In all other instances though, it's the same amount of work or more.



I'm curious as to what kind of hardships you are having with Minecraft.
Disch wrote:
I'm curious as to what kind of hardships you are having with Minecraft.
Shared max health among team members when members can join and leave the team at any time as well as log in and out of the server at any time.
You seem to not understand: first guy should take 430 hits before dying even with 100% shield. Second should only withstand 210 hits.
[s]Then make the 100% defense lower priority than the minimum-effect defense. What's the problem, other than a miscommunication?
Two cases
1) Both have 100% defense. First one should take 430 hits before dying secont 210 regardless of damage those hits deal.
2) no matter their defence if we rain hail of 1hp attacks on them they should die in exactly 430/210 hits
You can see it as any attack should deal at least 1/430 of max health to first and 1/210 to second.
Maybe I misunderstood how different kind of defenses interact, but I would like to see how to calculate new hp from old hp.
I'd like to see both guys getting hit for 10 damage first then 50, then 100, then 200 with no healing in-between. To see calculations and how values you posted before are used.

It is even funnier with medkits:
First guy needs 28.(3) small medkits to restore health from 0 to full or 11.(621) large. Second guy would need 14 small or 7 large. Abstract 100hp guy would need 6.(6) small or 4 large. Also you can see that second guy receives twice more health from large medkit than from small; first guy feceives 2.4(6) more.
Example: both guys are down to 100 hp. They take small medkit first, and then large. Again I'm interested in calculations.

Your code is invisible. But mine is too.
I prefer use abstract math here as it should predate code writing in cases like that.

I am GMT-6;
UTC+4. We are 9 hours apart.


Shared max health among team members when members can join and leave the team at any time as well as log in and out of the server at any time.
And what the problem here? Is it mod which does not know how to handle different max health? Or is it different max health in general (it is not fair that you have twice more health than me)?
Last edited on
LB wrote:
Shared max health among team members when members can join and leave the team at any time as well as log in and out of the server at any time.


Won't you have the same problem with shared resilience? You're just shifting the problem to another variable.
Won't you have the same problem with shared resilience? You're just shifting the problem to another variable.


Agreed. I can see this method of stat-tracking working just as well as our standard approach. However, this means it suffers from the same problems.

Resilience is a little strange for medkits though because you need to make sure the value never reaches 1.0

LB wrote:
The health values are always in the range [0.0, 1.0] and are only displayed to the player in a better range. If the health is a bar or anything that isn't a readable number then you don't need to worry about it at all.


I want to know the numbers. Lack of access to the numbers is a main reason I think games are getting stupid these days. Even progress quest has numbers:
http://progressquest.com/

Edit: Well, progress quest is way off topic, but its fun anyway.

This reminds me of how eye-sight is measured. 20/20 eyesight means "from 20 feet, this eye can see what the average eye sees from 20 feet".
Last edited on
Topic archived. No new replies allowed.
Pages: 12