Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[Resolved] Are the default RMXP algorithms right for low 1-100 damage?

Hi hi,

I have a question regarding RMXP.

RMXP by default supports damage that is in the 100-10000 range. However, I'd like my game to have 1-100 damage ala Aveyond, etc. But I've heard that the default algorithms aren't suited for such low damage. Does anyone know why this is? Is it because the "variance" would have the damage vary too much? Like, 6 base damage with 15 variance could be 0 to 21 damage, which is a HUGE difference in a 1-100 damage game.

If RMXP's default algorithms ARE suited for low damage, does anyone have a suggestion of how I should achieve this low damage? Should I decrease all stats (STR, etc.) or P. Attack, P. Def, etc. or do script edits somewhere? I'm looking for level 1 damage to be around 1-5 and at the end of the game around 80-150.

I'd like the damage to be steady like normal. A base of 5 damage might vary from 4-6 or so. Not 2-10, you know. ^^ (This is excluding weakness / strength / etc.)

Thanks so much. =D
 
You could always just multiply the damage outcome by a percent, to yield a smaller number.

In Game_Battler 3, just find:
Code:
    # If hit occurs
    if hit_result == true
      # State Removed by Shock
      remove_states_shock
      # Substract damage from HP
      self.hp -= self.damage

Change that to:
Code:
    # If hit occurs
    if hit_result == true
      # State Removed by Shock
      remove_states_shock
      # Multiple by percent
      self.damage = Integer(self.damage * (5 / 100.0))
      # Substract damage from HP
      self.hp -= self.damage

Replace 5 with your damage. Must keep 100.0, 100.0 so it yields a float.

Other than that, you will have to alter the damage formula.
 
* points at user title *

Glad. Oh, and if you ever wanted to estimate how much damage is going to be done, here's a little method I made to test.
Code:
module TestDamage
  def self.attack_avg(attacker, target, times = 3)
    n = 0
    dummy = target.dup
    times.times do
      dummy.attack_effect(attacker)
      if dummy.damage.is_a?(Integer)
        n += dummy.damage
      end
    end
    return n / times
  end
  def self.skill_avg(attacker, target, skill, times = 3)
    n = 0
    dummy = target.dup
    times.times do
      dummy.skill_effect(attacker, skill)
      if dummy.damage.is_a?(Integer)
        n += dummy.damage
      end
    end
    return n / times
  end
  def self.attack_min_max(attacker, target, times = 3)
    n = []
    dummy = target.dup
    times.times do
      dummy.attack_effect(attacker)
      if dummy.damage.is_a?(Integer)
        n << dummy.damage
      end
    end
    return n.min, n.max
  end
  def self.skill_avg(attacker, target, skill, times = 3)
    n = []
    dummy = target.dup
    times.times do
      dummy.skill_effect(attacker, skill)
      if dummy.damage.is_a?(Integer)
        n << dummy.damage
      end
    end
    return n.min, n.max
  end
end

It performs x attacks/skill uses on dummy battlers and either returns the average of the test, or the min and max value. :)
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top