The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Puddings on September 26, 2006, 12:42:15 AM

Title: How to create Zombie status effect?
Post by: Puddings on September 26, 2006, 12:42:15 AM
I was wondering how to create a status-illness called Zombie (as in FF series) where when your hero is afflicted, Heal would deal damage to him and he will be strong against Darkness attacks and weak against Light attacks? No experience is received afterwards.

I hope someone can help me out thanks  :D
Title: Re: How to create Zombie status effect?
Post by: Blizzard on September 26, 2006, 11:53:15 AM
The only thing you can´t make in the database is that you can´t make him weak against light and you can´t make him get damage instead of healing. Somewhere in your Game_Battler script (don´t know which number) in "def skill_effect" should be these lines:

      last_hp = self.hp
      self.hp -= self.damage
      effective |= self.hp != last_hp
      effective |= states_plus(skill.plus_state_set)
      effective |= states_minus(skill.minus_state_set)


change it to

      last_hp = self.hp
      self.damage = -self.damage if self.damage < 0 and self.state?(ZOMBIE_STATUS_ID)
      self.damage = (self.damage * 1.5).to_i if skill.element_set.include?(LIGHT_ELEMENT_ID) and self.state?(ZOMBIE_STATUS_ID)
      self.hp -= self.damage
      effective |= self.hp != last_hp
      effective |= states_plus(skill.plus_state_set)
      effective |= states_minus(skill.minus_state_set)


Replace ZOMBIE_STATUS_ID and LIGHT_ELEMENT_ID wth the appropriate IDs from your database.
     
Title: Re: How to create Zombie status effect?
Post by: Puddings on September 27, 2006, 01:37:54 AM
Umm.. I tried changing the script and replace ZOMBIE_STATUS_ID and LIGHT_ELEMENT_ID with ID from my database. It's 018 for Zombie and 007 for Light Attribute. The problem is, when I run the game, I got an error message. Syntax error I think...
Title: Re: How to create Zombie status effect?
Post by: Tsunokiette on September 27, 2006, 02:00:20 AM
Change 018 to 18 and 007 to 7.

There's your syntax.

@Blizzard - I just learned something new, yay!
Title: Re: How to create Zombie status effect?
Post by: Puddings on September 27, 2006, 02:15:41 AM
Wee...now my game has Zombie status, and it works just fine! Thanks  ;D
Title: Re: How to create Zombie status effect?
Post by: Blizzard on September 27, 2006, 11:58:26 AM
:scripter: