FFVII Style Menu

FFVII MEnu - Version: 1.0
By: FF12_master

Introduction
This is just a small edit to the Standard Menu To make the layout look like the menu in
FFVII

Screenshots

Image
Script

FFVII Menu Script Spoiler
  1. #==============================================================================
  2. # ** FFVII Style Menu
  3. #------------------------------------------------------------------------------
  4. #   Author: FF12_Master
  5. #   Version 1.1
  6. #   11/5/2009
  7. #      - V 1.0-
  8. #             First Release
  9. #      - V 1.1 -
  10. #             Added a Playtime and Gold Menu Combined Script
  11. #             Added a location Window
  12. #==============================================================================
  13.  
  14. class Scene_Menu
  15.   #--------------------------------------------------------------------------
  16.   # * Object Initialization
  17.   #       menu_index : command cursor's initial position
  18.   #--------------------------------------------------------------------------
  19.   def initialize(menu_index = 0)
  20.      @menu_index = menu_index
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # * Main Processing
  24.   #--------------------------------------------------------------------------
  25.   def main
  26.      # Make command window
  27.      s1 = $data_system.words.item
  28.      s2 = $data_system.words.skill
  29.      s3 = $data_system.words.equip
  30.      s4 = "Status"
  31.      s5 = "Save"
  32.      s6 = "End Game"
  33.      @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
  34.      @command_window.index = @menu_index
  35.      @command_window.x = 482
  36.      @command_window.y = 0
  37.      @command_window.z = 203
  38.      @command_window.height = 250
  39.      @command_window.width = 160
  40.      # If number of party members is 0
  41.      if $game_party.actors.size == 0
  42.         # Disable items, skills, equipment, and status
  43.         @command_window.disable_item(0)
  44.         @command_window.disable_item(1)
  45.         @command_window.disable_item(2)
  46.         @command_window.disable_item(3)
  47.      end
  48.      # If save is forbidden
  49.      if $game_system.save_disabled
  50.         # Disable save
  51.         @command_window.disable_item(4)
  52.      end
  53.      # Make play time window
  54.      @playtime_window = Window_GoldTime.new
  55.      @playtime_window.x = 483
  56.      @playtime_window.y = 310
  57.      @playtime_window.z = 201
  58.      # Make location window
  59.      @location_window = Window_location.new
  60.      @location_window.x = 445
  61.      @location_window.y = 423
  62.      @location_window.z = 202
  63.      # Make status window
  64.      @status_window = Window_MenuStatus.new
  65.      @status_window.x = 2
  66.      @status_window.y = 2
  67.      @status_window.height = 480
  68.      @status_window.width = 510
  69.      # Execute transition
  70.      Graphics.transition
  71.      # Main loop
  72.      loop do
  73.         # Update game screen
  74.         Graphics.update
  75.         # Update input information
  76.         Input.update
  77.         # Frame update
  78.         update
  79.         # Abort loop if screen is changed
  80.         if $scene != self
  81.            break
  82.         end
  83.      end
  84.      # Prepare for transition
  85.      Graphics.freeze
  86.      # Dispose of windows
  87.      @command_window.dispose
  88.      @playtime_window.dispose
  89.      @status_window.dispose
  90.      @location_window.dispose
  91.   end
  92.   #--------------------------------------------------------------------------
  93.   # * Frame Update
  94.   #--------------------------------------------------------------------------
  95.   def update
  96.      # Update windows
  97.      @command_window.update
  98.      @playtime_window.update
  99.      @status_window.update
  100.      # If command window is active: call update_command
  101.      if @command_window.active
  102.         update_command
  103.         return
  104.      end
  105.      # If status window is active: call update_status
  106.      if @status_window.active
  107.         update_status
  108.         return
  109.      end
  110.   end
  111.   #--------------------------------------------------------------------------
  112.   # * Frame Update (when command window is active)
  113.   #--------------------------------------------------------------------------
  114.   def update_command
  115.      # If B button was pressed
  116.      if Input.trigger?(Input::B)
  117.         # Play cancel SE
  118.         $game_system.se_play($data_system.cancel_se)
  119.         # Switch to map screen
  120.         $scene = Scene_Map.new
  121.         return
  122.      end
  123.      # If C button was pressed
  124.      if Input.trigger?(Input::C)
  125.         # If command other than save or end game, and party members = 0
  126.         if $game_party.actors.size == 0 and @command_window.index < 4
  127.            # Play buzzer SE
  128.            $game_system.se_play($data_system.buzzer_se)
  129.            return
  130.         end
  131.         # Branch by command window cursor position
  132.         case @command_window.index
  133.         when 0   # item
  134.            # Play decision SE
  135.            $game_system.se_play($data_system.decision_se)
  136.            # Switch to item screen
  137.            $scene = Scene_Item.new
  138.         when 1   # skill
  139.            # Play decision SE
  140.            $game_system.se_play($data_system.decision_se)
  141.            # Make status window active
  142.            @command_window.active = false
  143.            @status_window.active = true
  144.            @status_window.index = 0
  145.         when 2   # equipment
  146.            # Play decision SE
  147.            $game_system.se_play($data_system.decision_se)
  148.            # Make status window active
  149.            @command_window.active = false
  150.            @status_window.active = true
  151.            @status_window.index = 0
  152.         when 3   # status
  153.            # Play decision SE
  154.            $game_system.se_play($data_system.decision_se)
  155.            # Make status window active
  156.            @command_window.active = false
  157.            @status_window.active = true
  158.            @status_window.index = 0
  159.         when 4   # save
  160.            # If saving is forbidden
  161.            if $game_system.save_disabled
  162.               # Play buzzer SE
  163.               $game_system.se_play($data_system.buzzer_se)
  164.               return
  165.            end
  166.            # Play decision SE
  167.            $game_system.se_play($data_system.decision_se)
  168.            # Switch to save screen
  169.            $scene = Scene_Save.new
  170.         when 5   # end game
  171.            # Play decision SE
  172.            $game_system.se_play($data_system.decision_se)
  173.            # Switch to end game screen
  174.            $scene = Scene_End.new
  175.         end
  176.         return
  177.      end
  178.   end
  179.   #--------------------------------------------------------------------------
  180.   # * Frame Update (when status window is active)
  181.   #--------------------------------------------------------------------------
  182.   def update_status
  183.      # If B button was pressed
  184.      if Input.trigger?(Input::B)
  185.         # Play cancel SE
  186.         $game_system.se_play($data_system.cancel_se)
  187.         # Make command window active
  188.         @command_window.active = true
  189.         @status_window.active = false
  190.         @status_window.index = -1
  191.         return
  192.      end
  193.      # If C button was pressed
  194.      if Input.trigger?(Input::C)
  195.         # Branch by command window cursor position
  196.         case @command_window.index
  197.         when 1   # skill
  198.            # If this actor's action limit is 2 or more
  199.            if $game_party.actors[@status_window.index].restriction >= 2
  200.               # Play buzzer SE
  201.               $game_system.se_play($data_system.buzzer_se)
  202.               return
  203.            end
  204.            # Play decision SE
  205.            $game_system.se_play($data_system.decision_se)
  206.            # Switch to skill screen
  207.            $scene = Scene_Skill.new(@status_window.index)
  208.         when 2   # equipment
  209.            # Play decision SE
  210.            $game_system.se_play($data_system.decision_se)
  211.            # Switch to equipment screen
  212.            $scene = Scene_Equip.new(@status_window.index)
  213.         when 3   # status
  214.            # Play decision SE
  215.            $game_system.se_play($data_system.decision_se)
  216.            # Switch to status screen
  217.            $scene = Scene_Status.new(@status_window.index)
  218.         end
  219.         return
  220.      end
  221.   end
  222. end
  223. #=============================================================================
  224. # * Window_location
  225. #-----------------------------------------------------------------------------
  226. # handles the location window in the menu
  227. #=============================================================================
  228. class Window_location < Window_Base
  229.   #--------------------------------------------------------------------------
  230.   # * Object Initialization
  231.   #--------------------------------------------------------------------------
  232.      def initialize
  233.      super(0, 0, 320,60)
  234.      self.contents = Bitmap.new(width - 32, height - 32)
  235.      self.contents.font.name = "Tahoma"
  236.      self.contents.font.size = 22
  237.      self.contents.font.color = text_color(0)
  238.      self.contents.draw_text(0, 0, 60, 30, $game_map.name.to_s)
  239.   end
  240. end
  241.  
  242. #==============================================================================
  243. # ** FFVII Style - Window_PlayTime and Window_Gold Combined
  244. #------------------------------------------------------------------------------
  245. # Author: FF12_Master
  246. # Version: 0.1
  247. # 11/ 5/ 2009
  248. #==============================================================================
  249.  
  250. class Window_GoldTime < Window_Base
  251.   #--------------------------------------------------------------------------
  252.   # * Object Initialization
  253.   #--------------------------------------------------------------------------
  254.   def initialize
  255.      super(0, 0, 160,120)
  256.      self.contents = Bitmap.new(width - 32, height - 32)
  257.      refresh
  258.   end
  259.   #--------------------------------------------------------------------------
  260.   # * Refresh
  261.   #--------------------------------------------------------------------------
  262.   def refresh
  263.      self.contents.clear
  264.      self.contents.font.color = system_color
  265.      self.contents.draw_text(4, -4, 120, 32, "Play Time")
  266.      @total_sec = Graphics.frame_count / Graphics.frame_rate
  267.      hour = @total_sec / 60 / 60
  268.      min = @total_sec / 60 % 60
  269.      sec = @total_sec % 60
  270.      text = sprintf("%02d:%02d:%02d", hour, min, sec)
  271.      self.contents.font.color = normal_color
  272.      self.contents.draw_text(4, 28, 120, 32, text, 2)
  273.     
  274.      cx = contents.text_size($data_system.words.gold).width
  275.      self.contents.font.color = normal_color
  276.        self.contents.draw_text(4, 65, 120-cx-2, 32, $game_party.gold.to_s, 2)
  277.      self.contents.font.color = system_color
  278.      self.contents.draw_text(124-cx, 65, cx, 32, $data_system.words.gold, 2)
  279.   end
  280.   #--------------------------------------------------------------------------
  281.   # * Frame Update
  282.   #--------------------------------------------------------------------------
  283.   def update
  284.      super
  285.      if Graphics.frame_count / Graphics.frame_rate != @total_sec
  286.         refresh
  287.      end
  288.   end
  289. end
  290.  
  291.  
  292.  
Expand to see the code.


Instructions

Add Above Main and Below Scene_Debug


Compatibility

None Known Issues

Terms and Conditions

You can use this freely. Just a little credit would be nice =]
So I decided I'd test it as I'm a big fan of FFVII and thought I'd check it out (I've seen a few other menu systems that replicate this before, which all seemed nice). I have to say I was slightly disapointed, there was a error smack bang as soon as I put it in the game. I'm not a novice with scripts so I managed to locate it and fix it sort of, but I'll show you the error message and line of code.

This is the dialogue box that appears when first importing the script, then opening the menu.
Image

Which then lead to this line of code;
Image
The error was the last part of that snippet of code, which tries to access the map name. To test the menu I simply changed it to this
  1.       self.contents.draw_text(0, 0, 60, 30, "Blah")
Expand to see the code.
and that seemed to do the trick.

However even after fixing this slight error there are numerous issues with window placment, being one or two pixels too high or to low cutting off the border of the windowskin which could be fixed fairly easy. I guess with a little bit more work this could be improved but makes me wonder why you'd try and replicate a system that has already been produced numerous times.

A final comment, your screenshot doens't produce that image in game infact the gradient bars or faces don't appear. Now I understand this would cause an issue with missing graphics but you could have atleast kept the option to have them without further editing the script. Incase people are wondering the script looks like this ingame after you fix that silly map name bug;
Image
Hum.. ok thanks descreation.

Ill make a demo with the graphics in.. and this code..

Thank you for your feed back. =]
This looks pretty neat as a DMS edit, the positioning of everything is a good start. There's still alot more that can be done to make it look like the authentic FFVII menu which shouldn't be all too hard.

For one, you need to edit the playtime menu and make it smaller, and line the labels and values together...

Content Hidden Spoiler
Image


The actual Window_MenuStatus needs sprucing up still, heres a good reference to the actual menu I googled. If you need help with any of that stuff, such as drawing the faces and the bars you can PM me and I'll help you out with it (or you can use some methods from the MACL to assist ya). I've already got my own methods for drawing those bars from that menu, with the border and the gradient fill bar if you need, only thing that I haven't tried yet is drawing the blinking rainbow bar (ie when your Limit Break is filled). Obviously then you'd have to design a Limit Break system though, obviously.

BTW the menu itself is actually compacted in the game, ie it doesn't fill up the whole screen it leaves some space. Obviously, RMXP allows 4 members and not 3 so this is understandable why the MenuStatus window is bigger than the actual game. Also, if I recall correctly, when you open up the menu (from the actual game), all the windows and stuff move in, if you haven't implemented that I can help you if you need. I have a script for Window movement, and the MACL has a Movable module as well you could implement (for windows, sprites, etc).

Sheesh, just talking about this makes me want to start a FFVII Starter Kit lol. Just kidding, I won't steal your thunder (yet if you're interested we could work on one together if you're ever bored I'd love to help ya lol)

Happy scripting man, hope to see you work on this some more :thumb:

PS I have a Finger cursor script, if you ever start your own starter kit for FFVII you're free to use it.
I have all ready Started My FFVII SDK.. and If you still want i would love for you to help me out and work on it together.
I'll start to organize all my FFVII-esque scripts into a project early next week if I have time, until then here's two scripts I've already submitted that you can use in your FFVII SDK...

Arrow Over Head
Window Cursor Sprite

I've got other things like a Steal/Mug system (WIP, different from what I've submitted here), then you've got Atoa's remix of the Materia system you might want to contact Atoa and/or SephirothSpawn for that which is a must for a FFVII SDK. Other misc things I have in my test bed, such as a Counter Attack system, and other things that might be of use.

Other than that, either we'll need to open a topic in Project Development or you can contact me via PM for whatever else you need help with, it sounds like it'll be alot of fun to develop. Please let me know if you setup a development topic so I can join you.
Ok, I have allready got Atoa's Materia System... that was the first thing i got.

I think it will be a good idea to open a devlopment topic, so ill go ahead and do that now.

Thanks for those two scripts, that will deffinetly add more funtion to the SDK.
Woohoo, I've already got a couple things I want to work on for this project! I tried googling (and browsing other sites) to get good screenshots of different menus for FFVII just so I could start a layout for one but instead I broke down and bought the game lol. (I guess nobody likes to post screenshots of menus, bah!)

http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... 0411358439

Post (or PM me) a link to your FFVII SDK topic so we can start working on this. If there is anything in particular you want to do, and anything you want me to do let me know (via PM). I already know what I want to work on first, I'm gonna edit/re-write the Opening Credits script so that its easier to add new credits to it. Also, I like my Splash Screen system better than the one you're using, no offense, so I'll probably replace it if you don't mind XD

Happy scripting, see ya in the Dev topic :thumb:
This is a little random, but could you tell me where you got the facesets in the opening screenie, Regashi?

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=64502