[XP][VX][VXA] Cannibalism

Started by LiTTleDRAgo, September 09, 2013, 07:50:45 am

Previous topic - Next topic

LiTTleDRAgo

September 09, 2013, 07:50:45 am Last Edit: March 06, 2017, 04:04:09 am by LiTTleDRAgo
Cannibalism
Authors: LiTTleDRAgo
Version: 1.06
Type: Battle Add-on
Key Term: Battle Add-on



Introduction

Based on Cannibalism script by Kread-EX for VX Ace
Basically you can eat enemies and absorbing their stat, the change is permanent


Features


  • Look at Introduction




Screenshots




Script

Here


Instructions

In the script


Compatibility

Not tested with Custom Battle System


Credits and Thanks


  • LiTTleDRAgo

  • Kread-EX for the idea




Author's Notes

Enjoy ~

Voidone

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

KK20

March 06, 2017, 03:53:29 am #2 Last Edit: March 06, 2017, 03:54:41 am by KK20
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?

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

LiTTleDRAgo

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.

Voidone