Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

LMS Menu

LMS Menu Request

Hey. For those of you who don't know, for some time I have been working on a zombie game called Last Man's Stand. But something I've always needed is a custom menu. The one I'm using at the moment ( a custom edit of the default one) is ok... but it's still the default menu, really. I've tried to make it a lot more interesting, but it didn't really work. So I'd be really greatful if someone could help me out and script it.

I know that I could probably event it, but as everything else in the game (such as the HUD) is evented, I'm already pretty high on the picture count, and more conditional branches will make the game impossibly laggy. So that's why I need it scripted.

Design

Ok, this is the main design of the menu:

LMSMenu.png


As you can see, this is a quick mock up in paint, so I'm going to explain it.

The blue is where the map behind is shown.

The grey is the windowskin.

The black and white boxes are where the selection cursor is.

In the top left hand corner there are the player's stats. The face is just an image in the pictures folder. The red bar is the health bar, and the blue one is the infection metre. The health is obviously displayed according to the characters health, but the infection metre is a custom system, so that should be made to just read a variable. Both are out of 50.
To the right of that is a box that shows two other things. 'Location' is obviously the name of the map the player is on. Underneath there is 'Zombies Killed'. This is another variable. The number that variable is set to is displayed to the right.
In the bottom left corner, there is the selection window. Selecting 'Missions' takes you to another, premade scene. Don't worry about that. 'Save' obviously takes you to the default save menu, and the same with Exit, taking you to the end window.
Selecting 'Inventory' is where the menu gets a little more complicated. When you select Inventory, the large middle window becomes active, and the selection window is deactivated. In this middle window is all the items and weapons you have in your inventory. Each are represented by a picture in the Pictures folder that is the same name as the item or weapon. The name, and the description of the item is shown in a long window below the item menu, that is not shown in the mock up (I forgot to put that on). When you press Enter on that item or weapon, you either use the item if it is an item, or equip it if it is a weapon. Pressing escape takes you back to the selection window.


Ok, that is everything. I really hope someone can make this for me. The person who does will get credited ingame. Thanks in Advance.
 
Hmm. Nice and long, detailed, and very descriptive. I like it. If you're willing to wait and answer questions as they come up, I can take this request. Overall, it looks to be a fairly easy thing to do.

I think I'll start with the top left window. What size is the actor graphic? Did you want the HP bars curved on the corners like that? If you wanted them to be rectangles, I could easily make them without pictures, but with them curved like that, it makes them a bit more difficult to make without pictures. Either way, did you want them to be gradients, or a solid monochrome color? And, what should be the color that displays behind them when they are less than their maximum? Did you want the map behind the menu to display in full color, or be transferred to a monochrome gray? Finally, is that mockup a pixel by pixel replica of the sizes and locations of the windows you wanted, or just a quick mockup?

As I work further, I'll need answers to more questions, but these will suffice for the starting point.
 
Ok, great, thanks for taking it up. I don't mind about waiting, take your time. Ok, the questions:

1. The face is 85x85 pixels.
2,3,4. The bars must be as similar as possible to my HUD (sorry for not mentioning this). Here's a screen of it:

IntroScreen8.png


Obviously, it's the bit in the bottom right hand corner. So, yeah, they're square, and with a slight gradient. The colour displayed behind can either be the windowskin, or, if it's easier, a lightish grey, again like the HUD.
5. I don't mind what happens to the map behind, as long as you can see it. I suppose monochrome might be quite cool.
6. It's just a quick Mockup. That's relatively where I want everything, but not pixel perfect.

Again, thanks for taking this up.
 
Do you happen to have the images used for the bars in your HUD? I ask because this gradient is too difficult for me to want to script it. (I hate having angles change) Also, did you want health and infection labelled, or left alone? Next, did you want any kind of transition when going to the menu? I have a rather cool one at this point, but if you didn't want it, I can remove it. Did you want the bars to empty from the left or the right? It is easier to make the bars empty from right to left, but the other direction could be done as well.

Here's a test of what I had before you posted:

cmstest1.png


Once again, please ignore the "Health" and "Intfection" text. I put that there because the bars didn't take up enough space in relation to the picture, and will remove it if you don't want it.
 
Wow, that looks good. I will upload the images of the bars in a sec. Can you leave the labels off please, because I think it just sort of clutters it. A transition would also be pretty cool, i'd love to see that working. Can't wait for the final thing. Like I say, I'll have the bars up in a sec.

EDIT: Here they are:

HPBAR.png


INBAR.png
 
fox5":ex4jtgpl said:
Wow, that looks good. I will upload the images of the bars in a sec. Can you leave the labels off please, because I think it just sort of clutters it. A transition would also be pretty cool, i'd love to see that working. Can't wait for the final thing. Like I say, I'll have the bars up in a sec.

EDIT: Here they are:

HPBAR.png


INBAR.png

Is the bar behind them a part of the background image? Or would you be able to upload that as well? Also, I should be able to make the bars cast a shadow, as well.

Edit: Never mind. I figured out what you did. Anyway, I just grayscaled one of the bars to put behind them.

Edit2: Well, here's the next demo test. I've currently got the Infection bar set to game variable 1, and zombie kills to game variable 2, but they are pretty easy to change. Anyway, all I have left is to make the item window, as well as its information window. Oh, and can you post the mission scene? I was hoping to add the transition to it, so that it would work with the menu. Here's the current screenshot:

cmstest2pmng.png


Edit (Again): Actually, I want to see what you think of the current version, before I continue. As I said, the Infection bar is determined by Game Variable 1, and the Zombie Kills are determined by game variable 2. (To change them, just search the script for $game_variables, and you'll find the two lines you need to edit) Also, the Inventory and Mission options currently cause a fatal error in the game, because they aren't set to anything. You'll need to edit line 29 to the name of the face graphic that you are using, as well as add the two images below to your project's Pictures folder.

BGBAR.png

SHADOW.png


Code:
#==============================================================================

# ** Window_MenuStatus

#------------------------------------------------------------------------------

#  This window displays an image of the player, their health, and their

#  Infection level on screen.

#==============================================================================

 

class Window_MenuStatus < Window_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 260, 117)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    # Generate Static Colors

    color_red = Color.new(255, 0, 0, 255)

    color_orange = Color.new(255, 128, 0, 255)

    color_blue = Color.new(0, 0, 255, 255)

    color_lightblue = Color.new(0, 128, 255, 255)

    color_black = Color.new(0, 0, 0, 255)

    # Create bitmaps

    actor_bitmap = RPG::Cache.picture('Actor1')

    hp_bitmap = RPG::Cache.picture('HPBAR')

    infection_bitmap = RPG::Cache.picture('INBAR')

    background_bitmap = RPG::Cache.picture('BGBAR')

    shadow_bitmap = RPG::Cache.picture('SHADOW')

    # Display actor image

    self.contents.blt(0, 0, actor_bitmap, Rect.new(0, 0, 85, 85))

    # Display shadow bitmap for HP and Infection gradient bars

    self.contents.blt(112, 27, shadow_bitmap, Rect.new(0, 0, 110, 20))

    self.contents.blt(112, 48, shadow_bitmap, Rect.new(0, 0, 110, 20))

    # Display background for HP and Infection gradient bars

    self.contents.blt(112, 27, background_bitmap, Rect.new(0, 0, 100, 10))

    self.contents.blt(112, 48, background_bitmap, Rect.new(0, 0, 100, 10))

    # Find current HP percentage

    max_hp = $game_actors[1].maxhp.to_f

    hp = $game_actors[1].hp.to_f

    hp_percent = ((hp / max_hp) * 100).to_i

    # Find current Infection percentage

    infection = $game_variables[1].to_f

    infection_percent = ((infection / 50.0) * 100).to_i

    # Generate HP and Infection bar rects

    hp_rect = Rect.new(0, 0, hp_percent, 10)

    infection_rect = Rect.new(0, 0, infection_percent, 10)

    # Display gradient bars for HP and Infection

    self.contents.blt(112, 27, hp_bitmap, hp_rect)

    self.contents.blt(112, 48, infection_bitmap, infection_rect)

  end

end

 

#==============================================================================

# ** Window_MenuInfo

#------------------------------------------------------------------------------

#  This window displays the current map and the number of zombies killed

#  on screen.

#==============================================================================

 

class Window_MenuInfo < Window_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 316, 117)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    # Get map id

    map_id = $game_map.map_id

    # load map name

    map_data = load_data('Data/MapInfos.rxdata')

    map_name = map_data[map_id].name

    self.contents.draw_text(0, 10, 212, 32, map_name)

    self.contents.font.color = system_color

    self.contents.draw_text(0, 43, 212, 32, 'Zombies Killed:')

    self.contents.font.color = normal_color

    kills = $game_variables[2].to_s

    self.contents.draw_text(72, 43, 212, 32, kills, 2)

  end

end

 

#==============================================================================

# ** Scene_Map

#------------------------------------------------------------------------------

#  This class performs map screen processing.

#==============================================================================

 

class Scene_Map

  #--------------------------------------------------------------------------

  # * Alias Methods

  #--------------------------------------------------------------------------

  alias glitch_game_map_call_menu call_menu

  #--------------------------------------------------------------------------

  # * Menu Call

  #--------------------------------------------------------------------------

  def call_menu

    # Change map tone for menu

    tone = Tone.new(0, 0, 0, 255)

    $game_screen.start_tone_change(tone, 20)

    # Set frame count for tone change

    frames = 40

    until frames <= 0

      # Update screen

      $game_screen.update

      # Subtract one frame from count

      frames -= 1

    end

    # Call menu

    glitch_game_map_call_menu

  end

end

 

#==============================================================================

# ** Scene_Menu

#------------------------------------------------------------------------------

#  This class performs menu screen processing.

#==============================================================================

 

class Scene_Menu

  #--------------------------------------------------------------------------

  # * Object Initialization

  #     menu_index : command cursor's initial position

  #--------------------------------------------------------------------------

  def initialize(menu_index = 0)

    @menu_index = menu_index

  end

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    # Display map behind menu

    @spriteset = Spriteset_Map.new

    # Make command window

    s1 = 'Inventory'

    s2 = 'Missions'

    s3 = 'Save'

    s4 = 'Exit'

    @command_window = Window_Command.new(160, [s1, s2, s3, s4])

    @command_window.index = @menu_index

    @command_window.x = 24

    @command_window.y = 157

    # If number of party members is 0

    if $game_party.actors.size == 0

      # Disable items, skills, equipment, and status

      @command_window.disable_item(0)

    end

    # If save is forbidden

    if $game_system.save_disabled

      # Disable save

      @command_window.disable_item(3)

    end

    # Make status window

    @status_window = Window_MenuStatus.new

    @status_window.x = 24

    @status_window.y = 24

    # Make information window

    @info_window = Window_MenuInfo.new

    @info_window.x = 300

    @info_window.y = 24

    # Execute transition

    Graphics.transition(40, 'Graphics/Transitions/010-Random02', 0)

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Change tone to normal for map

    tone2 = Tone.new(0, 0, 0, 0)

    $game_screen.start_tone_change(tone2, 40)

    # Dispose of windows

    @command_window.dispose

    @info_window.dispose

    @status_window.dispose

    # Dispose of map

    @spriteset.dispose

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    # Update Screen

    $game_screen.update

    # Update map

    @spriteset.update

    # Update windows

    @command_window.update

    @info_window.update

    # If command window is active: call update_command

    if @command_window.active

      update_command

      return

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update (when command window is active)

  #--------------------------------------------------------------------------

  def update_command

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Switch to map screen

      $scene = Scene_Map.new

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # If command other than save or end game, and party members = 0

      if $game_party.actors.size == 0 and @command_window.index < 4

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # Branch by command window cursor position

      case @command_window.index

      when 0  # item

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @item_window.active = true

        @item_window.index = 0

      when 1  # skill

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_Mission.new

      when 2  # save

        # If saving is forbidden

        if $game_system.save_disabled

          # Play buzzer SE

          $game_system.se_play($data_system.buzzer_se)

          return

        end

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to save screen

        $scene = Scene_Save.new('menu')

      when 3  # end game

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_End.new

      end

      return

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update (when status window is active)

  #--------------------------------------------------------------------------

  def update_status

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Make command window active

      @command_window.active = true

      @status_window.active = false

      @status_window.index = -1

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # Branch by command window cursor position

      case @command_window.index

      when 1  # skill

        # If this actor's action limit is 2 or more

        if $game_party.actors[@status_window.index].restriction >= 2

          # Play buzzer SE

          $game_system.se_play($data_system.buzzer_se)

          return

        end

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to skill screen

        $scene = Scene_Skill.new(@status_window.index)

      when 2  # equipment

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to equipment screen

        $scene = Scene_Equip.new(@status_window.index)

      when 3  # status

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to status screen

        $scene = Scene_Status.new(@status_window.index)

      end

      return

    end

  end

end

 

#==============================================================================

# ** Scene_Save

#------------------------------------------------------------------------------

#  This class performs save screen processing.

#==============================================================================

 

class Scene_Save < Scene_File

  #--------------------------------------------------------------------------

  # * Alias Methods

  #--------------------------------------------------------------------------

  alias glitch_scene_save_init initialize

  def initialize(scene = nil)

    @scene = scene

    glitch_scene_save_init

  end

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    # Make help window

    @help_window = Window_Help.new

    @help_window.set_text(@help_text)

    # Make save file window

    @savefile_windows = []

    for i in 0..3

      @savefile_windows.push(Window_SaveFile.new(i, make_filename(i)))

    end

    # Select last file to be operated

    @file_index = $game_temp.last_file_index

    @savefile_windows[@file_index].selected = true

    # Execute transition

    if @scene == 'menu'

      Graphics.transition(40, 'Graphics/Transitions/010-Random02', 0)

    else

      Graphics.transition

    end

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of windows

    @help_window.dispose

    for i in @savefile_windows

      i.dispose

    end

  end

  #--------------------------------------------------------------------------

  # * Cancel Processing

  #--------------------------------------------------------------------------

  def on_cancel

    # Play cancel SE

    $game_system.se_play($data_system.cancel_se)

    # If called from event

    if $game_temp.save_calling

      # Clear save call flag

      $game_temp.save_calling = false

      # Switch to map screen

      $scene = Scene_Map.new

      return

    end

    # Change map tone for menu

    tone = Tone.new(0, 0, 0, 255)

    $game_screen.start_tone_change(tone, 20)

    # Set frame count for tone change

    frames = 40

    until frames <= 0

      # Update screen

      $game_screen.update

      # Subtract one frame from count

      frames -= 1

    end

    # Switch to menu screen

    $scene = Scene_Menu.new(2)

  end

end

 

#==============================================================================

# ** Scene_End

#------------------------------------------------------------------------------

#  This class performs game end screen processing.

#==============================================================================

 

class Scene_End

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    # Display map behind menu

    @spriteset = Spriteset_Map.new

    # Make command window

    s1 = 'To Title'

    s2 = 'Shutdown'

    s3 = 'Cancel'

    @command_window = Window_Command.new(192, [s1, s2, s3])

    @command_window.x = 320 - @command_window.width / 2

    @command_window.y = 240 - @command_window.height / 2

    # Execute transition

    Graphics.transition(40, 'Graphics/Transitions/010-Random02', 0)

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame Update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of window

    @command_window.dispose

    # Dispose of map

    @spriteset.dispose

    # If switching to title screen

    if $scene.is_a?(Scene_Title)

      # Fade out screen

      Graphics.transition

      Graphics.freeze

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    # Update map

    @spriteset.update

    # Update command window

    @command_window.update

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Change map tone for menu

      tone = Tone.new(0, 0, 0, 255)

      $game_screen.start_tone_change(tone, 20)

      # Set frame count for tone change

      frames = 40

      until frames <= 0

        # Update screen

        $game_screen.update

        # Subtract one frame from count

        frames -= 1

      end

      # Switch to menu screen

      $scene = Scene_Menu.new(3)

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # Branch by command window cursor position

      case @command_window.index

      when 0  # to title

        command_to_title

      when 1  # shutdown

        command_shutdown

      when 2  # quit

        command_cancel

      end

      return

    end

  end

  #--------------------------------------------------------------------------

  # *  Process When Choosing [Cancel] Command

  #--------------------------------------------------------------------------

  def command_cancel

    # Play decision SE

    $game_system.se_play($data_system.decision_se)

    # Change map tone for menu

    tone = Tone.new(0, 0, 0, 255)

    $game_screen.start_tone_change(tone, 20)

    # Set frame count for tone change

    frames = 40

    until frames <= 0

      # Update screen

      $game_screen.update

      # Subtract one frame from count

      frames -= 1

    end

    # Switch to menu screen

    $scene = Scene_Menu.new(3)

  end

end

 
 
Yeah, great it works perfectly so far! I went into the script and changed the variables to fit, so that also works. However, I have one or two problems, and one or two questions, if you don't mind:

1. As much as I like the greyscaled background, there is a problem. Alot of my game relies on different screen tones to create atmosphere, which differ from map to map, and because the greyscale effect changes the screen tone, when you quit the menu, the tone changes back to the default one (0,0,0,0), and not to the one I need for the map I'm on. As far as I know with scripting, you'd have to set up all the tones for each seperate map, and have the script check what map you were on, before running the specific screen tone. And I'm not up to typing the exact tone of hundreds of different maps. I know I'm rabbiting on now. I'll stop. So if you can't get round that, could you get rid of the greyscale?

2. Ok, this one's a question. Because my HUD is done through events, on opening the menu, it stays exactly where it was. This makes it a tad confusing for the player, and it will also look quite messy when the item window is made, and overlaps it. It wasn't a problem with the last menu, as it covered it completely. So, could you put in the script that when the menu is opened, pictures 1-9 are changed in opacity 0? Then when the menu is exited, the same pictures are changed back to opacity 255? I know it's technically not to do with the menu, but it would make it a bit easier. Doing it through events would mean having to use another conditional branch, and as I said, that would make the game impossibly laggy.

3. Final thing (you'll be pleased to know). Now I've seen it, I don't really like the transitions. The game is really fast paced, and having any type of transition slows getting to the menu. So could you remove that, please?

Since I don't really want transitions any more, I don't suppose you need the mission script to change. If you do, just ask.

I can't wait to see the finished thing!
 
fox5":tolyn3mi said:
Yeah, great it works perfectly so far! I went into the script and changed the variables to fit, so that also works. However, I have one or two problems, and one or two questions, if you don't mind:

1. As much as I like the greyscaled background, there is a problem. Alot of my game relies on different screen tones to create atmosphere, which differ from map to map, and because the greyscale effect changes the screen tone, when you quit the menu, the tone changes back to the default one (0,0,0,0), and not to the one I need for the map I'm on. As far as I know with scripting, you'd have to set up all the tones for each seperate map, and have the script check what map you were on, before running the specific screen tone. And I'm not up to typing the exact tone of hundreds of different maps. I know I'm rabbiting on now. I'll stop. So if you can't get round that, could you get rid of the greyscale?

2. Ok, this one's a question. Because my HUD is done through events, on opening the menu, it stays exactly where it was. This makes it a tad confusing for the player, and it will also look quite messy when the item window is made, and overlaps it. It wasn't a problem with the last menu, as it covered it completely. So, could you put in the script that when the menu is opened, pictures 1-9 are changed in opacity 0? Then when the menu is exited, the same pictures are changed back to opacity 255? I know it's technically not to do with the menu, but it would make it a bit easier. Doing it through events would mean having to use another conditional branch, and as I said, that would make the game impossibly laggy.

3. Final thing (you'll be pleased to know). Now I've seen it, I don't really like the transitions. The game is really fast paced, and having any type of transition slows getting to the menu. So could you remove that, please?

Since I don't really want transitions any more, I don't suppose you need the mission script to change. If you do, just ask.

I can't wait to see the finished thing!

OK, I'll get rid of the transitions, the grayscale, and change pictures 1-9 to 0 opacity when the menu opens, and back when it closes. As to the mission scene, the scripted name is still necessary, as I need to call it from one of my options. (For example, mine is simply Scene_Menu, like the default menu)

I have one more question before I go into the item portion. The best size for the item images is 48x48 pixels, so that you can have room to display rows and columns, and you can still have room for the item description. Is that an acceptable image size for you? Also, as soon as I make the edits you requested, I'll post another copy of the script, for you to test.

All right, I've got the updated version of the menu, for your approval:

Code:
#==============================================================================

# ** Window_MenuStatus

#------------------------------------------------------------------------------

#  This window displays an image of the player, their health, and their

#  Infection level on screen.

#==============================================================================

 

class Window_MenuStatus < Window_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 260, 117)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    # Generate Static Colors

    color_red = Color.new(255, 0, 0, 255)

    color_orange = Color.new(255, 128, 0, 255)

    color_blue = Color.new(0, 0, 255, 255)

    color_lightblue = Color.new(0, 128, 255, 255)

    color_black = Color.new(0, 0, 0, 255)

    # Create bitmaps

    actor_bitmap = RPG::Cache.picture('Actor1')

    hp_bitmap = RPG::Cache.picture('HPBAR')

    infection_bitmap = RPG::Cache.picture('INBAR')

    background_bitmap = RPG::Cache.picture('BGBAR')

    shadow_bitmap = RPG::Cache.picture('SHADOW')

    # Display actor image

    self.contents.blt(0, 0, actor_bitmap, Rect.new(0, 0, 85, 85))

    # Display shadow bitmap for HP and Infection gradient bars

    self.contents.blt(112, 27, shadow_bitmap, Rect.new(0, 0, 110, 20))

    self.contents.blt(112, 48, shadow_bitmap, Rect.new(0, 0, 110, 20))

    # Display background for HP and Infection gradient bars

    self.contents.blt(112, 27, background_bitmap, Rect.new(0, 0, 100, 10))

    self.contents.blt(112, 48, background_bitmap, Rect.new(0, 0, 100, 10))

    # Find current HP percentage

    max_hp = $game_actors[1].maxhp.to_f

    hp = $game_actors[1].hp.to_f

    hp_percent = ((hp / max_hp) * 100).to_i

    # Find current Infection percentage

    infection = $game_variables[1].to_f

    infection_percent = ((infection / 50.0) * 100).to_i

    # Generate HP and Infection bar rects

    hp_rect = Rect.new(0, 0, hp_percent, 10)

    infection_rect = Rect.new(0, 0, infection_percent, 10)

    # Display gradient bars for HP and Infection

    self.contents.blt(112, 27, hp_bitmap, hp_rect)

    self.contents.blt(112, 48, infection_bitmap, infection_rect)

  end

end

 

#==============================================================================

# ** Window_MenuInfo

#------------------------------------------------------------------------------

#  This window displays the current map and the number of zombies killed

#  on screen.

#==============================================================================

 

class Window_MenuInfo < Window_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 316, 117)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    # Get map id

    map_id = $game_map.map_id

    # load map name

    map_data = load_data('Data/MapInfos.rxdata')

    map_name = map_data[map_id].name

    self.contents.draw_text(0, 10, 212, 32, map_name)

    self.contents.font.color = system_color

    self.contents.draw_text(0, 43, 212, 32, 'Zombies Killed:')

    self.contents.font.color = normal_color

    kills = $game_variables[2].to_s

    self.contents.draw_text(72, 43, 212, 32, kills, 2)

  end

end

 

#==============================================================================

# ** Scene_Map

#------------------------------------------------------------------------------

#  This class performs map screen processing.

#==============================================================================

 

class Scene_Map

  #--------------------------------------------------------------------------

  # * Menu Call

  #--------------------------------------------------------------------------

  def call_menu

    # Hide HUD

    pictures = $game_screen.pictures

    original_opacity = []

    for i in 1...10

      picture = pictures[i]

      origin = picture.origin

      x = picture.x

      y = picture.y

      zoom_x = picture.zoom_x

      zoom_y = picture.zoom_y

      original_opacity.push(picture.opacity)

      blend_type = picture.blend_type

      pictures[i].move(1, origin, x, y, zoom_x, zoom_y, 0.0, blend_type)

    end

    $game_screen.update

    # Clear menu call flag

    $game_temp.menu_calling = false

    # If menu beep flag is set

    if $game_temp.menu_beep

      # Play decision SE

      $game_system.se_play($data_system.decision_se)

      # Clear menu beep flag

      $game_temp.menu_beep = false

    end

    # Straighten player position

    $game_player.straighten

    # Switch to menu screen

    $scene = Scene_Menu.new(original_opacity)

  end

end

 

#==============================================================================

# ** Scene_Menu

#------------------------------------------------------------------------------

#  This class performs menu screen processing.

#==============================================================================

 

class Scene_Menu

  #--------------------------------------------------------------------------

  # * Object Initialization

  #     menu_index : command cursor's initial position

  #--------------------------------------------------------------------------

  def initialize(pictures = [0, 0, 0, 0, 0, 0, 0, 0, 0], menu_index = 0)

    @menu_index = menu_index

    @original_opacity = pictures

  end

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    # Display map behind menu

    @spriteset = Spriteset_Map.new

    # Make command window

    s1 = 'Inventory'

    s2 = 'Missions'

    s3 = 'Save'

    s4 = 'Exit'

    @command_window = Window_Command.new(160, [s1, s2, s3, s4])

    @command_window.index = @menu_index

    @command_window.x = 24

    @command_window.y = 157

    # If number of party members is 0

    if $game_party.actors.size == 0

      # Disable items, skills, equipment, and status

      @command_window.disable_item(0)

    end

    # If save is forbidden

    if $game_system.save_disabled

      # Disable save

      @command_window.disable_item(3)

    end

    # Make status window

    @status_window = Window_MenuStatus.new

    @status_window.x = 24

    @status_window.y = 24

    # Make information window

    @info_window = Window_MenuInfo.new

    @info_window.x = 300

    @info_window.y = 24

    # Execute transition

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of windows

    @command_window.dispose

    @info_window.dispose

    @status_window.dispose

    # Dispose of map

    @spriteset.dispose

    # Display HUD

    pictures = $game_screen.pictures

    for i in 1...9

      picture = pictures[i]

      origin = picture.origin

      x = picture.x

      y = picture.y

      zoom_x = picture.zoom_x

      zoom_y = picture.zoom_y

      opacity = @original_opacity[i - 1].to_s.to_f

      blend_type = picture.blend_type

      pictures[i].move(1, origin, x, y, zoom_x, zoom_y, opacity, blend_type)

    end

    $game_screen.update

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    # Update Screen

    $game_screen.update

    # Update map

    @spriteset.update

    # Update windows

    @command_window.update

    @info_window.update

    # If command window is active: call update_command

    if @command_window.active

      update_command

      return

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update (when command window is active)

  #--------------------------------------------------------------------------

  def update_command

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Switch to map screen

      $scene = Scene_Map.new

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # If command other than save or end game, and party members = 0

      if $game_party.actors.size == 0 and @command_window.index < 4

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # Branch by command window cursor position

      case @command_window.index

      when 0  # item

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @item_window.active = true

        @item_window.index = 0

      when 1  # skill

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_Mission.new

      when 2  # save

        # If saving is forbidden

        if $game_system.save_disabled

          # Play buzzer SE

          $game_system.se_play($data_system.buzzer_se)

          return

        end

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to save screen

        $scene = Scene_Save.new

      when 3  # end game

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_End.new

      end

      return

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update (when status window is active)

  #--------------------------------------------------------------------------

  def update_status

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Make command window active

      @command_window.active = true

      @status_window.active = false

      @status_window.index = -1

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # Branch by command window cursor position

      case @command_window.index

      when 1  # skill

        # If this actor's action limit is 2 or more

        if $game_party.actors[@status_window.index].restriction >= 2

          # Play buzzer SE

          $game_system.se_play($data_system.buzzer_se)

          return

        end

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to skill screen

        $scene = Scene_Skill.new(@status_window.index)

      when 2  # equipment

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to equipment screen

        $scene = Scene_Equip.new(@status_window.index)

      when 3  # status

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to status screen

        $scene = Scene_Status.new(@status_window.index)

      end

      return

    end

  end

end

 

#==============================================================================

# ** Scene_Save

#------------------------------------------------------------------------------

#  This class performs save screen processing.

#==============================================================================

 

class Scene_Save < Scene_File

  #--------------------------------------------------------------------------

  # * Cancel Processing

  #--------------------------------------------------------------------------

  def on_cancel

    # Play cancel SE

    $game_system.se_play($data_system.cancel_se)

    # If called from event

    if $game_temp.save_calling

      # Clear save call flag

      $game_temp.save_calling = false

      # Switch to map screen

      $scene = Scene_Map.new

      return

    end

    # Set frame count for tone change

    frames = 40

    until frames <= 0

      # Update screen

      $game_screen.update

      # Subtract one frame from count

      frames -= 1

    end

    # Switch to menu screen

    $scene = Scene_Menu.new(2)

  end

end

 

#==============================================================================

# ** Scene_End

#------------------------------------------------------------------------------

#  This class performs game end screen processing.

#==============================================================================

 

class Scene_End

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    # Display map behind menu

    @spriteset = Spriteset_Map.new

    # Make command window

    s1 = "To Title"

    s2 = "Shutdown"

    s3 = "Cancel"

    @command_window = Window_Command.new(192, [s1, s2, s3])

    @command_window.x = 320 - @command_window.width / 2

    @command_window.y = 240 - @command_window.height / 2

    # Execute transition

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame Update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of window

    @command_window.dispose

    # If switching to title screen

    if $scene.is_a?(Scene_Title)

      # Fade out screen

      Graphics.transition

      Graphics.freeze

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    # Update map

    @spriteset.update

    # Update command window

    @command_window.update

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Set frame count for tone change

      frames = 40

      until frames <= 0

        # Update screen

        $game_screen.update

        # Subtract one frame from count

        frames -= 1

      end

      # Switch to menu screen

      $scene = Scene_Menu.new(3)

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # Branch by command window cursor position

      case @command_window.index

      when 0  # to title

        command_to_title

      when 1  # shutdown

        command_shutdown

      when 2  # quit

        command_cancel

      end

      return

    end

  end

  #--------------------------------------------------------------------------

  # *  Process When Choosing [Cancel] Command

  #--------------------------------------------------------------------------

  def command_cancel

    # Play decision SE

    $game_system.se_play($data_system.decision_se)

    # Set frame count for tone change

    frames = 40

    until frames <= 0

      # Update screen

      $game_screen.update

      # Subtract one frame from count

      frames -= 1

    end

    # Switch to menu screen

    $scene = Scene_Menu.new(3)

  end

end
 
Yep, that's perfect. Thanks. The name for the mission menu is Scene_Missionmenu, but I can chnage that when I get the finished script anyway. As for the size of the item pictures - that's very small. Could you do more around the size 100x100? Because the images aren't icons, they're full size pictures, and trying to squeeze them into that smaller space will loose too much quality.
 
fox5":d14y25zt said:
Yep, that's perfect. Thanks. The name for the mission menu is Scene_Missionmenu, but I can chnage that when I get the finished script anyway. As for the size of the item pictures - that's very small. Could you do more around the size 100x100? Because the images aren't icons, they're full size pictures, and trying to squeeze them into that smaller space will loose too much quality.

How about 96x96? The reason I'm putting forward these sizes is that they are the closest to evenly dividing the window that I can get at this point.
 
fox5":1tpt8hx5 said:
Just want to check how this is going. How is it doing?

Sorry about the lack of replies. I've had some college assignments come up over the last couple of days, but I do have time to work on it again. I should be able to edit this post with the next script within a day or two.
 
fox5":2f57ws8p said:
Don't worry about it, I understand. Look forward to seeing the finished thing.

I have a couple more questions. Will this inventory be like the standard inventory, in that it uses the same item systems. (In other words, same maximums, same stats, etc?) Next, will the description in the description window be the default item description? Also, I'm going to see if I can make it so that the items use a modified version of the item icon class, instead of trying to create a database of item graphics. (In other words, you set the item's icon to the 96x96 image, and I display it in this script. I'm not entirely sure if that will work, however.) Finally, are you going to be using the default item window at all, or can I overwrite it with my script?
 
1. The inventory will use the same items/weapons as in the standard inventory, but stats don't need to be shown anywhere.
2. The description window should be the default one.
3. That's fine with me.
4. No, I won't be using the default one at all, so you can overwrite it.
 
All right, here we go. Tell me what you think. I'm pretty sure that, based on what you told me, this should be fully functional. If anything is wrong with it, feel free to say so.

Code:
#==============================================================================

# ** Window_Help2

#------------------------------------------------------------------------------

#  This window shows skill and item explanations along with actor status.

#==============================================================================

 

class Window_Help2 < Window_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 594, 64)

    self.contents = Bitmap.new(width - 32, height - 32)

  end

  #--------------------------------------------------------------------------

  # * Set Text

  #  text  : text string displayed in window

  #  align : alignment (0..flush left, 1..center, 2..flush right)

  #--------------------------------------------------------------------------

  def set_text(text, align = 0)

    # If at least one part of text and alignment differ from last time

    if text != @text or align != @align

      # Redraw text

      self.contents.clear

      self.contents.font.color = normal_color

      self.contents.draw_text(4, 0, self.width - 40, 32, text, align)

      @text = text

      @align = align

      @actor = nil

    end

    self.visible = true

  end

  #--------------------------------------------------------------------------

  # * Set Actor

  #     actor : status displaying actor

  #--------------------------------------------------------------------------

  def set_actor(actor)

    if actor != @actor

      self.contents.clear

      draw_actor_name(actor, 4, 0)

      draw_actor_state(actor, 140, 0)

      draw_actor_hp(actor, 284, 0)

      draw_actor_sp(actor, 460, 0)

      @actor = actor

      @text = nil

      self.visible = true

    end

  end

  #--------------------------------------------------------------------------

  # * Set Enemy

  #     enemy : name and status displaying enemy

  #--------------------------------------------------------------------------

  def set_enemy(enemy)

    text = enemy.name

    state_text = make_battler_state_text(enemy, 112, false)

    if state_text != ""

      text += "  " + state_text

    end

    set_text(text, 1)

  end

end

 

 

#==============================================================================

# ** Window_MenuStatus

#------------------------------------------------------------------------------

#  This window displays an image of the player, their health, and their

#  Infection level on screen.

#==============================================================================

 

class Window_MenuStatus < Window_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 260, 117)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    # Generate Static Colors

    color_red = Color.new(255, 0, 0, 255)

    color_orange = Color.new(255, 128, 0, 255)

    color_blue = Color.new(0, 0, 255, 255)

    color_lightblue = Color.new(0, 128, 255, 255)

    color_black = Color.new(0, 0, 0, 255)

    # Create bitmaps

    actor_bitmap = RPG::Cache.picture('Actor1')

    hp_bitmap = RPG::Cache.picture('HPBAR')

    infection_bitmap = RPG::Cache.picture('INBAR')

    background_bitmap = RPG::Cache.picture('BGBAR')

    shadow_bitmap = RPG::Cache.picture('SHADOW')

    # Display actor image

    self.contents.blt(0, 0, actor_bitmap, Rect.new(0, 0, 85, 85))

    # Display shadow bitmap for HP and Infection gradient bars

    self.contents.blt(112, 27, shadow_bitmap, Rect.new(0, 0, 110, 20))

    self.contents.blt(112, 48, shadow_bitmap, Rect.new(0, 0, 110, 20))

    # Display background for HP and Infection gradient bars

    self.contents.blt(112, 27, background_bitmap, Rect.new(0, 0, 100, 10))

    self.contents.blt(112, 48, background_bitmap, Rect.new(0, 0, 100, 10))

    # Find current HP percentage

    max_hp = $game_actors[1].maxhp.to_f

    hp = $game_actors[1].hp.to_f

    hp_percent = ((hp / max_hp) * 100).to_i

    # Find current Infection percentage

    infection = $game_variables[1].to_f

    infection_percent = ((infection / 50.0) * 100).to_i

    # Generate HP and Infection bar rects

    hp_rect = Rect.new(0, 0, hp_percent, 10)

    infection_rect = Rect.new(0, 0, infection_percent, 10)

    # Display gradient bars for HP and Infection

    self.contents.blt(112, 27, hp_bitmap, hp_rect)

    self.contents.blt(112, 48, infection_bitmap, infection_rect)

  end

end

 

#==============================================================================

# ** Window_MenuInfo

#------------------------------------------------------------------------------

#  This window displays the current map and the number of zombies killed

#  on screen.

#==============================================================================

 

class Window_MenuInfo < Window_Base

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 319, 117)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    self.contents.clear

    # Get map id

    map_id = $game_map.map_id

    # load map name

    map_data = load_data('Data/MapInfos.rxdata')

    map_name = map_data[map_id].name

    self.contents.draw_text(0, 10, 212, 32, map_name)

    self.contents.font.color = system_color

    self.contents.draw_text(0, 43, 212, 32, 'Zombies Killed:')

    self.contents.font.color = normal_color

    kills = $game_variables[2].to_s

    self.contents.draw_text(72, 43, 212, 32, kills, 2)

  end

end

 

#==============================================================================

# ** Window_Item

#------------------------------------------------------------------------------

#  This window displays items in possession on the item and battle screens.

#==============================================================================

 

class Window_Item < Window_Selectable

  #--------------------------------------------------------------------------

  # * Object Initialization

  #--------------------------------------------------------------------------

  def initialize

    super(0, 0, 416, 224)

    @column_max = 4

    refresh

    self.index = 0

    # If in battle, move window to center of screen

    # and make it semi-transparent

    if $game_temp.in_battle

      self.y = 64

      self.height = 256

      self.back_opacity = 160

    end

  end

  #--------------------------------------------------------------------------

  # * Get Item

  #--------------------------------------------------------------------------

  def item

    return @data[self.index]

  end

  #--------------------------------------------------------------------------

  # * Refresh

  #--------------------------------------------------------------------------

  def refresh

    if self.contents != nil

      self.contents.dispose

      self.contents = nil

    end

    @data = []

    # Add item

    for i in 1...$data_items.size

      if $game_party.item_number(i) > 0

        @data.push($data_items[i])

      end

    end

    # Also add weapons and items if outside of battle

    unless $game_temp.in_battle

      for i in 1...$data_weapons.size

        if $game_party.weapon_number(i) > 0

          @data.push($data_weapons[i])

        end

      end

      for i in 1...$data_armors.size

        if $game_party.armor_number(i) > 0

          @data.push($data_armors[i])

        end

      end

    end

    # If item count is not 0, make a bit map and draw all items

    @item_max = @data.size

    if @item_max > 0

      self.contents = Bitmap.new(width - 32, row_max * 96)

      for i in 0...@item_max

        draw_item(i)

      end

    end

  end

  #--------------------------------------------------------------------------

  # * Draw Item

  #     index : item number

  #--------------------------------------------------------------------------

  def draw_item(index)

    item = @data[index]

    case item

    when RPG::Item

      number = $game_party.item_number(item.id)

    when RPG::Weapon

      number = $game_party.weapon_number(item.id)

    when RPG::Armor

      number = $game_party.armor_number(item.id)

    end

    if item.is_a?(RPG::Item) and

       $game_party.item_can_use?(item.id)

      self.contents.font.color = normal_color

    else

      self.contents.font.color = disabled_color

    end

    x = 4 + index % 4 * 96

    y = index / 4 * 32

    rect = Rect.new(x, y, self.width / @column_max - 32, 88)

    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))

    bitmap = RPG::Cache.icon(item.icon_name)

    opacity = self.contents.font.color == normal_color ? 255 : 128

    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 88, 88), opacity)

  end

  #--------------------------------------------------------------------------

  # * Update Cursor Rectangle

  #--------------------------------------------------------------------------

  def update_cursor_rect

    # If cursor position is less than 0

    if @index < 0

      self.cursor_rect.empty

      return

    end

    # Get current row

    row = @index / @column_max

    # If current row is before top row

    if row < self.top_row

      # Scroll so that current row becomes top row

      self.top_row = row

    end

    # If current row is more to back than back row

    if row > self.top_row + (self.page_row_max - 1)

      # Scroll so that current row becomes back row

      self.top_row = row - (self.page_row_max - 1)

    end

    # Calculate cursor width

    cursor_width = (self.width - 32) / @column_max

    # Calculate cursor coordinates

    x = @index % @column_max * (cursor_width)

    y = @index / @column_max * 96 - self.oy

    # Update cursor rectangle

    self.cursor_rect.set(x, y, cursor_width, 96)

  end

  #--------------------------------------------------------------------------

  # * Help Text Update

  #--------------------------------------------------------------------------

  def update_help

    @help_window.set_text(self.item == nil ? "" : self.item.description)

  end

end

 

#==============================================================================

# ** Scene_Map

#------------------------------------------------------------------------------

#  This class performs map screen processing.

#==============================================================================

 

class Scene_Map

  #--------------------------------------------------------------------------

  # * Menu Call

  #--------------------------------------------------------------------------

  def call_menu

    # Hide HUD

    pictures = $game_screen.pictures

    original_opacity = []

    for i in 1...10

      picture = pictures[i]

      origin = picture.origin

      x = picture.x

      y = picture.y

      zoom_x = picture.zoom_x

      zoom_y = picture.zoom_y

      original_opacity.push(picture.opacity)

      blend_type = picture.blend_type

      pictures[i].move(1, origin, x, y, zoom_x, zoom_y, 0.0, blend_type)

    end

    $game_screen.update

    # Clear menu call flag

    $game_temp.menu_calling = false

    # If menu beep flag is set

    if $game_temp.menu_beep

      # Play decision SE

      $game_system.se_play($data_system.decision_se)

      # Clear menu beep flag

      $game_temp.menu_beep = false

    end

    # Straighten player position

    $game_player.straighten

    # Switch to menu screen

    $scene = Scene_Menu.new(original_opacity)

  end

end

 

#==============================================================================

# ** Scene_Menu

#------------------------------------------------------------------------------

#  This class performs menu screen processing.

#==============================================================================

 

class Scene_Menu

  #--------------------------------------------------------------------------

  # * Object Initialization

  #     menu_index : command cursor's initial position

  #--------------------------------------------------------------------------

  def initialize(pictures = [0, 0, 0, 0, 0, 0, 0, 0, 0], menu_index = 0)

    @menu_index = menu_index

    @original_opacity = pictures

  end

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    # Display map behind menu

    @spriteset = Spriteset_Map.new

    # Make command window

    s1 = 'Inventory'

    s2 = 'Missions'

    s3 = 'Save'

    s4 = 'Exit'

    @command_window = Window_Command.new(162, [s1, s2, s3, s4])

    @command_window.index = @menu_index

    @command_window.x = 23

    @command_window.y = 155

    # If number of party members is 0

    if $game_party.actors.size == 0

      # Disable items, skills, equipment, and status

      @command_window.disable_item(0)

    end

    # If save is forbidden

    if $game_system.save_disabled

      # Disable save

      @command_window.disable_item(3)

    end

    # Make status window

    @status_window = Window_MenuStatus.new

    @status_window.x = 23

    @status_window.y = 23

    # Make information window

    @info_window = Window_MenuInfo.new

    @info_window.x = 298

    @info_window.y = 23

    # Make help window

    @help_window = Window_Help2.new

    @help_window.x = 23

    @help_window.y = 394

    # Make item window

    @item_window = Window_Item.new

    @item_window.x = 201

    @item_window.y = 155

    @item_window.active = false

    @item_window.help_window = @help_window

    # Make target window (set to invisible / inactive)

    @target_window = Window_Target.new

    @target_window.visible = false

    @target_window.active = false

    # Execute transition

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of windows

    @command_window.dispose

    @status_window.dispose

    @info_window.dispose

    @help_window.dispose

    @item_window.dispose

    @target_window.dispose

    # Dispose of map

    @spriteset.dispose

    # Display HUD

    pictures = $game_screen.pictures

    for i in 1...9

      picture = pictures[i]

      origin = picture.origin

      x = picture.x

      y = picture.y

      zoom_x = picture.zoom_x

      zoom_y = picture.zoom_y

      opacity = @original_opacity[i - 1].to_s.to_f

      blend_type = picture.blend_type

      pictures[i].move(1, origin, x, y, zoom_x, zoom_y, opacity, blend_type)

    end

    $game_screen.update

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    # Update Screen

    $game_screen.update

    # Update map

    @spriteset.update

    # Update windows

    @command_window.update

    @status_window.update

    @info_window.update

    @help_window.update

    @item_window.update

    @target_window.update

    # If command window is active: call update_command

    if @command_window.active

      update_command

      return

    end

    # If item window is active: call update_item

    if @item_window.active

      update_item

      return

    end

    # If target window is active: call update_target

    if @target_window.active

      update_target

      return

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update (when command window is active)

  #--------------------------------------------------------------------------

  def update_command

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Switch to map screen

      $scene = Scene_Map.new

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # If command other than save or end game, and party members = 0

      if $game_party.actors.size == 0 and @command_window.index < 4

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # Branch by command window cursor position

      case @command_window.index

      when 0  # item

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Make status window active

        @command_window.active = false

        @item_window.active = true

        @item_window.index = 0

      when 1  # skill

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_Mission.new

      when 2  # save

        # If saving is forbidden

        if $game_system.save_disabled

          # Play buzzer SE

          $game_system.se_play($data_system.buzzer_se)

          return

        end

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to save screen

        $scene = Scene_Save.new

      when 3  # end game

        # Play decision SE

        $game_system.se_play($data_system.decision_se)

        # Switch to end game screen

        $scene = Scene_End.new

      end

      return

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update (when item window is active)

  #--------------------------------------------------------------------------

  def update_item

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Switch to menu screen

      @command_window.active = true

      @item_window.active = false

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # Get currently selected data on the item window

      @item = @item_window.item

      # If not a use item

      unless @item.is_a?(RPG::Item)

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # If it can't be used

      unless $game_party.item_can_use?(@item.id)

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # Play decision SE

      $game_system.se_play($data_system.decision_se)

      # If effect scope is an ally

      if @item.scope >= 3

        # Activate target window

        @item_window.active = false

        @target_window.visible = true

        @target_window.active = true

        # Set cursor position to effect scope (single / all)

        if @item.scope == 4 || @item.scope == 6

          @target_window.index = -1

        else

          @target_window.index = 0

        end

      # If effect scope is other than an ally

      else

        # If command event ID is valid

        if @item.common_event_id > 0

          # Command event call reservation

          $game_temp.common_event_id = @item.common_event_id

          # Play item use SE

          $game_system.se_play(@item.menu_se)

          # If consumable

          if @item.consumable

            # Decrease used items by 1

            $game_party.lose_item(@item.id, 1)

            # Draw item window item

            @item_window.draw_item(@item_window.index)

          end

          # Switch to map screen

          $scene = Scene_Map.new

          return

        end

      end

      return

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update (when target window is active)

  #--------------------------------------------------------------------------

  def update_target

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # If unable to use because items ran out

      unless $game_party.item_can_use?(@item.id)

        # Remake item window contents

        @item_window.refresh

      end

      # Erase target window

      @item_window.active = true

      @target_window.visible = false

      @target_window.active = false

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # If items are used up

      if $game_party.item_number(@item.id) == 0

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

        return

      end

      # If target is all

      if @target_window.index == -1

        # Apply item effects to entire party

        used = false

        for i in $game_party.actors

          used |= i.item_effect(@item)

        end

      end

      # If single target

      if @target_window.index >= 0

        # Apply item use effects to target actor

        target = $game_party.actors[@target_window.index]

        used = target.item_effect(@item)

      end

      # If an item was used

      if used

        # Play item use SE

        $game_system.se_play(@item.menu_se)

        # If consumable

        if @item.consumable

          # Decrease used items by 1

          $game_party.lose_item(@item.id, 1)

          # Redraw item window item

          @item_window.draw_item(@item_window.index)

        end

        # Remake target window contents

        @target_window.refresh

        # If all party members are dead

        if $game_party.all_dead?

          # Switch to game over screen

          $scene = Scene_Gameover.new

          return

        end

        # If common event ID is valid

        if @item.common_event_id > 0

          # Common event call reservation

          $game_temp.common_event_id = @item.common_event_id

          # Switch to map screen

          $scene = Scene_Map.new

          return

        end

      end

      # If item wasn't used

      unless used

        # Play buzzer SE

        $game_system.se_play($data_system.buzzer_se)

      end

      return

    end

  end

end

 

#==============================================================================

# ** Scene_Save

#------------------------------------------------------------------------------

#  This class performs save screen processing.

#==============================================================================

 

class Scene_Save < Scene_File

  #--------------------------------------------------------------------------

  # * Cancel Processing

  #--------------------------------------------------------------------------

  def on_cancel

    # Play cancel SE

    $game_system.se_play($data_system.cancel_se)

    # If called from event

    if $game_temp.save_calling

      # Clear save call flag

      $game_temp.save_calling = false

      # Switch to map screen

      $scene = Scene_Map.new

      return

    end

    # Set frame count for tone change

    frames = 40

    until frames <= 0

      # Update screen

      $game_screen.update

      # Subtract one frame from count

      frames -= 1

    end

    # Switch to menu screen

    $scene = Scene_Menu.new(2)

  end

end

 

#==============================================================================

# ** Scene_End

#------------------------------------------------------------------------------

#  This class performs game end screen processing.

#==============================================================================

 

class Scene_End

  #--------------------------------------------------------------------------

  # * Main Processing

  #--------------------------------------------------------------------------

  def main

    # Display map behind menu

    @spriteset = Spriteset_Map.new

    # Make command window

    s1 = "To Title"

    s2 = "Shutdown"

    s3 = "Cancel"

    @command_window = Window_Command.new(192, [s1, s2, s3])

    @command_window.x = 320 - @command_window.width / 2

    @command_window.y = 240 - @command_window.height / 2

    # Execute transition

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame Update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of window

    @command_window.dispose

    # If switching to title screen

    if $scene.is_a?(Scene_Title)

      # Fade out screen

      Graphics.transition

      Graphics.freeze

    end

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    # Update map

    @spriteset.update

    # Update command window

    @command_window.update

    # If B button was pressed

    if Input.trigger?(Input::B)

      # Play cancel SE

      $game_system.se_play($data_system.cancel_se)

      # Set frame count for tone change

      frames = 40

      until frames <= 0

        # Update screen

        $game_screen.update

        # Subtract one frame from count

        frames -= 1

      end

      # Switch to menu screen

      $scene = Scene_Menu.new(3)

      return

    end

    # If C button was pressed

    if Input.trigger?(Input::C)

      # Branch by command window cursor position

      case @command_window.index

      when 0  # to title

        command_to_title

      when 1  # shutdown

        command_shutdown

      when 2  # quit

        command_cancel

      end

      return

    end

  end

  #--------------------------------------------------------------------------

  # *  Process When Choosing [Cancel] Command

  #--------------------------------------------------------------------------

  def command_cancel

    # Play decision SE

    $game_system.se_play($data_system.decision_se)

    # Set frame count for tone change

    frames = 40

    until frames <= 0

      # Update screen

      $game_screen.update

      # Subtract one frame from count

      frames -= 1

    end

    # Switch to menu screen

    $scene = Scene_Menu.new(3)

  end

end

 
 
Whoa, that looks great. There are a few things that don't quite work, though:

1. You can't scroll down through the weapons and items. Once you get past 6 items, the rest appear below the window, and going down to them means the cursor disappears:

(I know the icon's are in the wrong place, I haven't changed to my 96x96 ones yet)

18384889.png


2. I'm not sure if I made this clear, so I'm sorry about this, but I need the weapon to equip if you press enter over it. At the moment, pressing enter over a weapon doesn't do anything.
3. When you come off of the save scene or the mission scene, the images of the HUD re appear over the menu:

25964913.png


And when you then quit the menu, the HUD disappears altogether.
I know this is probably to do with the save and mission scripts, so I'll post the mission script incase you need to edit it.

Code:
#===================================

#  Leon's Mission Script v2.0

#----------------------------------------------------------------------

#  2006-09-22

#===================================

=begin

Description:

I did a drastic overhaul on this Mission/Quest script to make it much better and user friendly.

 

Features:

There is 2 new features:  

1.  If the user doesn't know of the mission, it doesn'tappear in the list, nor does a slot for it.

2.  Completed missions are in green.

3.  Number of missions.  (X/Y)  X is completed missions, Y can be either known missions, 

     or your game's total missions.  Set Mission_Setup to 'true' if you want known missions,

     false for total.

 

Instructions:

Put it above main.

 

The instructions have changed alot more than the features.  Just go through

the short list below, and you'll know.  Just remember, go in order, and if you have 10

different missions in 1 spot, you must have the same number in each other segment

of the module, with the exception of the lines of text.  (Yes, i made that one all the easier.)

 

Changing the status of the missions is different than before as well.

 

You can use $game_party.mission[x] += y  to add to a mission's status, x = mission#, y = amount.

 

or set it using $game_party.mission[x] = y, x being the mission id, 

y being the status you want it set to.

 

1 = they dont know the mission

2 = they know the mission, but it is incomplete

3 = the mission is complete.

 

Do NOT post my work in any other forums without my permission, and NEVER take credit

for my work. 

=end

 

#==================================

#  ** Mission_Menu

#==================================

module Mission_Menu

  #--------------------------------------------------------------------

  #  * Mission Name-  Write the mission number, and the name you want to appear.

  #  ~ mission_id => "mission name"

  #--------------------------------------------------------------------

  Mission_Name = {

  0 => "",

  1 => "",

  2 => "",

  3 => "",

  4 => "",

  5 => "",

  6 => ""

  }

  #--------------------------------------------------------------------

  #   * Mission_Sprite.  holds data on the name of the sprite, it's hue, name, locale, and 

  #   * reward all in one.

  #   ~ mission_id => ["sprite name", hue, name, location, Reward]

  #--------------------------------------------------------------------

  Mission_Sprite = {

  0 => ["", 0, "", "", ""],

  1 => ["", 0, "", "", ""],

  2 => ["", 0, "", "", ""],

  3 => ["", 0, "", "", ""],

  4 => ["", 0, "", "", ""],

  5 => ["", 0, "", "", ""],

  6 => ["", 0, "", "", ""]

  }

  #--------------------------------------------------------------------

  #   * Defines the mission.  Remember, if it is too long for 1 line, you can drop it

  #   * down to line 2.

  #   ~ mission_id => "Line One"

  #--------------------------------------------------------------------

  Mission_L1 = {

  0 => "",

  1 => "",

  2 => "",

  3 => "",

  4 => "",

  5 => "",

  6 => ""

  }

  #--------------------------------------------------------------------

  #   * Same as the above one.

  #   ~ mission_id => "Line Two"

  #--------------------------------------------------------------------

  Mission_L2 = {

  0 => "",

  1 => "",

  2 => "",

  3 => "",

  4 => "",

  5 => "",

  6 => ""

  }

  #--------------------------------------------------------------------

  #   * Same as the above one.

  #   ~ mission_id => "Line Three"

  #--------------------------------------------------------------------

  Mission_L3 = {

  0 => "",

  1 => "",

  2 => "",

  3 => "",

  4 => "",

  5 => "",

  6 => ""

  }

  #--------------------------------------------------------------------

  #   * Same as the above one.

  #   ~ mission_id => "Line Four"

  #--------------------------------------------------------------------

  Mission_L4 = {

  0 => "",

  1 => "",

  2 => "",

  3 => "",

  4 => "",

  5 => "",

  6 => ""

  }

  #--------------------------------------------------------------------

  #   * Same as the above one.

  #   ~ mission_id => "Line Five"

  #--------------------------------------------------------------------

  Mission_L5 = {

  0 => "",

  1 => "",

  2 => "",

  3 => "",

  4 => "",

  5 => "",

  6 => ""

  }

  #--------------------------------------------------------------------

  #   * Same as the above one.

  #   ~ mission_id => "Line Six"

  #--------------------------------------------------------------------

  Mission_L6 = {

  0 => "",

  1 => "",

  2 => "",

  3 => "",

  4 => "",

  5 => "",

  6 => ""

  }

  #--------------------------------------------------------------------

  #   * Same as the above one.

  #   ~ mission_id => "Line Seven"

  #--------------------------------------------------------------------

  Mission_L7 = {

  0 => "",

  1 => "",

  2 => "",

  3 => "",

  4 => "",

  5 => "",

  6 => ""

  }

  #--------------------------------------------------------------------

  #   * Same as the above one.

  #   ~ mission_id => "Line Eight"

  #--------------------------------------------------------------------

  Mission_L8 = {

  0 => "",

  1 => "",

  2 => "",

  3 => "",

  4 => "",

  5 => "",

  6 => ""

  }

  #--------------------------------------------------------------------

  #   * Mission Set-up

  #--------------------------------------------------------------------

  Mission_Setup = true

end

 

#----------------------------------------------------------------------

#  * Game_Party

#----------------------------------------------------------------------

class Game_Party

  #--------------------------------------------------------------------

  #  * Attributes

  #--------------------------------------------------------------------

  attr_accessor    :mission

  #--------------------------------------------------------------------

  #  * Alias Listings

  #--------------------------------------------------------------------

  alias leon_gp_mission_initialize initialize

  #--------------------------------------------------------------------

  #  * Object initialization

  #--------------------------------------------------------------------

  def initialize

    leon_gp_mission_initialize

    @mission = [[0, 2], [1, 3], [2, 1], [3, 3], [4, 4], [5,5], [6,6]]

  end

end

#--------------------------------------------------------------------

#  * Ends Game_Party

#--------------------------------------------------------------------

 

#----------------------------------------------------------------------

#  * Window_Missionhelp

#----------------------------------------------------------------------

class Window_Missionhelp < Window_Base

  #--------------------------------------------------------------------

  #  * Object Initialization

  #--------------------------------------------------------------------

  def initialize

    super(0, 0, 400, 60)

    self.contents = Bitmap.new(width - 32, height - 32)

  end

  #--------------------------------------------------------------------

  #  * Update

  #--------------------------------------------------------------------

  def update(help_text)

    self.contents.clear

    self.contents.draw_text(0, 0, 440, 32, help_text)

  end

  

end

#----------------------------------------------------------------------

#  * End Window_Missionhelp

#----------------------------------------------------------------------

 

#----------------------------------------------------------------------

#  Window_MissionNum

#----------------------------------------------------------------------

class Window_MissionNum < Window_Base

  #--------------------------------------------------------------------

  #  * Object Initialization

  #--------------------------------------------------------------------

  def initialize

    super(400, 0, 240, 64)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh

  end

  

  #--------------------------------------------------------------------

  #  * Refresh

  #--------------------------------------------------------------------

  def refresh

    self.contents.clear

    mis = Mission_Menu

    self.contents.font.color = system_color

    self.contents.draw_text(0, 0, 120, 32, "Missions:")

    self.contents.font.color = normal_color

    @mission_comp = []

    @mission_know = []

    #Calls Mission number of missions

    for i in 0...$game_party.mission.size

      if $game_party.mission[i][1] == 3

        @mission_comp.push(i)

      end

    end

    #Calls Mission number of missions

    for j in 0...$game_party.mission.size

      if $game_party.mission[j][1] > 1

        @mission_know.push(j)

      end

    end

    #if Mission_Setup is false...

    if mis::Mission_Setup == false

      if @mission_comp.size == $game_party.mission.size

        self.contents.font.color = Color.new(40, 250, 40, 255)

        self.contents.draw_text(0, 0, 208, 32, @mission_comp.size.to_s + 

        "/" + $game_party.mission.size.to_s, 2)

        self.contents.font.color = normal_color

      else

        self.contents.draw_text(0, 0, 208, 32, @mission_comp.size.to_s + 

        "/" + $game_party.mission.size.to_s, 2)

      end

      #if Mission_Setup is true...

    elsif mis::Mission_Setup == true

      if @mission_comp.size == @mission_know.size

        self.contents.font.color = Color.new(40, 250, 40, 255)

        self.contents.draw_text(0, 0, 208, 32, @mission_comp.size.to_s + 

        "/" + @mission_know.size.to_s, 2)

        self.contents.font.color = normal_color

      else

        self.contents.draw_text(0, 0, 208, 32, @mission_comp.size.to_s + 

        "/" + @mission_know.size.to_s, 2)

      end

    end

  end

end

#----------------------------------------------------------------------

#  * End Window_Missionnum

#----------------------------------------------------------------------

 

 

#----------------------------------------------------------------------

#  Window_Missionlist

#----------------------------------------------------------------------

class Window_Missionlist < Window_Selectable

  #--------------------------------------------------------------------

  #  * Attribute listings

  #--------------------------------------------------------------------

  attr_accessor    :mission

  #--------------------------------------------------------------------

  #  * Object Initialization

  #--------------------------------------------------------------------

  def initialize

    super(0, 60, 260, 420)

    self.contents = Bitmap.new(width - 32, height - 32)

    self.index = 0

    refresh

  end

  #--------------------------------------------------------------------

  #  * Mission

  #--------------------------------------------------------------------

  def mission

    return @data[self.index]

  end

  #--------------------------------------------------------------------

  #  * Refresh

  #--------------------------------------------------------------------

  def refresh

    if self.contents != nil

      self.contents.dispose

      self.contents = nil

    end

    mis = Mission_Menu

    @data = []

    for i in 0...$game_party.mission.size

      mission1 = $game_party.mission[i][0]

      mission2 = $game_party.mission[i][1]

      if mission2 > 1

        @data.push(mission1)

      end

    end

    @item_max = @data.size

    if @item_max > 0

      self.contents = Bitmap.new(width - 32, row_max * 32)

      for i in 0...@item_max

        draw_item(i)

      end

    end

  end

  #--------------------------------------------------------------------

  #  * Draw_Item

  #--------------------------------------------------------------------

  def draw_item(index)

    mis = Mission_Menu

    mission3 = @data[index]

    x = 4

    y = index * 32

    rect = Rect.new(x, y, self.width - 32, 32)

    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))

    if $game_party.mission[mission3][1] == 3

      self.contents.font.color = Color.new(40, 250, 40, 255)

      self.contents.draw_text(x, y, 228, 32, mis::Mission_Name[mission3])

    else

      self.contents.font.color = normal_color

      self.contents.draw_text(x, y, 228, 32, mis::Mission_Name[mission3])

    end

  end

  

end

#----------------------------------------------------------------------

#  * End Window_Missionlist

#----------------------------------------------------------------------

 

#----------------------------------------------------------------------

#  Window_Missioncomp

#----------------------------------------------------------------------

class  Window_Missioncomp < Window_Base

  #--------------------------------------------------------------------

  #  * Object Initialization

  #--------------------------------------------------------------------

  def initialize(mission)

    super(260, 365, 380, 115)

    self.contents = Bitmap.new(width - 32, height - 32)

    refresh(mission)

  end

  #--------------------------------------------------------------------

  #  * Refresh

  #--------------------------------------------------------------------

  def refresh(mission)

    self.contents.clear

    self.contents.font.color = system_color

    self.contents.draw_text(0, 52, 440, 32, "Status:")

    self.contents.draw_text(170, 52, 440, 32, "")

    self.contents.font.color = normal_color

    #person place status reward

    mis = Mission_Menu

    if mis::Mission_Sprite.has_key?(mission)

      if $game_party.mission[mission][1] > 1

        self.contents.draw_text(36, 6, 440, 32, 

        mis::Mission_Sprite[mission][2] + ", " + mis::Mission_Sprite[mission][3])

        case $game_party.mission[mission][1]

        when 1

          self.contents.draw_text(62, 52, 400, 32, "")

        when 2

          self.contents.draw_text(62, 52, 400, 32, "      Incomplete")

          self.contents.draw_text(242, 52, 138, 32, "      ")

        when 3

          self.contents.font.color = Color.new(40, 250, 40, 255)

          self.contents.draw_text(62, 52, 400, 32, "      Complete")

          self.contents.draw_text(242, 52, 138, 32, mis::Mission_Sprite[mission][4])

        end

        bitmap = RPG::Cache.character(mis::Mission_Sprite[mission][0], 

        mis::Mission_Sprite[mission][1])

        cw = bitmap.width / 4

        ch = bitmap.height / 4

        facing = 0

        src_rect = Rect.new(0, facing * ch, cw, ch)

        self.contents.blt(0, 0, bitmap, src_rect)

      end

    end

  end

  

  def clear

    self.contents.clear

  end

  

end

#--------------------------------------------------------------------

#  * Ends Window_Missioncomp

#--------------------------------------------------------------------

 

  

#----------------------------------------------------------------------

#  Window_Missiondesc

#----------------------------------------------------------------------

class Window_Missiondesc < Window_Base

  #--------------------------------------------------------------------

  #  * Object Initialization

  #--------------------------------------------------------------------

  def initialize(mission)

    super(260, 60, 380, 305)

    self.contents = Bitmap.new(width - 32, height - 32)

  end

  #--------------------------------------------------------------------

  #  * Refresh

  #--------------------------------------------------------------------

  def refresh(mission)

    self.contents.clear

    mis = Mission_Menu

    self.contents.draw_text(30, 0, 348, 32, mis::Mission_L1[mission].to_s)

    self.contents.draw_text(0, 32, 348, 32, mis::Mission_L2[mission].to_s)

    self.contents.draw_text(0, 64, 348, 32, mis::Mission_L3[mission].to_s)

    self.contents.draw_text(0, 96, 348, 32, mis::Mission_L4[mission].to_s)

    self.contents.draw_text(0, 128, 348, 32, mis::Mission_L5[mission].to_s)

    self.contents.draw_text(0, 160, 348, 32, mis::Mission_L6[mission].to_s)

    self.contents.draw_text(0, 192, 348, 32, mis::Mission_L7[mission].to_s)

    self.contents.draw_text(0, 224, 348, 32, mis::Mission_L8[mission].to_s)

  end

end

#--------------------------------------------------------------------

#  * Ends Window_Missiondesc

#--------------------------------------------------------------------

 

 

#====================================

#  Scene_MissionMenu

#====================================

class Scene_Missionmenu

  #--------------------------------------------------------------------

  #  * Object Initialization

  #--------------------------------------------------------------------

  def initialize(menu_index = 0)

    @menu_index = menu_index

  end

  #--------------------------------------------------------------------

  #  * Main

  #--------------------------------------------------------------------

  def main

    

    @missionhelp_window = Window_Missionhelp.new

    @missionlist_window = Window_Missionlist.new

    @missionnum_window = Window_MissionNum.new

    @missioncomp_window = Window_Missioncomp.new(@missionlist_window.mission)

    @missiondesc_window = Window_Missiondesc.new(@missionlist_window.mission)

    @mission = @missionlist_window.mission

    

    

    Graphics.transition

    loop do

      Graphics.update

      Input.update

      update

      if $scene != self

        break

      end

    end

    Graphics.freeze

    @missionhelp_window.dispose

    @missiondesc_window.dispose

    @missioncomp_window.dispose

    @missionlist_window.dispose

    @missionnum_window.dispose

  end

  #--------------------------------------------------------------------

  #  * Update

  #--------------------------------------------------------------------

  def update

    mis = Mission_Menu

    @missionhelp_window.update("Select a mission to see details.")

    @missiondesc_window.refresh(@missionlist_window.mission)

    @missioncomp_window.refresh(@missionlist_window.mission)

    @missionlist_window.update

    @missionnum_window.update

    if Input.trigger?(Input::B)

      $game_system.se_play($data_system.cancel_se)

      $scene = Scene_Menu.new

    end

    return

  end

 

end

#--------------------------------------------------------------------

#  * Ends Scene_Missionmenu

#--------------------------------------------------------------------

 

EDIT: One last error. As you can see from the first image, the icons all overlap and are in the wrong place. Even though I've now replaced the icons with the 96x96 icons, they're still in the wrong place. Could you sort that as well, please.

I hope those errors are easy to fix, and I look forward to seeing the finished version.
Thanks
Fox
 
fox5":wb4rjs62 said:
Whoa, that looks great. There are a few things that don't quite work, though:

1. You can't scroll down through the weapons and items. Once you get past 6 items, the rest appear below the window, and going down to them means the cursor disappears:

2. I'm not sure if I made this clear, so I'm sorry about this, but I need the weapon to equip if you press enter over it. At the moment, pressing enter over a weapon doesn't do anything.

3. When you come off of the save scene or the mission scene, the images of the HUD re appear over the menu:

And when you then quit the menu, the HUD disappears altogether.
I know this is probably to do with the save and mission scripts, so I'll post the mission script incase you need to edit it.

EDIT: One last error. As you can see from the first image, the icons all overlap and are in the wrong place. Even though I've now replaced the icons with the 96x96 icons, they're still in the wrong place. Could you sort that as well, please.

I hope those errors are easy to fix, and I look forward to seeing the finished version.
Thanks
Fox

I'll look into fixing 1 and 3, and work on 2. Also, as to the icon size, I realized that I can't seem to get the cursor to display over the icons, so I had to make the size a little smaller than I thought. They are currently at 88x88, so that the icon will display over them. If your icon display over them automatically, I can easily change it back for you.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top