Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[RMXP] Help with Scroll Status Display by SephirothSpawn

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
 
Well, from what I know...

Code:
class Plane_ScrollStatus < Plane

The class "Plane" that "Plane_ScrollStatus" inherits from is a defined method either within the SDK or the MACL (Method and Class Library), if you don't plan on using them, you'll have to copy "class Plane" from the respective script system its defined in.

If you don't want to use either the SDK or the MACL, you'll have to find where class Plane is located in (you're not going to find it by CTRL+SHIFT+F because they're actually seperate files in Sephs Test Bed V 4.) The 'scripts' for SDK and MACL are located in the RSC Hidden Files directory, but their contents is encrypted. You'll have to either have to use the Search function or go to gamebaker.com or CreationAsylum to find the SDK or the MACL in origional text form. If you copy class Plane and place it somewhere above the Status Scroll script, this script *Might* work.

If all else fails, I'd start using the SDK/MACL if it doesn't conflict with other *important* scripts, so States Scroll will work. Copy the "RSC Hidden Files" directory from the Test Bed into your game, and don't forget to copy over the "Required Scripts" into your game.
 
Yea I couldn't find the Plane class anywere by searching in SDK, RSC Require and MACL. I was wondering if someone could please find it for me because I attempted to on every script and couldn't and SDK conflicts with tons of scripts I have please/
 

khmp

Sponsor

The Plane class is built into the RGSS and is a hidden class. You won't see it in either the SDK or MACL. The script you showed shows no SDK logging. I wonder why it requires that and/or the MACL. Would you be willing to create a demo it might have to do with the way the scripts were installed or something else minor? If you are worried about privacy just PM me the link if you want or post it here so others can have a shot at it.
 
It's working, but only on the default menu. I am now wondering if someone could help me edit Window_Base so that it will every time it displays status, it scrolls like that. It doesnt require SDK, MACL or RSC Require.

EDIT: I have an edited version of Scene_Base to display battlers instead of the fronts of spritesets here it is:

Code:
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     x      : window x-coordinate
  #     y      : window y-coordinate
  #     width  : window width
  #     height : window height
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    super()
    @windowskin_name = $game_system.windowskin_name
    self.windowskin = RPG::Cache.windowskin(@windowskin_name)
    self.x = x
    self.y = y
    self.width = width
    self.height = height
    self.z = 100
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    # Dispose if window contents bit map is set
    if self.contents != nil
      self.contents.dispose
    end
    super
  end
  #--------------------------------------------------------------------------
  # * Get Text Color
  #     n : text color number (0-7)
  #--------------------------------------------------------------------------
  def text_color(n)
    case n
    when 0
      return Color.new(255, 255, 255, 255)
    when 1
      return Color.new(128, 128, 255, 255)
    when 2
      return Color.new(255, 128, 128, 255)
    when 3
      return Color.new(128, 255, 128, 255)
    when 4
      return Color.new(128, 255, 255, 255)
    when 5
      return Color.new(255, 128, 255, 255)
    when 6
      return Color.new(255, 255, 128, 255)
    when 7
      return Color.new(192, 192, 192, 255)
    else
      normal_color
    end
  end
  #--------------------------------------------------------------------------
  # * Get Normal Text Color
  #--------------------------------------------------------------------------
  def normal_color
    return Color.new(255, 255, 255, 255)
  end
  #--------------------------------------------------------------------------
  # * Get Disabled Text Color
  #--------------------------------------------------------------------------
  def disabled_color
    return Color.new(255, 255, 255, 128)
  end
  #--------------------------------------------------------------------------
  # * Get System Text Color
  #--------------------------------------------------------------------------
  def system_color
    return Color.new(192, 224, 255, 255)
  end
  #--------------------------------------------------------------------------
  # * Get Crisis Text Color
  #--------------------------------------------------------------------------
  def crisis_color
    return Color.new(255, 255, 64, 255)
  end
  #--------------------------------------------------------------------------
  # * Get Knockout Text Color
  #--------------------------------------------------------------------------
  def knockout_color
    return Color.new(255, 64, 0)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    # Reset if windowskin was changed
    if $game_system.windowskin_name != @windowskin_name
      @windowskin_name = $game_system.windowskin_name
      self.windowskin = RPG::Cache.windowskin(@windowskin_name)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Graphic
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
bitmap = RPG::Cache.battler(actor.battler_name, actor.battler_hue)
cw = bitmap.width
ch = bitmap.height
wr = (1.0 * bitmap.width) / (1.0 * bitmap.height)
nw = (88 * wr)
src_rect = Rect.new(0, 0, cw, ch)
dst_rect = Rect.new(x-24, y-76, nw, 88)
self.contents.stretch_blt(dst_rect, bitmap, src_rect)
end
  #--------------------------------------------------------------------------
  # * Draw Name
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_name(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 120, 32, actor.name)
  end
  #--------------------------------------------------------------------------
  # * Draw Class
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_class(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 236, 32, actor.class_name)
  end
  #--------------------------------------------------------------------------
  # * Draw Level
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_level(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, "Lv")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 32, y, 24, 32, actor.level.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Make State Text String for Drawing
  #     actor       : actor
  #     width       : draw spot width
  #     need_normal : Whether or not [normal] is needed (true / false)
  #--------------------------------------------------------------------------
  def make_battler_state_text(battler, width, need_normal)
    # Get width of brackets
    brackets_width = self.contents.text_size("[]").width
    # Make text string for state names
    text = ""
    for i in battler.states
      if $data_states[i].rating >= 1
        if text == ""
          text = $data_states[i].name
        else
          new_text = text + "/" + $data_states[i].name
          text_width = self.contents.text_size(new_text).width
          if text_width > width - brackets_width
            break
          end
          text = new_text
        end
      end
    end
    # If text string for state names is empty, make it [normal]
    if text == ""
      if need_normal
        text = "[Normal]"
      end
    else
      # Attach brackets
      text = "[" + text + "]"
    end
    # Return completed text string
    return text
  end
  #--------------------------------------------------------------------------
  # * Draw State
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  def draw_actor_state(actor, x, y, width = 120)
    text = make_battler_state_text(actor, width, true)
    self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
    self.contents.draw_text(x, y, width, 32, text)
  end
  #--------------------------------------------------------------------------
  # * Draw EXP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_exp(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 24, 32, "E")
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 24, y, 84, 32, actor.exp_s, 2)
    self.contents.draw_text(x + 108, y, 12, 32, "/", 1)
    self.contents.draw_text(x + 120, y, 84, 32, actor.next_exp_s)
  end
  #--------------------------------------------------------------------------
  # * Draw HP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  def draw_actor_hp(actor, x, y, width = 144)
    # Draw "HP" text string
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    # Calculate if there is draw space for MaxHP
    if width - 32 >= 108
      hp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      hp_x = x + width - 48
      flag = false
    end
    # Draw HP
    self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
    # Draw MaxHP
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
      self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw SP
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     width : draw spot width
  #--------------------------------------------------------------------------
  def draw_actor_sp(actor, x, y, width = 144)
    # Draw "SP" text string
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    # Calculate if there is draw space for MaxHP
    if width - 32 >= 108
      sp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      sp_x = x + width - 48
      flag = false
    end
    # Draw SP
    self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
    # Draw MaxSP
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
      self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Parameter
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     type  : parameter type (0-6)
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      parameter_name = $data_system.words.atk
      parameter_value = actor.atk
    when 1
      parameter_name = $data_system.words.pdef
      parameter_value = actor.pdef
    when 2
      parameter_name = $data_system.words.mdef
      parameter_value = actor.mdef
    when 3
      parameter_name = $data_system.words.str
      parameter_value = actor.str
    when 4
      parameter_name = $data_system.words.dex
      parameter_value = actor.dex
    when 5
      parameter_name = $data_system.words.agi
      parameter_value = actor.agi
    when 6
      parameter_name = $data_system.words.int
      parameter_value = actor.int
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, parameter_name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Draw Item Name
  #     item : item
  #     x    : draw spot x-coordinate
  #     y    : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
end
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top