The RPG Maker Resource Kit

RMRK RPG Maker Creation => VX Ace => VXA Scripts Database => Topic started by: SoulPour777 on June 08, 2014, 07:50:36 AM

Title: Expanded Skill Description
Post by: SoulPour777 on June 08, 2014, 07:50:36 AM
Expanded Skill Description
Version: 1.0
Author: Soulpour777
Date: 6:59:02PM, Wednesday, May 28, 2014

Description


This is a rewrite of the Skill Window where, the user is able to add more description about their skills than the usual 2 line description. This is enabled by using notes.

Features


Screenshots

(https://rmrk.net/proxy.php?request=http%3A%2F%2Finfinitytears.files.wordpress.com%2F2014%2F05%2Fskill.jpg%3Fw%3D620&hash=43f67c35388a2a8da0a0ec16e23dc4deb6f558b9)

Instructions

To Use:
To add more description to the skill, just write the other skill description on that skill’s notes.

Script


Code: [Select]
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
# Expanded Skill Description
# Script: Soulpour777
# Script Date: 6:59:02PM, Wednesday, May 28, 2014
# Script Type: Menu
# Web URL: infinitytears.wordpress.com
# ------------------------------------------------------------------------------
# Description:
# This is a rewrite of the Skill Window where, the user is able to add more
# description about their skills than the usual 2 line description. This is
# enabled by using notes.
# ------------------------------------------------------------------------------
# To Use:
# To add more description to the skill, just write the other skill description
# on that skill's notes.
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
module Soulpour
  module Cherith
    # What is the background of the window?
    # Must be placed under the Parallaxes folder.
    Background = "Mountains1"
    # How many lines of information should be drawn in the Information Bar?
    Max_Info = 8
    # What is the X Value of the Skill Command?
    SkillCommand_X = 0
    # What is the Y value of the Window Skill List?
    Window_Item_Y = 50
    # What is the Y value of the Command Window for the Skill?
    CommandWindow_Y = 50
    # What is the opacity of the Commnand Window?
    CommandWindowOpacity = 20
    # What is the height of the Window Skill List?
    SkillList_Height = 120
    # What is the opacity of the Skill List?
    ItemWindowOpacity = 20
    # What is the Y value of the Help Window?
    HelpWindow_Y = 180
    # What is the opacity of the Help Window
    HelpWindowOpacity = 20
    # What is the height of the Help Window?
    HelpWindow_Height = Graphics.height - 190
    # What is the X value of the Window SkillList?
    SkillList_X = 0
    # How many columns should be displayed in the Skill List?
    SkillList_MaxColumn = 1
  end 
end


class Window_SkillCommand < Window_Command
  #--------------------------------------------------------------------------
  # * Window Height
  #-------------------------------------------------------------------------- 
  def window_height
    return Soulpour::Cherith::SkillList_Height
  end
end

class Window_Help < Window_Base
  #--------------------------------------------------------------------------
  # * Set Item
  #     item : Skills and items etc.
  #--------------------------------------------------------------------------
  def set_item(item)
    set_text(item ? item.description + "\n" + item.note : "")
  end
end


class Scene_Skill < Scene_ItemBase
  #--------------------------------------------------------------------------
  # * Start Processing
  #--------------------------------------------------------------------------
  def start
    super
    create_help_window
    create_command_window
    create_item_window
  end 
  #--------------------------------------------------------------------------
  # * Create Command Window
  #--------------------------------------------------------------------------
  def create_command_window
    wy = @help_window.height
    @command_window = Window_SkillCommand.new(Soulpour::Cherith::SkillCommand_X, wy)
    @command_window.y = Soulpour::Cherith::CommandWindow_Y
    @command_window.opacity = Soulpour::Cherith::CommandWindowOpacity
    @command_window.viewport = @viewport
    @command_window.help_window = @help_window
    @command_window.actor = @actor
    @command_window.set_handler(:skill,    method(:command_skill))
    @command_window.set_handler(:cancel,   method(:return_scene))
    @command_window.set_handler(:pagedown, method(:next_actor))
    @command_window.set_handler(:pageup,   method(:prev_actor))
  end 
  #--------------------------------------------------------------------------
  # * Create Item Window
  #--------------------------------------------------------------------------
  def create_item_window
    gw = Graphics.width
    x = @command_window.width
    y = Soulpour::Cherith::Window_Item_Y
    cww = @command_window.width
    cmh = @command_window.height
    @item_window = Window_SkillList.new(x, y, gw - cww, Soulpour::Cherith::SkillList_Height)
    @item_window.actor = @actor
    @item_window.viewport = @viewport
    @item_window.opacity = Soulpour::Cherith::ItemWindowOpacity
    @item_window.help_window = @help_window
    @item_window.set_handler(:ok,     method(:on_item_ok))
    @item_window.set_handler(:cancel, method(:on_item_cancel))
    @command_window.skill_window = @item_window
  end 
  #--------------------------------------------------------------------------
  # * Create Help Window
  #--------------------------------------------------------------------------
  def create_help_window
    @help_window = Window_Help.new(Soulpour::Cherith::Max_Info)
    @help_window.viewport = @viewport
    @help_window.opacity = Soulpour::Cherith::HelpWindowOpacity
    @help_window.y = Soulpour::Cherith::HelpWindow_Y
    @help_window.height = Soulpour::Cherith::HelpWindow_Height
  end 
  #--------------------------------------------------------------------------
  # * Create Background
  #--------------------------------------------------------------------------
  def create_background
    @background_sprite = Plane.new
    @background_sprite.bitmap = Cache.parallax(Soulpour::Cherith::Background)
  end
 
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_basic
    @background_sprite.ox += 1
  end
  #--------------------------------------------------------------------------
  # * Free Background
  #--------------------------------------------------------------------------
  def dispose_background
    @background_sprite.dispose
  end 
 
  #--------------------------------------------------------------------------
  # * Get Skill's User
  #--------------------------------------------------------------------------
  def user
    @actor
  end
  #--------------------------------------------------------------------------
  # * [Skill] Command
  #--------------------------------------------------------------------------
  def command_skill
    @item_window.activate
    @item_window.select_last
  end
  #--------------------------------------------------------------------------
  # * Item [OK]
  #--------------------------------------------------------------------------
  def on_item_ok
    @actor.last_skill.object = item
    determine_item
  end
  #--------------------------------------------------------------------------
  # * Item [Cancel]
  #--------------------------------------------------------------------------
  def on_item_cancel
    @item_window.unselect
    @command_window.activate
  end
  #--------------------------------------------------------------------------
  # * Play SE When Using Item
  #--------------------------------------------------------------------------
  def play_se_for_item
    Sound.play_use_skill
  end
  #--------------------------------------------------------------------------
  # * Use Item
  #--------------------------------------------------------------------------
  def use_item
    super
    @item_window.refresh
  end
  #--------------------------------------------------------------------------
  # * Change Actors
  #--------------------------------------------------------------------------
  def on_actor_change
    @command_window.actor = @actor
    @item_window.actor = @actor
    @command_window.activate
  end
 
 
end

#==============================================================================
# ** Window_SkillList
#------------------------------------------------------------------------------
#  This window is for displaying a list of available skills on the skill window.
#==============================================================================

class Window_SkillList < Window_Selectable
  #--------------------------------------------------------------------------
  # * Column Max
  #-------------------------------------------------------------------------- 
  def col_max
    return Soulpour::Cherith::SkillList_MaxColumn
  end
end

Credit



Support


Please PM me here are RMRK or comment below for support.

Known Compatibility Issues

If you are using note tags, please change the limit of your description on the script. Chances are, even your note tags on your skills would be placed inside the skill description.

Terms of Use


For my terms: http://infinitytears.wordpress.com/terms-of-use/
For this script: Free for non-commercial or commercial games.
Title: Re: Expanded Skill Description
Post by: modern algebra on June 14, 2014, 02:06:33 PM
That's a good idea SoulPour777! I've always thought that even two lines was too little space for skill descriptions.
Title: Re: Expanded Skill Description
Post by: SoulPour777 on June 14, 2014, 02:58:48 PM
Thanks MA, hope the script helps other people out there too :)