The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Erk64 on June 08, 2007, 03:43:46 AM

Title: [RESOLVED] altering "slip damage" in RMXP
Post by: Erk64 on June 08, 2007, 03:43:46 AM
Be default, I believe that the "slip damage" option for status effects takes away 1/10 of your health per turn. I feel that this is far too potent, and I would love to find a way to alter it. However, I have this bad feeling that the only way to change it is by altering the script.

So, does anyone know how to change the "slip damage" options so that it would take away less HP per turn?
Title: Re: altering "slip damage" in RMXP
Post by: modern algebra on June 08, 2007, 05:26:24 AM
I think it requires scripting to alter slip damage  ;9
Title: Re: altering "slip damage" in RMXP
Post by: Erk64 on June 08, 2007, 05:08:02 PM
I assumed it would.   :( Does anyone know how to fix it?
Title: Re: altering "slip damage" in RMXP
Post by: Zeriab on June 08, 2007, 08:12:50 PM
This is indeed a scripting issue.

*movage*
Title: Re: altering "slip damage" in RMXP
Post by: Shinami on June 09, 2007, 07:34:28 PM
This is the part you want to change.

[spoiler=Script piece you want]

class Game_Battler
  def slip_damage_effect
    self.damage = self.maxhp / 10 #This is what you want to change.
    if self.damage.abs > 0
      amp = [self.damage.abs * 15 / 100, 1].max
      self.damage += rand(amp+1) + rand(amp+1) - amp
    end
    self.hp -= self.damage
    return true
  end
end

[/spoiler]
self.damage is the damage you will take.
self.maxhp is the poisoned target's max hp.
Change the line with "#This is what you want to change." and you'll be able to setup the slip damage however you want...if you know how to use conditional branches and how to check states in scripting, you could even make various kinds of slip damage. Have fun and if something don't make sense, just ask.
Title: Re: altering "slip damage" in RMXP
Post by: Erk64 on June 10, 2007, 05:25:23 AM
Okay, that should help. Thanks!
Title: Re: altering "slip damage" in RMXP [resolved]
Post by: Shinami on June 10, 2007, 10:05:52 AM
Always a pleasure. Never a chore. If you aren't sure how to do something involving the slip damage, just gimme a hollar. I'm busy tearing out clumps of hair with a scripting issue but I'm never too busy to try and answer questions.