Jump to content

Forums Announcement

Read-Only Mode for Announcements & Changelogs

Dear Survivors, we'd like to inform you that this forum will transition to read-only mode. From now on, it will serve exclusively as a platform for official announcements and changelogs.

For all community discussions, debates, and engagement, we encourage you to join us on our social media platforms: Discord, Twitter/X, Facebook.

Thank you for being a valued part of our community. We look forward to connecting with you on our other channels!

Stay safe out there,
Your DayZ Team

disorder

Autoheal Algorithm Coding

Recommended Posts

This is autohealing from a programmers perspective, lots of code here.

The code takes a health fraction amount every second, calculated from the players current food value and then adds it up. Every 10 seconds the system adds this as blood.

function tick_cycle

if health_counter < 10 do

begin

health_fraction = player_food_value / 1000

blood_heal_modifier = blood_heal_modifier + health_fraction

health_counter + 1

end

else if health_counter >= 10 do

begin

player_current_blood = player_current_blood + blood_heal_modifier

blood_heal_modifier = 0

health_counter = 0

end

1000 is a very small fraction, but since you are adding up to 12000 blood. It will take a very long time to full heal even at full food levels.

  • Like 8

Share this post


Link to post
Share on other sites

Aw thanks, It's funny I actually did this as a working mod for GTA4 ages ago too.

Share this post


Link to post
Share on other sites

Just a thought,

It'd be good to cap the regen, so you can't get more than +/- 75% of your health back without assistance.

I know someone's going to tell me "it's not fair on lonewolves". but it's a multiplayer game. We can't bypass all player interaction.

Communication has to be rewarded (with life) to discourage pure KoS mentality.

  • Like 1

Share this post


Link to post
Share on other sites

Just a thought,

It'd be good to cap the regen, so you can't get more than +/- 75% of your health back without assistance.

I know someone's going to tell me "it's not fair on lonewolves". but it's a multiplayer game. We can't bypass all player interaction.

Communication has to be rewarded (with life) to discourage pure KoS mentality.

I agree with this completely. 85% of the time, I play as a lone wolf, and I don't want to be gimped. Makes it more challenging.

Share this post


Link to post
Share on other sites

i agree nice idea and well thought out. 75% cap would make it fair as well

Share this post


Link to post
Share on other sites

×