Help - Search - Members - Calendar
Full Version: Final Fantasy IX Custom Menu
RPG RPG Revolution Forums > Scripting > Script Submissions > RGSS2-Submissions
Pages: 1, 2
BigEd781
Final Fantasy IX Menu
By BigEd781
Graphics done by PainHurt with some editing by myself


Introduction
This script will make your menu look very similar to the menu of Final Fantasy IX. Comes with a custom windowskin and some images for display in the menu.

If you would like to use the Final Fantasy IX windowskin, I have another script which will make it look just like it did in FF9. You can find that script in this post. Read the "Configuration / Use" section for details on how to enable it.

Updates / BugFixes / Patches

1/21/08
➮ I think that I have solved 95% of the compatibility issues with other scripts that modify the command window. I am taking down the patches as they should no longer be necessary. Let me know how it goes.
➮ Added an option to use a picture as the menu background (and provided an image).
➮ Added the tiled windowskin script to this post. I really recommend that you use it along with the FFIX windowskin in the "Configuration / Use" section.
➮ Fixed a division by zero error when using skills that cost 0 mp.
➮ Set "ANIMATE_CURSOR" to 'false' by default. If you want to use the option, set it back to 'true'.

1/4/08
➮ Fixed a bug introduced by my last update when you selected the fourth character in the party.

1/3/08
➮ Fixed a bug with the icons that are displayed when a player has a status effect. The icons will replace the class name.
➮ Added captions to the main menu windows.
➮ Added a new cursor display when all party members are selected.
➮ Added new config option which allows you to use a cursor which does not animate.
➮ added new config option which allows you choose how many background panels are drawn when the party is not full.

12/31/08
➮ Added a new script and option which will make the window look a lot nicer when using the FF9 windowskin below.
➮ Fixed a bug that appeared in the play time display window.
➮ Made the layout look a little nicer.

12/30/08
➮Added a patch for KGC's Large Party Script.

12/28/08
➮ Added the animated cursor feature to all windows in another script. Get it here.
Please rename your arrow image to "Pointer.png" or the script will not work!
➮ Fixed a bug that appeared in the Skill and Item menus. These menus have now been overhauled to fit the menu.
➮ Removed the "smart command window" option. The command window in the menu is now the right size, but other windows will not be affected.
➮ Added a few more pointer images.


Features
➮ 99% plug'n'play (you need to download a few images).
➮ Enhanced Skill and Item menus.
➮ Adds a time and location window to the menu. Time updates in menu.
➮ Uses an animated arrow as a pointer to each character rather than the 'box' in a selectable window.
➮ Looks much nicer than the default menu.

Configuration / Use

Place the script at the top of the "Materials" section of the script editor. Because some core functional had to be changed, it is best to place any menu modification scripts after this one in the editor.

To begin, place these images in the following folders in your game. You only need to choose one of the pointer type images. Rename the pointer image you choose to "Pointer.png"!

Graphics\Pictures

















Graphics\System (Optional)

This is a nice FF9 style windowset made by PainHurt. I recommend using this as your windowskin. If you do, I really recommend using this script and setting the "USE_TILED_WINDOW" option to true.
Make sure to rename this image to "window.png" when you save it!!!



Setup

You don't actually have to tinker with any of these options, but you can if you want to:

CODE

  # set this to 'true' if you would like to use a cusotm background image
  USE_CUSTOM_BACK = false

  # the name of the custom background image, without the file extension (no .png)
  BACK_NAME = 'StoneBackground'

  # if you set this to 'true', you must be using the enhanced
  # Window class script that I posted:  You can get that script here:
  # http://www.rpgmakervx.net/index.php?showtopic=8042&hl=
  # this will make the provided FF9 windowskin look really good.
  USE_TILED_WINDOW = false
  
  # When this is set to 'true', the menu cirsor will animate back and forth.
  # When set to 'false', it will stay in place
  ANIMATE_CURSOR = false
  
  # When set to 'true', four background panels are always drawn.
  # When set to 'false', a panel is only drawn for each party member
  DRAW_FOR_ALL = true
  
  # the name of the font used in the menu.  
  # use 'Font.default_name' for the default font.  Try 'Centaur' for a nice, smaller font.
  DEFAULT_FONT = Font.default_name
  
  # set this to true to enable the font above for all windows.
  # also sets the back_opacity to 255 for all windows.  
  # I recommend setting this to 'true' to maintain a consistent look.
  USE_FOR_ALL = true
  
  # the icon id for your gold window portion of the menu, 194 by default.
  GOLD_ICON_ID = 194


Screenshots

This is what you will see by default:



This is what your menu may look like if you set "USE_CUSTOM_BACK to "true". This is the background image that I provide, I think it looks nicer than the map background.



This is using a smaller font that I think looks nicer called 'Berlin Sans FB':



Remember, to change the font you just need to do this:

CODE
DEFAULT_FONT = 'Centaur'


This is what the new skill and item windows look like:





Window Script - OPTIONAL -

I highly recommend using this script in conjunction with the FFIX windowskin above. All that you need to do is place this in the "Materials" section and set the "USE_TILED_WINDOW" option to "true" in the menu script.

class WindowCursorRect < Rect

attr_reader :x
attr_reader :y
attr_reader :width
attr_reader :height
#--------------------------------------------------------------------
# * intialize
#--------------------------------------------------------------------
def initialize(window)
@window = window
@x = 0
@y = 0
@width = 0
@height = 0
end
#--------------------------------------------------------------------
# * empty
#--------------------------------------------------------------------
def empty
needupdate = (@x != 0) || (@y != 0) || (@width != 0) || (@height != 0)
if needupdate
@x = 0
@y = 0
@width = 0
@height = 0
@window.width = @window.width
end
end
#--------------------------------------------------------------------
# * isEmpty
#--------------------------------------------------------------------
def isEmpty?
return @x == 0 && @y == 0 && @width == 0 && @height == 0
end
#--------------------------------------------------------------------
# * set
#--------------------------------------------------------------------
def set(x,y,width,height)
needupdate=@x!=x || @y!=y || @width!=width || @height!=height
if needupdate
@x=x
@y=y
@width=width
@height=height
@window.width=@window.width
end
end
#--------------------------------------------------------------------
# * height=
#--------------------------------------------------------------------
def height=(value)
@height=value; @window.width=@window.width
end
#--------------------------------------------------------------------
# * width=
#--------------------------------------------------------------------
def width=(value)
@width=value; @window.width=@window.width
end
#--------------------------------------------------------------------
# * x=
#--------------------------------------------------------------------
def x=(value)
@x=value; @window.width=@window.width
end
#--------------------------------------------------------------------
# * y=
#--------------------------------------------------------------------
def y=(value)
@y=value; @window.width=@window.width
end
end

#----------------------------------------------------------------------
# * Window Class
#----------------------------------------------------------------------
class Window
attr_reader :tone
attr_reader :color
attr_reader :blend_type
attr_reader :contents_blend_type
attr_reader :viewport
attr_reader :contents
attr_reader ohmy.gifx
attr_reader ohmy.gify
attr_reader :x
attr_reader :y
attr_reader :z
attr_reader :width
attr_reader :active
attr_reader :pause
attr_reader :height
attr_reader :opacity
attr_reader :back_opacity
attr_reader :contents_opacity
attr_reader :visible
attr_reader :cursor_rect
attr_reader :openness
#--------------------------------------------------------------------
# * windowskin
#--------------------------------------------------------------------
def windowskin
return @_windowskin
end
#--------------------------------------------------------------------
# * intialize
#--------------------------------------------------------------------
def initialize(viewport=nil)
@sprites={}
@spritekeys=
[
"back",
"corner0","side0","scroll0",
"corner1","side1","scroll1",
"corner2","side2","scroll2",
"corner3","side3","scroll3",
"cursor","contents","pause"
]
@sidebitmaps=[nil,nil,nil,nil]
@cursorbitmap=nil
@bgbitmap=nil
@viewport=viewport
@spritekeys.each { |key| @sprites[key]=Sprite.new(@viewport) }
@disposed=false
@tone=Tone.new(0,0,0)
@color=Color.new(0,0,0,0)
@blankcontents=Bitmap.new(1,1) # RGSS2 requires this
@contents=@blankcontents
@_windowskin=nil
@rpgvx=false
@x=0
@y=0
@width=0
@openness=255
@height=0
@ox=0
@oy=0
@z=0
@stretch=true
@visible=true
@active=true
@blend_type=0
@contents_blend_type=0
@opacity=255
@back_opacity=255
@contents_opacity=255
@cursor_rect=WindowCursorRect.new(self)
@cursorblink=0
@cursoropacity=255
@pause=false
@pauseopacity=255
@pauseframe=0
privRefresh(true)
end
#--------------------------------------------------------------------
# * dispose
#--------------------------------------------------------------------
def dispose
if !self.disposed?
for i in @sprites
i[1].dispose if i[1]
@sprites[i[0]]=nil
end
for i in 0...@sidebitmaps.length
@sidebitmaps[i].dispose if @sidebitmaps[i]
@sidebitmaps[i]=nil
end
@blankcontents.dispose
@cursorbitmap.dispose if @cursorbitmap
@backbitmap.dispose if @backbitmap
@sprites.clear
@sidebitmaps.clear
@_windowskin=nil
@_contents=nil
@disposed=true
end
end
#--------------------------------------------------------------------
# * openness=
#--------------------------------------------------------------------
def openness=(value)
@openness=value
@openness=0 if @openness<0
@openness=255 if @openness>255
privRefresh
end
#--------------------------------------------------------------------
# * strecth=
#--------------------------------------------------------------------
def stretch=(value)
@stretch=value
privRefresh(true)
end
#--------------------------------------------------------------------
# * visible=
#--------------------------------------------------------------------
def visible=(value)
@visible=value
privRefresh
end
#--------------------------------------------------------------------
# * viewposrt=
#--------------------------------------------------------------------
def viewport=(value)
@viewport=value
for i in @spritekeys
@sprites[i].dispose
if @sprites[i].is_a?(Sprite)
@sprites[i] = Sprite.new(@viewport)
elsif @sprites[i].is_a?(Plane)
@sprites[i] = Plane.new(@viewport)
else
@sprites[i] = nil
end
end
privRefresh(true)
end
#--------------------------------------------------------------------
# * z=
#--------------------------------------------------------------------
def z=(value)
@z=value
privRefresh
end
#--------------------------------------------------------------------
# * disposed?
#--------------------------------------------------------------------
def disposed?
return @disposed
end
#--------------------------------------------------------------------
# * contents=
#--------------------------------------------------------------------
def contents=(value)
@contents=value
privRefresh
end
#--------------------------------------------------------------------
# * windowskin=
#--------------------------------------------------------------------
def windowskin=(value)
@_windowskin=value
if value && value.is_a?(Bitmap) && !value.disposed? && value.width==128
@rpgvx=true
else
@rpgvx=false
end
privRefresh(true)
end
#--------------------------------------------------------------------
# * ox=
#--------------------------------------------------------------------
def ox=(value)
@ox=value
privRefresh
end
#--------------------------------------------------------------------
# * active=
#--------------------------------------------------------------------
def active=(value)
@active=value
privRefresh(true)
end
#--------------------------------------------------------------------
# * cursor_rect=
#--------------------------------------------------------------------
def cursor_rect=(value)
if !value
@cursor_rect.empty
else
@cursor_rect.set(value.x,value.y,value.width,value.height)
end
end
#--------------------------------------------------------------------
# * oy=
#--------------------------------------------------------------------
def oy=(value)
@oy=value
privRefresh
end
#--------------------------------------------------------------------
# * width=
#--------------------------------------------------------------------
def width=(value)
@width=value
privRefresh(true)
end
#--------------------------------------------------------------------
# * height=
#--------------------------------------------------------------------
def height=(value)
@height=value
privRefresh(true)
end
#--------------------------------------------------------------------
# * pause=
#--------------------------------------------------------------------
def pause=(value)
@pause=value
@pauseopacity=0 if !value
privRefresh
end
#--------------------------------------------------------------------
# * x=
#--------------------------------------------------------------------
def x=(value)
@x=value
privRefresh
end
#--------------------------------------------------------------------
# * y=
#--------------------------------------------------------------------
def y=(value)
@y=value
privRefresh
end
#--------------------------------------------------------------------
# * opacity=
#--------------------------------------------------------------------
def opacity=(value)
@opacity=value
@opacity=0 if @opacity<0
@opacity=255 if @opacity>255
privRefresh
end
#--------------------------------------------------------------------
# * back_opacity=
#--------------------------------------------------------------------
def back_opacity=(value)
@back_opacity=value
@back_opacity=0 if @back_opacity<0
@back_opacity=255 if @back_opacity>255
privRefresh
end
#--------------------------------------------------------------------
# * contents_opacity=
#--------------------------------------------------------------------
def contents_opacity=(value)
@contents_opacity=value
@contents_opacity=0 if @contents_opacity<0
@contents_opacity=255 if @contents_opacity>255
privRefresh
end
#--------------------------------------------------------------------
# * tone=
#--------------------------------------------------------------------
def tone=(value)
@tone=value
privRefresh
end
#--------------------------------------------------------------------
# * color=
#--------------------------------------------------------------------
def color=(value)
@color=value
privRefresh
end
#--------------------------------------------------------------------
# * blend_type=
#--------------------------------------------------------------------
def blend_type=(value)
@blend_type=value
privRefresh
end
#--------------------------------------------------------------------
# * flash
#--------------------------------------------------------------------
def flash(color,duration)
return if disposed?
@sprites.each {|sprite| sprite[1].flash(color,duration)}
end

def update
return if disposed?
mustchange=false
if @active
if @cursorblink==0
@cursoropacity-=8
@cursorblink = 1 if @cursoropacity<=128
else
@cursoropacity+=8
@cursorblink=0 if @cursoropacity>=255
end
mustchange=true if !@cursor_rect.isEmpty?
else
mustchange=true if @cursoropacity!=128
@cursoropacity=128
end
if @pause
@pauseframe=(Graphics.frame_count / 8) % 4
@pauseopacity=[@pauseopacity+64,255].min
mustchange=true
end
privRefresh if mustchange
for i in @sprites
i[1].update
end
end
#------------------ Private Methods ------------------#
private
#--------------------------------------------------------------------
# * ensureBitmap
#--------------------------------------------------------------------
def ensureBitmap(bitmap,dwidth,dheight)
if !bitmap||bitmap.disposed?||bitmap.width<dwidth||bitmap.height<dheight
bitmap.dispose if bitmap
bitmap=Bitmap.new([1,dwidth].max,[1,dheight].max)
end
return bitmap
end
#--------------------------------------------------------------------
# * tileBitmap
#--------------------------------------------------------------------
def tileBitmap(dstbitmap,dstrect,srcbitmap,srcrect)
return if !srcbitmap || srcbitmap.disposed?
left=dstrect.x
top=dstrect.y
y=0;loop do break unless y<dstrect.height
x=0;loop do break unless x<dstrect.width
dstbitmap.blt(x+left,y+top,srcbitmap,srcrect)
x+=srcrect.width
end
y+=srcrect.height
end
end
#--------------------------------------------------------------------
# * privRefresh
#--------------------------------------------------------------------
def privRefresh(changeBitmap=false)
return if self.disposed?
backopac = self.back_opacity * self.opacity / 255
contopac = self.contents_opacity
cursoropac = @cursoropacity * contopac / 255
@sprites["contents"].bitmap = @contents
unless @_windowskin.nil? || @_windowskin.disposed?
for i in 0...4
@sprites["corner#{i}"].bitmap = @_windowskin
@sprites["corner#{i}"].opacity = @opacity
@sprites["corner#{i}"].tone = @tone
@sprites["corner#{i}"].color = @color
@sprites["corner#{i}"].blend_type = @blend_type
@sprites["corner#{i}"].visible = @visible
@sprites["side#{i}"].opacity = @opacity
@sprites["side#{i}"].tone = @tone
@sprites["side#{i}"].color = @color
@sprites["side#{i}"].blend_type = @blend_type
@sprites["side#{i}"].visible = @visible
@sprites["scroll#{i}"].bitmap = @_windowskin
@sprites["scroll#{i}"].opacity = @opacity
@sprites["scroll#{i}"].tone = @tone
@sprites["scroll#{i}"].blend_type = @blend_type
@sprites["scroll#{i}"].color = @color
@sprites["scroll#{i}"].visible = @visible
end
@sprites["pause"].bitmap = @_windowskin
for key in ["back", "cursor", "pause", "contents"]
@sprites[key].color = @color
@sprites[key].tone = @tone
@sprites[key].blend_type = @blend_type
end
@sprites["contents"].blend_type = @contents_blend_type
@sprites["contents"].opacity = contopac
@sprites["contents"].visible = @visible && (@openness == 255)
@sprites["cursor"].opacity = cursoropac
@sprites["cursor"].visible = @visible && (@openness == 255)
@sprites["pause"].visible = @visible && @pause
@sprites["pause"].opacity = @pauseopacity
@sprites["back"].opacity = backopac
@sprites["back"].visible = @visible
hascontents = (!@contents.nil? && !@contents.disposed?)
@sprites["scroll0"].visible = @visible && hascontents && @oy > 0
@sprites["scroll1"].visible = @visible && hascontents && @ox > 0
@sprites["scroll2"].visible = @visible && hascontents && (@contents.width - @ox) > @width - 32
@sprites["scroll3"].visible = @visible && hascontents && (@contents.height - @oy) > @height - 32
else
for i in 0...4
@sprites["corner#{i}"].visible = false
@sprites["side#{i}"].visible = false
@sprites["scroll#{i}"].visible = false
end
@sprites["contents"].visible = @visible && @openness==255
@sprites["contents"].color = @color
@sprites["contents"].tone = @tone
@sprites["contents"].blend_type = @contents_blend_type
@sprites["contents"].opacity = contopac
@sprites["back"].visible = false
@sprites["pause"].visible = false
@sprites["cursor"].visible = false
end
@sprites.each { |sprite| sprite[1].z = @z }
if @rpgvx
@sprites["cursor"].z = @z # For Compatibility
@sprites["contents"].z = @z # For Compatibility
@sprites["pause"].z = @z # For Compatibility
trimX = 64
backRect = Rect.new(0,0,64,64)
blindsRect = Rect.new(0,64,64,64)
else
@sprites["cursor"].z = @z + 1 # For Compatibility
@sprites["contents"].z = @z + 2 # For Compatibility
@sprites["pause"].z = @z + 2 # For Compatibility
trimX = 128
backRect = Rect.new(0,0,128,128)
blindsRect = nil
end
trimY = 0
@sprites["corner0"].src_rect.set(trimX, trimY + 0, 16, 16);
@sprites["corner1"].src_rect.set(trimX + 48, trimY + 0, 16, 16);
@sprites["corner2"].src_rect.set(trimX, trimY + 48, 16, 16);
@sprites["corner3"].src_rect.set(trimX + 48, trimY + 48, 16, 16);
@sprites["scroll0"].src_rect.set(trimX + 24, trimY + 16, 16, 8) # up
@sprites["scroll3"].src_rect.set(trimX + 24, trimY + 40, 16, 8) # down
@sprites["scroll1"].src_rect.set(trimX + 16, trimY + 24, 8, 16) # left
@sprites["scroll2"].src_rect.set(trimX + 40, trimY + 24, 8, 16) # right
cursorX=trimX
cursorY=trimY + 64
sideRects= [ Rect.new(trimX + 16, trimY + 0, 32, 16),
Rect.new(trimX, trimY + 16, 16, 32),
Rect.new(trimX + 48, trimY + 16, 16, 32),
Rect.new(trimX + 16, trimY + 48, 32, 16) ]
if (@width > 32) && (@height > 32)
@sprites["contents"].src_rect.set(@ox, @oy, @width - 32, @height - 32)
else
@sprites["contents"].src_rect.set(0,0,0,0)
end
pauseRects=[ trimX + 32, trimY + 64,
trimX + 48, trimY + 64,
trimX + 32, trimY + 80,
trimX + 48, trimY + 80, ]
pauseWidth = 16
pauseHeight = 16
@sprites["pause"].src_rect.set( pauseRects[@pauseframe*2],
pauseRects[@pauseframe*2+1],
pauseWidth,pauseHeight )
@sprites["pause"].x = @x + (@width / 2) - (pauseWidth / 2)
@sprites["pause"].y = @y + @height - 16 # 16 refers to skin margin
@sprites["contents"].x = @x + 16
@sprites["contents"].y = @y + 16
@sprites["corner0"].x = @x
@sprites["corner0"].y = @y
@sprites["corner1"].x = @x + @width - 16
@sprites["corner1"].y = @y
@sprites["corner2"].x = @x
@sprites["corner2"].y = @y + @height - 16
@sprites["corner3"].x = @x + @width - 16
@sprites["corner3"].y = @y + @height - 16
@sprites["side0"].x = @x + 16
@sprites["side0"].y = @y
@sprites["side1"].x = @x
@sprites["side1"].y = @y + 16
@sprites["side2"].x = @x + @width - 16
@sprites["side2"].y = @y + 16
@sprites["side3"].x = @x + 16
@sprites["side3"].y = @y + @height - 16
@sprites["scroll0"].x = @x + @width / 2 - 8
@sprites["scroll0"].y = @y + 8
@sprites["scroll1"].x = @x + 8
@sprites["scroll1"].y = @y + @height / 2 - 8
@sprites["scroll2"].x = @x + @width - 16
@sprites["scroll2"].y = @y + @height / 2 - 8
@sprites["scroll3"].x = @x + @width / 2 - 8
@sprites["scroll3"].y = @y + @height - 16
@sprites["back"].x = @x + 2
@sprites["back"].y = @y + 2
@sprites["cursor"].x = @x + 16 + @cursor_rect.x
@sprites["cursor"].y = @y + 16 + @cursor_rect.y
if changeBitmap && !@_windowskin.nil? && !@_windowskin.disposed?
width = @cursor_rect.width
height = @cursor_rect.height
if (width > 0) && (height > 0)
cursorrects=[
# sides
Rect.new(cursorX+2, cursorY+0, 28, 2),
Rect.new(cursorX+0, cursorY+2, 2, 28),
Rect.new(cursorX+30, cursorY+2, 2, 28),
Rect.new(cursorX+2, cursorY+30, 28, 2),
# corners
Rect.new(cursorX+0, cursorY+0, 2, 2),
Rect.new(cursorX+30, cursorY+0, 2, 2),
Rect.new(cursorX+0, cursorY+30, 2, 2),
Rect.new(cursorX+30, cursorY+30, 2, 2),
# back
Rect.new(cursorX+2, cursorY+2, 28, 28)
]
margin = 2
fullmargin = 4
@cursorbitmap = ensureBitmap(@cursorbitmap, width, height)
@cursorbitmap.clear
@sprites["cursor"].bitmap = @cursorbitmap
@sprites["cursor"].src_rect.set(0, 0, width, height)
rect = Rect.new(margin, margin, width - fullmargin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[8])
@cursorbitmap.blt(0, 0, @_windowskin, cursorrects[4]) # top left
@cursorbitmap.blt(width-margin, 0, @_windowskin, cursorrects[5]) # top right
@cursorbitmap.blt(0, height-margin, @_windowskin, cursorrects[6])# bottom right
@cursorbitmap.blt(width-margin, height-margin, @_windowskin, cursorrects[7]) # bottom left
rect = Rect.new(margin, 0, width - fullmargin, margin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[0])
rect = Rect.new(0, margin, margin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[1])
rect = Rect.new(width - margin, margin, margin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[2])
rect = Rect.new(margin, height-margin, width - fullmargin, margin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[3])
else
@sprites["cursor"].visible = false
@sprites["cursor"].src_rect.set(0, 0, 0, 0)
end
for i in 0..3
dwidth = (i == 0 || i == 3) ? @width-32 : 16
dheight = (i == 0 || i == 3) ? 16 : @height - 32
@sidebitmaps[i] = ensureBitmap(@sidebitmaps[i], dwidth, dheight)
@sprites["side#{i}"].bitmap = @sidebitmaps[i]
@sprites["side#{i}"].src_rect.set(0, 0, dwidth, dheight)
@sidebitmaps[i].clear
if (sideRects[i].width > 0) && (sideRects[i].height > 0)
@sidebitmaps[i].stretch_blt( @sprites["side#{i}"].src_rect,
@_windowskin,sideRects[i] )
end
end
backwidth = @width-4
backheight = @height-4
if (backwidth > 0) && (backheight > 0)
@backbitmap = ensureBitmap(@backbitmap, backwidth, backheight)
@sprites["back"].bitmap = @backbitmap
@sprites["back"].src_rect.set(0, 0, backwidth, backheight)
@backbitmap.clear
if @stretch
@backbitmap.stretch_blt(@sprites["back"].src_rect, @_windowskin,backRect)
else
tileBitmap(@backbitmap,@sprites["back"].src_rect, @_windowskin,backRect)
end
if blindsRect
tileBitmap(@backbitmap,@sprites["back"].src_rect, @_windowskin,blindsRect)
end
else
@sprites["back"].visible = false
@sprites["back"].src_rect.set(0,0,0,0)
end
end
if @openness != 255
opn = @openness/255.0
for key in @spritekeys
sprite = @sprites[key]
ratio = (@height <= 0) ? 0 : (sprite.y - @y) * 1.0 / @height
sprite.zoom_y = opn
sprite.oy = 0
sprite.y = (@y + (@height / 2.0) + (@height * ratio * opn) - (@height / 2 * opn)).floor
oldbitmap = sprite.bitmap
oldsrcrect = sprite.src_rect.clone
end
else
for key in @spritekeys
sprite = @sprites[key]
sprite.zoom_y = 1.0
end
end
# Ensure z order
i = 0
for key in @spritekeys
sprite = @sprites[key]
y = sprite.y
sprite.y = i
sprite.oy = (sprite.zoom_y <= 0) ? 0 : (i - y) / sprite.zoom_y
end
end

end


Menu Script
CODE
=begin                  
                          BigEd781' Final Fantasy IX Menu
            Credit to PainHurt at rpgmakervx.net for most of the graphics
=end

module FF9_Config  
    
  # set this to 'true' if you would like to use a cusotm background image
  USE_CUSTOM_BACK = false
  # the name of the custom background image, without the file extension (no .png)
  BACK_NAME = 'StoneBackground'
  # if you set this to 'true', you must be using the enhanced
  # Window class script that I posted:  You can get that script here:
  # http://www.rpgmakervx.net/index.php?showtopic=8042&hl=
  # this will make the provided FF9 windowskin look really good.
  USE_TILED_WINDOW = false
  
  # When this is set to 'true', the menu cirsor will animate back and forth.
  # When set to 'false', it will stay in place
  ANIMATE_CURSOR = false
  
  # When set to 'true', four background panels are always drawn.
  # When set to 'false', a panel is only drawn for each party member
  DRAW_FOR_ALL = true
  
  # the name of the font used in the menu.  
  # use 'Font.default_name' for the default font.  Try 'Centaur' for a nice, smaller font.
  DEFAULT_FONT = Font.default_name
  
  # set this to true to enable the font above for all windows.
  # also sets the back_opacity to 255 for all windows.  
  # I recommend setting this to 'true' to maintain a consistent look.
  USE_FOR_ALL = true
  
  # the icon id for your gold window portion of the menu, 194 by default.
  GOLD_ICON_ID = 194
  
end

if FF9_Config::USE_FOR_ALL    
  
  Font.default_name = FF9_Config::DEFAULT_FONT
  
  class Window_Base < Window
    
    alias :eds_pre_ff9_menu_base_initialize :initialize
    def initialize(*args)
      eds_pre_ff9_menu_base_initialize(*args)  
      self.stretch = false if FF9_Config::USE_TILED_WINDOW
      self.back_opacity = 255
    end
    
  end
  
end

class Window_Base < Window
  
  CAPTION_COLOR = Color.new(255,255,255)#(228, 228, 228)
  CAPTION_HEIGHT = 12
  X_OFFSET = 16
  Y_OFFSET = -5
  
  alias :eds_pre_window_caption_intialize :initialize
  def initialize(*args)      
    eds_pre_window_caption_intialize(*args)    
    @caption_sprite = Sprite_Base.new(self.viewport)
    create_caption_bitmap(1, CAPTION_HEIGHT)        
    @caption_sprite.x = self.x + X_OFFSET
    @caption_sprite.y = self.y + Y_OFFSET
    @caption_sprite.z = self.z + 1
  end
  
  def x=(value)
    super
    @caption_sprite.x = value + X_OFFSET unless @caption_sprite.nil?
  end
  
  def y=(value)
    super
    @caption_sprite.y = value + Y_OFFSET unless @caption_sprite.nil?
  end
  
  def z=(value)
    super
    @caption_sprite.z = value + 1 unless @caption_sprite.nil?
  end
  
  def caption=(text)
    return unless text.is_a?(String)
    return if text.empty?
    @caption = text
    width = @caption_sprite.bitmap.text_size(@caption).width
    create_caption_bitmap(width, CAPTION_HEIGHT)    
    draw_caption
  end  
  
  def create_caption_bitmap(w, h)
    @caption_sprite.bitmap = Bitmap.new(w, h)    
    @caption_sprite.bitmap.font.size = 12
    @caption_sprite.bitmap.font.color = CAPTION_COLOR
    @caption_sprite.bitmap.font.bold = true  
  end
  
  def draw_caption
    unless @caption.nil?
      h = @caption_sprite.bitmap.height
      w = @caption_sprite.bitmap.width
      rect = Rect.new( 0, h / 2, w, h / 4 )
      @caption_sprite.bitmap.fill_rect(rect, Color.new(0, 0, 0, 96))      
      @caption_sprite.bitmap.draw_text(@caption_sprite.src_rect, @caption)      
    end
  end
  
  alias :eds_pre_caption_window_dispose :dispose
  def dispose
    eds_pre_caption_window_dispose
    @caption_sprite.dispose
  end
  
  def find_window_width(text)              
    return Bitmap.new(544, 416).text_size(text).width + 32
  end    
  
end

class Window_TimeGold < Window_Base  
    
  def initialize(x, y)  
    width = find_window_width("9999999")
    width = 140 if width < 140
    super(x, y, width, WLH + 58)    
    self.back_opacity = 255
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    self.caption = "TIME & #{Vocab.gold}"
    @time_icon = Cache.picture('Timer')  
    @intern_frame_count = 0
    refresh
  end
  
  def draw_time
    sec = (Graphics.frame_count / 60) % 60
    min = (Graphics.frame_count / 3600) % 60
    hrs = Graphics.frame_count / 216000    
    self.contents.font.color = Color.new(255, 255, 255)    
    time = "%02d:%02d:%02d" % [hrs, min, sec]
    self.contents.draw_text(0, 0, self.contents.width, WLH, time, 2)    
  end  
  
  def refresh
    self.contents.clear
    self.contents.blt(0, 0, @time_icon, @time_icon.rect)
    draw_icon(FF9_Config::GOLD_ICON_ID, 2, WLH)  
    draw_currency_value($game_party.gold, 0, WLH, self.contents.width)
    draw_time
  end
  
  def draw_currency_value(value, x, y, width)
    gold_text = Vocab.gold
    cx = contents.text_size(gold_text[0,1]).width
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, width - cx - 2, WLH, value, 2)
    self.contents.font.color = system_color
    # just print the first character of Vocab::gold
    self.contents.draw_text(x, y, width, WLH, gold_text[0,1], 2)
  end
  
  def update
    super
    @intern_frame_count += 1
    return if (@intern_frame_count % 60) != 0          
    refresh
  end
  
  def find_window_width(text)              
    return Bitmap.new(544, 416).text_size(text).width + 80
  end
  
end

class Window_MenuLocation < Window_Base
  
  def initialize(x, y)
    @map_name = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name
    width = find_window_width(@map_name)
    super(x, y, width, WLH + 32)    
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    self.back_opacity = 255
    self.caption = "LOCATION"
    refresh
  end
  
  def refresh
    self.contents.clear    
    self.contents.draw_text(0, 0, self.contents.width, WLH,  @map_name, 1)
  end
  
  def find_window_width(text)              
    return Bitmap.new(544, 416).text_size(text).width + 48
  end
  
end

class Window_Command < Window_Selectable
  
  alias :eds_pre_ff9_menu_win_command_init :initialize
  def initialize(*args)
    @font_name = Font.default_name    
    eds_pre_ff9_menu_win_command_init(*args)    
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear    
    self.contents.font.name = @font_name
    for i in 0...@item_max
      draw_item(i)
    end
  end
  
  def font_name=(name)
    @font_name = name    
  end
  
end

class Window_Uses < Window_Base  
  
  def initialize(right, y, item)    
    @remaining_text = "Remaining: #{$game_party.item_number(item)}"
    w = 160
    x = right ? (544 - w) : 0    
    super(x, y, w, WLH + 32)    
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    refresh
  end
  
  def item=(item)    
    return unless item.is_a?(RPG::Item)
    @remaining_text = "Remaining: #{$game_party.item_number(item)}"      
    refresh
  end
  
  def visible=(value)
    super
    refresh if value
  end
  
  def refresh
    self.contents.clear
    self.contents.draw_text(self.contents.rect, @remaining_text, 1)
  end
  
end

class Window_SkillUses < Window_Base  
  
  def initialize(right, y, actor, skill)    
    @remaining_text = make_info_string(actor, skill)
    w = 182
    x = right ? (544 - w) : 0        
    super(x, y, w, WLH + 32)  
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    refresh
  end
  
  def make_info_string(actor, skill)
    return if actor.nil? || skill.nil?
    cost = actor.calc_mp_cost(skill)
    return "Unlimited" if cost < 1
    return "Remaining: #{actor.mp / cost}"
  end
  
  def set_skill(actor, skill)
    return if actor.nil? || skill.nil?
    return unless skill.is_a?(RPG::Skill)
    @remaining_text = make_info_string(actor, skill)    
    refresh
  end
  
  def visible=(value)
    super
    refresh if value
  end
  
  def refresh    
    self.contents.clear
    self.contents.draw_text(self.contents.rect, @remaining_text, 1)
  end
  
end

class Window_MenuStatus < Window_Selectable
    
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 452, 352)      
    @bg_image = Cache.picture('FF9_MenuBar')  
    @arrow_image = Cache.picture('Pointer')
    create_arrow_sprites
    @sprite_last_draw_x = 0
    @sprite_inc_x = 1
    @intern_frame_count = 0    
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    self.opacity = 0    
    self.z = 99        
    self.active = false
    self.index = -1
    refresh
  end
  #--------------------------------------------------------------------------
  # * create_arrow_sprites
  #--------------------------------------------------------------------------
  def create_arrow_sprites  
    @arrow_sprites = []
    for i in 0..3
      @arrow_sprites << Sprite.new
      @arrow_sprites[i].bitmap = Bitmap.new(@arrow_image.width + 7, @arrow_image.height)
      @arrow_sprites[i].x = self.x
      @arrow_sprites[i].y = (i * 80) + self.y + 40      
      @arrow_sprites[i].z = 999        
    end
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    draw_background_windows if FF9_Config::DRAW_FOR_ALL
    for actor in $game_party.members
      x = 104
      y = actor.index * 80      
      y_offset = 6      
      draw_background_window(0, y) unless FF9_Config::DRAW_FOR_ALL
      draw_actor_face(actor, 19, y + 4, 73)
      draw_actor_name(actor, x, y + y_offset)
      draw_actor_class(actor, x + 125, y + y_offset) if actor.states.empty?
      draw_actor_level(actor, x, y + WLH * 1)      
      draw_actor_state(actor, x + 125, y + y_offset)
      draw_actor_hp(actor, x, ((y) + (WLH * 2) - 5))
      draw_actor_mp(actor, x + 125, ((y) + (WLH * 2) - 5))
    end
  end  
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def update_cursor              
    if @index < 0              
      #refactor into update arrow method
      @arrow_sprites.each { |sprite| sprite.bitmap.clear }
      return
    end
    @intern_frame_count += 1
    return unless (@intern_frame_count % 5) == 0
    if @sprite_last_draw_x >= 7      
      @sprite_inc_x = -1
    elsif @sprite_last_draw_x <= 0
      @sprite_inc_x = 1
    end
    update_arrow_sprites
  end
  #--------------------------------------------------------------------------
  # * update_arrow_sprites
  #--------------------------------------------------------------------------
  def update_arrow_sprites    
    @arrow_sprites.each { |sprite| sprite.bitmap.clear }    
    if @index == 99   # all selected        
      return unless (@intern_frame_count % 10) == 0
      draw_arrow_sprites(@arrow_sprites, false)      
    else
      draw_arrow_sprites([@arrow_sprites[@index]], FF9_Config::ANIMATE_CURSOR)      
    end
  end
  #--------------------------------------------------------------------------
  # * draw_arrow_sprites
  #--------------------------------------------------------------------------
  def draw_arrow_sprites(sprites, animated=true)
    for sprite in sprites          
      image_x = animated ? @sprite_last_draw_x + @sprite_inc_x : 0
      @sprite_last_draw_x = image_x            
      sprite.bitmap.blt(image_x, 0, @arrow_image, @arrow_image.rect)
    end
  end
  #--------------------------------------------------------------------------
  # * y=
  #--------------------------------------------------------------------------
  def y=(value)
    super
    unless @arrow_sprites.nil?
      for i in 0..3
        @arrow_sprites[i].y = (i * 80) + value + 40
      end
    end
  end
  #--------------------------------------------------------------------------
  # * x=
  #--------------------------------------------------------------------------
  def x=(value)
    super
    unless @arrow_sprites.nil?
      @arrow_sprites.each { |sprite| sprite.x = value }
    end
  end
  #--------------------------------------------------------------------------
  # * draw_background_windows
  #--------------------------------------------------------------------------
  def draw_background_windows  
    self.contents.blt(0, 0, @bg_image, @bg_image.rect)    
    self.contents.blt(0, 80, @bg_image, @bg_image.rect)    
    self.contents.blt(0, 160, @bg_image, @bg_image.rect)    
    self.contents.blt(0, 240, @bg_image, @bg_image.rect)    
  end  
  #--------------------------------------------------------------------------
  # * draw_background_window (single)
  #--------------------------------------------------------------------------
  def draw_background_window(x, y)
    self.contents.blt(x, y, @bg_image, @bg_image.rect)    
  end
  #--------------------------------------------------------------------------
  # * visible
  #--------------------------------------------------------------------------
  def visible=(value)
    super
    @arrow_sprites.each { |sprite| sprite.visible = value }
  end
  #--------------------------------------------------------------------------
  # * dispose
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_win_stat_dispose :dispose
  def dispose
    eds_pre_ff9_win_stat_dispose
    @arrow_sprites.each { |sprite| sprite.dispose }
  end
  
  def enable_cursor?(rect=nil)
    # for compatibility with the improved command window
    return false
  end    
  
end

class Scene_Menu
      
  #--------------------------------------------------------------------------
  # * create_menu_background (only if USE_CUSTOM_BACK == true)
  #--------------------------------------------------------------------------
  if FF9_Config::USE_CUSTOM_BACK
    
    def create_menu_background
      @menuback_sprite = Sprite.new
      @menuback_sprite.bitmap = Cache.picture(FF9_Config::BACK_NAME)
      @menuback_sprite.color.set(16, 16, 16, 128)
      update_menu_background
    end
    
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------    
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    # just changed the width of the window here
    @command_window = Window_Command.new(132, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.stretch = false if FF9_Config::USE_TILED_WINDOW
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end      
    # new stuff here    
    @command_window.font_name = FF9_Config::DEFAULT_FONT
    @command_window.x = 528 - @command_window.width
    @command_window.y = 16
    @command_window.back_opacity = 255
  end
  #--------------------------------------------------------------------------
  # * This method is intended to fix some compatibility problems
  #   that scripts run into when they change the command window
  #   in some way.  So, we let them override "create_command_window"
  #   and we simply don't call it from the "start" method.
  #   Instead, we call this method which does some extra checking.
  #--------------------------------------------------------------------------
  def eds_create_command_window
    create_command_window
    old_commands = @command_window.commands
    return if old_commands == [ Vocab::item,
                                Vocab::skill,
                                Vocab::equip,
                                Vocab::status,
                                Vocab::save,
                                Vocab::game_end ]

    # so we know that the default command window is not being used
    # we don't want to create another window, so we manually resize it
    # before the player can see.  
    long = ''
    # dynamically size the width based on the longest command
    old_commands.each { |command| long = command if command.length > long.length }
    # set the index to -1 so that the rectangle disappears.
    # if we don't do this, you can see the selection rectangle resize.
    @command_window.index = -1
    @command_window.width = @command_window.contents.text_size(long).width + 42
    @command_window.contents = Bitmap.new( @command_window.width - 32,
                                           @command_window.height - 32 )    
    @command_window.font_name = FF9_Config::DEFAULT_FONT
    @command_window.x = 528 - @command_window.width
    @command_window.y = 16
    @command_window.back_opacity = 255        
    @command_window.refresh
    @command_window.index = @menu_index
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    #call this method for compatibility
    eds_create_command_window
    @gold_window = Window_TimeGold.new(372, 342)
    @gold_window.y -= @gold_window.height
    @gold_window.x = 528 - @gold_window.width
    @status_window = Window_MenuStatus.new(0, 12)
    @location_window = Window_MenuLocation.new(0, 0)
    @location_window.x = 528 - @location_window.width  
    @location_window.y = 398 - @location_window.height
  end
  
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_menu_terminate :terminate
  def terminate
    eds_pre_ff9_menu_scene_menu_terminate
    @location_window.dispose
  end
  
end

class Scene_Item < Scene_Base
  
  #--------------------------------------------------------------------------
  # * start
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_start :start
  def start        
    eds_pre_ff9_menu_scene_item_start
    @target_window.y = 58    
    @uses_window = Window_Uses.new(true, @help_window.height, nil)
    @uses_window.visible = false
  end  
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #   - right-align flag ignored
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_win_stat_show_target_window :show_target_window
  def show_target_window(right)  
    @uses_window.item = @item_window.item
    @uses_window.visible = true    
    @item_window.visible = false    
    @item_window.active = false    
    @target_window.visible = true
    @target_window.active = true  
    @viewport.rect.set(0, 0, 544, 416)
    @viewport.ox = 0
  end
  #--------------------------------------------------------------------------
  # * hide_target_window
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_hide_target_window :hide_target_window
  def hide_target_window
    eds_pre_ff9_menu_scene_item_hide_target_window  
    @uses_window.visible = false unless @uses_window.nil?
    @item_window.visible = true        
  end
  #--------------------------------------------------------------------------
  # * determine_target
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_determine_target :determine_target
  def determine_target    
    eds_pre_ff9_menu_scene_item_determine_target
    @uses_window.item = @item_window.item
  end    
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_terminate :terminate
  def terminate
    eds_pre_ff9_menu_scene_item_terminate
    @uses_window.dispose
  end
  
end

class Scene_Skill < Scene_Base
  
  #--------------------------------------------------------------------------
  # * start
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_skill_start :start
  def start        
    eds_pre_ff9_menu_scene_skill_start
    @target_window.y = 58          
    @uses_window = Window_SkillUses.new(true, @help_window.height, nil, nil)
    @uses_window.visible = false
  end  
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #   - right-align flag ignored
  #--------------------------------------------------------------------------
  def show_target_window(right)
    @uses_window.set_skill($game_party.members[@actor_index], @skill_window.skill)
    @uses_window.visible = true
    @status_window.visible = false
    @skill_window.visible = false
    @skill_window.active = false    
    @target_window.visible = true
    @target_window.active = true  
    @viewport.rect.set(0, 0, 544, 416)
    @viewport.ox = 0
  end
  #--------------------------------------------------------------------------
  # * hide_target_window
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_skill_hide_target_window :hide_target_window
  def hide_target_window
    eds_pre_ff9_menu_scene_skill_hide_target_window  
    @uses_window.visible = false unless @uses_window.nil?
    @skill_window.visible = true
    @status_window.visible = true
  end
  #--------------------------------------------------------------------------
  # * determine_target
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_skill_determine_target :determine_target
  def determine_target    
    eds_pre_ff9_menu_scene_skill_determine_target
    @uses_window.set_skill($game_party.members[@actor_index], @skill_window.skill)
  end    
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_terminate :terminate
  def terminate
    eds_pre_ff9_menu_scene_item_terminate
    @uses_window.dispose
  end
  
end


Compatibility
Compatibility should be really good with other menu mod scripts as long as they appear after this script in the editor. Let me know of any bugs.
l33tpie 6
Hey, nice script there, BigEd! I really liked the menu from Final Fantasy IX (I've begun playing it again) so I'll be sure to use this script and credit you! I'll post any bugs I find in a minute, I'm going to test it now.

EDIT: Already found one, heh. When I opened the menu, all of the options in the blue box (Items, Skills, you know the deal) were on the opposite side they were meant to be (regular RMVX side). Help?
BigEd781
That's not a bug, the options are on the right hand side of the screen in FF IX. Do you mean that they are on the left? It must be another script causing problems if that is the case. Try making it the top-most script in the editor.
Ziosin
Wow. this is an amazing menu script.

I'll test it out when I get home and see if there are any bugs.
originalwij
very nice!
i like the clean look of it, good work!
BigEd781
OK, so the smart command window isn't as smart as I had hoped wink.gif. There are a few bugs to fix, I'll have it done soon.
Lockheart
I'm totally loving this script. I enjoyed the FFXI menu and now I can have it in my game!

One quick suggestion, up to you but I think it'd be cool to have.

My idea is this: make this script compatible with large party scripts, like KGC's(link available if you need it) so when you press left or right (or go to the bottom of the list or top) you'll scroll to the next four available characters, but rather then scrolling up and down it'd shift the current members listed left(if you scroll right) and scroll in the new member from the left(under the right side menu)

Now I don't know HOW hard that might be, but it'd be cool/interesting if it was done.

Regardless, VERY cool script, well done!

EDIT: Oh and by the way, most menu scripts work best if they are ABOVE this script, KGC mainly. just something you might want to point out.
TooManyToasters
This looks really cool. Is there an option to remove items I don't want, i.e. make it so that only Status, Save and Quit are available from the menu?
jens009
Woah. Very nicely made script Big Ed!
This is one of the cleanest and will probably one of the best Final Fantasy Script out there.

QUOTE (TooManyToasters @ Dec 27 2008, 07:40 AM) *
This looks really cool. Is there an option to remove items I don't want, i.e. make it so that only Status, Save and Quit are available from the menu?

This can be done through simple script edits. Simply remove a command from the array and delete the case handler to which those commands apply to. Of course, Big Ed's script is a modification of the original Scene_Menu script. (Good job Ailiasing and editting old methods as least as possible).

So you have to change it through your old Scene_Menu.

Good job once again!
TooManyToasters
QUOTE (jens009 @ Dec 27 2008, 02:27 PM) *
QUOTE (TooManyToasters @ Dec 27 2008, 07:40 AM) *
This looks really cool. Is there an option to remove items I don't want, i.e. make it so that only Status, Save and Quit are available from the menu?

This can be done through simple script edits. Simply remove a command from the array and delete the case handler to which those commands apply to. Of course, Big Ed's script is a modification of the original Scene_Menu script. (Good job Ailiasing and editting old methods as least as possible).

I didn't understand a word of what you just said. I tried fiddling with the script, but it didn't work at all.
N2Y
Thank you for this script! The menu looks beautiful. Check out my SEXY menu!



I combined Dargor's Junction, Draw Skill, Party Switch, Bestiary, Large Party and Custom Commands scripts and the Tankentai Battle System (ATB). It all works smoothly aside each other, except some features from the Junction and Draw that doesnt work. (in case people are interested in combining the scripts too)

Anyways, thank you very much for this. I love it. Cheers!
BigEd781
N2Y Nice menu! I suggest you get this patch. It will fix your menu alignment issue and also fixes the item and skill menus.

Updates / BugFixes (Read if you already have an older version)
12/28/08
➮ Added the animated cursor feature to all windows in another script. Get it here.
Please rename your arrow image to "Pointer.png" or the script will not work!
➮ Fixed a bug that appeared in the Skill and Item menus. These menus have now been overhauled to fit the menu.
➮ Removed the "smart command window" option. The command window in the menu is now the right size, but other windows will not be affected.
➮ Added a few more pointer images.

For those using Sephirothspawn's Materia script

There is a clash between the two. To fix this, first put my script above the Materia script. Now find the function "create_command_window" in the Materia script (It is in the "Scene_Menu" section) and replace the whole function with this. Make sure to replace the whole thing.
CODE
def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = "Materia"
    s6 = Vocab::save
    s7 = Vocab::game_end
    @command_window = Window_Command.new(132, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    if $game_party.members.size == 0
      @command_window.draw_item(0, false)
      @command_window.draw_item(1, false)
      @command_window.draw_item(2, false)
      @command_window.draw_item(3, false)
      @command_window.draw_item(4, false)
    end
    if $game_system.save_disabled
      @command_window.draw_item(5, false)
    end
    # new stuff here
    @command_window.font_name = FF9_Config::DEFAULT_FONT
    @command_window.x = 528 - @command_window.width
    @command_window.y = 16
    @command_window.back_opacity = 255
  end
N2Y
Thanks. To be honest I didn't use it, because it actually messed up my menu, where all the extra options I had in the menu were overwritten and only the default ones were in the menu.

So I just used the old one and aligned them, by playing with the numbers of the width and height.

It's perfect now.

Thanks anyways.
5xhunterx5
Hi! Im kinda bad at putting scripts in or making them work. I got a minor problem but the Menu Bar won't show up. I tried to see if any scripts messed with it but I got nothing. If any one can help me, it would be much appreciated. Thanks laugh.gif
BigEd781
Are you saying that it doesn't even work in a new project? I find that hard to believe. Someone on another forum pointed out that this problem is caused by the KGC Large Party Script. That script probably overwrites the "refresh" function in Window_MenuStatus. If you add in the stuff in mine that is not in theirs it should work.
Vascious
QUOTE (BigEd781 @ Dec 30 2008, 05:26 PM) *
Are you saying that it doesn't even work in a new project? I find that hard to believe. Someone on another forum pointed out that this problem is caused by the KGC Large Party Script. That script probably overwrites the "refresh" function in Window_MenuStatus. If you add in the stuff in mine that is not in theirs it should work.

That would be me rolleyes.gif


QUOTE
Hi! Im kinda bad at putting scripts in or making them work. I got a minor problem but the Menu Bar won't show up. I tried to see if any scripts messed with it but I got nothing. If any one can help me, it would be much appreciated. Thanks laugh.gif


It would help if you gave a list of all the scripts you are using because then BigEd could possibly help you find out your problem.
BigEd781
Vascious, did you get the large party script to work? If not, I will need to create a patch for it.
Vascious
QUOTE (BigEd781 @ Dec 30 2008, 06:17 PM) *
Vascious, did you get the large party script to work? If not, I will need to create a patch for it.

Not yet I haven't had the time to sit down and go through every single line for the window section of both scripts because I've been packing for college. I might not be able to check till Thrursday or Saturday.
BigEd781
I'll make it easier for you. Find the Window_MenuStatus definition in the large party script. Compare the "refresh" function with mine below. The stuff that mine has that theirs does not needs to be added and equivalent function calls should be replaced if they are different.

CODE
def refresh    
    self.contents.clear
    @item_max = $game_party.members.size
    draw_background_windows
    for actor in $game_party.members      
      x = 104
      y = actor.index * 80      
      y_offset = 6      
      draw_actor_face(actor, 19, y + 4, 73)      
      draw_actor_name(actor, x, y + y_offset)
      draw_actor_class(actor, x + 125, y + y_offset)
      draw_actor_level(actor, x, y + WLH * 1)
      draw_actor_state(actor, x, y + WLH * 2)
      draw_actor_hp(actor, x, ((y) + (WLH * 2) - 5))
      draw_actor_mp(actor, x + 125, ((y) + (WLH * 2) - 5))    
    end
  end
Vascious
QUOTE (BigEd781 @ Dec 30 2008, 07:33 PM) *
I'll make it easier for you. Find the Window_MenuStatus definition in the large party script. Compare the "refresh" function with mine below. The stuff that mine has that theirs does not needs to be added and equivalent function calls should be replaced if they are different.

CODE
def refresh    
    self.contents.clear
    @item_max = $game_party.members.size
    draw_background_windows
    for actor in $game_party.members      
      x = 104
      y = actor.index * 80      
      y_offset = 6      
      draw_actor_face(actor, 19, y + 4, 73)      
      draw_actor_name(actor, x, y + y_offset)
      draw_actor_class(actor, x + 125, y + y_offset)
      draw_actor_level(actor, x, y + WLH * 1)
      draw_actor_state(actor, x, y + WLH * 2)
      draw_actor_hp(actor, x, ((y) + (WLH * 2) - 5))
      draw_actor_mp(actor, x + 125, ((y) + (WLH * 2) - 5))    
    end
  end


Okay I found KGC's Section for it. At the moment I have replaced two lines that I figure need to be replaced out but I seem to be getting a syntax error. Here is KGC's Window Menu Status for the "refresh" section:
CODE
def refresh
    @item_max = $game_party.members.size
    create_contents
    fill_stand_by_background
    draw_member
  end
BigEd781
OK, added a patch for KGC's Large Party Script at the top.
ZoraKing


Uh, I hope i did that right but the main point here is that the menu for item/skill/options etc is on the left covering the characters when it should probably be on the right, correct?
If you have any fix to this that'd be great.
Someone on the last page posted this problem but I didnt see a response for it so any help would be appreciated..yah. mellow.gif
BigEd781
Again, please read the entire post. I cannot help you with no information. It is obviously a conflicting script. Have you checked out the two patches I posted? I know exactly where the problem is; one of the other scripts that you are using has overwritten the "create_command_window" function in Scene_Menu. It is most likely whichever script added the "ATB options" option to the menu. If you want help I can help you, but follow the rules and give me more info.
Lockheart
Love the new script, makes using skills and items on the party look and work better with out looking odd. Loving how it shows you how many uses remain with you current level of MP a skill can be used for.

Only beef I have is I liked how before it only showed the four party member bars if there was that many, i.e. 1 party member, one bar shown for that member, no others shown.
BigEd781
QUOTE (Lockheart @ Dec 31 2008, 02:59 PM) *
Love the new script, makes using skills and items on the party look and work better with out looking odd.

Only beef I have is I liked how before it only showed the four party member bars if there was that many, i.e. 1 party member, one bar shown for that member, no others shown.


Thanks. I decided to show all four bars because that is how it is done in Final Fantasy IX (and I like it better). It could be changed rather easily, would you like that version?
Flamehawk27
Ive had the same problem as two other people with the menu bar covering the charachter's info bars, were the Menu is on the left isntead of the right. Im going to give you as much information as I can, although I am not a scripting maven.

I am using an ATB battle system script, however the controls to this script are not accesible through the menu. They can only be changed by variables.

I am also using the Large Party Script that you mentioned, but when I try to click on your patch on the first post, it just takes me back to this topic. I dont know if that patch will solve the problem, or if I should just get rid of the party script to fix it.

Everything else about the script works BEAUTIFULLY.
Lockheart
QUOTE (BigEd781 @ Dec 31 2008, 06:00 PM) *
Thanks. I decided to show all four bars because that is how it is done in Final Fantasy IX (and I like it better). It could be changed rather easily, would you like that version?


if you could either release it that way or tell me how to change it, it would be great.
I admit, yes it is how FFIX does it and it looks good in that game but with a map based background like this menu has I think limiting the bars to the number of party members looks better, BUT to each his own, yes?
Flamehawk27
Never mind, I fixed the problem. For everyone having trouble with the bars being on the left, you have to stop using the Party Script at all from what ive seen.
BigEd781
QUOTE (Flamehawk27 @ Dec 31 2008, 05:56 PM) *
Never mind, I fixed the problem. For everyone having trouble with the bars being on the left, you have to stop using the Party Script at all from what ive seen.


Not true at all. It is a single conflicting method. As to why the spoiler is not working, I don't know, but I'll fix it.
Mr. Bubble
@Flamehawk: The spoiler for LargeParty is really messed up, but you can still get the script if you hit the reply button in the first post.

But I've put it in an easy to copy text.

Click to view attachment

The reason why it LargeParty overwrites the status window is because when SHOW_STAND_BY_MEMBER_NOT_IN_BATTLE = true, it allows you to see status, change equipment and use items on any benched party members without them having to be in the main party.

For the ATB Options in the menu for the sideview, you can read this tutorial on menu command customization:

http://www.rpgrevolution.com/forums/index....showtopic=15543 ( Don't bump this topic, it's old! )

As reference, the scene command for the ATB scene is "$scene = Scene_ATB.new" without quotes. The menu vocab for it is "N02::ATB_CUSTOMIZE_NAME" without quotes.
BigEd781
Spoiler fixed, thanks guys/
Lockheart
I thought I should point this out, maybe this is normal(been a while since I last played FFIX) but when the seconds timer hits 60 is adds the correct minute to the minute timer however the seconds don't reset to 0 instead they continue to count up. minor thing but I thought I should point it out.
BigEd781
Update
➮ Added a new script and option which will make the window look a lot nicer when using the FF9 windowskin below.
➮ Fixed a bug that appeared in the play time display window.
➮ Made the layout look a little nicer.
Lockheart
Everything seems to be in working order, the skin looks perfect! Well done.

just FYI, I'm still waiting on that script alteration you said about earlier?
Darkspear
Very good script. Looks really well. Easily setup. Thank you very much! biggrin.gif thumbsup.gif
Lockheart
Found another bug, I think this is just how RMVX works default but. If a character is inflicted with say poison, it is shown underneath their HP bar, I don't know if this can be fixed, moved or changed, it could be hard coded(doubt it) but if you can change it, I would recommend having it replace the class name(As that is where they went in FFIX)

Based off that I came up with an idea you might, or might not go for, your choice. Perhaps if there is a status infliction, the class name disappears and the conditions of that character are shown, but once there are no more inflictions the class name will replace the now blank spot? What do you think?
BigEd781
QUOTE (Lockheart @ Jan 1 2009, 11:07 AM) *
Based off that I came up with an idea you might, or might not go for, your choice. Perhaps if there is a status infliction, the class name disappears and the conditions of that character are shown, but once there are no more inflictions the class name will replace the now blank spot? What do you think?


Ahh, nice catch wink.gif. I didn't think about those. I was having the same idea about replacing the class name with the icons. I think that is the best solution. I will fix that and get you your version once I get back from breakfast at Denny's (yeah, it's 2:16, but I'm hungover...).
Lockheart
I shall keep you posted with other things I find. Thanks again for the other script version.
Xarak
Hey! I think I found out an easier way to solve the problem with the menu on the left, at least in one case.
PREREQUISITES:
I have the Tanketai SBS with the ATB (1.1) installed. I'm not sure if this matters - but just in case.
Step 1: Place BigEd's FFIX Menu script ABOVE the SBS scripts. Now search in the menu script for where it says in comments:
CODE
# new stuff here

Copy the following:
CODE
    @command_window.font_name = FF9_Config::DEFAULT_FONT
    @command_window.x = 528 - @command_window.width
    @command_window.y = 16
    @command_window.back_opacity = 255

... between the last 2 end's in the similar section in the ATB menu. It will look like this:
CODE
class Scene_Menu < Scene_Base
  #--------------------------------------------------------------------------
  # — ‚ƒžƒƒ‰‚‚ƒƒ‰‚のœˆ
  #--------------------------------------------------------------------------
  alias create_command_window_n02 create_command_window
  def create_command_window
    return create_command_window_n02 if !N02::ATB_CUSTOMIZE
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = N02::ATB_CUSTOMIZE_NAME
    s6 = Vocab::save
    s7 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    if $game_party.members.size == 0          # ƒ‘ƒƒ†‚人•Œ 0 人の場ˆ
      @command_window.draw_item(0, false)     # ‚‚ƒ†ƒ‚’„ŠŒ–
      @command_window.draw_item(1, false)     # ‚‚ƒ‚’„ŠŒ–
      @command_window.draw_item(2, false)     # …‚™‚’„ŠŒ–
      @command_window.draw_item(3, false)     # ‚ƒ†ƒ‚‚‚’„ŠŒ–
    end
    if $game_system.save_disabled             # ‚ƒƒ–禁止の場ˆ
      @command_window.draw_item(5, false)     # ‚ƒƒ–‚’„ŠŒ–
    end
    @command_window.font_name = FF9_Config::DEFAULT_FONT
    @command_window.x = 528 - @command_window.width
    @command_window.y = 16
    @command_window.back_opacity = 255
end

I tried it out and it works perfectly in the menu. I hope that helped. (BTW I tried that link Wora had to that tut but all it did was confuse me)
BigEd781
yes Xarak, that is what the problem is in almost all cases. I explained it a couple of times, but I guess a visual aid was needed. I also change the size of the window in this line of code because I thought it was too wide.

CODE

                                                                              #change this from 160 to 132
@command_window = Window_Command.new(132, [s1, s2, s3, s4, s5, s6, s7])


I am thinking of ways to fix this problem and still retain everything I want in my menu.

I have an update to post soon, so watch out for that.
BigEd781
UPDATE

➮ Fixed a bug with the icons that are displayed when a player has a status effect. The icons will replace the class name.
➮ Added captions to the main menu windows.

@Lockheart: Here is your script. Remember though that upgrading wil now be more difficult. The methods that are different are the "refresh" and "draw_background_window" methods. I left the original code commented out so that you can do your own patches.

[Show/Hide] Lockheart's script
CODE
# TODO:
#       1.  Add a "select all" option to the menu appearance
#       2.  Add an animation when an item is used.  

=begin                  
                          BigEd781' Final Fantasy IX Menu
            Credit to PainHurt at rpgmakervx.net for most of the graphics
=end

module FF9_Config  
    
  # if you set this to 'true', you must be using the enhanced
  # Window class script that I posted:  You can get that script here:
  # http://www.rpgmakervx.net/index.php?showtopic=8042&hl=
  # this will make the provided FF9 windowskin look really good.
  USE_TILED_WINDOW = false
  
  # the name of the font used in the menu.  
  # use 'Font.default_name' for the default font.  Try 'Centaur' for a nice, smaller font.
  DEFAULT_FONT = Font.default_name
  
  # set this to true to enable the font above for all windows.
  # also sets the back_opacity to 255 for all windows.  
  # I recommend setting this to 'true' to maintain a consistent look.
  USE_FOR_ALL = true
  
  # the icon id for your gold window portion of the menu, 194 by default.
  GOLD_ICON_ID = 194
  
end

if FF9_Config::USE_FOR_ALL    
  
  Font.default_name = FF9_Config::DEFAULT_FONT
  
  class Window_Base < Window
    
    alias :eds_pre_ff9_menu_base_initialize :initialize
    def initialize(*args)
      eds_pre_ff9_menu_base_initialize(*args)  
      self.stretch = false if FF9_Config::USE_TILED_WINDOW
      self.back_opacity = 255
    end
    
  end
  
end

class Window_Base < Window
  
  CAPTION_COLOR = Color.new(255,255,255)#(228, 228, 228)
  CAPTION_HEIGHT = 12
  X_OFFSET = 16
  Y_OFFSET = -5
  
  alias :eds_pre_window_caption_intialize :initialize
  def initialize(*args)      
    eds_pre_window_caption_intialize(*args)    
    @caption_sprite = Sprite_Base.new(self.viewport)
    create_caption_bitmap(1, CAPTION_HEIGHT)        
    @caption_sprite.x = self.x + X_OFFSET
    @caption_sprite.y = self.y + Y_OFFSET
    @caption_sprite.z = self.z + 1
  end
  
  def x=(value)
    super
    @caption_sprite.x = value + X_OFFSET unless @caption_sprite.nil?
  end
  
  def y=(value)
    super
    @caption_sprite.y = value + Y_OFFSET unless @caption_sprite.nil?
  end
  
  def z=(value)
    super
    @caption_sprite.z = value + 1 unless @caption_sprite.nil?
  end
  
  def caption=(text)
    return unless text.is_a?(String)
    return if text.empty?
    @caption = text
    width = @caption_sprite.bitmap.text_size(@caption).width
    create_caption_bitmap(width, CAPTION_HEIGHT)    
    draw_caption
  end  
  
  def create_caption_bitmap(w, h)
    @caption_sprite.bitmap = Bitmap.new(w, h)    
    @caption_sprite.bitmap.font.size = 12
    @caption_sprite.bitmap.font.color = CAPTION_COLOR
    @caption_sprite.bitmap.font.bold = true  
  end
  
  def draw_caption
    unless @caption.nil?
      h = @caption_sprite.bitmap.height
      w = @caption_sprite.bitmap.width
      rect = Rect.new( 0, h / 2, w, h / 4 )
      @caption_sprite.bitmap.fill_rect(rect, Color.new(0, 0, 0, 96))      
      @caption_sprite.bitmap.draw_text(@caption_sprite.src_rect, @caption)      
    end
  end
  
  alias :eds_pre_caption_window_dispose :dispose
  def dispose
    eds_pre_caption_window_dispose
    @caption_sprite.dispose
  end
  
  def find_window_width(text)              
    return Bitmap.new(544, 416).text_size(text).width + 32
  end    
  
end

class Window_TimeGold < Window_Base  
    
  def initialize(x, y)  
    width = find_window_width("9999999")
    width = 140 if width < 140
    super(x, y, width, WLH + 58)    
    self.back_opacity = 255
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    self.caption = "TIME & #{Vocab.gold}"
    @time_icon = Cache.picture('Timer')  
    @intern_frame_count = 0
    refresh
  end
  
  def draw_time
    sec = (Graphics.frame_count / 60) % 60
    min = (Graphics.frame_count / 3600) % 60
    hrs = Graphics.frame_count / 216000    
    self.contents.font.color = Color.new(255, 255, 255)    
    time = "%02d:%02d:%02d" % [hrs, min, sec]
    self.contents.draw_text(0, 0, self.contents.width, WLH, time, 2)    
  end  
  
  def refresh
    self.contents.clear
    self.contents.blt(0, 0, @time_icon, @time_icon.rect)
    draw_icon(FF9_Config::GOLD_ICON_ID, 2, WLH)  
    draw_currency_value($game_party.gold, 0, WLH, self.contents.width)
    draw_time
  end
  
  def draw_currency_value(value, x, y, width)
    gold_text = Vocab.gold
    cx = contents.text_size(gold_text[0,1]).width
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, width-cx-2, WLH, value, 2)
    self.contents.font.color = system_color
    # just print the firsat character of Vocab::gold
    self.contents.draw_text(x, y, width, WLH, gold_text[0,1], 2)
  end
  
  def update
    super
    @intern_frame_count += 1
    return if (@intern_frame_count % 60) != 0          
    refresh
  end
  
  def find_window_width(text)              
    return Bitmap.new(544, 416).text_size(text).width + 80
  end
  
end

class Window_MenuLocation < Window_Base
  
  def initialize(x, y)
    @map_name = load_data("Data/MapInfos.rvdata")[$game_map.map_id].name
    width = find_window_width(@map_name)
    super(x, y, width, WLH + 32)    
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    self.back_opacity = 255
    self.caption = "LOCATION"
    refresh
  end
  
  def refresh
    self.contents.clear    
    self.contents.draw_text(0, 0, self.contents.width, WLH,  @map_name, 1)
  end
  
  def find_window_width(text)              
    return Bitmap.new(544, 416).text_size(text).width + 48
  end
  
end

class Window_Command < Window_Selectable
  
  alias :eds_pre_ff9_menu_win_command_init :initialize
  def initialize(*args)
    @font_name = Font.default_name    
    eds_pre_ff9_menu_win_command_init(*args)    
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear    
    self.contents.font.name = @font_name
    for i in 0...@item_max
      draw_item(i)
    end
  end
  
  def font_name=(name)
    @font_name = name    
  end
  
end

class Window_Uses < Window_Base  
  
  def initialize(right, y, item)    
    @remaining_text = "Remaining: #{$game_party.item_number(item)}"
    w = 160
    x = right ? (544 - w) : 0    
    super(x, y, w, WLH + 32)    
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    refresh
  end
  
  def item=(item)    
    return unless item.is_a?(RPG::Item)
    @remaining_text = "Remaining: #{$game_party.item_number(item)}"      
    refresh
  end
  
  def visible=(value)
    super
    refresh if value
  end
  
  def refresh
    self.contents.clear
    self.contents.draw_text(self.contents.rect, @remaining_text, 1)
  end
  
end

class Window_SkillUses < Window_Base  
  
  def initialize(right, y, actor, skill)    
    @remaining_text = make_info_string(actor, skill)
    w = 182
    x = right ? (544 - w) : 0        
    super(x, y, w, WLH + 32)  
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    refresh
  end
  
  def make_info_string(actor, skill)
    return "Remaining: 0" if actor.nil? || skill.nil?
    return "Remaining: #{(actor.mp / actor.calc_mp_cost(skill)).to_i}"
  end
  
  def set_skill(actor, skill)
    return if actor.nil?
    return unless skill.is_a?(RPG::Skill)
    @remaining_text = make_info_string(actor, skill)    
    refresh
  end
  
  def visible=(value)
    super
    refresh if value
  end
  
  def refresh
    self.contents.clear
    self.contents.draw_text(self.contents.rect, @remaining_text, 1)
  end
  
end

class Window_MenuStatus < Window_Selectable
    
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def initialize(x, y)
    super(x, y, 452, 352)      
    @bg_image = Cache.picture('FF9_MenuBar')  
    @arrow_image = Cache.picture('Pointer')
    @arrow_sprite = Sprite.new
    @arrow_sprite.bitmap = Bitmap.new(45, 38)  #7 pixels larger in 'w' for animation      
    @arrow_sprite.y = 52  
    @arrow_sprite.z = 999    
    @sprite_last_draw_x = 0
    @sprite_inc_x = 1
    @intern_frame_count = 0    
    self.stretch = false if FF9_Config::USE_TILED_WINDOW
    self.contents.font.name = FF9_Config::DEFAULT_FONT
    self.opacity = 0    
    self.z = 99    
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
#~   def refresh    
#~     self.contents.clear
#~     @item_max = $game_party.members.size
#~     draw_background_windows
#~     for actor in $game_party.members      
#~       x = 104
#~       y = actor.index * 80      
#~       y_offset = 6      
#~       draw_actor_face(actor, 19, y + 4, 73)      
#~       draw_actor_name(actor, x, y + y_offset)            
#~       draw_actor_class(actor, x + 125, y + y_offset) if actor.states.empty?
#~       draw_actor_level(actor, x, y + WLH * 1)      
#~       draw_actor_state(actor, x + 125, y + y_offset)
#~       draw_actor_hp(actor, x, ((y) + (WLH * 2) - 5))
#~       draw_actor_mp(actor, x + 125, ((y) + (WLH * 2) - 5))    
#~     end
#~   end  
  def refresh    
    self.contents.clear
    @item_max = $game_party.members.size    
    for actor in $game_party.members      
      x = 104
      y = actor.index * 80      
      y_offset = 6      
      draw_background_window(0, y)
      draw_actor_face(actor, 19, y + 4, 73)      
      draw_actor_name(actor, x, y + y_offset)            
      draw_actor_class(actor, x + 125, y + y_offset) if actor.states.empty?
      draw_actor_level(actor, x, y + WLH * 1)      
      draw_actor_state(actor, x + 125, y + y_offset)
      draw_actor_hp(actor, x, ((y) + (WLH * 2) - 5))
      draw_actor_mp(actor, x + 125, ((y) + (WLH * 2) - 5))    
    end
  end  
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def update_cursor              
    if @index < 0              
      @arrow_sprite.bitmap.clear
      return
    end
    @intern_frame_count += 1
    return if (@intern_frame_count % 5) != 0
    if @sprite_last_draw_x == 7
      @sprite_inc_x = -1
    elsif @sprite_last_draw_x == 0
      @sprite_inc_x = 1
    end
    @arrow_sprite.bitmap.clear
    @arrow_sprite.y = (@index * 80) + self.y + 40  #40 is on half the image height
    @arrow_sprite.x = self.x
    x = @sprite_last_draw_x + @sprite_inc_x    
    @sprite_last_draw_x = x
    @arrow_sprite.bitmap.blt(x, 0, @arrow_image, @arrow_image.rect)    
  end
  #--------------------------------------------------------------------------
  # * draw_background_windows
  #--------------------------------------------------------------------------
#~   def draw_background_windows  
#~     self.contents.blt(0, 0, @bg_image, @bg_image.rect)    
#~     self.contents.blt(0, 80, @bg_image, @bg_image.rect)    
#~     self.contents.blt(0, 160, @bg_image, @bg_image.rect)    
#~     self.contents.blt(0, 240, @bg_image, @bg_image.rect)    
#~   end  
  def draw_background_window(x, y)  
    self.contents.blt(x, y, @bg_image, @bg_image.rect)        
  end  
  #--------------------------------------------------------------------------
  # * visible
  #--------------------------------------------------------------------------
  def visible=(value)
    super
    @arrow_sprite.visible = value    
  end
  #--------------------------------------------------------------------------
  # * dispose
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_win_stat_dispose :dispose
  def dispose
    eds_pre_ff9_win_stat_dispose
    @arrow_sprite.dispose
  end
  
end

class Scene_Menu
      
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------    
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    # just changed the width of the window here
    @command_window = Window_Command.new(132, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.stretch = false if FF9_Config::USE_TILED_WINDOW
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end      
    # new stuff here
    @command_window.font_name = FF9_Config::DEFAULT_FONT
    @command_window.x = 528 - @command_window.width
    @command_window.y = 16
    @command_window.back_opacity = 255
  end
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background
    create_command_window
    @gold_window = Window_TimeGold.new(372, 342)
    @gold_window.y -= @gold_window.height
    @gold_window.x = 528 - @gold_window.width
    @status_window = Window_MenuStatus.new(0, 12)
    @location_window = Window_MenuLocation.new(0, 0)
    @location_window.x = 528 - @location_window.width  
    @location_window.y = 398 - @location_window.height
  end
  
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_menu_terminate :terminate
  def terminate
    eds_pre_ff9_menu_scene_menu_terminate
    @location_window.dispose
  end
  
end

class Scene_Item < Scene_Base
  
  #--------------------------------------------------------------------------
  # * start
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_start :start
  def start        
    eds_pre_ff9_menu_scene_item_start
    @target_window.y = 58    
    @uses_window = Window_Uses.new(true, @help_window.height, nil)
    @uses_window.visible = false
  end  
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #   - right-align flag ignored
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_win_stat_show_target_window :show_target_window
  def show_target_window(right)  
    @uses_window.item = @item_window.item
    @uses_window.visible = true    
    @item_window.visible = false    
    @item_window.active = false    
    @target_window.visible = true
    @target_window.active = true  
    @viewport.rect.set(0, 0, 544, 416)
    @viewport.ox = 0
  end
  #--------------------------------------------------------------------------
  # * hide_target_window
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_hide_target_window :hide_target_window
  def hide_target_window
    eds_pre_ff9_menu_scene_item_hide_target_window  
    @uses_window.visible = false unless @uses_window.nil?
    @item_window.visible = true        
  end
  #--------------------------------------------------------------------------
  # * determine_target
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_determine_target :determine_target
  def determine_target    
    eds_pre_ff9_menu_scene_item_determine_target
    @uses_window.item = @item_window.item
  end    
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_terminate :terminate
  def terminate
    eds_pre_ff9_menu_scene_item_terminate
    @uses_window.dispose
  end
  
end

class Scene_Skill < Scene_Base
  
  #--------------------------------------------------------------------------
  # * start
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_skill_start :start
  def start        
    eds_pre_ff9_menu_scene_skill_start
    @target_window.y = 58          
    @uses_window = Window_SkillUses.new(true, @help_window.height, nil, nil)
    @uses_window.visible = false
  end  
  #--------------------------------------------------------------------------
  # * OVERWRITTEN
  #   - right-align flag ignored
  #--------------------------------------------------------------------------
  def show_target_window(right)
    @uses_window.set_skill($game_party.members[@actor_index], @skill_window.skill)
    @uses_window.visible = true
    @status_window.visible = false
    @skill_window.visible = false
    @skill_window.active = false    
    @target_window.visible = true
    @target_window.active = true  
    @viewport.rect.set(0, 0, 544, 416)
    @viewport.ox = 0
  end
  #--------------------------------------------------------------------------
  # * hide_target_window
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_skill_hide_target_window :hide_target_window
  def hide_target_window
    eds_pre_ff9_menu_scene_skill_hide_target_window  
    @uses_window.visible = false unless @uses_window.nil?
    @skill_window.visible = true
    @status_window.visible = true
  end
  #--------------------------------------------------------------------------
  # * determine_target
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_skill_determine_target :determine_target
  def determine_target    
    eds_pre_ff9_menu_scene_skill_determine_target
    @uses_window.set_skill($game_party.members[@actor_index], @skill_window.skill)
  end    
  #--------------------------------------------------------------------------
  # * Termination Processing
  #--------------------------------------------------------------------------
  alias :eds_pre_ff9_menu_scene_item_terminate :terminate
  def terminate
    eds_pre_ff9_menu_scene_item_terminate
    @uses_window.dispose
  end
  
end
Lockheart
Awesome, thanks BigEd. as for the patching, just more reason to learn the scripting code, aye?
BigEd781
OK, another UPDATE

➮ Added a new cursor display when all party members are selected.
➮ Added new config option which allows you to use a cursor which does not animate.
➮ added new config option which allows you choose how many background panels are drawn when the party is not full.

@Lockheart: I added that last one out of pity for you wink.gif
N2Y
QUOTE (BigEd781 @ Jan 3 2009, 09:54 PM) *
OK, another UPDATE

➮ Added a new cursor display when all party members are selected.
➮ Added new config option which allows you to use a cursor which does not animate.
➮ added new config option which allows you choose how many background panels are drawn when the party is not full.

@Lockheart: I added that last one out of pity for you wink.gif

That one doesnt seem to work for me ( I take it you updated the first post with this update?) )

When I select Heal in the Magic menu and go from the 3rd to the 4th player or from the 1st back to the fourth (basically, once you want to go to the fourth player) the game crashes and takes you to the following part:

CODE
  #--------------------------------------------------------------------------
  # * draw_arrow_sprites
  #--------------------------------------------------------------------------
  def draw_arrow_sprites(sprites, animated=true)
    for sprite in sprites          
      image_x = animated ? @sprite_last_draw_x + @sprite_inc_x : 0
      @sprite_last_draw_x = image_x      
      sprite.bitmap.blt(image_x, 0, @arrow_image, @arrow_image.rect)
    end
  end

With the following line in particular:
CODE
sprite.bitmap.blt(image_x, 0, @arrow_image, @arrow_image.rect)


Any idea what it could be?

Lockheart's update script does work though.
BigEd781
QUOTE (N2Y @ Jan 4 2009, 05:37 AM) *
Any idea what it could be?

Lockheart's update script does work though.


Ahh, shit, I forgot to fix that. I'll post an update tomorrow.
N2Y
QUOTE (BigEd781 @ Jan 4 2009, 05:40 AM) *
QUOTE (N2Y @ Jan 4 2009, 05:37 AM) *
Any idea what it could be?

Lockheart's update script does work though.


Ahh, shit, I forgot to fix that. I'll post an update tomorrow.

No worries, mate. It's fixable. cool.gif

Man I love this menu. Love the new command window names on top of the windows. Maybe could you add one above the commands named "Commands" or something.
wortana
[Show/Hide] Open me if you dare


You are a hero w00t


Apart from the MOG menu which I cant seem to use right now I say this is an awsome script 10/10 keep up the great work biggrin.gif
BigEd781
UPDATE
➮ Fixed a bug introduced by my last update when you selected the fourth character in the party. (thanks N2Y).

N2Y: If you would like to add a caption to the command window, find this part of the script under "Scene_Menu":

CODE
def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    # just changed the width of the window here
    @command_window = Window_Command.new(132, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.stretch = false if FF9_Config::USE_TILED_WINDOW
    if $game_party.members.size == 0          # If number of party members is 0
      @command_window.draw_item(0, false)     # Disable item
      @command_window.draw_item(1, false)     # Disable skill
      @command_window.draw_item(2, false)     # Disable equipment
      @command_window.draw_item(3, false)     # Disable status
    end
    if $game_system.save_disabled             # If save is forbidden
      @command_window.draw_item(4, false)     # Disable save
    end      
    # new stuff here
    @command_window.caption = "COMMANDS"   #ADDED THIS LINE FOR n2y
    @command_window.font_name = FF9_Config::DEFAULT_FONT
    @command_window.x = 528 - @command_window.width
    @command_window.y = 16
    @command_window.back_opacity = 255
  end


I put a comment next to the only line that I added.
Lockheart
QUOTE (BigEd781 @ Jan 3 2009, 11:54 PM) *
OK, another UPDATE

➮ Added a new cursor display when all party members are selected.
➮ Added new config option which allows you to use a cursor which does not animate.
➮ added new config option which allows you choose how many background panels are drawn when the party is not full.

@Lockheart: I added that last one out of pity for you wink.gif


Totally awesome, thank you very much for that.
Stoltz
There is a Clash between this script and the crafting script to. here is the link to the crafting script http://www.rpgrevolution.com/forums/index....9&hl=actors
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.