Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: LiTTleDRAgo on September 09, 2013, 07:50:45 am

Title: [XP][VX][VXA] Cannibalism
Post by: LiTTleDRAgo on September 09, 2013, 07:50:45 am
Cannibalism
Authors: LiTTleDRAgo
Version: 1.06
Type: Battle Add-on
Key Term: Battle Add-on



Introduction

Based on Cannibalism script (http://grimoirecastle.wordpress.com/2011/12/25/cannibalism/) by Kread-EX for VX Ace
Basically you can eat enemies and absorbing their stat, the change is permanent


Features




Screenshots

(http://4.bp.blogspot.com/-DTHFClhFlAk/Ui2rFTG6oaI/AAAAAAAAAUg/R2Ec2lMQwvU/s320/cannibalism.JPG)


Script

Here (http://littledrago.blogspot.com/2013/09/rgss-cannibalism.html)


Instructions

In the script


Compatibility

Not tested with Custom Battle System


Credits and Thanks




Author's Notes

Enjoy ~
Title: Re: [XP][VX][VXA] Cannibalism
Post by: Voidone on March 06, 2017, 01:24:06 am
Hello,

I am new to the whole RMXP, scripting, everything else  :^_^\': so if I am making any obvious mistakes I apologize.

I am working on a game that could use this mechanic perfectly. when attempting to get it running and bumbling about until I could bumble no further I am being told every time I use the devour skill "undefined method for 'is_devour_skill?' for #<Game_Enemy:0x6cd1f78>."

The error message
Spoiler: ShowHide
---------------------------
Regenesis
---------------------------
Script 'Scene_Debug' line 5185: NoMethodError occurred.

undefined method `is_devour_skill' for #<Game_Enemy:0x6cd1f78>
---------------------------
OK   
---------------------------


The portion of the code that the error is found in. I "tried" to fix it myself but after three days of trying I think it may be beyond my abilities.
Spoiler: ShowHide
  #--------------------------------------------------------------------------
  # ● Devours the enemy
  #--------------------------------------------------------------------------
  def devour(user, item)
    target, user, devour_ok = self, user, false
    target, user = user, @subject if LiTTleDRAgo::VXA
    if item.is_a?(RPG::Skill) && is_devour_skill?(item)&&user.is_a?(Game_Actor)
      if target.is_a?(Game_Enemy) && target.can_devour? && target.dead?
        if (user.devoured[target.enemy_id] || 0) < target.devour_limit
           exp_is_gone  = LiTTleDRAgo::EXCLUDE_IF_DEVOUR[0]
           gold_is_gone = LiTTleDRAgo::EXCLUDE_IF_DEVOUR[1]
           item_is_gone = LiTTleDRAgo::EXCLUDE_IF_DEVOUR[2]
           gold_is_gone |= target.get_note=~target.cannibal_tags[:exclude_gold]
           exp_is_gone  |= target.get_note=~target.cannibal_tags[:exclude_exp]
           item_is_gone |= target.get_note=~target.cannibal_tags[:exclude_item]
           target.instance_variable_set(:@gold_replace, 0) if gold_is_gone
           target.instance_variable_set(:@exp_replace, 0)  if exp_is_gone
           target.instance_variable_set(:@drop_replace, 0) if item_is_gone
          (0..7).each do |i|
            n = target.devour_param_bonus(i)
            user.cannibal_bonus[i] += n
            if n != 0
              if n > 0
                text  = "#{user.name} #{LiTTleDRAgo::VOCAB_DEVOURED_PLUS} #{n}"
                text += " #{$data_system.words.params[i]}."
              else
                text  = "#{user.name} #{LiTTleDRAgo::VOCAB_DEVOURED_MIN} #{n}"
                text += " #{$data_system.words.params[i]}."
              end
              devour_ok = true
              if LiTTleDRAgo.scene.is_a?(Scene_Battle) && !LiTTleDRAgo::VXA
                LiTTleDRAgo.scene.devour_logs << text
              else
                devour_log(text)
              end
            end
          end
          user.devoured[target.enemy_id] ||= 0
          user.devoured[target.enemy_id] += 1 if devour_ok
        end
      end
    end


Love the script if I could figure it out though
Moral of the story=help, I have no idea how but I broke something
Title: Re: [XP][VX][VXA] Cannibalism
Post by: KK20 on March 06, 2017, 03:53:29 am
I looked at the script download and I'm seeing it as this

  def devour(user, item)
    target, user, devour_ok = self, user, false
    target, user = user, @subject if LiTTleDRAgo::VXA
    if item.is_a?(RPG::Skill) && devour_skill?(item) && user.is_a?(Game_Actor)

Why does yours say is_devour_skill?

Also, line 5185 in Scene_Debug? Exactly how are you inserting scripts?
Title: Re: [XP][VX][VXA] Cannibalism
Post by: LiTTleDRAgo on March 06, 2017, 04:02:11 am
Ups, sorry... That script hasn't been updated for a long time, it used some of deprecated method of my core engine.

~ Updated to 1.06 ~

Please redownload the script again and tell me the result.
Title: Re: [XP][VX][VXA] Cannibalism
Post by: Voidone on March 06, 2017, 04:10:37 am
IT WORKS!! Thank you so much!