07-13-2013, 10:37 PM
I have looked at your 'Brenda's Visual Battlers' script and it is awesome (no surprise). However I am using an 11-pose actor graphics for my battlers, so creating extra graphics with no weapon and other weapons would be more tedious than I would like. Thanks for the suggestion.
So, I added the extra lines into the script and I got the following error from Charlie Fleeds Bitmap, Draw Face 1.7:
Capture.PNG (Size: 18.54 KB / Downloads: 5)
I am not sure exactly the issue with the script, but I have pasted Charlies Bitmap script below. Thanks for looking into it.
So, I added the extra lines into the script and I got the following error from Charlie Fleeds Bitmap, Draw Face 1.7:
Capture.PNG (Size: 18.54 KB / Downloads: 5)
I am not sure exactly the issue with the script, but I have pasted Charlies Bitmap script below. Thanks for looking into it.
Code:
#==============================================================================
# ** Bitmap, Draw Face ver. 1.7
# ** Author: Charlie Fleed
#==============================================================================
#==============================================================================
# ■ BITMAP
#==============================================================================
class Bitmap
attr_accessor :bg_color
#--------------------------------------------------------------------------
# *
#--------------------------------------------------------------------------
unless @charlie_fleed_bitmap_initialize
@charlie_fleed_bitmap_initialize = true
alias_method :cl_initialize, :initialize
def initialize(a, b = nil)
if b != nil
cl_initialize(a, b)
else
cl_initialize(a)
end
@bg_color = Color.new(61,52,109)
end
end
#--------------------------------------------------------------------------
# ● Draw Text Bordered
# actually a draw_text_shadowed method
#--------------------------------------------------------------------------
def draw_text_bordered(x, y, width, height, text, align = 1)
color2 = font.color.clone
font.color.set(0, 0, 0)
draw_text(x + 1, y + 1, width, height, text, align)
font.color = color2
draw_text(x, y, width, height, text, align)
end
#--------------------------------------------------------------------------
# ● Draw Text Bordered 2
#--------------------------------------------------------------------------
def draw_text_bordered_2(x, y, width, height, text, align = 1)
color2 = font.color.clone
font.color = @bg_color
draw_text(x + 1, y + 1, width, height, text, align)
draw_text(x + 1, y - 1, width, height, text, align)
draw_text(x - 1, y + 1, width, height, text, align)
draw_text(x - 1, y - 1, width, height, text, align)
font.color = color2
draw_text(x, y, width, height, text, align)
end
#--------------------------------------------------------------------------
# ● Draw Text Shadowed
#--------------------------------------------------------------------------
alias draw_text_shadowed draw_text_bordered
#--------------------------------------------------------------------------
# ● Draw Text Shadowed 2 (double shadow)
#--------------------------------------------------------------------------
def draw_text_shadowed_2(x, y, width, height, text, align = 1)
color2 = font.color.clone
font.color.set(0, 0, 0)
draw_text(x + 2, y + 1, width, height, text, align)
draw_text(x + 1, y + 2, width, height, text, align)
draw_text(x + 1, y + 1, width, height, text, align)
font.color = color2
draw_text(x, y, width, height, text, align)
end
end
#==============================================================================
# ■ RPG Cache
#==============================================================================
module RPG
module Cache
#--------------------------------------------------------------------------
# ● Face
#--------------------------------------------------------------------------
def self.face(filename, hue)
begin
self.load_bitmap("Graphics/Faces/", filename, hue)
rescue
self.load_bitmap("Graphics/Faces/", "", hue)
end
end
#--------------------------------------------------------------------------
# ● State
#--------------------------------------------------------------------------
def self.state(filename, hue)
begin
self.load_bitmap("Graphics/States/", filename, hue)
rescue
self.load_bitmap("Graphics/States/", "", hue)
end
end
#--------------------------------------------------------------------------
# ● Turn
#--------------------------------------------------------------------------
def self.turn(filename)
begin
self.load_bitmap("Graphics/Pictures/turns/", filename)
rescue
self.load_bitmap("Graphics/Pictures/turns/", "")
end
end
#--------------------------------------------------------------------------
# ● Style 3 Face
#--------------------------------------------------------------------------
def self.face_s3(filename, hue)
begin
self.load_bitmap("Graphics/Faces/", filename+"-s3", hue)
rescue
self.load_bitmap("Graphics/Faces/", "", hue)
end
end
end
end
#==============================================================================
# ■ WINDOW BASE
#==============================================================================
class Window_Base
#--------------------------------------------------------------------------
# ● Draw Actor Face
#--------------------------------------------------------------------------
def draw_actor_face_CF(actor, x, y, size = 0)
bitmap = RPG::Cache.face(actor.name, actor.character_hue)
return if bitmap == nil
cw = bitmap.width
ch = bitmap.height
if size > 0
dst_cw = size
dst_ch = size
else
dst_cw = bitmap.width
dst_ch = bitmap.height
end
dst_rect = Rect.new(x, y, dst_cw, dst_ch)
src_rect = Rect.new(0, 0, cw, ch)
self.contents.stretch_blt(dst_rect, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● Draw Actor Battle Status Face
#--------------------------------------------------------------------------
def draw_actor_battle_status_face(actor, x, y)
bitmap = RPG::Cache.face(actor.name + "-battlestatus", actor.character_hue)
return if bitmap == nil
cw = bitmap.width
ch = bitmap.height
dst_cw = bitmap.width
dst_ch = bitmap.height
dst_rect = Rect.new(x, y, dst_cw, dst_ch)
src_rect = Rect.new(0, 0, cw, ch)
self.contents.stretch_blt(dst_rect, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● Draw Actor Face Small
#--------------------------------------------------------------------------
def draw_actor_face_small(actor, x, y, size = 0)
bitmap = RPG::Cache.face(actor.name + "-small", actor.character_hue)
# Fallback
if bitmap == RPG::Cache.face("", actor.character_hue)
bitmap = RPG::Cache.face(actor.name, actor.character_hue)
end
return if bitmap == nil
cw = bitmap.width
ch = bitmap.height
if size > 0
dst_cw = size
dst_ch = size
else
dst_cw = bitmap.width
dst_ch = bitmap.height
end
dst_rect = Rect.new(x, y, dst_cw, dst_ch)
src_rect = Rect.new(0, 0, cw, ch)
self.contents.stretch_blt(dst_rect, bitmap, src_rect)
end
#--------------------------------------------------------------------------
# ● Draw State Icon
#--------------------------------------------------------------------------
def draw_state_icon(state_id, x, y, size = 24)
return if state_id == 0
bitmap = RPG::Cache.state($data_states[state_id].name, 0)
return if bitmap == nil
cw = bitmap.width
ch = bitmap.height
dst_cw = size
dst_ch = size
dst_rect = Rect.new(x, y, dst_cw, dst_ch)
src_rect = Rect.new(0, 0, cw, ch)
self.contents.stretch_blt(dst_rect, bitmap, src_rect)
end
end
Habs11