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
---------------------------
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.
#--------------------------------------------------------------------------
# ● 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