Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,220
Reaction score
728
First Language
English
Primarily Uses
RMVXA
Hi everyone, I'm wondering how to enter into the damage formula box that would get the effect of heal health and magic.
I tried b.hp = b.mhp; b.mp = b.mmp
but it doesn't work. I mean yes it does work but only the health shows up above the character. The mp is recovered as well but I don't see the numbers show up.
I'm sure it's a syntax problem, but I don't know what goes into this to make it two functions.

Ideas?
 

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
220
First Language
English
Primarily Uses
RMVXA
Are we talking about damage popups, or default text?
If you have popups, we need to know which script you're using beforehand.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,220
Reaction score
728
First Language
English
Primarily Uses
RMVXA
Sorry didn't think the script mattered since there is no problem with the script. Putting damage formulas into the box gives damage popups as per normal, but it's just that if you do more than one, as I am trying to do, then the second doesn't show up.
I have many scripts, I believe it's yanfly battle core that is controlling this. But I also have Victor Sant animated battlers and actor battlers.
 
Last edited:

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
220
First Language
English
Primarily Uses
RMVXA
Well, you need to manually call the create_popup method in situations like these.
A bit of coding should address the issue. First, add this to your script list.
Code:
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  A battler class with methods for sprites and actions added. This class
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * New Method: YEA HP Damage
  #--------------------------------------------------------------------------
  def damage_hp(value)
    value = value.round.to_i
    perform_damage_effect
    text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:hp_dmg], value.group)
    create_popup(text, "HP_DMG")
    self.hp = [self.hp - value, 0].max
  end
  #--------------------------------------------------------------------------
  # * New Method: YEA MP Damage
  #--------------------------------------------------------------------------
  def damage_mp(value)
    value = value.round.to_i
    text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:mp_dmg], value.group)
    create_popup(text, "MP_DMG")
    self.mp = [self.mp - value, 0].max
  end
  #--------------------------------------------------------------------------
  # * New Method: YEA TP Damage
  #--------------------------------------------------------------------------
  def damage_tp(value)
    value = value.round.to_i
    text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:tp_dmg], value.group)
    create_popup(text, "TP_DMG")
    self.tp = [self.tp - value, 0].max
  end
  #--------------------------------------------------------------------------
  # * New Method: YEA HP Heal
  #--------------------------------------------------------------------------
  def heal_hp(value)
    value = value.round.to_i
    Sound.play_recovery
    text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:hp_heal], value.group)
    create_popup(text, "HP_HEAL")
    self.hp = [self.hp + value, self.mhp].min
  end
  #--------------------------------------------------------------------------
  # * New Method: YEA MP Heal
  #--------------------------------------------------------------------------
  def heal_mp(value)
    value = value.round.to_i
    Sound.play_recovery
    text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:mp_heal], value.group)
    create_popup(text, "MP_HEAL")
    self.mp = [self.mp + value, self.mmp].min
  end
  #--------------------------------------------------------------------------
  # * New Method: YEA TP Heal
  #--------------------------------------------------------------------------
  def heal_tp(value)
    value = value.round.to_i
    Sound.play_recovery
    text = sprintf(YEA::BATTLE::POPUP_SETTINGS[:tp_heal], value.group)
    create_popup(text, "TP_HEAL")
    self.tp = [self.tp + value, self.max_tp].min
  end
end
Then use this damage formula instead: b.heal_mp(b.mmp) ; b.mhp
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,220
Reaction score
728
First Language
English
Primarily Uses
RMVXA
Thanks. Working well. I also needed to use formulas for 25% and first tried /4 but it didn't work until I used *0.25
 

Latest Threads

Latest Profile Posts

Too bad the Boss Battle Build Bout isn't also for VXAce.
I might not participate in the Boss Battle contest after all... I have more important things to do, like Wishful Wanda. And of course the Dark Deception spinoff I plan to pitch, Demon Slayer.
Changed my avatar, goodbye Alan Sugar, hello George Carlin (one of my favorite human beings ever)
If you still don't subscribe our Polish channel please consider it :)
1.png

Forum statistics

Threads
115,173
Messages
1,087,836
Members
149,727
Latest member
wizard54
Top