Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - KK20

3001
Welcome! / Re: Hi.
October 19, 2012, 07:24:12 pm
Another lurker-turned member (I can practically copy-paste your post and it applies to me as well...just change 2008 to 2010). Lurkers need to become members and keep this place thriving with life!

Looking forward to your scripts ~
3002
You didn't add your code to be called in the update method:
  alias update_zhud_later update
  def update
    update_sp_y if actor != nil
    draw_gold
    update_zhud_later
  end
If you can't even understand what you're doing, I'd advise throwing in comments for each line of code saying specifically what each thing should do. At least then I can understand the idea you have and point to you what should be done instead.
3003
Probably a pointless question since you mentioned multiplayer, but are you allowing the hotkeys to be mapped to other keys, such as using YUIOP instead of 12345 to call upon skills and items? Or allow full keyboard mapping (we aren't restricted to just 10 hotkeys)?
3004
I can't guarantee anything as I have nothing to work with here. Add the draw_gold to the class Hud. In the Hud update method, put draw_gold in there. Change 'contents' to 'bitmap' in your code (contents is the name Window classes use).

You can play around with it after that.
3005
^ From what it looks like, yes. I'm not much of an opinionated person, especially for random topics like these. But to add on to that smoking question, here's an excerpt from my Drugs class I'm taking.
Background: ShowHide
Who decides what is fair? Many states now mandate that smoking not be allowed in specified areas (restaurants, bars, hospitals, etc.). Many places of business have similar restrictions. Smokers complain that this imposes on their rights since their behavior is being controlled by these mandates, and not a few have hinted that such mandates violate their rights. Physicians and health-care advocates identify the consequences of secondhand smoke on the bodies of nonsmokers who have the misfortune to be in the vicinity of a smoker as justification for these restrictions.

However, more than public spaces are affected. Suppose you are entertaining guests for a night, or for a weekend. During the course of that time you discover that one or more of your guests have lit cigarettes in your home or apartment, without the permission that common courtesy would require. Or, imagine that you have met someone who you find exciting to be around, an intellectual challenge, and who causes your knees to feel a bit weak. The only problem is that you are a nonsmoker, and s/he smokes. This person is unwilling to give up this vice, and informs you in no uncertain terms that you must either accept his/her habit, or end the relationship.
Questions: ShowHide
1. Do you think that cigarettes can be enough of an issue to break up a relationship? What about other drugs? Have you ever known such a situation to occur?

2. Does the majority of the population, in this case the estimated 75% who are nonsmokers, have the right to make laws regulating the 25% who are smokers?  Before you answer this, remember that 95% of smokers are addicted to nicotine. Does this fact influence your answer?  Why or why not?
They're kinda yes/no questions (the questions start off with 'do', 'does', and 'have'). I am merely content with just reading other people's views.
3006
Quote from: shintashi on October 18, 2012, 09:24:32 pm
I'm trying to get something like "(icon) X 99" to display in the top right of my screen in the Blizz ABS battle system, and I have no idea how to do it successfully. I've tried placing the following -code- in strategic places in both the 3rd section of Blizz ABS (below the script for "draw_lskill"), and tried a similar tactic in the ZELDA HUD script, but could not get anything to appear at all.
Probably because the method isn't even getting called AT ALL? Just because you have the method in your game, that doesn't mean it's automatically going to run it. My recommendation is to put that method in Scene_Map and in the class's update call your method draw_gold.

Also, this
bitmap = RPG::Cache.icon($data_skills[50].icon_name)
is pretty bad practice. You use the name of the icon file, like so
bitmap = RPG::Cache.icon("035-Item04")


Also, welcome back. I take it you gave up on that Class-Actor-Skill hybrid that you had me working on for weeks?  :P
3007
RMXP Script Database / Re: [XP] Skill Equipment System
October 18, 2012, 10:51:16 pm
Quote from: Lightning on October 18, 2012, 12:00:58 am
Oh I know. You gotta remember though, I made this three years ago, only one year after I had just started programming.
Oh, I just guessed that after all these years you didn't notice it. It was only like a 2 minute fix, so yeah...I guess that's where my assumption came from.

Quote from: Lightning on October 18, 2012, 12:00:58 am
Though don't get your hopes up too much, I've been pretty busy with school lately, and when I'm not, I'm usually relaxing from school. Been finding it hard to find any sort of motivation for programming lately.
That's what I'm here for, right?  :naughty:
Version 1.4: ShowHide
#===============================================================================
# Skill Equipment System
# Author game_guy
# Editted by KK20
# Version 1.4
#-------------------------------------------------------------------------------
# Intro:
# Okay well its a system that makes it so you can't use all of your skills at
# once while in battle. Instead you have to equip them. Now here's the catch.
# Every skill has its own "ap" so when its equipped it takes some of the actor's
# ap. That way you can't use all of your skills and it adds some uniqueness to
# the game.
#
# Features:
# Equip Skills Strategically
# Only Equip Limited Amount of Skills Using Ap
# Have Different Starting Ap for Each Actor
# Have Different Ap Gain for Each Actor per Level Up
# Have Different Ap for Each Skill
# Have an Exit Scene for When the Skill Equipment Closes
#
# Instructions:
# Okay so these could be confusing but lets try and get through this.
# Okay they're not that confusing. Okay so go down where it says
# # Begin Config
# And do all of you're configuration there.
#
# Now theres some stuff you need to know.
#
# When adding a skill it does not automatically equip it. So to equip a
# skill use this
# $game_actors[actor_id].equip_skill(skill_id)
# To unequip a skill use this
# $game_actors[id].remove_skill(skill_id)
#
# Now it will not equip it unless there's enough ap left. So you can either do
# this $game_actors[id].add_map(amount) to add to max ap or you can do this
# $game_actors[id].clear_skills to unequip all skills and give all ap back.
# Just to make it a bit easier.
#
# You can always remove max ap to by doing this
# $game_actors[id].remove_map(amount) but note that doing that clears the
# equipped skills as well to avoid any problems.
#
# To open the skill equipment scene use this.
# $scene = $scene = Scene_SkillEquip.new(actor_id)
# To tell if a skill is equipped or not you'll notice the text is greyed out.
# That means it equipped. If its white it means it can be equipped.
# In the scene though to equip/unequip things just press the action button.
#
# Well thats about it.
# Credits:
# game_guy ~ for making it
# Ethan ~ for the idea of it
# Branden ~ beta testing
#
# Enjoy and give credits.
#===============================================================================
# [ KK20's change notes ]
#
# V 1.4
#   - Cleaned up and modified a bit of the existing methods in Game_Actor
#   - Fixed the AP display in the window
#   - Allow user to show the skill's AP cost instead of its SP cost in the scene
#   - Added new feature: Permanent Skills
#     + Skills can be permanently equipped
#     + Script call for this is as follows:
#       $game_actors[id].learn_skill(skill_id, true)
#   - Added new feature: Skill Limitations
#     + Certain skills cannot be equipped together at the same time
#===============================================================================
module GameGuy
  #---------------------------------------------------------------------------
  # ApWord     = This is the word that displays when showing the ap the actor
  #              has.
  #---------------------------------------------------------------------------
  ApWord       = "AP"
  #---------------------------------------------------------------------------
  # StartingAp = The starting ap for every actor. Different amounts can be
  #              defined below at # Config Starting Ap.
  #---------------------------------------------------------------------------
  StartingAp   = 5
  #---------------------------------------------------------------------------
  # ApCost     = The default ap cost for all skills. Different amounts can be
  #              defined below at # Config Ap Costs.
  #---------------------------------------------------------------------------
  ApCost       = 1
  #---------------------------------------------------------------------------
  # ApGain     = The max ap gained when an actor levels up. Different amounts
  #              can be defined below at # Config Sp Gain
  #---------------------------------------------------------------------------
  ApGain       = 2
  #---------------------------------------------------------------------------
  # DisplayAP  = Will display AP costs instead of SP in the scene.
  #              Set to true if you wish to use this. Use false otherwise.
  #---------------------------------------------------------------------------
  DisplayAP    = true
  #---------------------------------------------------------------------------
  # ExitScene  = The scene it goes to when the Skill Equipment closes.
  #
  #---------------------------------------------------------------------------
  ExitScene    = Scene_Menu.new
  #---------------------------------------------------------------------------
  # SkillLimit = A series of arrays that represent what skills cannot
  #              be equipped at the same time.
  #  Examples: [[2,3]]
  #           >> Greater Heal and Mass Heal cannot be equipped together
  #
  #            [[7,10],[7,11],[7,12],[8,10],[8,11],[8,12],[9,10],[9,11],[9,12]]
  #           >> Cannot equip any type of fire spell along with an ice spell
  #
  #            [[53,54,55,56]]
  #           >> Can only equip one: Sharp, Barrier, Resist, Blink
  #---------------------------------------------------------------------------
  SkillLimit = [[7,10],[7,11],[7,12],[8,10],[8,11],[8,12],[9,10],[9,11],[9,12]]
# SkillLimit = [] # <--If you do not wish to use this feature, do this
 
  def self.start_ap(id)
    case id
    #-------------------------------------------------------------------------
    # Config Starting Ap
    # Use this when configuring
    # when actor_id then return starting_ap
    #-------------------------------------------------------------------------
    when 1 then return 10 # Actor 1 : Aluxes
    when 2 then return 8  # Actor 2 : Basil
    end
    return StartingAp
  end
  def self.skill_ap(id)
    case id
    #-------------------------------------------------------------------------
    # Config Ap Costs
    # Use this when configuring
    # when skill_id then return ap_cost
    #-------------------------------------------------------------------------
    when 1 then return 2 # Skill Id 1 : Heal
    when 7 then return 3 # Skill Id 7 : Fire
    when 57 then return 6
    end
    return ApCost
  end
  def self.ap_gain(id)
    case id
    #-------------------------------------------------------------------------
    # Config Ap gain
    # Use this when configuring
    # when actor_id then return ap_gain
    #-------------------------------------------------------------------------
    when 1 then return 4 # Actor 1 : Aluxes
    end
    return ApGain
  end
end

#==============================================================================
# Game_Actor
#------------------------------------------------------------------------------
# Added stuff for Skill Equipping.
#==============================================================================
class Game_Actor < Game_Battler
  attr_accessor :eskills
  attr_accessor :skills
  attr_accessor :skillap
  attr_accessor :skillmaxap
 
  alias gg_add_stuff_lat_ap setup
  def setup(actor_id)
    @actor = $data_actors[actor_id]
    @skillap = GameGuy.start_ap(actor_id)
    @skillmaxap = GameGuy.start_ap(actor_id)
    @eskills = []
    return gg_add_stuff_lat_ap(actor_id)
  end
 
  def skill_learn?(skill_id)
    return @skills.include?(skill_id) || @eskills.include?(skill_id)
  end
 
  def learn_skill(skill_id, perm = false)
    if perm and skill_id > 0
      remove_skill(skill_id) if @skills.include?(skill_id)
      @eskills.delete(skill_id)
      @skills.push(skill_id)
      @skills.sort!
    elsif skill_id > 0 and not skill_learn?(skill_id)
      @eskills.push(skill_id)
      @eskills.sort!
    end
  end
 
  def forget_skill(skill_id)
    remove_skill(skill_id)
    @eskills.delete(skill_id)
  end
 
  def equip_skill(skill_id)
    return unless skill_id > 0 && @eskills.include?(skill_id)
    potential_ap = @skillap
    removal_list = []
    GameGuy::SkillLimit.each{|set|
      if set.include?(skill_id)
        set.each{|id|
          if @skills.include?(id) && @eskills.include?(id) && !removal_list.include?(id)
            potential_ap += GameGuy.skill_ap(id)
            removal_list.push(id)
          end
        }
      end
    }
    if potential_ap >= GameGuy.skill_ap(skill_id)
      removal_list.each{|id| remove_skill(id)}
      @skillap -= GameGuy.skill_ap(skill_id)
      @skills.push(skill_id)
      @skills.sort!
      return true
    else
      return false
    end
  end
 
  def remove_skill(id)
    @skillap += GameGuy.skill_ap(id) if (@skills.include?(id) and @eskills.include?(id))
    @skills.delete(id)
  end
 
  def add_map(n)
    @skillmaxap += n
    clear_skills
    @skillap = @skillmaxap
  end
 
  def remove_map(n)
    @skillmaxap -= n
    if @skillmaxap < 0
      @skillmaxap = 0
    end
    if @skillap > @skillmaxap
      @skillap = @skillmaxap
    end
    clear_skills
  end
 
  def exp=(exp)
    @exp = [[exp, 9999999].min, 0].max
    while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
      @level += 1
      @skillap += GameGuy.ap_gain(@id)
      @skillmaxap += GameGuy.ap_gain(@id)
      for j in $data_classes[@class_id].learnings
        if j.level == @level
          learn_skill(j.skill_id)
        end
      end
    end
    while @exp < @exp_list[@level]
      @level -= 1
    end
    @hp = [@hp, self.maxhp].min
    @sp = [@sp, self.maxsp].min
  end
 
  def clear_skills
    deleting_these = @skills.clone
    deleting_these.each{|id| @skills.delete(id) if @eskills.include?(id) }
    @skillap = @skillmaxap
  end
 
end

#==============================================================================
# Window_GGAPSkill
#------------------------------------------------------------------------------
# Copy of Window_Skill but just slightly different.
#==============================================================================
class Window_GGAPSkill < Window_Selectable
  def initialize(actor)
    super(0, 128, 640, 352)
    @actor = actor
    @column_max = 2
    refresh
    self.index = 0
  end
  def skill
    return @data[self.index]
  end
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...@actor.eskills.size
      skill = $data_skills[@actor.eskills[i]]
      if skill != nil
        @data.push(skill)
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  def draw_item(index)
    skill = @data[index]
    if @actor.skill_can_use?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(skill.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
    self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
  end
  def update_help
    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
  end
end

#==============================================================================
# Window_GGAPSkillEquip
#------------------------------------------------------------------------------
# Window uses for equipping skills.
#==============================================================================
class Window_GGAPSkillEquip < Window_Selectable
  def initialize(actor)
    super(0, 128, 640, 352)
    @actor = actor
    @column_max = 2
    refresh
    self.index = 0
  end
  def skill
    return @data[self.index]
  end
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 0...@actor.eskills.size
      skill = $data_skills[@actor.eskills[i]]
      if skill != nil
        @data.push(skill)
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  def draw_item(index)
    skill = @data[index]
    if @actor.skills.include?(skill.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % 2 * (288 + 32)
    y = index / 2 * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(skill.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 204, 32, skill.name, 0)
    if GameGuy::DisplayAP
      self.contents.draw_text(x + 232, y, 48, 32, GameGuy.skill_ap(skill.id).to_s, 2)
    else
      self.contents.draw_text(x + 232, y, 48, 32, skill.sp_cost.to_s, 2)
    end
  end
  def update_help
    @help_window.set_text(self.skill == nil ? "" : self.skill.description)
  end
end

#==============================================================================
# Window_GGActorAp
#------------------------------------------------------------------------------
# Window used to display AP and Actor name.
#==============================================================================
class Window_GGActorAp < Window_Base
  def initialize(actor)
    super(0,64,640,64)
    self.contents = Bitmap.new(width-32,height-32)
    @actor = $game_actors[actor]
    refresh
  end
  def refresh
    self.contents.clear
    ap = GameGuy::ApWord
    self.contents.draw_text(0, 0, 640, 32, "#{@actor.name}")
    self.contents.draw_text(0, 0, 640-32, 32, "#{ap} #{@actor.skillap} / " +
                                           "#{@actor.skillmaxap}", 2)
  end
end

#==============================================================================
# Scene_Skill
#------------------------------------------------------------------------------
# Just slightly modded the main method.
#==============================================================================


#==============================================================================
# Scene_SkillEquip
#------------------------------------------------------------------------------
# The scene that deals with equipping skills.
#==============================================================================
class Scene_SkillEquip
  def initialize(actor_id=1)
    @id = actor_id
  end
  def main
    @actor = $game_actors[@id]
    @help_window = Window_Help.new
    @skill_window = Window_GGAPSkillEquip.new(@actor)
    @skill_window.help_window = @help_window
    @status_window = Window_GGActorAp.new(@actor.id)
    Graphics.transition
    loop do
      Graphics.update
      Input.update
      update
      if $scene != self
        break
      end
    end
    @help_window.dispose
    @skill_window.dispose
    @status_window.dispose
  end
  def update
    @help_window.update
    @skill_window.update
    @status_window.update
    if @skill_window.active
      update_skill
      return
    end
  end
  def update_skill
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = GameGuy::ExitScene
      return
    end
    if Input.trigger?(Input::C)
      skill = @skill_window.skill
      if @actor.skills.include?(skill.id)
        $game_system.se_play($data_system.decision_se)
        @actor.remove_skill(skill.id)
      else
        result = @actor.equip_skill(skill.id)
        if result
          $game_system.se_play($data_system.decision_se)
        else
          $game_system.se_play($data_system.buzzer_se)
        end
      end
      @status_window.refresh
      @skill_window.refresh
      return
    end
  end
end
I recall reading those forum posts months back about your situation and I deeply understand your position.
3008
RMXP Script Database / Re: [XP] Skill Equipment System
October 17, 2012, 11:38:18 pm
Looking into that as I type this (avoiding homework FTW).

Also, now that I fully understand how this system works, I'd like to point out that the variable @eeskills is entirely unnecessary as long as you replace any instance of it in conditional statements with @skills instead.

Quote from: Noctis on October 17, 2012, 05:54:18 pm
In addition to that, how would I make 1 skill un-equip another skill?
Do you mean like you have 'slots' to equip skills (universal)? Or do you mean something more like "You can only know a fire spell or an ice spell, but you cannot have both equipped at the same time, but I could care less about the other skills you have equipped" (strict)?
3009
Quote from: Mr. Cloud on October 16, 2012, 02:25:33 am
he's only a few months older than me and making (according to him) 86 k a year working remotly for a company in NYC form San Francisco as a software developer.
And it's people like this that makes me go "What the hell am I doing wrong? I feel so far behind compared to everyone else." Still debating whether to stick to my Media and Game Design track or switch over to Software Engineer before I start taking those core classes.
3010
RPG Maker Scripts / Re: The Scripter's Challenge!
October 16, 2012, 02:40:58 pm
Yeah, the fact we don't have a lot of people who would be willing to participate makes this hard to implement.
Quote from: Heretic86 on October 16, 2012, 04:53:44 am
I think I am a decent scripter, but not great by any means.  I sometimes find that I run out of ideas, and have nothing to challenge me.  I want to be a better scripter than I feel I am.  But to achieve that, I need a Goal, and something to challenge me, which helps me increase my potential.  And I think a few of us are probably in the same boat.
Lurk around the script requests board. Help people with their scripts. That's how I got better. If something sounded easy to do, even if I had no idea where to begin, I still looked into it. And I'm still learning new tricks and ideas on how to implement features while being an asset to the community.
3011
If you noticed, I deleted that +5 I mentioned earlier while adding 5 to any instance you had the method equip. When you get @right_window.index, the only values you will receive are 0 to 4. If you call equip, these will replace your default equipment slots (Weapon, Shield, Helm, Armor, Acces.). So the @right_window.index + 5 ensures that you will be equipping to slots 5 to 9.

The whole @data[self.index + 5] thing really blew me away though. If you only have two shards available to choose from (as provided by the demo), and you select the first shard, item would get @data[5]...which doesn't have anything stored in that element and would return nil. That was the reason why you said you couldn't equip anything at all.
3012
I was able to make the shard equip to its shard slot.
Spoiler: ShowHide
#==============================================================================
# ** Shard Equip
#------------------------------------------------------------------------------
#  Allows each character to equip two Weapon Shards and three Armor Shards.
#==============================================================================
class Window_EquipShardLeft < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 256, 368, 224)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 80, 0)
    draw_actor_level(@actor, 250, 0)
    self.contents.draw_text(4, 32, 64, 32, "ATK")
    self.contents.draw_text(170, 32, 64, 32, "PDef")
    self.contents.draw_text(4, 64, 64, 32, "MDef")
    self.contents.draw_text(170, 64, 64, 32, "EVA")
    self.contents.draw_text(4, 118, 64, 32, "STR")
    self.contents.draw_text(170, 118, 64, 32, "DEX")
    self.contents.draw_text(4, 150, 64, 32, "AGI")
    self.contents.draw_text(170, 150, 64, 32, "INT")
    self.contents.draw_text(60, 32, 36, 32, @actor.atk.to_s, 2)
    self.contents.draw_text(226, 32, 36, 32, @actor.pdef.to_s, 2)
    self.contents.draw_text(60, 64, 36, 32, @actor.mdef.to_s, 2)
    self.contents.draw_text(226, 64, 36, 32, @actor.eva.to_s, 2)
    self.contents.draw_text(60, 118, 36, 32, @actor.str.to_s, 2)
    self.contents.draw_text(226, 118, 36, 32, @actor.dex.to_s, 2)
    self.contents.draw_text(60, 150, 36, 32, @actor.agi.to_s, 2)
    self.contents.draw_text(226, 150, 36, 32, @actor.int.to_s, 2)
    if @new_atk != nil
      self.contents.font.color = system_color
      if @new_atk == @actor.atk
        self.contents.draw_text(110, 32, 20, 32, "=")
        self.contents.font.color = normal_color
      elsif @new_atk > @actor.atk
        self.contents.draw_text(110, 32, 20, 32, "↑")
        self.contents.font.color = text_color(3)
      elsif @new_atk < @actor.atk
        self.contents.draw_text(110, 32, 20, 32, "↓")
        self.contents.font.color = text_color(2)
      end
      self.contents.draw_text(126, 32, 36, 32, @new_atk.to_s, 2)
    end
    if @new_pdef != nil
      self.contents.font.color = system_color
      if @new_pdef == @actor.pdef
        self.contents.draw_text(276, 32, 20, 32, "=")
        self.contents.font.color = normal_color
      elsif @new_pdef > @actor.pdef
        self.contents.draw_text(276, 32, 20, 32, "↑")
        self.contents.font.color = text_color(3)
      elsif @new_pdef < @actor.pdef
        self.contents.draw_text(276, 32, 20, 32, "↓")
        self.contents.font.color = text_color(2)
      end
      self.contents.draw_text(292, 32, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil
      self.contents.font.color = system_color
      if @new_mdef == @actor.mdef
        self.contents.draw_text(110, 64, 20, 32, "=")
        self.contents.font.color = normal_color
      elsif @new_mdef > @actor.mdef
        self.contents.draw_text(110, 64, 20, 32, "↑")
        self.contents.font.color = text_color(3)
      elsif @new_mdef < @actor.mdef
        self.contents.draw_text(110, 64, 20, 32, "↓")
        self.contents.font.color = text_color(2)
      end
      self.contents.draw_text(126, 64, 36, 32, @new_mdef.to_s, 2)
    end
    if @new_eva != nil
      self.contents.font.color = system_color
      if @new_eva == @actor.eva
        self.contents.draw_text(276, 64, 20, 32, "=")
        self.contents.font.color = normal_color
      elsif @new_eva > @actor.eva
        self.contents.draw_text(276, 64, 20, 32, "↑")
        self.contents.font.color = text_color(3)
      elsif @new_eva < @actor.eva
        self.contents.draw_text(276, 64, 20, 32, "↓")
        self.contents.font.color = text_color(2)
      end
      self.contents.draw_text(292, 64, 36, 32, @new_eva.to_s, 2)
    end
    if @new_str != nil
      self.contents.font.color = system_color
      if @new_str == @actor.str
        self.contents.draw_text(110, 118, 20, 32, "=")
        self.contents.font.color = normal_color
      elsif @new_str > @actor.str
        self.contents.draw_text(110, 118, 20, 32, "↑")
        self.contents.font.color = text_color(3)
      elsif @new_str < @actor.str
        self.contents.draw_text(110, 118, 20, 32, "↓")
        self.contents.font.color = text_color(2)
      end
      self.contents.draw_text(126, 118, 36, 32, @new_str.to_s, 2)
    end
    if @new_dex != nil
      self.contents.font.color = system_color
      if @new_dex == @actor.dex
        self.contents.draw_text(276, 118, 20, 32, "=")
        self.contents.font.color = normal_color
      elsif @new_dex > @actor.dex
        self.contents.draw_text(276, 118, 20, 32, "↑")
        self.contents.font.color = text_color(3)
      elsif @new_dex < @actor.dex
        self.contents.draw_text(276, 118, 20, 32, "↓")
        self.contents.font.color = text_color(2)
      end
      self.contents.draw_text(292, 118, 36, 32, @new_dex.to_s, 2)
    end
    if @new_agi != nil
      self.contents.font.color = system_color
      if @new_agi == @actor.agi
        self.contents.draw_text(110, 150, 20, 32, "=")
        self.contents.font.color = normal_color
      elsif @new_agi > @actor.agi
        self.contents.draw_text(110, 150, 20, 32, "↑")
        self.contents.font.color = text_color(3)
      elsif @new_agi < @actor.agi
        self.contents.draw_text(110, 150, 20, 32, "↓")
        self.contents.font.color = text_color(2)
      end
      self.contents.draw_text(126, 150, 36, 32, @new_agi.to_s, 2)
    end
    if @new_int != nil
      self.contents.font.color = system_color
      if @new_int == @actor.int
        self.contents.draw_text(276, 150, 20, 32, "=")
        self.contents.font.color = normal_color
      elsif @new_int > @actor.int
        self.contents.draw_text(276, 150, 20, 32, "↑")
        self.contents.font.color = text_color(3)
      elsif @new_int < @actor.int
        self.contents.draw_text(276, 150, 20, 32, "↓")
        self.contents.font.color = text_color(2)
      end
      self.contents.draw_text(292, 150, 36, 32, @new_int.to_s, 2)
    end
  end
  #--------------------------------------------------------------------------
  # * Set parameters after changing equipment
  #     new_atk  : attack power after changing equipment
  #     new_pdef : physical defense after changing equipment
  #     new_mdef : magic defense after changing equipment
  #--------------------------------------------------------------------------
  def set_new_parameters(new_atk, new_pdef, new_mdef, new_eva, new_str, new_dex, new_agi, new_int)
    if @new_atk != new_atk or @new_pdef != new_pdef or @new_mdef != new_mdef or @new_eva != new_eva or @new_str != new_str or @new_dex != new_dex or @new_agi != new_agi or @new_int != new_int
      @new_atk = new_atk
      @new_pdef = new_pdef
      @new_mdef = new_mdef
      @new_eva = new_eva
      @new_str = new_str
      @new_dex = new_dex
      @new_agi = new_agi
      @new_int = new_int
      refresh
    end
  end
end

class Window_EquipShardRight < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 64, 368, 192)
    self.contents = Bitmap.new(width - 32, height - 32)
    @actor = actor
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # * Item Acquisition
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @data = []
    @data.push($data_weapons[@actor.weapon_shard1_id])
    @data.push($data_weapons[@actor.weapon_shard2_id])
    @data.push($data_armors[@actor.armor_shard1_id])
    @data.push($data_armors[@actor.armor_shard2_id])
    @data.push($data_armors[@actor.armor_shard3_id])
    @item_max = @data.size
    self.contents.font.color = system_color
    self.contents.draw_text(4, 32 * 0, 92, 32, "Weapon Shard")
    self.contents.draw_text(4, 32 * 1, 92, 32, "Weapon Shard")
    self.contents.draw_text(4, 32 * 2, 92, 32, "Armor Shard")
    self.contents.draw_text(4, 32 * 3, 92, 32, "Armor Shard")
    self.contents.draw_text(4, 32 * 4, 92, 32, "Armor Shard")
    if @data[5] != nil
      draw_item_name(@data[5], 92, 32 * 0)
    else
      self.contents.font.color = text_color(7)
      self.contents.draw_text(100, 32 * 0, 120, 32, "No Equipment")
    end
    if @data[6] != nil
      draw_item_name(@data[6], 92, 32 * 1)
    else
      self.contents.font.color = text_color(7)
      self.contents.draw_text(100, 32 * 1, 120, 32, "No Equipment")
    end
    if @data[7] != nil
      draw_item_name(@data[7], 92, 32 * 2)
    else
      self.contents.font.color = text_color(7)
      self.contents.draw_text(100, 32 * 2, 120, 32, "No Equipment")
    end
    if @data[8] != nil
      draw_item_name(@data[8], 92, 32 * 3)
    else
      self.contents.font.color = text_color(7)
      self.contents.draw_text(100, 32 * 3, 120, 32, "No Equipment")
    end
    if @data[9] != nil
      draw_item_name(@data[9], 92, 32 * 4)
    else
      self.contents.font.color = text_color(7)
      self.contents.draw_text(100, 32 * 4, 120, 32, "No Equipment")
    end
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

class Window_EquipShard < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor      : actor
  #     equip_type : equip region (0-3)
  #--------------------------------------------------------------------------
  def initialize(actor, equip_type)
    super(368, 64, 272, 416)
    @actor = actor
    @equip_type = equip_type
    @item_max = 1
    @column_max = 1
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Item Acquisition
  #--------------------------------------------------------------------------
  def item
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    # Add equippable weapons
    if @equip_type == 5
      element = SEG_LEGACY::SHARD::WELEMENT
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and $data_weapons[i].element_set.include?(element)
          @data.push($data_weapons[i])
        end
      end
    elsif @equip_type == 6
      element = SEG_LEGACY::SHARD::WELEMENT
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and $data_weapons[i].element_set.include?(element)
          @data.push($data_weapons[i])
        end
      end
    elsif @equip_type != 0..6
      element = SEG_LEGACY::SHARD::AELEMENT
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and $data_armors[i].guard_element_set.include?(element)
          @data.push($data_armors[i])
        end
      end
    end
    # Add blank page
    @data.push(nil)
    # Make a bit map and draw all items
    @item_max = @data.size
    self.contents = Bitmap.new(width - 32, row_max * 32)
    for i in 0...@item_max-1
      draw_item(i)
    end
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    x = 4 + index % 1 * (288 + 32)
    y = index * 32
    case item
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    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, 0)
    self.contents.draw_text(x + 190, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 210, y, 24, 32, number.to_s, 2)
  end
  #--------------------------------------------------------------------------
  # * Help Text Update
  #--------------------------------------------------------------------------
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

class Scene_EquipShard
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor_index : actor index
  #     equip_index : equipment index
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, equip_index = 0)
    @actor_index = actor_index
    @equip_index = equip_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    @spriteset = Spriteset_Map.new
    # Get actor
    @actor = $game_party.actors[@actor_index]
    # Make windows
    @help_window = Window_Help.new
    @left_window = Window_EquipShardLeft.new(@actor)
    @right_window = Window_EquipShardRight.new(@actor)
    @item_window1 = Window_EquipShard.new(@actor, 5)
    @item_window2 = Window_EquipShard.new(@actor, 6)
    @item_window3 = Window_EquipShard.new(@actor, 7)
    @item_window4 = Window_EquipShard.new(@actor, 8)
    @item_window5 = Window_EquipShard.new(@actor, 9)
    # Associate help window
    @right_window.help_window = @help_window
    @item_window1.help_window = @help_window
    @item_window2.help_window = @help_window
    @item_window3.help_window = @help_window
    @item_window4.help_window = @help_window
    @item_window5.help_window = @help_window
    # Set cursor position
    @right_window.index = @equip_index
    refresh
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @spriteset.dispose
    @help_window.dispose
    @left_window.dispose
    @right_window.dispose
    @item_window1.dispose
    @item_window2.dispose
    @item_window3.dispose
    @item_window4.dispose
    @item_window5.dispose
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    # Set item window to visible
    @item_window1.visible = (@right_window.index == 0)
    @item_window2.visible = (@right_window.index == 1)
    @item_window3.visible = (@right_window.index == 2)
    @item_window4.visible = (@right_window.index == 3)
    @item_window5.visible = (@right_window.index == 4)
    # Get currently equipped item
    item1 = @right_window.item
    # Set current item window to @item_window
    case @right_window.index
    when 0
      @item_window = @item_window1
    when 1
      @item_window = @item_window2
    when 2
      @item_window = @item_window3
    when 3
      @item_window = @item_window4
    when 4
      @item_window = @item_window5
    end
    # If right window is active
    if @right_window.active
      # Erase parameters for after equipment change
      @left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil)
    end
    # If item window is active
    if @item_window.active
      # Get currently selected item
      item2 = @item_window.item
      # Change equipment
      last_hp = @actor.hp
      last_sp = @actor.sp
      @actor.equip(@right_window.index+5, item2 == nil ? 0 : item2.id)
      # Get parameters for after equipment change
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      new_eva = @actor.eva
      new_str = @actor.str
      new_dex = @actor.dex
      new_agi = @actor.agi
      new_int = @actor.int
      # Return equipment
      @actor.equip(@right_window.index+5, item1 == nil ? 0 : item1.id)
      @actor.hp = last_hp
      @actor.sp = last_sp
      # Draw in left window
      @left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_eva, new_str, new_dex, new_agi, new_int)
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @left_window.update
    @right_window.update
    @item_window.update
    refresh
    # If right window is active: call update_right
    if @right_window.active
      update_right
      return
    end
    # If item window is active: call update_item
    if @item_window.active
      update_item
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when right window is active)
  #--------------------------------------------------------------------------
  def update_right
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(1)
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If equipment is fixed
      if @actor.equip_fix?(@right_window.index)
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Activate item window
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # If R button was pressed
    if Input.trigger?(Input::R)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To next actor
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    # If L button was pressed
    if Input.trigger?(Input::L)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To previous actor
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when item window is active)
  #--------------------------------------------------------------------------
  def update_item
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Activate right window
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Play equip SE
      $game_system.se_play($data_system.equip_se)
      # Get currently selected data on the item window
      item = @item_window.item
      # Change equipment
      @actor.equip(@right_window.index+5, item == nil ? 0 : item.id)
      # Activate right window
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      # Remake right window and item window contents
      @right_window.refresh
      @item_window.refresh
      return
    end
  end
end
Now it's a matter of getting the shards to give a boost, rewrite how the stats are displayed and refreshed in your scene, showing the shard as equipped, and refreshing all of your @item_window's whenever a shard is equipped.
3013
Script Troubleshooting / Re: Scene help
October 16, 2012, 04:15:45 am
Your names are drawn in @charnames. Nowhere in the Items scene does that ever get updated.

First off, add this into your class Window_ActorName
  alias update_and_refresh update
  def update
    update_and_refresh
    refresh
  end
Also, replace your refresh method with
  def refresh
    self.contents.clear
    self.contents.font.name = "Calibri"
    self.contents.font.size = 14
    @item_max = $game_party.actors.size
    y = 0
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      if self.index == i
        draw_actor_name(actor, 26, 30+y)
      else
        draw_actor_name(actor, 20, 30+y)
      end
      y += 15
    end
  end
And in your Scene update method, be sure to add:
@charnames.update
3014
Script Troubleshooting / Re: Scene help
October 16, 2012, 03:23:12 am
Er, I don't understand what you're doing? idunnolulz
Sounds more like an updating problem than a "saving index to a variable".
3015
Well, first off we locate where your main error is taking place. That would be when you press 'C' when equipping your shard.
    if Input.trigger?(Input::C)
      # Play equip SE
      $game_system.se_play($data_system.equip_se)
      # Get currently selected data on the item window
      item = @item_window.item
      # Change equipment
      @actor.equip(@right_window.index, item == nil ? 0 : item.id)
      # Activate right window
      @right_window.active = true
      @item_window.active = false
      @item_window.index = -1
      # Remake right window and item window contents
      @right_window.refresh
      @item_window.refresh
      return
    end
I threw a couple print functions in there to test @item_window.item and @right_window.index. Upon opening the scene, I press 'C' twice. I got nil and 0 respectively.

I looked at how you did @item_window.item, and noticed you did this:
  def item
    return @data[self.index + 5]
  end
Me:  :O.o:
Still trying to comprehend the script itself.
3016
RMXP Script Database / Re: [XP] Skill Shop
October 15, 2012, 09:29:47 pm
herp

Didn't know about that. I didn't test it (if that was any indication), it just looked logical to me. Probably would work if you use parenthesis around the statement.
return (@skills.include?(skill_id) or @eskills.include?(skill_id))
Glad to have pointed that out for you! All scripts must be perfect!
Big IMG: ShowHide
3017
Well I have to get the actual script done first before I even begin considering online play. It's just one of those things hanging on the bottom of my checklist for now.

You are correct that it is a TBS. The game can have up to 4 players on one map at a time (debating on whether or not to add more). It was also a plan of mine to release the engine when I finish most of it for anyone to add or edit their own designs.

I haven't really spent the time to study RMX-OS nor do I have any experience with online games at all (priorities blah blah). But if and when I get to it, I'll be sure to come back here for future help. Thanks for that essay!  ;)
3018
RMXP Script Database / Re: [XP] Skill Shop
October 15, 2012, 01:36:38 pm
Try this.
class Game_Actor < Game_Battler
  def skill_learn?(skill_id)
    return @skills.include?(skill_id) or @eskills.include?(skill_id)
  end
end
3019
Script Requests / Re: "Skill Shop" System ?!
October 15, 2012, 11:36:34 am
Yeah, I find it weird that the search function on CP didn't work. Going into the script database, CTRL + F, and type "Skill Shop" = profit.
3020
If and when I eventually get around to it, I'd like to make my Advance Wars online compatible while still having offline properties. Not even sure where I'd begin with that...