Chaos Project

RPG Maker => RPG Maker Scripts => Script Requests => Topic started by: SorceressKyrsty on September 19, 2009, 06:45:10 am

Title: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on September 19, 2009, 06:45:10 am
Most people have probably played FF7 and remember its systems. Since I'm using a system based on the FF7 one for my game 'Cosplay Crisis' I tried editing the fault menu to get it look like it and I failed badly. I've tried replacing the menu with the default a few times and it does work but I accidentally left the crappy version in the demo release. So I want to ask for an FF7 equip system as an...apology to my players.

The FF7 Equip looks like this:

(http://i260.photobucket.com/albums/ii21/SorceressKyrsty/ff7equip2.png)

I do need it like this since I'm not using anything but a single piece of armor, weapon and an accessory. The empty bar below the Character Status is the Help bar. The Bar above the parameters window is supposed to be what Materia slots a weapon or armor has (accessories don't have materia slots) but this is an optional feature that I'm not willing to ask for (almost none of my script requests get filled most of the time anyway). The window next to it is the inventory (which I want to be single row scrolling and not double like RMXP's default).

This is mainly a graphical edit (except for the single scrolling, which I could never figure out). I couldn't get my edits to work so hopefully someone can =\.
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on October 19, 2009, 09:18:27 am
*bump* pretty please?
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jackolas on October 19, 2009, 09:20:34 am
will try

no promises
dunno about the materia slots
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on October 19, 2009, 09:30:04 am
Yeah I was never too fussed about the materia anyway. It'd probably require calling the Materia display from the script and I'd rather not interfere with other scripts in my game at the moment. (it has a fine balance with the skills etc at the moment  ;))
Also, the top bar with the picture needs to be big enough to display face pictures that are 70x100px (I know, weird, but it's just the dimensions I used for the images at 10%).

But thanks for helping me out! ^_^
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Calintz on October 19, 2009, 09:49:03 am
Are you making a fan game??
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Magus on October 19, 2009, 10:22:26 am
Quote from: Calintz on October 19, 2009, 09:49:03 am
Are you making a fan game??

Oh noes.. played alot of them.. Some of them were very bad (not that yours is)
and some of them were pretty good (hopefully yours will!)
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Starrodkirby86 on October 19, 2009, 07:06:58 pm
Quote from: Calintz on October 19, 2009, 09:49:03 am
Are you making a fan game??

http://forum.chaos-project.com/index.php?topic=4063.0

;)
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jalm on October 19, 2009, 07:28:23 pm
I'm sure I've seen this before. I'll edit in case I find it again.
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jackolas on October 21, 2009, 03:09:20 am
got the basics done i think.. working on the Materia atm.
will update as soon as i can.

ps:
sorry that's it takes this long, first time I really write my own script (normally only make edits)
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on October 21, 2009, 06:45:10 am
Coolio c=.
Here's a link for the Materia script I'm using:

http://www.hbgames.org/forums/viewtopic.php?f=11&t=59972

Just in case you wanted to look at it or something.
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jackolas on October 21, 2009, 07:41:16 am
am kinda building that 1 in this script
so you will be using that system. I just link everything true the equip screen
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on November 06, 2009, 07:43:10 am
Um...I don't mean to sound like a nag or anything...but how's it going?
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jackolas on November 06, 2009, 08:22:05 am
crap.. totally forgot  :^_^': . will finish it this weekend 
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on November 12, 2009, 07:50:59 am
Sorry to be a pain -.-. It's just that I like having all my scripts done, then I can focus on everything else without having to worry about corrupted save games, etc.
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jackolas on November 12, 2009, 09:42:07 am
I know I know..
kinda hard for a second script.  :(
so give me some time  :^_^':

Spoiler: ShowHide
(http://img21.imageshack.us/img21/4996/previewxt.png)


done:
- got the scrolling 1 row weapons etc working
- got the stats working (including the "show new stats" when hovering over a weapon)
- got the extra materia window showing up
- added a Configuration to the script (for easy edit)
- changed all font size etc to place everything into smaller windows. (more windows = smaller windows)
- adding the materia into the window

to do:
- changing Materia when needed
- adding face, health, SP to the equip right window
- edit the Equip right window to work correct

Edit:
Need to know a couple of things.
first of. what are the size of the face pics you gone use (need to know how much i need to resize them)
second is how you named them (for example: fighter001_face) this I need to know to link easy

also want to update that I added the materia to the window. only need to make it that its comparing between items
and also added the name lvl etc to the top left

Edit 2:
img update
Spoiler: ShowHide
(http://img30.imageshack.us/img30/9486/materiaequip.png)

not bad for someone that knows shit about scripting :P
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on November 13, 2009, 04:55:11 am

Hey, that's looking great!

The images I'm using for it are 70px width and 100px in height. Don't ask why I picked those dimensions, I just did, and have been using them for every other menu anyway  :^_^':

Plus, I have about three scripts that require different face thingo's, so I have a seperate folder for faces, and the 'charactersetname'_face in both the Characters and Pictures folder. Preferably I'd prefer it to link to the Faces picture folder, but whatever is easier for you.


Thanks so much *hugs*

Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jackolas on November 13, 2009, 05:14:52 am
QuotePreferably I'd prefer it to link to the Faces picture folder, but whatever is easier for you.

made it so that you can change the path where you can find the faces...
just needed to know how the face files are called.

Edit:
hmm... now i need to see where i can get another extra 7 pixels to make the faces fit :P
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on November 13, 2009, 05:26:32 am
Face files are generally called via:

draw_actor_face(actor, 12, y + 15) (This is for the menu screen so the co-ords would have to be changed)

It's basically just replacing the draw_actor_graphic that's found in the general codes.


...that is what you were asking for, right? =/.
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jackolas on November 13, 2009, 05:41:02 am
i had the code (bid more complicated)
just needed an extra 7 pixels to get a 100 pixel high face fitting
atm the script will work with all face sets as long as they are not bigger than 100 x 100

fixed the extra 7 pixels.. also helps fix a other problem i had:
Spoiler: ShowHide
(http://img36.imageshack.us/img36/9486/materiaequip.png)


think I'm doing all right for my first window script :P
I like the looks of it :P

to do list:
- Finishing off the materia (linking it etc)
- Cleaning up the script (939 lines of code)
- Make it user friendly
- Post it

Edit:
I cleaned up the code and made it as user friendly as I could (easy configure etc)
Now the problem I'm in is in the Materia stuff.. think I'm in way over my head  :wacko:
gone try a couple more things but else I need to post it without the materia
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on November 21, 2009, 07:57:34 am
Hey Jackolas, I don't mind if you post it without the materia. As I said, it was optional. Thanks for doing this, by the way, after working with RMXP for two year, it's been the last six months I've actually gotten script requests accepted. Probably because I'm now requesting smaller stuff (escape scripts, this script, etc).
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jackolas on November 25, 2009, 05:58:24 am
tried everything but can't get the materia work like it should.
Maybe will look to it later when I finished my own secret script
Spoiler: ShowHide

(http://img36.imageshack.us/img36/9486/materiaequip.png)

#=========================================================================================
# ■ Custom Equip Menu by Jackolas
#=========================================================================================
# script by:            Jackolas
# Materia system by:    Atoa and SephirothSpawn
# Thanks:               Juan (for his menu system that helped me a lot)
#                       SorceressKyrsty (for requesting this script)
#
# Version number:       V 0.20
# Last edit date:       25-11-09
#
# Place this script ABOVE the "FF:VII Materia System XP" script (if used) and
# below any other menu scripts
#==============================================================================

module Jackolas_Equip
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration below
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 Window_opt = 255 #Window optica (1..255)
 Font_size = 18 # Font size (default rmxp is 22, recoment 18).
 Font_space = 0 #Pixel space between one line and the next
 Font_bold = true #Use Bold text or not (false/true)
 Color_up = Color.new(0, 255, 0) #Color of increasing stats (red, green, blue)
 Color_down = Color.new(255, 0, 0) #Color of decreasing stats (red, green, blue)
 Use_Face = true # Put faces on or off (any face of max 100 x 100 will do)
 Face_Place = "Faces/" #The directory where the script can find the faces
 Face_Name = "_face" #The added name of the face
 Materia = false #Enable materia or not (false/true)
 Equip_win = false #Display the little equip window or not (false/true)
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration above
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
end

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
#==============================================================================
# Start of the script
#==============================================================================
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#--------------------------------------------------------------------------
# * Get Up Text Color
#--------------------------------------------------------------------------
 def up_color
   return Jackolas_Equip::Color_up
 end
#--------------------------------------------------------------------------
# * Get Down Text Color
#--------------------------------------------------------------------------
 def down_color
   return Jackolas_Equip::Color_down
 end  
 
#==============================================================================
# ** Player_char_window
#------------------------------------------------------------------------------
#  This window shows the current player selected and there main stats
#==============================================================================

class Player_char_window < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(actor)
   super(0, 0, 300,132)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.active = false
   self.opacity = Jackolas_Equip::Window_opt
   self.z += 110
   @actor = actor
   refresh
 end
 def refresh
   spacer = Jackolas_Equip::Font_size + Jackolas_Equip::Font_space
   self.contents.clear
   self.contents.font.color = normal_color
   self.contents.font.size = Jackolas_Equip::Font_size
   self.contents.font.bold = Jackolas_Equip::Font_bold
   if Jackolas_Equip::Use_Face == true
     draw_actor_graphic(@actor, 0, 0)
   end
   draw_actor_name(@actor, 100 + spacer, 0)
   draw_actor_level(@actor, 100 + spacer, spacer * 1)
   draw_actor_hp(@actor, 100 + spacer, spacer * 2)
   draw_actor_sp(@actor, 100 + spacer, spacer * 3)
   @text = nil
   self.visible = true
   self.contents.font.size = Font.default_size
   self.contents.font.bold = false
 end
 def update
   super
 end
 
 #--------------------------------------------------------------------------
 # * Draw actor faces
 #--------------------------------------------------------------------------
  def draw_actor_graphic(actor, x, y)
   if actor != nil && actor.character_name != ''
     if Jackolas_Equip::Use_Face == true
       place = Jackolas_Equip::Face_Place
       name = Jackolas_Equip::Face_Name
       bitmap = RPG::Cache.character("#{place}#{actor.character_name}#{name}", actor.character_hue)
       x -= (bitmap.width - 100) / 2
       y -= (bitmap.height - 100) / 2
       draw_actor_face_Jackolas_equip(actor, x, y)
     end
   end
 end

 def draw_actor_face_Jackolas_equip(actor, x, y)
   if $tons_version == nil || $tons_version < 3.71 || !FACE_HUE
     hue = 0
   else
     hue = (FACE_HUE ? actor.character_hue : 0)
   end
   place = Jackolas_Equip::Face_Place
   name = Jackolas_Equip::Face_Name
   bitmap = RPG::Cache.character("#{place}#{actor.character_name}#{name}", hue)
   src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
   self.contents.blt(x, y, bitmap, src_rect)
 end  
end
 
 
#==============================================================================
# ** Window_Materia
#------------------------------------------------------------------------------
#  This window shows the Materia
#==============================================================================

class New_Window_Materia < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize(actor)
   super(0, 189, 320, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.opacity = Jackolas_Equip::Window_opt
   self.z += 106
   @actor = actor
   @frame = 0
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refesh
 #--------------------------------------------------------------------------
 def refresh(actor = @actor)
   self.contents.clear
   draw_actor_materia
 end
 #--------------------------------------------------------------------------
 # * Draw Materia
 #--------------------------------------------------------------------------
 def draw_actor_materia
   if Jackolas_Equip::Materia == true
     self.contents.clear
     self.contents.font.color = normal_color
     self.contents.font.size = Jackolas_Equip::Font_size
     self.contents.font.bold = Jackolas_Equip::Font_bold
     self.contents.draw_text(0, 4, 110, Jackolas_Equip::Font_size, "Equiped:", 0)
     self.contents.draw_text(0, 34, 110, Jackolas_Equip::Font_size, "Replaced:", 0)
     self.contents.font.size = Font.default_size
     self.contents.font.bold = false
     self.contents.fill_rect(96, 0, 192, 120, Color.new(0, 0, 0, 0))
     self.contents.fill_rect(96, 0, 192, 24, Color.new(0, 0, 0, 50))
     self.contents.fill_rect(96, 30, 192, 24, Color.new(0, 0, 0, 50))    
     for i in 0..1
       slots_x, y = 96 - 24, i * 30
       if i == 0
         if @actor.weapon_id == 0
           p_times, s_times = 0, 0
         else
           p_times = $data_weapons[@actor.weapon_id].paired_materia
           s_times = $data_weapons[@actor.weapon_id].single_materia
         end
       else
         if (eval "@actor.armor#{i}_id") == 0
           p_times, s_times = 0, 0
         else
           p_times = eval "$data_armors[@actor.armor#{i}_id].paired_materia"
           s_times = eval "$data_armors[@actor.armor#{i}_id].single_materia"
         end
       end
       p_times.times do
         bitmap = RPG::Cache.icon(Materia_Config::Paired_Slot_Left)
         self.contents.blt(slots_x += 24, y, bitmap, Rect.new(0, 0, 24, 24))
         bitmap = RPG::Cache.icon(Materia_Config::Paired_Slot_Right)
         self.contents.blt(slots_x += 24, y, bitmap, Rect.new(0, 0, 24, 24))
       end
       s_times.times do
         bitmap = RPG::Cache.icon(Materia_Config::Single_Slot)
         self.contents.blt(slots_x += 24, y, bitmap, Rect.new(0, 0, 24, 24))
       end
     end
     for i in 0...@actor.weapon_materia.size
       materia = @actor.weapon_materia[i]
       unless materia.nil?
         hue = materia.get_hue
         begin
           bitmap = RPG::Cache.icon(materia.name + "_m").dup
         rescue
           bitmap = RPG::Cache.icon(Materia_Config::Default_Icon).dup
           bitmap.hue_change(hue)
         end
         self.contents.blt(96 + i * 24, 0, bitmap, Rect.new(0, 0, 24, 24))
       end
     end
     for h in 1..4
       size = eval "@actor.armor#{h}_materia.size"
       for i in 0...size
         list = eval "@actor.armor#{h}_materia"
         materia = list[i]
         unless materia.nil?
           hue = materia.get_hue
           begin
             bitmap = RPG::Cache.icon(materia.name + "_m").dup
           rescue
             bitmap = RPG::Cache.icon(Materia_Config::Default_Icon).dup
             bitmap.hue_change(hue)
           end
           self.contents.blt(96 + i * 24, 24 * h, bitmap, Rect.new(0, 0, 24, 24))
         end
       end
     end
   end
 end

 #--------------------------------------------------------------------------
 # * Update
 #--------------------------------------------------------------------------
 def update
   super
 end
end

#==============================================================================
# ** Window_Help
#------------------------------------------------------------------------------
#  This window shows skill and item explanations along with actor status.
#==============================================================================

class New_Window_Help < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 132, 640, 57)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.opacity = Jackolas_Equip::Window_opt
   self.z += 105
 end
 #--------------------------------------------------------------------------
 # * Set Text
 #  text  : text string displayed in window
 #  align : alignment (0..flush left, 1..center, 2..flush right)
 #--------------------------------------------------------------------------
 def set_text(text, align = 0)
   # If at least one part of text and alignment differ from last time
   if text != @text or align != @align
     # Redraw text
     self.contents.clear
     self.contents.font.color = normal_color
     self.contents.font.size = Jackolas_Equip::Font_size
     self.contents.font.bold = Jackolas_Equip::Font_bold
     self.contents.draw_text(4, 0, self.width - 40, 25, text, align)
     self.contents.font.size = Font.default_size
     self.contents.font.bold = false      
     @text = text
     @align = align
     @actor = nil
   end
   self.visible = true
 end
 #--------------------------------------------------------------------------
 # * Set Actor
 #     actor : status displaying actor
 #--------------------------------------------------------------------------
 def set_actor(actor)
   if actor != @actor
     self.contents.clear
     draw_actor_name(actor, 4, 0)
     draw_actor_state(actor, 140, 0)
     draw_actor_hp(actor, 284, 0)
     draw_actor_sp(actor, 460, 0)
     @actor = actor
     @text = nil
     self.visible = true
   end
 end
 #--------------------------------------------------------------------------
 # * Set Enemy
 #     enemy : name and status displaying enemy
 #--------------------------------------------------------------------------
 def set_enemy(enemy)
   text = enemy.name
   state_text = make_battler_state_text(enemy, 112, false)
   if state_text != ""
     text += "  " + state_text
   end
   set_text(text, 1)
 end
end
 
#==============================================================================
# Scene_Equip
#==============================================================================
class Scene_Equip
 #--------------------------------------------------------------------------
 # * 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
 #--------------------------------------------------------------------------
#  if Jackolas_Equip::Materia == true
#    alias  seph_materiasystem_sceneequip_main main
#  end
 def main
   # Get actor
   @actor = $game_party.actors[@actor_index]
#    if Jackolas_Equip::Materia == true
#      @actor.check_old_equip
#      seph_materiasystem_sceneequip_main
#      @actor.check_equip_change
#    end
   # Make windows
   @help_window = New_Window_Help.new
   @left_window = New_Window_EquipLeft.new(@actor)
   @right_window = New_Window_EquipRight.new(@actor)
   @materia_window = New_Window_Materia.new(@actor)
   if Jackolas_Equip::Equip_win == true
     @equiptext_window = New_Equip_Text.new
   end
   @playerchar_window = Player_char_window.new(@actor)
   @item_windows = []
   (0..4).each {|i| @item_windows.push(New_Window_EquipItem.new(@actor, i))}
   @spriteset = Spriteset_Map.new
   # Associate help window
   @right_window.help_window = @help_window
   @item_windows.each {|win| win.help_window = @help_window}
   # Set menu opacity
   @help_window.opacity = Jackolas_Equip::Window_opt
   @left_window.opacity = Jackolas_Equip::Window_opt
   @right_window.opacity = Jackolas_Equip::Window_opt
   @materia_window.opacity = Jackolas_Equip::Window_opt
   if Jackolas_Equip::Equip_win == true
     @equiptext_window.opacity = Jackolas_Equip::Window_opt
   end
   @playerchar_window.opacity = Jackolas_Equip::Window_opt
   @item_windows.each_index {|i|
   @item_windows[i].opacity = Jackolas_Equip::Window_opt
   }
   # Set cursor position
   @right_window.index = @equip_index
   refresh
   # Execute transition
   Graphics.transition
   # Main loop
   loop {
     # Update game screen
     Graphics.update
     # Update input information
     Input.update
     # Frame update
     update
     # Abort loop if screen is changed
     break if $scene != self
   }
   # Prepare for transition
   Graphics.freeze
   # Dispose of windows
   @help_window.dispose
   @left_window.dispose
   @right_window.dispose
   @materia_window.dispose
   if Jackolas_Equip::Equip_win == true
     @equiptext_window.dispose
   end
   @playerchar_window.dispose
   @item_windows.each {|win| win.dispose}
   @spriteset.dispose
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   # Set item windows to visible
   @item_windows.each_index {|i|
     @item_windows[i].visible = (@right_window.index == i)
   }
   # Get currently equipped item
   item1 = @right_window.item
   # Set current item window to @item_window
   case @right_window.index
   when 0
     newmode = 0
   when 1
     newmode = 1
   when 2
     newmode = 1
   when 3
     newmode = 1
   when 4
     newmode = 1
   end
   if newmode != @left_window.mode
     @left_window.mode = newmode
     @left_window.refresh
   end
   if @right_window.active
     @left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil,
     '', '')
   end
   @item_window = @item_windows[@right_window.index]
   # 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
     item2 = @item_window.item
     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)
     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)
     @actor.equip(@right_window.index, item1 == nil ? 0 : item1.id)
     @actor.hp = last_hp
     @actor.sp = last_sp
     @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
 #--------------------------------------------------------------------------
 # * Set elemental Text
 #--------------------------------------------------------------------------
 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
 #--------------------------------------------------------------------------
 # * Set stats text
 #--------------------------------------------------------------------------
 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    
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @left_window.update
   @right_window.update
   @item_window.update
   @materia_window.update
   @playerchar_window.update
   @spriteset.update
   refresh
   # If right window is active: call update_right
   if @right_window.active
     update_right
   # If item window is active: call update_item
   elsif @item_window.active
     update_item
   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(2)
   # If C button was pressed
   elsif 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
   # If R button was pressed
   elsif 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)
   # If Right button was pressed
   elsif Input.trigger?(Input::RIGHT)
     # 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)  
   # If L button was pressed
   elsif 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)
   # If L button was pressed
   elsif Input.trigger?(Input::LEFT)
     # 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)      
   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
   # If C button was pressed
   elsif 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
     @materia_window.refresh
     
   end
 end
end

#==============================================================================
# New_Window_EquipLeft
#==============================================================================

class New_Window_EquipLeft < Window_Base
 # --------------------------------
 attr_accessor :mode
 attr_accessor :changes
 # --------------------------------
 
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     actor : actor
 #--------------------------------------------------------------------------
 def initialize(actor)
   super(0, 285, 320, 195)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.opacity = Jackolas_Equip::Window_opt
   self.z += 102
   @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
   spacer = Jackolas_Equip::Font_size + Jackolas_Equip::Font_space
   self.contents.font.size = Jackolas_Equip::Font_size
   self.contents.font.bold = Jackolas_Equip::Font_bold
   (0..6).each {|i| draw_actor_parameter(@actor, 4, spacer * i, i)}
   if @new_atk != nil
     self.contents.font.color = system_color
     self.contents.draw_text(160, 0, 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, 0, 36, 32, @new_atk.to_s, 2)
   end
   if @new_pdef != nil
     self.contents.font.color = system_color
     self.contents.draw_text(160, spacer, 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, spacer, 36, 32, @new_pdef.to_s, 2)
   end
   if @new_mdef != nil
     self.contents.font.color = system_color
     self.contents.draw_text(160, spacer * 2, 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,  spacer * 2, 36, 32, @new_mdef.to_s, 2)
   end
   if @new_str != nil
     self.contents.font.color = system_color
     self.contents.draw_text(160, spacer * 3, 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, spacer * 3, 36, 32, @new_str.to_s, 2)
   end
    if @new_dex != nil
     self.contents.font.color = system_color
     self.contents.draw_text(160, spacer * 4, 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, spacer * 4, 36, 32, @new_dex.to_s, 2)
   end
     if @new_agi != nil
     self.contents.font.color = system_color
     self.contents.draw_text(160, spacer * 5, 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, spacer * 5, 36, 32, @new_agi.to_s, 2)
   end
     if @new_int != nil
     self.contents.font.color = system_color
     self.contents.draw_text(160, spacer * 6, 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, spacer * 6, 36, 32, @new_int.to_s, 2)
   end
   self.contents.font.size = Font.default_size
   self.contents.font.bold = false    
 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_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
   elsif new_str != @new_str || new_dex != @new_dex || new_agi != @new_agi
     flag = true
    elsif 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


#==============================================================================
# New_Window_EquipRight
#==============================================================================

class New_Window_EquipRight < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     actor : actor
 #--------------------------------------------------------------------------
 def initialize(actor)
   super(300, 0, 340, 132) # 125   super(272, 64, 368, 192)
   self.contents = Bitmap.new(width - 32, 5 * 32)
   self.opacity = Jackolas_Equip::Window_opt
   self.z += 100
   @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_id]) #Weapon
   @data.push($data_armors[@actor.armor1_id])  #Shield
   @data.push($data_armors[@actor.armor2_id])  #Helm
   @data.push($data_armors[@actor.armor3_id])  #Armor
   @data.push($data_armors[@actor.armor4_id])  #Neck
   @item_max = @data.size
   self.contents.font.size = Jackolas_Equip::Font_size
   self.contents.font.bold = Jackolas_Equip::Font_bold
   self.contents.font.color = system_color
   self.contents.draw_text(4, 0, 92, 32, $data_system.words.weapon)   # weapon
   self.contents.draw_text(4, 32, 92, 32, $data_system.words.armor1)  # shield
   self.contents.draw_text(4, 64, 92, 32, $data_system.words.armor2)  # Helm
   self.contents.draw_text(4, 96, 92, 32, $data_system.words.armor3)  # Armor
   self.contents.draw_text(4, 128, 92, 32, $data_system.words.armor4)  # Neck\
   @data.each_index {|i| draw_item_name(@data[i], 100, 32 * i)}
   self.contents.font.size = Font.default_size
   self.contents.font.bold = false
 end
 #--------------------------------------------------------------------------
 # * Help Text Update
 #--------------------------------------------------------------------------
 def update_help
   @help_window.set_text(self.item == nil ? '' : self.item.description)
 end
end



#==============================================================================
# New_Window_EquipItem
#==============================================================================

class New_Window_EquipItem < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     actor      : actor
 #     equip_type : equip region (0-3)
 #--------------------------------------------------------------------------
 def initialize(actor, equip_type)
   super(320, 189, 320, 291)
   @actor = actor
   @equip_type = equip_type
   @column_max = 1
   refresh
   self.active = false
   self.index = -1
   self.opacity = Jackolas_Equip::Window_opt
   self.z += 101
 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 = []
   if @equip_type == 0
     weapon_set = $data_classes[@actor.class_id].weapon_set
     (1...$data_weapons.size).each {|i|
         if $game_party.weapon_number(i) > 0 && weapon_set.include?(i)
           @data.push($data_weapons[i])
         end}
   else
     armor_set = $data_classes[@actor.class_id].armor_set
     (1...$data_armors.size).each {|i|
         if $game_party.armor_number(i) > 0 && armor_set.include?(i)
           @data.push($data_armors[i]) if $data_armors[i].kind == @equip_type-1
         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)
   (0...@item_max-1).each {|i| draw_item(i)}
   self.contents.font.size = Jackolas_Equip::Font_size
   self.contents.font.bold = Jackolas_Equip::Font_bold
   self.contents.draw_text(4, (@item_max-1)*32, 100, 32, '[Unequip]')
   self.contents.font.size = Font.default_size
   self.contents.font.bold = false
 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.font.size = Jackolas_Equip::Font_size
   self.contents.font.bold = Jackolas_Equip::Font_bold
   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 + 240, y, 16, 32, ':', 1)
   self.contents.draw_text(x + 256, y, 24, 32, number.to_s, 2)
   self.contents.font.size = Font.default_size
   self.contents.font.bold = false
 end
 #--------------------------------------------------------------------------
 # * Help Text Update
 #--------------------------------------------------------------------------
 def update_help
   @help_window.set_text(self.item == nil ? '' : self.item.description)
 end
end

#==============================================================================
# ** Window_equip_text
#------------------------------------------------------------------------------
#  This window shows skill and item explanations along with actor status.
#==============================================================================

class New_Equip_Text < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(558, 0, 82, Jackolas_Equip::Font_size+32)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.active = false
   self.opacity = Jackolas_Equip::Window_opt
   self.z += 110
   refresh
 end
 def refresh
   self.contents.clear
   self.contents.font.color = normal_color
   self.contents.font.size = Jackolas_Equip::Font_size
   self.contents.font.bold = Jackolas_Equip::Font_bold
   self.contents.draw_text(0, 0, 50, Jackolas_Equip::Font_size, "Equip", 1)
   self.contents.font.size = Font.default_size
   self.contents.font.bold = false
 end
end


Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: SorceressKyrsty on November 30, 2009, 07:03:27 am
Thank you very muchlies ^_^.

*goes straight to implement script into game*

I had to put the scripts in a different order than what you said in the instructions or my game detonated. I have the main menu script (Acendent Prone's FF7) under the materia, but your script above it. Works fine, I just equipped a Carbon Bangle and no errors ^_^.
Title: Re: Requesting FF7 Equip system (w/ or w/o Materia thing)
Post by: Jackolas on November 30, 2009, 07:05:20 am
Glad it works :P