Laxius Soul Forever Heroes Maiden Maiden Odessa When the Light Dies

RMXP Help =Scripts Included=

RMXP Help =Scripts Included=

Postby Despero6 » Sat Nov 27, 2010 1:15 pm

I noticed there's a general lack of Help when It comes to RMXP, so, to Ease burden, this is like a request and help topic. Scripts, tutorials, and all other RMXP things can be asked. It depends on who can answer. I hope this makes it easier for people to use RMXP.
Despero6 - Usukuragari no Idaten ...
ImageImage


Image
User avatar
Despero6
DreamLord of Myst
 
Posts: 592
Joined: Wed May 05, 2010 1:57 pm
Location: Traveling through the Internet

Re: RMXP Help =Scripts Included=

Postby ShadetheMystic » Wed Dec 01, 2010 6:25 pm

First of all, let me say that i think this is an excellant idea; since this place seems to get more regular traffic then some of the actual RM support sites, I think odds are better that problems will be solved and people will be helped here.

On to brass tacks, I've been trying to edit the equip menu to remove a few slots I don't need (helmets and shields), but I haven't been able to figure out what lines of code need to go. I figured I had to look under Window_EquipRight, but I don't know which lines to delete, and I try not to do things the trial and error way where scripts are concerned. If anyone has any idea what I need to do to get this done and over with, I will be eternally grateful.
Raven: You have us, Rowen...if you want, we'll be your family.
Rowen: Even the crazy man?
Homard: Especially the crazy man! Every girl needs a pet!

Mina: I like him. Reminds me of me Uncle Fred.
Simona: Is Uncle Fred senile, too?
Mina: No, but he thinks he is.
User avatar
ShadetheMystic
Bard
 
Posts: 91
Joined: Sat Sep 18, 2010 6:04 pm

Re: RMXP Help =Scripts Included=

Postby jyarceus1993 » Thu Dec 02, 2010 11:17 am

I think the only person who's experienced with scripts is Zeriab.I'm sure he can help....I'm a dunce at script handling but I'll try to edit that and see what happens.
Spoiler: show
Image

Image
Spoiler: show
Image

La shai'a waqi'on motlaq bal kollon momken-Altair
User avatar
jyarceus1993
DreamLord of Myst
 
Posts: 14471
Joined: Wed Apr 28, 2010 3:03 pm
Location: Chennai,India

Re: RMXP Help =Scripts Included=

Postby Despero6 » Sat Dec 04, 2010 12:00 am

ShadetheMystic wrote:First of all, let me say that i think this is an excellant idea; since this place seems to get more regular traffic then some of the actual RM support sites, I think odds are better that problems will be solved and people will be helped here.

On to brass tacks, I've been trying to edit the equip menu to remove a few slots I don't need (helmets and shields), but I haven't been able to figure out what lines of code need to go. I figured I had to look under Window_EquipRight, but I don't know which lines to delete, and I try not to do things the trial and error way where scripts are concerned. If anyone has any idea what I need to do to get this done and over with, I will be eternally grateful.


Alright, I think I may have a solution, but just to be safe, make a backup of Scripts incase this doesn't work!

Window_EquiptRight

Shields is keyword armor 1
Helmets is keyword armor 3

so:

def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id]) Delete
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id]) Delete
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1) Delete
self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3) Delete
self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
draw_item_name(@data[0], 92, 32 * 0)
draw_item_name(@data[1], 92, 32 * 1) Delete
draw_item_name(@data[2], 92, 32 * 2)
draw_item_name(@data[3], 92, 32 * 3) Delete
draw_item_name(@data[4], 92, 32 * 4)
end

If This works then YAY, if not, you got a backup
Despero6 - Usukuragari no Idaten ...
ImageImage


Image
User avatar
Despero6
DreamLord of Myst
 
Posts: 592
Joined: Wed May 05, 2010 1:57 pm
Location: Traveling through the Internet

Re: RMXP Help =Scripts Included=

Postby ShadetheMystic » Sat Dec 11, 2010 3:00 pm

Thanks for the suggestion, Despero. I do appreciate it.

I tried it out (took me a few days because my rig was in the shop) and when I tested it, this is what happened.

Image

So I'm thinking there's still a bit more to be done with this.

EDIT: Ok, never mind, i figured it out, although Despero did point me in the right direction.

The code has to be changed from this:

def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor1_id])
@data.push($data_armors[@actor.armor2_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
draw_item_name(@data[0], 92, 32 * 0)
draw_item_name(@data[1], 92, 32 * 1)
draw_item_name(@data[2], 92, 32 * 2)
draw_item_name(@data[3], 92, 32 * 3)
draw_item_name(@data[4], 92, 32 * 4)
end

to this:

def refresh
self.contents.clear
@data = []
@data.push($data_weapons[@actor.weapon_id])
@data.push($data_armors[@actor.armor3_id])
@data.push($data_armors[@actor.armor4_id])
@item_max = @data.size
self.contents.font.color = system_color
self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor3)
self.contents.draw_text(5, 32 * 2, 92, 32, $data_system.words.armor4)
draw_item_name(@data[0], 92, 32 * 0)
draw_item_name(@data[3], 92, 32 * 3)
draw_item_name(@data[4], 92, 32 * 4)
end

Still, thank you very much for your help, Despero. I never would have gotten even that far without it.
Raven: You have us, Rowen...if you want, we'll be your family.
Rowen: Even the crazy man?
Homard: Especially the crazy man! Every girl needs a pet!

Mina: I like him. Reminds me of me Uncle Fred.
Simona: Is Uncle Fred senile, too?
Mina: No, but he thinks he is.
User avatar
ShadetheMystic
Bard
 
Posts: 91
Joined: Sat Sep 18, 2010 6:04 pm

Re: RMXP Help =Scripts Included=

Postby jyarceus1993 » Sun Dec 12, 2010 2:04 pm

DESPERO,YOU THA MAN! +::clap +::clap +::O_o +::Dance +::biggrin
Spoiler: show
Image

Image
Spoiler: show
Image

La shai'a waqi'on motlaq bal kollon momken-Altair
User avatar
jyarceus1993
DreamLord of Myst
 
Posts: 14471
Joined: Wed Apr 28, 2010 3:03 pm
Location: Chennai,India

Re: RMXP Help =Scripts Included=

Postby Despero6 » Tue Dec 14, 2010 2:39 pm

Glad I could help. +::biggrin
Despero6 - Usukuragari no Idaten ...
ImageImage


Image
User avatar
Despero6
DreamLord of Myst
 
Posts: 592
Joined: Wed May 05, 2010 1:57 pm
Location: Traveling through the Internet

Re: RMXP Help =Scripts Included=

Postby jyarceus1993 » Sat Jan 01, 2011 9:21 am

Just wanted to renew this topic....here are some scripts.
MAP NAME LOCATOR

Spoiler: show
Code: Select all
#_______________________________________________________________________________
# MOG_Location_Name V1.4           
#_______________________________________________________________________________
# By Moghunter       
# http://www.atelier-rgss.com
#_______________________________________________________________________________
module MOG
#Font Name.
MPFONT = "High Tower Text"
#Fade ON/OFF(True - False).
MPNMFD = true
#Fade Time(in seconds).
MPNMTM = 10
#Window Position.
# 0 = Upper Left.
# 1 = Lower Left.
# 2 = Upper Right.
# 3 = Lower Right.
MPNMPS = 2
# Disable Window Switch(ID).
WM_SWITCH_VIS_DISABLE = 15
end
#_________________________________________________
$mogscript = {} if $mogscript == nil
$mogscript["Location_Name"] = true
###############
# Game_System #
###############
class Game_System
attr_accessor :fdtm
attr_accessor :mpnm_x
attr_accessor :mpnm_y
alias mog24_initialize initialize
def initialize
mog24_initialize
@fdtm = 255 + 40 * MOG::MPNMTM
if MOG::MPNMPS == 0
@mpnm_x = -300
@mpnm_y = 0
elsif MOG::MPNMPS == 1
@mpnm_x = -300
@mpnm_y = 380
elsif MOG::MPNMPS == 2
@mpnm_x = 640
@mpnm_y = 0
else
@mpnm_x = 640
@mpnm_y = 380
end 
end
def mpnm_x
return @mpnm_x
end
def mpnm_y
return @mpnm_y
end
def fdtm
if @fdtm <= 0
@fdtm = 0
end
return @fdtm
end
end
############
# Game_Map #
############
class Game_Map
attr_reader   :map_id 
def mpname
$mpname = load_data("Data/MapInfos.rxdata")
$mpname[@map_id].name
end
end
###############
# Window Base #
###############
class Window_Base < Window
def nd_mapic
mapic = RPG::Cache.picture("")     
end 
def draw_mpname(x,y)
mapic = RPG::Cache.picture("Mpname") rescue nd_mapic   
cw = mapic.width 
ch = mapic.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch + 65, mapic, src_rect)
self.contents.font.name = MOG::MPFONT
self.contents.font.size = 25
self.contents.font.color = Color.new(0,0,0,255)
self.contents.draw_text(x + 76, y + 27, 110, 32, $game_map.mpname.to_s,1)
self.contents.font.color = Color.new(255,255,255,255)
self.contents.draw_text(x + 75, y + 26, 110, 32, $game_map.mpname.to_s,1)
end
end
##########
# Mpname #
##########
class Mpname < Window_Base
def initialize
super($game_system.mpnm_x, $game_system.mpnm_y, 250, 100)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
def refresh
self.contents.clear
draw_mpname(10,0)   
end
end
#############
# Scene_Map #
#############
class Scene_Map
alias mog24_main main
def main
@mpnm = Mpname.new
@mpnm.contents_opacity = $game_system.fdtm
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == false
@mpnm.visible = true
else
@mpnm.visible = false 
end 
mog24_main
@mpnm.dispose
end
alias mog24_update update
def update
mog24_update 
$game_system.mpnm_x = @mpnm.x
$game_system.mpnm_y = @mpnm.y
if $game_switches[MOG::WM_SWITCH_VIS_DISABLE] == true or $game_system.fdtm <= 0
@mpnm.visible = false 
else
@mpnm.visible = true
end
if MOG::MPNMPS == 0 or MOG::MPNMPS == 1
if @mpnm.x < 0
   @mpnm.x += 8
elsif @mpnm.x >= 0
   @mpnm.x = 0
end   
else
if @mpnm.x > 400
   @mpnm.x -= 8
elsif @mpnm.x <= 400
   @mpnm.x = 400
end     
end
@mpnm.contents_opacity = $game_system.fdtm
if MOG::MPNMFD == true
$game_system.fdtm -= 3
end
end
alias mog24_transfer_player transfer_player
def transfer_player
mog24_transfer_player
if MOG::MPNMPS == 0
$game_system.mpnm_x = -300
$game_system.mpnm_y = 0
elsif MOG::MPNMPS == 1
$game_system.mpnm_x = -300
$game_system.mpnm_y = 380
elsif MOG::MPNMPS == 2
$game_system.mpnm_x = 640
$game_system.mpnm_y = 0
else
$game_system.mpnm_x = 640
$game_system.mpnm_y = 380
end 
@mpnm.y = $game_system.mpnm_y
@mpnm.x = $game_system.mpnm_x
$game_system.fdtm = 255 + 40 * MOG::MPNMTM
@mpnm.refresh
end
end


In order for this script to work,make sure you have a picture of required dimensions (213X62 for me) in your Graphics/Picture folder named Mpname.So,everytime you load a map,the map name will get displayed in the top right :)

credit:MogHunter

Battle Result:I don't know who made this script but it was given to me by D-Squall..So,
CREDIT:D-Squall
Spoiler: show
Code: Select all
#=================================================================
# ? Battle Result by A3D Ver. 1.02
# Useful                       : show battle result in a different way
# Effect to default script : this code will replace methode "start_phase5" & "update_phase5"  in Scene_Battle
# How to install             : in script editor, insert all the code above main
# Note                          : this script is for non-commercial use only, give credit if use
# Contact                      : A3D (hyper_s@hotmail.com)
#=================================================================

module A3D
  WAIT_WINDOW_APPEAR = 60
  WAIT_RUNNING_NUMBER = 20
  STEP_EXP = 1
  STEP_GOLD = 1
  SE_LEVELUP = ["007-System07", 100, 100]
  SE_NEWSKILL = ["007-System07", 100, 100]
  FONT_NAME = "Tahoma"
  FONT_SIZE = 22
end

#==============================================================================
# ? Scene_Battle
#==============================================================================

class Scene_Battle
 
  #--------------------------------------------------------------------------
  # ? After battle phase start
  #--------------------------------------------------------------------------
  def start_phase5
    # It moves to phase 5
    @phase = 5
    # Performing battle end ME
    $game_system.me_play($game_system.battle_end_me)
    # You reset to BGM before the battle starting
    $game_system.bgm_play($game_temp.map_bgm)
    # Initializing EXP, the gold and the treasure
    exp = 0
    gold = 0
    treasures = []
    # Loop
    for enemy in $game_troop.enemies
      # When the enemy hides and it is not state
      unless enemy.hidden
        # Adding acquisition EXP and the gold
        exp += enemy.exp
        gold += enemy.gold
        # Treasure appearance decision
        if rand(100) < enemy.treasure_prob
          if enemy.item_id > 0
            treasures.push($data_items[enemy.item_id])
          end
          if enemy.weapon_id > 0
            treasures.push($data_weapons[enemy.weapon_id])
          end
          if enemy.armor_id > 0
            treasures.push($data_armors[enemy.armor_id])
          end
        end
      end
    end
    # Treasure acquisition
    for item in treasures
      case item
      when RPG::Item
        $game_party.gain_item(item.id, 1)
      when RPG::Weapon
        $game_party.gain_weapon(item.id, 1)
      when RPG::Armor
        $game_party.gain_armor(item.id, 1)
      end
    end
    # Create Variable & Window
    @phase5_step = 1
    @wait_window_appear = A3D::WAIT_WINDOW_APPEAR
    @wait_running_number = A3D::WAIT_RUNNING_NUMBER
    @resultreceive_window = Window_ResultReceive.new(exp, gold, treasures)
    @resultgold_window = Window_ResultGold.new
    @resultparty_window = Window_ResultParty.new
    @actor_level_before = []
    @resultlevel_window = []
    @resultskill_window = []
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      @actor_level_before[i] = actor.level
      @resultlevel_window[i] = Window_ResultLevel.new(i)
      @resultskill_window[i] = Window_ResultSkill.new(i)
    end
  end
  #--------------------------------------------------------------------------
  # ? Update Phase 5
  #--------------------------------------------------------------------------
  def update_phase5
    case @phase5_step
    when 1  # EXP & Gold Phase
      update_phase5_step1
    when 2  # Skill Phase
      update_phase5_step2
    when 3  # Delete Window Phase
      update_phase5_step3
    end
  end
  #--------------------------------------------------------------------------
  # ? Update Phase 5 Step 1
  #--------------------------------------------------------------------------
  def update_phase5_step1
    # Wait Count Before Window Appear
    if @wait_window_appear > 0
      @wait_window_appear -= 1
      if @wait_window_appear == 0
        @resultreceive_window.visible = true
        @resultgold_window.visible = true
        @resultparty_window.visible = true
        $game_temp.battle_main_phase = false
      end
      return
    end
    # Wait Count Before Running Number
    if @wait_running_number > 0
      @wait_running_number -= 1
      return
    end
    # Change Item Page
    if Input.trigger?(Input::RIGHT)
      if @resultreceive_window.max_page != 1
        $game_system.se_play($data_system.cursor_se)
        @resultreceive_window.page = @resultreceive_window.page == 1 ? 2 : 1
        @resultreceive_window.refresh
      end
    end
    # EXP & Gold Rolling
    if (@resultreceive_window.exp != 0 || @resultreceive_window.gold != 0)
      # Input C to Shortcut Calculation
      if Input.trigger?(Input::C)
        for i in 0...$game_party.actors.size
          actor = $game_party.actors[i]
          level_before = actor.level
          actor.exp += @resultreceive_window.exp
          if actor.level > level_before
            @resultlevel_window[i].visible = true
            Audio.se_play("Audio/SE/" + A3D::SE_LEVELUP[0], A3D::SE_LEVELUP[1], A3D::SE_LEVELUP[2])
          end
        end
        $game_party.gain_gold(@resultreceive_window.gold)
        @resultreceive_window.exp = 0
        @resultreceive_window.gold = 0
        @resultreceive_window.refresh
        @resultgold_window.refresh
        @resultparty_window.refresh
      end
      # EXP
      if @resultreceive_window.exp != 0
        step_exp = @resultreceive_window.exp >= A3D::STEP_EXP.abs ? A3D::STEP_EXP.abs : @resultreceive_window.exp
        for i in 0...$game_party.actors.size
          actor = $game_party.actors[i]
          if actor.next_rest_exp <= step_exp && actor.next_rest_exp != 0
            @resultlevel_window[i].visible = true
            Audio.se_play("Audio/SE/" + A3D::SE_LEVELUP[0], A3D::SE_LEVELUP[1], A3D::SE_LEVELUP[2])
          end
          actor.exp += step_exp
        end
        @resultreceive_window.exp -= step_exp
        @resultreceive_window.refresh
        @resultparty_window.refresh
      end
      # Gold
      if @resultreceive_window.gold != 0
        step_gold = @resultreceive_window.gold >= A3D::STEP_GOLD.abs ? A3D::STEP_GOLD.abs : @resultreceive_window.gold
        $game_party.gain_gold(step_gold)
        @resultreceive_window.gold -= step_gold
        @resultreceive_window.refresh
        @resultgold_window.refresh
      end
      return
    end
    # Input C to Bypass Step
    if Input.trigger?(Input::C)
      @phase5_step = 2
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? Update Phase 5 Step 2
  #--------------------------------------------------------------------------
  def update_phase5_step2
    # Change Item Page
    if Input.trigger?(Input::RIGHT)
      if @resultreceive_window.max_page != 1
        $game_system.se_play($data_system.cursor_se)
        @resultreceive_window.page = @resultreceive_window.page == 1 ? 2 : 1
        @resultreceive_window.refresh
      end
    end
    # Initialize Skill Phase
    if @initialized_skill_phase == nil
      for i in 0...$game_party.actors.size
        actor = $game_party.actors[i]
        for skill in $data_classes[actor.class_id].learnings
          if skill.level > @actor_level_before[i] && skill.level <= actor.level
            Audio.se_play("Audio/SE/" + A3D::SE_NEWSKILL[0], A3D::SE_NEWSKILL[1], A3D::SE_NEWSKILL[2])
            @resultskill_window[i].skill_id = skill.skill_id
            @resultskill_window[i].visible = true
            @resultskill_window[i].refresh
            @skill_phase_active = true
          end
        end
      end
      @initialized_skill_phase = true
    end
    # If Skill Phase Active, Show Window
    if @skill_phase_active != nil
      if @resultskill_window[0].x != 456
        for i in 0...$game_party.actors.size
          @resultskill_window[i].x -= 23
        end
        return
      end
    else
      @phase5_step = 3
      return
    end
    # Input C to Bypass Step
    if Input.trigger?(Input::C)
      @phase5_step = 3
      return
    end
  end
  #--------------------------------------------------------------------------
  # ? Update Phase 5 Step 3
  #--------------------------------------------------------------------------
  def update_phase5_step3
    # Delete All Result-Window
    @resultreceive_window.dispose
    @resultgold_window.dispose
    @resultparty_window.dispose
    for i in 0...$game_party.actors.size
      @resultlevel_window[i].dispose
      @resultskill_window[i].dispose
    end
    battle_end(0)
  end
 
end

#==============================================================================
# ? Game_Actor
#==============================================================================

class Game_Actor
 
  def next_rest_exp
    return @exp_list[@level+1] > 0 ? (@exp_list[@level+1] - @exp) : 0
  end

end

#==============================================================================
# ? Window_ResultReceive
#==============================================================================

class Window_ResultReceive < Window_Base
  #--------------------------------------------------------------------------
  # ? Attr
  #--------------------------------------------------------------------------
  attr_accessor         :exp
  attr_accessor         :gold
  attr_accessor         :page
  attr_reader            :max_page
  #--------------------------------------------------------------------------
  # ? Initialize
  #--------------------------------------------------------------------------
  def initialize(exp, gold, treasures)
    super(40, 28, 224, 212)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = A3D::FONT_NAME
    self.contents.font.size = A3D::FONT_SIZE
    self.back_opacity = 160
    self.visible = false
    @exp = exp
    @gold = gold
    @treasures = treasures
    @page = 1
    @max_page = treasures.size > 4 ? 2 : 1
    refresh
  end
  #--------------------------------------------------------------------------
  # ? Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -8, self.width - 32, 32, "Exp")
    self.contents.draw_text(0, 16, self.width - 32, 32, $data_system.words.gold)
    self.contents.draw_text(0, 40, self.width - 32, 32, $data_system.words.item + " [" + @page.to_s + "/" + @max_page.to_s + "]" )
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -8, self.width - 32, 32, @exp.to_s, 2)
    self.contents.draw_text(0, 16, self.width - 32, 32, @gold.to_s, 2)
    if @treasures.size == 0
      self.contents.draw_text(0, 68, self.width - 32, 32, "< Nothing. >")
    elsif @treasures.size > 4
      bitmap = RPG::Cache.windowskin($game_system.windowskin_name)
      self.contents.blt(184, 116, bitmap, Rect.new(168, 24, 16, 16), 255)
    end
    y = 68
    item_start_index = @page == 1 ? 0 : 4
    for i in item_start_index...@treasures.size
      item = @treasures[i]
      draw_item_name(item, 0, y)
      y += 28
    end
  end
 
end

#==============================================================================
# ? Window_ResultGold
#==============================================================================

class Window_ResultGold < Window_Base
  #--------------------------------------------------------------------------
  # ? Initialize
  #--------------------------------------------------------------------------
  def initialize
    super(40, 240, 224, 52)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = A3D::FONT_NAME
    self.contents.font.size = A3D::FONT_SIZE
    self.back_opacity = 160
    self.visible = false
    refresh
  end
  #--------------------------------------------------------------------------
  # ? Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, -8, self.width - 32, 32, "Total " + $data_system.words.gold)
    self.contents.font.color = normal_color
    self.contents.draw_text(0, -8, self.width - 32, 32, $game_party.gold.to_s, 2)
  end
 
end

#==============================================================================
# ? Window_ResultParty
#==============================================================================

class Window_ResultParty < Window_Base
  #--------------------------------------------------------------------------
  # ? Initialize
  #--------------------------------------------------------------------------
  def initialize
    super(264, 28, 336, 264)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = A3D::FONT_NAME
    self.contents.font.size = A3D::FONT_SIZE
    self.back_opacity = 160
    self.visible = false
    refresh
  end
  #--------------------------------------------------------------------------
  # ? Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      y = 60 * i + 22
      draw_actor_graphic(actor, 24, y + 28 )
      draw_actor_name(actor, 64, y - 28)
      self.contents.font.color = system_color
      self.contents.draw_text(116, y, (self.width - 32), 32, "Lv.")
      self.contents.draw_text(188, y, (self.width - 32), 32, "Next")
      self.contents.font.color = normal_color
      self.contents.draw_text(-140, y, (self.width - 32), 32, actor.level.to_s ,2)
      self.contents.draw_text(0     , y, (self.width - 32), 32, actor.next_rest_exp_s ,2)
    end
  end
 
end

#==============================================================================
# ? Window_ResultLevel
#==============================================================================

class Window_ResultLevel < Window_Base
  #--------------------------------------------------------------------------
  # ? Initialize
  #--------------------------------------------------------------------------
  def initialize(id)
    super(332, 60 * id + 40, 124, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = A3D::FONT_NAME
    self.contents.font.size = A3D::FONT_SIZE
    self.back_opacity = 160
    self.visible = false
    self.z = 200
    refresh
  end
  #--------------------------------------------------------------------------
  # ? Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.draw_text(0, -2, self.width - 32, 32, "Level-Up !!", 1)
  end
 
end

#==============================================================================
# ? Window_ResultSkill
#==============================================================================

class Window_ResultSkill < Window_Base
  #--------------------------------------------------------------------------
  # ? Attr
  #--------------------------------------------------------------------------
  attr_accessor         :skill_id
  #--------------------------------------------------------------------------
  # ? Initialize
  #--------------------------------------------------------------------------
  def initialize(id)
    super(640, 60 * id + 40, 200, 60)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = A3D::FONT_NAME
    self.contents.font.size = A3D::FONT_SIZE
    self.back_opacity = 160
    self.visible = false
    self.z = 200
    @skill_id = nil
  end
  #--------------------------------------------------------------------------
  # ? Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    if @skill_id == nil
      return
    end
    skill = $data_skills[@skill_id]
    bitmap = RPG::Cache.icon(skill.icon_name)
    self.contents.blt(0, 2, bitmap, Rect.new(0, 0, 24, 24), 255)
    self.contents.font.color = normal_color
    self.contents.draw_text(32, -2, self.width - 64, 32, skill.name)
  end
 
end


HP_SP Gauge:
Again,Credit to who ever made this...
Spoiler: show
Code: Select all
# HP/SP/EXP Gauge Script v1.00
# Distribution original support URL
# http://members.jcom.home.ne.jp/cogwheel/

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
  def now_exp
    return @exp - @exp_list[@level]
  end
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
end

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

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Draw HP Gauge
  #--------------------------------------------------------------------------
  # Modification of the original Draw HP process
  alias :draw_actor_hp_hpsp :draw_actor_hp
  def draw_actor_hp(actor, x, y, width = 144)
    # Determine the rate of fill based on the actor's HP and HP Max
    if actor.maxhp != 0
      rate = actor.hp.to_f / actor.maxhp
    else
      rate = 0
    end
    # plus_x:     revised x-coordinate
    # rate_x:     revised X-coordinate as (%)
    # plus_y:     revised y-coordinate
    # plus_width: revised width
    # rate_width: revised width as (%)
    # height:     Vertical width
    # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
    # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
    # align3: Gauge type 0:Left justify 1: Right justify
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10
    align1 = 1
    align2 = 2
    align3 = 0
    # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
    # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
    grade1 = 1
    grade2 = 0
    # Color setting. color1: Outermost framework, color2: Medium framework
    # color3: Empty framework dark color, color4: Empty framework light/write color
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(64, 0, 0, 192)
    # Color setting of gauge
    # Usually color setting of the time   
    color5 = Color.new(200 * rate, 20* rate, 20 * rate, 192)
    color6 = Color.new(175 * rate, 20 * rate, 22 * rate, 192)
    # Determine the gauge's width & fill based on the actor's HP
    if actor.maxhp != 0
      hp = (width + plus_width) * actor.hp * rate_width / 100 / actor.maxhp
    else
      hp = 0
    end
    # Drawing of gauge
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, hp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # Call the original Draw HP process
    draw_actor_hp_hpsp(actor, x, y, width)
  end
  #--------------------------------------------------------------------------
  # * Draw SP Gauge
  #--------------------------------------------------------------------------
  # Modification of the original Draw SP process
  alias :draw_actor_sp_hpsp :draw_actor_sp
  def draw_actor_sp(actor, x, y, width = 144)
    # Determine the rate of fill based on the actor's SP and SP Max
    if actor.maxsp != 0
      rate = actor.sp.to_f / actor.maxsp
    else
      rate = 1
    end
    # plus_x:     revised x-coordinate
    # rate_x:     revised X-coordinate as (%)
    # plus_y:     revised y-coordinate
    # plus_width: revised width
    # rate_width: revised width as (%)
    # height:     Vertical width
    # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
    # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
    # align3: Gauge type 0:Left justify 1: Right justify
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10
    align1 = 1
    align2 = 2
    align3 = 0
    # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
    # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
    grade1 = 1
    grade2 = 0
    # Color setting. color1: Outermost framework, color2: Medium framework
    # color3: Empty framework dark color, color4: Empty framework light/write color
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(0, 64, 0, 192)
    # Color setting of gauge
    # Usually color setting of the time       
    color5 = Color.new(120 * rate, 195 * rate, 80 * rate, 192)
    color6 = Color.new(62 * rate, 240 * rate, 240 * rate, 192)
    # Determine the gauge's width & fill based on the actor's SP
    if actor.maxsp != 0
      sp = (width + plus_width) * actor.sp * rate_width / 100 / actor.maxsp
    else
      sp = (width + plus_width) * rate_width / 100
    end
    # Drawing of gauge
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, sp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # Call the original Draw HP process
    draw_actor_sp_hpsp(actor, x, y, width)
  end
   #--------------------------------------------------------------------------
  # * Draw EXP Gauge
  #--------------------------------------------------------------------------
  # Modification of the original Draw HP process
  alias :draw_actor_exp_hpsp :draw_actor_exp
  def draw_actor_exp(actor, x, y, width = 204)
    # Determine the rate of fill based on the actor's EXP and Next EXP
    if actor.next_exp != 0
      rate = actor.now_exp.to_f / actor.next_exp
    else
      rate = 1
    end
    # plus_x:     revised x-coordinate
    # rate_x:     revised X-coordinate as (%)
    # plus_y:     revised y-coordinate
    # plus_width: revised width
    # rate_width: revised width as (%)
    # height:     Vertical width
    # align1: Type 1 ( 0: left justify  1: center justify 2: right justify )
    # align2: Type 2 ( 0: Upper stuffing 1: Central arranging  2:Lower stuffing )
    # align3: Gauge type 0:Left justify 1: Right justify
    plus_x = 0
    rate_x = 0
    plus_y = 25
    plus_width = 0
    rate_width = 100
    height = 10
    align1 = 1
    align2 = 2
    align3 = 0
    # Gradation settings:  grade1: Empty gauge   grade2:Actual gauge
    # (0:On side gradation   1:Vertically gradation    2: Slantedly gradation)
    grade1 = 1
    grade2 = 0
    # Color setting. color1: Outermost framework, color2: Medium framework
    # color3: Empty framework dark color, color4: Empty framework light/write color
    color1 = Color.new(0, 0, 0, 192)
    color2 = Color.new(255, 255, 192, 192)
    color3 = Color.new(0, 0, 0, 192)
    color4 = Color.new(64, 0, 0, 192)
    # Color setting of gauge
    # Usually color setting of the time     
    color5 = Color.new(80 * rate, 80 * rate ** 2, 80 - 80 * rate, 192)
    color6 = Color.new(240 * rate, 240 * rate ** 2, 240 - 240 * rate, 192)
    # Determine the gauge's width & fill based on the actor's Next EXP
    if actor.next_exp != 0
      exp = (width + plus_width) * actor.now_exp * rate_width /
                                                          100 / actor.next_exp
    else
      exp = (width + plus_width) * rate_width / 100
    end
    # Drawing of gauge
    gauge_rect(x + plus_x + width * rate_x / 100, y + plus_y,
                width, plus_width + width * rate_width / 100,
                height, exp, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    # Call the original Draw EXP process
    draw_actor_exp_hpsp(actor, x, y)
  end
  #--------------------------------------------------------------------------
  # * Drawing of gauge
  #--------------------------------------------------------------------------
  def gauge_rect(x, y, rect_width, width, height, gauge, align1, align2, align3,
                color1, color2, color3, color4, color5, color6, grade1, grade2)
    case align1
    when 1
      x += (rect_width - width) / 2
    when 2
      x += rect_width - width
    end
    case align2
    when 1
      y -= height / 2
    when 2
      y -= height
    end
    # Framework Drawing
    self.contents.fill_rect(x, y, width, height, color1)
    self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color2)
    if align3 == 0
      if grade1 == 2
        grade1 = 3
      end
      if grade2 == 2
        grade2 = 3
      end
    end
    if (align3 == 1 and grade1 == 0) or grade1 > 0
      color = color3
      color3 = color4
      color4 = color
    end
    if (align3 == 1 and grade2 == 0) or grade2 > 0
      color = color5
      color5 = color6
      color6 = color
    end
    # Drawing of empty gauge
    self.contents.gradation_rect(x + 2, y + 2, width - 4, height - 4,
                                  color3, color4, grade1)
    if align3 == 1
      x += width - gauge
    end
    #  Drawing of actual gauge
    self.contents.gradation_rect(x + 2, y + 2, gauge - 4, height - 4,
                                  color5, color6, grade2)
  end
end

#------------------------------------------------------------------------------
# New routine added to the Bitmap class.
#==============================================================================

class Bitmap
#--------------------------------------------------------------------------
# * Rectangle Gradation Indicator
#   color1: Start color
#   color2: Ending color
#   align: 0: On side gradation
#          1: Vertically gradation
#          2: The gradation (intense concerning slantedly heavily note)
#--------------------------------------------------------------------------
  def gradation_rect(x, y, width, height, color1, color2, align = 0)
    if align == 0
      for i in x...x + width
        red   = color1.red + (color2.red - color1.red) * (i - x) / (width - 1)
        green = color1.green +
                (color2.green - color1.green) * (i - x) / (width - 1)
        blue  = color1.blue +
                (color2.blue - color1.blue) * (i - x) / (width - 1)
        alpha = color1.alpha +
                (color2.alpha - color1.alpha) * (i - x) / (width - 1)
        color = Color.new(red, green, blue, alpha)
        fill_rect(i, y, 1, height, color)
      end
    elsif align == 1
      for i in y...y + height
        red   = color1.red +
                (color2.red - color1.red) * (i - y) / (height - 1)
        green = color1.green +
                (color2.green - color1.green) * (i - y) / (height - 1)
        blue  = color1.blue +
                (color2.blue - color1.blue) * (i - y) / (height - 1)
        alpha = color1.alpha +
                (color2.alpha - color1.alpha) * (i - y) / (height - 1)
        color = Color.new(red, green, blue, alpha)
        fill_rect(x, i, width, 1, color)
      end
    elsif align == 2
      for i in x...x + width
        for j in y...y + height
          red   = color1.red + (color2.red - color1.red) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          green = color1.green + (color2.green - color1.green) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          blue  = color1.blue + (color2.blue - color1.blue) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          alpha = color1.alpha + (color2.alpha - color1.alpha) *
                  ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          color = Color.new(red, green, blue, alpha)
          set_pixel(i, j, color)
        end
      end
    elsif align == 3
      for i in x...x + width
        for j in y...y + height
          red   = color1.red + (color2.red - color1.red) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          green = color1.green + (color2.green - color1.green) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          blue  = color1.blue + (color2.blue - color1.blue) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          alpha = color1.alpha + (color2.alpha - color1.alpha) *
                ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
          color = Color.new(red, green, blue, alpha)
          set_pixel(i, j, color)
        end
      end
    end
  end
end


To change the colors of the HP,MP,EXP Gauges,
under the Draw SP gauge,Hp gauge,EXP gauge, change the numbers... I haven't got a clue what they mean,so I just changed the values randomly..and got some cool results lol
# Color setting of gauge
# Usually color setting of the time
color5 = Color.new(120 * rate, 195 * rate, 80 * rate, 192)
color6 = Color.new(62 * rate, 240 * rate, 240 * rate, 192
)



Advanced Equip Window:

Spoiler: show
Code: Select all

# Advanced Equip Window
# by RPG Advocate


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

class Window_Base < Window
  #--------------------------------------------------------------------------
  # * Get Up Text Color
  #-------------------------------------------------------------------------- 
  def up_color
    return Color.new(74, 210, 74)
  end
  #--------------------------------------------------------------------------
  # * Get Down Text Color
  #--------------------------------------------------------------------------
  def down_color
    return Color.new(170, 170, 170)
  end
end



#==============================================================================
# ** Window_EquipLeft
#------------------------------------------------------------------------------
#  This window displays actor parameter changes on the equipment screen.
#==============================================================================

class Window_EquipLeft < Window_Base
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :mode
  attr_accessor :changes
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor : actor
  #--------------------------------------------------------------------------
  def initialize(actor)
    super(0, 64, 272, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = "Arial"
    self.contents.font.size = 24
    self.z += 100
    @actor = actor
    @mode = 0
    @changes = [0, 0, 0, 0, 0, 0, 0, 0]
    @elem_text = ""
    @stat_text = ""
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_level(@actor, 180, 0)
    draw_actor_parameter(@actor, 4, 32, 0)
    draw_actor_parameter(@actor, 4, 64, 1)
    draw_actor_parameter(@actor, 4, 96, 2)
    draw_actor_parameter(@actor, 4, 128, 3)
    draw_actor_parameter(@actor, 4, 160, 4)
    draw_actor_parameter(@actor, 4, 192, 5)
    draw_actor_parameter(@actor, 4, 224, 6)
    if @mode == 0
      self.contents.draw_text(4, 256, 200, 32, "Elemental Attack:")
      self.contents.draw_text(4, 320, 200, 32, "Status Attack:")
    end
    if @mode == 1
      self.contents.draw_text(4, 256, 200, 32, "Elemental Defense:")
      self.contents.draw_text(4, 320, 200, 32, "Status Defense:")
    end
    self.contents.draw_text(12, 288, 220, 32, @elem_text)
    self.contents.draw_text(12, 352, 220, 32, @stat_text)
    if @new_atk != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 32, 40, 32, "→", 1)
      if @changes[0] == 0
        self.contents.font.color = normal_color
      elsif @changes[0] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 32, 36, 32, @new_atk.to_s, 2)
    end
    if @new_pdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 64, 40, 32, "→", 1)
      if @changes[1] == 0
        self.contents.font.color = normal_color
      elsif @changes[1] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 64, 36, 32, @new_pdef.to_s, 2)
    end
    if @new_mdef != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 96, 40, 32, "→", 1)
      if @changes[2] == 0
        self.contents.font.color = normal_color
      elsif @changes[2] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 96, 36, 32, @new_mdef.to_s, 2)
    end
    if @new_str != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 128, 40, 32, "→", 1)
      if @changes[3] == 0
        self.contents.font.color = normal_color
      elsif @changes[3] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 128, 36, 32, @new_str.to_s, 2)
    end
    if @new_dex != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 160, 40, 32, "→", 1)
      if @changes[4] == 0
        self.contents.font.color = normal_color
      elsif @changes[4] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 160, 36, 32, @new_dex.to_s, 2)
    end
    if @new_agi != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 192, 40, 32, "→", 1)
      if @changes[5] == 0
        self.contents.font.color = normal_color
      elsif @changes[5] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 192, 36, 32, @new_agi.to_s, 2)
    end
    if @new_int != nil
      self.contents.font.color = system_color
      self.contents.draw_text(160, 224, 40, 32, "→", 1)
      if @changes[6] == 0
        self.contents.font.color = normal_color
      elsif @changes[6] == -1
        self.contents.font.color = down_color
      else
        self.contents.font.color = up_color
      end
      self.contents.draw_text(200, 224, 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
  #     new_str   : strength after changing equipment
  #     new_dex   : dexterity after changing equipment
  #     new_agi   : agility after changing equipment
  #     new_int   : intelligence after changing equipment
  #     new_eva   : evasion after changing equipment
  #     elem_text : element rating after changing equipment
  #     stat_text : status rating after changing equipment
  #--------------------------------------------------------------------------
  def set_new_parameters(new_atk, new_pdef, new_mdef, new_str, new_dex,
    new_agi, new_int, new_eva, elem_text, stat_text)
    flag = false
    if new_atk != @new_atk || new_pdef != @new_pdef || new_mdef != @new_mdef
      flag = true
    end
    if new_str != @new_str || new_dex != @new_dex || new_agi != @new_agi
      flag = true
    end
     if new_eva != @new_eva || elem_text != @elem_text || stat_text != @stat_text
      flag = true
    end
    @new_atk = new_atk
    @new_pdef = new_pdef
    @new_mdef = new_mdef
    @new_str = new_str
    @new_dex = new_dex
    @new_agi = new_agi
    @new_int = new_int
    @new_eva = new_eva
    @elem_text = elem_text
    @stat_text = stat_text
    if flag
      refresh
    end
  end
end



#==============================================================================
# ** Window_EquipItem
#------------------------------------------------------------------------------
#  This window displays choices when opting to change equipment on the
#  equipment screen.
#==============================================================================

class Window_EquipItem < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     actor      : actor
  #     equip_type : equip region (0-3)
  #--------------------------------------------------------------------------
  def initialize(actor, equip_type)
    super(272, 256, 368, 224)
    @actor = actor
    @equip_type = equip_type
    @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 == 0
      weapon_set = $data_classes[@actor.class_id].weapon_set
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0 and weapon_set.include?(i)
          @data.push($data_weapons[i])
        end
      end
    end
    # Add equippable armor
    if @equip_type != 0
      armor_set = $data_classes[@actor.class_id].armor_set
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0 and armor_set.include?(i)
          if $data_armors[i].kind == @equip_type-1
            @data.push($data_armors[i])
          end
        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)
    self.contents.font.name = "Arial"
    self.contents.font.size = 24
    for i in 0...@item_max-1
      draw_item(i)
    end
    s = @data.size-1
    self.contents.draw_text(4, s*32, 100, 32, "[Remove]")
  end
  #--------------------------------------------------------------------------
  # * Draw Item
  #     index : item number
  #--------------------------------------------------------------------------
  def draw_item(index)
    item = @data[index]
    x = 4
    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 + 288, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 304, 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



#==============================================================================
# ** Scene_Equip
#------------------------------------------------------------------------------
#  This class performs equipment screen processing.
#==============================================================================

class Scene_Equip
  #--------------------------------------------------------------------------
  # * 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
      newmode = 0
    when 1
      @item_window = @item_window2
      newmode = 1
    when 2
      @item_window = @item_window3
      newmode = 1
    when 3
      @item_window = @item_window4
      newmode = 1
    when 4
      @item_window = @item_window5
      newmode = 1
    end
    if newmode != @left_window.mode
      @left_window.mode = newmode
      @left_window.refresh
    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
      old_atk = @actor.atk
      old_pdef = @actor.pdef
      old_mdef = @actor.mdef
      old_str = @actor.str
      old_dex = @actor.dex
      old_agi = @actor.agi
      old_int = @actor.int
      old_eva = @actor.eva
      @actor.equip(@right_window.index, item2 == nil ? 0 : item2.id)
      # Get parameters for after equipment change
      new_atk = @actor.atk
      new_pdef = @actor.pdef
      new_mdef = @actor.mdef
      new_str = @actor.str
      new_dex = @actor.dex
      new_agi = @actor.agi
      new_int = @actor.int
      new_eva = @actor.eva
      @left_window.changes = [0, 0, 0, 0, 0, 0, 0, 0]
      if new_atk > old_atk
        @left_window.changes[0] = 1
      end
      if new_atk < old_atk
        @left_window.changes[0] = -1
      end
      if new_pdef > old_pdef
        @left_window.changes[1] = 1
      end
      if new_pdef < old_pdef
        @left_window.changes[1] = -1
      end
      if new_mdef > old_mdef
        @left_window.changes[2] = 1
      end
      if new_mdef < old_mdef
        @left_window.changes[2] = -1
      end
       if new_str > old_str
        @left_window.changes[3] = 1
      end
      if new_str < old_str
        @left_window.changes[3] = -1
      end
        if new_dex > old_dex
        @left_window.changes[4] = 1
      end
      if new_dex < old_dex
        @left_window.changes[4] = -1
      end
      if new_agi > old_agi
        @left_window.changes[5] = 1
      end
      if new_agi < old_agi
        @left_window.changes[5] = -1
      end
      if new_int > old_int
        @left_window.changes[6] = 1
      end
      if new_int < old_int
        @left_window.changes[6] = -1
      end
      if new_eva > old_eva
        @left_window.changes[7] = 1
      end
      if new_eva < old_eva
        @left_window.changes[7] = -1
      end
      elem_text = make_elem_text(item2)
      stat_text = make_stat_text(item2)
      # Return equipment
      @actor.equip(@right_window.index, 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_str,
      new_dex, new_agi, new_int, new_eva, elem_text, stat_text)
    end
  end
  #--------------------------------------------------------------------------
  # * Make Element Text
  #     item : item
  #-------------------------------------------------------------------------- 
  def make_elem_text(item)
    text = ""
    flag = false
    if item.is_a?(RPG::Weapon)
      for i in item.element_set
        if flag
          text += ", "
        end
        text += $data_system.elements[i]
        flag = true
      end
    end
    if item.is_a?(RPG::Armor)
      for i in item.guard_element_set
        if flag
          text += ", "
        end
        text += $data_system.elements[i]
        flag = true
      end
    end
    return text
  end
  #--------------------------------------------------------------------------
  # * Make Status Text
  #     item : item
  #-------------------------------------------------------------------------- 
  def make_stat_text(item)
    text = ""
    flag = false
    if item.is_a?(RPG::Weapon)
      for i in item.plus_state_set
        if flag
          text += ", "
        end
        text += $data_states[i].name
        flag = true
      end
    end
    if item.is_a?(RPG::Armor)
      for i in item.guard_state_set
        if flag
          text += ", "
        end
        text += $data_states[i].name
        flag = true
      end
    end
    return text
  end
end


CREDIT:RPG ADVOCATE


ONE MORE THING:

If you add some of the above scripts and start an already existing "project" save,then you'll get an error.So,you need to start your project playthrough all over again.
Spoiler: show
Image

Image
Spoiler: show
Image

La shai'a waqi'on motlaq bal kollon momken-Altair
User avatar
jyarceus1993
DreamLord of Myst
 
Posts: 14471
Joined: Wed Apr 28, 2010 3:03 pm
Location: Chennai,India


Return to Your Homemade Games

Who is online

Users browsing this forum: No registered users and 43 guests


Laxius Force III Little Hearts Night of the Stars Fortress of Hell Witch Hunt Millennium 5