Simulating "HP-Walk" Effect (Without affecting HP in Battle)

How can I simulate the HP Walk effect of Dragon Quest's Magic Armor and Erdrick's Armor?

I know that I can set the trait HRG to set HP regeneration, but this isn't even close. This trait regenerates health during battle (which I don't want), and it is far too variable in its healing (in that it took randomly 12-15 steps for an unpredictable amount of HP gain).

I tried accomplishing this with a common parallel process event, but it was also far too variable (in that 12-20 HP were being healed per step, because the event seems to fire a random greater-than-one number of times per step). I can't figure out how this can be done with common events (although I suspect it can).

Specifically, I'd like for one piece of armor to cause exactly 1 HP regain every exactly 3 steps; I'd also like for another piece of armor to cause exactly 1 HP regain every step.
one piece of armor to cause exactly 1 HP regain every exactly 3 steps...

Wouldn't you set the armor in the database to do that?

I think it would be a state regain feature that would regain HP * (Step Variable/3) 

Hit points times step variable divided by 3
I'm not sure that would work, Shin. If I understand you correctly, you're suggesting I:

-create a state that would cause the HP regain by adding a certain feature

-add that state to the armor

-track steps taken with a variable to determine when it's time to heal

As my original post implies, there isn't a feature (that I know of) that accomplishes this in the manner I require. Additionally, as mentioned, I haven't had any luck causing an event to fire a predictable amount of times for something like this.

If I've misunderstood, please feel free to correct me! I'm an experienced programmer but an inexperienced RPG maker 🙂 .
you need either a script or a common event to count the number of steps, and then use the event command to add HP.


In both cases, the code needs to check if an regenerating armor has been equipped and choose the amount to be healed based on the equipped armor.


The event variant has the danger of lag and needs a complex event coding with a lot of conditional branches.


There are a few scripts that might help you by adding effects or regeneration to equipment, but if those existing scripts don't work for you then you would have to request it and wait until someone who can program writes it.
Okay, so it took a bit more fiddling with events, but I've figured it out perfectly (without scripts) for anyone interested in how to apply this HP Walk effect.

This solution uses three common parallel process events, three switches, and three variables, and there is zero lag.

Note that you can replace the below condition about Erdrick's Armor being equipped with whatever condition activates HP Walk in your game.

Here's how I did it:

    (it is assumed that the value of the "Steps per HP" variable is already stored)

    1. Set "Game Start" switch ON

    2. Common Parallel Process "Regen Monitor" runs on condition "Game Start" is ON
          •Regen Monitor: If Erdrick's Armor equipped then set "E_Armor Equipped" switch ON, else set it OFF

    3. Common Parallel Process "Step Count" runs on condition "E_Armor Equipped" is ON
          •Step Count: If "Step Toggle" switch is OFF then set variable "Last Steps" = [Game steps] and set "Step Toggle" ON

    4. Common Parallel Process "Step Regen" runs on condition "Step Toggle" is ON
          •Step Regen: Set variable "Current Steps" = [Game steps], minus "Steps per HP", plus 1; then, if "Current Steps" > "Last Steps":

              Add 1 to [Current HP], set "Last Steps" = "Current Steps", and set "Step Toggle" OFF

  ***

For those who are more logically- or programatically-minded and new to VX Ace, here's the algorithm I created to deduce the necessary event/variable/switch steps:

'Definitions/References
Define booleans: game_start, HPwalk_active, step_toggle  'all initially false at game start
Define integers: lastSteps, currentSteps, stepsPerHP=1  'modify stepsPerHP to space out healing
Reference: GAME_STEPS  'represents the actual current in-game steps, provided by the engine
Reference: CUR_HP  'represents the actual current HP in question, provided by the engine

'--------------------
sub main
  game_start=true

  while game_start=true
    if GetHPWalkState=True then : HPwalk_active=true
    else : HPwalk_active=false
    endif

    while HPwalk_active=true
      if step_toggle=false then
        lastSteps=GAME_STEPS
        step_toggle=true
      endif

        while step_toggle=true
          currentSteps=GAME_STEPS
          currentSteps–=(stepsPerHP–1)
          if currentSteps>lastSteps then
            CUR_HP+=1
            lastSteps=currentSteps
            step_toggle=false
          endif
        wend
    wend
  wend
end sub

'Determine if condition has been met to activate HP Walk
function GetHPWalkState  'Replace condition with anything you like
  if [Erdrick's Armor equipped] then return true
  return false
end function

Feel free to close this thread 🙂
or if you wanna go the script route, you can use my Slip Damage script that can be found here: https://lescripts.wordpress.com/rgss3/#battle_scripts

Original thread: https://forums.rpgmakerweb.com/threads/simulating-hp-walk-effect-without-affecting-hp-in-battle.25906/