Script Request Template
This is a request for a compatibility fix
RMXP or RMVX:
XP
Detailed Description:
Is there any way that this (down there) can work with ACBS - Atoa Custom Battle System 2.0 Beta?
http://rmvxp.co.cc/thread-340.html?
I get an error when trying to attack.
Line 4017 NoMethodError occurred.
Undefined method 'dmg_mirror=' for nilClass
I think it has something to do with the indices of the enemies.
I am not using the SDK. These are the only two conflicting scripts.
If someone has any specific questions, please ask.
This is a request for a compatibility fix
RMXP or RMVX:
XP
Detailed Description:
Is there any way that this (down there) can work with ACBS - Atoa Custom Battle System 2.0 Beta?
http://rmvxp.co.cc/thread-340.html?
Code:
# Random Monster Groups
# by RPG Advocate
#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
# This class handles enemies. It's used within the Game_Troop class
# ($game_troop).
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# * Object Initialization
# troop_id : troop ID
# member_index : troop member index
# random_index : random troop index
#--------------------------------------------------------------------------
alias rmg_initialize initialize
def initialize(troop_id, member_index, random_index = -1)
rmg_initialize(troop_id, member_index)
@random_index = member_index
@random_index = member_index
if random_index >= 0
@random_index = random_index
end
end
#--------------------------------------------------------------------------
# * Get Battle Screen X-Coordinate
#--------------------------------------------------------------------------
def screen_x
return $data_troops[@troop_id].members[@random_index].x
end
#--------------------------------------------------------------------------
# * Get Battle Screen Y-Coordinate
#--------------------------------------------------------------------------
def screen_y
return $data_troops[@troop_id].members[@random_index].y
end
end
#==============================================================================
# ** Game_Troop
#------------------------------------------------------------------------------
# This class deals with troops. Refer to "$game_troop" for the instance of
# this class.
#==============================================================================
class Game_Troop
#--------------------------------------------------------------------------
# * Setup
# troop_id : troop ID
#--------------------------------------------------------------------------
def setup(troop_id)
# Set array of enemies who are set as troops
@enemies = []
troop = $data_troops[troop_id]
# Split array name for random troop system
first = troop.name[0]
second = troop.name[1]
third = troop.name[2]
# Create troop error messages
error1 = "Error: Minimum size for random groups "
error2 = "must not exceed maxmimum size."
error3 = error1 + error2
error4 = "Error: There must be at least as many "
error5 = "monsters in the monster group as "
error6 = "the maximum number of monsters that can "
error7 = "appear in the random monster group."
error8 = error4 + error5 + error6 + error7
error9 = "Error: Number of monsters to use in "
error10 = "random generation is greater than "
error11 = "the size of the monster group."
error12 = error9 + error10 + error11
# Compare troop data and apply accordingly
if first >= 49 && first <= 56
if second >= 49 && second <= 56
if third >= 49 && third <= 56
min = first - 48
max = second - 48
used = third - 48
difference = second - first
if min > max
print(error3)
exit
end
if max > troop.members.size
print(error8)
exit
end
if used > troop.members.size
print(error12)
exit
end
if difference != 0
troop_size = rand(difference + 1) + min
else
troop_size = min
end
for j in 0..troop_size - 1
enemy_number = rand(used)
@enemies.push(Game_Enemy.new(troop_id, enemy_number, j))
end
return
end
end
end
# Apply troop data
for j in 0...troop.members.size
enemy = $data_enemies[troop.members[j].enemy_id]
if enemy != nil
@enemies.push(Game_Enemy.new(troop_id, j))
end
end
end
end
I get an error when trying to attack.
Line 4017 NoMethodError occurred.
Undefined method 'dmg_mirror=' for nilClass
I think it has something to do with the indices of the enemies.
I am not using the SDK. These are the only two conflicting scripts.
If someone has any specific questions, please ask.