Regenerating Rate cannot be controlled as intended

:arrow_forward: GAME INFORMATION

  • Build: 40220.0

:arrow_forward: ISSUE

The regenerating ability, used by the Technology Maghrabi Camels, can’t be edited to change the regenerating rate of a unit.
The attribute 109 is labelled as Regeneration Rate but actually acts as a simple toggle to start regenerating, the actual heal rate of units is edited completely differently.

Currently the amount of time t in seconds it takes to heal 1 HP is given by the formula t = 2* (Work_Rate + 1)

This doesn’t make sense for several reasons :

  • Work rate is a multiplier. It has no business being used in an addition
  • increasing the work rate of a unit, which is a good thing for every other ability, makes the unit heal slower because t increases.
  • Units can’t heal faster than 1HP/2s because work rate can’t be negative.
  • Editing the work rate of a unit affects several other key tasks, which makes changing the heal rate functionally impossible.
  • Editing the work rate after the regeneration ability has been enabled doesn’t affect the heal rate, instead of updating dynamically.

:arrow_forward: REPRODUCTION STEPS

Here’s how to reproduce the issue:

  1. Change the Work Rate of a Camel Archer to 10 via triggers
  2. Berbers and research Maghrabi Camels, and observe that the heal rate is now of 1 HP every 12 ( 2*(5+1) ) seconds.
  3. Use a trigger to change the Work Rate back to 1. Observe that the heal rate doesn’t change.

:arrow_forward: RECOMMENDED SOLUTION

On UserPatch, regenerating is fully unhardcoded and is available to be modified on the fly for any unit, without requiring ID hardcoding nor Task additions. This is done by supporting an additional flag on Attribute 40 Hero Status (already present on DE), and adding a new attribute 45, Hero Heal Time.

New ATTR_HERO_STATUS #40 flags: 4: auto-heal
New ATTR_HERO_HEAL_TIME added as #45: set to the time to heal 1HP (default of 0 becomes 2s).

:arrow_forward: GAME FILES

https://1drv.ms/u/s!AsxYth_pSCsnwgjQ_nXnEHfgfEkU?e=txgJ6Y

1 Like

I have it edited but iirc the lower the number, faster the regeneration rate. basically camels have those tasks but was set at 0, until the tech/effect is researched and kicks in and gives it a value.

lower that value gives faster regen but hard to control