diablosbud
Member
Well I really want to use Scroll Status Display by SephirothSpawn because it would easily add a small but wickedly cool effect to display status effects in my game. There is one problem though, I don't use SDK and everytime I take the SDK out (doesn't work if I don't) it won't scroll my status effects when displayed. Could someone please help me? Here is the script without the SDK pieces:
Code:
#==============================================================================
# ** Scroll Status Display
#------------------------------------------------------------------------------
# SephirothSpawn
# Version 1
# 2006-11-07
#------------------------------------------------------------------------------
# * Description :
#
# This script was designed to allow you to view all status your actors have
# by creating a scrolling plane.
#------------------------------------------------------------------------------
# * Instructions :
#
# Place The Script Below the SDK and Above Main.
#==============================================================================
#==============================================================================
# ** Plane_ScrollStatus
#==============================================================================
class Plane_ScrollStatus < Plane
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(actor_index, x, y, w, h, z = 105)
# Creates Viewport
v = Viewport.new(x, y, w, h)
v.z = z
super(v)
# Sets Actor
@actor = $game_party.actors[actor_index]
# Update
update
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# If States Change
unless @states == @actor.states
# Sets States
@states = @actor.states.dup
# Deletes Existing Bitmap
unless self.bitmap.nil?
self.bitmap.dispose
self.bitmap = nil
end
# States State Name Array
state_names = []
# Passes Through All States
for i in @states
# Adds States Name
state_names << $data_states[i].name
end
# Add Normal if No States
if state_names.empty?
state_names << 'Normal'
end
# Change State Names To String
state_names = "[ #{state_names.join(' / ')} ]"
# Creates Dummy Bitmap (To Measure Word Width)
dummy = Bitmap.new(32, 32)
# Measures Word Width
ox = dummy.text_size(state_names).width
# Creates Bitmap
bitmap = Bitmap.new(ox + self.viewport.rect.width, 32)
# Draws State Text
bitmap.draw_text(0, 0, ox, 32, state_names)
# Sets bitmap
self.bitmap = bitmap
end
# Adds to Offset
self.ox += 1
end
end
#==============================================================================
# ** Window_BattleStatus
#==============================================================================
class Window_BattleStatus < Window_Base
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_scrollstates_wbs_init initialize
alias seph_scrollstates_wbs_disp dispose
alias seph_scrollstates_wbs_updt update
alias seph_scrollstates_wbs_resh refresh
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Original Initialization
seph_scrollstates_wbs_init
# Creates Scroll States Plane Array
@scoll_states = []
# Adds Plane For Each Actor
for i in 0...$game_party.actors.size
x = self.x + i * 160 + 32
y = self.y + 112
@scoll_states << Plane_ScrollStatus.new(i, x, y, 128, 32)
end
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
# Dispose All Scroll Planes
@scoll_states.each {|x| x.dispose}
# Original Dispose
seph_scrollstates_wbs_disp
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Update All Scroll Planes
@scoll_states.each {|x| x.update}
# Original update
seph_scrollstates_wbs_updt
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Original Refresh
seph_scrollstates_wbs_resh
# Passes Through Each Actor
for i in 0...$game_party.actors.size
# If Leveled Up
if @level_up_flags[i]
# Turns Scroll Plane Invisible
@scoll_states[i].visible = false
# If Level Up Flag Not Found
else
# Clear Area
self.contents.fill_rect(i * 160 + 4, 96, 120, 32, Color.new(0, 0, 0, 0))
end
end
end
end
#==============================================================================
# ** Window_MenuStatus
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_scrollstatus_wms_init initialize
alias seph_scrollstatus_wms_disp dispose
alias seph_scrollstatus_wms_updt update
alias seph_scrollstatus_wms_rfsh refresh
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Original Initialization
seph_scrollstatus_wms_init
# Creates Scroll States Plane Array
@scoll_states = []
# Adds Plane For Each Actor
for i in 0...$game_party.actors.size
x = 160 + 154
y = self.y + i * 116 + 48
@scoll_states << Plane_ScrollStatus.new(i, x, y, 128, 32)
end
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
# Dispose All Scroll Planes
@scoll_states.each {|x| x.dispose}
# Original Dispose
seph_scrollstatus_wms_disp
end
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
# Update All Scroll Planes
@scoll_states.each {|x| x.update}
# Original update
seph_scrollstatus_wms_updt
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Original Refrsh
seph_scrollstatus_wms_rfsh
# Clears All State Text
for i in 0...$game_party.actors.size
self.contents.fill_rect(154, i * 116 + 32, 120, 32, Color.new(0, 0, 0, 0))
end
end
end