02-08-2010, 05:30 AM
Okay, I just ripped this from one of my demos.
Well, it's virtually the same patch I use for systems like Momomo's Demon Picture Book (the original Bestiary script) or Trickster's Steal/Scan script.
Well, it's virtually the same patch I use for systems like Momomo's Demon Picture Book (the original Bestiary script) or Trickster's Steal/Scan script.
Paste this below your script
Code:
#==============================================================================
# ** Draw Actor Battler patch
#------------------------------------------------------------------------------
# This draws an actor battler
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Draw Graphic
# battler : battler
# x : draw spot x-coordinate
# y : draw spot y-coordinate
# width : width of battler image (default to 128 wide)
# height : height of battler image (default to 128 long)
#--------------------------------------------------------------------------
def draw_actor_battler(battler,x,y,width= 128, height= 128)
bitmap = RPG::Cache.battler(battler.battler_name, battler.battler_hue)
if DEFAULT_ENEMY_ID.include?(battler.id)
cw = bitmap.width
ch = bitmap.height
src_rect = Rect.new(0, 0, cw, ch)
x = x + (cw / 2 - x) if cw / 2 > x
self.contents.blt(x - cw / 2, y - ch, bitmap, src_rect, opacity)
else
w = bitmap.width
h = bitmap.height
zoom_x = w / cell_divider(battler.id, MNK_FRAMES_ACTOR, MNK_FRAMES)
zoom_y = h / cell_divider(battler.id, MNK_POSES_ACTOR, MNK_POSES)
dest_rect = Rect.new(x, y, zoom_x*2, zoom_y*2)
src_rect = Rect.new(0, 0, zoom_x, zoom_y)
self.contents.stretch_blt(dest_rect, bitmap, src_rect, opacity)
end
end
#--------------------------------------------------------------------------
# * Cell Divider
# battler_id : id number of battler (enemy or actor)
# divider_check : array to divide cells by custom actor or enemy
# divider_standard : standard number to divide by
#--------------------------------------------------------------------------
def cell_divider(battler_id, divider_check, divider_standard)
dcheck = {}
divided_cell = divider_standard
dcheck = divider_check
if dcheck != nil
if dcheck.include?(battler_id)
divided_cell = dcheck[battler_id] if dcheck[battler_id] != nil
end
end
return divided_cell
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end